@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.
- package/dist/api/categories.d.ts.map +1 -1
- package/dist/api/categories.js +42 -38
- package/dist/api/handler.d.ts +1 -26
- package/dist/api/handler.d.ts.map +1 -1
- package/dist/api/handler.js +81 -490
- package/dist/api/router.d.ts +0 -5
- package/dist/api/router.d.ts.map +1 -1
- package/dist/api/router.js +8 -35
- package/dist/api/service.d.ts +80 -0
- package/dist/api/service.d.ts.map +1 -0
- package/dist/api/service.js +219 -0
- package/dist/hooks/useAutoSave.d.ts +10 -0
- package/dist/hooks/useAutoSave.d.ts.map +1 -0
- package/dist/hooks/useAutoSave.js +57 -0
- package/dist/hooks/useCategories.d.ts +1 -1
- package/dist/hooks/useCategories.d.ts.map +1 -1
- package/dist/hooks/useCategories.js +15 -46
- package/dist/index.d.ts +24 -31
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -201
- package/dist/init.d.ts +20 -7
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +8 -7
- package/dist/lib/blocks/BlockRenderer.d.ts.map +1 -1
- package/dist/lib/layouts/blocks/ColumnsBlock.d.ts.map +1 -1
- package/dist/lib/layouts/blocks/ColumnsBlock.js +30 -113
- package/dist/lib/layouts/blocks/SectionBlock.d.ts.map +1 -1
- package/dist/lib/layouts/blocks/SectionBlock.js +9 -21
- package/dist/lib/layouts/index.d.ts +3 -3
- package/dist/lib/layouts/index.js +4 -4
- package/dist/lib/mappers/apiMapper.d.ts +10 -0
- package/dist/lib/mappers/apiMapper.d.ts.map +1 -1
- package/dist/lib/mappers/apiMapper.js +47 -32
- package/dist/lib/rich-text/RichTextEditor.d.ts +4 -2
- package/dist/lib/rich-text/RichTextEditor.d.ts.map +1 -1
- package/dist/lib/rich-text/RichTextEditor.js +12 -9
- package/dist/lib/utils/config-resolver.d.ts +28 -0
- package/dist/lib/utils/config-resolver.d.ts.map +1 -0
- package/dist/lib/utils/config-resolver.js +46 -0
- package/dist/lib/utils/tree.d.ts +29 -0
- package/dist/lib/utils/tree.d.ts.map +1 -0
- package/dist/lib/utils/tree.js +129 -0
- package/dist/state/EditorContext.d.ts +3 -25
- package/dist/state/EditorContext.d.ts.map +1 -1
- package/dist/state/EditorContext.js +124 -174
- package/dist/state/reducer.d.ts +1 -5
- package/dist/state/reducer.d.ts.map +1 -1
- package/dist/state/reducer.js +128 -521
- package/dist/state/types.d.ts +12 -1
- package/dist/state/types.d.ts.map +1 -1
- package/dist/types/block.d.ts +9 -0
- package/dist/types/block.d.ts.map +1 -1
- package/dist/types/post.d.ts +17 -1
- package/dist/types/post.d.ts.map +1 -1
- package/dist/views/CanvasEditor/BlockWrapper.d.ts +5 -6
- package/dist/views/CanvasEditor/BlockWrapper.d.ts.map +1 -1
- package/dist/views/CanvasEditor/BlockWrapper.js +56 -264
- package/dist/views/CanvasEditor/CanvasEditorView.d.ts +5 -3
- package/dist/views/CanvasEditor/CanvasEditorView.d.ts.map +1 -1
- package/dist/views/CanvasEditor/CanvasEditorView.js +55 -315
- package/dist/views/CanvasEditor/EditorBody.d.ts +6 -8
- package/dist/views/CanvasEditor/EditorBody.d.ts.map +1 -1
- package/dist/views/CanvasEditor/EditorBody.js +34 -482
- package/dist/views/CanvasEditor/EditorHeader.d.ts.map +1 -1
- package/dist/views/CanvasEditor/EditorHeader.js +27 -63
- package/dist/views/CanvasEditor/LayoutContainer.d.ts.map +1 -1
- package/dist/views/CanvasEditor/LayoutContainer.js +49 -70
- package/dist/views/CanvasEditor/components/CustomBlockItem.js +1 -1
- package/dist/views/CanvasEditor/components/EditorCanvas.d.ts +15 -3
- package/dist/views/CanvasEditor/components/EditorCanvas.d.ts.map +1 -1
- package/dist/views/CanvasEditor/components/EditorCanvas.js +40 -18
- package/dist/views/CanvasEditor/components/EditorLibrary.d.ts +5 -1
- package/dist/views/CanvasEditor/components/EditorLibrary.d.ts.map +1 -1
- package/dist/views/CanvasEditor/components/EditorLibrary.js +11 -7
- package/dist/views/CanvasEditor/components/EditorSidebar.d.ts.map +1 -1
- package/dist/views/CanvasEditor/components/EditorSidebar.js +32 -14
- package/dist/views/CanvasEditor/components/FeaturedMediaSection.d.ts +0 -6
- package/dist/views/CanvasEditor/components/FeaturedMediaSection.d.ts.map +1 -1
- package/dist/views/CanvasEditor/components/FeaturedMediaSection.js +17 -128
- package/dist/views/CanvasEditor/components/JSONInspector.d.ts +9 -0
- package/dist/views/CanvasEditor/components/JSONInspector.d.ts.map +1 -0
- package/dist/views/CanvasEditor/components/JSONInspector.js +56 -0
- package/dist/views/CanvasEditor/components/LibraryItem.js +2 -2
- package/dist/views/CanvasEditor/components/PrivacySettingsSection.d.ts +0 -4
- package/dist/views/CanvasEditor/components/PrivacySettingsSection.d.ts.map +1 -1
- package/dist/views/CanvasEditor/components/PrivacySettingsSection.js +6 -28
- package/dist/views/CanvasEditor/components/index.d.ts +2 -0
- package/dist/views/CanvasEditor/components/index.d.ts.map +1 -1
- package/dist/views/CanvasEditor/components/index.js +1 -0
- package/dist/views/CanvasEditor/hooks/useHeroBlock.d.ts.map +1 -1
- package/dist/views/CanvasEditor/hooks/useHeroBlock.js +15 -18
- package/dist/views/CanvasEditor/hooks/usePostLoader.d.ts +3 -0
- package/dist/views/CanvasEditor/hooks/usePostLoader.d.ts.map +1 -1
- package/dist/views/CanvasEditor/hooks/usePostLoader.js +12 -13
- package/dist/views/CanvasEditor/hooks/useUnsavedChanges.js +0 -4
- package/dist/views/PostManager/EmptyState.d.ts +1 -1
- package/dist/views/PostManager/EmptyState.js +4 -4
- package/dist/views/PostManager/FilterDropdown.d.ts +21 -0
- package/dist/views/PostManager/FilterDropdown.d.ts.map +1 -0
- package/dist/views/PostManager/FilterDropdown.js +28 -0
- package/dist/views/PostManager/LanguageFlags.d.ts.map +1 -1
- package/dist/views/PostManager/LanguageFlags.js +4 -1
- package/dist/views/PostManager/PostCards.d.ts.map +1 -1
- package/dist/views/PostManager/PostCards.js +23 -40
- package/dist/views/PostManager/PostFilters.d.ts.map +1 -1
- package/dist/views/PostManager/PostFilters.js +34 -3
- package/dist/views/PostManager/PostManagerView.d.ts +1 -2
- package/dist/views/PostManager/PostManagerView.d.ts.map +1 -1
- package/dist/views/PostManager/PostManagerView.js +30 -96
- package/dist/views/PostManager/PostStats.d.ts.map +1 -1
- package/dist/views/PostManager/PostStats.js +10 -10
- package/dist/views/PostManager/PostTable.d.ts.map +1 -1
- package/dist/views/PostManager/PostTable.js +23 -40
- package/dist/views/Settings/SettingsView.d.ts +1 -1
- package/dist/views/Settings/SettingsView.d.ts.map +1 -1
- package/dist/views/Settings/SettingsView.js +12 -39
- package/dist/views/SlugSEO/SlugSEOManagerView.d.ts.map +1 -1
- package/dist/views/SlugSEO/SlugSEOManagerView.js +2 -2
- package/package.json +42 -6
- package/src/api/categories.ts +48 -52
- package/src/api/handler.ts +87 -594
- package/src/api/router.ts +15 -65
- package/src/api/service.ts +241 -0
- package/src/hooks/useAutoSave.ts +64 -0
- package/src/hooks/useCategories.ts +19 -47
- package/src/index.tsx +79 -293
- package/src/init.tsx +24 -11
- package/src/lib/blocks/BlockRenderer.tsx +1 -0
- package/src/lib/layouts/blocks/ColumnsBlock.tsx +60 -173
- package/src/lib/layouts/blocks/SectionBlock.tsx +22 -26
- package/src/lib/layouts/index.ts +4 -4
- package/src/lib/mappers/apiMapper.ts +63 -32
- package/src/lib/rich-text/RichTextEditor.tsx +16 -9
- package/src/lib/utils/config-resolver.ts +64 -0
- package/src/lib/utils/tree.ts +150 -0
- package/src/state/EditorContext.tsx +153 -232
- package/src/state/reducer.ts +141 -606
- package/src/state/types.ts +14 -1
- package/src/types/block.ts +10 -0
- package/src/types/post.ts +19 -1
- package/src/views/CanvasEditor/BlockWrapper.tsx +130 -460
- package/src/views/CanvasEditor/CanvasEditorView.tsx +145 -420
- package/src/views/CanvasEditor/EditorBody.tsx +98 -610
- package/src/views/CanvasEditor/EditorHeader.tsx +176 -196
- package/src/views/CanvasEditor/LayoutContainer.tsx +74 -89
- package/src/views/CanvasEditor/components/CustomBlockItem.tsx +7 -8
- package/src/views/CanvasEditor/components/EditorCanvas.tsx +139 -84
- package/src/views/CanvasEditor/components/EditorLibrary.tsx +25 -10
- package/src/views/CanvasEditor/components/EditorSidebar.tsx +196 -127
- package/src/views/CanvasEditor/components/FeaturedMediaSection.tsx +78 -210
- package/src/views/CanvasEditor/components/JSONInspector.tsx +125 -0
- package/src/views/CanvasEditor/components/LibraryItem.tsx +5 -6
- package/src/views/CanvasEditor/components/PrivacySettingsSection.tsx +73 -124
- package/src/views/CanvasEditor/components/index.ts +2 -1
- package/src/views/CanvasEditor/hooks/useHeroBlock.ts +15 -18
- package/src/views/CanvasEditor/hooks/usePostLoader.ts +21 -13
- package/src/views/CanvasEditor/hooks/useUnsavedChanges.ts +4 -4
- package/src/views/PostManager/EmptyState.tsx +9 -10
- package/src/views/PostManager/FilterDropdown.tsx +95 -0
- package/src/views/PostManager/LanguageFlags.tsx +6 -2
- package/src/views/PostManager/PostCards.tsx +127 -133
- package/src/views/PostManager/PostFilters.tsx +73 -68
- package/src/views/PostManager/PostManagerView.tsx +132 -179
- package/src/views/PostManager/PostStats.tsx +21 -20
- package/src/views/PostManager/PostTable.tsx +137 -165
- package/src/views/Settings/SettingsView.tsx +64 -180
- package/src/views/SlugSEO/SlugSEOManagerView.tsx +59 -44
- package/src/hooks/index.d.ts +0 -8
- package/src/hooks/index.d.ts.map +0 -1
- package/src/hooks/useBlog.d.ts +0 -31
- package/src/hooks/useBlog.d.ts.map +0 -1
- package/src/hooks/useBlogs.d.ts +0 -39
- package/src/hooks/useBlogs.d.ts.map +0 -1
- package/src/hooks/useCategories.d.ts +0 -9
- package/src/hooks/useCategories.d.ts.map +0 -1
- package/src/lib/blocks/BlockRenderer.d.ts +0 -54
- package/src/lib/blocks/BlockRenderer.d.ts.map +0 -1
- package/src/lib/config-storage.d.ts +0 -30
- package/src/lib/config-storage.d.ts.map +0 -1
- package/src/lib/layouts/blocks/ColumnsBlock.d.ts +0 -25
- package/src/lib/layouts/blocks/ColumnsBlock.d.ts.map +0 -1
- package/src/lib/layouts/blocks/SectionBlock.d.ts +0 -25
- package/src/lib/layouts/blocks/SectionBlock.d.ts.map +0 -1
- package/src/lib/layouts/index.d.ts +0 -23
- package/src/lib/layouts/index.d.ts.map +0 -1
- package/src/lib/layouts/registerLayoutBlocks.d.ts +0 -9
- package/src/lib/layouts/registerLayoutBlocks.d.ts.map +0 -1
- package/src/lib/mappers/apiMapper.d.ts +0 -66
- package/src/lib/mappers/apiMapper.d.ts.map +0 -1
- package/src/lib/rich-text/RichTextEditor.d.ts +0 -45
- package/src/lib/rich-text/RichTextEditor.d.ts.map +0 -1
- package/src/lib/rich-text/RichTextPreview.d.ts +0 -16
- package/src/lib/rich-text/RichTextPreview.d.ts.map +0 -1
- package/src/lib/rich-text/index.d.ts +0 -9
- package/src/lib/rich-text/index.d.ts.map +0 -1
- package/src/lib/utils/blockHelpers.d.ts +0 -23
- package/src/lib/utils/blockHelpers.d.ts.map +0 -1
- package/src/lib/utils/configValidation.d.ts +0 -23
- package/src/lib/utils/configValidation.d.ts.map +0 -1
- package/src/registry/BlockRegistry.d.ts +0 -62
- package/src/registry/BlockRegistry.d.ts.map +0 -1
- package/src/registry/index.d.ts +0 -6
- package/src/registry/index.d.ts.map +0 -1
- package/src/state/EditorContext.d.ts +0 -45
- package/src/state/EditorContext.d.ts.map +0 -1
- package/src/state/index.d.ts +0 -7
- package/src/state/index.d.ts.map +0 -1
- package/src/state/reducer.d.ts +0 -11
- package/src/state/reducer.d.ts.map +0 -1
- package/src/state/types.d.ts +0 -162
- package/src/state/types.d.ts.map +0 -1
- package/src/types/block.d.ts +0 -221
- package/src/types/block.d.ts.map +0 -1
- package/src/types/index.d.ts +0 -8
- package/src/types/index.d.ts.map +0 -1
- package/src/types/post.d.ts +0 -136
- package/src/types/post.d.ts.map +0 -1
- package/src/utils/client.d.ts +0 -48
- package/src/utils/client.d.ts.map +0 -1
- package/src/views/CanvasEditor/BlockWrapper.d.ts +0 -16
- package/src/views/CanvasEditor/BlockWrapper.d.ts.map +0 -1
- package/src/views/CanvasEditor/CanvasEditorView.d.ts +0 -14
- package/src/views/CanvasEditor/CanvasEditorView.d.ts.map +0 -1
- package/src/views/CanvasEditor/EditorBody.d.ts +0 -22
- package/src/views/CanvasEditor/EditorBody.d.ts.map +0 -1
- package/src/views/CanvasEditor/EditorHeader.d.ts +0 -18
- package/src/views/CanvasEditor/EditorHeader.d.ts.map +0 -1
- package/src/views/CanvasEditor/LayoutContainer.d.ts +0 -17
- package/src/views/CanvasEditor/LayoutContainer.d.ts.map +0 -1
- package/src/views/CanvasEditor/SaveConfirmationModal.d.ts +0 -13
- package/src/views/CanvasEditor/SaveConfirmationModal.d.ts.map +0 -1
- package/src/views/CanvasEditor/components/CustomBlockItem.d.ts +0 -14
- package/src/views/CanvasEditor/components/CustomBlockItem.d.ts.map +0 -1
- package/src/views/CanvasEditor/components/EditorCanvas.d.ts +0 -29
- package/src/views/CanvasEditor/components/EditorCanvas.d.ts.map +0 -1
- package/src/views/CanvasEditor/components/EditorLibrary.d.ts +0 -7
- package/src/views/CanvasEditor/components/EditorLibrary.d.ts.map +0 -1
- package/src/views/CanvasEditor/components/EditorSidebar.d.ts +0 -13
- package/src/views/CanvasEditor/components/EditorSidebar.d.ts.map +0 -1
- package/src/views/CanvasEditor/components/ErrorBanner.d.ts +0 -6
- package/src/views/CanvasEditor/components/ErrorBanner.d.ts.map +0 -1
- package/src/views/CanvasEditor/components/FeaturedMediaSection.d.ts +0 -25
- package/src/views/CanvasEditor/components/FeaturedMediaSection.d.ts.map +0 -1
- package/src/views/CanvasEditor/components/LibraryItem.d.ts +0 -14
- package/src/views/CanvasEditor/components/LibraryItem.d.ts.map +0 -1
- package/src/views/CanvasEditor/components/PrivacySettingsSection.d.ts +0 -15
- package/src/views/CanvasEditor/components/PrivacySettingsSection.d.ts.map +0 -1
- package/src/views/CanvasEditor/components/index.d.ts +0 -21
- package/src/views/CanvasEditor/components/index.d.ts.map +0 -1
- package/src/views/CanvasEditor/hooks/index.d.ts +0 -10
- package/src/views/CanvasEditor/hooks/index.d.ts.map +0 -1
- package/src/views/CanvasEditor/hooks/useHeroBlock.d.ts +0 -8
- package/src/views/CanvasEditor/hooks/useHeroBlock.d.ts.map +0 -1
- package/src/views/CanvasEditor/hooks/useKeyboardShortcuts.d.ts +0 -3
- package/src/views/CanvasEditor/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/src/views/CanvasEditor/hooks/usePostLoader.d.ts +0 -5
- package/src/views/CanvasEditor/hooks/usePostLoader.d.ts.map +0 -1
- package/src/views/CanvasEditor/hooks/useRegisteredBlocks.d.ts +0 -2
- package/src/views/CanvasEditor/hooks/useRegisteredBlocks.d.ts.map +0 -1
- package/src/views/CanvasEditor/hooks/useUnsavedChanges.d.ts +0 -25
- package/src/views/CanvasEditor/hooks/useUnsavedChanges.d.ts.map +0 -1
- package/src/views/CanvasEditor/index.d.ts +0 -16
- package/src/views/CanvasEditor/index.d.ts.map +0 -1
- package/src/views/PostManager/EmptyState.d.ts +0 -10
- package/src/views/PostManager/EmptyState.d.ts.map +0 -1
- package/src/views/PostManager/PostActionsMenu.d.ts +0 -12
- package/src/views/PostManager/PostActionsMenu.d.ts.map +0 -1
- package/src/views/PostManager/PostCards.d.ts +0 -15
- package/src/views/PostManager/PostCards.d.ts.map +0 -1
- package/src/views/PostManager/PostFilters.d.ts +0 -16
- package/src/views/PostManager/PostFilters.d.ts.map +0 -1
- package/src/views/PostManager/PostManagerView.d.ts +0 -11
- package/src/views/PostManager/PostManagerView.d.ts.map +0 -1
- package/src/views/PostManager/PostStats.d.ts +0 -11
- package/src/views/PostManager/PostStats.d.ts.map +0 -1
- package/src/views/PostManager/PostTable.d.ts +0 -15
- package/src/views/PostManager/PostTable.d.ts.map +0 -1
- package/src/views/PostManager/index.d.ts +0 -12
- package/src/views/PostManager/index.d.ts.map +0 -1
- package/src/views/Preview/PreviewBridgeView.d.ts +0 -12
- package/src/views/Preview/PreviewBridgeView.d.ts.map +0 -1
- package/src/views/Preview/index.d.ts +0 -6
- package/src/views/Preview/index.d.ts.map +0 -1
- package/src/views/Settings/SettingsView.d.ts +0 -10
- package/src/views/Settings/SettingsView.d.ts.map +0 -1
- package/src/views/Settings/index.d.ts +0 -6
- package/src/views/Settings/index.d.ts.map +0 -1
- package/src/views/SlugSEO/SlugSEOManagerView.d.ts +0 -12
- package/src/views/SlugSEO/SlugSEOManagerView.d.ts.map +0 -1
- package/src/views/SlugSEO/index.d.ts +0 -6
- package/src/views/SlugSEO/index.d.ts.map +0 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAA6B,MAAM,OAAO,CAAC;AAUlD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAA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AmC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Plugin Blog - Main Entry Point
|
|
3
|
-
*
|
|
4
|
-
* Multi-Tenant Architecture: Accepts custom blocks from client applications
|
|
3
|
+
* Simplified with Configuration Resolver
|
|
5
4
|
*/
|
|
6
5
|
'use client';
|
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -13,218 +12,62 @@ import { editorStateToAPI } from './lib/mappers/apiMapper';
|
|
|
13
12
|
import { SlugSEOManagerView } from './views/SlugSEO';
|
|
14
13
|
import { PreviewBridgeView } from './views/Preview';
|
|
15
14
|
import { SettingsView } from './views/Settings';
|
|
16
|
-
import { useHeroBlockValidation
|
|
17
|
-
|
|
18
|
-
* Main Router Component
|
|
19
|
-
* Handles routing within the blog plugin
|
|
20
|
-
*
|
|
21
|
-
* Client Handshake:
|
|
22
|
-
* - Client apps can pass customBlocks via props
|
|
23
|
-
* - Or via window.__JHITS_PLUGIN_PROPS__['plugin-blog'].customBlocks
|
|
24
|
-
* - The EditorProvider will automatically register these blocks
|
|
25
|
-
*/
|
|
15
|
+
import { useHeroBlockValidation } from './lib/utils/configValidation';
|
|
16
|
+
import { resolvePluginConfig } from './lib/utils/config-resolver';
|
|
26
17
|
export default function BlogPlugin(props) {
|
|
27
|
-
const { subPath, siteId, locale
|
|
28
|
-
//
|
|
29
|
-
const
|
|
30
|
-
// First, try props
|
|
31
|
-
if (propsCustomBlocks && propsCustomBlocks.length > 0) {
|
|
32
|
-
return propsCustomBlocks;
|
|
33
|
-
}
|
|
34
|
-
// Fallback to window global (for client app injection)
|
|
35
|
-
if (typeof window !== 'undefined' && window.__JHITS_PLUGIN_PROPS__) {
|
|
36
|
-
const pluginProps = window.__JHITS_PLUGIN_PROPS__['plugin-blog'];
|
|
37
|
-
if (pluginProps?.customBlocks) {
|
|
38
|
-
return pluginProps.customBlocks;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return [];
|
|
42
|
-
}, [propsCustomBlocks]);
|
|
43
|
-
// Get dark mode setting from props, localStorage (dev settings), or window global
|
|
44
|
-
// Priority: localStorage (dev) > props > window global > default
|
|
45
|
-
const darkMode = useMemo(() => {
|
|
46
|
-
// First, check localStorage for dev settings (highest priority for dev)
|
|
47
|
-
if (typeof window !== 'undefined') {
|
|
48
|
-
try {
|
|
49
|
-
const saved = localStorage.getItem('__JHITS_PLUGIN_BLOG_CONFIG__');
|
|
50
|
-
if (saved) {
|
|
51
|
-
const config = JSON.parse(saved);
|
|
52
|
-
if (config.darkMode !== undefined) {
|
|
53
|
-
return config.darkMode;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
catch (e) {
|
|
58
|
-
// Ignore localStorage errors
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
// Then try props
|
|
62
|
-
if (propsDarkMode !== undefined) {
|
|
63
|
-
return propsDarkMode;
|
|
64
|
-
}
|
|
65
|
-
// Fallback to window global if prop not provided
|
|
66
|
-
if (typeof window !== 'undefined' && window.__JHITS_PLUGIN_PROPS__) {
|
|
67
|
-
const pluginProps = window.__JHITS_PLUGIN_PROPS__['plugin-blog'];
|
|
68
|
-
if (pluginProps?.darkMode !== undefined) {
|
|
69
|
-
return pluginProps.darkMode;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return true; // Default to dark mode enabled
|
|
73
|
-
}, [propsDarkMode]);
|
|
74
|
-
// Get background colors from props, localStorage (dev settings), or window global
|
|
75
|
-
// Priority: localStorage (dev) > props > window global
|
|
76
|
-
const backgroundColors = useMemo(() => {
|
|
77
|
-
// First, check localStorage for dev settings (highest priority for dev)
|
|
78
|
-
if (typeof window !== 'undefined') {
|
|
79
|
-
try {
|
|
80
|
-
const saved = localStorage.getItem('__JHITS_PLUGIN_BLOG_CONFIG__');
|
|
81
|
-
if (saved) {
|
|
82
|
-
const config = JSON.parse(saved);
|
|
83
|
-
if (config.backgroundColors) {
|
|
84
|
-
return config.backgroundColors;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
catch (e) {
|
|
89
|
-
// Ignore localStorage errors
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
// Then try props
|
|
93
|
-
if (propsBackgroundColors) {
|
|
94
|
-
return propsBackgroundColors;
|
|
95
|
-
}
|
|
96
|
-
// Fallback to window global
|
|
97
|
-
if (typeof window !== 'undefined' && window.__JHITS_PLUGIN_PROPS__) {
|
|
98
|
-
const pluginProps = window.__JHITS_PLUGIN_PROPS__['plugin-blog'];
|
|
99
|
-
if (pluginProps?.backgroundColors) {
|
|
100
|
-
return pluginProps.backgroundColors;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return undefined;
|
|
104
|
-
}, [propsBackgroundColors]);
|
|
18
|
+
const { subPath, siteId, locale } = props;
|
|
19
|
+
// Resolve configuration from multiple sources (Props, Window, Storage)
|
|
20
|
+
const config = useMemo(() => resolvePluginConfig(props), [props]);
|
|
105
21
|
const route = subPath[0] || 'posts';
|
|
106
|
-
// Validate hero block configuration
|
|
107
|
-
useHeroBlockValidation(route, customBlocks,
|
|
108
|
-
//
|
|
109
|
-
const heroBlockDefinition = useMemo(() => {
|
|
110
|
-
const needsHeroBlock = route === 'editor' || route === 'new' || route === 'preview';
|
|
111
|
-
return needsHeroBlock ? findHeroBlock(customBlocks) : undefined;
|
|
112
|
-
}, [customBlocks, route]);
|
|
113
|
-
// Listen for config updates from settings screen
|
|
22
|
+
// Validate hero block configuration
|
|
23
|
+
useHeroBlockValidation(route, config.customBlocks, props.customBlocks);
|
|
24
|
+
// Listen for config updates from settings
|
|
114
25
|
useEffect(() => {
|
|
115
26
|
if (typeof window === 'undefined')
|
|
116
27
|
return;
|
|
117
|
-
const handleConfigUpdate = () =>
|
|
118
|
-
// Reload page to apply changes (simplest way to ensure all components pick up new values)
|
|
119
|
-
window.location.reload();
|
|
120
|
-
};
|
|
28
|
+
const handleConfigUpdate = () => window.location.reload();
|
|
121
29
|
window.addEventListener('blog-plugin-config-updated', handleConfigUpdate);
|
|
122
|
-
return () =>
|
|
123
|
-
window.removeEventListener('blog-plugin-config-updated', handleConfigUpdate);
|
|
124
|
-
};
|
|
30
|
+
return () => window.removeEventListener('blog-plugin-config-updated', handleConfigUpdate);
|
|
125
31
|
}, []);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
32
|
+
// Helper to render editor with provider
|
|
33
|
+
const renderEditor = (postId) => (_jsx(EditorProvider, { customBlocks: config.customBlocks, darkMode: config.darkMode, backgroundColors: config.backgroundColors, translations: config.translations, onSave: async (state, heroBlock) => {
|
|
34
|
+
const originalSlug = postId || state.slug || state.postId;
|
|
35
|
+
if (!originalSlug && route !== 'new')
|
|
36
|
+
throw new Error('No post identifier');
|
|
37
|
+
const apiData = editorStateToAPI(state, undefined, heroBlock);
|
|
38
|
+
const isNew = route === 'new';
|
|
39
|
+
const url = isNew ? '/api/plugin-blog/new' : `/api/plugin-blog/${originalSlug}`;
|
|
40
|
+
const response = await fetch(`${url}?language=${state.currentLanguage || locale}`, {
|
|
41
|
+
method: isNew ? 'POST' : 'PUT',
|
|
42
|
+
headers: { 'Content-Type': 'application/json' },
|
|
43
|
+
credentials: 'include',
|
|
44
|
+
body: JSON.stringify(apiData),
|
|
45
|
+
});
|
|
46
|
+
if (!response.ok)
|
|
47
|
+
throw new Error('Save failed');
|
|
48
|
+
const result = await response.json();
|
|
49
|
+
if (result.slug && result.slug !== originalSlug) {
|
|
50
|
+
window.history.replaceState(null, '', `/dashboard/blog/editor/${result.slug}`);
|
|
51
|
+
}
|
|
52
|
+
return result;
|
|
53
|
+
}, children: _jsx(CanvasEditorView, { postId: postId || undefined, siteId: siteId, locale: locale, LayoutWrapper: config.LayoutWrapper }) }));
|
|
130
54
|
switch (route) {
|
|
131
|
-
case 'posts':
|
|
132
|
-
|
|
133
|
-
case '
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
// Save to API - update existing post
|
|
137
|
-
// Use the route postId (original slug) to identify which blog to update
|
|
138
|
-
// If route postId is missing, use state.slug or state.postId as fallback
|
|
139
|
-
const originalSlug = postId || state.slug || state.postId;
|
|
140
|
-
if (!originalSlug) {
|
|
141
|
-
throw new Error('Cannot save: no post identifier available. Please reload the page.');
|
|
142
|
-
}
|
|
143
|
-
const language = state.currentLanguage || locale;
|
|
144
|
-
console.log('[BlogPlugin] Saving post with slug:', originalSlug, 'language:', language);
|
|
145
|
-
const apiData = editorStateToAPI(state, undefined, heroBlock);
|
|
146
|
-
const response = await fetch(`/api/plugin-blog/${originalSlug}?language=${language}`, {
|
|
147
|
-
method: 'PUT',
|
|
148
|
-
headers: { 'Content-Type': 'application/json' },
|
|
149
|
-
credentials: 'include', // Include cookies for authentication
|
|
150
|
-
body: JSON.stringify(apiData),
|
|
151
|
-
});
|
|
152
|
-
if (!response.ok) {
|
|
153
|
-
const error = await response.json();
|
|
154
|
-
console.error('[BlogPlugin] Save failed:', {
|
|
155
|
-
status: response.status,
|
|
156
|
-
statusText: response.statusText,
|
|
157
|
-
error,
|
|
158
|
-
missingFields: error.missingFields,
|
|
159
|
-
});
|
|
160
|
-
// Provide more detailed error message if available
|
|
161
|
-
const errorMessage = error.message || error.error || 'Failed to save post';
|
|
162
|
-
const missingFieldsMsg = error.missingFields && error.missingFields.length > 0
|
|
163
|
-
? ` Missing: ${error.missingFields.join(', ')}`
|
|
164
|
-
: '';
|
|
165
|
-
throw new Error(errorMessage + missingFieldsMsg);
|
|
166
|
-
}
|
|
167
|
-
const result = await response.json();
|
|
168
|
-
// If the slug changed, update the URL
|
|
169
|
-
if (result.slug && result.slug !== originalSlug) {
|
|
170
|
-
window.history.replaceState(null, '', `/dashboard/blog/editor/${result.slug}`);
|
|
171
|
-
}
|
|
172
|
-
return result;
|
|
173
|
-
}, children: _jsx(CanvasEditorView, { postId: postId, siteId: siteId, locale: locale, darkMode: darkMode, backgroundColors: backgroundColors }) }));
|
|
174
|
-
case 'new':
|
|
175
|
-
return (_jsx(EditorProvider, { customBlocks: customBlocks, darkMode: darkMode, backgroundColors: backgroundColors, onSave: async (state) => {
|
|
176
|
-
// Save to API - create new post
|
|
177
|
-
const language = state.currentLanguage || locale;
|
|
178
|
-
const apiData = editorStateToAPI(state);
|
|
179
|
-
const response = await fetch(`/api/plugin-blog/new?language=${language}`, {
|
|
180
|
-
method: 'POST',
|
|
181
|
-
headers: { 'Content-Type': 'application/json' },
|
|
182
|
-
credentials: 'include', // Include cookies for authentication
|
|
183
|
-
body: JSON.stringify(apiData),
|
|
184
|
-
});
|
|
185
|
-
if (!response.ok) {
|
|
186
|
-
const error = await response.json();
|
|
187
|
-
throw new Error(error.message || 'Failed to create post');
|
|
188
|
-
}
|
|
189
|
-
const result = await response.json();
|
|
190
|
-
// Update the URL to the new post's slug
|
|
191
|
-
if (result.slug) {
|
|
192
|
-
window.history.replaceState(null, '', `/dashboard/blog/editor/${result.slug}`);
|
|
193
|
-
}
|
|
194
|
-
return result;
|
|
195
|
-
}, children: _jsx(CanvasEditorView, { siteId: siteId, locale: locale, darkMode: darkMode, backgroundColors: backgroundColors }) }));
|
|
196
|
-
case 'seo':
|
|
197
|
-
const seoPostId = subPath[1];
|
|
198
|
-
return _jsx(SlugSEOManagerView, { postId: seoPostId, siteId: siteId, locale: locale });
|
|
199
|
-
case 'preview':
|
|
200
|
-
const previewPostId = subPath[1];
|
|
201
|
-
return _jsx(PreviewBridgeView, { postId: previewPostId, siteId: siteId, locale: locale });
|
|
55
|
+
case 'posts': return _jsx(PostManagerView, { siteId: siteId, locale: locale });
|
|
56
|
+
case 'editor': return renderEditor(subPath[1]);
|
|
57
|
+
case 'new': return renderEditor();
|
|
58
|
+
case 'seo': return _jsx(SlugSEOManagerView, { postId: subPath[1], siteId: siteId, locale: locale });
|
|
59
|
+
case 'preview': return _jsx(PreviewBridgeView, { postId: subPath[1], siteId: siteId, locale: locale });
|
|
202
60
|
case 'settings':
|
|
203
|
-
case 'install':
|
|
204
|
-
|
|
205
|
-
default:
|
|
206
|
-
return _jsx(PostManagerView, { siteId: siteId, locale: locale });
|
|
61
|
+
case 'install': return _jsx(SettingsView, { siteId: siteId, locale: locale });
|
|
62
|
+
default: return _jsx(PostManagerView, { siteId: siteId, locale: locale });
|
|
207
63
|
}
|
|
208
64
|
}
|
|
209
|
-
// Export for use as default
|
|
210
65
|
export { BlogPlugin as Index };
|
|
211
|
-
// Export initialization utility for easy setup
|
|
212
66
|
export { initBlogPlugin } from './init';
|
|
213
|
-
// Export rich text components for client applications
|
|
214
67
|
export { RichTextEditor, RichTextPreview } from './lib/rich-text';
|
|
215
|
-
|
|
216
|
-
export { useBlogs, useBlog } from './hooks';
|
|
217
|
-
// Export client utilities
|
|
218
|
-
export { fetchBlogs, fetchBlog } from './utils/client';
|
|
219
|
-
// Export block rendering components
|
|
220
|
-
export { BlockRenderer, BlocksRenderer } from './lib/blocks/BlockRenderer';
|
|
221
|
-
// Export block registry
|
|
68
|
+
export { useBlogs, useBlog, useCategories } from './hooks';
|
|
222
69
|
export { blockRegistry } from './registry';
|
|
223
|
-
// Export layout block registration
|
|
224
|
-
export { registerLayoutBlocks } from './lib/layouts/registerLayoutBlocks';
|
|
225
|
-
// Export config storage utilities
|
|
226
|
-
export { getPluginConfig, savePluginConfig } from './lib/config-storage';
|
|
227
|
-
// Export editor state management
|
|
228
70
|
export { EditorProvider, useEditor } from './state/EditorContext';
|
|
229
|
-
|
|
230
|
-
export {
|
|
71
|
+
export { BlockRenderer, BlocksRenderer } from './lib/blocks/BlockRenderer';
|
|
72
|
+
export { ColumnsPreview } from './lib/layouts/blocks/ColumnsBlock';
|
|
73
|
+
export { registerLayoutBlocks } from './lib/layouts/registerLayoutBlocks';
|
package/dist/init.d.ts
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* initBlogPlugin(blogConfig);
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
+
import React from 'react';
|
|
17
18
|
import type { ClientBlockDefinition } from './types/block';
|
|
18
19
|
export interface BlogPluginConfig {
|
|
19
20
|
/** Custom blocks available in the editor */
|
|
@@ -27,14 +28,26 @@ export interface BlogPluginConfig {
|
|
|
27
28
|
/** Background color for dark mode (optional) - CSS color value (hex, rgb, or named color) */
|
|
28
29
|
dark?: string;
|
|
29
30
|
};
|
|
31
|
+
/** Optional layout wrapper for 1:1 preview (injected by client app) */
|
|
32
|
+
LayoutWrapper?: React.ComponentType<{
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
header?: React.ReactNode;
|
|
35
|
+
footer?: React.ReactNode;
|
|
36
|
+
title?: string;
|
|
37
|
+
excerpt?: string;
|
|
38
|
+
category?: string;
|
|
39
|
+
date?: string;
|
|
40
|
+
thumbnail?: string;
|
|
41
|
+
isPreview?: boolean;
|
|
42
|
+
}>;
|
|
30
43
|
}
|
|
31
44
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
* Initialize the blog plugin with client configuration
|
|
46
|
+
*
|
|
47
|
+
* This function sets up the window global that the plugin reads from automatically.
|
|
48
|
+
* Call this once when your app loads, before the plugin is rendered.
|
|
49
|
+
*
|
|
50
|
+
* @param config - Blog plugin configuration (customBlocks, darkMode, etc.)
|
|
51
|
+
*/
|
|
39
52
|
export declare function initBlogPlugin(config: BlogPluginConfig): void;
|
|
40
53
|
//# sourceMappingURL=init.d.ts.map
|
package/dist/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC7B,4CAA4C;IAC5C,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACvC,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,gBAAgB,CAAC,EAAE;QACf,8FAA8F;QAC9F,KAAK,EAAE,MAAM,CAAC;QACd,6FAA6F;QAC7F,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,uEAAuE;IACvE,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC,CAAC;CACF;AAED;;;;;;;EAOE;AACF,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAkB7D"}
|
package/dist/init.js
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
'use client';
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
* Initialize the blog plugin with client configuration
|
|
20
|
+
*
|
|
21
|
+
* This function sets up the window global that the plugin reads from automatically.
|
|
22
|
+
* Call this once when your app loads, before the plugin is rendered.
|
|
23
|
+
*
|
|
24
|
+
* @param config - Blog plugin configuration (customBlocks, darkMode, etc.)
|
|
25
|
+
*/
|
|
26
26
|
export function initBlogPlugin(config) {
|
|
27
27
|
if (typeof window === 'undefined') {
|
|
28
28
|
// Server-side: no-op
|
|
@@ -37,5 +37,6 @@ export function initBlogPlugin(config) {
|
|
|
37
37
|
customBlocks: config.customBlocks || [],
|
|
38
38
|
darkMode: config.darkMode !== undefined ? config.darkMode : true, // Default to true
|
|
39
39
|
backgroundColors: config.backgroundColors || undefined,
|
|
40
|
+
LayoutWrapper: config.LayoutWrapper || undefined,
|
|
40
41
|
};
|
|
41
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockRenderer.d.ts","sourceRoot":"","sources":["../../../src/lib/blocks/BlockRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI7D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,sBAAsB;IACtB,KAAK,EAAE,KAAK,CAAC;IAEb,oEAAoE;IACpE,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAEtE,uCAAuC;IACvC,OAAO,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KAC1B,CAAC;CACL;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC1B,KAAK,EACL,eAAe,EACf,OAAY,EACf,EAAE,kBAAkB,2CAqDpB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,gCAAgC;IAChC,MAAM,EAAE,KAAK,EAAE,CAAC;IAEhB,gDAAgD;IAChD,eAAe,CAAC,EAAE,GAA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Ae,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC,CAAC;IAErE,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEtC,uCAAuC;IACvC,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC,CAAC;CAChE;AAED,wBAAgB,cAAc,CAAC,EAC3B,MAAM,EACN,eAAe,EACf,WAAW,EACX,OAAO,EAAE,OAAO,GACnB,EAAE,mBAAmB,2CAgBrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnsBlock.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/blocks/ColumnsBlock.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ColumnsBlock.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/blocks/ColumnsBlock.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,GAAG;IAChD,WAAW,EAAE,KAAK,EAAE,CAAC;IACrB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5E,kBAAkB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5F,kBAAkB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACjF,CAyFI,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG;IACtD,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;CACnD,CAiEA,CAAC"}
|
|
@@ -5,169 +5,83 @@
|
|
|
5
5
|
'use client';
|
|
6
6
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { Plus, Trash2 } from 'lucide-react';
|
|
9
8
|
import { LayoutContainer } from '../../../views/CanvasEditor/LayoutContainer';
|
|
10
9
|
import { COLUMN_LAYOUTS } from '../index';
|
|
11
10
|
/**
|
|
12
11
|
* Columns Block Edit Component
|
|
13
12
|
*/
|
|
14
13
|
export const ColumnsEdit = ({ block, onUpdate, isSelected, childBlocks = [], onChildBlockAdd, onChildBlockUpdate, onChildBlockDelete, onChildBlockMove, }) => {
|
|
14
|
+
// Filter out hero block from being rendered inside containers
|
|
15
|
+
const blocks = childBlocks.filter(b => b.type !== 'hero');
|
|
15
16
|
// Support both old layout-based system and new dynamic column count
|
|
16
17
|
const columnCount = block.data.columnCount;
|
|
17
18
|
const layout = block.data.layout;
|
|
18
|
-
// Determine number of columns: use columnCount if set, otherwise derive from layout
|
|
19
19
|
let numColumns;
|
|
20
|
-
let gridClass;
|
|
21
20
|
let columnWidths;
|
|
22
|
-
// Grid class mapping for Tailwind (must be explicit for dynamic classes)
|
|
23
|
-
const gridClassMap = {
|
|
24
|
-
1: 'grid-cols-1',
|
|
25
|
-
2: 'grid-cols-2',
|
|
26
|
-
3: 'grid-cols-3',
|
|
27
|
-
4: 'grid-cols-4',
|
|
28
|
-
5: 'grid-cols-5',
|
|
29
|
-
6: 'grid-cols-6',
|
|
30
|
-
};
|
|
31
21
|
if (columnCount !== undefined && columnCount > 0) {
|
|
32
|
-
// Dynamic column system
|
|
33
22
|
numColumns = columnCount;
|
|
34
|
-
// Create equal-width columns
|
|
35
23
|
const widthPercent = Math.floor(100 / numColumns);
|
|
36
24
|
columnWidths = Array(numColumns).fill(widthPercent);
|
|
37
|
-
// Use explicit grid class from map, fallback to inline style if needed
|
|
38
|
-
gridClass = gridClassMap[numColumns] || `grid-cols-${numColumns}`;
|
|
39
25
|
}
|
|
40
26
|
else if (layout && COLUMN_LAYOUTS[layout]) {
|
|
41
|
-
// Legacy layout-based system
|
|
42
27
|
const layoutConfig = COLUMN_LAYOUTS[layout];
|
|
43
28
|
numColumns = layoutConfig.widths.length;
|
|
44
|
-
gridClass = layoutConfig.grid;
|
|
45
29
|
columnWidths = layoutConfig.widths;
|
|
46
30
|
}
|
|
47
31
|
else {
|
|
48
|
-
// Default to 2 columns
|
|
49
32
|
numColumns = 2;
|
|
50
|
-
gridClass = 'grid-cols-2';
|
|
51
33
|
columnWidths = [50, 50];
|
|
52
34
|
}
|
|
53
|
-
// Split child blocks into columns based on columnIndex in meta, or round-robin
|
|
54
35
|
const columns = Array.from({ length: numColumns }, () => []);
|
|
55
|
-
|
|
36
|
+
blocks.forEach((childBlock) => {
|
|
56
37
|
const columnIndex = childBlock.meta?.columnIndex;
|
|
57
38
|
if (typeof columnIndex === 'number' && columnIndex >= 0 && columnIndex < numColumns) {
|
|
58
39
|
columns[columnIndex].push(childBlock);
|
|
59
40
|
}
|
|
60
41
|
else {
|
|
61
|
-
|
|
62
|
-
const index = childBlocks.indexOf(childBlock);
|
|
42
|
+
const index = blocks.indexOf(childBlock);
|
|
63
43
|
columns[index % numColumns].push(childBlock);
|
|
64
44
|
}
|
|
65
45
|
});
|
|
66
|
-
// Get column widths from data or use equal widths
|
|
67
46
|
const storedWidths = block.data.columnWidths;
|
|
68
47
|
const currentWidths = storedWidths && storedWidths.length === numColumns
|
|
69
48
|
? storedWidths
|
|
70
|
-
: columnWidths;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// Calculate new equal widths
|
|
77
|
-
const newWidthPercent = Math.floor(100 / newColumnCount);
|
|
78
|
-
const newWidths = Array(newColumnCount).fill(newWidthPercent);
|
|
79
|
-
onUpdate({
|
|
80
|
-
...block.data,
|
|
81
|
-
columnCount: newColumnCount,
|
|
82
|
-
columnWidths: newWidths,
|
|
83
|
-
// Clear layout if using dynamic columns
|
|
84
|
-
layout: undefined,
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
// Delete column handler
|
|
88
|
-
const deleteColumn = (colIndex) => {
|
|
89
|
-
if (numColumns <= 1)
|
|
90
|
-
return; // Don't allow deleting the last column
|
|
91
|
-
// Move blocks from deleted column to the last column (or previous column if deleting last)
|
|
92
|
-
const blocksToMove = columns[colIndex] || [];
|
|
93
|
-
const targetColumnIndex = colIndex === numColumns - 1 ? numColumns - 2 : numColumns - 1;
|
|
94
|
-
const targetColumn = columns[targetColumnIndex] || [];
|
|
95
|
-
// Move each block to the target column using moveBlock (which will update meta.columnIndex)
|
|
96
|
-
blocksToMove.forEach((blockToMove, blockIndex) => {
|
|
97
|
-
const newIndex = targetColumn.length + blockIndex;
|
|
98
|
-
onChildBlockMove(blockToMove.id, newIndex, `${block.id}-col-${targetColumnIndex}`);
|
|
99
|
-
});
|
|
100
|
-
// Update column count and widths after moving blocks
|
|
101
|
-
const newColumnCount = numColumns - 1;
|
|
102
|
-
// Remove the deleted column's width and redistribute
|
|
103
|
-
const newWidths = currentWidths.filter((_, i) => i !== colIndex);
|
|
104
|
-
// Normalize to ensure they sum to 100
|
|
105
|
-
const total = newWidths.reduce((sum, w) => sum + w, 0);
|
|
106
|
-
const normalizedWidths = newWidths.map(w => Math.round((w / total) * 100));
|
|
107
|
-
onUpdate({
|
|
108
|
-
...block.data,
|
|
109
|
-
columnCount: newColumnCount,
|
|
110
|
-
columnWidths: normalizedWidths,
|
|
111
|
-
layout: undefined,
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
return (_jsxs("div", { className: "rounded-xl bg-white relative", children: [_jsx("div", { className: "grid gap-8 p-6", style: {
|
|
115
|
-
gridTemplateColumns: currentWidths.map(w => `${w}%`).join(' '),
|
|
116
|
-
}, children: Array.from({ length: numColumns }).map((_, colIndex) => (_jsx("div", { className: `group/col min-h-[200px] rounded-xl border border-dashed transition-all relative ${isSelected
|
|
117
|
-
? 'border-primary/20'
|
|
118
|
-
: 'border-gray-200/50'}`, children: _jsxs("div", { className: "p-4", children: [_jsxs("div", { className: "mb-3 flex items-center justify-between", children: [_jsxs("span", { className: "text-[10px] font-black uppercase tracking-widest text-gray-400", children: ["Column ", colIndex + 1] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("span", { className: "text-[9px] text-gray-500", children: [currentWidths[colIndex], "%"] }), numColumns > 1 && (_jsx("button", { onClick: (e) => {
|
|
119
|
-
e.stopPropagation();
|
|
120
|
-
deleteColumn(colIndex);
|
|
121
|
-
}, className: "opacity-0 group-hover/col:opacity-100 p-1 text-neutral-400 hover:text-red-500 transition-all rounded", title: "Delete Column", "aria-label": "Delete Column", children: _jsx(Trash2, { size: 10 }) }))] })] }), _jsx(LayoutContainer, { blocks: columns[colIndex] || [], containerId: `${block.id}-col-${colIndex}`, onBlockAdd: onChildBlockAdd, onBlockUpdate: onChildBlockUpdate, onBlockDelete: onChildBlockDelete, onBlockMove: onChildBlockMove, emptyLabel: `Drop blocks in column ${colIndex + 1}` })] }) }, colIndex))) }), numColumns < 4 && (_jsx("button", { onClick: addColumn, className: "absolute top-0 right-0 h-8 w-8 flex items-center justify-center bg-white border-l border-b border-gray-200 text-primary hover:bg-primary hover:text-white transition-all z-10 rounded-br-xl", title: "Add Column", children: _jsx(Plus, { size: 16 }) }))] }));
|
|
49
|
+
: columnWidths;
|
|
50
|
+
return (_jsx("div", { className: "rounded-xl bg-transparent relative", children: _jsx("div", { className: "grid gap-2 p-1", style: {
|
|
51
|
+
gridTemplateColumns: currentWidths.map(w => `${w}%`).join(' '),
|
|
52
|
+
}, children: Array.from({ length: numColumns }).map((_, colIndex) => (_jsx("div", { className: `group/col min-h-[100px] rounded-xl border border-dashed transition-all relative ${isSelected
|
|
53
|
+
? 'border-primary/20'
|
|
54
|
+
: 'border-neutral-200 dark:border-neutral-800'}`, children: _jsxs("div", { className: "p-1", children: [_jsx("div", { className: "mb-3 flex items-center justify-between", children: _jsxs("span", { className: "text-[10px] font-black uppercase tracking-widest text-neutral-400 dark:text-neutral-600", children: ["Column ", colIndex + 1] }) }), _jsx("div", { "data-layout-container": `${block.id}-col-${colIndex}`, children: _jsx(LayoutContainer, { blocks: columns[colIndex], containerId: `${block.id}-col-${colIndex}`, onBlockAdd: onChildBlockAdd, onBlockUpdate: onChildBlockUpdate, onBlockDelete: onChildBlockDelete, onBlockMove: onChildBlockMove, emptyLabel: "Drop blocks here" }) })] }) }, colIndex))) }) }));
|
|
122
55
|
};
|
|
123
56
|
/**
|
|
124
57
|
* Columns Block Preview Component
|
|
125
58
|
*/
|
|
126
|
-
export const ColumnsPreview = ({ block, childBlocks = [], renderChild
|
|
127
|
-
//
|
|
59
|
+
export const ColumnsPreview = ({ block, context, childBlocks = [], renderChild }) => {
|
|
60
|
+
// Filter out hero block from children
|
|
61
|
+
const rawChildren = childBlocks.length > 0
|
|
62
|
+
? childBlocks
|
|
63
|
+
: (block.children && Array.isArray(block.children) && typeof block.children[0] === 'object'
|
|
64
|
+
? block.children
|
|
65
|
+
: []);
|
|
66
|
+
const children = rawChildren.filter(b => b.type !== 'hero');
|
|
128
67
|
const columnCount = block.data.columnCount;
|
|
129
68
|
const layout = block.data.layout;
|
|
130
|
-
// Determine number of columns: use columnCount if set, otherwise derive from layout
|
|
131
69
|
let numColumns;
|
|
132
|
-
let
|
|
133
|
-
// Grid class mapping for Tailwind (must be explicit for dynamic classes)
|
|
134
|
-
const gridClassMap = {
|
|
135
|
-
1: 'grid-cols-1',
|
|
136
|
-
2: 'grid-cols-2',
|
|
137
|
-
3: 'grid-cols-3',
|
|
138
|
-
4: 'grid-cols-4',
|
|
139
|
-
5: 'grid-cols-5',
|
|
140
|
-
6: 'grid-cols-6',
|
|
141
|
-
};
|
|
142
|
-
// Get column widths
|
|
143
|
-
const storedWidths = block.data.columnWidths;
|
|
70
|
+
let columnWidths;
|
|
144
71
|
if (columnCount !== undefined && columnCount > 0) {
|
|
145
|
-
// Dynamic column system
|
|
146
72
|
numColumns = columnCount;
|
|
147
|
-
|
|
73
|
+
const widthPercent = Math.floor(100 / numColumns);
|
|
74
|
+
columnWidths = Array(numColumns).fill(widthPercent);
|
|
148
75
|
}
|
|
149
76
|
else if (layout && COLUMN_LAYOUTS[layout]) {
|
|
150
|
-
// Legacy layout-based system
|
|
151
77
|
const layoutConfig = COLUMN_LAYOUTS[layout];
|
|
152
78
|
numColumns = layoutConfig.widths.length;
|
|
153
|
-
|
|
79
|
+
columnWidths = layoutConfig.widths;
|
|
154
80
|
}
|
|
155
81
|
else {
|
|
156
|
-
// Default to 2 columns
|
|
157
82
|
numColumns = 2;
|
|
158
|
-
|
|
83
|
+
columnWidths = [50, 50];
|
|
159
84
|
}
|
|
160
|
-
// Use stored widths if available, otherwise use equal widths
|
|
161
|
-
const columnWidths = storedWidths && storedWidths.length === numColumns
|
|
162
|
-
? storedWidths
|
|
163
|
-
: Array(numColumns).fill(Math.floor(100 / numColumns));
|
|
164
|
-
// If childBlocks are provided, use them; otherwise get from block.children
|
|
165
|
-
const children = childBlocks.length > 0
|
|
166
|
-
? childBlocks
|
|
167
|
-
: (block.children && Array.isArray(block.children) && typeof block.children[0] === 'object'
|
|
168
|
-
? block.children
|
|
169
|
-
: []);
|
|
170
|
-
// Split child blocks into columns based on columnIndex in meta, or round-robin
|
|
171
85
|
const columns = Array.from({ length: numColumns }, () => []);
|
|
172
86
|
children.forEach((childBlock) => {
|
|
173
87
|
const columnIndex = childBlock.meta?.columnIndex;
|
|
@@ -175,12 +89,15 @@ export const ColumnsPreview = ({ block, childBlocks = [], renderChild, context }
|
|
|
175
89
|
columns[columnIndex].push(childBlock);
|
|
176
90
|
}
|
|
177
91
|
else {
|
|
178
|
-
// Fallback to round-robin if no columnIndex specified
|
|
179
92
|
const index = children.indexOf(childBlock);
|
|
180
93
|
columns[index % numColumns].push(childBlock);
|
|
181
94
|
}
|
|
182
95
|
});
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
96
|
+
const storedWidths = block.data.columnWidths;
|
|
97
|
+
const currentWidths = storedWidths && storedWidths.length === numColumns
|
|
98
|
+
? storedWidths
|
|
99
|
+
: columnWidths;
|
|
100
|
+
return (_jsx("div", { className: "w-full", children: _jsx("div", { className: "grid gap-8", style: {
|
|
101
|
+
gridTemplateColumns: currentWidths.map(w => `${w}%`).join(' '),
|
|
102
|
+
}, children: columns.map((colBlocks, colIdx) => (_jsx("div", { className: "w-full", children: colBlocks.map((childBlock) => (_jsx(React.Fragment, { children: renderChild?.(childBlock) }, childBlock.id))) }, colIdx))) }) }));
|
|
186
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionBlock.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/blocks/SectionBlock.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,GAAG;IACh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