From 75bc87f26814e78160e942a309021c3f9213894b Mon Sep 17 00:00:00 2001 From: Cr4xy Date: Fri, 9 Feb 2024 23:42:34 +0100 Subject: [PATCH 1/6] Add webp to image-preview --- packages/graphiql-react/src/editor/components/image-preview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/graphiql-react/src/editor/components/image-preview.tsx b/packages/graphiql-react/src/editor/components/image-preview.tsx index b330f7bb01a..bc608e6ad02 100644 --- a/packages/graphiql-react/src/editor/components/image-preview.tsx +++ b/packages/graphiql-react/src/editor/components/image-preview.tsx @@ -84,5 +84,5 @@ function tokenToURL(token: Token) { } function isImageURL(url: URL) { - return /(bmp|gif|jpeg|jpg|png|svg)$/.test(url.pathname); + return /(bmp|gif|jpeg|jpg|png|svg|webp)$/.test(url.pathname); } From 850803c68248ab5a4012e571c5f7f3689fa9c32f Mon Sep 17 00:00:00 2001 From: Rikki Schulte Date: Fri, 1 Mar 2024 15:34:49 +0100 Subject: [PATCH 2/6] Create pink-singers-glow.md add changeset --- .changeset/pink-singers-glow.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/pink-singers-glow.md diff --git a/.changeset/pink-singers-glow.md b/.changeset/pink-singers-glow.md new file mode 100644 index 00000000000..b6d64beb965 --- /dev/null +++ b/.changeset/pink-singers-glow.md @@ -0,0 +1,6 @@ +--- +"@graphiql/react": patch +"graphiql": patch +--- + +Add webp support to graphiql results image-preview From 2753a8ce8b85d8c6163ed5c27752e97d483300b7 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Wed, 14 Aug 2024 19:04:17 +0200 Subject: [PATCH 3/6] Update packages/graphiql-react/src/editor/components/image-preview.tsx --- packages/graphiql-react/src/editor/components/image-preview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/graphiql-react/src/editor/components/image-preview.tsx b/packages/graphiql-react/src/editor/components/image-preview.tsx index bc608e6ad02..51902fd2b8a 100644 --- a/packages/graphiql-react/src/editor/components/image-preview.tsx +++ b/packages/graphiql-react/src/editor/components/image-preview.tsx @@ -84,5 +84,5 @@ function tokenToURL(token: Token) { } function isImageURL(url: URL) { - return /(bmp|gif|jpeg|jpg|png|svg|webp)$/.test(url.pathname); + return /\.(bmp|gif|jpeg|jpg|png|svg|webp)$/.test(url.pathname); } From 16c3d0b04144a10cb4cdbed3d3424eefb185541c Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Wed, 14 Aug 2024 19:13:19 +0200 Subject: [PATCH 4/6] Update custom-words.txt --- resources/custom-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/custom-words.txt b/resources/custom-words.txt index a1a3f38758d..56c382a0aa6 100644 --- a/resources/custom-words.txt +++ b/resources/custom-words.txt @@ -219,6 +219,7 @@ vitejs vitest vizag vsix +webp websockets wgutils wincent From 6fdcda59a30401abcfad2f293afaa53cd402bce7 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Wed, 14 Aug 2024 19:15:06 +0200 Subject: [PATCH 5/6] Update .changeset/pink-singers-glow.md --- .changeset/pink-singers-glow.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/pink-singers-glow.md b/.changeset/pink-singers-glow.md index b6d64beb965..437ed778636 100644 --- a/.changeset/pink-singers-glow.md +++ b/.changeset/pink-singers-glow.md @@ -1,6 +1,6 @@ --- -"@graphiql/react": patch -"graphiql": patch +"@graphiql/react": minor +"graphiql": minor --- Add webp support to graphiql results image-preview From 9bba253b042ae2bff74f4339f977e2ceca7cf871 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Wed, 14 Aug 2024 19:15:27 +0200 Subject: [PATCH 6/6] Update packages/graphiql-react/src/editor/components/image-preview.tsx --- packages/graphiql-react/src/editor/components/image-preview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/graphiql-react/src/editor/components/image-preview.tsx b/packages/graphiql-react/src/editor/components/image-preview.tsx index 51902fd2b8a..4a2b65dfc16 100644 --- a/packages/graphiql-react/src/editor/components/image-preview.tsx +++ b/packages/graphiql-react/src/editor/components/image-preview.tsx @@ -84,5 +84,5 @@ function tokenToURL(token: Token) { } function isImageURL(url: URL) { - return /\.(bmp|gif|jpeg|jpg|png|svg|webp)$/.test(url.pathname); + return /\.(bmp|gif|jpe?g|png|svg|webp)$/.test(url.pathname); }