Commit graph

1410 commits

Author SHA1 Message Date
Danila Poyarkov c31e7ae7d4 test(selection): split multi-selection coverage
- Move multi-selection.test.ts into focused flip, alignment, and property files
- Reuse scene and assertion helpers for selection tests
- Preserve all 22 multi-selection tests and enforce non-null assertion cleanup on the new folder
2026-05-06 01:56:27 +03:00
Danila Poyarkov c47f8a0359 test(layout): split auto and grid coverage
- Move layout.test.ts into auto-layout and grid-layout files
- Add shared layout helpers for test graph setup and fixture loading
- Preserve all 95 layout tests after the split
2026-05-06 01:54:56 +03:00
Danila Poyarkov 0532dfc697 test(clipboard): split editor clipboard coverage
- Move clipboard.test.ts into focused import, bounds, HTML encoding, and fixture roundtrip files
- Add a shared clipboard graph helper for import tests
- Preserve all 29 clipboard tests after the split
2026-05-06 01:53:10 +03:00
Danila Poyarkov 2aecb2df85 test(tools): split tool registry coverage
- Move tools.test.ts into focused registry, create, modify, read, and structure files
- Add shared tool test helpers for graph setup and tool lookup
- Preserve all 38 tool tests after the split
2026-05-06 01:51:19 +03:00
Danila Poyarkov 75e62507a5 test(fig): split import and roundtrip coverage
- Move fig-roundtrip.test.ts into focused import, export, roundtrip, and heavy fixture files
- Add shared fig fixture helpers for fixture parsing and valid node type checks
- Preserve the original 51 passing and 8 skipped fig tests under BUN_HEAVY_TESTS=false
- Extend scoped non-null assertion enforcement to the fig test folder
2026-05-06 01:49:25 +03:00
Danila Poyarkov 8a5c4847fd test(render): split JSX render coverage
- Move render.test.ts into focused JSX builder, tree render, grid layout, and text prop files
- Preserve all 56 render tests and keep scoped non-null assertion enforcement on the new folder
- Validate the split with the render/jsx test folder and the full check command
2026-05-06 01:22:27 +03:00
Danila Poyarkov 3249a4b65b chore(tests): clean more assertion casts
- Remove non-null assertions from matrix, OkHCL, and render cache tests
- Use shared assertion helpers for required inverse matrices, fills, surfaces, and pixels
- Extend scoped lint coverage for the cleaned files
2026-05-06 01:20:15 +03:00
Danila Poyarkov e9e36d5bf5 chore(tests): expand non-null assertion cleanup
- Remove non-null assertions from copy, font export, MCP stdio, and plugin data tests
- Reuse shared assertion helpers for required fixtures, proxy nodes, and text tool output
- Enforce the non-null assertion ban for the newly cleaned test files
2026-05-06 01:18:31 +03:00
Danila Poyarkov 51eae14e4b chore(tests): remove targeted non-null assertions
- Add shared test helpers for required nodes and child ids
- Clean non-null assertions from noisy render, nudge, text undo, and fig roundtrip tests
- Enforce the non-null assertion ban for the cleaned test files
- Remove stale eslint disables around empty functions and broad mock transport typing
2026-05-06 01:14:50 +03:00
Danila Poyarkov 4d3e16c0a2 chore(lint): ban broad function types
- Add structural lint rules for broad Function usage and globalThis deletion outside tests
- Type design JSX component factories with an explicit callable signature
- Replace remaining broad Kiwi serialization test records with unknown values
2026-05-06 00:48:57 +03:00
Danila Poyarkov fae190a673 chore(lint): remove unsafe test casts
- Enforce explicit-any and TypeScript suppression bans in tests
- Remove remaining broad any casts from engine and e2e coverage
- Split markdown ambient declarations from typed browser globals
2026-05-06 00:42:45 +03:00
Danila Poyarkov aa07e833cb chore(lint): ban broad double casts project-wide
- Extend the as-unknown-as structural rule beyond app and Vue code
- Remove existing broad double casts from core and tests
- Replace the vector base64 helper and XPath facade casts with precise code paths
2026-05-06 00:29:23 +03:00
Danila Poyarkov 73861b74d9 chore(lint): harden unsafe type rules
- Treat explicit any and non-null assertions as errors outside existing test and adapter exceptions
- Run the unknown Record double-cast guard in the main lint config too
2026-05-06 00:25:49 +03:00
Danila Poyarkov 7f3eb532d8 fix(core): render gradient text fills
- Clip gradient paints through the shaped paragraph mask instead of reading only the paint color
- Cover the paragraph mask path and a headless red-to-blue text render

Fixes #246
2026-05-06 00:22:17 +03:00
Danila Poyarkov 68d15440b1 feat(app): add variable type creation menu 2026-05-05 23:49:20 +03:00
Danila Poyarkov 3bd01095eb test(app): cover remaining Tauri integrations 2026-05-05 22:45:14 +03:00
Danila Poyarkov 057b3a02b7 test(app): cover Tauri process helpers 2026-05-05 22:32:24 +03:00
Danila Poyarkov 020b55a8ae test(app): cover Tauri file actions 2026-05-05 22:24:57 +03:00
Danila Poyarkov cc216c79db test(app): cover font settings UI 2026-05-05 22:12:33 +03:00
Danila Poyarkov 0f9b69d051 test(app): expand Tauri helper coverage 2026-05-05 22:07:02 +03:00
Danila Poyarkov e5b0767a43 test(app): cover Tauri font cache helpers 2026-05-05 21:58:12 +03:00
Danila Poyarkov dac6f171e3 feat(app): add font cache management hooks 2026-05-05 21:50:31 +03:00
Danila Poyarkov 768b527155 feat(core): add font fallback manifest 2026-05-05 21:35:12 +03:00
Danila Poyarkov c1b2678533 ci: make heavy fig tests manual 2026-05-05 21:25:23 +03:00
Danila Poyarkov 92265a56c1 ci: add scheduled heavy fig tests 2026-05-05 21:21:41 +03:00
Danila Poyarkov 25ea361fd7
feat(app): cache downloaded fonts
- Add a downloaded font cache hook to FontManager
- Store Tauri font downloads under AppLocalData with manifest validation
- Prefer cached downloads before system font lookup on desktop
- Skip opt-in heavy .fig parsing tests in PR CI
2026-05-05 21:14:38 +03:00
Danila Poyarkov f29da6c5cd refactor(vue): clean up primitive UI APIs
- Replace one-off class props with typed ui objects

- Group renderless slot actions and remove DOM ref callback plumbing

- Make local font access and typography font loading explicit capability objects
2026-05-05 20:57:13 +03:00
Danila Poyarkov 9c11c5b075
refactor(core): centralize font loading
- Replace loose font service functions with a FontManager instance
- Route renderer provider lifecycle and font caches through the manager
- Request browser local font access from the font picker interaction
2026-05-05 18:59:54 +03:00
Tem-man 1e2df31636
fix(core): improve CJK font fallback loading
- Allow CJK fallback loading to use local variable system fonts
- Add Windows CJK fallback families
- Harden CanvasKit WASM asset resolution and serving
2026-05-05 18:39:39 +03:00
Joseph Cumines c69e3884cf
fix(core): critical codec and canvas fixes
- Deduplicate plugin data and relaunch data during .fig parsing/export
- Unify shared plugin data into the pluginData storage path
- Refactor shadow rendering and harden CanvasKit font provider teardown
- Expand engine and renderer coverage
2026-05-05 14:58:02 +03:00
Danila Poyarkov 7252b450cf fix(app): fix variable picker click and layout spacing
- ScrubInput: skip scrub drag when pointerdown target is inside a button
- Size fields: always show chevron icon instead of hover-swap to prevent layout jump
- Variable picker: add right padding when no chevron follows, none when chevron present
2026-05-04 14:39:49 +03:00
Danila Poyarkov 8458334fec fix(app): prevent ScrubInput scrub drag from swallowing button clicks
The outer ScrubInput container captured all pointerdown events and
started a scrub drag, preventing embedded button clicks (like the
variable picker diamond icon) from ever reaching their handlers.

Now checks if the click target is inside a <button> before starting
the scrub.
2026-05-04 14:05:45 +03:00
Danila Poyarkov 6cc8b9d07c feat(app): extend variable binding to more inspector fields
Add VariableScrubInput — reusable wrapper that combines ScrubInput
with variable binding picker and detach button. Wire it into:

- Corner radius (uniform + 4 independent corners)
- Opacity
- Auto-layout gap (primary + cross axis)
- Padding (horizontal/vertical + 4 individual sides)
- Font size

All fields get bind, detach, create, search, and detach-on-edit
behavior automatically through the shared component.
2026-05-04 13:43:33 +03:00
Danila Poyarkov ab1ba02c94 feat(app): extend variable binding to more inspector fields
Add VariableScrubInput — reusable wrapper that combines ScrubInput
with variable binding picker and detach button. Wire it into:

- Corner radius (uniform + 4 independent corners)
- Opacity
- Auto-layout gap (primary + cross axis)
- Padding (horizontal/vertical + 4 individual sides)
- Font size

All fields get bind, detach, create, search, and detach-on-edit
behavior automatically through the shared component.
2026-05-04 12:47:38 +03:00
Danila Poyarkov 93160b1bfb feat(ai): add DeepSeek as first-class provider
Use @ai-sdk/deepseek instead of openai-compatible, which properly
handles reasoning_content in conversation history. DeepSeek V4
requires reasoning_content on every assistant turn — the dedicated
provider backfills it automatically.

Adds DeepSeek V3 and R1 models to the provider list.
2026-05-04 11:48:45 +03:00
Danila Poyarkov ac15fb143b feat(io): add PDF export
Vector PDF output via jsPDF + svg2pdf.js (lazy-loaded, 124KB gzipped).
Reuses existing SVG export pipeline — text stays selectable, paths
stay sharp at any zoom.

- packages/core/src/io/formats/pdf/ — SVG→PDF conversion module
- export_pdf tool for MCP/AI
- PDF format in IO registry and app export panel
- CLI: bun open-pencil export file.fig --format pdf
2026-05-04 00:18:54 +03:00
Danila Poyarkov a2050a9860 feat(tools): add import_svg tool
Parse raw SVG markup and create vector nodes on the canvas.
Supports path, circle, ellipse, rect, line, polygon, polyline
with fill, stroke, stroke-width, viewBox sizing, and currentColor.
2026-05-03 23:59:21 +03:00
Danila Poyarkov b9f3fc418e docs: update unreleased changelog 2026-05-03 23:22:04 +03:00
Danila Poyarkov 9a038ff53f build: bump AI SDK dependencies
- ai 6.0.116 → 6.0.174
- @ai-sdk/openai 3.0.37 → 3.0.58
- @ai-sdk/anthropic 3.0.58 → 3.0.74
- @ai-sdk/google 3.0.43 → 3.0.67
- @ai-sdk/vue 3.0.105 → 3.0.174
- @ai-sdk/valibot 2.0.17 → 2.0.27
- @openrouter/ai-sdk-provider 2.2.3 → 2.9.0
2026-05-03 23:13:39 +03:00
Danila Poyarkov 1deb787778 Merge PR #238: fix(vector): render dashPattern strokes correctly on closed crescents 2026-05-03 22:55:16 +03:00
Danila Poyarkov 36f2990e78 refactor(vector): address PR #238 review issues
- Extract centerline algorithm to packages/core/src/vector/centerline.ts
  to stay under max-lines (index.ts 441 lines, centerline.ts 289 lines)
- Fix PathEffect.MakeDash leak: store reference and .delete() after use
- Add aria-label to dash toggle button with i18n (strokeDash)
- Read dash/gap values directly from dashPattern array in template
  instead of calling dashState() 4 times
- Add unit tests for fitCircleArc and isClosedThinCrescent
  (collinear, non-circular, annular wedge, rectangle, hexagon, open path)
2026-05-03 22:49:12 +03:00
TKman 6651d88b87 fix(vector): render dashPattern strokes correctly on closed crescents
Vector nodes with stroke.dashPattern were rendering as solid lines, and
even when the dash was applied through brute outline-stroke conversion,
closed crescent shapes (e.g. annular wedges) showed two parallel dashed
arcs instead of a single arc along the centerline.

Root cause:

- drawVectorPathStrokes converted stroke to a fill outline before drawing,
  leaving no place for PathEffect.MakeDash to apply.
- A closed crescent is a single closed path traced around both the outer
  and inner arcs, so dashing the path produces two visible arcs.

Fix:

- packages/core/src/canvas/scene.ts: in drawVectorPathStrokes, when the
  stroke has a dashPattern, skip the outline conversion and draw with
  strokePaint + PathEffect.MakeDash directly. In renderShapeUncached,
  dashed VECTOR nodes with a vectorNetwork now route through a new
  centerline path instead of the precomputed strokeGeometry.
- packages/core/src/vector/index.ts: new vectorNetworkToCenterlinePath.
  For closed thin crescents (cycle of even length where pairwise opposite
  vertex distance is small relative to perimeter and consistent), detect
  the two cap segments via vertex direction-change angles, split the
  cycle into outer/inner subchains, pair vertices by angle, and emit a
  smooth Path.addArc when the midpoints fit a circle (fitCircleArc with
  3-point construction + radius tolerance), falling back to a midpoint
  polyline otherwise. Open paths use the existing chain walk.

JSX prop wiring so users can author dashed Vectors:

- packages/core/src/design-jsx/tree.ts: add strokeDash?: number[] | boolean.
- packages/core/src/design-jsx/renderer.ts: applyStrokeOverrides reads
  strokeDash and writes Stroke.dashPattern; true expands to [w*2, w*2].
- packages/core/src/io/formats/jsx/export.ts: solidStroke serializes
  dashPattern back to strokeDash on JSX export.

Editor UI:

- src/components/properties/StrokeSection.vue: dash toggle button plus
  ScrubInputs for dash and gap length, writing strokes[0].dashPattern.

bun run check passes. Pre-existing test failures (drop shadow / auto
layout) are unrelated to this change and reproduce on a clean
upstream/master.
2026-05-03 22:44:42 +03:00
Danila Poyarkov b85805e9c7 chore: format sources with oxfmt 2026-05-03 21:03:40 +03:00
Danila Poyarkov 7199774177 feat(app): bind size fields to variables 2026-05-01 17:20:45 +03:00
Danila Poyarkov c7db8c6004 feat(app): add color variable binding picker 2026-05-01 17:11:50 +03:00
Danila Poyarkov b248e0c53a feat(tauri): add signed updater 2026-05-01 13:00:50 +03:00
Danila Poyarkov 2b3898aace docs: update unreleased changelog 2026-05-01 11:41:53 +03:00
Danila Poyarkov 438a2bf901 fix(app): clarify layout spacing icons 2026-05-01 11:39:28 +03:00
Danila Poyarkov 9a1e67bbe3 fix(app): avoid duplicate tabs on hot reload 2026-05-01 11:12:19 +03:00
Danila Poyarkov 796815b65f feat(app): refine auto layout padding controls 2026-05-01 11:04:43 +03:00