@paged-media/plugin-api 0.2.28-canary.0 → 0.2.29-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wire.d.ts +427 -40
- package/package.json +1 -1
package/dist/wire.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// GENERATED — do not edit. Vendored verbatim from the published
|
|
2
2
|
// @paged-media/canvas-wasm .d.ts (tsify output from paged-media/core,
|
|
3
3
|
// MPL-2.0 OR PMEL). Sync: node scripts/sync-wire.mjs · Check: --check.
|
|
4
|
-
// Synced from @paged-media/canvas-wasm@0.
|
|
4
|
+
// Synced from @paged-media/canvas-wasm@0.61.0
|
|
5
5
|
/* tslint:disable */
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
|
|
@@ -47,7 +47,7 @@ export type SceneBlendMode = "multiply" | "screen" | "overlay" | "darken" | "lig
|
|
|
47
47
|
* the worker rejects each variant with `WorkerError::NotImplemented`.
|
|
48
48
|
* Phase 3 lights these up incrementally.
|
|
49
49
|
*/
|
|
50
|
-
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[] } };
|
|
50
|
+
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[] } };
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* A plugin gradient paint for [`SceneItem::FillPathGradient`] (C-1.3).
|
|
@@ -197,6 +197,139 @@ export interface NearestPathPointResult {
|
|
|
197
197
|
distance: number;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
/**
|
|
201
|
+
* B-22 (protocol v57) — `RequestPlanarRegions` reply.
|
|
202
|
+
*/
|
|
203
|
+
export interface PlanarRegionsResult {
|
|
204
|
+
/**
|
|
205
|
+
* `false` when the request could not be answered at all — no
|
|
206
|
+
* document, an id that doesn\'t resolve, or more inputs than the
|
|
207
|
+
* kernel\'s cap. `reason` says which. Never a truncated answer.
|
|
208
|
+
*/
|
|
209
|
+
found: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Populated when `found`. With a `point` in the request this holds
|
|
212
|
+
* at most one face (empty means the point is outside every input).
|
|
213
|
+
*/
|
|
214
|
+
faces: PlanarFaceWire[];
|
|
215
|
+
/**
|
|
216
|
+
* How many inputs the arrangement was built from.
|
|
217
|
+
*/
|
|
218
|
+
inputCount: number;
|
|
219
|
+
/**
|
|
220
|
+
* `true` when the resolved faces tile the union of the inputs.
|
|
221
|
+
* `false` flags that the enumeration missed a sliver — the faces
|
|
222
|
+
* listed are all real, the list just isn\'t exhaustive. Always
|
|
223
|
+
* `true` for a point query (one face is not a tiling claim).
|
|
224
|
+
*/
|
|
225
|
+
complete: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Why `found` is false. `None` on success.
|
|
228
|
+
*/
|
|
229
|
+
reason?: string | null;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* B-22 (protocol v57) — one face of a planar arrangement: a connected
|
|
234
|
+
* region of the plane whose containment signature is constant.
|
|
235
|
+
*
|
|
236
|
+
* Coordinates are in the same RAW path space `PathAnchors` reports
|
|
237
|
+
* (per-element `ItemTransform`s are not composed in — the arrangement
|
|
238
|
+
* runs on the anchors as stored, exactly like `pathfinderBoolean`).
|
|
239
|
+
*/
|
|
240
|
+
export interface PlanarFaceWire {
|
|
241
|
+
/**
|
|
242
|
+
* Stable id — `\"<signature>#<component>\"`, e.g. `\"0-1#0\"`. Stable
|
|
243
|
+
* across calls with the same inputs, which is what lets a hover
|
|
244
|
+
* query\'s id ride straight into `pathfinderFaces`.
|
|
245
|
+
*/
|
|
246
|
+
id: string;
|
|
247
|
+
/**
|
|
248
|
+
* Indices into the REQUEST\'s `element_ids` whose interior contains
|
|
249
|
+
* this face.
|
|
250
|
+
*/
|
|
251
|
+
signature: number[];
|
|
252
|
+
/**
|
|
253
|
+
* The face outline (closed). A face with holes carries them as
|
|
254
|
+
* extra contours.
|
|
255
|
+
*/
|
|
256
|
+
anchors: PathAnchorTriple[];
|
|
257
|
+
/**
|
|
258
|
+
* Per-contour boundaries into `anchors`.
|
|
259
|
+
*/
|
|
260
|
+
subpathStarts: number[];
|
|
261
|
+
/**
|
|
262
|
+
* Unsigned area, outer contour minus holes.
|
|
263
|
+
*/
|
|
264
|
+
area: number;
|
|
265
|
+
/**
|
|
266
|
+
* A point strictly inside the face — what a hover highlight or a
|
|
267
|
+
* fill drop can key off without re-deriving containment.
|
|
268
|
+
*/
|
|
269
|
+
inside: [number, number];
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* B-22 — the region-level Pathfinder verbs, all resolved over one
|
|
274
|
+
* planar arrangement (Illustrator\'s Pathfinder row, as opposed to the
|
|
275
|
+
* Shape Modes row that [`PathfinderKind`] covers).
|
|
276
|
+
*
|
|
277
|
+
* Every verb reads the arrangement\'s faces and decides, per face,
|
|
278
|
+
* WHICH input owns it. Ownership defaults to the TOPMOST input
|
|
279
|
+
* covering the face — `min(signature)`, since `elements` arrives
|
|
280
|
+
* top-to-bottom — which is what makes the results carry the fill you
|
|
281
|
+
* see on screen at that spot.
|
|
282
|
+
*/
|
|
283
|
+
export type PathfinderRegionVerb = "divide" | "trim" | "merge" | "crop" | "outline" | "minusBack";
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* B-22 — whether `PathfinderFaces` keeps the named faces or removes
|
|
287
|
+
* them (Shape Builder\'s drag vs alt-drag).
|
|
288
|
+
*/
|
|
289
|
+
export type FaceSelectMode = "keep" | "remove";
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* C-28 — wire mirror of [`paged_model::OpacityMaskType`] (the same
|
|
293
|
+
* mirror convention [`PathAnchorSpec`] follows: `paged-model` carries
|
|
294
|
+
* no `tsify` dependency, so wire-visible enums are declared here and
|
|
295
|
+
* converted at the boundary).
|
|
296
|
+
*/
|
|
297
|
+
export type OpacityMaskMode = "luminosity" | "alpha";
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* C-29 — the `<TextPath>` knobs [`Operation::AttachTextToPath`]
|
|
301
|
+
* exposes. Grouped into one struct so the op, its inverse and the
|
|
302
|
+
* wire all name the same thing.
|
|
303
|
+
*
|
|
304
|
+
* Every field maps to an attribute the RENDERER ALREADY HONOURS
|
|
305
|
+
* (verified against `paged_renderer::pipeline::text_path`):
|
|
306
|
+
*
|
|
307
|
+
* * `path_type_alignment` → `PathTypeAlignment`: the glyph\'s
|
|
308
|
+
* vertical seat — `BaselinePathType` (default) / `CenterPathType`
|
|
309
|
+
* / `AscenderPathType` / `DescenderPathType`.
|
|
310
|
+
* * `flip_path_effect` → `FlipPathEffect`: `Flipped` reverses the
|
|
311
|
+
* path direction so the text reads the other way round.
|
|
312
|
+
* * `start_bracket` / `end_bracket` → `StartBracket` /
|
|
313
|
+
* `EndBracket`: the arc-length window the text flows within. The
|
|
314
|
+
* renderer clamps both to the tessellated path length, centres
|
|
315
|
+
* the run in the window when it fits, and drops glyphs past
|
|
316
|
+
* `EndBracket` while reporting `OversetTextDropped`.
|
|
317
|
+
*
|
|
318
|
+
* **Deliberately NOT exposed: `PathEffect`.** Only
|
|
319
|
+
* `RainbowPathEffect` actually renders; `SkewPathEffect`,
|
|
320
|
+
* `Path3DRibbonEffect`, `StairStepPathEffect` and
|
|
321
|
+
* `GravityPathEffect` parse but draw as Rainbow. A knob whose value
|
|
322
|
+
* is silently ignored is worse than no knob, so the op does not take
|
|
323
|
+
* one and the created `TextPath` leaves the attribute absent — which
|
|
324
|
+
* IS Rainbow, the IDML default.
|
|
325
|
+
*/
|
|
326
|
+
export interface TextPathSpec {
|
|
327
|
+
pathTypeAlignment?: string | null;
|
|
328
|
+
flipPathEffect?: string | null;
|
|
329
|
+
startBracket?: number | null;
|
|
330
|
+
endBracket?: number | null;
|
|
331
|
+
}
|
|
332
|
+
|
|
200
333
|
/**
|
|
201
334
|
* Canonical selection / caret. `start == end` is a caret;
|
|
202
335
|
* `start < end` is a range. Endpoints are normalised so `start ≤
|
|
@@ -346,6 +479,57 @@ export interface ExportPdfWireOptions {
|
|
|
346
479
|
title?: string | null;
|
|
347
480
|
}
|
|
348
481
|
|
|
482
|
+
/**
|
|
483
|
+
* DOC-03 (v54) — a story\'s full CONTENT: its paragraphs, each with its runs\'
|
|
484
|
+
* text + applied styles + direct character overrides. Where `StorySummary` gives
|
|
485
|
+
* counts, this gives the text and formatting a content plugin needs to read an
|
|
486
|
+
* edited document back (e.g. paged.doc diffs it against its import baseline to
|
|
487
|
+
* drive edited save-back). Surfaced by `CanvasModel::story_content()`; read via
|
|
488
|
+
* `RequestStoryContent { story_id }` → `StoryContentResult`.
|
|
489
|
+
*/
|
|
490
|
+
export interface StoryContent {
|
|
491
|
+
/**
|
|
492
|
+
* IDML `Self` id (`Story/u123`).
|
|
493
|
+
*/
|
|
494
|
+
selfId: string;
|
|
495
|
+
/**
|
|
496
|
+
* Paragraphs in body order.
|
|
497
|
+
*/
|
|
498
|
+
paragraphs: ParagraphContent[];
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* DOC-03 — one paragraph\'s applied style + its runs.
|
|
503
|
+
*/
|
|
504
|
+
export interface ParagraphContent {
|
|
505
|
+
/**
|
|
506
|
+
* The applied paragraph style id, if any (`w:pStyle` equivalent).
|
|
507
|
+
*/
|
|
508
|
+
paragraphStyle?: string;
|
|
509
|
+
runs: RunContent[];
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* DOC-03 — one run\'s text + its applied character style + its DIRECT character
|
|
514
|
+
* overrides (each `None` = inherit). A run styled only through an applied style
|
|
515
|
+
* carries just `character_style`; direct editor formatting shows in the override
|
|
516
|
+
* fields. Field names mirror `paged_model::CharacterRun`.
|
|
517
|
+
*/
|
|
518
|
+
export interface RunContent {
|
|
519
|
+
text: string;
|
|
520
|
+
characterStyle?: string;
|
|
521
|
+
font?: string;
|
|
522
|
+
fontStyle?: string;
|
|
523
|
+
pointSize?: number;
|
|
524
|
+
fillColor?: string;
|
|
525
|
+
underline?: boolean;
|
|
526
|
+
strikethru?: boolean;
|
|
527
|
+
capitalization?: string;
|
|
528
|
+
baselineShift?: number;
|
|
529
|
+
position?: string;
|
|
530
|
+
tracking?: number;
|
|
531
|
+
}
|
|
532
|
+
|
|
349
533
|
/**
|
|
350
534
|
* Description of a node about to be inserted. Carries the minimal
|
|
351
535
|
* Stage-1 supported field set plus `item_transform` — `RemoveNode` →
|
|
@@ -366,10 +550,10 @@ export type CaretDirection = "up" | "down";
|
|
|
366
550
|
/**
|
|
367
551
|
* Discriminated payload of a `WorkerToMain` message.
|
|
368
552
|
*/
|
|
369
|
-
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 };
|
|
553
|
+
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 };
|
|
370
554
|
|
|
371
555
|
/**
|
|
372
|
-
* Editor-ops — wire mirror of `
|
|
556
|
+
* Editor-ops — wire mirror of `paged_model::GradientFeatherParams`.
|
|
373
557
|
* Whole-struct authoring (kind + axis + stop LIST change together;
|
|
374
558
|
* `Value` has no generic list form, so the drop-shadow per-field
|
|
375
559
|
* shape doesn\'t fit). The renderer already draws this effect; only
|
|
@@ -388,7 +572,7 @@ export interface GradientFeatherSpec {
|
|
|
388
572
|
}
|
|
389
573
|
|
|
390
574
|
/**
|
|
391
|
-
* Editor-ops — wire mirror of `
|
|
575
|
+
* Editor-ops — wire mirror of `paged_model::GradientFeatherStop`
|
|
392
576
|
* (the AST type predates `PartialEq`/`Tsify`; the mirror keeps the
|
|
393
577
|
* op wire-shaped, the `PathAnchorSpec` precedent).
|
|
394
578
|
*/
|
|
@@ -961,6 +1145,12 @@ export interface StorySummary {
|
|
|
961
1145
|
* Preflight panel + the red \"+\" overset badge on the frame.
|
|
962
1146
|
*/
|
|
963
1147
|
overset?: boolean;
|
|
1148
|
+
/**
|
|
1149
|
+
* When `overset`, *where* the flow overran — the continuation cursor
|
|
1150
|
+
* (`OversetAt`). `None` when the story fits. Additive/optional, so an
|
|
1151
|
+
* older client that ignores it still reads the `overset` flag.
|
|
1152
|
+
*/
|
|
1153
|
+
oversetAt?: OversetAt;
|
|
964
1154
|
}
|
|
965
1155
|
|
|
966
1156
|
/**
|
|
@@ -983,6 +1173,26 @@ export interface SwatchSummary {
|
|
|
983
1173
|
selfId: string;
|
|
984
1174
|
name: string;
|
|
985
1175
|
kind: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* §21 advanced prepress — the swatch\'s total area coverage in
|
|
1178
|
+
* percent: how much ink every press plate lays down for it,
|
|
1179
|
+
* summed. A process CMYK swatch sums its four channels (a 60/40/
|
|
1180
|
+
* 40/100 rich black is 240%); a spot swatch is ONE plate, so it
|
|
1181
|
+
* contributes its own tint (100% PANTONE 286 C is 100%, not the
|
|
1182
|
+
* 175% its CMYK alternate would sum to).
|
|
1183
|
+
*
|
|
1184
|
+
* `None` — not `0.0` — when the swatch has no ink decomposition:
|
|
1185
|
+
* RGB, Lab, mixed-ink and unknown swatches separate at the RIP,
|
|
1186
|
+
* not here. The distinction is load-bearing; a UI must show a
|
|
1187
|
+
* blank, never a zero.
|
|
1188
|
+
*
|
|
1189
|
+
* This is the EXACT reading, computed from the palette with no
|
|
1190
|
+
* render involved, so it is resolution-free and catches an
|
|
1191
|
+
* over-limit colour wherever it is used — including in hairlines
|
|
1192
|
+
* that the rendered per-page coverage under-samples. Additive
|
|
1193
|
+
* read-only field; no protocol bump on its own.
|
|
1194
|
+
*/
|
|
1195
|
+
totalAreaCoveragePct?: number | null;
|
|
986
1196
|
}
|
|
987
1197
|
|
|
988
1198
|
/**
|
|
@@ -1000,7 +1210,7 @@ export interface SwatchSummary {
|
|
|
1000
1210
|
* `serde_json::Value::Array` for unimplemented entries, surfacing
|
|
1001
1211
|
* a runtime warning rather than a panic.
|
|
1002
1212
|
*/
|
|
1003
|
-
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";
|
|
1213
|
+
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";
|
|
1004
1214
|
|
|
1005
1215
|
/**
|
|
1006
1216
|
* SDK Phase 5 (D1) — singleton document-level state. Per
|
|
@@ -1555,7 +1765,7 @@ export interface DocumentStats {
|
|
|
1555
1765
|
* document\'s `BTreeMap` palettes/stylesheets rather than the scene
|
|
1556
1766
|
* tree, so they\'re top-level variants rather than `InsertNode`.
|
|
1557
1767
|
*/
|
|
1558
|
-
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 };
|
|
1768
|
+
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 };
|
|
1559
1769
|
|
|
1560
1770
|
/**
|
|
1561
1771
|
* The discriminated payload of a `MainToWorker` message. Tagged so
|
|
@@ -1564,10 +1774,10 @@ export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath;
|
|
|
1564
1774
|
* variants so e.g. `cmyk_icc_profile` becomes `cmykIccProfile` on
|
|
1565
1775
|
* the wire — the TS protocol mirror locks the camelCase contract.
|
|
1566
1776
|
*/
|
|
1567
|
-
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 } };
|
|
1777
|
+
export type MainToWorkerKind = { kind: "hello" } | { kind: "loadDocument"; payload: { bytes: number[]; font?: number[] | null; cmykIccProfile?: number[] | null } } | { kind: "newBlankDocument"; payload: { widthPt: number; heightPt: number; font?: number[] | null } } | { kind: "registerFont"; payload: { family: string; style?: string | null; bytes: number[] } } | { kind: "clearFontRegistry" } | { kind: "registerColorProfile"; payload: { name: string; bytes: number[] } } | { kind: "mutate"; payload: Mutation } | { kind: "requestPage"; payload: { pageId: PageId; lod: LodTier } } | { kind: "hitTest"; payload: { pageId: PageId; docPoint: [number, number]; filter: HitFilter } } | { kind: "requestSnapshot"; payload: { pageId: PageId; targetWidthPx: number; dpi?: number | null } } | { kind: "setSelection"; payload: { selection: ContentSelection | null } } | { kind: "requestSelectionGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretNav"; payload: { storyId: string; offset: number; direction: CaretDirection; cell?: TextCellAddr | null } } | { kind: "requestLineBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestWordBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestParagraphBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "undo" } | { kind: "redo" } | { kind: "setElementSelection"; payload: { ids: ElementId[]; mode: SelectionMode } } | { kind: "requestMarqueeHits"; payload: { pageId: PageId; rect: [number, number, number, number] } } | { kind: "requestElementGeometry"; payload: { ids: ElementId[] } } | { kind: "requestGroupLeaves"; payload: { groupId: string } } | { kind: "requestPathAnchors"; payload: { id: ElementId } } | { kind: "requestNearestPathPoint"; payload: { id: ElementId; point: [number, number] } } | { kind: "requestPlanarRegions"; payload: { elementIds: ElementId[]; point?: [number, number] | null } } | { kind: "requestLayers" } | { kind: "requestCollection"; payload: { name: CollectionName } } | { kind: "requestFrameChain"; payload: { storyId: string } } | { kind: "requestStoryContent"; payload: { storyId: string } } | { kind: "requestPlacedAssetBytes"; payload: { elementId: string } } | { kind: "requestFontFaceBytes"; payload: { family: string; style?: string | null } } | { kind: "requestMeasureText"; payload: { family: string; style?: string | null; text: string; sizePt: number } } | { kind: "submitSceneLayer"; payload: { elementId: string; layer: SceneLayer } } | { kind: "clearSceneLayer"; payload: { elementId: string } } | { kind: "submitPixelLayer"; payload: { elementId: string; layer: PixelLayer } } | { kind: "clearPixelLayer"; payload: { elementId: string } } | { kind: "claimImageResource"; payload: { imageId: string; levels: number; tileSize: number; baseWidth: number; baseHeight: number; revision: number } } | { kind: "releaseImageResource"; payload: { imageId: string } } | { kind: "submitResourceTiles"; payload: { imageId: string; level: number; tiles: ProviderTileWire[]; generation: number } } | { kind: "requestDocumentMeta" } | { kind: "requestDocumentPlaceholders" } | { kind: "requestColorPreview"; payload: { swatchId: string } } | { kind: "requestColorCompute"; payload: { space: string; value: number[]; tint?: number | null; model?: string | null; alternateSpace?: string | null; alternateValue?: number[] | null } } | { kind: "requestGradientDetail"; payload: { gradientId: string } } | { kind: "exportSwatchLibrary"; payload: { groupId?: string | null } } | { kind: "executeScript"; payload: { source: string } } | { kind: "exportPdfBegin"; payload: { options: ExportPdfWireOptions } } | { kind: "exportPdfPage"; payload: { session: number } } | { kind: "exportPdfFinish"; payload: { session: number } } | { kind: "exportPdfCancel"; payload: { session: number } } | { kind: "exportIdml"; payload: {} } | { kind: "writePagedPart"; payload: { path: string; bytes: number[] } } | { kind: "readPagedPart"; payload: { path: string } } | { kind: "listPagedParts"; payload: { prefix: string } } | { kind: "exportPaged"; payload: {} } | { kind: "requestElementProperties"; payload: { id: ElementId } } | { kind: "requestSceneTree" } | { kind: "beginGesture"; payload: { nodes: ElementId[]; gesture: GestureType; anchor?: GestureAnchor | null; cameraScale?: number | null } } | { kind: "updateGesture"; payload: { handle: GestureHandle; delta: [number, number]; modifiers: GestureModifiers } } | { kind: "commitGesture"; payload: { handle: GestureHandle } } | { kind: "cancelGesture"; payload: { handle: GestureHandle } };
|
|
1568
1778
|
|
|
1569
1779
|
/**
|
|
1570
|
-
* Track J — wire-shape mirror of `
|
|
1780
|
+
* Track J — wire-shape mirror of `paged_model::PathAnchor`. The
|
|
1571
1781
|
* parse-side type doesn\'t carry `Deserialize`/`PartialEq`/`Tsify`,
|
|
1572
1782
|
* and the mutate API needs all three so this Op crosses the wasm
|
|
1573
1783
|
* boundary. The field shapes match exactly: `anchor` is the
|
|
@@ -1581,11 +1791,21 @@ export interface PathAnchorSpec {
|
|
|
1581
1791
|
}
|
|
1582
1792
|
|
|
1583
1793
|
/**
|
|
1584
|
-
* Track M — wire-shape mirror of `
|
|
1794
|
+
* Track M — wire-shape mirror of `paged_model::Layer`. Surfaces
|
|
1585
1795
|
* everything the Layers panel needs without leaking parse-side
|
|
1586
|
-
* fields the wasm boundary doesn\'t understand.
|
|
1587
|
-
*
|
|
1588
|
-
*
|
|
1796
|
+
* fields the wasm boundary doesn\'t understand.
|
|
1797
|
+
*
|
|
1798
|
+
* `z` is the layer\'s zero-based index in `designmap.layers`, and
|
|
1799
|
+
* **`z == 0` is the BACKMOST layer** — the first declared, painted
|
|
1800
|
+
* first. The topmost layer has the HIGHEST z.
|
|
1801
|
+
*
|
|
1802
|
+
* This comment previously said \"top-first … designmap[0] = topmost\",
|
|
1803
|
+
* which is the inversion `paged_scene::layer` records as a real bug
|
|
1804
|
+
* (its module doc: \"Cycle 2\'s Q-10 commit had this inverted\"), fixed
|
|
1805
|
+
* in the renderer and asserted by its own test. The wire comment kept
|
|
1806
|
+
* the wrong version, so a panel author sorting by `z` would have
|
|
1807
|
+
* stacked the list upside down. See `paged_scene::layer` for the
|
|
1808
|
+
* authority.
|
|
1589
1809
|
*/
|
|
1590
1810
|
export interface LayerSummary {
|
|
1591
1811
|
selfId: string;
|
|
@@ -1594,6 +1814,24 @@ export interface LayerSummary {
|
|
|
1594
1814
|
locked: boolean;
|
|
1595
1815
|
printable: boolean;
|
|
1596
1816
|
z: number;
|
|
1817
|
+
/**
|
|
1818
|
+
* v60 — `Self` of the enclosing `<Layer>` when this layer is nested
|
|
1819
|
+
* inside a layer GROUP (folder) in InDesign\'s Layers panel; `None`
|
|
1820
|
+
* for a top-level layer, which is the overwhelmingly common case.
|
|
1821
|
+
*
|
|
1822
|
+
* Mirrors [`paged_model::Layer::parent_id`], which the model has
|
|
1823
|
+
* carried all along — the summary simply dropped it, so every
|
|
1824
|
+
* consumer of this wire type saw a FLAT layer list and a Layers
|
|
1825
|
+
* panel could not render a tree. Added when ADR 023\'s shared-panel
|
|
1826
|
+
* work hit exactly that wall.
|
|
1827
|
+
*
|
|
1828
|
+
* Note the renderer already resolves visibility and lock THROUGH
|
|
1829
|
+
* ancestors (a visible child inside a hidden parent group is
|
|
1830
|
+
* hidden), so `visible`/`locked` here are the layer\'s OWN flags,
|
|
1831
|
+
* not the resolved ones. A panel showing effective state must walk
|
|
1832
|
+
* the chain itself.
|
|
1833
|
+
*/
|
|
1834
|
+
parentId?: string | null;
|
|
1597
1835
|
}
|
|
1598
1836
|
|
|
1599
1837
|
/**
|
|
@@ -1646,7 +1884,7 @@ export type LoadError = { kind: "parse"; message: string } | { kind: "scene"; me
|
|
|
1646
1884
|
* of a specific kind; the apply layer\'s `TypeMismatch` error fires if
|
|
1647
1885
|
* the variant doesn\'t match what the path expects.
|
|
1648
1886
|
*/
|
|
1649
|
-
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[] };
|
|
1887
|
+
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[] };
|
|
1650
1888
|
|
|
1651
1889
|
/**
|
|
1652
1890
|
* Typed property path for `SetProperty` Ops. A closed enum (rather
|
|
@@ -1656,7 +1894,7 @@ export type Value = { type: "bounds"; value: [number, number, number, number] }
|
|
|
1656
1894
|
* (`\"fill.color\"`) — so JS callers don\'t need to learn the Rust
|
|
1657
1895
|
* enum shape.
|
|
1658
1896
|
*/
|
|
1659
|
-
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";
|
|
1897
|
+
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";
|
|
1660
1898
|
|
|
1661
1899
|
/**
|
|
1662
1900
|
* Typed worker-side error for non-load operations. Mutations,
|
|
@@ -1666,20 +1904,7 @@ export type PropertyPath = "frameBounds" | "frameFillColor" | "frameStrokeColor"
|
|
|
1666
1904
|
export type WorkerError = { kind: "notImplemented"; details: { what: string } } | { kind: "unknownPage"; details: { pageId: PageId } } | { kind: "noDocument" };
|
|
1667
1905
|
|
|
1668
1906
|
/**
|
|
1669
|
-
* W0.2 — wire mirror of `
|
|
1670
|
-
* path replaces the paragraph\'s whole `<TabList>` in one op; `Value`
|
|
1671
|
-
* has no per-element list-edit form, so the UI sends the full new
|
|
1672
|
-
* stop list (the gradient-feather stop-list precedent).
|
|
1673
|
-
*/
|
|
1674
|
-
export interface TabStopSpec {
|
|
1675
|
-
position: number;
|
|
1676
|
-
alignment?: string | null;
|
|
1677
|
-
alignmentCharacter?: string | null;
|
|
1678
|
-
leader?: string | null;
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
/**
|
|
1682
|
-
* W0.2 — wire mirror of `paged_parse::styles::ParagraphRule` (the
|
|
1907
|
+
* W0.2 — wire mirror of `paged_model::ParagraphRule` (the
|
|
1683
1908
|
* AST type predates `Tsify`; the mirror keeps the op wire-shaped,
|
|
1684
1909
|
* the `GradientFeatherSpec` precedent). Carries every field the
|
|
1685
1910
|
* parser models so the whole-struct `ParagraphRuleAbove` /
|
|
@@ -1697,10 +1922,17 @@ export interface ParagraphRuleSpec {
|
|
|
1697
1922
|
}
|
|
1698
1923
|
|
|
1699
1924
|
/**
|
|
1700
|
-
* W0.
|
|
1701
|
-
*
|
|
1925
|
+
* W0.2 — wire mirror of `paged_model::TabStop`. The `ParagraphTabStops`
|
|
1926
|
+
* path replaces the paragraph\'s whole `<TabList>` in one op; `Value`
|
|
1927
|
+
* has no per-element list-edit form, so the UI sends the full new
|
|
1928
|
+
* stop list (the gradient-feather stop-list precedent).
|
|
1702
1929
|
*/
|
|
1703
|
-
export
|
|
1930
|
+
export interface TabStopSpec {
|
|
1931
|
+
position: number;
|
|
1932
|
+
alignment?: string | null;
|
|
1933
|
+
alignmentCharacter?: string | null;
|
|
1934
|
+
leader?: string | null;
|
|
1935
|
+
}
|
|
1704
1936
|
|
|
1705
1937
|
/**
|
|
1706
1938
|
* W0.5 — the kind of field marker inserted by
|
|
@@ -1708,12 +1940,12 @@ export type StyleScope = "paragraph" | "character";
|
|
|
1708
1940
|
* built-ins (single private-use marker chars the renderer
|
|
1709
1941
|
* substitutes); v43 (D-01) adds the plugin `Placeholder` — a tagged,
|
|
1710
1942
|
* edit-surviving anchor run whose text is the field\'s cached display
|
|
1711
|
-
* value (see `
|
|
1943
|
+
* value (see `paged_model::PlaceholderField`).
|
|
1712
1944
|
*/
|
|
1713
1945
|
export type FieldKind = "pageNumber" | "nextPageNumber" | { placeholder: { plugin: string; key: string; value?: string | undefined } };
|
|
1714
1946
|
|
|
1715
1947
|
/**
|
|
1716
|
-
* W0.5 — wire mirror of `
|
|
1948
|
+
* W0.5 — wire mirror of `paged_model::GuideOrientation`
|
|
1717
1949
|
* (which is `Deserialize` but lives in the parse crate; kept here so
|
|
1718
1950
|
* the operation wire type doesn\'t depend on the parser\'s
|
|
1719
1951
|
* serialization shape).
|
|
@@ -1727,7 +1959,7 @@ export type GuideOrientationSpec = "vertical" | "horizontal";
|
|
|
1727
1959
|
* ## The two-stream addressing model
|
|
1728
1960
|
*
|
|
1729
1961
|
* Table-cell text is stored out of band on `Table.cells[].paragraphs`
|
|
1730
|
-
* (see `
|
|
1962
|
+
* (see `idml_import`), disjoint from `Story.paragraphs`. So a content
|
|
1731
1963
|
* address needs to say *which* paragraph stream its byte offsets index:
|
|
1732
1964
|
*
|
|
1733
1965
|
* - `ContentSelection.cell == None` — offsets are story-local bytes
|
|
@@ -1807,7 +2039,7 @@ export interface NumberingListSummary {
|
|
|
1807
2039
|
|
|
1808
2040
|
/**
|
|
1809
2041
|
* W1.22 (engine gap 22) — wire description of a `<NumberingList>`
|
|
1810
|
-
* resource, mirroring `
|
|
2042
|
+
* resource, mirroring `paged_model::NumberingListDef`. The
|
|
1811
2043
|
* CRUD ops (`CreateNumberingList` / `EditNumberingList` /
|
|
1812
2044
|
* `DeleteNumberingList`) carry this. `self_id` is minted
|
|
1813
2045
|
* (`NumberingList/u<n>`) when absent on create; echoed resolved in
|
|
@@ -1927,6 +2159,19 @@ export interface ResolutionResult {
|
|
|
1927
2159
|
*/
|
|
1928
2160
|
export type HitFilter = "frame" | "text" | "any";
|
|
1929
2161
|
|
|
2162
|
+
/**
|
|
2163
|
+
* Where a story\'s flow overran its frame chain — the first-class overset
|
|
2164
|
+
* **continuation** the engine records (`paged_flow::Overset::Remains`, via
|
|
2165
|
+
* `RenderDiagnostics::overset_continuations()`). Lets the editor jump the
|
|
2166
|
+
* caret to the first clipped line / show \"overset at ¶N line M\" instead of
|
|
2167
|
+
* only a boolean overset badge. Addresses match the layout stream
|
|
2168
|
+
* (`paragraph` within the story\'s body flow, `line` within that paragraph).
|
|
2169
|
+
*/
|
|
2170
|
+
export interface OversetAt {
|
|
2171
|
+
paragraph: number;
|
|
2172
|
+
line: number;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
1930
2175
|
/**
|
|
1931
2176
|
* Which runtime budget a script exhausted (B-09 / W-08). The typed
|
|
1932
2177
|
* half of a `ScriptResult`: lets the host distinguish a budget abort
|
|
@@ -1970,7 +2215,7 @@ export interface GradientSpec {
|
|
|
1970
2215
|
|
|
1971
2216
|
/**
|
|
1972
2217
|
* Wire-format description of a colour swatch (`<Color>`), mirroring
|
|
1973
|
-
* the editable fields of `
|
|
2218
|
+
* the editable fields of `paged_model::ColorEntry` with primitive,
|
|
1974
2219
|
* `Deserialize`-able types (the AST `ColorEntry` is `Serialize`-only).
|
|
1975
2220
|
* Carried by the swatch-collection mutations so create / edit /
|
|
1976
2221
|
* delete-undo are lossless. `space` / `model` / `alternate_space` are
|
|
@@ -2008,6 +2253,11 @@ export interface SwatchSpec {
|
|
|
2008
2253
|
*/
|
|
2009
2254
|
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 } };
|
|
2010
2255
|
|
|
2256
|
+
/**
|
|
2257
|
+
* [`Operation::ApplyStyle`].
|
|
2258
|
+
*/
|
|
2259
|
+
export type StyleScope = "paragraph" | "character";
|
|
2260
|
+
|
|
2011
2261
|
/**
|
|
2012
2262
|
* `RequestLineBounds` reply payload.
|
|
2013
2263
|
*/
|
|
@@ -2167,6 +2417,143 @@ export interface ProviderTileWire {
|
|
|
2167
2417
|
rgba: number[];
|
|
2168
2418
|
}
|
|
2169
2419
|
|
|
2420
|
+
/**
|
|
2421
|
+
* v59 — where [`Operation::ReorderNode`] puts its target inside the
|
|
2422
|
+
* sibling list it already belongs to.
|
|
2423
|
+
*
|
|
2424
|
+
* **Both forms deliberately ship.** The four RELATIVE verbs are what a
|
|
2425
|
+
* UI and a plugin can actually express: they are read-modify-write
|
|
2426
|
+
* against whatever the list happens to be at apply time, so a
|
|
2427
|
+
* concurrent insert or delete between \"the caller read the order\" and
|
|
2428
|
+
* \"the engine applied the op\" cannot silently restack the wrong item —
|
|
2429
|
+
* there is no stale index to be wrong. They map 1:1 onto the Arrange
|
|
2430
|
+
* menu every DTP app ships (Illustrator\'s Object ▸ Arrange, InDesign\'s
|
|
2431
|
+
* Object ▸ Arrange, PowerPoint\'s Bring Forward…).
|
|
2432
|
+
*
|
|
2433
|
+
* [`ZOrderTarget::Index`] is the absolute form, and it is what makes
|
|
2434
|
+
* the inverse EXACT: the apply layer records the slot the node came
|
|
2435
|
+
* from and hands back `Index(that slot)`. It is also the honest way to
|
|
2436
|
+
* express \"restore this exact order\" for a drag in a layers panel.
|
|
2437
|
+
* Because an absolute index CAN go stale, an out-of-range `Index` is
|
|
2438
|
+
* rejected loudly (`OperationError::InvalidPosition`) instead of being
|
|
2439
|
+
* clamped — a caller working from a stale model should hear about it.
|
|
2440
|
+
*
|
|
2441
|
+
* Serialised externally-tagged (the [`FieldKind`] convention):
|
|
2442
|
+
* `\"front\"` / `\"back\"` / `\"forward\"` / `\"backward\"` / `{\"index\": 3}`.
|
|
2443
|
+
*/
|
|
2444
|
+
export type ZOrderTarget = "front" | "back" | "forward" | "backward" | { index: number };
|
|
2445
|
+
|
|
2446
|
+
/**
|
|
2447
|
+
* §21 advanced prepress — one ink plate\'s coverage on one page.
|
|
2448
|
+
*
|
|
2449
|
+
* `area_pct` is the share of the WHOLE page this plate puts any ink
|
|
2450
|
+
* on — the \"does this plate earn its pass on press\" number.
|
|
2451
|
+
* `max_tint_pct` / `mean_tint_pct` describe how heavily, over the
|
|
2452
|
+
* inked pixels only.
|
|
2453
|
+
*/
|
|
2454
|
+
export interface PlateCoverageSummary {
|
|
2455
|
+
/**
|
|
2456
|
+
* `\"cyan\"` / `\"magenta\"` / `\"yellow\"` / `\"black\"` for the process
|
|
2457
|
+
* inks; the spot swatch\'s `Color/<id>` for a named ink — the same
|
|
2458
|
+
* id `InkSummary::spot_id` uses, so the Ink Manager and this
|
|
2459
|
+
* surface address the same ink.
|
|
2460
|
+
*/
|
|
2461
|
+
inkId: string;
|
|
2462
|
+
/**
|
|
2463
|
+
* Display name: `\"Cyan\"` … `\"Black\"`, or the spot swatch\'s
|
|
2464
|
+
* palette name (falling back to its id).
|
|
2465
|
+
*/
|
|
2466
|
+
name: string;
|
|
2467
|
+
isSpot: boolean;
|
|
2468
|
+
areaPct: number;
|
|
2469
|
+
maxTintPct: number;
|
|
2470
|
+
meanTintPct: number;
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
/**
|
|
2474
|
+
* §21 advanced prepress — one page\'s ink-coverage reading, produced
|
|
2475
|
+
* by rasterising the page and reading the CPU rasterizer\'s per-ink
|
|
2476
|
+
* plane state.
|
|
2477
|
+
*
|
|
2478
|
+
* # Read `separated_pct` before quoting any other number
|
|
2479
|
+
*
|
|
2480
|
+
* The raster lane only decomposes a pixel into inks when the draw
|
|
2481
|
+
* that made it carried a CMYK or spot swatch. Placed images, RGB and
|
|
2482
|
+
* Lab swatches, gradients, and anything inside a blend group carry no
|
|
2483
|
+
* ink decomposition — those pixels are **unknown**, not blank, and
|
|
2484
|
+
* every statistic below excludes them. `separatedPct` is how much of
|
|
2485
|
+
* the page was actually measured. A `maxTacPct` of 340 over a
|
|
2486
|
+
* `separatedPct` of 4 is a statement about 4% of the page.
|
|
2487
|
+
*
|
|
2488
|
+
* Nothing here estimates the unknown pixels. The renderer\'s RGB→CMYK
|
|
2489
|
+
* map is 100%-GCR (a rich black inverts to K-only / 100% TAC where a
|
|
2490
|
+
* real coated profile gives ~300%), so folding it in would make the
|
|
2491
|
+
* headline figure confidently wrong exactly where operators check it.
|
|
2492
|
+
*/
|
|
2493
|
+
export interface InkCoverageSummary {
|
|
2494
|
+
pageId: PageId;
|
|
2495
|
+
pageIndex: number;
|
|
2496
|
+
/**
|
|
2497
|
+
* **Check this first.** `false` means the document has no active
|
|
2498
|
+
* CMYK working profile (none supplied at load, none named by the
|
|
2499
|
+
* designmap that the host had registered, no soft proof), and
|
|
2500
|
+
* therefore the renderer resolved every CMYK and spot swatch
|
|
2501
|
+
* straight to display RGB — there is no ink lane at all and every
|
|
2502
|
+
* figure below is structurally zero.
|
|
2503
|
+
*
|
|
2504
|
+
* That is a completely different condition from \"this page is all
|
|
2505
|
+
* RGB artwork\", and a surface MUST NOT render them the same way:
|
|
2506
|
+
* one says *activate a profile*, the other says *this content
|
|
2507
|
+
* separates at the RIP*. Both produce `separatedPct == 0`.
|
|
2508
|
+
*
|
|
2509
|
+
* `SwatchSummary::totalAreaCoveragePct` is unaffected — it is
|
|
2510
|
+
* palette arithmetic and needs no profile — so the swatch-level
|
|
2511
|
+
* ink-limit audit still works when this is `false`.
|
|
2512
|
+
*/
|
|
2513
|
+
separationAvailable: boolean;
|
|
2514
|
+
/**
|
|
2515
|
+
* Sampling resolution of the analysis render, in dpi. An area
|
|
2516
|
+
* measurement is dpi-independent for solid tints; anti-aliased
|
|
2517
|
+
* edges dilute their ink with the paper they partly cover, so
|
|
2518
|
+
* sub-pixel hairlines under-report. Check hairline rich blacks
|
|
2519
|
+
* against `SwatchSummary::totalAreaCoveragePct`, which is exact.
|
|
2520
|
+
*/
|
|
2521
|
+
analysisDpi: number;
|
|
2522
|
+
/**
|
|
2523
|
+
* The total-area-coverage limit `overLimitPixels` was counted
|
|
2524
|
+
* against, in percent.
|
|
2525
|
+
*/
|
|
2526
|
+
limitPct: number;
|
|
2527
|
+
totalPixels: number;
|
|
2528
|
+
separatedPixels: number;
|
|
2529
|
+
/**
|
|
2530
|
+
* `separatedPixels / totalPixels`, 0..=100. The honesty
|
|
2531
|
+
* denominator — see the type docs.
|
|
2532
|
+
*/
|
|
2533
|
+
separatedPct: number;
|
|
2534
|
+
maxTacPct: number;
|
|
2535
|
+
meanTacPct: number;
|
|
2536
|
+
overLimitPixels: number;
|
|
2537
|
+
/**
|
|
2538
|
+
* Share of the SEPARATED pixels over the limit, 0..=100.
|
|
2539
|
+
*/
|
|
2540
|
+
overLimitPct: number;
|
|
2541
|
+
/**
|
|
2542
|
+
* Four process plates always, then one per spot ink used on the
|
|
2543
|
+
* page. A blank process plate still appears — \"Cyan: 0%\" is
|
|
2544
|
+
* itself a reading.
|
|
2545
|
+
*/
|
|
2546
|
+
plates: PlateCoverageSummary[];
|
|
2547
|
+
/**
|
|
2548
|
+
* 81 counts over the separated pixels, bucket `i` covering
|
|
2549
|
+
* `[i·10%, (i+1)·10%)` of total area coverage (so 0–800%, which
|
|
2550
|
+
* leaves room for spot plates above the 400% process ceiling).
|
|
2551
|
+
* Lets a panel re-threshold the ink limit with a slider and no
|
|
2552
|
+
* re-render.
|
|
2553
|
+
*/
|
|
2554
|
+
histogram: number[];
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2170
2557
|
export interface CaretGeometry {
|
|
2171
2558
|
pageId: PageId;
|
|
2172
2559
|
frameId: string | null;
|
|
@@ -2460,9 +2847,9 @@ export interface InitOutput {
|
|
|
2460
2847
|
readonly qcms_white_point_sRGB: (a: number) => void;
|
|
2461
2848
|
readonly lut_inverse_interp16: (a: number, b: number, c: number) => number;
|
|
2462
2849
|
readonly lut_interp_linear16: (a: number, b: number, c: number) => number;
|
|
2463
|
-
readonly
|
|
2464
|
-
readonly
|
|
2465
|
-
readonly
|
|
2850
|
+
readonly wasm_bindgen__convert__closures_____invoke__hba9dab33e391dce8: (a: number, b: number, c: any) => [number, number];
|
|
2851
|
+
readonly wasm_bindgen__convert__closures_____invoke__h2a9a86477ca3734e: (a: number, b: number, c: any, d: any) => void;
|
|
2852
|
+
readonly wasm_bindgen__convert__closures_____invoke__h84d34b615e684f5e: (a: number, b: number, c: any) => void;
|
|
2466
2853
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
2467
2854
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
2468
2855
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paged-media/plugin-api",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.29-canary.0",
|
|
4
4
|
"description": "The Paged plugin contract: manifest, bundle lifecycle, the BundleHost surface, and the contribution + engine wire types. Type-only.",
|
|
5
5
|
"license": "MPL-2.0 OR LicenseRef-PMEL",
|
|
6
6
|
"type": "module",
|