@paged-media/canvas-wasm 0.51.0 → 0.61.1
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 +479 -41
- 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
|
*/
|
|
@@ -734,7 +918,31 @@ export type GestureHandle = number;
|
|
|
734
918
|
*/
|
|
735
919
|
export interface ElementGeometryItem {
|
|
736
920
|
id: ElementId;
|
|
737
|
-
|
|
921
|
+
/**
|
|
922
|
+
* C-23 — the page this element sits on, or `None` when it sits on
|
|
923
|
+
* the PASTEBOARD and belongs to no page.
|
|
924
|
+
*
|
|
925
|
+
* This used to be a plain `PageId`, and the door did not report a
|
|
926
|
+
* pageless element as pageless — it dropped it from the reply
|
|
927
|
+
* entirely, so a plugin that generated art off-page (paged.draw\'s
|
|
928
|
+
* pattern bake, stepping a tile past the page edge) created and
|
|
929
|
+
* grouped something it then could not read back.
|
|
930
|
+
*
|
|
931
|
+
* **The convention `None` carries:** `bounds` + `item_transform`
|
|
932
|
+
* compose against the SPREAD origin rather than a page origin.
|
|
933
|
+
* `spread_id` names which spread, because without it the answer is
|
|
934
|
+
* unusable the moment a document has two.
|
|
935
|
+
*
|
|
936
|
+
* Runtime-safe to widen: every element of every existing document
|
|
937
|
+
* is on a page, so no existing reply changes shape. The `None`
|
|
938
|
+
* only appears for items this door used to omit.
|
|
939
|
+
*/
|
|
940
|
+
pageId?: PageId | null;
|
|
941
|
+
/**
|
|
942
|
+
* C-23 — the owning spread. Always populated; the page-owned case
|
|
943
|
+
* carries it too, so a consumer never has to ask a second door.
|
|
944
|
+
*/
|
|
945
|
+
spreadId?: string | null;
|
|
738
946
|
/**
|
|
739
947
|
* `[top, left, bottom, right]`.
|
|
740
948
|
*/
|
|
@@ -957,6 +1165,12 @@ export interface StorySummary {
|
|
|
957
1165
|
* Preflight panel + the red \"+\" overset badge on the frame.
|
|
958
1166
|
*/
|
|
959
1167
|
overset?: boolean;
|
|
1168
|
+
/**
|
|
1169
|
+
* When `overset`, *where* the flow overran — the continuation cursor
|
|
1170
|
+
* (`OversetAt`). `None` when the story fits. Additive/optional, so an
|
|
1171
|
+
* older client that ignores it still reads the `overset` flag.
|
|
1172
|
+
*/
|
|
1173
|
+
oversetAt?: OversetAt;
|
|
960
1174
|
}
|
|
961
1175
|
|
|
962
1176
|
/**
|
|
@@ -979,6 +1193,26 @@ export interface SwatchSummary {
|
|
|
979
1193
|
selfId: string;
|
|
980
1194
|
name: string;
|
|
981
1195
|
kind: string;
|
|
1196
|
+
/**
|
|
1197
|
+
* §21 advanced prepress — the swatch\'s total area coverage in
|
|
1198
|
+
* percent: how much ink every press plate lays down for it,
|
|
1199
|
+
* summed. A process CMYK swatch sums its four channels (a 60/40/
|
|
1200
|
+
* 40/100 rich black is 240%); a spot swatch is ONE plate, so it
|
|
1201
|
+
* contributes its own tint (100% PANTONE 286 C is 100%, not the
|
|
1202
|
+
* 175% its CMYK alternate would sum to).
|
|
1203
|
+
*
|
|
1204
|
+
* `None` — not `0.0` — when the swatch has no ink decomposition:
|
|
1205
|
+
* RGB, Lab, mixed-ink and unknown swatches separate at the RIP,
|
|
1206
|
+
* not here. The distinction is load-bearing; a UI must show a
|
|
1207
|
+
* blank, never a zero.
|
|
1208
|
+
*
|
|
1209
|
+
* This is the EXACT reading, computed from the palette with no
|
|
1210
|
+
* render involved, so it is resolution-free and catches an
|
|
1211
|
+
* over-limit colour wherever it is used — including in hairlines
|
|
1212
|
+
* that the rendered per-page coverage under-samples. Additive
|
|
1213
|
+
* read-only field; no protocol bump on its own.
|
|
1214
|
+
*/
|
|
1215
|
+
totalAreaCoveragePct?: number | null;
|
|
982
1216
|
}
|
|
983
1217
|
|
|
984
1218
|
/**
|
|
@@ -996,7 +1230,7 @@ export interface SwatchSummary {
|
|
|
996
1230
|
* `serde_json::Value::Array` for unimplemented entries, surfacing
|
|
997
1231
|
* a runtime warning rather than a panic.
|
|
998
1232
|
*/
|
|
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";
|
|
1233
|
+
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
1234
|
|
|
1001
1235
|
/**
|
|
1002
1236
|
* SDK Phase 5 (D1) — singleton document-level state. Per
|
|
@@ -1372,6 +1606,25 @@ export interface LinkSummary {
|
|
|
1372
1606
|
* 300-ppi floor. `None` when the IDML omits it.
|
|
1373
1607
|
*/
|
|
1374
1608
|
effectivePpi?: number | null;
|
|
1609
|
+
/**
|
|
1610
|
+
* C-27 — the placed image\'s OWN `<Image ItemTransform>`: how the
|
|
1611
|
+
* pixels sit inside the frame. `elementGeometry` reports the frame
|
|
1612
|
+
* and nothing reported this, so a plugin deriving geometry from the
|
|
1613
|
+
* pixels (Image Trace today; any measure or annotate tool later)
|
|
1614
|
+
* had to assume the image fills the frame — and quietly mis-placed
|
|
1615
|
+
* its output on every cropped or fitted placement.
|
|
1616
|
+
*
|
|
1617
|
+
* Row-major `[a, b, c, d, tx, ty]`, mapping the image\'s natural
|
|
1618
|
+
* pixel rect `(0, 0, width, height)` into the frame\'s INNER
|
|
1619
|
+
* coordinate space — the same matrix the renderer composes with
|
|
1620
|
+
* the frame\'s own transform. Compose it the same way and generated
|
|
1621
|
+
* geometry lands where the pixels do.
|
|
1622
|
+
*
|
|
1623
|
+
* `None` for synthetic IDMLs that omit the inner transform, which
|
|
1624
|
+
* is the case the renderer handles by stretching the image to the
|
|
1625
|
+
* frame bounds; a consumer seeing `None` may assume that fill.
|
|
1626
|
+
*/
|
|
1627
|
+
imageTransform?: [number, number, number, number, number, number] | null;
|
|
1375
1628
|
}
|
|
1376
1629
|
|
|
1377
1630
|
/**
|
|
@@ -1486,7 +1739,15 @@ export type PageId = string;
|
|
|
1486
1739
|
*/
|
|
1487
1740
|
export interface PathAnchorsResult {
|
|
1488
1741
|
id: ElementId;
|
|
1489
|
-
|
|
1742
|
+
/**
|
|
1743
|
+
* C-23 — see [`ElementGeometryItem::page_id`]; same convention,
|
|
1744
|
+
* same reason. Anchors are in the element\'s own space either way.
|
|
1745
|
+
*/
|
|
1746
|
+
pageId?: PageId | null;
|
|
1747
|
+
/**
|
|
1748
|
+
* C-23 — the owning spread; see [`ElementGeometryItem::spread_id`].
|
|
1749
|
+
*/
|
|
1750
|
+
spreadId?: string | null;
|
|
1490
1751
|
anchors: PathAnchorTriple[];
|
|
1491
1752
|
/**
|
|
1492
1753
|
* Per-contour boundaries. Empty for the common single-contour
|
|
@@ -1551,7 +1812,7 @@ export interface DocumentStats {
|
|
|
1551
1812
|
* document\'s `BTreeMap` palettes/stylesheets rather than the scene
|
|
1552
1813
|
* tree, so they\'re top-level variants rather than `InsertNode`.
|
|
1553
1814
|
*/
|
|
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 };
|
|
1815
|
+
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
1816
|
|
|
1556
1817
|
/**
|
|
1557
1818
|
* The discriminated payload of a `MainToWorker` message. Tagged so
|
|
@@ -1560,10 +1821,10 @@ export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath;
|
|
|
1560
1821
|
* variants so e.g. `cmyk_icc_profile` becomes `cmykIccProfile` on
|
|
1561
1822
|
* the wire — the TS protocol mirror locks the camelCase contract.
|
|
1562
1823
|
*/
|
|
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 } };
|
|
1824
|
+
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; caller?: string } } | { 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[]; caller?: string } } | { 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
1825
|
|
|
1565
1826
|
/**
|
|
1566
|
-
* Track J — wire-shape mirror of `
|
|
1827
|
+
* Track J — wire-shape mirror of `paged_model::PathAnchor`. The
|
|
1567
1828
|
* parse-side type doesn\'t carry `Deserialize`/`PartialEq`/`Tsify`,
|
|
1568
1829
|
* and the mutate API needs all three so this Op crosses the wasm
|
|
1569
1830
|
* boundary. The field shapes match exactly: `anchor` is the
|
|
@@ -1577,11 +1838,21 @@ export interface PathAnchorSpec {
|
|
|
1577
1838
|
}
|
|
1578
1839
|
|
|
1579
1840
|
/**
|
|
1580
|
-
* Track M — wire-shape mirror of `
|
|
1841
|
+
* Track M — wire-shape mirror of `paged_model::Layer`. Surfaces
|
|
1581
1842
|
* everything the Layers panel needs without leaking parse-side
|
|
1582
|
-
* fields the wasm boundary doesn\'t understand.
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1843
|
+
* fields the wasm boundary doesn\'t understand.
|
|
1844
|
+
*
|
|
1845
|
+
* `z` is the layer\'s zero-based index in `designmap.layers`, and
|
|
1846
|
+
* **`z == 0` is the BACKMOST layer** — the first declared, painted
|
|
1847
|
+
* first. The topmost layer has the HIGHEST z.
|
|
1848
|
+
*
|
|
1849
|
+
* This comment previously said \"top-first … designmap[0] = topmost\",
|
|
1850
|
+
* which is the inversion `paged_scene::layer` records as a real bug
|
|
1851
|
+
* (its module doc: \"Cycle 2\'s Q-10 commit had this inverted\"), fixed
|
|
1852
|
+
* in the renderer and asserted by its own test. The wire comment kept
|
|
1853
|
+
* the wrong version, so a panel author sorting by `z` would have
|
|
1854
|
+
* stacked the list upside down. See `paged_scene::layer` for the
|
|
1855
|
+
* authority.
|
|
1585
1856
|
*/
|
|
1586
1857
|
export interface LayerSummary {
|
|
1587
1858
|
selfId: string;
|
|
@@ -1590,6 +1861,24 @@ export interface LayerSummary {
|
|
|
1590
1861
|
locked: boolean;
|
|
1591
1862
|
printable: boolean;
|
|
1592
1863
|
z: number;
|
|
1864
|
+
/**
|
|
1865
|
+
* v60 — `Self` of the enclosing `<Layer>` when this layer is nested
|
|
1866
|
+
* inside a layer GROUP (folder) in InDesign\'s Layers panel; `None`
|
|
1867
|
+
* for a top-level layer, which is the overwhelmingly common case.
|
|
1868
|
+
*
|
|
1869
|
+
* Mirrors [`paged_model::Layer::parent_id`], which the model has
|
|
1870
|
+
* carried all along — the summary simply dropped it, so every
|
|
1871
|
+
* consumer of this wire type saw a FLAT layer list and a Layers
|
|
1872
|
+
* panel could not render a tree. Added when ADR 023\'s shared-panel
|
|
1873
|
+
* work hit exactly that wall.
|
|
1874
|
+
*
|
|
1875
|
+
* Note the renderer already resolves visibility and lock THROUGH
|
|
1876
|
+
* ancestors (a visible child inside a hidden parent group is
|
|
1877
|
+
* hidden), so `visible`/`locked` here are the layer\'s OWN flags,
|
|
1878
|
+
* not the resolved ones. A panel showing effective state must walk
|
|
1879
|
+
* the chain itself.
|
|
1880
|
+
*/
|
|
1881
|
+
parentId?: string | null;
|
|
1593
1882
|
}
|
|
1594
1883
|
|
|
1595
1884
|
/**
|
|
@@ -1642,7 +1931,7 @@ export type LoadError = { kind: "parse"; message: string } | { kind: "scene"; me
|
|
|
1642
1931
|
* of a specific kind; the apply layer\'s `TypeMismatch` error fires if
|
|
1643
1932
|
* the variant doesn\'t match what the path expects.
|
|
1644
1933
|
*/
|
|
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[] };
|
|
1934
|
+
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
1935
|
|
|
1647
1936
|
/**
|
|
1648
1937
|
* Typed property path for `SetProperty` Ops. A closed enum (rather
|
|
@@ -1652,7 +1941,7 @@ export type Value = { type: "bounds"; value: [number, number, number, number] }
|
|
|
1652
1941
|
* (`\"fill.color\"`) — so JS callers don\'t need to learn the Rust
|
|
1653
1942
|
* enum shape.
|
|
1654
1943
|
*/
|
|
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";
|
|
1944
|
+
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
1945
|
|
|
1657
1946
|
/**
|
|
1658
1947
|
* Typed worker-side error for non-load operations. Mutations,
|
|
@@ -1662,20 +1951,7 @@ export type PropertyPath = "frameBounds" | "frameFillColor" | "frameStrokeColor"
|
|
|
1662
1951
|
export type WorkerError = { kind: "notImplemented"; details: { what: string } } | { kind: "unknownPage"; details: { pageId: PageId } } | { kind: "noDocument" };
|
|
1663
1952
|
|
|
1664
1953
|
/**
|
|
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
|
|
1954
|
+
* W0.2 — wire mirror of `paged_model::ParagraphRule` (the
|
|
1679
1955
|
* AST type predates `Tsify`; the mirror keeps the op wire-shaped,
|
|
1680
1956
|
* the `GradientFeatherSpec` precedent). Carries every field the
|
|
1681
1957
|
* parser models so the whole-struct `ParagraphRuleAbove` /
|
|
@@ -1693,10 +1969,17 @@ export interface ParagraphRuleSpec {
|
|
|
1693
1969
|
}
|
|
1694
1970
|
|
|
1695
1971
|
/**
|
|
1696
|
-
* W0.
|
|
1697
|
-
*
|
|
1972
|
+
* W0.2 — wire mirror of `paged_model::TabStop`. The `ParagraphTabStops`
|
|
1973
|
+
* path replaces the paragraph\'s whole `<TabList>` in one op; `Value`
|
|
1974
|
+
* has no per-element list-edit form, so the UI sends the full new
|
|
1975
|
+
* stop list (the gradient-feather stop-list precedent).
|
|
1698
1976
|
*/
|
|
1699
|
-
export
|
|
1977
|
+
export interface TabStopSpec {
|
|
1978
|
+
position: number;
|
|
1979
|
+
alignment?: string | null;
|
|
1980
|
+
alignmentCharacter?: string | null;
|
|
1981
|
+
leader?: string | null;
|
|
1982
|
+
}
|
|
1700
1983
|
|
|
1701
1984
|
/**
|
|
1702
1985
|
* W0.5 — the kind of field marker inserted by
|
|
@@ -1704,12 +1987,12 @@ export type StyleScope = "paragraph" | "character";
|
|
|
1704
1987
|
* built-ins (single private-use marker chars the renderer
|
|
1705
1988
|
* substitutes); v43 (D-01) adds the plugin `Placeholder` — a tagged,
|
|
1706
1989
|
* edit-surviving anchor run whose text is the field\'s cached display
|
|
1707
|
-
* value (see `
|
|
1990
|
+
* value (see `paged_model::PlaceholderField`).
|
|
1708
1991
|
*/
|
|
1709
1992
|
export type FieldKind = "pageNumber" | "nextPageNumber" | { placeholder: { plugin: string; key: string; value?: string | undefined } };
|
|
1710
1993
|
|
|
1711
1994
|
/**
|
|
1712
|
-
* W0.5 — wire mirror of `
|
|
1995
|
+
* W0.5 — wire mirror of `paged_model::GuideOrientation`
|
|
1713
1996
|
* (which is `Deserialize` but lives in the parse crate; kept here so
|
|
1714
1997
|
* the operation wire type doesn\'t depend on the parser\'s
|
|
1715
1998
|
* serialization shape).
|
|
@@ -1723,7 +2006,7 @@ export type GuideOrientationSpec = "vertical" | "horizontal";
|
|
|
1723
2006
|
* ## The two-stream addressing model
|
|
1724
2007
|
*
|
|
1725
2008
|
* Table-cell text is stored out of band on `Table.cells[].paragraphs`
|
|
1726
|
-
* (see `
|
|
2009
|
+
* (see `idml_import`), disjoint from `Story.paragraphs`. So a content
|
|
1727
2010
|
* address needs to say *which* paragraph stream its byte offsets index:
|
|
1728
2011
|
*
|
|
1729
2012
|
* - `ContentSelection.cell == None` — offsets are story-local bytes
|
|
@@ -1803,7 +2086,7 @@ export interface NumberingListSummary {
|
|
|
1803
2086
|
|
|
1804
2087
|
/**
|
|
1805
2088
|
* W1.22 (engine gap 22) — wire description of a `<NumberingList>`
|
|
1806
|
-
* resource, mirroring `
|
|
2089
|
+
* resource, mirroring `paged_model::NumberingListDef`. The
|
|
1807
2090
|
* CRUD ops (`CreateNumberingList` / `EditNumberingList` /
|
|
1808
2091
|
* `DeleteNumberingList`) carry this. `self_id` is minted
|
|
1809
2092
|
* (`NumberingList/u<n>`) when absent on create; echoed resolved in
|
|
@@ -1923,6 +2206,19 @@ export interface ResolutionResult {
|
|
|
1923
2206
|
*/
|
|
1924
2207
|
export type HitFilter = "frame" | "text" | "any";
|
|
1925
2208
|
|
|
2209
|
+
/**
|
|
2210
|
+
* Where a story\'s flow overran its frame chain — the first-class overset
|
|
2211
|
+
* **continuation** the engine records (`paged_flow::Overset::Remains`, via
|
|
2212
|
+
* `RenderDiagnostics::overset_continuations()`). Lets the editor jump the
|
|
2213
|
+
* caret to the first clipped line / show \"overset at ¶N line M\" instead of
|
|
2214
|
+
* only a boolean overset badge. Addresses match the layout stream
|
|
2215
|
+
* (`paragraph` within the story\'s body flow, `line` within that paragraph).
|
|
2216
|
+
*/
|
|
2217
|
+
export interface OversetAt {
|
|
2218
|
+
paragraph: number;
|
|
2219
|
+
line: number;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
1926
2222
|
/**
|
|
1927
2223
|
* Which runtime budget a script exhausted (B-09 / W-08). The typed
|
|
1928
2224
|
* half of a `ScriptResult`: lets the host distinguish a budget abort
|
|
@@ -1966,7 +2262,7 @@ export interface GradientSpec {
|
|
|
1966
2262
|
|
|
1967
2263
|
/**
|
|
1968
2264
|
* Wire-format description of a colour swatch (`<Color>`), mirroring
|
|
1969
|
-
* the editable fields of `
|
|
2265
|
+
* the editable fields of `paged_model::ColorEntry` with primitive,
|
|
1970
2266
|
* `Deserialize`-able types (the AST `ColorEntry` is `Serialize`-only).
|
|
1971
2267
|
* Carried by the swatch-collection mutations so create / edit /
|
|
1972
2268
|
* delete-undo are lossless. `space` / `model` / `alternate_space` are
|
|
@@ -2004,6 +2300,11 @@ export interface SwatchSpec {
|
|
|
2004
2300
|
*/
|
|
2005
2301
|
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
2302
|
|
|
2303
|
+
/**
|
|
2304
|
+
* [`Operation::ApplyStyle`].
|
|
2305
|
+
*/
|
|
2306
|
+
export type StyleScope = "paragraph" | "character";
|
|
2307
|
+
|
|
2007
2308
|
/**
|
|
2008
2309
|
* `RequestLineBounds` reply payload.
|
|
2009
2310
|
*/
|
|
@@ -2163,6 +2464,143 @@ export interface ProviderTileWire {
|
|
|
2163
2464
|
rgba: number[];
|
|
2164
2465
|
}
|
|
2165
2466
|
|
|
2467
|
+
/**
|
|
2468
|
+
* v59 — where [`Operation::ReorderNode`] puts its target inside the
|
|
2469
|
+
* sibling list it already belongs to.
|
|
2470
|
+
*
|
|
2471
|
+
* **Both forms deliberately ship.** The four RELATIVE verbs are what a
|
|
2472
|
+
* UI and a plugin can actually express: they are read-modify-write
|
|
2473
|
+
* against whatever the list happens to be at apply time, so a
|
|
2474
|
+
* concurrent insert or delete between \"the caller read the order\" and
|
|
2475
|
+
* \"the engine applied the op\" cannot silently restack the wrong item —
|
|
2476
|
+
* there is no stale index to be wrong. They map 1:1 onto the Arrange
|
|
2477
|
+
* menu every DTP app ships (Illustrator\'s Object ▸ Arrange, InDesign\'s
|
|
2478
|
+
* Object ▸ Arrange, PowerPoint\'s Bring Forward…).
|
|
2479
|
+
*
|
|
2480
|
+
* [`ZOrderTarget::Index`] is the absolute form, and it is what makes
|
|
2481
|
+
* the inverse EXACT: the apply layer records the slot the node came
|
|
2482
|
+
* from and hands back `Index(that slot)`. It is also the honest way to
|
|
2483
|
+
* express \"restore this exact order\" for a drag in a layers panel.
|
|
2484
|
+
* Because an absolute index CAN go stale, an out-of-range `Index` is
|
|
2485
|
+
* rejected loudly (`OperationError::InvalidPosition`) instead of being
|
|
2486
|
+
* clamped — a caller working from a stale model should hear about it.
|
|
2487
|
+
*
|
|
2488
|
+
* Serialised externally-tagged (the [`FieldKind`] convention):
|
|
2489
|
+
* `\"front\"` / `\"back\"` / `\"forward\"` / `\"backward\"` / `{\"index\": 3}`.
|
|
2490
|
+
*/
|
|
2491
|
+
export type ZOrderTarget = "front" | "back" | "forward" | "backward" | { index: number };
|
|
2492
|
+
|
|
2493
|
+
/**
|
|
2494
|
+
* §21 advanced prepress — one ink plate\'s coverage on one page.
|
|
2495
|
+
*
|
|
2496
|
+
* `area_pct` is the share of the WHOLE page this plate puts any ink
|
|
2497
|
+
* on — the \"does this plate earn its pass on press\" number.
|
|
2498
|
+
* `max_tint_pct` / `mean_tint_pct` describe how heavily, over the
|
|
2499
|
+
* inked pixels only.
|
|
2500
|
+
*/
|
|
2501
|
+
export interface PlateCoverageSummary {
|
|
2502
|
+
/**
|
|
2503
|
+
* `\"cyan\"` / `\"magenta\"` / `\"yellow\"` / `\"black\"` for the process
|
|
2504
|
+
* inks; the spot swatch\'s `Color/<id>` for a named ink — the same
|
|
2505
|
+
* id `InkSummary::spot_id` uses, so the Ink Manager and this
|
|
2506
|
+
* surface address the same ink.
|
|
2507
|
+
*/
|
|
2508
|
+
inkId: string;
|
|
2509
|
+
/**
|
|
2510
|
+
* Display name: `\"Cyan\"` … `\"Black\"`, or the spot swatch\'s
|
|
2511
|
+
* palette name (falling back to its id).
|
|
2512
|
+
*/
|
|
2513
|
+
name: string;
|
|
2514
|
+
isSpot: boolean;
|
|
2515
|
+
areaPct: number;
|
|
2516
|
+
maxTintPct: number;
|
|
2517
|
+
meanTintPct: number;
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
/**
|
|
2521
|
+
* §21 advanced prepress — one page\'s ink-coverage reading, produced
|
|
2522
|
+
* by rasterising the page and reading the CPU rasterizer\'s per-ink
|
|
2523
|
+
* plane state.
|
|
2524
|
+
*
|
|
2525
|
+
* # Read `separated_pct` before quoting any other number
|
|
2526
|
+
*
|
|
2527
|
+
* The raster lane only decomposes a pixel into inks when the draw
|
|
2528
|
+
* that made it carried a CMYK or spot swatch. Placed images, RGB and
|
|
2529
|
+
* Lab swatches, gradients, and anything inside a blend group carry no
|
|
2530
|
+
* ink decomposition — those pixels are **unknown**, not blank, and
|
|
2531
|
+
* every statistic below excludes them. `separatedPct` is how much of
|
|
2532
|
+
* the page was actually measured. A `maxTacPct` of 340 over a
|
|
2533
|
+
* `separatedPct` of 4 is a statement about 4% of the page.
|
|
2534
|
+
*
|
|
2535
|
+
* Nothing here estimates the unknown pixels. The renderer\'s RGB→CMYK
|
|
2536
|
+
* map is 100%-GCR (a rich black inverts to K-only / 100% TAC where a
|
|
2537
|
+
* real coated profile gives ~300%), so folding it in would make the
|
|
2538
|
+
* headline figure confidently wrong exactly where operators check it.
|
|
2539
|
+
*/
|
|
2540
|
+
export interface InkCoverageSummary {
|
|
2541
|
+
pageId: PageId;
|
|
2542
|
+
pageIndex: number;
|
|
2543
|
+
/**
|
|
2544
|
+
* **Check this first.** `false` means the document has no active
|
|
2545
|
+
* CMYK working profile (none supplied at load, none named by the
|
|
2546
|
+
* designmap that the host had registered, no soft proof), and
|
|
2547
|
+
* therefore the renderer resolved every CMYK and spot swatch
|
|
2548
|
+
* straight to display RGB — there is no ink lane at all and every
|
|
2549
|
+
* figure below is structurally zero.
|
|
2550
|
+
*
|
|
2551
|
+
* That is a completely different condition from \"this page is all
|
|
2552
|
+
* RGB artwork\", and a surface MUST NOT render them the same way:
|
|
2553
|
+
* one says *activate a profile*, the other says *this content
|
|
2554
|
+
* separates at the RIP*. Both produce `separatedPct == 0`.
|
|
2555
|
+
*
|
|
2556
|
+
* `SwatchSummary::totalAreaCoveragePct` is unaffected — it is
|
|
2557
|
+
* palette arithmetic and needs no profile — so the swatch-level
|
|
2558
|
+
* ink-limit audit still works when this is `false`.
|
|
2559
|
+
*/
|
|
2560
|
+
separationAvailable: boolean;
|
|
2561
|
+
/**
|
|
2562
|
+
* Sampling resolution of the analysis render, in dpi. An area
|
|
2563
|
+
* measurement is dpi-independent for solid tints; anti-aliased
|
|
2564
|
+
* edges dilute their ink with the paper they partly cover, so
|
|
2565
|
+
* sub-pixel hairlines under-report. Check hairline rich blacks
|
|
2566
|
+
* against `SwatchSummary::totalAreaCoveragePct`, which is exact.
|
|
2567
|
+
*/
|
|
2568
|
+
analysisDpi: number;
|
|
2569
|
+
/**
|
|
2570
|
+
* The total-area-coverage limit `overLimitPixels` was counted
|
|
2571
|
+
* against, in percent.
|
|
2572
|
+
*/
|
|
2573
|
+
limitPct: number;
|
|
2574
|
+
totalPixels: number;
|
|
2575
|
+
separatedPixels: number;
|
|
2576
|
+
/**
|
|
2577
|
+
* `separatedPixels / totalPixels`, 0..=100. The honesty
|
|
2578
|
+
* denominator — see the type docs.
|
|
2579
|
+
*/
|
|
2580
|
+
separatedPct: number;
|
|
2581
|
+
maxTacPct: number;
|
|
2582
|
+
meanTacPct: number;
|
|
2583
|
+
overLimitPixels: number;
|
|
2584
|
+
/**
|
|
2585
|
+
* Share of the SEPARATED pixels over the limit, 0..=100.
|
|
2586
|
+
*/
|
|
2587
|
+
overLimitPct: number;
|
|
2588
|
+
/**
|
|
2589
|
+
* Four process plates always, then one per spot ink used on the
|
|
2590
|
+
* page. A blank process plate still appears — \"Cyan: 0%\" is
|
|
2591
|
+
* itself a reading.
|
|
2592
|
+
*/
|
|
2593
|
+
plates: PlateCoverageSummary[];
|
|
2594
|
+
/**
|
|
2595
|
+
* 81 counts over the separated pixels, bucket `i` covering
|
|
2596
|
+
* `[i·10%, (i+1)·10%)` of total area coverage (so 0–800%, which
|
|
2597
|
+
* leaves room for spot plates above the 400% process ceiling).
|
|
2598
|
+
* Lets a panel re-threshold the ink limit with a slider and no
|
|
2599
|
+
* re-render.
|
|
2600
|
+
*/
|
|
2601
|
+
histogram: number[];
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2166
2604
|
export interface CaretGeometry {
|
|
2167
2605
|
pageId: PageId;
|
|
2168
2606
|
frameId: string | null;
|
|
@@ -2456,9 +2894,9 @@ export interface InitOutput {
|
|
|
2456
2894
|
readonly qcms_white_point_sRGB: (a: number) => void;
|
|
2457
2895
|
readonly lut_inverse_interp16: (a: number, b: number, c: number) => number;
|
|
2458
2896
|
readonly lut_interp_linear16: (a: number, b: number, c: number) => number;
|
|
2459
|
-
readonly
|
|
2460
|
-
readonly
|
|
2461
|
-
readonly
|
|
2897
|
+
readonly wasm_bindgen__convert__closures_____invoke__hba9dab33e391dce8: (a: number, b: number, c: any) => [number, number];
|
|
2898
|
+
readonly wasm_bindgen__convert__closures_____invoke__h2a9a86477ca3734e: (a: number, b: number, c: any, d: any) => void;
|
|
2899
|
+
readonly wasm_bindgen__convert__closures_____invoke__h84d34b615e684f5e: (a: number, b: number, c: any) => void;
|
|
2462
2900
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
2463
2901
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
2464
2902
|
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: 4833, 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: 5774, 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
|