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.
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.
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.
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.