Commit graph

1393 commits

Author SHA1 Message Date
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
Danila Poyarkov 7b0ae8fa2a fix(app): add size limit dropdowns 2026-05-01 10:50:25 +03:00
Danila Poyarkov 4301a92a5e fix(app): anchor layout dropdowns to fields 2026-05-01 10:43:06 +03:00
Danila Poyarkov 399b880e4f fix(app): align auto layout controls 2026-05-01 10:38:02 +03:00
Danila Poyarkov 84124721ff feat(app): expose wrap cross axis gap 2026-04-30 19:27:01 +03:00
Danila Poyarkov 806c512a86 feat(app): add auto gap control 2026-04-30 19:25:50 +03:00
Danila Poyarkov 2a51a21598 feat(app): expose auto layout min max sizing 2026-04-30 19:22:54 +03:00
Danila Poyarkov 17e2aa6cb5 perf(canvas): avoid scene recording during live edits 2026-04-30 18:29:51 +03:00
Danila Poyarkov 9bc9b5d5b0 fix(canvas): theme ruler colors 2026-04-30 17:50:20 +03:00
Danila Poyarkov 81a35cc9be fix(app): theme remaining ui color tokens 2026-04-30 16:26:17 +03:00
Danila Poyarkov a54c94c6a8 fix(app): use theme warning colors 2026-04-30 16:18:43 +03:00
Danila Poyarkov 350f5ba73c fix(app): improve safari banner contrast 2026-04-30 16:14:56 +03:00
Danila Poyarkov 16be275f65 fix(app): render non-command menu items 2026-04-30 16:11:24 +03:00
Danila Poyarkov f7b3f2de75 build(tauri): generate native menu before builds 2026-04-30 16:07:14 +03:00
Danila Poyarkov 28d67818e2 refactor(app): share browser and tauri menu model 2026-04-30 16:01:47 +03:00
Danila Poyarkov 0d16354c89 feat(app): add light theme setting 2026-04-30 15:52:59 +03:00
Danila Poyarkov 7ba678117f fix(vue): restore wheel zoom scaling 2026-04-30 15:40:01 +03:00
Danila Poyarkov 84ba0e584b fix(vue): normalize chrome zoom speed 2026-04-30 15:33:59 +03:00