@morphika/andami 0.2.22 → 0.2.25
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.
|
@@ -60,6 +60,9 @@ export default function CoverSectionCanvas({
|
|
|
60
60
|
const bgImageUrl = section.background_type === "image" && section.background_image
|
|
61
61
|
? adminAssetUrl(section.background_image)
|
|
62
62
|
: null;
|
|
63
|
+
const bgVideoUrl = section.background_type === "video" && section.background_video
|
|
64
|
+
? adminAssetUrl(section.background_video)
|
|
65
|
+
: null;
|
|
63
66
|
|
|
64
67
|
const effectiveRows = useMemo(
|
|
65
68
|
() => getEffectiveCoverRows(section, activeViewport),
|
|
@@ -134,27 +137,37 @@ export default function CoverSectionCanvas({
|
|
|
134
137
|
className="relative"
|
|
135
138
|
style={{ height: containerHeight }}
|
|
136
139
|
>
|
|
137
|
-
{/* Background preview —
|
|
140
|
+
{/* Background preview — image */}
|
|
138
141
|
{bgImageUrl && (
|
|
139
142
|
<div
|
|
140
|
-
className="absolute inset-0 pointer-events-none"
|
|
143
|
+
className="absolute inset-0 bg-cover bg-center pointer-events-none"
|
|
141
144
|
style={{
|
|
142
|
-
backgroundImage: `url(${bgImageUrl})`,
|
|
145
|
+
backgroundImage: `url("${bgImageUrl}")`,
|
|
143
146
|
backgroundSize: section.background_size || "cover",
|
|
144
147
|
backgroundPosition: section.background_position || "center center",
|
|
145
|
-
opacity: 0.
|
|
146
|
-
overflow: "hidden",
|
|
148
|
+
opacity: 0.12,
|
|
147
149
|
}}
|
|
148
150
|
/>
|
|
149
151
|
)}
|
|
152
|
+
|
|
153
|
+
{/* Background preview — video */}
|
|
154
|
+
{bgVideoUrl && (
|
|
155
|
+
<video
|
|
156
|
+
src={bgVideoUrl}
|
|
157
|
+
muted
|
|
158
|
+
playsInline
|
|
159
|
+
autoPlay
|
|
160
|
+
loop
|
|
161
|
+
className="absolute inset-0 w-full h-full object-cover pointer-events-none"
|
|
162
|
+
style={{ opacity: 0.12 }}
|
|
163
|
+
/>
|
|
164
|
+
)}
|
|
165
|
+
|
|
166
|
+
{/* Background preview — solid color */}
|
|
150
167
|
{section.background_type === "color" && section.background_color && (
|
|
151
168
|
<div
|
|
152
169
|
className="absolute inset-0 pointer-events-none"
|
|
153
|
-
style={{
|
|
154
|
-
backgroundColor: section.background_color,
|
|
155
|
-
opacity: 0.25,
|
|
156
|
-
overflow: "hidden",
|
|
157
|
-
}}
|
|
170
|
+
style={{ backgroundColor: section.background_color, opacity: 0.25 }}
|
|
158
171
|
/>
|
|
159
172
|
)}
|
|
160
173
|
|
|
@@ -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