openpencil/tests/engine
Danila Poyarkov 5ba5b4aad5
fix(figma-api): validate effects like Figma (#794)
* build(core): import Markdown with unplugin-raw

Core inlined ?raw imports with a hand-written Rolldown plugin that also turned plain .md imports into strings, which nothing in Core uses. unplugin-raw already does this for the Vue SDK and design-jsx; use it here too and drop the unused *.md module declaration.

* refactor(pen): use the scene-graph color parser

pen/src/color.ts duplicated parseColor from @open-pencil/scene-graph/color line for line. Import it instead, which also drops pen's direct culori dependency.

* fix(figma-api): validate effects like Figma

The effects setter stored whatever a script passed, so scripts that Figma rejects ran here and malformed effects reached rendering and .fig export. Validate against Figma's effect shapes with Valibot, recorded from live Figma: strict objects, required shadow fields, radius >= 0, RGBA channels within 0..1, and no shadow fields on blurs. The getter now returns Figma's shape so node.effects = node.effects keeps working.

Closes #786

* fix(figma-api): reject infinite numbers in effects

Figma rejects Infinity in every effect number ("Number must be finite"), but v.number() accepts it, so infinite radii, offsets, and spreads reached the scene graph.

* fix(figma-api): store PASS_THROUGH shadow blend as NORMAL

PASS_THROUGH is a layer blend mode. Live Figma accepts it on drop and inner shadows but reads NORMAL back, so do the same instead of storing it.
2026-09-30 21:18:20 +04:00
..
acp
app feat: export components as Storybook stories (#751) 2026-09-30 03:16:47 +04:00
cli feat: export components as Storybook stories (#751) 2026-09-30 03:16:47 +04:00
clipboard refactor!: move shared primitives below dom-css and core (#771) 2026-09-26 11:39:11 +04:00
collab Release v0.15.0 2026-09-16 17:57:35 +03:00
color refactor!: move shared primitives below dom-css and core (#771) 2026-09-26 11:39:11 +04:00
core refactor(canvas): share bounded resource cache bookkeeping 2026-09-15 21:28:16 +03:00
dom-css fix(fig): restore strict parse validation 2026-07-18 03:58:18 +03:00
figma/api feat(figma-api): add swapComponent() to instances (#780) 2026-09-30 05:29:43 +04:00
geometry feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
hit-test perf(scene-graph): accelerate axis-aligned hit tests (#534) 2026-08-16 15:43:25 +03:00
icons fix(core): preserve inline SVG primitives (#485) 2026-08-12 16:02:45 +03:00
io fix(kiwi): type the NodeChange fields fig.kiwi already declares 2026-09-30 12:18:00 +04:00
kiwi fix(fig): preserve regenerated override lineage 2026-07-21 01:51:27 +03:00
layout test: fix heavy unit-test measurement and round-trip checks (#655) 2026-09-07 00:33:12 +03:00
library build: upgrade oxfmt and format Vue imports (#669) 2026-09-10 02:45:13 +03:00
lint test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
mcp fix(MCP): add read-only file lifecycle tools (#722) 2026-09-18 11:55:06 +03:00
pen feat: export components as Storybook stories (#751) 2026-09-30 03:16:47 +04:00
profiler chore: format codebase 2026-05-24 12:15:29 +03:00
random
render refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00
snap
tauri fix(fonts): explain PingFang substitution and draw its CJK text (#781) 2026-09-26 11:14:30 +04:00
text fix(text): render variable font styles at their named instances (#773) 2026-09-26 11:25:01 +04:00
tools fix(figma-api): validate effects like Figma (#794) 2026-09-30 21:18:20 +04:00
vector feat(canvas): render arrow stroke caps on lines and open vectors 2026-08-31 21:25:38 +03:00
vue fix: convert document colour profiles, keep text edits live, and fix .fig exports (#716) 2026-09-18 00:43:10 +03:00
perf.bench.ts feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00