fix(pages): inherit the current page background when adding pages (M1)

page.add gave every added page the interface theme's colour. Figma's
documentation says added pages inherit the current page's background;
the theme only decides a new file's page. Read the active page's colour
before creating the new page, in the command, so the app, CLI, control
channel and MCP agree.

Refs #295
This commit is contained in:
tylerjenningsw
2026-10-14 10:58:17 -04:00
parent 833f0d2c27
commit a3a273cfd3
7 changed files with 78 additions and 16 deletions
+3 -3
View File
@@ -301,9 +301,9 @@ on; `key` resolves keys the way the canvas does. Commands behind keys:
given, are or are in; default the selection) out of the library the file publishes, or let them
back in (`on: false`; without `on` it toggles). The sign of it is the name: hiding puts a `.`
before it, showing takes the leading `.` and `_` away. Returns `{ids, hidden}`; one undo step.
- New files and pages: `file.new` and `page.add` give a page the colour `#F5F5F5`. Only the app
with its dark theme showing makes them `#1E1E1E`; headless sessions (the CLI, this server) have
no theme. Text made with `text.create` or `node.create` is black whatever the page here; in the
- New files and pages: `file.new` gives its page the colour `#F5F5F5`. Only the app with its dark
theme showing makes it `#1E1E1E`; headless sessions (the CLI, this server) have no theme.
`page.add` gives the new page the current page's colour, wherever it runs. Text made with `text.create` or `node.create` is black whatever the page here; in the
app (the control channel, `--attach`) it is white on a dark page unless `props` name a `fill`,
as the Text tool (`pointer` with `tool.text`) makes it everywhere.
- `transform.rotationOrigin {on?}` (`Alt+R`): show or hide the selection's rotation origin handle