@laioutr/app-hygraph 1.10.1 → 1.10.2
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -9,8 +9,13 @@ export const mapHygraphMedia = (asset) => {
|
|
|
9
9
|
{
|
|
10
10
|
provider: "hygraph",
|
|
11
11
|
src: asset.url,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
// Hygraph extracts dimensions for images only — every video asset reports `width`/`height`
|
|
13
|
+
// as null. `MediaSourceVideo` requires both as numbers, and the media library's trust
|
|
14
|
+
// boundary drops any item that fails that schema, so `undefined` here made every video
|
|
15
|
+
// vanish from the picker. 0 is the "unknown" placeholder; nothing in the render path reads
|
|
16
|
+
// a video source's dimensions.
|
|
17
|
+
width: asset.width ?? 0,
|
|
18
|
+
height: asset.height ?? 0,
|
|
14
19
|
// Full MIME type (e.g. `video/mp4`) — the frontend binds this to `<source type>`.
|
|
15
20
|
format: mimeType
|
|
16
21
|
}
|