From 7a9f1de483e57bb101d3e1ec0ae491c98620359d Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Wed, 15 May 2024 20:21:07 +0200 Subject: [PATCH] Fix problem with gradient-parser types (#61679) Fixes an issue where gradient-parser types were used as a "synthetic default import". Co-authored-by: sirreal Co-authored-by: gziolo --- packages/components/CHANGELOG.md | 1 + packages/components/src/custom-gradient-picker/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index f170fd81f7d59..f3643bdd9a3fb 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -19,6 +19,7 @@ ### Bug Fix - `ToolsPanel`: Fix sticking “Reset” option ([#60621](https://github.com/WordPress/gutenberg/pull/60621)). +- Fix an issue where types used a synthetic default import ([#61679](https://github.com/WordPress/gutenberg/pull/61679)). ## 27.5.0 (2024-05-02) diff --git a/packages/components/src/custom-gradient-picker/index.tsx b/packages/components/src/custom-gradient-picker/index.tsx index 66add261ce5e6..dd0659515234a 100644 --- a/packages/components/src/custom-gradient-picker/index.tsx +++ b/packages/components/src/custom-gradient-picker/index.tsx @@ -1,7 +1,7 @@ /** * External dependencies */ -import type gradientParser from 'gradient-parser'; +import { type LinearGradientNode } from 'gradient-parser'; /** * WordPress dependencies @@ -79,7 +79,7 @@ const GradientTypePicker = ( { ? undefined : HORIZONTAL_GRADIENT_ORIENTATION, type: 'linear-gradient', - } as gradientParser.LinearGradientNode ) + } satisfies LinearGradientNode ) ); };