Danila Poyarkov
8d7dd0a36b
Add random.ts helpers, replace all raw crypto.getRandomValues calls
...
New module packages/core/src/random.ts with randomHex, randomInt,
randomIndex — centralizes all crypto-based randomness.
Replaces:
- Date.now() IDs in VariablesDialog (not unique, not random)
- Hand-rolled hex token in automation/server.ts
- Inline crypto.getRandomValues in clipboard.ts, use-collab.ts
Also adds --color-component Tailwind theme color (#9747ff) and
replaces all 6 hardcoded occurrences across DesignPanel, LayerTree,
NodeContextMenuContent, and menu.ts.
2026-03-16 14:13:36 +03:00
Danila Poyarkov
9890b7c1a1
Enable Tailwind CSS class sorting in oxfmt
...
Sort classes using the same algorithm as prettier-plugin-tailwindcss,
configured for Tailwind v4 (reads src/app.css for theme).
Also sorts class strings inside twMerge() and tv() calls.
Eliminates 2 nested ternaries that conflicted with the formatter
(oxfmt strips parentheses that the lint rule requires).
2026-03-09 15:46:20 +03:00
Danila Poyarkov
17faf4df93
Add strict lint rules to catch AI-generated slop at compile time
...
New rules:
- typescript/no-unnecessary-condition: catches redundant ?., ??, and
always-true/false branches (22 violations fixed)
- typescript/consistent-return: mixed return/no-return in functions
- typescript/no-unnecessary-type-parameters: unused generic params
- typescript/prefer-for-of: use for-of instead of indexed loops
- unicorn/no-nested-ternary: forbid nested ternaries
- unicorn/consistent-existence-index-check: !== -1 over >= 0
- no-empty-function: no empty function bodies
Fixed all 32 violations: removed unnecessary optional chaining on
non-nullish values, tightened Record types to Partial<Record> where
index access can return undefined, replaced nested ternary with
lookup table, added exhaustive default cases.
2026-03-09 09:16:07 +03:00
Danila Poyarkov
f96fffb83f
Harden oxlint: consistent-type-imports, no-duplicates, no-misused-promises, prefer-optional-chain
...
Add 6 new lint rules: typescript/consistent-type-imports,
typescript/no-unnecessary-type-assertion, typescript/prefer-optional-chain,
typescript/no-misused-promises, import/no-duplicates, import/no-mutable-exports.
Ban @/types shim via no-restricted-imports.
Fix all violations: replace inline import() annotations with proper
type imports, merge duplicate module imports, add void to fire-and-forget
promises, convert && chains to optional chaining.
2026-03-09 09:05:04 +03:00
Anton A S
83c72b94a0
Add E2E test coverage for canvas, toolbar, panels, properties, auto-layout, variables, export
2026-03-07 22:11:25 +03:00
Danila Poyarkov
97baef474d
Merge branch 'reka-vueuse-refactor'
2026-03-07 14:46:40 +03:00
Danila Poyarkov
9d73297040
Delete re-export shims, import from @open-pencil/core directly
...
Remove 14 src/engine/ shims and entire src/kiwi/ directory.
Only src/engine/fonts.ts remains (has real Tauri font logic).
Replace isTauri() with IS_TAURI constant.
2026-03-06 21:42:56 +03:00
Danila Poyarkov
a334a7f63c
Refactor UI to use Reka & VueUse primitives
2026-03-06 18:28:40 +03:00
Anton Soldatov
3ac016b806
Add data-test-id attributes to all Vue components ( #41 )
2026-03-04 17:18:26 +03:00
Danila Poyarkov
20544366c7
Add undo/redo for all variable operations
...
Push undo entries for: create/delete variable, create collection,
rename variable, rename collection, change color/value.
2026-03-01 02:38:31 +03:00
Danila Poyarkov
6d407820eb
Fix variables table not updating on create/delete
...
The variables computed was missing the sceneVersion dependency,
so it never re-evaluated when addVariable bumped sceneVersion.
2026-03-01 02:33:42 +03:00
Danila Poyarkov
f9d5c43586
Fix missing type icons in variables table
...
Import lucide icon components explicitly for TanStack Table h() cells.
The icon-[lucide--*] CSS class syntax doesn't work with unplugin-icons.
2026-03-01 02:21:40 +03:00
Danila Poyarkov
2695cffe6a
Extract ColorInput component, fix alpha slider checkerboard
...
New ColorInput component (swatch + hex, optional editable mode)
replaces duplicated ColorPicker + hex input pattern in:
- PageSection, StrokeSection, EffectsSection
- VariablesDialog (color variable cells use ColorInput with picker)
Fix ColorPicker alpha slider: add checkerboard background behind
transparent-to-color gradient, matching FillPicker's implementation.
2026-03-01 02:18:23 +03:00
Danila Poyarkov
52a31cff2f
Use TanStack Table for variables dialog with resizable columns
...
Replace hand-rolled flex layout with @tanstack/vue-table:
- Proper <table> with column resizing (drag header borders)
- Sticky header row
- FlexRender for cell content (reka-ui Editable inline editing)
- Use culori via parseColor instead of manual hex parsing
2026-03-01 02:12:19 +03:00
Danila Poyarkov
e3f8ff623e
Redesign variables dialog to match Figma's table layout
...
- Column per mode (Name | Mode 1 | Mode 2 | ...)
- Color swatch inside value cells, not next to name
- Search bar in top-right header area
- Single '+ Create variable' button at bottom
- Wider dialog (800px) for multi-mode tables
2026-03-01 02:08:13 +03:00
Danila Poyarkov
04b0efd020
Double-click to rename collection tabs in variables dialog
2026-03-01 02:03:24 +03:00
Danila Poyarkov
ff48c03d5a
Fix addCollection not triggering reactivity
2026-03-01 01:59:01 +03:00
Danila Poyarkov
5c4c6d7289
Move variables UI to dialog opened from page properties
...
Match Figma's pattern: Variables section in page-level properties
panel with settings icon that opens a full dialog (reka-ui Dialog +
Tabs + Editable). Remove sidebar panel approach.
2026-03-01 01:54:57 +03:00