openpencil/packages
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
..
cli feat: export components as Storybook stories (#751) 2026-09-30 03:16:47 +04:00
core fix(design-jsx): warn about unsupported paint and effect helper options (#762) 2026-09-30 09:59:45 +04:00
demos
docs fix(design-jsx): warn about unsupported paint and effect helper options (#762) 2026-09-30 09:59:45 +04:00
dom-css refactor(dom-css): group sources into import, export, and runtime (#789) 2026-09-30 09:44:52 +04:00
fig docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00
harness docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00
kiwi Release v0.15.1 2026-09-18 16:33:46 +03:00
mcp docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00
pen feat: export components as Storybook stories (#751) 2026-09-30 03:16:47 +04:00
scene-graph fix(figma-api): size groups and boolean operations to their contents (#775) 2026-09-30 05:23:59 +04:00
vue docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00