Commit Graph
18 Commits
Author SHA1 Message Date
DolanandClaude Opus 5.5 e7b568f4e6 feat(shapes): custom shapes with several paths, holes, text areas and connection points (#3539)
- `paths` draws a custom shape from several paths, each filled with the
  shape's fill, not at all, or lighter or darker, and with or without its line
- A closed part of a path inside another is a hole, whichever way round it
  is drawn: parts are turned round so both fill rules cut the same holes
- `textArea` sets where a custom shape's text goes, and "fitText" fits it
- `connectionPoints` gives a custom shape its own connection points
- Connection sites and text areas are guides that keep their share of the
  shape when it is resized, as PowerPoint writes freeforms
- Demo 120, with a reference render, and docs in shapes.md


Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:10:17 +01:00
Dolan 811e5d9b97 feat: write a theme part, with theme fonts for text and theme colours for shapes (#3536) 2026-09-24 20:23:52 +01:00
Dolan 91cd6398e2 feat(shapes): text in document styles, swimlanes, routing, descriptions, percentages and text flows (#3535) 2026-09-24 18:46:00 +01:00
Dolan 494ed78138 feat: shapes in docx/shapes and watermarks in docx/watermarks (#3534) 2026-09-24 15:38:43 +01:00
Dolan bf7eb857df feat(shapes): automatic layout, text sizing, connector polish and visual regression tests (#3533) 2026-09-24 13:18:04 +01:00
Dolan 859ea7ec7b feat(shapes): effects, pattern and picture fills, text layout, custom shapes and richer diagrams (#3523) 2026-09-24 11:52:04 +01:00
DolanandClaude Opus 5.5 ee37e5b38c feat(shapes): connectors and drawing canvases (#3522)
Shapes in a ShapeGroupRun or the new ShapeCanvasRun can have an `id`, and a
child with `type: "connector"` joins two of them:

    { type: "connector", from: "start", to: { id: "step", side: "top" }, route: "elbow" }

The connector is drawn from one shape to the other, so it needs no size or
position. It attaches at the shapes' connection sites (a:stCxn/a:endCxn),
choosing the facing sides unless a side is given, and routes as Word does:
a straight line, or elbow and curved connectors that leave and arrive at right
angles and loop around shapes when they have to.

Word only keeps connectors attached when shapes move on a drawing canvas, so
ShapeCanvasRun writes a wpc:wpc canvas with an optional background and outline.

Connection sites come from the preset shape definitions of ECMA-376:
scripts/generate-preset-shape-geometry.ts extracts each shape's sites and the
guides they depend on, and a small evaluator calculates them for a shape's size
and adjustments. A test also checks the adjustments table against the
definitions.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 09:36:03 +01:00
Dolan Miu 09ab91eeef Fix tests and build
Remove unused code and dependencies
2023-06-08 13:30:31 +01:00
Dolan Miu b600fd9324 Add fix to allow for different types of slash to be supported
Maybe updating glob broke it for Windows
2023-03-18 23:16:41 +00:00
Dolan Miu 982d923553 Improve import alias
@file/ and @export/ instead of file/ and export/ etc
2022-06-26 23:26:42 +01:00
Dolan Miu d1837651f8 Move schemas to better location 2021-09-30 00:36:28 +01:00
Dolan Miu d881646e73 Try using GitHub Action validator 2021-09-30 00:19:03 +01:00
Dolan Miu 97d1025a0f Add schema validator 2021-09-29 23:47:33 +01:00
Dolan Miu 536204e5ef Add back types absolute fixer 2021-09-28 19:56:29 +01:00
Dolan 50209bb435 Add Error for e2e test 2019-01-15 00:34:40 +00:00
Dolan b37d2c141d Add new e2e command 2019-01-15 00:23:01 +00:00
Dolan Miu 2ad04671fa removed unused file 2016-07-18 19:23:35 +01:00
Dolan Miu 7a78dacf8c moved to es6 module system 2016-03-28 00:53:24 +01:00