Commit Graph
5 Commits
Author SHA1 Message Date
dotCooCoo 269024e088 Merge main into feat/scripts-api-d4c-threads-stories
Main gave every class member a reflect type and page item handles a revert
count. The type classes now declare a type for each member, their members
that are not available yet use the unavailable form, TextFrame takes main's
contentVariable, and a text range looks its frame up at the document's
current revert count.

Review fixes:
- A text range length that ends inside a surrogate pair moves its end out
  to the end of the character.
- textFrames.removeAll() refuses type on a locked artboard, as
  pageItems.removeAll() does.
- Joining a story's text across its frames counts toward the run's data
  limit.
- A test shows a script that catches a refused link goes on with the links
  unchanged.
2026-11-28 03:35:11 -08:00
dotCooCoo 9fb14228c1 Scripts: the cross-document thread test reads app.documents active document first
app.documents now lists the active document first, so after file.new the new document is
documents[0] and the document with the three frames is documents[1]. The test picks each
document by that order.
2026-11-27 22:54:37 -08:00
dotCooCoo 46c3e4bcff Scripts: text and thread tests read frames topmost first, as pageItems lists them 2026-11-26 00:43:17 -08:00
dotCooCoo a5690d2d35 Scripts: stories of one thread share their text index, and a deleted story's missing members say Stale story
Stories read from different frames of one thread share one index of the
story's text while the document is unchanged, instead of each keeping its
own copy. A frame listed in two threads shares only with a story whose
frames match. Story.lines, insertionPoints, textRanges and textSelection
check the story first, so a story whose frame was deleted throws Stale
story.

The cross-document baseFrame test passes a rectangle of the other document
and checks the error and that the rectangle stays a path. docs/mcp.md no
longer says baseFrame and postFix throw, the text-frame entry in
docs/target-app-parity.md no longer lists stories and threading as missing,
and the M13 row in docs/roadmap.md lists text frames and stories.
2026-11-21 22:08:05 -08:00
dotCooCoo d82fe4e8d9 Scripts: nextFrame, previousFrame, story and document.stories for threaded type
Text frames get nextFrame, previousFrame and story, and documents get stories, a
Stories collection with one story for each thread and each type object in no
thread. Assigning nextFrame or previousFrame links the last frame of one story
to the first frame of another, and null breaks the link with each frame keeping
its text; loops, links to the frame itself or into the middle of a story, point
type, frames of another document and hidden or locked frames are refused with
nothing changed. A story of two or more frames reads and writes its text across
its frames in UTF-16 units, and areaText and pathText take baseFrame and
postFix to thread the new frame to an existing one.

The new command text.thread.setNeighbor {id, side, neighbor} links or breaks
by id without a selection, for MCP, the CLI and vc.run.
2026-11-21 18:54:45 -08:00