@morphika/andami 0.5.4 → 0.5.6
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/app/admin/assets/page.tsx +3 -2
- package/app/admin/layout.tsx +4 -0
- package/components/admin/nav-builder/NavBuilder.tsx +2 -1
- package/components/admin/styles/FontsEditor.tsx +2 -1
- package/components/builder/ColumnDragOverlay.tsx +4 -4
- package/components/builder/CoverSectionCanvas.tsx +10 -9
- package/components/builder/InsertionLines.tsx +3 -3
- package/components/builder/SectionV2Canvas.tsx +3 -3
- package/components/builder/SectionV2Column.tsx +20 -20
- package/components/builder/SettingsPanel.tsx +14 -8
- package/components/builder/SortableBlock.tsx +4 -0
- package/components/builder/SortableRow.tsx +2 -0
- package/components/builder/asset-browser/useR2Operations.ts +5 -4
- package/components/builder/editors/AudioBlockEditor.tsx +10 -8
- package/components/builder/editors/BeforeAfterBlockEditor.tsx +10 -8
- package/components/builder/editors/ButtonBlockEditor.tsx +9 -7
- package/components/builder/editors/ImageBlockEditor.tsx +10 -8
- package/components/builder/editors/ImageGridBlockEditor.tsx +10 -8
- package/components/builder/editors/SpacerBlockEditor.tsx +4 -4
- package/components/builder/editors/TextBlockEditor.tsx +471 -468
- package/components/builder/editors/VideoBlockEditor.tsx +10 -8
- package/components/builder/live-preview/drag-utils.tsx +5 -3
- package/components/builder/settings-panel/AnimationTab.tsx +11 -8
- package/components/builder/settings-panel/BlockLayoutTab.tsx +514 -511
- package/components/builder/settings-panel/ColumnV2AnimationTab.tsx +2 -2
- package/components/builder/settings-panel/ColumnV2LayoutTab.tsx +11 -8
- package/components/builder/settings-panel/ColumnV2Settings.tsx +6 -5
- package/components/builder/settings-panel/CoverSectionLayoutTab.tsx +4 -3
- package/components/builder/settings-panel/CoverSectionSettings.tsx +14 -9
- package/components/builder/settings-panel/CustomSectionSettings.tsx +9 -7
- package/components/builder/settings-panel/PageSettings.tsx +39 -32
- package/components/builder/settings-panel/ParallaxGroupSettings.tsx +2 -2
- package/components/builder/settings-panel/ParallaxSlideSettings.tsx +2 -2
- package/components/builder/settings-panel/SectionV2AnimationTab.tsx +7 -5
- package/components/builder/settings-panel/SectionV2LayoutTab.tsx +13 -9
- package/components/builder/settings-panel/SectionV2Settings.tsx +10 -9
- package/components/builder/settings-panel/TRBLInputs.tsx +2 -2
- package/components/builder/settings-panel/useSettingsPanelSelection.ts +16 -13
- package/components/ui/ToastStack.tsx +142 -0
- package/lib/auth-token.ts +5 -1
- package/lib/bot-guard.ts +6 -0
- package/lib/builder/constants.ts +5 -10
- package/lib/toast/index.ts +56 -0
- package/lib/toast/store.ts +56 -0
- package/lib/version.ts +1 -1
- package/package.json +3 -1
|
@@ -95,35 +95,37 @@ function ImageThumb({
|
|
|
95
95
|
// ============================================
|
|
96
96
|
|
|
97
97
|
export default function ImageGridBlockEditor({ block }: Props) {
|
|
98
|
-
const
|
|
98
|
+
const updateBlock = useBuilderStore((s) => s.updateBlock);
|
|
99
|
+
const updateBlockDebounced = useBuilderStore((s) => s.updateBlockDebounced);
|
|
100
|
+
const _pushSnapshot = useBuilderStore((s) => s._pushSnapshot);
|
|
99
101
|
const viewport = useActiveViewport();
|
|
100
102
|
const images = block.images || [];
|
|
101
103
|
const [browserOpen, setBrowserOpen] = useState(false);
|
|
102
104
|
|
|
103
|
-
const snapshotOnFocus = () =>
|
|
105
|
+
const snapshotOnFocus = () => _pushSnapshot();
|
|
104
106
|
|
|
105
107
|
// Responsive update helper
|
|
106
108
|
const updateResponsive = (property: string, value: unknown) => {
|
|
107
109
|
if (viewport === "desktop") {
|
|
108
|
-
|
|
110
|
+
updateBlock(block._key, { [property]: value } as Partial<ContentBlock>);
|
|
109
111
|
} else {
|
|
110
112
|
const overrides = setResponsiveOverride(block, viewport, property, value);
|
|
111
|
-
|
|
113
|
+
updateBlock(block._key, overrides as Partial<ContentBlock>);
|
|
112
114
|
}
|
|
113
115
|
};
|
|
114
116
|
|
|
115
117
|
const resetOverride = (property: string) => {
|
|
116
118
|
const overrides = setResponsiveOverride(block, viewport, property, undefined);
|
|
117
|
-
|
|
119
|
+
updateBlock(block._key, overrides as Partial<ContentBlock>);
|
|
118
120
|
};
|
|
119
121
|
|
|
120
122
|
// Direct update (always base block — for images content)
|
|
121
123
|
const update = (updates: Partial<ImageGridBlock>) => {
|
|
122
|
-
|
|
124
|
+
updateBlock(block._key, updates as Partial<ContentBlock>);
|
|
123
125
|
};
|
|
124
126
|
|
|
125
127
|
const updateDebounced = (updates: Partial<ImageGridBlock>) => {
|
|
126
|
-
|
|
128
|
+
updateBlockDebounced(block._key, updates as Partial<ContentBlock>);
|
|
127
129
|
};
|
|
128
130
|
|
|
129
131
|
// Add multiple images at once from browser
|
|
@@ -378,7 +380,7 @@ export default function ImageGridBlockEditor({ block }: Props) {
|
|
|
378
380
|
value={String(getEffectiveValue<string>(block, viewport, "border_radius", block.border_radius || "")).replace(/px$/i, "")}
|
|
379
381
|
onFocus={snapshotOnFocus}
|
|
380
382
|
onChange={(v) => {
|
|
381
|
-
|
|
383
|
+
_pushSnapshot();
|
|
382
384
|
updateResponsive("border_radius", v.replace(/[^0-9]/g, ""));
|
|
383
385
|
}}
|
|
384
386
|
placeholder="0"
|
|
@@ -39,21 +39,21 @@ export function getSpacerPx(block: SpacerBlock): number {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export default function SpacerBlockEditor({ block }: Props) {
|
|
42
|
-
const
|
|
42
|
+
const updateBlock = useBuilderStore((s) => s.updateBlock);
|
|
43
43
|
const viewport = useActiveViewport();
|
|
44
44
|
|
|
45
45
|
const updateResponsive = (property: string, value: unknown) => {
|
|
46
46
|
if (viewport === "desktop") {
|
|
47
|
-
|
|
47
|
+
updateBlock(block._key, { [property]: value } as Partial<ContentBlock>);
|
|
48
48
|
} else {
|
|
49
49
|
const overrides = setResponsiveOverride(block, viewport, property, value);
|
|
50
|
-
|
|
50
|
+
updateBlock(block._key, overrides as Partial<ContentBlock>);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
const resetOverride = (property: string) => {
|
|
55
55
|
const overrides = setResponsiveOverride(block, viewport, property, undefined);
|
|
56
|
-
|
|
56
|
+
updateBlock(block._key, overrides as Partial<ContentBlock>);
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
const effectiveHeight = getEffectiveValue<string>(
|