`FigmaClipboardNode::to_node_kind()` maps the 8 most-common Figma
type strings to the closest `crate::document::NodeKind`:
RECTANGLE → Rect
ELLIPSE → Ellipse
LINE → Line
POLYGON / REGULAR_POLY → Polygon
VECTOR → Path
TEXT → Text
FRAME / SECTION → Frame
GROUP → Group
<unknown> → Other(<kind string>)
Unknown kinds round-trip via `NodeKind::Other(...)` so the layer
panel still renders something honest instead of dropping the node.
Future commits add per-kind specialised geometry mappers (fills /
strokes / vectors / text / layout) ported from `pen-figma`.
Tests (2 new):
- 10-case table of every supported Figma kind → expected NodeKind
- Unknown `BOOLEAN_OPERATION` → `Other("BOOLEAN_OPERATION")` round-trip
#9 Figma now ~50% — file kind detection + clipboard JSON walker +
per-child kind + name + NodeKind mapping. Remaining: per-kind
geometry/style mapper functions (the `pen-figma` figma-fill-mapper /
stroke-mapper / text-mapper / vector-decoder / etc port).
Tests total: 245 shell-core (+2). Wasm32 build clean.
|
||
|---|---|---|
| .. | ||
| openpencil-app | ||
| openpencil-desktop | ||
| openpencil-shell-core | ||
| openpencil-shell-native | ||
| openpencil-shell-web | ||
| pen-codegen | ||
| pen-core | ||
| pen-engine | ||
| pen-figma | ||
| pen-types | ||
| wasm-libc-shim | ||
| CLAUDE.md | ||