openpencil/packages/docs
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
..
.vitepress docs: remove GitHub Discussions link from docs header 2026-09-18 23:58:37 +03:00
de feat(figma-api): add detachInstance() to instances (#778) 2026-09-30 05:19:11 +04:00
development build(tools): group tools by role and gate them like the rest of the repo (#791) 2026-09-30 05:00:31 +04:00
es feat(figma-api): add detachInstance() to instances (#778) 2026-09-30 05:19:11 +04:00
fr feat(figma-api): add detachInstance() to instances (#778) 2026-09-30 05:19:11 +04:00
it feat(figma-api): add detachInstance() to instances (#778) 2026-09-30 05:19:11 +04:00
overview fix: use official Homebrew cask installation guidance (#712) 2026-09-17 13:36:17 +03:00
pl feat(figma-api): add detachInstance() to instances (#778) 2026-09-30 05:19:11 +04:00
programmable feat(figma-api): add swapComponent() to instances (#780) 2026-09-30 05:29:43 +04:00
public feat: refresh branding with generated platform icons (#707) 2026-09-16 11:54:07 +03:00
reference fix(design-jsx): warn about unsupported paint and effect helper options (#762) 2026-09-30 09:59:45 +04:00
ru feat(figma-api): add detachInstance() to instances (#778) 2026-09-30 05:19:11 +04:00
user-guide docs: clarify recovery cleanup and browser font scope 2026-09-15 23:19:29 +03:00
AGENTS.md build(tools): group tools by role and gate them like the rest of the repo (#791) 2026-09-30 05:00:31 +04:00
getting-started.md fix: explain unsupported browsers instead of a blank window (#745) 2026-09-22 14:40:59 +04:00
index.md Refine docs structure for SDK and automation 2026-03-24 23:24:08 +03:00
package.json build(tools): group tools by role and gate them like the rest of the repo (#791) 2026-09-30 05:00:31 +04:00