@paged-media/canvas-wasm 0.51.0 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/paged_canvas_wasm.d.ts +426 -39
- package/paged_canvas_wasm.js +11 -11
- package/paged_canvas_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/paged_canvas_wasm.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export type SceneBlendMode = "multiply" | "screen" | "overlay" | "darken" | "lig
|
|
|
43
43
|
* the worker rejects each variant with `WorkerError::NotImplemented`.
|
|
44
44
|
* Phase 3 lights these up incrementally.
|
|
45
45
|
*/
|
|
46
|
-
export type Mutation = { op: "insertText"; args: { storyId: string; offset: number; text: string; cell?: TextCellAddr | null } } | { op: "deleteRange"; args: { storyId: string; start: number; end: number; cell?: TextCellAddr | null } } | { op: "applyStyle"; args: { storyId: string; start: number; end: number; style: string; scope: StyleScope } } | { op: "insertField"; args: { storyId: string; offset: number; field: FieldKind } } | { op: "setFieldValue"; args: { storyId: string; offset: number; value?: string | null } } | { op: "placeImage"; args: { elementId: string; uri: string; fit?: string | null } } | { op: "replaceImageBytes"; args: { elementId: string; bytes?: number[] | null } } | { op: "moveFrame"; args: { frameId: string; transform: [number, number, number, number, number, number] } } | { op: "resizeFrame"; args: { frameId: string; bounds: [number, number, number, number] } } | { op: "linkFrames"; args: { from: string; to: string } } | { op: "unlinkFrames"; args: { frame: string } } | { op: "insertPage"; args: { afterPageId: PageId | null; masterId: string | null } } | { op: "deletePage"; args: { pageId: PageId } } | { op: "resizePage"; args: { pageId: PageId; bounds: [number, number, number, number] } } | { op: "insertFrame"; args: { pageId: PageId; bounds: [number, number, number, number] } } | { op: "insertTextFrame"; args: { pageId: PageId; bounds: [number, number, number, number] } } | { op: "deleteFrame"; args: { frameId: string } } | { op: "insertLine"; args: { pageId: PageId; start: [number, number]; end: [number, number] } } | { op: "insertPath"; args: { pageId: PageId; anchors: PathAnchorSpec[]; open: boolean; smooth?: boolean } } | { op: "setDocumentDefaults"; args: { fillColor: string | null; strokeColor: string | null; strokeWeight: number | null } } | { op: "setColorSettings"; args: { cmykProfileName: string | null; rgbPolicy: string | null; intent: string | null; bpc: boolean | null } } | { op: "setProofSetup"; args: { profileName: string | null; simulatePaperWhite?: boolean; intent: string | null } } | { op: "importSwatchLibrary"; args: { bytes: number[]; groupName?: string | null } } | { op: "setInkSetting"; args: { spotId: string; convertToProcess?: boolean; aliasTo?: string | null } } | { op: "setUseStandardLabForSpots"; args: { enabled: boolean } } | { op: "pathPointInsert"; args: { elementId: ElementId; index: number; anchor: PathAnchorSpec; prevSubpathStarts?: number[] | null } } | { op: "pathPointRemove"; args: { elementId: ElementId; index: number } } | { op: "pathOpenAt"; args: { elementId: ElementId; index: number } } | { op: "outlineStroke"; args: { elementId: ElementId; width: number; cap: string; join: string; miterLimit: number } } | { op: "offsetPath"; args: { elementId: ElementId; delta: number; join: string; miterLimit: number } } | { op: "simplifyPath"; args: { elementId: ElementId; tolerance: number } } | { op: "createGroup"; args: { memberIds: ElementId[] } } | { op: "dissolveGroup"; args: { groupId: string } } | { op: "setGroupTransform"; args: { groupId: string; transform?: [number, number, number, number, number, number] | null } } | { op: "setPluginMetadata"; args: { elementId: ElementId; key: string; value?: string | null; caller?: string | null } } | { op: "pathPointCurveType"; args: { elementId: ElementId; index: number; smooth: boolean } } | { op: "pathPointSet"; args: { elementId: ElementId; index: number; role: PathPointRole; position: [number, number] } } | { op: "batch"; args: { ops: Mutation[] } } | { op: "layerSetVisible"; args: { layerId: string; visible: boolean } } | { op: "layerSetLocked"; args: { layerId: string; locked: boolean } } | { op: "layerSetPrintable"; args: { layerId: string; printable: boolean } } | { op: "layerSetName"; args: { layerId: string; name: string } } | { op: "layerMove"; args: { layerId: string; newIndex: number } } | { op: "layerInsert"; args: { position: number; name: string } } | { op: "layerRemove"; args: { layerId: string } } | { op: "setElementProperty"; args: { elementId: ElementId; path: PropertyPath; value: Value } } | { op: "pathfinderBoolean"; args: { kept: ElementId; others: ElementId[]; kind: PathfinderKind } } | { op: "createSwatch"; args: { spec: SwatchSpec } } | { op: "editSwatch"; args: { swatchId: string; spec: SwatchSpec } } | { op: "deleteSwatch"; args: { swatchId: string } } | { op: "createGradient"; args: { spec: GradientSpec } } | { op: "editGradient"; args: { gradientId: string; spec: GradientSpec } } | { op: "deleteGradient"; args: { gradientId: string } } | { op: "createColorGroup"; args: { spec: ColorGroupSpec } } | { op: "editColorGroup"; args: { groupId: string; spec: ColorGroupSpec } } | { op: "deleteColorGroup"; args: { groupId: string } } | { op: "createNumberingList"; args: { spec: NumberingListSpec } } | { op: "editNumberingList"; args: { listId: string; spec: NumberingListSpec } } | { op: "deleteNumberingList"; args: { listId: string } } | { op: "createParagraphStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameParagraphStyle"; args: { styleId: string; name: string } } | { op: "deleteParagraphStyle"; args: { styleId: string } } | { op: "createCharacterStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameCharacterStyle"; args: { styleId: string; name: string } } | { op: "deleteCharacterStyle"; args: { styleId: string } } | { op: "createObjectStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameObjectStyle"; args: { styleId: string; name: string } } | { op: "deleteObjectStyle"; args: { styleId: string } } | { op: "createCellStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameCellStyle"; args: { styleId: string; name: string } } | { op: "deleteCellStyle"; args: { styleId: string } } | { op: "createTableStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameTableStyle"; args: { styleId: string; name: string } } | { op: "deleteTableStyle"; args: { styleId: string } } | { op: "setStyleProperty"; args: { collection: StyleCollection; styleId: string; path: PropertyPath; value: Value } } | { op: "insertOval"; args: { pageId: PageId; bounds: [number, number, number, number] } } | { op: "insertGuide"; args: { spreadId: string; orientation: GuideOrientationSpec; position: number; pageIndex?: number } } | { op: "moveGuide"; args: { guideId: string; position: number } } | { op: "deleteGuide"; args: { guideId: string } } | { op: "setConditionVisible"; args: { condition: string; visible: boolean } } | { op: "activateConditionSet"; args: { set: string } } | { op: "applyMasterToPage"; args: { page: PageId; master?: string | null } } | { op: "duplicatePage"; args: { page: PageId } } | { op: "insertSection"; args: { atPage: PageId; prefix?: string | null; numberingStyle?: string | null; startAt?: number | null } } | { op: "editSection"; args: { sectionId: string; prefix?: string | null | null; numberingStyle?: string | null; startAt?: number | null | null } } | { op: "deleteSection"; args: { sectionId: string } } | { op: "setRowHeight"; args: { storyId: string; tableId: string; row: number; height?: number | null } } | { op: "setColumnWidth"; args: { storyId: string; tableId: string; col: number; width?: number | null } } | { op: "insertTableRow"; args: { storyId: string; tableId: string; at: number } } | { op: "deleteTableRow"; args: { storyId: string; tableId: string; at: number } } | { op: "insertTableColumn"; args: { storyId: string; tableId: string; at: number } } | { op: "deleteTableColumn"; args: { storyId: string; tableId: string; at: number } } | { op: "insertHeaderRow"; args: { storyId: string; tableId: string } } | { op: "removeHeaderRow"; args: { storyId: string; tableId: string } } | { op: "insertFooterRow"; args: { storyId: string; tableId: string } } | { op: "removeFooterRow"; args: { storyId: string; tableId: string } } | { op: "setCellSpan"; args: { storyId: string; tableId: string; row: number; col: number; rowSpan: number; columnSpan: number } } | { op: "insertTable"; args: { storyId: string; rows: number; cols: number; headerRows?: number; footerRows?: number; columnWidths?: number[]; rowHeights?: number[] } };
|
|
46
|
+
export type Mutation = { op: "insertText"; args: { storyId: string; offset: number; text: string; cell?: TextCellAddr | null } } | { op: "deleteRange"; args: { storyId: string; start: number; end: number; cell?: TextCellAddr | null } } | { op: "applyStyle"; args: { storyId: string; start: number; end: number; style: string; scope: StyleScope; cell?: TextCellAddr | null } } | { op: "insertField"; args: { storyId: string; offset: number; field: FieldKind } } | { op: "insertAnchoredFrame"; args: { storyId: string; offset: number; width: number; height: number; imageUri?: string | null } } | { op: "insertHyperlink"; args: { storyId: string; start: number; end: number; url: string } } | { op: "setFieldValue"; args: { storyId: string; offset: number; value?: string | null } } | { op: "placeImage"; args: { elementId: string; uri: string; fit?: string | null } } | { op: "replaceImageBytes"; args: { elementId: string; bytes?: number[] | null } } | { op: "moveFrame"; args: { frameId: string; transform: [number, number, number, number, number, number] } } | { op: "resizeFrame"; args: { frameId: string; bounds: [number, number, number, number] } } | { op: "linkFrames"; args: { from: string; to: string } } | { op: "unlinkFrames"; args: { frame: string } } | { op: "insertPage"; args: { afterPageId: PageId | null; masterId: string | null } } | { op: "deletePage"; args: { pageId: PageId } } | { op: "resizePage"; args: { pageId: PageId; bounds: [number, number, number, number] } } | { op: "insertFrame"; args: { pageId: PageId; bounds: [number, number, number, number] } } | { op: "insertTextFrame"; args: { pageId: PageId; bounds: [number, number, number, number] } } | { op: "deleteFrame"; args: { frameId: string } } | { op: "insertLine"; args: { pageId: PageId; start: [number, number]; end: [number, number] } } | { op: "insertPath"; args: { pageId: PageId; anchors: PathAnchorSpec[]; open: boolean; smooth?: boolean } } | { op: "setDocumentDefaults"; args: { fillColor: string | null; strokeColor: string | null; strokeWeight: number | null } } | { op: "setColorSettings"; args: { cmykProfileName: string | null; rgbPolicy: string | null; intent: string | null; bpc: boolean | null } } | { op: "setProofSetup"; args: { profileName: string | null; simulatePaperWhite?: boolean; intent: string | null } } | { op: "importSwatchLibrary"; args: { bytes: number[]; groupName?: string | null } } | { op: "setInkSetting"; args: { spotId: string; convertToProcess?: boolean; aliasTo?: string | null } } | { op: "setUseStandardLabForSpots"; args: { enabled: boolean } } | { op: "pathPointInsert"; args: { elementId: ElementId; index: number; anchor: PathAnchorSpec; prevSubpathStarts?: number[] | null } } | { op: "pathPointRemove"; args: { elementId: ElementId; index: number } } | { op: "pathOpenAt"; args: { elementId: ElementId; index: number } } | { op: "outlineStroke"; args: { elementId: ElementId; width: number; cap: string; join: string; miterLimit: number } } | { op: "offsetPath"; args: { elementId: ElementId; delta: number; join: string; miterLimit: number } } | { op: "simplifyPath"; args: { elementId: ElementId; tolerance: number } } | { op: "closePath"; args: { elementId: ElementId; subpath?: number | null } } | { op: "joinPaths"; args: { elementId: ElementId; otherId: ElementId } } | { op: "pasteInto"; args: { containerId: ElementId; childId: ElementId } } | { op: "releaseFrom"; args: { childId: ElementId } } | { op: "reorderElement"; args: { elementId: ElementId; to: ZOrderTarget } } | { op: "applyOpacityMask"; args: { targetId: ElementId; maskId: ElementId; maskType?: string | null; invert?: boolean | null } } | { op: "releaseOpacityMask"; args: { targetId: ElementId } } | { op: "attachTextToPath"; args: { elementId: ElementId; storyId: string; pathTypeAlignment?: string | null; flipPathEffect?: string | null; startBracket?: number | null; endBracket?: number | null } } | { op: "detachTextFromPath"; args: { elementId: ElementId } } | { op: "createGroup"; args: { memberIds: ElementId[] } } | { op: "dissolveGroup"; args: { groupId: string } } | { op: "setGroupTransform"; args: { groupId: string; transform?: [number, number, number, number, number, number] | null } } | { op: "setPluginMetadata"; args: { elementId: ElementId; key: string; value?: string | null; caller?: string | null } } | { op: "pathPointCurveType"; args: { elementId: ElementId; index: number; smooth: boolean } } | { op: "pathPointSet"; args: { elementId: ElementId; index: number; role: PathPointRole; position: [number, number] } } | { op: "batch"; args: { ops: Mutation[] } } | { op: "bindCreated"; args: { handle: string } } | { op: "layerSetVisible"; args: { layerId: string; visible: boolean } } | { op: "layerSetLocked"; args: { layerId: string; locked: boolean } } | { op: "layerSetPrintable"; args: { layerId: string; printable: boolean } } | { op: "layerSetName"; args: { layerId: string; name: string } } | { op: "layerMove"; args: { layerId: string; newIndex: number } } | { op: "layerInsert"; args: { position: number; name: string } } | { op: "layerRemove"; args: { layerId: string } } | { op: "setElementProperty"; args: { elementId: ElementId; path: PropertyPath; value: Value } } | { op: "pathfinderBoolean"; args: { kept: ElementId; others: ElementId[]; kind: PathfinderKind } } | { op: "pathfinderDivide"; args: { elementIds: ElementId[] } } | { op: "pathfinderTrim"; args: { elementIds: ElementId[] } } | { op: "pathfinderMerge"; args: { elementIds: ElementId[] } } | { op: "pathfinderCrop"; args: { elementIds: ElementId[] } } | { op: "pathfinderOutline"; args: { elementIds: ElementId[] } } | { op: "pathfinderMinusBack"; args: { elementIds: ElementId[] } } | { op: "pathfinderFaces"; args: { elementIds: ElementId[]; faces: string[]; mode: FaceSelectMode } } | { op: "createSwatch"; args: { spec: SwatchSpec } } | { op: "editSwatch"; args: { swatchId: string; spec: SwatchSpec } } | { op: "deleteSwatch"; args: { swatchId: string } } | { op: "createGradient"; args: { spec: GradientSpec } } | { op: "editGradient"; args: { gradientId: string; spec: GradientSpec } } | { op: "deleteGradient"; args: { gradientId: string } } | { op: "createColorGroup"; args: { spec: ColorGroupSpec } } | { op: "editColorGroup"; args: { groupId: string; spec: ColorGroupSpec } } | { op: "deleteColorGroup"; args: { groupId: string } } | { op: "createNumberingList"; args: { spec: NumberingListSpec } } | { op: "editNumberingList"; args: { listId: string; spec: NumberingListSpec } } | { op: "deleteNumberingList"; args: { listId: string } } | { op: "createParagraphStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameParagraphStyle"; args: { styleId: string; name: string } } | { op: "deleteParagraphStyle"; args: { styleId: string } } | { op: "createCharacterStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameCharacterStyle"; args: { styleId: string; name: string } } | { op: "deleteCharacterStyle"; args: { styleId: string } } | { op: "createObjectStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameObjectStyle"; args: { styleId: string; name: string } } | { op: "deleteObjectStyle"; args: { styleId: string } } | { op: "createCellStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameCellStyle"; args: { styleId: string; name: string } } | { op: "deleteCellStyle"; args: { styleId: string } } | { op: "createTableStyle"; args: { selfId?: string | null; name?: string | null; basedOn?: string | null } } | { op: "renameTableStyle"; args: { styleId: string; name: string } } | { op: "deleteTableStyle"; args: { styleId: string } } | { op: "setStyleProperty"; args: { collection: StyleCollection; styleId: string; path: PropertyPath; value: Value } } | { op: "insertOval"; args: { pageId: PageId; bounds: [number, number, number, number] } } | { op: "insertGuide"; args: { spreadId: string; orientation: GuideOrientationSpec; position: number; pageIndex?: number } } | { op: "moveGuide"; args: { guideId: string; position: number } } | { op: "deleteGuide"; args: { guideId: string } } | { op: "setConditionVisible"; args: { condition: string; visible: boolean } } | { op: "activateConditionSet"; args: { set: string } } | { op: "applyMasterToPage"; args: { page: PageId; master?: string | null } } | { op: "duplicatePage"; args: { page: PageId } } | { op: "insertSection"; args: { atPage: PageId; prefix?: string | null; numberingStyle?: string | null; startAt?: number | null } } | { op: "editSection"; args: { sectionId: string; prefix?: string | null | null; numberingStyle?: string | null; startAt?: number | null | null } } | { op: "deleteSection"; args: { sectionId: string } } | { op: "setRowHeight"; args: { storyId: string; tableId: string; row: number; height?: number | null } } | { op: "setColumnWidth"; args: { storyId: string; tableId: string; col: number; width?: number | null } } | { op: "insertTableRow"; args: { storyId: string; tableId: string; at: number } } | { op: "deleteTableRow"; args: { storyId: string; tableId: string; at: number } } | { op: "insertTableColumn"; args: { storyId: string; tableId: string; at: number } } | { op: "deleteTableColumn"; args: { storyId: string; tableId: string; at: number } } | { op: "insertHeaderRow"; args: { storyId: string; tableId: string } } | { op: "removeHeaderRow"; args: { storyId: string; tableId: string } } | { op: "insertFooterRow"; args: { storyId: string; tableId: string } } | { op: "removeFooterRow"; args: { storyId: string; tableId: string } } | { op: "setCellSpan"; args: { storyId: string; tableId: string; row: number; col: number; rowSpan: number; columnSpan: number } } | { op: "insertTable"; args: { storyId: string; rows: number; cols: number; headerRows?: number; footerRows?: number; columnWidths?: number[]; rowHeights?: number[] } };
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* A plugin gradient paint for [`SceneItem::FillPathGradient`] (C-1.3).
|
|
@@ -193,6 +193,139 @@ export interface NearestPathPointResult {
|
|
|
193
193
|
distance: number;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
/**
|
|
197
|
+
* B-22 (protocol v57) — `RequestPlanarRegions` reply.
|
|
198
|
+
*/
|
|
199
|
+
export interface PlanarRegionsResult {
|
|
200
|
+
/**
|
|
201
|
+
* `false` when the request could not be answered at all — no
|
|
202
|
+
* document, an id that doesn\'t resolve, or more inputs than the
|
|
203
|
+
* kernel\'s cap. `reason` says which. Never a truncated answer.
|
|
204
|
+
*/
|
|
205
|
+
found: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Populated when `found`. With a `point` in the request this holds
|
|
208
|
+
* at most one face (empty means the point is outside every input).
|
|
209
|
+
*/
|
|
210
|
+
faces: PlanarFaceWire[];
|
|
211
|
+
/**
|
|
212
|
+
* How many inputs the arrangement was built from.
|
|
213
|
+
*/
|
|
214
|
+
inputCount: number;
|
|
215
|
+
/**
|
|
216
|
+
* `true` when the resolved faces tile the union of the inputs.
|
|
217
|
+
* `false` flags that the enumeration missed a sliver — the faces
|
|
218
|
+
* listed are all real, the list just isn\'t exhaustive. Always
|
|
219
|
+
* `true` for a point query (one face is not a tiling claim).
|
|
220
|
+
*/
|
|
221
|
+
complete: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Why `found` is false. `None` on success.
|
|
224
|
+
*/
|
|
225
|
+
reason?: string | null;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* B-22 (protocol v57) — one face of a planar arrangement: a connected
|
|
230
|
+
* region of the plane whose containment signature is constant.
|
|
231
|
+
*
|
|
232
|
+
* Coordinates are in the same RAW path space `PathAnchors` reports
|
|
233
|
+
* (per-element `ItemTransform`s are not composed in — the arrangement
|
|
234
|
+
* runs on the anchors as stored, exactly like `pathfinderBoolean`).
|
|
235
|
+
*/
|
|
236
|
+
export interface PlanarFaceWire {
|
|
237
|
+
/**
|
|
238
|
+
* Stable id — `\"<signature>#<component>\"`, e.g. `\"0-1#0\"`. Stable
|
|
239
|
+
* across calls with the same inputs, which is what lets a hover
|
|
240
|
+
* query\'s id ride straight into `pathfinderFaces`.
|
|
241
|
+
*/
|
|
242
|
+
id: string;
|
|
243
|
+
/**
|
|
244
|
+
* Indices into the REQUEST\'s `element_ids` whose interior contains
|
|
245
|
+
* this face.
|
|
246
|
+
*/
|
|
247
|
+
signature: number[];
|
|
248
|
+
/**
|
|
249
|
+
* The face outline (closed). A face with holes carries them as
|
|
250
|
+
* extra contours.
|
|
251
|
+
*/
|
|
252
|
+
anchors: PathAnchorTriple[];
|
|
253
|
+
/**
|
|
254
|
+
* Per-contour boundaries into `anchors`.
|
|
255
|
+
*/
|
|
256
|
+
subpathStarts: number[];
|
|
257
|
+
/**
|
|
258
|
+
* Unsigned area, outer contour minus holes.
|
|
259
|
+
*/
|
|
260
|
+
area: number;
|
|
261
|
+
/**
|
|
262
|
+
* A point strictly inside the face — what a hover highlight or a
|
|
263
|
+
* fill drop can key off without re-deriving containment.
|
|
264
|
+
*/
|
|
265
|
+
inside: [number, number];
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* B-22 — the region-level Pathfinder verbs, all resolved over one
|
|
270
|
+
* planar arrangement (Illustrator\'s Pathfinder row, as opposed to the
|
|
271
|
+
* Shape Modes row that [`PathfinderKind`] covers).
|
|
272
|
+
*
|
|
273
|
+
* Every verb reads the arrangement\'s faces and decides, per face,
|
|
274
|
+
* WHICH input owns it. Ownership defaults to the TOPMOST input
|
|
275
|
+
* covering the face — `min(signature)`, since `elements` arrives
|
|
276
|
+
* top-to-bottom — which is what makes the results carry the fill you
|
|
277
|
+
* see on screen at that spot.
|
|
278
|
+
*/
|
|
279
|
+
export type PathfinderRegionVerb = "divide" | "trim" | "merge" | "crop" | "outline" | "minusBack";
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* B-22 — whether `PathfinderFaces` keeps the named faces or removes
|
|
283
|
+
* them (Shape Builder\'s drag vs alt-drag).
|
|
284
|
+
*/
|
|
285
|
+
export type FaceSelectMode = "keep" | "remove";
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* C-28 — wire mirror of [`paged_model::OpacityMaskType`] (the same
|
|
289
|
+
* mirror convention [`PathAnchorSpec`] follows: `paged-model` carries
|
|
290
|
+
* no `tsify` dependency, so wire-visible enums are declared here and
|
|
291
|
+
* converted at the boundary).
|
|
292
|
+
*/
|
|
293
|
+
export type OpacityMaskMode = "luminosity" | "alpha";
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* C-29 — the `<TextPath>` knobs [`Operation::AttachTextToPath`]
|
|
297
|
+
* exposes. Grouped into one struct so the op, its inverse and the
|
|
298
|
+
* wire all name the same thing.
|
|
299
|
+
*
|
|
300
|
+
* Every field maps to an attribute the RENDERER ALREADY HONOURS
|
|
301
|
+
* (verified against `paged_renderer::pipeline::text_path`):
|
|
302
|
+
*
|
|
303
|
+
* * `path_type_alignment` → `PathTypeAlignment`: the glyph\'s
|
|
304
|
+
* vertical seat — `BaselinePathType` (default) / `CenterPathType`
|
|
305
|
+
* / `AscenderPathType` / `DescenderPathType`.
|
|
306
|
+
* * `flip_path_effect` → `FlipPathEffect`: `Flipped` reverses the
|
|
307
|
+
* path direction so the text reads the other way round.
|
|
308
|
+
* * `start_bracket` / `end_bracket` → `StartBracket` /
|
|
309
|
+
* `EndBracket`: the arc-length window the text flows within. The
|
|
310
|
+
* renderer clamps both to the tessellated path length, centres
|
|
311
|
+
* the run in the window when it fits, and drops glyphs past
|
|
312
|
+
* `EndBracket` while reporting `OversetTextDropped`.
|
|
313
|
+
*
|
|
314
|
+
* **Deliberately NOT exposed: `PathEffect`.** Only
|
|
315
|
+
* `RainbowPathEffect` actually renders; `SkewPathEffect`,
|
|
316
|
+
* `Path3DRibbonEffect`, `StairStepPathEffect` and
|
|
317
|
+
* `GravityPathEffect` parse but draw as Rainbow. A knob whose value
|
|
318
|
+
* is silently ignored is worse than no knob, so the op does not take
|
|
319
|
+
* one and the created `TextPath` leaves the attribute absent — which
|
|
320
|
+
* IS Rainbow, the IDML default.
|
|
321
|
+
*/
|
|
322
|
+
export interface TextPathSpec {
|
|
323
|
+
pathTypeAlignment?: string | null;
|
|
324
|
+
flipPathEffect?: string | null;
|
|
325
|
+
startBracket?: number | null;
|
|
326
|
+
endBracket?: number | null;
|
|
327
|
+
}
|
|
328
|
+
|
|
196
329
|
/**
|
|
197
330
|
* Canonical selection / caret. `start == end` is a caret;
|
|
198
331
|
* `start < end` is a range. Endpoints are normalised so `start ≤
|
|
@@ -342,6 +475,57 @@ export interface ExportPdfWireOptions {
|
|
|
342
475
|
title?: string | null;
|
|
343
476
|
}
|
|
344
477
|
|
|
478
|
+
/**
|
|
479
|
+
* DOC-03 (v54) — a story\'s full CONTENT: its paragraphs, each with its runs\'
|
|
480
|
+
* text + applied styles + direct character overrides. Where `StorySummary` gives
|
|
481
|
+
* counts, this gives the text and formatting a content plugin needs to read an
|
|
482
|
+
* edited document back (e.g. paged.doc diffs it against its import baseline to
|
|
483
|
+
* drive edited save-back). Surfaced by `CanvasModel::story_content()`; read via
|
|
484
|
+
* `RequestStoryContent { story_id }` → `StoryContentResult`.
|
|
485
|
+
*/
|
|
486
|
+
export interface StoryContent {
|
|
487
|
+
/**
|
|
488
|
+
* IDML `Self` id (`Story/u123`).
|
|
489
|
+
*/
|
|
490
|
+
selfId: string;
|
|
491
|
+
/**
|
|
492
|
+
* Paragraphs in body order.
|
|
493
|
+
*/
|
|
494
|
+
paragraphs: ParagraphContent[];
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* DOC-03 — one paragraph\'s applied style + its runs.
|
|
499
|
+
*/
|
|
500
|
+
export interface ParagraphContent {
|
|
501
|
+
/**
|
|
502
|
+
* The applied paragraph style id, if any (`w:pStyle` equivalent).
|
|
503
|
+
*/
|
|
504
|
+
paragraphStyle?: string;
|
|
505
|
+
runs: RunContent[];
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* DOC-03 — one run\'s text + its applied character style + its DIRECT character
|
|
510
|
+
* overrides (each `None` = inherit). A run styled only through an applied style
|
|
511
|
+
* carries just `character_style`; direct editor formatting shows in the override
|
|
512
|
+
* fields. Field names mirror `paged_model::CharacterRun`.
|
|
513
|
+
*/
|
|
514
|
+
export interface RunContent {
|
|
515
|
+
text: string;
|
|
516
|
+
characterStyle?: string;
|
|
517
|
+
font?: string;
|
|
518
|
+
fontStyle?: string;
|
|
519
|
+
pointSize?: number;
|
|
520
|
+
fillColor?: string;
|
|
521
|
+
underline?: boolean;
|
|
522
|
+
strikethru?: boolean;
|
|
523
|
+
capitalization?: string;
|
|
524
|
+
baselineShift?: number;
|
|
525
|
+
position?: string;
|
|
526
|
+
tracking?: number;
|
|
527
|
+
}
|
|
528
|
+
|
|
345
529
|
/**
|
|
346
530
|
* Description of a node about to be inserted. Carries the minimal
|
|
347
531
|
* Stage-1 supported field set plus `item_transform` — `RemoveNode` →
|
|
@@ -362,10 +546,10 @@ export type CaretDirection = "up" | "down";
|
|
|
362
546
|
/**
|
|
363
547
|
* Discriminated payload of a `WorkerToMain` message.
|
|
364
548
|
*/
|
|
365
|
-
export type WorkerToMainKind = { kind: "ready"; payload: { protocol: ProtocolVersion } } | { kind: "documentLoaded"; payload: DocumentHandle } | { kind: "loadFailed"; payload: { error: LoadError } } | { kind: "mutationFailed"; payload: { error: WorkerError } } | { kind: "displayListReady"; payload: { pageId: PageId; lod: LodTier; commands: number; layoutGeneration: number; numberingGeneration: number } } | { kind: "hitResult"; payload: HitResult } | { kind: "pagesDirty"; payload: { pageIds: PageId[] } } | { kind: "storyDirty"; payload: { storyId: string } } | { kind: "warning"; payload: { kind: string; details: string } } | { kind: "stats"; payload: DocumentStats } | { kind: "snapshotReady"; payload: SnapshotPng } | { kind: "snapshotFailed"; payload: { error: SnapshotError } } | { kind: "mutationApplied"; payload: { clientSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; createdId?: ElementId | null; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null; reflow?: FrameReflowInfo | null } } | { kind: "selectionGeometry"; payload: { rects: SelectionRect[] } } | { kind: "caretGeometry"; payload: { caret: CaretGeometry | null } } | { kind: "caretNavResult"; payload: { offset?: number | null } } | { kind: "lineBoundsResult"; payload: { bounds?: LineBounds | null } } | { kind: "wordBoundsResult"; payload: { bounds?: WordBounds | null } } | { kind: "paragraphBoundsResult"; payload: { bounds?: ParagraphBounds | null } } | { kind: "undoApplied"; payload: { undoneSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { kind: "redoApplied"; payload: { redoneSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { kind: "fontRegistered"; payload: { family: string } } | { kind: "fontRegistryCleared" } | { kind: "colorProfileRegistered"; payload: { name: string } } | { kind: "elementSelectionApplied"; payload: { ids: ElementId[] } } | { kind: "marqueeHits"; payload: { ids: ElementId[] } } | { kind: "elementGeometry"; payload: { items: ElementGeometryItem[] } } | { kind: "groupLeaves"; payload: { ids: ElementId[] } } | { kind: "pathAnchors"; payload: { result: PathAnchorsResult | null } } | { kind: "nearestPathPoint"; payload: { result: NearestPathPointResult | null } } | { kind: "layers"; payload: { items: LayerSummary[] } } | { kind: "collectionReply"; payload: { name: CollectionName; items: any } } | { kind: "frameChainResult"; payload: { links: FrameChainLink[] } } | { kind: "documentPlaceholders"; payload: { items: PlaceholderItem[] } } | { kind: "placedAssetBytes"; payload: { elementId: string; found: boolean; uri: string; width: number; height: number; encoded: number[] } } | { kind: "fontFaceBytes"; payload: { found: boolean; family: string; style: string | null; postscriptName: string | null; format: string; bytes: number[] } } | { kind: "measureTextResult"; payload: { advance: number; ascender: number; descender: number } } | { kind: "sceneLayerApplied"; payload: { elementId: string; applied: boolean } } | { kind: "resourceClaimApplied"; payload: { imageId: string; applied: boolean; needed?: ResourceTilesNeededWire[] } } | { kind: "resourceTilesNeeded"; payload: ResourceTilesNeededWire } | { kind: "frameReflow"; payload: { frameId: string; contentBox: [number, number, number, number] } } | { kind: "documentMetaReply"; payload: { meta: DocumentMeta } } | { kind: "colorPreviewReply"; payload: { result: ColorPreview | null } } | { kind: "colorComputeReply"; payload: { rgbHex: string; cmyk: [number, number, number, number] | null; outOfGamut: boolean } } | { kind: "gradientDetailReply"; payload: { result: GradientDetail | null } } | { kind: "swatchLibraryExported"; payload: { aseBytes: number[] } } | { kind: "exportPdfBegun"; payload: { session: number; pageCount: number } } | { kind: "exportPdfProgress"; payload: { session: number; done: number; total: number } } | { kind: "pdfExported"; payload: { pdfBytes: number[]; diagnostics: string[]; findings?: PreflightFinding[] } } | { kind: "exportPdfCancelled"; payload: { session: number } } | { kind: "exportPdfFailed"; payload: { error: string } } | { kind: "idmlExported"; payload: { idmlBytes: number[] } } | { kind: "exportIdmlFailed"; payload: { error: string } } | { kind: "pagedPartWritten"; payload: {} } | { kind: "pagedPartRead"; payload: { found: boolean; bytes: number[] } } | { kind: "pagedPartList"; payload: { paths: string[] } } | { kind: "pagedExported"; payload: { bytes: number[] } } | { kind: "pagedPartFailed"; payload: { error: string } } | { kind: "elementProperties"; payload: { result: ElementProperties | null } } | { kind: "sceneTree"; payload: { roots: SceneTreeNode[] } } | { kind: "scriptResult"; payload: { output: string[]; error: string | null; budgetKind?: ScriptBudgetKind } } | { kind: "gestureBegun"; payload: { handle: GestureHandle } } | { kind: "gestureUpdated"; payload: { handle: GestureHandle; pageIds: PageId[]; snapLines?: SnapLine[] } } | { kind: "gestureCommitted"; payload: { handle: GestureHandle; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats } } | { kind: "gestureCancelled"; payload: { handle: GestureHandle; pageIds: PageId[] } } | { kind: "gestureFailed"; payload: { error: GestureFailure } } | { kind: "attachReady"; payload: { gpuActive: boolean; sceneCacheBudget: number } } | { kind: "gestureSnapLines"; payload: { snapLines: SnapLine[] } } | { kind: "resolutionDone"; payload: ResolutionResult };
|
|
549
|
+
export type WorkerToMainKind = { kind: "ready"; payload: { protocol: ProtocolVersion } } | { kind: "documentLoaded"; payload: DocumentHandle } | { kind: "loadFailed"; payload: { error: LoadError } } | { kind: "mutationFailed"; payload: { error: WorkerError } } | { kind: "displayListReady"; payload: { pageId: PageId; lod: LodTier; commands: number; layoutGeneration: number; numberingGeneration: number } } | { kind: "hitResult"; payload: HitResult } | { kind: "pagesDirty"; payload: { pageIds: PageId[] } } | { kind: "storyDirty"; payload: { storyId: string } } | { kind: "warning"; payload: { kind: string; details: string } } | { kind: "stats"; payload: DocumentStats } | { kind: "snapshotReady"; payload: SnapshotPng } | { kind: "snapshotFailed"; payload: { error: SnapshotError } } | { kind: "mutationApplied"; payload: { clientSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; createdId?: ElementId | null; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null; reflow?: FrameReflowInfo | null } } | { kind: "selectionGeometry"; payload: { rects: SelectionRect[] } } | { kind: "caretGeometry"; payload: { caret: CaretGeometry | null } } | { kind: "caretNavResult"; payload: { offset?: number | null } } | { kind: "lineBoundsResult"; payload: { bounds?: LineBounds | null } } | { kind: "wordBoundsResult"; payload: { bounds?: WordBounds | null } } | { kind: "paragraphBoundsResult"; payload: { bounds?: ParagraphBounds | null } } | { kind: "storyContentResult"; payload: { content?: StoryContent | null } } | { kind: "undoApplied"; payload: { undoneSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { kind: "redoApplied"; payload: { redoneSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { kind: "fontRegistered"; payload: { family: string } } | { kind: "fontRegistryCleared" } | { kind: "colorProfileRegistered"; payload: { name: string } } | { kind: "elementSelectionApplied"; payload: { ids: ElementId[] } } | { kind: "marqueeHits"; payload: { ids: ElementId[] } } | { kind: "elementGeometry"; payload: { items: ElementGeometryItem[] } } | { kind: "groupLeaves"; payload: { ids: ElementId[] } } | { kind: "pathAnchors"; payload: { result: PathAnchorsResult | null } } | { kind: "planarRegions"; payload: { result: PlanarRegionsResult } } | { kind: "nearestPathPoint"; payload: { result: NearestPathPointResult | null } } | { kind: "layers"; payload: { items: LayerSummary[] } } | { kind: "collectionReply"; payload: { name: CollectionName; items: any } } | { kind: "frameChainResult"; payload: { links: FrameChainLink[] } } | { kind: "documentPlaceholders"; payload: { items: PlaceholderItem[] } } | { kind: "placedAssetBytes"; payload: { elementId: string; found: boolean; uri: string; width: number; height: number; encoded: number[] } } | { kind: "fontFaceBytes"; payload: { found: boolean; family: string; style: string | null; postscriptName: string | null; format: string; bytes: number[] } } | { kind: "measureTextResult"; payload: { advance: number; ascender: number; descender: number } } | { kind: "sceneLayerApplied"; payload: { elementId: string; applied: boolean } } | { kind: "resourceClaimApplied"; payload: { imageId: string; applied: boolean; needed?: ResourceTilesNeededWire[] } } | { kind: "resourceTilesNeeded"; payload: ResourceTilesNeededWire } | { kind: "frameReflow"; payload: { frameId: string; contentBox: [number, number, number, number] } } | { kind: "documentMetaReply"; payload: { meta: DocumentMeta } } | { kind: "colorPreviewReply"; payload: { result: ColorPreview | null } } | { kind: "colorComputeReply"; payload: { rgbHex: string; cmyk: [number, number, number, number] | null; outOfGamut: boolean } } | { kind: "gradientDetailReply"; payload: { result: GradientDetail | null } } | { kind: "swatchLibraryExported"; payload: { aseBytes: number[] } } | { kind: "exportPdfBegun"; payload: { session: number; pageCount: number } } | { kind: "exportPdfProgress"; payload: { session: number; done: number; total: number } } | { kind: "pdfExported"; payload: { pdfBytes: number[]; diagnostics: string[]; findings?: PreflightFinding[] } } | { kind: "exportPdfCancelled"; payload: { session: number } } | { kind: "exportPdfFailed"; payload: { error: string } } | { kind: "idmlExported"; payload: { idmlBytes: number[]; lost?: string[] } } | { kind: "exportIdmlFailed"; payload: { error: string } } | { kind: "pagedPartWritten"; payload: {} } | { kind: "pagedPartRead"; payload: { found: boolean; bytes: number[] } } | { kind: "pagedPartList"; payload: { paths: string[] } } | { kind: "pagedExported"; payload: { bytes: number[] } } | { kind: "pagedPartFailed"; payload: { error: string } } | { kind: "elementProperties"; payload: { result: ElementProperties | null } } | { kind: "sceneTree"; payload: { roots: SceneTreeNode[] } } | { kind: "scriptResult"; payload: { output: string[]; error: string | null; budgetKind?: ScriptBudgetKind } } | { kind: "gestureBegun"; payload: { handle: GestureHandle } } | { kind: "gestureUpdated"; payload: { handle: GestureHandle; pageIds: PageId[]; snapLines?: SnapLine[] } } | { kind: "gestureCommitted"; payload: { handle: GestureHandle; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats } } | { kind: "gestureCancelled"; payload: { handle: GestureHandle; pageIds: PageId[] } } | { kind: "gestureFailed"; payload: { error: GestureFailure } } | { kind: "attachReady"; payload: { gpuActive: boolean; sceneCacheBudget: number } } | { kind: "gestureSnapLines"; payload: { snapLines: SnapLine[] } } | { kind: "resolutionDone"; payload: ResolutionResult };
|
|
366
550
|
|
|
367
551
|
/**
|
|
368
|
-
* Editor-ops — wire mirror of `
|
|
552
|
+
* Editor-ops — wire mirror of `paged_model::GradientFeatherParams`.
|
|
369
553
|
* Whole-struct authoring (kind + axis + stop LIST change together;
|
|
370
554
|
* `Value` has no generic list form, so the drop-shadow per-field
|
|
371
555
|
* shape doesn\'t fit). The renderer already draws this effect; only
|
|
@@ -384,7 +568,7 @@ export interface GradientFeatherSpec {
|
|
|
384
568
|
}
|
|
385
569
|
|
|
386
570
|
/**
|
|
387
|
-
* Editor-ops — wire mirror of `
|
|
571
|
+
* Editor-ops — wire mirror of `paged_model::GradientFeatherStop`
|
|
388
572
|
* (the AST type predates `PartialEq`/`Tsify`; the mirror keeps the
|
|
389
573
|
* op wire-shaped, the `PathAnchorSpec` precedent).
|
|
390
574
|
*/
|
|
@@ -957,6 +1141,12 @@ export interface StorySummary {
|
|
|
957
1141
|
* Preflight panel + the red \"+\" overset badge on the frame.
|
|
958
1142
|
*/
|
|
959
1143
|
overset?: boolean;
|
|
1144
|
+
/**
|
|
1145
|
+
* When `overset`, *where* the flow overran — the continuation cursor
|
|
1146
|
+
* (`OversetAt`). `None` when the story fits. Additive/optional, so an
|
|
1147
|
+
* older client that ignores it still reads the `overset` flag.
|
|
1148
|
+
*/
|
|
1149
|
+
oversetAt?: OversetAt;
|
|
960
1150
|
}
|
|
961
1151
|
|
|
962
1152
|
/**
|
|
@@ -979,6 +1169,26 @@ export interface SwatchSummary {
|
|
|
979
1169
|
selfId: string;
|
|
980
1170
|
name: string;
|
|
981
1171
|
kind: string;
|
|
1172
|
+
/**
|
|
1173
|
+
* §21 advanced prepress — the swatch\'s total area coverage in
|
|
1174
|
+
* percent: how much ink every press plate lays down for it,
|
|
1175
|
+
* summed. A process CMYK swatch sums its four channels (a 60/40/
|
|
1176
|
+
* 40/100 rich black is 240%); a spot swatch is ONE plate, so it
|
|
1177
|
+
* contributes its own tint (100% PANTONE 286 C is 100%, not the
|
|
1178
|
+
* 175% its CMYK alternate would sum to).
|
|
1179
|
+
*
|
|
1180
|
+
* `None` — not `0.0` — when the swatch has no ink decomposition:
|
|
1181
|
+
* RGB, Lab, mixed-ink and unknown swatches separate at the RIP,
|
|
1182
|
+
* not here. The distinction is load-bearing; a UI must show a
|
|
1183
|
+
* blank, never a zero.
|
|
1184
|
+
*
|
|
1185
|
+
* This is the EXACT reading, computed from the palette with no
|
|
1186
|
+
* render involved, so it is resolution-free and catches an
|
|
1187
|
+
* over-limit colour wherever it is used — including in hairlines
|
|
1188
|
+
* that the rendered per-page coverage under-samples. Additive
|
|
1189
|
+
* read-only field; no protocol bump on its own.
|
|
1190
|
+
*/
|
|
1191
|
+
totalAreaCoveragePct?: number | null;
|
|
982
1192
|
}
|
|
983
1193
|
|
|
984
1194
|
/**
|
|
@@ -996,7 +1206,7 @@ export interface SwatchSummary {
|
|
|
996
1206
|
* `serde_json::Value::Array` for unimplemented entries, surfacing
|
|
997
1207
|
* a runtime warning rather than a panic.
|
|
998
1208
|
*/
|
|
999
|
-
export type CollectionName = "swatches" | "gradients" | "colorGroups" | "paragraphStyles" | "characterStyles" | "objectStyles" | "cellStyles" | "tableStyles" | "layers" | "spreads" | "pages" | "masterPages" | "links" | "articles" | "hyperlinks" | "bookmarks" | "crossReferences" | "conditions" | "conditionSets" | "fonts" | "indexTopics" | "inks" | "sections" | "stories" | "numberingLists";
|
|
1209
|
+
export type CollectionName = "swatches" | "gradients" | "colorGroups" | "paragraphStyles" | "characterStyles" | "objectStyles" | "cellStyles" | "tableStyles" | "layers" | "spreads" | "pages" | "masterPages" | "links" | "articles" | "hyperlinks" | "bookmarks" | "crossReferences" | "conditions" | "conditionSets" | "fonts" | "indexTopics" | "inks" | "sections" | "stories" | "numberingLists" | "inkCoverage";
|
|
1000
1210
|
|
|
1001
1211
|
/**
|
|
1002
1212
|
* SDK Phase 5 (D1) — singleton document-level state. Per
|
|
@@ -1551,7 +1761,7 @@ export interface DocumentStats {
|
|
|
1551
1761
|
* document\'s `BTreeMap` palettes/stylesheets rather than the scene
|
|
1552
1762
|
* tree, so they\'re top-level variants rather than `InsertNode`.
|
|
1553
1763
|
*/
|
|
1554
|
-
export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath; value: Value } | { kind: "InsertNode"; parent: NodeId; position: number; node: NodeSpec; z_slot?: number | null } | { kind: "RemoveNode"; node: NodeId } | { kind: "MoveNode"; node: NodeId; new_parent: NodeId; position: number } | { kind: "Batch"; ops: Operation[] } | { kind: "InsertPage"; after_page_id?: string | null; master_id?: string | null; spread_self_id?: string | null; page_self_id?: string | null; restore_spread_json?: string | null } | { kind: "RemovePage"; page_id: string } | { kind: "MoveLayer"; layer_id: string; new_index: number } | { kind: "InsertLayer"; position: number; name: string; self_id?: string | null } | { kind: "RemoveLayer"; layer_id: string } | { kind: "CreateSwatch"; spec: SwatchSpec } | { kind: "EditSwatch"; swatch_id: string; spec: SwatchSpec } | { kind: "DeleteSwatch"; swatch_id: string } | { kind: "CreateParagraphStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameParagraphStyle"; style_id: string; name: string } | { kind: "DeleteParagraphStyle"; style_id: string } | { kind: "CreateCharacterStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCharacterStyle"; style_id: string; name: string } | { kind: "DeleteCharacterStyle"; style_id: string } | { kind: "CreateObjectStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameObjectStyle"; style_id: string; name: string } | { kind: "DeleteObjectStyle"; style_id: string } | { kind: "CreateCellStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCellStyle"; style_id: string; name: string } | { kind: "DeleteCellStyle"; style_id: string } | { kind: "CreateTableStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameTableStyle"; style_id: string; name: string } | { kind: "DeleteTableStyle"; style_id: string } | { kind: "CreateGroup"; spec: GroupSpec } | { kind: "DissolveGroup"; group_id: string; restore_slots?: number[] | null } | { kind: "SetGroupTransform"; group: string; transform?: [number, number, number, number, number, number] | null; prev?: [number, number, number, number, number, number] | null } | { kind: "CreateGradient"; spec: GradientSpec } | { kind: "EditGradient"; gradient_id: string; spec: GradientSpec } | { kind: "DeleteGradient"; gradient_id: string } | { kind: "CreateColorGroup"; spec: ColorGroupSpec } | { kind: "EditColorGroup"; group_id: string; spec: ColorGroupSpec } | { kind: "DeleteColorGroup"; group_id: string } | { kind: "CreateNumberingList"; spec: NumberingListSpec } | { kind: "EditNumberingList"; list_id: string; spec: NumberingListSpec } | { kind: "DeleteNumberingList"; list_id: string } | { kind: "SetStyleProperty"; collection: StyleCollection; style_id: string; path: PropertyPath; value: Value } | { kind: "PathfinderBoolean"; kept: NodeId; others: NodeId[]; opKind: PathfinderKind } | { kind: "LinkFrames"; from: string; to: string } | { kind: "UnlinkFrames"; frame: string; prev_next?: string | null } | { kind: "ApplyStyle"; story_id: string; start: number; end: number; style: string; scope: StyleScope } | { kind: "InsertField"; story_id: string; offset: number; field: FieldKind } | { kind: "DeleteField"; story_id: string; offset: number; field: FieldKind } | { kind: "SetFieldValue"; story_id: string; offset: number; value?: string | null } | { kind: "PlaceImage"; frame: NodeId; image_uri?: string | null; fit?: string | null } | { kind: "ReplaceImageBytes"; frame: NodeId; bytes?: number[] | null; prior_has_image_element?: boolean | null } | { kind: "InsertGuide"; spread_id: string; orientation: GuideOrientationSpec; position: number; page_index?: number; guide_id?: string | null } | { kind: "MoveGuide"; guide_id: string; position: number } | { kind: "DeleteGuide"; guide_id: string } | { kind: "SetConditionVisible"; condition: string; visible: boolean } | { kind: "ActivateConditionSet"; set: string } | { kind: "RestoreConditionVisibility"; states: [string, boolean][] } | { kind: "ApplyMasterToPage"; page: string; master?: string | null } | { kind: "DuplicatePage"; page: string; clone_spread_json?: string | null } | { kind: "InsertSection"; at_page: string; prefix?: string | null; numbering_style?: string | null; start_at?: number | null; self_id?: string | null } | { kind: "EditSection"; section_id: string; prefix?: string | null | null; numbering_style?: string | null; start_at?: number | null | null } | { kind: "DeleteSection"; section_id: string } | { kind: "SetRowHeight"; story_id: string; table_id: string; row: number; height?: number | null } | { kind: "SetColumnWidth"; story_id: string; table_id: string; col: number; width?: number | null } | { kind: "InsertTableRow"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableRow"; story_id: string; table_id: string; at: number } | { kind: "InsertTableColumn"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableColumn"; story_id: string; table_id: string; at: number } | { kind: "InsertHeaderRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveHeaderRow"; story_id: string; table_id: string } | { kind: "InsertFooterRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveFooterRow"; story_id: string; table_id: string } | { kind: "SetCellSpan"; story_id: string; table_id: string; row: number; col: number; row_span: number; column_span: number };
|
|
1764
|
+
export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath; value: Value } | { kind: "InsertNode"; parent: NodeId; position: number; node: NodeSpec; z_slot?: number | null } | { kind: "RemoveNode"; node: NodeId } | { kind: "MoveNode"; node: NodeId; new_parent: NodeId; position: number } | { kind: "ReorderNode"; node: NodeId; target: ZOrderTarget } | { kind: "Batch"; ops: Operation[] } | { kind: "InsertPage"; after_page_id?: string | null; master_id?: string | null; spread_self_id?: string | null; page_self_id?: string | null; restore_spread_json?: string | null } | { kind: "RemovePage"; page_id: string } | { kind: "MoveLayer"; layer_id: string; new_index: number } | { kind: "InsertLayer"; position: number; name: string; self_id?: string | null } | { kind: "RemoveLayer"; layer_id: string } | { kind: "CreateSwatch"; spec: SwatchSpec } | { kind: "EditSwatch"; swatch_id: string; spec: SwatchSpec } | { kind: "DeleteSwatch"; swatch_id: string } | { kind: "CreateParagraphStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameParagraphStyle"; style_id: string; name: string } | { kind: "DeleteParagraphStyle"; style_id: string } | { kind: "CreateCharacterStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCharacterStyle"; style_id: string; name: string } | { kind: "DeleteCharacterStyle"; style_id: string } | { kind: "CreateObjectStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameObjectStyle"; style_id: string; name: string } | { kind: "DeleteObjectStyle"; style_id: string } | { kind: "CreateCellStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCellStyle"; style_id: string; name: string } | { kind: "DeleteCellStyle"; style_id: string } | { kind: "CreateTableStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameTableStyle"; style_id: string; name: string } | { kind: "DeleteTableStyle"; style_id: string } | { kind: "CreateGroup"; spec: GroupSpec } | { kind: "DissolveGroup"; group_id: string; restore_slots?: number[] | null } | { kind: "SetGroupTransform"; group: string; transform?: [number, number, number, number, number, number] | null; prev?: [number, number, number, number, number, number] | null } | { kind: "CreateGradient"; spec: GradientSpec } | { kind: "EditGradient"; gradient_id: string; spec: GradientSpec } | { kind: "DeleteGradient"; gradient_id: string } | { kind: "CreateColorGroup"; spec: ColorGroupSpec } | { kind: "EditColorGroup"; group_id: string; spec: ColorGroupSpec } | { kind: "DeleteColorGroup"; group_id: string } | { kind: "CreateNumberingList"; spec: NumberingListSpec } | { kind: "EditNumberingList"; list_id: string; spec: NumberingListSpec } | { kind: "DeleteNumberingList"; list_id: string } | { kind: "SetStyleProperty"; collection: StyleCollection; style_id: string; path: PropertyPath; value: Value } | { kind: "PathfinderBoolean"; kept: NodeId; others: NodeId[]; opKind: PathfinderKind } | { kind: "PathfinderRegion"; elements: NodeId[]; verb: PathfinderRegionVerb } | { kind: "PathfinderFaces"; elements: NodeId[]; faces: string[]; mode: FaceSelectMode } | { kind: "JoinPaths"; kept: NodeId; other: NodeId } | { kind: "PasteInto"; container: NodeId; child: NodeId; child_index?: number | null } | { kind: "ReleaseFrom"; child: NodeId; restore_slot?: number | null } | { kind: "ApplyOpacityMask"; target: NodeId; mask: NodeId; mask_type?: OpacityMaskMode; invert?: boolean } | { kind: "ReleaseOpacityMask"; target: NodeId; restore_slot?: number | null } | { kind: "AttachTextToPath"; host: NodeId; story_id: string; spec?: TextPathSpec } | { kind: "DetachTextFromPath"; host: NodeId; index?: number | null; restore?: TextPathSpec | null } | { kind: "LinkFrames"; from: string; to: string } | { kind: "UnlinkFrames"; frame: string; prev_next?: string | null } | { kind: "ApplyStyle"; story_id: string; start: number; end: number; style: string; scope: StyleScope; cell?: CellAddr | null } | { kind: "InsertField"; story_id: string; offset: number; field: FieldKind } | { kind: "DeleteField"; story_id: string; offset: number; field: FieldKind } | { kind: "InsertAnchoredFrame"; story_id: string; offset: number; width: number; height: number; image_uri?: string | null; self_id: string } | { kind: "RemoveAnchoredFrame"; story_id: string; self_id: string } | { kind: "InsertHyperlink"; story_id: string; start: number; end: number; url: string; source_id: string; dest_id: string; hyperlink_id: string } | { kind: "RemoveHyperlink"; story_id: string; start: number; end: number; url: string; source_id: string; dest_id: string; hyperlink_id: string } | { kind: "SetFieldValue"; story_id: string; offset: number; value?: string | null } | { kind: "PlaceImage"; frame: NodeId; image_uri?: string | null; fit?: string | null } | { kind: "ReplaceImageBytes"; frame: NodeId; bytes?: number[] | null; prior_has_image_element?: boolean | null } | { kind: "InsertGuide"; spread_id: string; orientation: GuideOrientationSpec; position: number; page_index?: number; guide_id?: string | null } | { kind: "MoveGuide"; guide_id: string; position: number } | { kind: "DeleteGuide"; guide_id: string } | { kind: "SetConditionVisible"; condition: string; visible: boolean } | { kind: "ActivateConditionSet"; set: string } | { kind: "RestoreConditionVisibility"; states: [string, boolean][] } | { kind: "ApplyMasterToPage"; page: string; master?: string | null } | { kind: "DuplicatePage"; page: string; clone_spread_json?: string | null } | { kind: "InsertSection"; at_page: string; prefix?: string | null; numbering_style?: string | null; start_at?: number | null; self_id?: string | null } | { kind: "EditSection"; section_id: string; prefix?: string | null | null; numbering_style?: string | null; start_at?: number | null | null } | { kind: "DeleteSection"; section_id: string } | { kind: "SetRowHeight"; story_id: string; table_id: string; row: number; height?: number | null } | { kind: "SetColumnWidth"; story_id: string; table_id: string; col: number; width?: number | null } | { kind: "InsertTableRow"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableRow"; story_id: string; table_id: string; at: number } | { kind: "InsertTableColumn"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableColumn"; story_id: string; table_id: string; at: number } | { kind: "InsertHeaderRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveHeaderRow"; story_id: string; table_id: string } | { kind: "InsertFooterRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveFooterRow"; story_id: string; table_id: string } | { kind: "SetCellSpan"; story_id: string; table_id: string; row: number; col: number; row_span: number; column_span: number };
|
|
1555
1765
|
|
|
1556
1766
|
/**
|
|
1557
1767
|
* The discriminated payload of a `MainToWorker` message. Tagged so
|
|
@@ -1560,10 +1770,10 @@ export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath;
|
|
|
1560
1770
|
* variants so e.g. `cmyk_icc_profile` becomes `cmykIccProfile` on
|
|
1561
1771
|
* the wire — the TS protocol mirror locks the camelCase contract.
|
|
1562
1772
|
*/
|
|
1563
|
-
export type MainToWorkerKind = { kind: "hello" } | { kind: "loadDocument"; payload: { bytes: number[]; font?: number[] | null; cmykIccProfile?: number[] | null } } | { kind: "newBlankDocument"; payload: { widthPt: number; heightPt: number; font?: number[] | null } } | { kind: "registerFont"; payload: { family: string; style?: string | null; bytes: number[] } } | { kind: "clearFontRegistry" } | { kind: "registerColorProfile"; payload: { name: string; bytes: number[] } } | { kind: "mutate"; payload: Mutation } | { kind: "requestPage"; payload: { pageId: PageId; lod: LodTier } } | { kind: "hitTest"; payload: { pageId: PageId; docPoint: [number, number]; filter: HitFilter } } | { kind: "requestSnapshot"; payload: { pageId: PageId; targetWidthPx: number; dpi?: number | null } } | { kind: "setSelection"; payload: { selection: ContentSelection | null } } | { kind: "requestSelectionGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretNav"; payload: { storyId: string; offset: number; direction: CaretDirection; cell?: TextCellAddr | null } } | { kind: "requestLineBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestWordBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestParagraphBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "undo" } | { kind: "redo" } | { kind: "setElementSelection"; payload: { ids: ElementId[]; mode: SelectionMode } } | { kind: "requestMarqueeHits"; payload: { pageId: PageId; rect: [number, number, number, number] } } | { kind: "requestElementGeometry"; payload: { ids: ElementId[] } } | { kind: "requestGroupLeaves"; payload: { groupId: string } } | { kind: "requestPathAnchors"; payload: { id: ElementId } } | { kind: "requestNearestPathPoint"; payload: { id: ElementId; point: [number, number] } } | { kind: "requestLayers" } | { kind: "requestCollection"; payload: { name: CollectionName } } | { kind: "requestFrameChain"; payload: { storyId: string } } | { kind: "requestPlacedAssetBytes"; payload: { elementId: string } } | { kind: "requestFontFaceBytes"; payload: { family: string; style?: string | null } } | { kind: "requestMeasureText"; payload: { family: string; style?: string | null; text: string; sizePt: number } } | { kind: "submitSceneLayer"; payload: { elementId: string; layer: SceneLayer } } | { kind: "clearSceneLayer"; payload: { elementId: string } } | { kind: "submitPixelLayer"; payload: { elementId: string; layer: PixelLayer } } | { kind: "clearPixelLayer"; payload: { elementId: string } } | { kind: "claimImageResource"; payload: { imageId: string; levels: number; tileSize: number; baseWidth: number; baseHeight: number; revision: number } } | { kind: "releaseImageResource"; payload: { imageId: string } } | { kind: "submitResourceTiles"; payload: { imageId: string; level: number; tiles: ProviderTileWire[]; generation: number } } | { kind: "requestDocumentMeta" } | { kind: "requestDocumentPlaceholders" } | { kind: "requestColorPreview"; payload: { swatchId: string } } | { kind: "requestColorCompute"; payload: { space: string; value: number[]; tint?: number | null; model?: string | null; alternateSpace?: string | null; alternateValue?: number[] | null } } | { kind: "requestGradientDetail"; payload: { gradientId: string } } | { kind: "exportSwatchLibrary"; payload: { groupId?: string | null } } | { kind: "executeScript"; payload: { source: string } } | { kind: "exportPdfBegin"; payload: { options: ExportPdfWireOptions } } | { kind: "exportPdfPage"; payload: { session: number } } | { kind: "exportPdfFinish"; payload: { session: number } } | { kind: "exportPdfCancel"; payload: { session: number } } | { kind: "exportIdml"; payload: {} } | { kind: "writePagedPart"; payload: { path: string; bytes: number[] } } | { kind: "readPagedPart"; payload: { path: string } } | { kind: "listPagedParts"; payload: { prefix: string } } | { kind: "exportPaged"; payload: {} } | { kind: "requestElementProperties"; payload: { id: ElementId } } | { kind: "requestSceneTree" } | { kind: "beginGesture"; payload: { nodes: ElementId[]; gesture: GestureType; anchor?: GestureAnchor | null; cameraScale?: number | null } } | { kind: "updateGesture"; payload: { handle: GestureHandle; delta: [number, number]; modifiers: GestureModifiers } } | { kind: "commitGesture"; payload: { handle: GestureHandle } } | { kind: "cancelGesture"; payload: { handle: GestureHandle } };
|
|
1773
|
+
export type MainToWorkerKind = { kind: "hello" } | { kind: "loadDocument"; payload: { bytes: number[]; font?: number[] | null; cmykIccProfile?: number[] | null } } | { kind: "newBlankDocument"; payload: { widthPt: number; heightPt: number; font?: number[] | null } } | { kind: "registerFont"; payload: { family: string; style?: string | null; bytes: number[] } } | { kind: "clearFontRegistry" } | { kind: "registerColorProfile"; payload: { name: string; bytes: number[] } } | { kind: "mutate"; payload: Mutation } | { kind: "requestPage"; payload: { pageId: PageId; lod: LodTier } } | { kind: "hitTest"; payload: { pageId: PageId; docPoint: [number, number]; filter: HitFilter } } | { kind: "requestSnapshot"; payload: { pageId: PageId; targetWidthPx: number; dpi?: number | null } } | { kind: "setSelection"; payload: { selection: ContentSelection | null } } | { kind: "requestSelectionGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretNav"; payload: { storyId: string; offset: number; direction: CaretDirection; cell?: TextCellAddr | null } } | { kind: "requestLineBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestWordBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestParagraphBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "undo" } | { kind: "redo" } | { kind: "setElementSelection"; payload: { ids: ElementId[]; mode: SelectionMode } } | { kind: "requestMarqueeHits"; payload: { pageId: PageId; rect: [number, number, number, number] } } | { kind: "requestElementGeometry"; payload: { ids: ElementId[] } } | { kind: "requestGroupLeaves"; payload: { groupId: string } } | { kind: "requestPathAnchors"; payload: { id: ElementId } } | { kind: "requestNearestPathPoint"; payload: { id: ElementId; point: [number, number] } } | { kind: "requestPlanarRegions"; payload: { elementIds: ElementId[]; point?: [number, number] | null } } | { kind: "requestLayers" } | { kind: "requestCollection"; payload: { name: CollectionName } } | { kind: "requestFrameChain"; payload: { storyId: string } } | { kind: "requestStoryContent"; payload: { storyId: string } } | { kind: "requestPlacedAssetBytes"; payload: { elementId: string } } | { kind: "requestFontFaceBytes"; payload: { family: string; style?: string | null } } | { kind: "requestMeasureText"; payload: { family: string; style?: string | null; text: string; sizePt: number } } | { kind: "submitSceneLayer"; payload: { elementId: string; layer: SceneLayer } } | { kind: "clearSceneLayer"; payload: { elementId: string } } | { kind: "submitPixelLayer"; payload: { elementId: string; layer: PixelLayer } } | { kind: "clearPixelLayer"; payload: { elementId: string } } | { kind: "claimImageResource"; payload: { imageId: string; levels: number; tileSize: number; baseWidth: number; baseHeight: number; revision: number } } | { kind: "releaseImageResource"; payload: { imageId: string } } | { kind: "submitResourceTiles"; payload: { imageId: string; level: number; tiles: ProviderTileWire[]; generation: number } } | { kind: "requestDocumentMeta" } | { kind: "requestDocumentPlaceholders" } | { kind: "requestColorPreview"; payload: { swatchId: string } } | { kind: "requestColorCompute"; payload: { space: string; value: number[]; tint?: number | null; model?: string | null; alternateSpace?: string | null; alternateValue?: number[] | null } } | { kind: "requestGradientDetail"; payload: { gradientId: string } } | { kind: "exportSwatchLibrary"; payload: { groupId?: string | null } } | { kind: "executeScript"; payload: { source: string } } | { kind: "exportPdfBegin"; payload: { options: ExportPdfWireOptions } } | { kind: "exportPdfPage"; payload: { session: number } } | { kind: "exportPdfFinish"; payload: { session: number } } | { kind: "exportPdfCancel"; payload: { session: number } } | { kind: "exportIdml"; payload: {} } | { kind: "writePagedPart"; payload: { path: string; bytes: number[] } } | { kind: "readPagedPart"; payload: { path: string } } | { kind: "listPagedParts"; payload: { prefix: string } } | { kind: "exportPaged"; payload: {} } | { kind: "requestElementProperties"; payload: { id: ElementId } } | { kind: "requestSceneTree" } | { kind: "beginGesture"; payload: { nodes: ElementId[]; gesture: GestureType; anchor?: GestureAnchor | null; cameraScale?: number | null } } | { kind: "updateGesture"; payload: { handle: GestureHandle; delta: [number, number]; modifiers: GestureModifiers } } | { kind: "commitGesture"; payload: { handle: GestureHandle } } | { kind: "cancelGesture"; payload: { handle: GestureHandle } };
|
|
1564
1774
|
|
|
1565
1775
|
/**
|
|
1566
|
-
* Track J — wire-shape mirror of `
|
|
1776
|
+
* Track J — wire-shape mirror of `paged_model::PathAnchor`. The
|
|
1567
1777
|
* parse-side type doesn\'t carry `Deserialize`/`PartialEq`/`Tsify`,
|
|
1568
1778
|
* and the mutate API needs all three so this Op crosses the wasm
|
|
1569
1779
|
* boundary. The field shapes match exactly: `anchor` is the
|
|
@@ -1577,11 +1787,21 @@ export interface PathAnchorSpec {
|
|
|
1577
1787
|
}
|
|
1578
1788
|
|
|
1579
1789
|
/**
|
|
1580
|
-
* Track M — wire-shape mirror of `
|
|
1790
|
+
* Track M — wire-shape mirror of `paged_model::Layer`. Surfaces
|
|
1581
1791
|
* everything the Layers panel needs without leaking parse-side
|
|
1582
|
-
* fields the wasm boundary doesn\'t understand.
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1792
|
+
* fields the wasm boundary doesn\'t understand.
|
|
1793
|
+
*
|
|
1794
|
+
* `z` is the layer\'s zero-based index in `designmap.layers`, and
|
|
1795
|
+
* **`z == 0` is the BACKMOST layer** — the first declared, painted
|
|
1796
|
+
* first. The topmost layer has the HIGHEST z.
|
|
1797
|
+
*
|
|
1798
|
+
* This comment previously said \"top-first … designmap[0] = topmost\",
|
|
1799
|
+
* which is the inversion `paged_scene::layer` records as a real bug
|
|
1800
|
+
* (its module doc: \"Cycle 2\'s Q-10 commit had this inverted\"), fixed
|
|
1801
|
+
* in the renderer and asserted by its own test. The wire comment kept
|
|
1802
|
+
* the wrong version, so a panel author sorting by `z` would have
|
|
1803
|
+
* stacked the list upside down. See `paged_scene::layer` for the
|
|
1804
|
+
* authority.
|
|
1585
1805
|
*/
|
|
1586
1806
|
export interface LayerSummary {
|
|
1587
1807
|
selfId: string;
|
|
@@ -1590,6 +1810,24 @@ export interface LayerSummary {
|
|
|
1590
1810
|
locked: boolean;
|
|
1591
1811
|
printable: boolean;
|
|
1592
1812
|
z: number;
|
|
1813
|
+
/**
|
|
1814
|
+
* v60 — `Self` of the enclosing `<Layer>` when this layer is nested
|
|
1815
|
+
* inside a layer GROUP (folder) in InDesign\'s Layers panel; `None`
|
|
1816
|
+
* for a top-level layer, which is the overwhelmingly common case.
|
|
1817
|
+
*
|
|
1818
|
+
* Mirrors [`paged_model::Layer::parent_id`], which the model has
|
|
1819
|
+
* carried all along — the summary simply dropped it, so every
|
|
1820
|
+
* consumer of this wire type saw a FLAT layer list and a Layers
|
|
1821
|
+
* panel could not render a tree. Added when ADR 023\'s shared-panel
|
|
1822
|
+
* work hit exactly that wall.
|
|
1823
|
+
*
|
|
1824
|
+
* Note the renderer already resolves visibility and lock THROUGH
|
|
1825
|
+
* ancestors (a visible child inside a hidden parent group is
|
|
1826
|
+
* hidden), so `visible`/`locked` here are the layer\'s OWN flags,
|
|
1827
|
+
* not the resolved ones. A panel showing effective state must walk
|
|
1828
|
+
* the chain itself.
|
|
1829
|
+
*/
|
|
1830
|
+
parentId?: string | null;
|
|
1593
1831
|
}
|
|
1594
1832
|
|
|
1595
1833
|
/**
|
|
@@ -1642,7 +1880,7 @@ export type LoadError = { kind: "parse"; message: string } | { kind: "scene"; me
|
|
|
1642
1880
|
* of a specific kind; the apply layer\'s `TypeMismatch` error fires if
|
|
1643
1881
|
* the variant doesn\'t match what the path expects.
|
|
1644
1882
|
*/
|
|
1645
|
-
export type Value = { type: "bounds"; value: [number, number, number, number] } | { type: "colorRef"; value: string | null } | { type: "length"; value: number | null } | { type: "transform"; value: [number, number, number, number, number, number] | null } | { type: "pathPoint"; value: { address: PathPointAddress; position: [number, number] } } | { type: "pathPointInsert"; value: { index: number; anchor: PathAnchorSpec; prevSubpathStarts?: number[] | null } } | { type: "pathPointRemove"; value: { index: number; prevSubpathStarts?: number[] | null } } | { type: "pathPointCurveType"; value: { index: number; smooth: boolean; prev?: PathAnchorSpec | null } } | { type: "pluginMetadata"; value: { key: string; value: string | null; caller?: string | null; prev?: string | null | null } } | { type: "bool"; value: boolean } | { type: "text"; value: string } | { type: "framePath"; value: { anchors: PathAnchorSpec[]; subpathStarts: number[] } } | { type: "pathOpenAt"; value: { index: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "outlineStroke"; value: { width: number; cap: string; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "outlineStrokeVariable"; value: { widths: number[]; cap: string; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "offsetPath"; value: { delta: number; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "simplifyPath"; value: { tolerance: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "gradientFeather"; value: GradientFeatherSpec | null } | { type: "paragraphRule"; value: ParagraphRuleSpec | null } | { type: "tabStops"; value: TabStopSpec[] } | { type: "lengths"; value: number[] };
|
|
1883
|
+
export type Value = { type: "bounds"; value: [number, number, number, number] } | { type: "colorRef"; value: string | null } | { type: "length"; value: number | null } | { type: "transform"; value: [number, number, number, number, number, number] | null } | { type: "pathPoint"; value: { address: PathPointAddress; position: [number, number] } } | { type: "pathPointInsert"; value: { index: number; anchor: PathAnchorSpec; prevSubpathStarts?: number[] | null } } | { type: "pathPointRemove"; value: { index: number; prevSubpathStarts?: number[] | null } } | { type: "pathPointCurveType"; value: { index: number; smooth: boolean; prev?: PathAnchorSpec | null } } | { type: "pluginMetadata"; value: { key: string; value: string | null; caller?: string | null; prev?: string | null | null } } | { type: "bool"; value: boolean } | { type: "text"; value: string } | { type: "framePath"; value: { anchors: PathAnchorSpec[]; subpathStarts: number[] } } | { type: "pathOpenAt"; value: { index: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "outlineStroke"; value: { width: number; cap: string; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "outlineStrokeVariable"; value: { widths: number[]; cap: string; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "offsetPath"; value: { delta: number; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "simplifyPath"; value: { tolerance: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "closePath"; value: { subpath?: number | null; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "gradientFeather"; value: GradientFeatherSpec | null } | { type: "paragraphRule"; value: ParagraphRuleSpec | null } | { type: "tabStops"; value: TabStopSpec[] } | { type: "lengths"; value: number[] };
|
|
1646
1884
|
|
|
1647
1885
|
/**
|
|
1648
1886
|
* Typed property path for `SetProperty` Ops. A closed enum (rather
|
|
@@ -1652,7 +1890,7 @@ export type Value = { type: "bounds"; value: [number, number, number, number] }
|
|
|
1652
1890
|
* (`\"fill.color\"`) — so JS callers don\'t need to learn the Rust
|
|
1653
1891
|
* enum shape.
|
|
1654
1892
|
*/
|
|
1655
|
-
export type PropertyPath = "frameBounds" | "frameFillColor" | "frameStrokeColor" | "frameStrokeWeight" | "frameOpacity" | "frameTransform" | "imageContentTransform" | "framePathPoint" | "pathPointInsert" | "pathPointRemove" | "pathPointCurveType" | "layerVisible" | "layerLocked" | "layerPrintable" | "layerName" | "characterFontSize" | "characterLeading" | "characterTracking" | "characterFillColor" | "paragraphSpaceBefore" | "paragraphSpaceAfter" | "paragraphFirstLineIndent" | "appliedParagraphStyle" | "appliedCharacterStyle" | "appliedObjectStyle" | "appliedCellStyle" | "appliedTableStyle" | "framePath" | "frameNonprinting" | "frameFillTint" | "frameGradientFillAngle" | "frameGradientFillLength" | "frameGradientStrokeAngle" | "frameGradientStrokeLength" | "pathOpenAt" | "outlineStroke" | "outlineStrokeVariable" | "offsetPath" | "simplifyPath" | "frameGradientFeather" | "pageBounds" | "frameDropShadowMode" | "frameDropShadowXOffset" | "frameDropShadowYOffset" | "frameDropShadowSize" | "frameDropShadowOpacity" | "frameDropShadowColor" | "frameDropShadow" | "frameFittingCrops" | "frameFittingType" | "frameTextWrapMode" | "frameTextWrapOffsets" | "frameTextWrapContourType" | "frameTextWrapContourIncludeInside" | "paragraphJustification" | "paragraphStyleNextStyle" | "paragraphAppliedNumberingList" | "frameStrokeEndCap" | "frameInsetSpacing" | "appliedConditions" | "characterFontFamily" | "characterFontStyle" | "characterKerningMethod" | "characterCase" | "characterPosition" | "characterLanguage" | "characterBaselineShift" | "characterHorizontalScale" | "characterVerticalScale" | "characterSkew" | "characterUnderline" | "characterStrikethru" | "characterLigatures" | "characterOtfFeatures" | "paragraphLeftIndent" | "paragraphRightIndent" | "paragraphDropCapCharacters" | "paragraphDropCapLines" | "paragraphHyphenation" | "paragraphKeepLinesTogether" | "paragraphKeepWithNext" | "paragraphRuleAbove" | "paragraphRuleBelow" | "paragraphTabStops" | "paragraphListType" | "paragraphBulletCharacter" | "paragraphNumberingFormat" | "textFrameColumnCount" | "textFrameColumnGutter" | "textFrameColumnBalance" | "textFrameVerticalJustification" | "textFrameAutoSizing" | "textFrameFirstBaseline" | "textWrapInvert" | "frameFittingReferencePoint" | "frameAutoFit" | "frameStrokeType" | "frameStrokeJoin" | "frameStrokeMiterLimit" | "frameStrokeAlignment" | "frameStrokeGapColor" | "frameStrokeGapTint" | "frameStrokeDashArray" | "frameCornerOptionTopLeft" | "frameCornerOptionTopRight" | "frameCornerOptionBottomLeft" | "frameCornerOptionBottomRight" | "frameCornerRadiusTopLeft" | "frameCornerRadiusTopRight" | "frameCornerRadiusBottomLeft" | "frameCornerRadiusBottomRight" | "frameRotationAngle" | "frameScaleX" | "frameScaleY" | "frameFlipH" | "frameFlipV" | "frameOverprintFill" | "frameOverprintStroke" | "frameInnerShadowEnabled" | "frameInnerShadowBlendMode" | "frameInnerShadowColor" | "frameInnerShadowOpacity" | "frameInnerShadowAngle" | "frameInnerShadowDistance" | "frameInnerShadowSize" | "frameInnerShadowChoke" | "frameInnerShadowNoise" | "frameOuterGlowEnabled" | "frameOuterGlowBlendMode" | "frameOuterGlowColor" | "frameOuterGlowOpacity" | "frameOuterGlowSpread" | "frameOuterGlowSize" | "frameOuterGlowNoise" | "frameInnerGlowEnabled" | "frameInnerGlowBlendMode" | "frameInnerGlowColor" | "frameInnerGlowOpacity" | "frameInnerGlowChoke" | "frameInnerGlowSize" | "frameInnerGlowSource" | "frameInnerGlowNoise" | "frameBevelEnabled" | "frameBevelStyle" | "frameBevelTechnique" | "frameBevelDepth" | "frameBevelDirection" | "frameBevelSize" | "frameBevelSoften" | "frameBevelAngle" | "frameBevelAltitude" | "frameBevelHighlightColor" | "frameBevelShadowColor" | "frameBevelHighlightOpacity" | "frameBevelShadowOpacity" | "frameSatinEnabled" | "frameSatinBlendMode" | "frameSatinColor" | "frameSatinOpacity" | "frameSatinAngle" | "frameSatinDistance" | "frameSatinSize" | "frameSatinInvert" | "frameFeatherEnabled" | "frameFeatherWidth" | "frameFeatherCornerType" | "frameFeatherNoise" | "frameFeatherChoke" | "frameDirectionalFeatherEnabled" | "frameDirectionalFeatherLeftWidth" | "frameDirectionalFeatherRightWidth" | "frameDirectionalFeatherTopWidth" | "frameDirectionalFeatherBottomWidth" | "frameDirectionalFeatherAngle" | "frameDirectionalFeatherNoise" | "frameDirectionalFeatherChoke" | "frameBlendMode" | "nextTextFrame" | "previousTextFrame" | "cellFillColor" | "cellFillTint" | "cellInsetTop" | "cellInsetLeft" | "cellInsetBottom" | "cellInsetRight" | "cellVerticalJustification" | "cellTopEdgeStrokeColor" | "cellTopEdgeStrokeWeight" | "cellTopEdgeStrokeTint" | "cellBottomEdgeStrokeColor" | "cellBottomEdgeStrokeWeight" | "cellBottomEdgeStrokeTint" | "cellLeftEdgeStrokeColor" | "cellLeftEdgeStrokeWeight" | "cellLeftEdgeStrokeTint" | "cellRightEdgeStrokeColor" | "cellRightEdgeStrokeWeight" | "cellRightEdgeStrokeTint" | "tableRowCount" | "tableColumnCount" | "pluginMetadata" | "anchoredPosition" | "anchorPoint" | "anchoredXOffset" | "anchoredYOffset" | "anchoredHorizontalReference" | "anchoredVerticalReference" | "anchoredHorizontalAlignment" | "anchoredVerticalAlignment" | "anchoredSpineRelative" | "anchoredLockPosition" | "elementVisible" | "elementLocked" | "frameStrokeStartArrowhead" | "frameStrokeEndArrowhead";
|
|
1893
|
+
export type PropertyPath = "frameBounds" | "frameFillColor" | "frameStrokeColor" | "frameStrokeWeight" | "frameOpacity" | "frameTransform" | "imageContentTransform" | "framePathPoint" | "pathPointInsert" | "pathPointRemove" | "pathPointCurveType" | "layerVisible" | "layerLocked" | "layerPrintable" | "layerName" | "characterFontSize" | "characterLeading" | "characterTracking" | "characterFillColor" | "paragraphSpaceBefore" | "paragraphSpaceAfter" | "paragraphFirstLineIndent" | "appliedParagraphStyle" | "appliedCharacterStyle" | "appliedObjectStyle" | "appliedCellStyle" | "appliedTableStyle" | "framePath" | "frameNonprinting" | "frameFillTint" | "frameGradientFillAngle" | "frameGradientFillLength" | "frameGradientStrokeAngle" | "frameGradientStrokeLength" | "pathOpenAt" | "outlineStroke" | "outlineStrokeVariable" | "offsetPath" | "simplifyPath" | "closePath" | "frameGradientFeather" | "pageBounds" | "frameDropShadowMode" | "frameDropShadowXOffset" | "frameDropShadowYOffset" | "frameDropShadowSize" | "frameDropShadowOpacity" | "frameDropShadowColor" | "frameDropShadow" | "frameFittingCrops" | "frameFittingType" | "frameTextWrapMode" | "frameTextWrapOffsets" | "frameTextWrapContourType" | "frameTextWrapContourIncludeInside" | "paragraphJustification" | "paragraphStyleNextStyle" | "paragraphAppliedNumberingList" | "frameStrokeEndCap" | "frameInsetSpacing" | "appliedConditions" | "characterFontFamily" | "characterFontStyle" | "characterKerningMethod" | "characterCase" | "characterPosition" | "characterLanguage" | "characterBaselineShift" | "characterHorizontalScale" | "characterVerticalScale" | "characterSkew" | "characterUnderline" | "characterStrikethru" | "characterLigatures" | "characterOtfFeatures" | "paragraphLeftIndent" | "paragraphRightIndent" | "paragraphDropCapCharacters" | "paragraphDropCapLines" | "paragraphHyphenation" | "paragraphKeepLinesTogether" | "paragraphKeepWithNext" | "paragraphRuleAbove" | "paragraphRuleBelow" | "paragraphTabStops" | "paragraphListType" | "paragraphBulletCharacter" | "paragraphNumberingFormat" | "textFrameColumnCount" | "textFrameColumnGutter" | "textFrameColumnBalance" | "textFrameVerticalJustification" | "textFrameAutoSizing" | "textFrameFirstBaseline" | "textWrapInvert" | "frameFittingReferencePoint" | "frameAutoFit" | "frameStrokeType" | "frameStrokeJoin" | "frameStrokeMiterLimit" | "frameStrokeAlignment" | "frameStrokeGapColor" | "frameStrokeGapTint" | "frameStrokeDashArray" | "frameCornerOptionTopLeft" | "frameCornerOptionTopRight" | "frameCornerOptionBottomLeft" | "frameCornerOptionBottomRight" | "frameCornerRadiusTopLeft" | "frameCornerRadiusTopRight" | "frameCornerRadiusBottomLeft" | "frameCornerRadiusBottomRight" | "frameRotationAngle" | "frameScaleX" | "frameScaleY" | "frameFlipH" | "frameFlipV" | "frameOverprintFill" | "frameOverprintStroke" | "frameInnerShadowEnabled" | "frameInnerShadowBlendMode" | "frameInnerShadowColor" | "frameInnerShadowOpacity" | "frameInnerShadowAngle" | "frameInnerShadowDistance" | "frameInnerShadowSize" | "frameInnerShadowChoke" | "frameInnerShadowNoise" | "frameOuterGlowEnabled" | "frameOuterGlowBlendMode" | "frameOuterGlowColor" | "frameOuterGlowOpacity" | "frameOuterGlowSpread" | "frameOuterGlowSize" | "frameOuterGlowNoise" | "frameInnerGlowEnabled" | "frameInnerGlowBlendMode" | "frameInnerGlowColor" | "frameInnerGlowOpacity" | "frameInnerGlowChoke" | "frameInnerGlowSize" | "frameInnerGlowSource" | "frameInnerGlowNoise" | "frameBevelEnabled" | "frameBevelStyle" | "frameBevelTechnique" | "frameBevelDepth" | "frameBevelDirection" | "frameBevelSize" | "frameBevelSoften" | "frameBevelAngle" | "frameBevelAltitude" | "frameBevelHighlightColor" | "frameBevelShadowColor" | "frameBevelHighlightOpacity" | "frameBevelShadowOpacity" | "frameSatinEnabled" | "frameSatinBlendMode" | "frameSatinColor" | "frameSatinOpacity" | "frameSatinAngle" | "frameSatinDistance" | "frameSatinSize" | "frameSatinInvert" | "frameFeatherEnabled" | "frameFeatherWidth" | "frameFeatherCornerType" | "frameFeatherNoise" | "frameFeatherChoke" | "frameDirectionalFeatherEnabled" | "frameDirectionalFeatherLeftWidth" | "frameDirectionalFeatherRightWidth" | "frameDirectionalFeatherTopWidth" | "frameDirectionalFeatherBottomWidth" | "frameDirectionalFeatherAngle" | "frameDirectionalFeatherNoise" | "frameDirectionalFeatherChoke" | "frameBlendMode" | "nextTextFrame" | "previousTextFrame" | "cellFillColor" | "cellFillTint" | "cellInsetTop" | "cellInsetLeft" | "cellInsetBottom" | "cellInsetRight" | "cellVerticalJustification" | "cellTopEdgeStrokeColor" | "cellTopEdgeStrokeWeight" | "cellTopEdgeStrokeTint" | "cellBottomEdgeStrokeColor" | "cellBottomEdgeStrokeWeight" | "cellBottomEdgeStrokeTint" | "cellLeftEdgeStrokeColor" | "cellLeftEdgeStrokeWeight" | "cellLeftEdgeStrokeTint" | "cellRightEdgeStrokeColor" | "cellRightEdgeStrokeWeight" | "cellRightEdgeStrokeTint" | "tableRowCount" | "tableColumnCount" | "pluginMetadata" | "anchoredPosition" | "anchorPoint" | "anchoredXOffset" | "anchoredYOffset" | "anchoredHorizontalReference" | "anchoredVerticalReference" | "anchoredHorizontalAlignment" | "anchoredVerticalAlignment" | "anchoredSpineRelative" | "anchoredLockPosition" | "elementVisible" | "elementLocked" | "frameStrokeStartArrowhead" | "frameStrokeEndArrowhead";
|
|
1656
1894
|
|
|
1657
1895
|
/**
|
|
1658
1896
|
* Typed worker-side error for non-load operations. Mutations,
|
|
@@ -1662,20 +1900,7 @@ export type PropertyPath = "frameBounds" | "frameFillColor" | "frameStrokeColor"
|
|
|
1662
1900
|
export type WorkerError = { kind: "notImplemented"; details: { what: string } } | { kind: "unknownPage"; details: { pageId: PageId } } | { kind: "noDocument" };
|
|
1663
1901
|
|
|
1664
1902
|
/**
|
|
1665
|
-
* W0.2 — wire mirror of `
|
|
1666
|
-
* path replaces the paragraph\'s whole `<TabList>` in one op; `Value`
|
|
1667
|
-
* has no per-element list-edit form, so the UI sends the full new
|
|
1668
|
-
* stop list (the gradient-feather stop-list precedent).
|
|
1669
|
-
*/
|
|
1670
|
-
export interface TabStopSpec {
|
|
1671
|
-
position: number;
|
|
1672
|
-
alignment?: string | null;
|
|
1673
|
-
alignmentCharacter?: string | null;
|
|
1674
|
-
leader?: string | null;
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
|
-
/**
|
|
1678
|
-
* W0.2 — wire mirror of `paged_parse::styles::ParagraphRule` (the
|
|
1903
|
+
* W0.2 — wire mirror of `paged_model::ParagraphRule` (the
|
|
1679
1904
|
* AST type predates `Tsify`; the mirror keeps the op wire-shaped,
|
|
1680
1905
|
* the `GradientFeatherSpec` precedent). Carries every field the
|
|
1681
1906
|
* parser models so the whole-struct `ParagraphRuleAbove` /
|
|
@@ -1693,10 +1918,17 @@ export interface ParagraphRuleSpec {
|
|
|
1693
1918
|
}
|
|
1694
1919
|
|
|
1695
1920
|
/**
|
|
1696
|
-
* W0.
|
|
1697
|
-
*
|
|
1921
|
+
* W0.2 — wire mirror of `paged_model::TabStop`. The `ParagraphTabStops`
|
|
1922
|
+
* path replaces the paragraph\'s whole `<TabList>` in one op; `Value`
|
|
1923
|
+
* has no per-element list-edit form, so the UI sends the full new
|
|
1924
|
+
* stop list (the gradient-feather stop-list precedent).
|
|
1698
1925
|
*/
|
|
1699
|
-
export
|
|
1926
|
+
export interface TabStopSpec {
|
|
1927
|
+
position: number;
|
|
1928
|
+
alignment?: string | null;
|
|
1929
|
+
alignmentCharacter?: string | null;
|
|
1930
|
+
leader?: string | null;
|
|
1931
|
+
}
|
|
1700
1932
|
|
|
1701
1933
|
/**
|
|
1702
1934
|
* W0.5 — the kind of field marker inserted by
|
|
@@ -1704,12 +1936,12 @@ export type StyleScope = "paragraph" | "character";
|
|
|
1704
1936
|
* built-ins (single private-use marker chars the renderer
|
|
1705
1937
|
* substitutes); v43 (D-01) adds the plugin `Placeholder` — a tagged,
|
|
1706
1938
|
* edit-surviving anchor run whose text is the field\'s cached display
|
|
1707
|
-
* value (see `
|
|
1939
|
+
* value (see `paged_model::PlaceholderField`).
|
|
1708
1940
|
*/
|
|
1709
1941
|
export type FieldKind = "pageNumber" | "nextPageNumber" | { placeholder: { plugin: string; key: string; value?: string | undefined } };
|
|
1710
1942
|
|
|
1711
1943
|
/**
|
|
1712
|
-
* W0.5 — wire mirror of `
|
|
1944
|
+
* W0.5 — wire mirror of `paged_model::GuideOrientation`
|
|
1713
1945
|
* (which is `Deserialize` but lives in the parse crate; kept here so
|
|
1714
1946
|
* the operation wire type doesn\'t depend on the parser\'s
|
|
1715
1947
|
* serialization shape).
|
|
@@ -1723,7 +1955,7 @@ export type GuideOrientationSpec = "vertical" | "horizontal";
|
|
|
1723
1955
|
* ## The two-stream addressing model
|
|
1724
1956
|
*
|
|
1725
1957
|
* Table-cell text is stored out of band on `Table.cells[].paragraphs`
|
|
1726
|
-
* (see `
|
|
1958
|
+
* (see `idml_import`), disjoint from `Story.paragraphs`. So a content
|
|
1727
1959
|
* address needs to say *which* paragraph stream its byte offsets index:
|
|
1728
1960
|
*
|
|
1729
1961
|
* - `ContentSelection.cell == None` — offsets are story-local bytes
|
|
@@ -1803,7 +2035,7 @@ export interface NumberingListSummary {
|
|
|
1803
2035
|
|
|
1804
2036
|
/**
|
|
1805
2037
|
* W1.22 (engine gap 22) — wire description of a `<NumberingList>`
|
|
1806
|
-
* resource, mirroring `
|
|
2038
|
+
* resource, mirroring `paged_model::NumberingListDef`. The
|
|
1807
2039
|
* CRUD ops (`CreateNumberingList` / `EditNumberingList` /
|
|
1808
2040
|
* `DeleteNumberingList`) carry this. `self_id` is minted
|
|
1809
2041
|
* (`NumberingList/u<n>`) when absent on create; echoed resolved in
|
|
@@ -1923,6 +2155,19 @@ export interface ResolutionResult {
|
|
|
1923
2155
|
*/
|
|
1924
2156
|
export type HitFilter = "frame" | "text" | "any";
|
|
1925
2157
|
|
|
2158
|
+
/**
|
|
2159
|
+
* Where a story\'s flow overran its frame chain — the first-class overset
|
|
2160
|
+
* **continuation** the engine records (`paged_flow::Overset::Remains`, via
|
|
2161
|
+
* `RenderDiagnostics::overset_continuations()`). Lets the editor jump the
|
|
2162
|
+
* caret to the first clipped line / show \"overset at ¶N line M\" instead of
|
|
2163
|
+
* only a boolean overset badge. Addresses match the layout stream
|
|
2164
|
+
* (`paragraph` within the story\'s body flow, `line` within that paragraph).
|
|
2165
|
+
*/
|
|
2166
|
+
export interface OversetAt {
|
|
2167
|
+
paragraph: number;
|
|
2168
|
+
line: number;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
1926
2171
|
/**
|
|
1927
2172
|
* Which runtime budget a script exhausted (B-09 / W-08). The typed
|
|
1928
2173
|
* half of a `ScriptResult`: lets the host distinguish a budget abort
|
|
@@ -1966,7 +2211,7 @@ export interface GradientSpec {
|
|
|
1966
2211
|
|
|
1967
2212
|
/**
|
|
1968
2213
|
* Wire-format description of a colour swatch (`<Color>`), mirroring
|
|
1969
|
-
* the editable fields of `
|
|
2214
|
+
* the editable fields of `paged_model::ColorEntry` with primitive,
|
|
1970
2215
|
* `Deserialize`-able types (the AST `ColorEntry` is `Serialize`-only).
|
|
1971
2216
|
* Carried by the swatch-collection mutations so create / edit /
|
|
1972
2217
|
* delete-undo are lossless. `space` / `model` / `alternate_space` are
|
|
@@ -2004,6 +2249,11 @@ export interface SwatchSpec {
|
|
|
2004
2249
|
*/
|
|
2005
2250
|
export type GestureFailure = { kind: "noDocument" } | { kind: "unsupportedGesture"; details: { reason: string } } | { kind: "alreadyActive"; details: { handle: GestureHandle } } | { kind: "handleMismatch" } | { kind: "elementNotFound"; details: { id: ElementId } } | { kind: "rotatedFrameUnsupported" } | { kind: "emptySelection" } | { kind: "missingAnchor" } | { kind: "unknownAnchorPage"; details: { page_id: PageId } } | { kind: "other"; details: { message: string } };
|
|
2006
2251
|
|
|
2252
|
+
/**
|
|
2253
|
+
* [`Operation::ApplyStyle`].
|
|
2254
|
+
*/
|
|
2255
|
+
export type StyleScope = "paragraph" | "character";
|
|
2256
|
+
|
|
2007
2257
|
/**
|
|
2008
2258
|
* `RequestLineBounds` reply payload.
|
|
2009
2259
|
*/
|
|
@@ -2163,6 +2413,143 @@ export interface ProviderTileWire {
|
|
|
2163
2413
|
rgba: number[];
|
|
2164
2414
|
}
|
|
2165
2415
|
|
|
2416
|
+
/**
|
|
2417
|
+
* v59 — where [`Operation::ReorderNode`] puts its target inside the
|
|
2418
|
+
* sibling list it already belongs to.
|
|
2419
|
+
*
|
|
2420
|
+
* **Both forms deliberately ship.** The four RELATIVE verbs are what a
|
|
2421
|
+
* UI and a plugin can actually express: they are read-modify-write
|
|
2422
|
+
* against whatever the list happens to be at apply time, so a
|
|
2423
|
+
* concurrent insert or delete between \"the caller read the order\" and
|
|
2424
|
+
* \"the engine applied the op\" cannot silently restack the wrong item —
|
|
2425
|
+
* there is no stale index to be wrong. They map 1:1 onto the Arrange
|
|
2426
|
+
* menu every DTP app ships (Illustrator\'s Object ▸ Arrange, InDesign\'s
|
|
2427
|
+
* Object ▸ Arrange, PowerPoint\'s Bring Forward…).
|
|
2428
|
+
*
|
|
2429
|
+
* [`ZOrderTarget::Index`] is the absolute form, and it is what makes
|
|
2430
|
+
* the inverse EXACT: the apply layer records the slot the node came
|
|
2431
|
+
* from and hands back `Index(that slot)`. It is also the honest way to
|
|
2432
|
+
* express \"restore this exact order\" for a drag in a layers panel.
|
|
2433
|
+
* Because an absolute index CAN go stale, an out-of-range `Index` is
|
|
2434
|
+
* rejected loudly (`OperationError::InvalidPosition`) instead of being
|
|
2435
|
+
* clamped — a caller working from a stale model should hear about it.
|
|
2436
|
+
*
|
|
2437
|
+
* Serialised externally-tagged (the [`FieldKind`] convention):
|
|
2438
|
+
* `\"front\"` / `\"back\"` / `\"forward\"` / `\"backward\"` / `{\"index\": 3}`.
|
|
2439
|
+
*/
|
|
2440
|
+
export type ZOrderTarget = "front" | "back" | "forward" | "backward" | { index: number };
|
|
2441
|
+
|
|
2442
|
+
/**
|
|
2443
|
+
* §21 advanced prepress — one ink plate\'s coverage on one page.
|
|
2444
|
+
*
|
|
2445
|
+
* `area_pct` is the share of the WHOLE page this plate puts any ink
|
|
2446
|
+
* on — the \"does this plate earn its pass on press\" number.
|
|
2447
|
+
* `max_tint_pct` / `mean_tint_pct` describe how heavily, over the
|
|
2448
|
+
* inked pixels only.
|
|
2449
|
+
*/
|
|
2450
|
+
export interface PlateCoverageSummary {
|
|
2451
|
+
/**
|
|
2452
|
+
* `\"cyan\"` / `\"magenta\"` / `\"yellow\"` / `\"black\"` for the process
|
|
2453
|
+
* inks; the spot swatch\'s `Color/<id>` for a named ink — the same
|
|
2454
|
+
* id `InkSummary::spot_id` uses, so the Ink Manager and this
|
|
2455
|
+
* surface address the same ink.
|
|
2456
|
+
*/
|
|
2457
|
+
inkId: string;
|
|
2458
|
+
/**
|
|
2459
|
+
* Display name: `\"Cyan\"` … `\"Black\"`, or the spot swatch\'s
|
|
2460
|
+
* palette name (falling back to its id).
|
|
2461
|
+
*/
|
|
2462
|
+
name: string;
|
|
2463
|
+
isSpot: boolean;
|
|
2464
|
+
areaPct: number;
|
|
2465
|
+
maxTintPct: number;
|
|
2466
|
+
meanTintPct: number;
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
/**
|
|
2470
|
+
* §21 advanced prepress — one page\'s ink-coverage reading, produced
|
|
2471
|
+
* by rasterising the page and reading the CPU rasterizer\'s per-ink
|
|
2472
|
+
* plane state.
|
|
2473
|
+
*
|
|
2474
|
+
* # Read `separated_pct` before quoting any other number
|
|
2475
|
+
*
|
|
2476
|
+
* The raster lane only decomposes a pixel into inks when the draw
|
|
2477
|
+
* that made it carried a CMYK or spot swatch. Placed images, RGB and
|
|
2478
|
+
* Lab swatches, gradients, and anything inside a blend group carry no
|
|
2479
|
+
* ink decomposition — those pixels are **unknown**, not blank, and
|
|
2480
|
+
* every statistic below excludes them. `separatedPct` is how much of
|
|
2481
|
+
* the page was actually measured. A `maxTacPct` of 340 over a
|
|
2482
|
+
* `separatedPct` of 4 is a statement about 4% of the page.
|
|
2483
|
+
*
|
|
2484
|
+
* Nothing here estimates the unknown pixels. The renderer\'s RGB→CMYK
|
|
2485
|
+
* map is 100%-GCR (a rich black inverts to K-only / 100% TAC where a
|
|
2486
|
+
* real coated profile gives ~300%), so folding it in would make the
|
|
2487
|
+
* headline figure confidently wrong exactly where operators check it.
|
|
2488
|
+
*/
|
|
2489
|
+
export interface InkCoverageSummary {
|
|
2490
|
+
pageId: PageId;
|
|
2491
|
+
pageIndex: number;
|
|
2492
|
+
/**
|
|
2493
|
+
* **Check this first.** `false` means the document has no active
|
|
2494
|
+
* CMYK working profile (none supplied at load, none named by the
|
|
2495
|
+
* designmap that the host had registered, no soft proof), and
|
|
2496
|
+
* therefore the renderer resolved every CMYK and spot swatch
|
|
2497
|
+
* straight to display RGB — there is no ink lane at all and every
|
|
2498
|
+
* figure below is structurally zero.
|
|
2499
|
+
*
|
|
2500
|
+
* That is a completely different condition from \"this page is all
|
|
2501
|
+
* RGB artwork\", and a surface MUST NOT render them the same way:
|
|
2502
|
+
* one says *activate a profile*, the other says *this content
|
|
2503
|
+
* separates at the RIP*. Both produce `separatedPct == 0`.
|
|
2504
|
+
*
|
|
2505
|
+
* `SwatchSummary::totalAreaCoveragePct` is unaffected — it is
|
|
2506
|
+
* palette arithmetic and needs no profile — so the swatch-level
|
|
2507
|
+
* ink-limit audit still works when this is `false`.
|
|
2508
|
+
*/
|
|
2509
|
+
separationAvailable: boolean;
|
|
2510
|
+
/**
|
|
2511
|
+
* Sampling resolution of the analysis render, in dpi. An area
|
|
2512
|
+
* measurement is dpi-independent for solid tints; anti-aliased
|
|
2513
|
+
* edges dilute their ink with the paper they partly cover, so
|
|
2514
|
+
* sub-pixel hairlines under-report. Check hairline rich blacks
|
|
2515
|
+
* against `SwatchSummary::totalAreaCoveragePct`, which is exact.
|
|
2516
|
+
*/
|
|
2517
|
+
analysisDpi: number;
|
|
2518
|
+
/**
|
|
2519
|
+
* The total-area-coverage limit `overLimitPixels` was counted
|
|
2520
|
+
* against, in percent.
|
|
2521
|
+
*/
|
|
2522
|
+
limitPct: number;
|
|
2523
|
+
totalPixels: number;
|
|
2524
|
+
separatedPixels: number;
|
|
2525
|
+
/**
|
|
2526
|
+
* `separatedPixels / totalPixels`, 0..=100. The honesty
|
|
2527
|
+
* denominator — see the type docs.
|
|
2528
|
+
*/
|
|
2529
|
+
separatedPct: number;
|
|
2530
|
+
maxTacPct: number;
|
|
2531
|
+
meanTacPct: number;
|
|
2532
|
+
overLimitPixels: number;
|
|
2533
|
+
/**
|
|
2534
|
+
* Share of the SEPARATED pixels over the limit, 0..=100.
|
|
2535
|
+
*/
|
|
2536
|
+
overLimitPct: number;
|
|
2537
|
+
/**
|
|
2538
|
+
* Four process plates always, then one per spot ink used on the
|
|
2539
|
+
* page. A blank process plate still appears — \"Cyan: 0%\" is
|
|
2540
|
+
* itself a reading.
|
|
2541
|
+
*/
|
|
2542
|
+
plates: PlateCoverageSummary[];
|
|
2543
|
+
/**
|
|
2544
|
+
* 81 counts over the separated pixels, bucket `i` covering
|
|
2545
|
+
* `[i·10%, (i+1)·10%)` of total area coverage (so 0–800%, which
|
|
2546
|
+
* leaves room for spot plates above the 400% process ceiling).
|
|
2547
|
+
* Lets a panel re-threshold the ink limit with a slider and no
|
|
2548
|
+
* re-render.
|
|
2549
|
+
*/
|
|
2550
|
+
histogram: number[];
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2166
2553
|
export interface CaretGeometry {
|
|
2167
2554
|
pageId: PageId;
|
|
2168
2555
|
frameId: string | null;
|
|
@@ -2456,9 +2843,9 @@ export interface InitOutput {
|
|
|
2456
2843
|
readonly qcms_white_point_sRGB: (a: number) => void;
|
|
2457
2844
|
readonly lut_inverse_interp16: (a: number, b: number, c: number) => number;
|
|
2458
2845
|
readonly lut_interp_linear16: (a: number, b: number, c: number) => number;
|
|
2459
|
-
readonly
|
|
2460
|
-
readonly
|
|
2461
|
-
readonly
|
|
2846
|
+
readonly wasm_bindgen__convert__closures_____invoke__hba9dab33e391dce8: (a: number, b: number, c: any) => [number, number];
|
|
2847
|
+
readonly wasm_bindgen__convert__closures_____invoke__h2a9a86477ca3734e: (a: number, b: number, c: any, d: any) => void;
|
|
2848
|
+
readonly wasm_bindgen__convert__closures_____invoke__h84d34b615e684f5e: (a: number, b: number, c: any) => void;
|
|
2462
2849
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
2463
2850
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
2464
2851
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/paged_canvas_wasm.js
CHANGED
|
@@ -803,7 +803,7 @@ function __wbg_get_imports() {
|
|
|
803
803
|
const a = state0.a;
|
|
804
804
|
state0.a = 0;
|
|
805
805
|
try {
|
|
806
|
-
return
|
|
806
|
+
return wasm_bindgen__convert__closures_____invoke__h2a9a86477ca3734e(a, state0.b, arg0, arg1);
|
|
807
807
|
} finally {
|
|
808
808
|
state0.a = a;
|
|
809
809
|
}
|
|
@@ -1480,13 +1480,13 @@ function __wbg_get_imports() {
|
|
|
1480
1480
|
arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
|
|
1481
1481
|
}, arguments); },
|
|
1482
1482
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1483
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1484
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1483
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 4832, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1484
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h84d34b615e684f5e);
|
|
1485
1485
|
return ret;
|
|
1486
1486
|
},
|
|
1487
1487
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1488
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1489
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1488
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5773, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1489
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hba9dab33e391dce8);
|
|
1490
1490
|
return ret;
|
|
1491
1491
|
},
|
|
1492
1492
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -1527,19 +1527,19 @@ function __wbg_get_imports() {
|
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
1529
|
|
|
1530
|
-
function
|
|
1531
|
-
wasm.
|
|
1530
|
+
function wasm_bindgen__convert__closures_____invoke__h84d34b615e684f5e(arg0, arg1, arg2) {
|
|
1531
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h84d34b615e684f5e(arg0, arg1, arg2);
|
|
1532
1532
|
}
|
|
1533
1533
|
|
|
1534
|
-
function
|
|
1535
|
-
const ret = wasm.
|
|
1534
|
+
function wasm_bindgen__convert__closures_____invoke__hba9dab33e391dce8(arg0, arg1, arg2) {
|
|
1535
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__hba9dab33e391dce8(arg0, arg1, arg2);
|
|
1536
1536
|
if (ret[1]) {
|
|
1537
1537
|
throw takeFromExternrefTable0(ret[0]);
|
|
1538
1538
|
}
|
|
1539
1539
|
}
|
|
1540
1540
|
|
|
1541
|
-
function
|
|
1542
|
-
wasm.
|
|
1541
|
+
function wasm_bindgen__convert__closures_____invoke__h2a9a86477ca3734e(arg0, arg1, arg2, arg3) {
|
|
1542
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h2a9a86477ca3734e(arg0, arg1, arg2, arg3);
|
|
1543
1543
|
}
|
|
1544
1544
|
|
|
1545
1545
|
|
|
Binary file
|