Skip to content

Commit 8c2b733

Browse files
committed
Merge branch 'main' of github.com:BKWLD/react-visual into adding-no-poster-props
2 parents 2106d8e + 6119396 commit 8c2b733

File tree

5 files changed

+72
-72
lines changed

5 files changed

+72
-72
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"npmClient": "yarn",
33
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
4-
"version": "1.4.2"
4+
"version": "1.4.4"
55
}

packages/contentful/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-visual/contentful",
3-
"version": "1.4.2",
3+
"version": "1.4.4",
44
"description": "Image and video renderer for Contentful assets.",
55
"author": "Bukwild <info@bukwild.com>",
66
"license": "MIT",

packages/contentful/src/lib/aspectRatio.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const orientationMediaQueries = [
1414
export function getImageAspect(
1515
image: ContentfulImageAsset | undefined | null,
1616
): number | undefined {
17-
if (!image) return undefined;
17+
if (!image || image.width == null || image.height == null) return undefined;
1818
return image.width / image.height;
1919
}
2020

packages/contentful/src/types/contentfulVisualTypes.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ export type ContentfulVisualProps = {
44
image?: ContentfulImageAsset | null;
55
video?: ContentfulAsset | null;
66
src?: ContentfulVisualEntry | null;
7-
alt?: string; // Can be inferrerd
7+
alt?: string | null; // Can be inferrerd
88
} & Omit<ReactVisualProps, "alt" | "image" | "video">;
99

1010
export type ContentfulImageAsset = ContentfulAsset & {
11-
width: number;
12-
height: number;
11+
width?: number | null;
12+
height?: number | null;
1313
};
1414

1515
export type ContentfulAsset = {
1616
title?: string | null;
17-
description?: string; // Was not nullable in my tests
18-
fileName?: string;
19-
url: string;
17+
description?: string | null;
18+
fileName?: string | null;
19+
url?: string | null;
2020
};
2121

2222
export type ContentfulVisualEntry = {
2323
image?: ContentfulImageAsset | null;
2424
portraitImage?: ContentfulImageAsset | null;
2525
video?: ContentfulAsset | null;
2626
portraitVideo?: ContentfulAsset | null;
27-
alt: string | null;
27+
alt?: string | null;
2828
};

yarn.lock

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -545,55 +545,55 @@
545545
"@emnapi/runtime" "^1.1.0"
546546
"@tybys/wasm-util" "^0.9.0"
547547

548-
"@next/env@14.2.10":
549-
version "14.2.10"
550-
resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.10.tgz#1d3178340028ced2d679f84140877db4f420333c"
551-
integrity sha512-dZIu93Bf5LUtluBXIv4woQw2cZVZ2DJTjax5/5DOs3lzEOeKLy7GxRSr4caK9/SCPdaW6bCgpye6+n4Dh9oJPw==
552-
553-
"@next/swc-darwin-arm64@14.2.10":
554-
version "14.2.10"
555-
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.10.tgz#49d10ca4086fbd59ee68e204f75d7136eda2aa80"
556-
integrity sha512-V3z10NV+cvMAfxQUMhKgfQnPbjw+Ew3cnr64b0lr8MDiBJs3eLnM6RpGC46nhfMZsiXgQngCJKWGTC/yDcgrDQ==
557-
558-
"@next/swc-darwin-x64@14.2.10":
559-
version "14.2.10"
560-
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.10.tgz#0ebeae3afb8eac433882b79543295ab83624a1a8"
561-
integrity sha512-Y0TC+FXbFUQ2MQgimJ/7Ina2mXIKhE7F+GUe1SgnzRmwFY3hX2z8nyVCxE82I2RicspdkZnSWMn4oTjIKz4uzA==
562-
563-
"@next/swc-linux-arm64-gnu@14.2.10":
564-
version "14.2.10"
565-
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.10.tgz#7e602916d2fb55a3c532f74bed926a0137c16f20"
566-
integrity sha512-ZfQ7yOy5zyskSj9rFpa0Yd7gkrBnJTkYVSya95hX3zeBG9E55Z6OTNPn1j2BTFWvOVVj65C3T+qsjOyVI9DQpA==
567-
568-
"@next/swc-linux-arm64-musl@14.2.10":
569-
version "14.2.10"
570-
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.10.tgz#6b143f628ccee490b527562e934f8de578d4be47"
571-
integrity sha512-n2i5o3y2jpBfXFRxDREr342BGIQCJbdAUi/K4q6Env3aSx8erM9VuKXHw5KNROK9ejFSPf0LhoSkU/ZiNdacpQ==
572-
573-
"@next/swc-linux-x64-gnu@14.2.10":
574-
version "14.2.10"
575-
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.10.tgz#086f2f16a0678890a1eb46518c4dda381b046082"
576-
integrity sha512-GXvajAWh2woTT0GKEDlkVhFNxhJS/XdDmrVHrPOA83pLzlGPQnixqxD8u3bBB9oATBKB//5e4vpACnx5Vaxdqg==
577-
578-
"@next/swc-linux-x64-musl@14.2.10":
579-
version "14.2.10"
580-
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.10.tgz#1befef10ed8dbcc5047b5d637a25ae3c30a0bfc3"
581-
integrity sha512-opFFN5B0SnO+HTz4Wq4HaylXGFV+iHrVxd3YvREUX9K+xfc4ePbRrxqOuPOFjtSuiVouwe6uLeDtabjEIbkmDA==
582-
583-
"@next/swc-win32-arm64-msvc@14.2.10":
584-
version "14.2.10"
585-
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.10.tgz#731f52c3ae3c56a26cf21d474b11ae1529531209"
586-
integrity sha512-9NUzZuR8WiXTvv+EiU/MXdcQ1XUvFixbLIMNQiVHuzs7ZIFrJDLJDaOF1KaqttoTujpcxljM/RNAOmw1GhPPQQ==
587-
588-
"@next/swc-win32-ia32-msvc@14.2.10":
589-
version "14.2.10"
590-
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.10.tgz#32723ef7f04e25be12af357cc72ddfdd42fd1041"
591-
integrity sha512-fr3aEbSd1GeW3YUMBkWAu4hcdjZ6g4NBl1uku4gAn661tcxd1bHs1THWYzdsbTRLcCKLjrDZlNp6j2HTfrw+Bg==
592-
593-
"@next/swc-win32-x64-msvc@14.2.10":
594-
version "14.2.10"
595-
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.10.tgz#ee1d036cb5ec871816f96baee7991035bb242455"
596-
integrity sha512-UjeVoRGKNL2zfbcQ6fscmgjBAS/inHBh63mjIlfPg/NG8Yn2ztqylXt5qilYb6hoHIwaU2ogHknHWWmahJjgZQ==
548+
"@next/env@14.2.32":
549+
version "14.2.32"
550+
resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.32.tgz#6d1107e2b7cc8649ff3730b8b46deb4e8a6d38fa"
551+
integrity sha512-n9mQdigI6iZ/DF6pCTwMKeWgF2e8lg7qgt5M7HXMLtyhZYMnf/u905M18sSpPmHL9MKp9JHo56C6jrD2EvWxng==
552+
553+
"@next/swc-darwin-arm64@14.2.32":
554+
version "14.2.32"
555+
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.32.tgz#83482a7282df899b73d916e02b02a189771e706c"
556+
integrity sha512-osHXveM70zC+ilfuFa/2W6a1XQxJTvEhzEycnjUaVE8kpUS09lDpiDDX2YLdyFCzoUbvbo5r0X1Kp4MllIOShw==
557+
558+
"@next/swc-darwin-x64@14.2.32":
559+
version "14.2.32"
560+
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.32.tgz#1a9eb676a014e1fc999251f10288c25a0f81d6d1"
561+
integrity sha512-P9NpCAJuOiaHHpqtrCNncjqtSBi1f6QUdHK/+dNabBIXB2RUFWL19TY1Hkhu74OvyNQEYEzzMJCMQk5agjw1Qg==
562+
563+
"@next/swc-linux-arm64-gnu@14.2.32":
564+
version "14.2.32"
565+
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.32.tgz#7713a49abd555d6f698e766b1631b67d881b4ee4"
566+
integrity sha512-v7JaO0oXXt6d+cFjrrKqYnR2ubrD+JYP7nQVRZgeo5uNE5hkCpWnHmXm9vy3g6foMO8SPwL0P3MPw1c+BjbAzA==
567+
568+
"@next/swc-linux-arm64-musl@14.2.32":
569+
version "14.2.32"
570+
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.32.tgz#327efdffe97e56f5389a7889cdedbd676fdbb519"
571+
integrity sha512-tA6sIKShXtSJBTH88i0DRd6I9n3ZTirmwpwAqH5zdJoQF7/wlJXR8DkPmKwYl5mFWhEKr5IIa3LfpMW9RRwKmQ==
572+
573+
"@next/swc-linux-x64-gnu@14.2.32":
574+
version "14.2.32"
575+
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.32.tgz#a3e7444613d0fe5c8ea4ead08d6a9c818246758c"
576+
integrity sha512-7S1GY4TdnlGVIdeXXKQdDkfDysoIVFMD0lJuVVMeb3eoVjrknQ0JNN7wFlhCvea0hEk0Sd4D1hedVChDKfV2jw==
577+
578+
"@next/swc-linux-x64-musl@14.2.32":
579+
version "14.2.32"
580+
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.32.tgz#a2ec5b0a06c740d6740c938b1d4a614f1a13f018"
581+
integrity sha512-OHHC81P4tirVa6Awk6eCQ6RBfWl8HpFsZtfEkMpJ5GjPsJ3nhPe6wKAJUZ/piC8sszUkAgv3fLflgzPStIwfWg==
582+
583+
"@next/swc-win32-arm64-msvc@14.2.32":
584+
version "14.2.32"
585+
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.32.tgz#b4d3e47c6b276fc4711deb978d04015d029d198d"
586+
integrity sha512-rORQjXsAFeX6TLYJrCG5yoIDj+NKq31Rqwn8Wpn/bkPNy5rTHvOXkW8mLFonItS7QC6M+1JIIcLe+vOCTOYpvg==
587+
588+
"@next/swc-win32-ia32-msvc@14.2.32":
589+
version "14.2.32"
590+
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.32.tgz#d1f1f854a1fbbaeefa8f81271437448653f33494"
591+
integrity sha512-jHUeDPVHrgFltqoAqDB6g6OStNnFxnc7Aks3p0KE0FbwAvRg6qWKYF5mSTdCTxA3axoSAUwxYdILzXJfUwlHhA==
592+
593+
"@next/swc-win32-x64-msvc@14.2.32":
594+
version "14.2.32"
595+
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.32.tgz#8212d681cf6858a9e3204728f8f2b161000683ed"
596+
integrity sha512-2N0lSoU4GjfLSO50wvKpMQgKd4HdI2UHEhQPPPnlgfBJlOgJxkjpkYBqzk08f1gItBB6xF/n+ykso2hgxuydsA==
597597

598598
"@nodelib/fs.scandir@2.1.5":
599599
version "2.1.5"
@@ -4072,27 +4072,27 @@ neo-async@^2.6.2:
40724072
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
40734073

40744074
next@^14:
4075-
version "14.2.10"
4076-
resolved "https://registry.yarnpkg.com/next/-/next-14.2.10.tgz#331981a4fecb1ae8af1817d4db98fc9687ee1cb6"
4077-
integrity sha512-sDDExXnh33cY3RkS9JuFEKaS4HmlWmDKP1VJioucCG6z5KuA008DPsDZOzi8UfqEk3Ii+2NCQSJrfbEWtZZfww==
4075+
version "14.2.32"
4076+
resolved "https://registry.yarnpkg.com/next/-/next-14.2.32.tgz#279b544f0c8ed023c33454ce4d563d3e05c2f3fb"
4077+
integrity sha512-fg5g0GZ7/nFc09X8wLe6pNSU8cLWbLRG3TZzPJ1BJvi2s9m7eF991se67wliM9kR5yLHRkyGKU49MMx58s3LJg==
40784078
dependencies:
4079-
"@next/env" "14.2.10"
4079+
"@next/env" "14.2.32"
40804080
"@swc/helpers" "0.5.5"
40814081
busboy "1.6.0"
40824082
caniuse-lite "^1.0.30001579"
40834083
graceful-fs "^4.2.11"
40844084
postcss "8.4.31"
40854085
styled-jsx "5.1.1"
40864086
optionalDependencies:
4087-
"@next/swc-darwin-arm64" "14.2.10"
4088-
"@next/swc-darwin-x64" "14.2.10"
4089-
"@next/swc-linux-arm64-gnu" "14.2.10"
4090-
"@next/swc-linux-arm64-musl" "14.2.10"
4091-
"@next/swc-linux-x64-gnu" "14.2.10"
4092-
"@next/swc-linux-x64-musl" "14.2.10"
4093-
"@next/swc-win32-arm64-msvc" "14.2.10"
4094-
"@next/swc-win32-ia32-msvc" "14.2.10"
4095-
"@next/swc-win32-x64-msvc" "14.2.10"
4087+
"@next/swc-darwin-arm64" "14.2.32"
4088+
"@next/swc-darwin-x64" "14.2.32"
4089+
"@next/swc-linux-arm64-gnu" "14.2.32"
4090+
"@next/swc-linux-arm64-musl" "14.2.32"
4091+
"@next/swc-linux-x64-gnu" "14.2.32"
4092+
"@next/swc-linux-x64-musl" "14.2.32"
4093+
"@next/swc-win32-arm64-msvc" "14.2.32"
4094+
"@next/swc-win32-ia32-msvc" "14.2.32"
4095+
"@next/swc-win32-x64-msvc" "14.2.32"
40964096

40974097
node-fetch@2.6.7:
40984098
version "2.6.7"

0 commit comments

Comments
 (0)