@morphika/andami 0.2.22 → 0.2.24
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.
|
@@ -7,7 +7,7 @@ import type { DeviceViewport } from "../../lib/builder/types";
|
|
|
7
7
|
import SectionV2Canvas from "./SectionV2Canvas";
|
|
8
8
|
import CoverRowResizeHandle from "./CoverRowResizeHandle";
|
|
9
9
|
import { DEVICE_HEIGHTS } from "../../lib/builder/types";
|
|
10
|
-
import {
|
|
10
|
+
import { useAssetUrl } from "../../lib/contexts/AssetContext";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* CoverSectionCanvas — renders a CoverSection in the builder canvas.
|
|
@@ -51,6 +51,7 @@ export default function CoverSectionCanvas({
|
|
|
51
51
|
const store = useBuilderStore();
|
|
52
52
|
const activeViewport = store.activeViewport || "desktop";
|
|
53
53
|
const previewMode = store.previewMode;
|
|
54
|
+
const assetUrl = useAssetUrl();
|
|
54
55
|
const [isSectionHovered, setIsSectionHovered] = useState(false);
|
|
55
56
|
|
|
56
57
|
const vhPixels = DEVICE_HEIGHTS[activeViewport];
|
|
@@ -58,7 +59,7 @@ export default function CoverSectionCanvas({
|
|
|
58
59
|
const containerHeight = Math.round(vhPixels * heightMultiplier);
|
|
59
60
|
|
|
60
61
|
const bgImageUrl = section.background_type === "image" && section.background_image
|
|
61
|
-
?
|
|
62
|
+
? assetUrl(section.background_image)
|
|
62
63
|
: null;
|
|
63
64
|
|
|
64
65
|
const effectiveRows = useMemo(
|
|
@@ -229,6 +229,7 @@ function serializeCoverSection(section: CoverSection): Record<string, unknown> {
|
|
|
229
229
|
_type: "coverSection",
|
|
230
230
|
_key: section._key,
|
|
231
231
|
background_type: section.background_type,
|
|
232
|
+
background_color: section.background_color,
|
|
232
233
|
background_image: section.background_image,
|
|
233
234
|
background_video: section.background_video,
|
|
234
235
|
background_position: section.background_position,
|
package/lib/version.ts
CHANGED
package/package.json
CHANGED