From 121b26f900c10035a2f5817be374d9fb39c07409 Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Fri, 13 Mar 2026 16:23:52 +0900 Subject: [PATCH] Fix Text with box shadow --- src/codegen/__tests__/__snapshots__/codegen.test.ts.snap | 4 ---- src/codegen/props/effect.ts | 8 +++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/codegen/__tests__/__snapshots__/codegen.test.ts.snap b/src/codegen/__tests__/__snapshots__/codegen.test.ts.snap index 83a6105..c2b342b 100644 --- a/src/codegen/__tests__/__snapshots__/codegen.test.ts.snap +++ b/src/codegen/__tests__/__snapshots__/codegen.test.ts.snap @@ -392,7 +392,6 @@ exports[`Codegen renders text node with ellipsis props 1`] = ` exports[`Codegen renders text node with single drop shadow 1`] = ` " | undefined { if ('effects' in node && node.effects.length > 0) { - return node.effects.reduce( + // TEXT nodes use textShadow for DROP_SHADOW (handled by text-shadow.ts) + const effects = + node.type === 'TEXT' + ? node.effects.filter((e) => e.type !== 'DROP_SHADOW') + : node.effects + if (effects.length === 0) return + return effects.reduce( (acc, effect) => { const props = _getEffectPropsFromEffect(effect) for (const [key, value] of Object.entries(props)) {