openpencil/tests/engine/render/jsx
mrhard9090 4faf20bab8
fix(design-jsx): warn about unsupported paint and effect helper options (#762)
* fix(design-jsx): accept blur in effect helpers and warn about unknown options

dropShadow({ blur: 12 }) silently used the default radius, although the shadow shorthand and the blur prop both call that value the blur, and any misspelled option was dropped without a word. The shadow and blur helpers now take blur as the radius, and renderJSX reports any other option they ignore, next to the existing unsupported-prop warnings.

Fixes #736

* refactor(design-jsx): check options for every paint and effect helper

The option check covered only effect helpers, and its key lists repeated
the option types by hand, so a new option could turn into a false
warning. One wrapper in `design-jsx/helpers.ts` now checks every paint
and effect helper that evaluated JSX can call, with key lists typed
against their option interfaces. Only plain objects are checked, and
repeated warnings are collapsed once. The authoring reference documents
the `blur` alias and the warnings.

* docs(design-jsx): scope helper option warnings to rendered JSX

* fix(design-jsx): name effect radius as Figma does and hint at it for blur

Accepting both `radius` and `blur` gave effect helpers two names for one
value, and when both were set `blur` was dropped without a warning.
Figma's effects only have `radius`, so the helpers take `radius` alone
and `blur` now warns with a pointer to it. The default radius is named
once instead of repeated.

---------

Co-authored-by: Danila Poyarkov <dev@dannote.net>
2026-09-30 09:59:45 +04:00
..
component fix: reject ambiguous variant property names 2026-09-14 00:14:09 +03:00
builders.test.ts style: tighten import grouping 2026-05-06 02:22:08 +03:00
export.test.ts test: organize prefixed test files into folders 2026-05-06 02:13:18 +03:00
gaps.test.ts fix(core): preserve inline SVG primitives (#485) 2026-08-12 16:02:45 +03:00
grid-layout.test.ts style: tighten import grouping 2026-05-06 02:22:08 +03:00
instance-sizing.test.ts test: cover and document inherited instance dimensions 2026-09-14 00:24:52 +03:00
reference.test.ts docs: clarify scalar modes and instance sizing guidance 2026-09-13 20:54:27 +03:00
render-tree.test.ts fix(design-jsx): warn about unsupported paint and effect helper options (#762) 2026-09-30 09:59:45 +04:00
scalar-variables.test.ts feat: bind Design JSX scalar props to variables 2026-09-13 19:06:20 +03:00
schema.test.ts feat(code): add live JSX and HTML/CSS editing (#525) 2026-08-15 09:48:42 +03:00
text-props.test.ts fix: escape string attributes in JSX export (#754) 2026-09-25 15:50:36 +04:00