@paged-media/plugin-api 0.2.37-canary.0 → 0.2.38-canary.3
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/editor.d.ts +29 -1
- package/dist/host.d.ts +168 -2
- package/dist/index.d.ts +3 -2
- package/dist/widgets.d.ts +17 -0
- package/dist/wire.d.ts +210 -31
- package/package.json +1 -1
package/dist/editor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
|
-
import type { EditContextContribution, ObjectTypeContribution } from "./host";
|
|
2
|
+
import type { EditContextContribution, ObjectTypeContribution, SceneImage, SceneImageTile } from "./host";
|
|
3
3
|
import type { CollectionName, ContentSelection, DocumentMeta, ElementGeometryItem, ElementId, MainToWorkerKind, Mutation, PageId, PathAnchorsResult, ProviderTileWire, ResourceTilesNeededWire, SceneLayer, SelectionMode, WorkerToMain } from "./wire";
|
|
4
4
|
/** C-6 (I-06) — the editor-channel claim shape (the v44
|
|
5
5
|
* `claimImageResource` payload, named for the `PagedEditor.images`
|
|
@@ -485,7 +485,35 @@ export interface PagedEditor {
|
|
|
485
485
|
*/
|
|
486
486
|
submit(elementId: string, layer: SceneLayer, caller?: string): Promise<void>;
|
|
487
487
|
clear(elementId: string): Promise<void>;
|
|
488
|
+
/** Protocol 66 — the BINARY scene-image lane (canvas-wasm
|
|
489
|
+
* `submitSceneImageDirect`): the bytes cross as a `Uint8Array`,
|
|
490
|
+
* transferred when `transfer` is true. Optional: absent on an older
|
|
491
|
+
* host, and the SDK then falls back to `submit()`. */
|
|
492
|
+
submitImage?(elementId: string, image: SceneImage, caller?: string, transfer?: boolean): Promise<void>;
|
|
493
|
+
/** Protocol 66 — patch tiles of the image `submitImage` set
|
|
494
|
+
* (canvas-wasm `submitSceneImageTilesDirect`). Optional with
|
|
495
|
+
* `submitImage`; the SDK uses the lane only when both exist. */
|
|
496
|
+
submitImageTiles?(elementId: string, tiles: readonly SceneImageTile[], caller?: string, transfer?: boolean): Promise<void>;
|
|
488
497
|
};
|
|
498
|
+
/** Protocol 66 — the BINARY `.paged` parts lane (canvas-wasm
|
|
499
|
+
* `writePagedPartDirect` / `readPagedPartDirect` + `deletePagedPart`).
|
|
500
|
+
* FULL paths (`paged/<plugin-id>/…`); the SDK adapter scopes them.
|
|
501
|
+
* Optional: absent on an older host, and the SDK falls back to the
|
|
502
|
+
* JSON `client.send` messages. */
|
|
503
|
+
parts?: {
|
|
504
|
+
write(path: string, bytes: Uint8Array, caller?: string): Promise<void>;
|
|
505
|
+
read(path: string): Promise<Uint8Array | null>;
|
|
506
|
+
delete(path: string, caller?: string): Promise<boolean>;
|
|
507
|
+
};
|
|
508
|
+
/** Protocol 66 — the BINARY commit lane (canvas-wasm
|
|
509
|
+
* `mutateWithBytesDirect`): apply `mutation` (a `batch` included) after
|
|
510
|
+
* handing `bytes` to its FIRST `replaceImageBytes` whose `bytes` is `[]`,
|
|
511
|
+
* depth-first through batches. The engine refuses a mutation with no such
|
|
512
|
+
* slot. The buffer moves to the worker when `transfer` is true. Resolves
|
|
513
|
+
* with the same reply `client.mutate` does. Optional: absent on an older
|
|
514
|
+
* host, and the SDK then splices `Array.from(bytes)` into that slot and
|
|
515
|
+
* calls `client.mutate`. */
|
|
516
|
+
mutateWithBytes?(mutation: Mutation, bytes: Uint8Array, transfer?: boolean): Promise<WorkerToMain>;
|
|
489
517
|
/** C-6 (I-06) — the renderer RESOURCE-PROVIDER channel. The editor
|
|
490
518
|
* routes these to the canvas-wasm `claimImageResource` /
|
|
491
519
|
* `submitResourceTiles` / `releaseImageResource` messages (the v44
|
package/dist/host.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CollectionName, DocumentMeta, ElementGeometryItem, ElementId, HitFilter, HitResult, Mutation, PageId, ElementProperties, PathAnchorsResult, PathAnchorTriple, SceneTreeNode, SelectionMode } from "./wire";
|
|
1
|
+
import type { CollectionName, DocumentMeta, ElementGeometryItem, ElementId, HitFilter, HitResult, MintedElement, Mutation, PageId, ElementProperties, PathAnchorsResult, PathAnchorTriple, SceneTreeNode, SelectionMode } from "./wire";
|
|
2
2
|
import type { CommandContribution, ExporterContribution, ImporterContribution, KeybindingContribution, OverlayContribution, PagedEditor, PanelContribution, ToolContribution, ToolPreviewShape } from "./editor";
|
|
3
3
|
import type { SceneLayer } from "./wire";
|
|
4
4
|
import type { AssetSurface } from "./assets";
|
|
@@ -144,6 +144,12 @@ export interface EditContextContribution {
|
|
|
144
144
|
/** K-1 — a key while the context is active. The shell owns Esc (→
|
|
145
145
|
* `onCancel`) and Enter (→ `onCommit`); every other key forwards here. */
|
|
146
146
|
onContentKey?(e: KeyboardEvent): void;
|
|
147
|
+
/** A plain wheel over the ACTIVE context's frame, in frame-content
|
|
148
|
+
* points. Return `true` when the context scrolled its own content (a
|
|
149
|
+
* sheet's in-frame grid window) — the canvas then does not pan;
|
|
150
|
+
* `false` keeps the host's pan. Cmd/Ctrl wheel is the host's zoom and
|
|
151
|
+
* never reaches here. Optional: absent ⇒ the canvas always pans. */
|
|
152
|
+
onContentWheel?(e: ContentWheelEvent): boolean;
|
|
147
153
|
/** K-1 — unsaved-edit probe: gates the discard prompt + the §8.0
|
|
148
154
|
* seamless-undo boundary. Absent ⇒ treated as never dirty. */
|
|
149
155
|
isDirty?(): boolean;
|
|
@@ -171,6 +177,11 @@ export interface EditContextContribution {
|
|
|
171
177
|
* always enabled. */
|
|
172
178
|
onCanUndo?(): boolean;
|
|
173
179
|
onCanRedo?(): boolean;
|
|
180
|
+
/** Labels for the host's Edit-menu items while this context owns undo
|
|
181
|
+
* (e.g. "Undo Brush Stroke"). `null` or absent ⇒ the host's generic
|
|
182
|
+
* label. Read when the menu renders, so return the current step. */
|
|
183
|
+
undoLabel?(): string | null;
|
|
184
|
+
redoLabel?(): string | null;
|
|
174
185
|
/** HOST-STAMPED, not author-supplied: the `x-paged:<manifest id>`
|
|
175
186
|
* metadata key the host resolves the candidate's `metadata` from
|
|
176
187
|
* before calling `matches`. The SDK adapter fills this from the
|
|
@@ -201,6 +212,24 @@ export interface ContentPointerEvent {
|
|
|
201
212
|
/** Mouse button (0 = primary). */
|
|
202
213
|
button: number;
|
|
203
214
|
}
|
|
215
|
+
/** A wheel delivered to the ACTIVE edit context (`onContentWheel`).
|
|
216
|
+
* `delta` is the scroll in frame-content points — the screen delta
|
|
217
|
+
* divided by the camera scale, line/page modes normalised to pixels
|
|
218
|
+
* first — x right / y down, the same axes as `contentPoint`. */
|
|
219
|
+
export interface ContentWheelEvent {
|
|
220
|
+
/** Pointer in frame-content points (origin = the content-box top-left). */
|
|
221
|
+
contentPoint: [number, number];
|
|
222
|
+
/** The frame the active context edits (the stack's scope root). */
|
|
223
|
+
elementId: string;
|
|
224
|
+
/** Scroll amount in frame-content points [x, y]. */
|
|
225
|
+
delta: [number, number];
|
|
226
|
+
modifiers: {
|
|
227
|
+
shift: boolean;
|
|
228
|
+
alt: boolean;
|
|
229
|
+
cmd: boolean;
|
|
230
|
+
ctrl: boolean;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
204
233
|
/**
|
|
205
234
|
* A plugin-defined OBJECT TYPE (paged.web §9.1.2). A webFrame is an
|
|
206
235
|
* ordinary rectangle with attached `x-paged:media.paged.web` source
|
|
@@ -428,6 +457,52 @@ export interface SceneLayerSurface extends Disposable {
|
|
|
428
457
|
/** Clear the layer for `elementId` (returns the frame to native
|
|
429
458
|
* content). */
|
|
430
459
|
clear(elementId: string): Promise<void>;
|
|
460
|
+
/**
|
|
461
|
+
* Make the frame's layer ONE RGBA8 image (protocol 66). Where the host
|
|
462
|
+
* wires the binary lane (`supports("rendering.sceneLayer.binary@1")`)
|
|
463
|
+
* the bytes cross as a `Uint8Array` — no `number[]`, no JSON parse —
|
|
464
|
+
* and only the pages showing the frame repaint. On an older host the
|
|
465
|
+
* SDK falls back to `submit()` with an image item; the bundle calls
|
|
466
|
+
* the same method either way. Replaces any previous layer.
|
|
467
|
+
*/
|
|
468
|
+
submitImage(elementId: string, image: SceneImage, options?: SceneImageSubmitOptions): Promise<void>;
|
|
469
|
+
/**
|
|
470
|
+
* Patch rectangles of the image this surface last `submitImage`d for
|
|
471
|
+
* `elementId` (a brush stroke dirties a window, not the image). Rejects
|
|
472
|
+
* when no image was submitted for the element. A tile outside the
|
|
473
|
+
* image, or a byte count that does not match `width*height*4`, rejects
|
|
474
|
+
* the whole call and changes nothing.
|
|
475
|
+
*/
|
|
476
|
+
submitImageTiles(elementId: string, tiles: readonly SceneImageTile[], options?: SceneImageSubmitOptions): Promise<void>;
|
|
477
|
+
}
|
|
478
|
+
/** One whole RGBA8 image for {@link SceneLayerSurface.submitImage}. */
|
|
479
|
+
export interface SceneImage {
|
|
480
|
+
/** Tightly packed RGBA8, row-major, `width*height*4` bytes. */
|
|
481
|
+
rgba: Uint8Array;
|
|
482
|
+
/** Pixel width of the buffer. */
|
|
483
|
+
width: number;
|
|
484
|
+
/** Pixel height of the buffer. */
|
|
485
|
+
height: number;
|
|
486
|
+
/** Destination `[x, y, w, h]` in frame-content points. */
|
|
487
|
+
dest: [number, number, number, number];
|
|
488
|
+
}
|
|
489
|
+
/** One rectangle of new pixels for
|
|
490
|
+
* {@link SceneLayerSurface.submitImageTiles}; the origin is in IMAGE
|
|
491
|
+
* pixels of the submitted image. */
|
|
492
|
+
export interface SceneImageTile {
|
|
493
|
+
x: number;
|
|
494
|
+
y: number;
|
|
495
|
+
width: number;
|
|
496
|
+
height: number;
|
|
497
|
+
/** Tightly packed RGBA8, `width*height*4` bytes. */
|
|
498
|
+
rgba: Uint8Array;
|
|
499
|
+
}
|
|
500
|
+
/** How the bytes of a scene-image submission are handed over. */
|
|
501
|
+
export interface SceneImageSubmitOptions {
|
|
502
|
+
/** `true`: the buffers are TRANSFERRED to the host and are detached
|
|
503
|
+
* (unusable) in the bundle afterwards — no copy. Default `false`: the
|
|
504
|
+
* host copies, and the bundle keeps its buffers. */
|
|
505
|
+
transfer?: boolean;
|
|
431
506
|
}
|
|
432
507
|
/** One pyramid tile the bundle's `source` callback returns (C-6). `rgba`
|
|
433
508
|
* is tightly packed RGBA8 (`width*height*4` bytes, row-major); `[x, y]`
|
|
@@ -590,15 +665,37 @@ export interface SecretsSurface {
|
|
|
590
665
|
forget(ref: string): Promise<void>;
|
|
591
666
|
}
|
|
592
667
|
/** Expected mutation failures are results, not throws — mirroring the
|
|
593
|
-
* editor's mutate-never-throws convention.
|
|
668
|
+
* editor's mutate-never-throws convention.
|
|
669
|
+
*
|
|
670
|
+
* `createdId` is the engine's single-creation answer: for a `batch` it is
|
|
671
|
+
* only the LAST element the batch minted. `minted` is the whole list, in
|
|
672
|
+
* mint order — every element a `batch` (or a `duplicateElements`)
|
|
673
|
+
* created, each with the `bindCreated` handle that named it (`null` when
|
|
674
|
+
* none did) and the story minted alongside it (a text frame's
|
|
675
|
+
* `ParentStory`, else `null`). Present whenever the engine reported it
|
|
676
|
+
* (it is additive on the wire; an older engine omits it), so a bundle
|
|
677
|
+
* placing a frame + table + chart in ONE mutate reads back every id here
|
|
678
|
+
* instead of re-discovering them with a scene walk. */
|
|
594
679
|
export type MutationOutcome = {
|
|
595
680
|
applied: true;
|
|
596
681
|
createdId: ElementId | null;
|
|
597
682
|
pageIds: PageId[];
|
|
683
|
+
minted?: MintedElement[];
|
|
598
684
|
} | {
|
|
599
685
|
applied: false;
|
|
600
686
|
error: unknown;
|
|
601
687
|
};
|
|
688
|
+
/** Options of {@link DocumentSurface.mutateWithBytes}. */
|
|
689
|
+
export interface MutateWithBytesOptions {
|
|
690
|
+
/** Hand the buffer to the host instead of copying it; it may be detached
|
|
691
|
+
* afterwards. Default `false`. */
|
|
692
|
+
transfer?: boolean;
|
|
693
|
+
}
|
|
694
|
+
/** What {@link DocumentSurface.onWillSave} listeners receive. */
|
|
695
|
+
export interface WillSaveEvent {
|
|
696
|
+
/** The container being written. */
|
|
697
|
+
format: "paged";
|
|
698
|
+
}
|
|
602
699
|
export interface DocumentChangeEvent {
|
|
603
700
|
kind: "mutationApplied" | "undoApplied" | "redoApplied";
|
|
604
701
|
pageIds: PageId[];
|
|
@@ -739,6 +836,37 @@ export interface DocumentSurface {
|
|
|
739
836
|
* hasn't absorbed yet (see mutations.ts). Widening an accepted
|
|
740
837
|
* input is additive: every `Mutation` still passes. */
|
|
741
838
|
mutate(mutation: MutationInput): Promise<MutationOutcome>;
|
|
839
|
+
/**
|
|
840
|
+
* Protocol 66 — the same write door as {@link mutate}, with image bytes
|
|
841
|
+
* that cross as a `Uint8Array` instead of a JSON `number[]`. `bytes` goes
|
|
842
|
+
* to the FIRST `replaceImageBytes` in `mutation` whose `bytes` is `[]`
|
|
843
|
+
* (depth-first through a `batch`), so a baked image and the
|
|
844
|
+
* `setPluginMetadata` that describes it commit as one undoable step:
|
|
845
|
+
*
|
|
846
|
+
* ```ts
|
|
847
|
+
* await host.document.mutateWithBytes(
|
|
848
|
+
* { op: "batch", args: { ops: [
|
|
849
|
+
* { op: "replaceImageBytes", args: { elementId, bytes: [] } },
|
|
850
|
+
* { op: "setPluginMetadata", args: { elementId, key, value } },
|
|
851
|
+
* ] } },
|
|
852
|
+
* png,
|
|
853
|
+
* { transfer: true },
|
|
854
|
+
* );
|
|
855
|
+
* ```
|
|
856
|
+
*
|
|
857
|
+
* A mutation with no such slot is refused (`applied: false`) rather
|
|
858
|
+
* than applied without the bytes. Same gates and outcome as `mutate`:
|
|
859
|
+
* `capabilities.document.write`, metadata only under this plugin's own
|
|
860
|
+
* key, never a throw. `options.transfer: true` hands the buffer to the
|
|
861
|
+
* host, which may detach it; the default copies.
|
|
862
|
+
*
|
|
863
|
+
* Call it unconditionally. Where the host wires the binary lane,
|
|
864
|
+
* `supports("document.mutateBinary@1")` is true and the bytes are not
|
|
865
|
+
* converted; otherwise the SDK splices `Array.from(bytes)` into the slot
|
|
866
|
+
* and takes the `mutate` path (the size limit of the JSON channel then
|
|
867
|
+
* applies).
|
|
868
|
+
*/
|
|
869
|
+
mutateWithBytes(mutation: MutationInput, bytes: Uint8Array, options?: MutateWithBytesOptions): Promise<MutationOutcome>;
|
|
742
870
|
undo(): Promise<void>;
|
|
743
871
|
redo(): Promise<void>;
|
|
744
872
|
collection<T>(name: CollectionName): Promise<readonly T[]>;
|
|
@@ -826,6 +954,14 @@ export interface DocumentSurface {
|
|
|
826
954
|
* throws `PluginApiNotImplemented` (a visible seam, never a fake value). */
|
|
827
955
|
storyContent(storyId: string): Promise<StoryContent | null>;
|
|
828
956
|
onDidChange(listener: (e: DocumentChangeEvent) => void): Disposable;
|
|
957
|
+
/**
|
|
958
|
+
* Called before the host serialises the document to a file; the save
|
|
959
|
+
* WAITS for the returned promise, so a bundle can commit pending state
|
|
960
|
+
* (write parts, bake pixels) first. An error is logged and does not
|
|
961
|
+
* stop the save. Probe `supports("document.onWillSave@1")`: without a
|
|
962
|
+
* host backend the listener is held but never called.
|
|
963
|
+
*/
|
|
964
|
+
onWillSave(listener: (e: WillSaveEvent) => void | Promise<void>): Disposable;
|
|
829
965
|
/**
|
|
830
966
|
* Plugin-metadata carrier (protocol v33) — read this plugin's
|
|
831
967
|
* metadata envelope on a leaf page item, or `null` when absent.
|
|
@@ -1021,6 +1157,16 @@ export interface ShellSurface {
|
|
|
1021
1157
|
* `false`.
|
|
1022
1158
|
*/
|
|
1023
1159
|
saveFile(options: SaveFileOptions): Promise<boolean>;
|
|
1160
|
+
/**
|
|
1161
|
+
* Enter one of THIS bundle's registered edit contexts on `elementId`
|
|
1162
|
+
* programmatically (a panel button, an importer that just placed a
|
|
1163
|
+
* frame) — the same stack push a double-click on the frame performs.
|
|
1164
|
+
* Throws for a type the bundle did not register. Resolves `false` when
|
|
1165
|
+
* the host could not enter (no backend — probe
|
|
1166
|
+
* `supports("shell.enterEditContext@1")` — or the element does not
|
|
1167
|
+
* exist / is not the context's).
|
|
1168
|
+
*/
|
|
1169
|
+
enterEditContext(type: string, elementId: ElementId): Promise<boolean>;
|
|
1024
1170
|
}
|
|
1025
1171
|
/** What `ShellSurface.saveFile` delivers (K-10) — the inverse of
|
|
1026
1172
|
* {@link PickedFile}, field-for-field, so bytes picked from disk can be
|
|
@@ -1117,6 +1263,10 @@ export interface PartsSurface {
|
|
|
1117
1263
|
/** List part paths under `prefix` (relative) — this plugin's namespace only,
|
|
1118
1264
|
* returned as relative paths. */
|
|
1119
1265
|
list(prefix?: string): Promise<string[]>;
|
|
1266
|
+
/** Delete the part at `path` (protocol 66, `storage.parts@2`). Resolves
|
|
1267
|
+
* `true` when it existed. A part the loaded file carries is dropped
|
|
1268
|
+
* from the next save, not only hidden. Not undoable, like `write`. */
|
|
1269
|
+
delete(path: string): Promise<boolean>;
|
|
1120
1270
|
}
|
|
1121
1271
|
export interface NativeDocumentSurface {
|
|
1122
1272
|
/** Read the core-owned native MODEL part (`paged/core/model/document.pgm`)
|
|
@@ -1284,6 +1434,17 @@ export interface BindingsSurface {
|
|
|
1284
1434
|
* subscription; the argument is the changed name). */
|
|
1285
1435
|
onDidChange(listener: (name: string) => void): Disposable;
|
|
1286
1436
|
}
|
|
1437
|
+
/** A tool-option value as the host's tool-options UI stores it. */
|
|
1438
|
+
export type ToolSettingValue = number | boolean | string;
|
|
1439
|
+
/** Read access to the values the host's tool-options UI holds for this
|
|
1440
|
+
* bundle's tools (the fields declared in `ToolContribution.options`).
|
|
1441
|
+
* `toolId` must be one of this bundle's own tool ids. Probe
|
|
1442
|
+
* `supports("tools.settings@1")`: without a host backend `settings`
|
|
1443
|
+
* answers `{}` and `onDidChangeSettings` never fires. */
|
|
1444
|
+
export interface ToolsSurface {
|
|
1445
|
+
settings(toolId: string): Readonly<Record<string, ToolSettingValue>>;
|
|
1446
|
+
onDidChangeSettings(toolId: string, listener: (settings: Readonly<Record<string, ToolSettingValue>>) => void): Disposable;
|
|
1447
|
+
}
|
|
1287
1448
|
/**
|
|
1288
1449
|
* What `activate(host)` receives. Types from `@paged-media/plugin-api`,
|
|
1289
1450
|
* values from here — never import host values into a bundle's module
|
|
@@ -1401,6 +1562,11 @@ export interface BundleHost {
|
|
|
1401
1562
|
* `capabilities.clipboard`: `"full"` grants text + tabular, `"vector"`
|
|
1402
1563
|
* grants text only, `"none"`/absent denies. */
|
|
1403
1564
|
readonly clipboard: ClipboardSurface;
|
|
1565
|
+
/** The tool-settings READ door: the option values the host's
|
|
1566
|
+
* tool-options UI holds for this bundle's tools, plus a change
|
|
1567
|
+
* subscription. Always present; `supports("tools.settings@1")`
|
|
1568
|
+
* reports whether a host store is wired. */
|
|
1569
|
+
readonly tools: ToolsSurface;
|
|
1404
1570
|
/** Capability detection over version sniffing: feature strings of
|
|
1405
1571
|
* the form `"area.member@major"` (see HOST_FEATURES in plugin-sdk). */
|
|
1406
1572
|
supports(feature: string): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export type { PluginId, PluginManifest, PluginCapabilities, PluginContributions, NetworkCapability, DataProvidersCapability, StorageCapability, WasmArtifact, WasmPurpose, WorkersCapability, SecretsCapability, GpuCapability, } from "./manifest";
|
|
2
2
|
export type { BundleHandle, PagedBundle } from "./bundle";
|
|
3
|
-
export type { BundleHost, ContributionSurface, SceneLayerSurface, ImagesSurface, ImageResourceClaimOptions, TileBytes, WorkersSurface, BundleWorker, SpawnWorkerOptions, SecretsSurface, SecretMaterial, DocumentSurface, SelectionSurface, ViewportSurface, TextSurface, TextMetrics, TextCaret, FrameChainLink, PlanarFace, PlanarRegionsResult, StoryContent, ParagraphContent, RunContent, OverlaySurface, ShellSurface, FilePickerOptions, PickedFile, SaveFileOptions, StorageSurface, BlobSurface, BlobUsage, PartsSurface, NativeDocumentSurface, NetworkSurface, ConsentResult, DataProvidersSurface, DataProviderRegistration, DataProviderHandle, DataProviderInfo, DataProviderSnapshot, ProviderSchema, ProviderField, ProviderRecordSet, DiagnosticsSurface, JournalSurface, JournalRecord, BindingsSurface, Diagnostic, DocumentChangeEvent, MutationOutcome, Disposable, PluginLogger, EditContextContribution, ObjectTypeContribution, EditContextCandidate, EnteredEditContext, ContentPointerEvent, EditContextDescriptor, ObjectTypeDescriptor, PluginMetadataEnvelope, ObjectTypeBaker, BakeContext, MenuContribution, } from "./host";
|
|
3
|
+
export type { BundleHost, ContributionSurface, SceneLayerSurface, SceneImage, SceneImageTile, SceneImageSubmitOptions, WillSaveEvent, ToolsSurface, ToolSettingValue, ImagesSurface, ImageResourceClaimOptions, TileBytes, WorkersSurface, BundleWorker, SpawnWorkerOptions, SecretsSurface, SecretMaterial, DocumentSurface, MutateWithBytesOptions, SelectionSurface, ViewportSurface, TextSurface, TextMetrics, TextCaret, FrameChainLink, PlanarFace, PlanarRegionsResult, StoryContent, ParagraphContent, RunContent, OverlaySurface, ShellSurface, FilePickerOptions, PickedFile, SaveFileOptions, StorageSurface, BlobSurface, BlobUsage, PartsSurface, NativeDocumentSurface, NetworkSurface, ConsentResult, DataProvidersSurface, DataProviderRegistration, DataProviderHandle, DataProviderInfo, DataProviderSnapshot, ProviderSchema, ProviderField, ProviderRecordSet, DiagnosticsSurface, JournalSurface, JournalRecord, BindingsSurface, Diagnostic, DocumentChangeEvent, MutationOutcome, Disposable, PluginLogger, EditContextContribution, ObjectTypeContribution, EditContextCandidate, EnteredEditContext, ContentPointerEvent, ContentWheelEvent, EditContextDescriptor, ObjectTypeDescriptor, PluginMetadataEnvelope, ObjectTypeBaker, BakeContext, MenuContribution, } from "./host";
|
|
4
4
|
export type { PanelSchema, PanelSchemaSection, PanelSchemaRow, SchemaPanelContribution, SchemaPanelRenderer, SchemaPanelRendererProps, WidgetValueBinding, BindingRef, SchemaGate, WidgetCollectionBinding, SchemaRowAction, SchemaListAction, SchemaListSpec, } from "./panel-schema";
|
|
5
|
-
export type { WidgetSurface, CodeEditorProps, CodeEditorDiagnostic, CodeEditorLanguage, } from "./widgets";
|
|
5
|
+
export type { WidgetSurface, ColorPickerProps, CodeEditorProps, CodeEditorDiagnostic, CodeEditorLanguage, } from "./widgets";
|
|
6
6
|
export type { BindingTarget, BindingPropertyRequest, BindingPropertyWrite, BindingCollectionRequest, BindingRead, BindingResolved, BindingDecline, BindingWrite, BindingCollection, BindingOp, BindingProvider, BindingProviderScope, BindingProviderHandle, BindingReadResult, BindingWriteResult, BindingCollectionResult, ActiveBindingProvider, } from "./binding-provider";
|
|
7
7
|
export type { AssetSurface, AssetKind, FontFaceAsset, FontFaceFormat, } from "./assets";
|
|
8
8
|
export type { ProviderTileWire } from "./wire";
|
|
9
|
+
export type { MintedElement } from "./wire";
|
|
9
10
|
export type { ClipboardSurface, ClipboardPayload, TabularClipboard, } from "./clipboard";
|
|
10
11
|
export type * from "./contributions";
|
|
11
12
|
export type * from "./mutations";
|
package/dist/widgets.d.ts
CHANGED
|
@@ -45,4 +45,21 @@ export interface WidgetSurface {
|
|
|
45
45
|
* editor. Always present: a plain-textarea fallback stands in when
|
|
46
46
|
* the host app injects no real widget catalog. */
|
|
47
47
|
readonly CodeEditor: ComponentType<CodeEditorProps>;
|
|
48
|
+
/** The host's colour picker (the same mixer the host's own colour UI
|
|
49
|
+
* uses). It edits a value the BUNDLE owns — it never writes the
|
|
50
|
+
* document or adds a swatch. Always present: an
|
|
51
|
+
* `<input type="color">` fallback stands in when the host injects
|
|
52
|
+
* none (probe `host.supports("widgets.colorPicker@1")`). */
|
|
53
|
+
readonly ColorPicker: ComponentType<ColorPickerProps>;
|
|
54
|
+
}
|
|
55
|
+
/** Props of {@link WidgetSurface.ColorPicker}. Colours are sRGB hex. */
|
|
56
|
+
export interface ColorPickerProps {
|
|
57
|
+
/** `#rrggbb`. */
|
|
58
|
+
value: string;
|
|
59
|
+
/** Every change while the user drags / types. */
|
|
60
|
+
onChange(next: string): void;
|
|
61
|
+
/** The settled value (pointer up, picker closed, Enter). */
|
|
62
|
+
onCommit?(next: string): void;
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
ariaLabel?: string;
|
|
48
65
|
}
|
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.66.0
|
|
5
5
|
/* tslint:disable */
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
|
|
@@ -51,7 +51,7 @@ export type SceneBlendMode = "multiply" | "screen" | "overlay" | "darken" | "lig
|
|
|
51
51
|
* `paged-mutate`, and the read-only viewer SDK must not link that.
|
|
52
52
|
* See the crate docs.
|
|
53
53
|
*/
|
|
54
|
-
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: "setFlowGrowRule"; args: { storyId: string; grow: boolean; maxPages?: number | null; copyFrameOptions?: boolean | null } } | { 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[] } };
|
|
54
|
+
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; paragraph?: number | null } } | { op: "insertField"; args: { storyId: string; offset: number; field: FieldKind } } | { op: "insertAnchoredFrame"; args: { storyId: string; offset: number; width: number; height: number; imageUri?: string | null; paragraph?: number | 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: "duplicateElements"; args: { elementIds: ElementId[]; offset: [number, number] } } | { 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: "setFlowGrowRule"; args: { storyId: string; grow: boolean; maxPages?: number | null; copyFrameOptions?: boolean | null } } | { 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[] } } | { op: "deleteTable"; args: { storyId: string; tableId: string } };
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* A per-run script budget on the wire (v63). Every field is optional
|
|
@@ -198,28 +198,40 @@ export interface GroupSpec {
|
|
|
198
198
|
* a fresh top-level create never has). `None` ⇒ identity.
|
|
199
199
|
*/
|
|
200
200
|
itemTransform?: [number, number, number, number, number, number] | null;
|
|
201
|
+
/**
|
|
202
|
+
* C-63 inverse-only — the group\'s own `<BlendingSetting Opacity>`
|
|
203
|
+
* to restore on re-creation. Group opacity became settable
|
|
204
|
+
* (`FrameOpacity` on a `NodeId::Group`), and ungrouping drops the
|
|
205
|
+
* wrapper that carried it; without this an undo of that ungroup
|
|
206
|
+
* brought the group back fully opaque. A fresh create omits it.
|
|
207
|
+
*/
|
|
208
|
+
opacity?: number | null;
|
|
209
|
+
/**
|
|
210
|
+
* C-63 inverse-only — the group\'s own `<BlendingSetting
|
|
211
|
+
* BlendMode>`; see [`GroupSpec::opacity`].
|
|
212
|
+
*/
|
|
213
|
+
blendMode?: string | null;
|
|
201
214
|
}
|
|
202
215
|
|
|
203
216
|
/**
|
|
204
217
|
* B-06 — `RequestNearestPathPoint` reply payload. Coordinates are
|
|
205
218
|
* in the element\'s local space (the `PathAnchors` space).
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
219
|
+
* v66 (RFI C-69) — `RequestTextOutlines` reply payload: the frame\'s
|
|
220
|
+
* composed glyphs as closed outlines, in PAGE space (the space
|
|
221
|
+
* `insertPath` takes), grouped into one run per fill colour so each
|
|
222
|
+
* becomes one compound path. Outlines are exactly the shapes the
|
|
223
|
+
* renderer fills (the same `FillPath` commands), so what is inserted
|
|
224
|
+
* looks like what was on screen. Stroked text, gradients on text and
|
|
225
|
+
* overset text are not included.
|
|
226
|
+
*/
|
|
227
|
+
export interface TextOutlinesResult {
|
|
228
|
+
id: ElementId;
|
|
229
|
+
pageId: PageId;
|
|
230
|
+
runs: TextOutlineRun[];
|
|
217
231
|
/**
|
|
218
|
-
*
|
|
232
|
+
* Glyphs left out (stroked, or a non-solid paint).
|
|
219
233
|
*/
|
|
220
|
-
|
|
221
|
-
point: [number, number];
|
|
222
|
-
distance: number;
|
|
234
|
+
skippedGlyphs?: number;
|
|
223
235
|
}
|
|
224
236
|
|
|
225
237
|
/**
|
|
@@ -355,6 +367,14 @@ export interface TextPathSpec {
|
|
|
355
367
|
endBracket?: number | null;
|
|
356
368
|
}
|
|
357
369
|
|
|
370
|
+
/**
|
|
371
|
+
* C-65 — one plugin-metadata Label entry on a scene-tree node.
|
|
372
|
+
*/
|
|
373
|
+
export interface PluginMetadataEntry {
|
|
374
|
+
key: string;
|
|
375
|
+
value: string;
|
|
376
|
+
}
|
|
377
|
+
|
|
358
378
|
/**
|
|
359
379
|
* Canonical selection / caret. `start == end` is a caret;
|
|
360
380
|
* `start < end` is a range. Endpoints are normalised so `start ≤
|
|
@@ -525,16 +545,19 @@ export interface RunContent {
|
|
|
525
545
|
}
|
|
526
546
|
|
|
527
547
|
/**
|
|
528
|
-
* Description of a node about to be inserted.
|
|
529
|
-
*
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
548
|
+
* Description of a node about to be inserted. The per-kind variants
|
|
549
|
+
* carry what a CREATION names — geometry, the fill/stroke triple, the
|
|
550
|
+
* path tables, a transform — and everything else takes its default.
|
|
551
|
+
*
|
|
552
|
+
* They used to double as what `RemoveNode` captured for its inverse,
|
|
553
|
+
* which is how a delete → undo brought back a bare frame: opacity,
|
|
554
|
+
* effects, corners, a placed image, every field outside this short
|
|
555
|
+
* list re-defaulted (RFI C-75; the transform had been added for the
|
|
556
|
+
* same reason one field at a time). A removed node is now captured
|
|
557
|
+
* WHOLE, as [`NodeSpec::Captured`], and these variants describe new
|
|
558
|
+
* nodes only.
|
|
536
559
|
*/
|
|
537
|
-
export type NodeSpec = { kind: "textFrame"; self_id: string; bounds: [number, number, number, number]; fill_color?: string | null; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null; parent_story?: string | null } | { kind: "rectangle"; self_id: string; bounds: [number, number, number, number]; fill_color?: string | null; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null } | { kind: "oval"; self_id: string; bounds: [number, number, number, number]; fill_color?: string | null; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null } | { kind: "graphicLine"; self_id: string; bounds: [number, number, number, number]; anchors?: PathAnchorSpec[]; subpath_starts?: number[]; subpath_open?: boolean[]; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null } | { kind: "polygon"; self_id: string; bounds: [number, number, number, number]; anchors?: PathAnchorSpec[]; subpath_starts?: number[]; subpath_open?: boolean[]; fill_color?: string | null; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null } | { kind: "cloneTranslate"; self_id: string; source: NodeId; dx: number; dy: number; destination_spread_id?: string | null } | { kind: "table"; self_id: string; rows: number; cols: number; header_rows?: number; footer_rows?: number; column_widths?: number[]; row_heights?: number[] };
|
|
560
|
+
export type NodeSpec = { kind: "textFrame"; self_id: string; bounds: [number, number, number, number]; fill_color?: string | null; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null; parent_story?: string | null } | { kind: "rectangle"; self_id: string; bounds: [number, number, number, number]; fill_color?: string | null; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null } | { kind: "oval"; self_id: string; bounds: [number, number, number, number]; fill_color?: string | null; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null } | { kind: "graphicLine"; self_id: string; bounds: [number, number, number, number]; anchors?: PathAnchorSpec[]; subpath_starts?: number[]; subpath_open?: boolean[]; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null } | { kind: "polygon"; self_id: string; bounds: [number, number, number, number]; anchors?: PathAnchorSpec[]; subpath_starts?: number[]; subpath_open?: boolean[]; fill_color?: string | null; stroke_color?: string | null; stroke_weight?: number | null; item_transform?: [number, number, number, number, number, number] | null } | { kind: "cloneTranslate"; self_id: string; source: NodeId; dx: number; dy: number; destination_spread_id?: string | null } | { kind: "captured"; node: NodeId; json: string; image_bytes?: number[] | null } | { kind: "table"; self_id: string; rows: number; cols: number; header_rows?: number; footer_rows?: number; column_widths?: number[]; row_heights?: number[] };
|
|
538
561
|
|
|
539
562
|
/**
|
|
540
563
|
* Direction for [`caret_nav`].
|
|
@@ -544,7 +567,7 @@ export type CaretDirection = "up" | "down";
|
|
|
544
567
|
/**
|
|
545
568
|
* Discriminated payload of a `WorkerToMain` message.
|
|
546
569
|
*/
|
|
547
|
-
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; minted?: MintedElement[]; 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[]; links?: ExportedLinkWire[] } } | { 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 };
|
|
570
|
+
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; minted?: MintedElement[]; 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; pageIds?: PageId[]; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { kind: "fontRegistryCleared"; payload: { pageIds?: PageId[]; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { 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: "textOutlines"; payload: { result: TextOutlinesResult | 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; pageIds?: PageId[] } } | { 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[]; links?: ExportedLinkWire[] } } | { kind: "exportIdmlFailed"; payload: { error: string } } | { kind: "pagedPartWritten"; payload: {} } | { kind: "pagedPartRead"; payload: { found: boolean; bytes: number[] } } | { kind: "pagedPartList"; payload: { paths: string[] } } | { kind: "pagedPartDeleted"; payload: { existed: boolean } } | { kind: "pagedExported"; payload: { bytes: number[] } } | { kind: "pagedPartFailed"; payload: { error: string } } | { kind: "elementProperties"; payload: { result: ElementProperties | null } } | { kind: "styleProperties"; payload: { result: StyleProperties | 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 };
|
|
548
571
|
|
|
549
572
|
/**
|
|
550
573
|
* Editor-ops — wire mirror of `paged_model::GradientFeatherParams`.
|
|
@@ -586,7 +609,7 @@ export interface GradientFeatherStopSpec {
|
|
|
586
609
|
* text-side caret + range live in `ContentSelection`); the
|
|
587
610
|
* variant exists so the apply layer can be reached via the
|
|
588
611
|
* existing `Mutation::SetElementProperty` wire shape — see
|
|
589
|
-
*
|
|
612
|
+
* the editor\'s client-SDK implementation plan §3c.1 (not published).
|
|
590
613
|
*/
|
|
591
614
|
export type ElementId = { kind: "textFrame"; id: string } | { kind: "rectangle"; id: string } | { kind: "oval"; id: string } | { kind: "polygon"; id: string } | { kind: "graphicLine"; id: string } | { kind: "group"; id: string } | { kind: "storyRange"; id: { story_id: string; start: number; end: number } } | { kind: "table"; id: { story_id: string; table_id: string } } | { kind: "tableCell"; id: { story_id: string; table_id: string; row: number; col: number } };
|
|
592
615
|
|
|
@@ -681,6 +704,18 @@ export interface SceneTreeNode {
|
|
|
681
704
|
*/
|
|
682
705
|
label: string;
|
|
683
706
|
children?: SceneTreeNode[];
|
|
707
|
+
/**
|
|
708
|
+
* C-65 — the item\'s plugin metadata (its reserved-namespace
|
|
709
|
+
* `x-paged:` Label entries, the same rows `RequestElementProperties`
|
|
710
|
+
* reports as `pluginMetadata`), so one tree read answers what used to
|
|
711
|
+
* take one property read PER LEAF: paged.draw\'s link discovery cost
|
|
712
|
+
* 1 403 round trips on a 1 403-leaf document. PRESENT on every page
|
|
713
|
+
* ITEM row — empty when the item carries none — and omitted only for
|
|
714
|
+
* spread / page rows, so a reader can tell \"this engine reports
|
|
715
|
+
* metadata here and there is none\" from \"this engine predates the
|
|
716
|
+
* field\" (an older engine omits it everywhere). Additive.
|
|
717
|
+
*/
|
|
718
|
+
pluginMetadata?: PluginMetadataEntry[];
|
|
684
719
|
}
|
|
685
720
|
|
|
686
721
|
/**
|
|
@@ -839,6 +874,12 @@ export type SceneItem = { kind: "fillPath"; path: ScenePathSeg[]; paint: ScenePa
|
|
|
839
874
|
* each) or re-discover the ids with a scene walk. This is the list it
|
|
840
875
|
* could not get.
|
|
841
876
|
*
|
|
877
|
+
* A `DuplicateElements` fills it too (C-64): it is the one single
|
|
878
|
+
* mutation that mints more than one element — a clone per source, in
|
|
879
|
+
* the order the sources were named — so `created_id` (its LAST clone)
|
|
880
|
+
* could not carry the answer. A group\'s clone is one entry, its group
|
|
881
|
+
* id; a text frame\'s clone carries the story copied for it.
|
|
882
|
+
*
|
|
842
883
|
* `handle` is the name a C-15 `BindCreated` child gave the element
|
|
843
884
|
* (`None` when nothing named it); `story_id` is the story the creating
|
|
844
885
|
* child minted alongside it — a text frame\'s `ParentStory` — which is
|
|
@@ -876,6 +917,23 @@ export interface FieldChange {
|
|
|
876
917
|
newText: string;
|
|
877
918
|
}
|
|
878
919
|
|
|
920
|
+
/**
|
|
921
|
+
* One fill colour\'s glyph outlines (see [`TextOutlinesResult`]).
|
|
922
|
+
*/
|
|
923
|
+
export interface TextOutlineRun {
|
|
924
|
+
/**
|
|
925
|
+
* sRGB, 0..1 — the colour the renderer filled with.
|
|
926
|
+
*/
|
|
927
|
+
rgb: [number, number, number];
|
|
928
|
+
/**
|
|
929
|
+
* The CMYK the paint carried, 0..1, when it was a process colour.
|
|
930
|
+
*/
|
|
931
|
+
cmyk?: [number, number, number, number] | null;
|
|
932
|
+
anchors: PathAnchorTriple[];
|
|
933
|
+
subpathStarts: number[];
|
|
934
|
+
glyphs: number;
|
|
935
|
+
}
|
|
936
|
+
|
|
879
937
|
/**
|
|
880
938
|
* One stop of a gradient on the wire. Mirrors `GradientStopRef`.
|
|
881
939
|
*/
|
|
@@ -992,6 +1050,14 @@ export interface ElementGeometryItem {
|
|
|
992
1050
|
* of `Translate`.
|
|
993
1051
|
*/
|
|
994
1052
|
hasImage?: boolean;
|
|
1053
|
+
/**
|
|
1054
|
+
* The story a TEXT FRAME shows (its `ParentStory`); `None` for every
|
|
1055
|
+
* other kind. `hitTest` answers `storyId: null` for an EMPTY frame
|
|
1056
|
+
* (the text hit path needs a laid-out line), so a frame\'s story was
|
|
1057
|
+
* discoverable only by diffing the stories collection around its
|
|
1058
|
+
* insert. Additive: absent from the JSON when `None`.
|
|
1059
|
+
*/
|
|
1060
|
+
storyId?: string;
|
|
995
1061
|
}
|
|
996
1062
|
|
|
997
1063
|
/**
|
|
@@ -1075,6 +1141,15 @@ export type ResizeHandle = "north" | "south" | "east" | "west" | "northEast" | "
|
|
|
1075
1141
|
export interface GestureAnchor {
|
|
1076
1142
|
pageId: PageId;
|
|
1077
1143
|
pointInPage: [number, number];
|
|
1144
|
+
/**
|
|
1145
|
+
* C-67 — the point Rotate / Scale / Shear turn about, page-local on
|
|
1146
|
+
* the same page as `point_in_page`. Absent (every caller before it
|
|
1147
|
+
* existed) keeps the union centroid of the targets — Illustrator\'s
|
|
1148
|
+
* default reference point; a click-to-set pivot, a reference-point
|
|
1149
|
+
* grid or \"about a corner\" pass it. Additive (`serde(default)`), so
|
|
1150
|
+
* it needs no protocol bump.
|
|
1151
|
+
*/
|
|
1152
|
+
pivotInPage?: [number, number];
|
|
1078
1153
|
}
|
|
1079
1154
|
|
|
1080
1155
|
/**
|
|
@@ -1204,6 +1279,12 @@ export interface StorySummary {
|
|
|
1204
1279
|
* older client that ignores it still reads the `overset` flag.
|
|
1205
1280
|
*/
|
|
1206
1281
|
oversetAt?: OversetAt;
|
|
1282
|
+
/**
|
|
1283
|
+
* v65 (thoughts ADR 026) — the story\'s grow rule, in the shape
|
|
1284
|
+
* `Mutation::SetFlowGrowRule` takes (`grow` is always `true` here:
|
|
1285
|
+
* a cleared rule reads as `None`). `None` = a fixed chain.
|
|
1286
|
+
*/
|
|
1287
|
+
growRule?: StoryGrowRule | null;
|
|
1207
1288
|
}
|
|
1208
1289
|
|
|
1209
1290
|
/**
|
|
@@ -1833,7 +1914,7 @@ export interface DocumentStats {
|
|
|
1833
1914
|
* document\'s `BTreeMap` palettes/stylesheets rather than the scene
|
|
1834
1915
|
* tree, so they\'re top-level variants rather than `InsertNode`.
|
|
1835
1916
|
*/
|
|
1836
|
-
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; restore_target?: [string, string | null, string | null] | 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: "SetFlowGrowRule"; story_id: string; rule: FlowGrowRule | null } | { 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 };
|
|
1917
|
+
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: "RemoveStory"; story_id: string } | { kind: "RestoreStory"; position: number; story_json: string } | { 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: "DuplicateNodes"; sources: NodeId[]; dx: number; dy: number; ids?: string[]; story_ids?: string[] } | { kind: "RemoveDuplicates"; sources: NodeId[]; dx: number; dy: number; ids?: string[]; story_ids?: string[] } | { 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; restore_target?: [string, string | null, string | null] | null } | { kind: "ApplyStyle"; story_id: string; start: number; end: number; style: string; scope: StyleScope; cell?: CellAddr | null; paragraph?: number | 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; paragraph?: number | null } | { 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: "SetFlowGrowRule"; story_id: string; rule: FlowGrowRule | null } | { 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 };
|
|
1837
1918
|
|
|
1838
1919
|
/**
|
|
1839
1920
|
* The discriminated payload of a `MainToWorker` message. Tagged so
|
|
@@ -1842,7 +1923,7 @@ export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath;
|
|
|
1842
1923
|
* variants so e.g. `cmyk_icc_profile` becomes `cmykIccProfile` on
|
|
1843
1924
|
* the wire — the TS protocol mirror locks the camelCase contract.
|
|
1844
1925
|
*/
|
|
1845
|
-
export type MainToWorkerKind = { kind: "hello" } | { kind: "loadDocument"; payload: { bytes: number[]; font?: number[] | null; cmykIccProfile?: number[] | null } } | { kind: "newBlankDocument"; payload: { widthPt: number; heightPt: number; font?: number[] | null } } | { kind: "registerFont"; payload: { family: string; style?: string | null; bytes: number[] } } | { kind: "clearFontRegistry" } | { kind: "registerColorProfile"; payload: { name: string; bytes: number[] } } | { kind: "mutate"; payload: Mutation } | { kind: "requestPage"; payload: { pageId: PageId; lod: LodTier } } | { kind: "hitTest"; payload: { pageId: PageId; docPoint: [number, number]; filter: HitFilter } } | { kind: "requestSnapshot"; payload: { pageId: PageId; targetWidthPx: number; dpi?: number | null } } | { kind: "setSelection"; payload: { selection: ContentSelection | null } } | { kind: "requestSelectionGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretNav"; payload: { storyId: string; offset: number; direction: CaretDirection; cell?: TextCellAddr | null } } | { kind: "requestLineBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestWordBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestParagraphBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "undo" } | { kind: "redo" } | { kind: "setElementSelection"; payload: { ids: ElementId[]; mode: SelectionMode } } | { kind: "requestMarqueeHits"; payload: { pageId: PageId; rect: [number, number, number, number] } } | { kind: "requestElementGeometry"; payload: { ids: ElementId[] } } | { kind: "requestGroupLeaves"; payload: { groupId: string } } | { kind: "requestPathAnchors"; payload: { id: ElementId } } | { kind: "requestNearestPathPoint"; payload: { id: ElementId; point: [number, number] } } | { kind: "requestPlanarRegions"; payload: { elementIds: ElementId[]; point?: [number, number] | null } } | { kind: "requestLayers" } | { kind: "requestCollection"; payload: { name: CollectionName } } | { kind: "requestFrameChain"; payload: { storyId: string } } | { kind: "requestStoryContent"; payload: { storyId: string } } | { kind: "requestPlacedAssetBytes"; payload: { elementId: string } } | { kind: "requestFontFaceBytes"; payload: { family: string; style?: string | null } } | { kind: "requestMeasureText"; payload: { family: string; style?: string | null; text: string; sizePt: number } } | { kind: "submitSceneLayer"; payload: { elementId: string; layer: SceneLayer; caller?: string } } | { kind: "clearSceneLayer"; payload: { elementId: string } } | { kind: "submitPixelLayer"; payload: { elementId: string; layer: PixelLayer } } | { kind: "clearPixelLayer"; payload: { elementId: string } } | { kind: "claimImageResource"; payload: { imageId: string; levels: number; tileSize: number; baseWidth: number; baseHeight: number; revision: number } } | { kind: "releaseImageResource"; payload: { imageId: string } } | { kind: "submitResourceTiles"; payload: { imageId: string; level: number; tiles: ProviderTileWire[]; generation: number } } | { kind: "requestDocumentMeta" } | { kind: "requestDocumentPlaceholders" } | { kind: "requestColorPreview"; payload: { swatchId: string } } | { kind: "requestColorCompute"; payload: { space: string; value: number[]; tint?: number | null; model?: string | null; alternateSpace?: string | null; alternateValue?: number[] | null } } | { kind: "requestGradientDetail"; payload: { gradientId: string } } | { kind: "exportSwatchLibrary"; payload: { groupId?: string | null } } | { kind: "executeScript"; payload: { source: string; budget?: ScriptBudgetWire | null } } | { kind: "exportPdfBegin"; payload: { options: ExportPdfWireOptions } } | { kind: "exportPdfPage"; payload: { session: number } } | { kind: "exportPdfFinish"; payload: { session: number } } | { kind: "exportPdfCancel"; payload: { session: number } } | { kind: "exportIdml"; payload: { linkBase?: string | null } } | { kind: "writePagedPart"; payload: { path: string; bytes: number[]; caller?: string } } | { kind: "readPagedPart"; payload: { path: string } } | { kind: "listPagedParts"; payload: { prefix: string } } | { kind: "exportPaged"; payload: {} } | { kind: "requestElementProperties"; payload: { id: ElementId } } | { kind: "requestSceneTree" } | { kind: "beginGesture"; payload: { nodes: ElementId[]; gesture: GestureType; anchor?: GestureAnchor | null; cameraScale?: number | null } } | { kind: "updateGesture"; payload: { handle: GestureHandle; delta: [number, number]; modifiers: GestureModifiers } } | { kind: "commitGesture"; payload: { handle: GestureHandle } } | { kind: "cancelGesture"; payload: { handle: GestureHandle } };
|
|
1926
|
+
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: "requestTextOutlines"; 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: "requestStyleProperties"; payload: { collection: StyleCollection; styleId: string } } | { kind: "requestPlacedAssetBytes"; payload: { elementId: string } } | { kind: "requestFontFaceBytes"; payload: { family: string; style?: string | null } } | { kind: "requestMeasureText"; payload: { family: string; style?: string | null; text: string; sizePt: number } } | { kind: "submitSceneLayer"; payload: { elementId: string; layer: SceneLayer; caller?: string } } | { kind: "clearSceneLayer"; payload: { elementId: string } } | { kind: "submitPixelLayer"; payload: { elementId: string; layer: PixelLayer } } | { kind: "clearPixelLayer"; payload: { elementId: string } } | { kind: "claimImageResource"; payload: { imageId: string; levels: number; tileSize: number; baseWidth: number; baseHeight: number; revision: number } } | { kind: "releaseImageResource"; payload: { imageId: string } } | { kind: "submitResourceTiles"; payload: { imageId: string; level: number; tiles: ProviderTileWire[]; generation: number } } | { kind: "requestDocumentMeta" } | { kind: "requestDocumentPlaceholders" } | { kind: "requestColorPreview"; payload: { swatchId: string } } | { kind: "requestColorCompute"; payload: { space: string; value: number[]; tint?: number | null; model?: string | null; alternateSpace?: string | null; alternateValue?: number[] | null } } | { kind: "requestGradientDetail"; payload: { gradientId: string } } | { kind: "exportSwatchLibrary"; payload: { groupId?: string | null } } | { kind: "executeScript"; payload: { source: string; budget?: ScriptBudgetWire | null } } | { kind: "exportPdfBegin"; payload: { options: ExportPdfWireOptions } } | { kind: "exportPdfPage"; payload: { session: number } } | { kind: "exportPdfFinish"; payload: { session: number } } | { kind: "exportPdfCancel"; payload: { session: number } } | { kind: "exportIdml"; payload: { linkBase?: string | null } } | { kind: "writePagedPart"; payload: { path: string; bytes: number[]; caller?: string } } | { kind: "readPagedPart"; payload: { path: string } } | { kind: "listPagedParts"; payload: { prefix: string } } | { kind: "deletePagedPart"; payload: { path: string; caller?: 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 } };
|
|
1846
1927
|
|
|
1847
1928
|
/**
|
|
1848
1929
|
* Track J — wire-shape mirror of `paged_model::PathAnchor`. The
|
|
@@ -1962,7 +2043,7 @@ export type Value = { type: "bounds"; value: [number, number, number, number] }
|
|
|
1962
2043
|
* (`\"fill.color\"`) — so JS callers don\'t need to learn the Rust
|
|
1963
2044
|
* enum shape.
|
|
1964
2045
|
*/
|
|
1965
|
-
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" | "itemLayer" | "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" | "paragraphHyphenationZone" | "paragraphKeepLinesTogether" | "paragraphKeepWithNext" | "paragraphKeepAllLinesTogether" | "paragraphKeepFirstLines" | "paragraphKeepLastLines" | "paragraphStartParagraph" | "paragraphSpanColumnType" | "paragraphSpanSplitColumnCount" | "paragraphSpanColumnMinSpaceBefore" | "paragraphSpanColumnMinSpaceAfter" | "paragraphSplitColumnInsideGutter" | "paragraphSplitColumnOutsideGutter" | "paragraphRuleAbove" | "paragraphRuleBelow" | "paragraphTabStops" | "paragraphListType" | "paragraphBulletCharacter" | "paragraphNumberingFormat" | "paragraphBulletsTextAfter" | "paragraphNumberingExpression" | "paragraphNumberingStartAt" | "paragraphNumberingContinue" | "paragraphBulletsCharacterStyle" | "paragraphNumberingCharacterStyle" | "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";
|
|
2046
|
+
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" | "itemLayer" | "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" | "paragraphHyphenationZone" | "paragraphKeepLinesTogether" | "paragraphKeepWithNext" | "paragraphKeepAllLinesTogether" | "paragraphKeepFirstLines" | "paragraphKeepLastLines" | "paragraphStartParagraph" | "paragraphSpanColumnType" | "paragraphSpanSplitColumnCount" | "paragraphSpanColumnMinSpaceBefore" | "paragraphSpanColumnMinSpaceAfter" | "paragraphSplitColumnInsideGutter" | "paragraphSplitColumnOutsideGutter" | "paragraphRuleAbove" | "paragraphRuleBelow" | "paragraphTabStops" | "paragraphListType" | "paragraphBulletCharacter" | "paragraphNumberingFormat" | "paragraphBulletsTextAfter" | "paragraphNumberingExpression" | "paragraphNumberingStartAt" | "paragraphNumberingContinue" | "paragraphBulletsCharacterStyle" | "paragraphNumberingCharacterStyle" | "paragraphComposer" | "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";
|
|
1966
2047
|
|
|
1967
2048
|
/**
|
|
1968
2049
|
* Typed worker-side error for non-load operations. Mutations,
|
|
@@ -2511,6 +2592,39 @@ export interface ProviderTileWire {
|
|
|
2511
2592
|
*/
|
|
2512
2593
|
export type ZOrderTarget = "front" | "back" | "forward" | "backward" | { index: number };
|
|
2513
2594
|
|
|
2595
|
+
/**
|
|
2596
|
+
* v65 — a story\'s grow rule on the read side ([`StorySummary::grow_rule`]).
|
|
2597
|
+
* Mirrors the `setFlowGrowRule` payload so a host can show the rule and
|
|
2598
|
+
* send it back unchanged.
|
|
2599
|
+
*/
|
|
2600
|
+
export interface StoryGrowRule {
|
|
2601
|
+
grow: boolean;
|
|
2602
|
+
/**
|
|
2603
|
+
* Upper bound on generated pages; `None` = the renderer\'s default.
|
|
2604
|
+
*/
|
|
2605
|
+
maxPages?: number | null;
|
|
2606
|
+
/**
|
|
2607
|
+
* Generated frames copy the chain\'s last frame\'s text-frame options.
|
|
2608
|
+
*/
|
|
2609
|
+
copyFrameOptions: boolean;
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
/**
|
|
2613
|
+
* v65 — one style definition\'s settable properties
|
|
2614
|
+
* (`RequestStyleProperties`). `entries` uses the inspector\'s row shape;
|
|
2615
|
+
* every value is `Some` (a style has one value per field, never \"mixed\").
|
|
2616
|
+
*/
|
|
2617
|
+
export interface StyleProperties {
|
|
2618
|
+
collection: StyleCollection;
|
|
2619
|
+
styleId: string;
|
|
2620
|
+
name?: string | null;
|
|
2621
|
+
/**
|
|
2622
|
+
* The style\'s `BasedOn` reference, verbatim.
|
|
2623
|
+
*/
|
|
2624
|
+
basedOn?: string | null;
|
|
2625
|
+
entries: PropertyEntry[];
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2514
2628
|
/**
|
|
2515
2629
|
* §21 advanced prepress — one ink plate\'s coverage on one page.
|
|
2516
2630
|
*
|
|
@@ -2698,6 +2812,24 @@ export interface FrameBounds {
|
|
|
2698
2812
|
bottom: number;
|
|
2699
2813
|
}
|
|
2700
2814
|
|
|
2815
|
+
export interface NearestPathPointResult {
|
|
2816
|
+
/**
|
|
2817
|
+
* Flat index of the segment\'s START anchor.
|
|
2818
|
+
*/
|
|
2819
|
+
segStart: number;
|
|
2820
|
+
/**
|
|
2821
|
+
* Flat index of the segment\'s END anchor (wraps to the subpath
|
|
2822
|
+
* start on a closing segment).
|
|
2823
|
+
*/
|
|
2824
|
+
segEnd: number;
|
|
2825
|
+
/**
|
|
2826
|
+
* Curve parameter on that segment, 0..=1.
|
|
2827
|
+
*/
|
|
2828
|
+
t: number;
|
|
2829
|
+
point: [number, number];
|
|
2830
|
+
distance: number;
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2701
2833
|
export interface RunningHeader {
|
|
2702
2834
|
pageId: PageId;
|
|
2703
2835
|
pageNumber: number;
|
|
@@ -2809,6 +2941,13 @@ export class CanvasWorker {
|
|
|
2809
2941
|
* to the default face when one is registered.
|
|
2810
2942
|
*/
|
|
2811
2943
|
measureText(family: string, style: string | null | undefined, text: string, size_pt: number): any;
|
|
2944
|
+
/**
|
|
2945
|
+
* v66 — apply one wire `Mutation` (JSON; a `batch` too) whose
|
|
2946
|
+
* first `replaceImageBytes` with `bytes: []` takes `bytes` — the
|
|
2947
|
+
* commit lane for processed pixels without a `number[]`. Returns
|
|
2948
|
+
* the `Mutate` reply envelope as JSON.
|
|
2949
|
+
*/
|
|
2950
|
+
mutateWithBytesDirect(seq: number, mutation_json: string, bytes: Uint8Array): string;
|
|
2812
2951
|
constructor();
|
|
2813
2952
|
/**
|
|
2814
2953
|
* Number of pages in the loaded document, or 0 if no
|
|
@@ -2824,6 +2963,12 @@ export class CanvasWorker {
|
|
|
2824
2963
|
* serialised as a JS array.
|
|
2825
2964
|
*/
|
|
2826
2965
|
pageInfo(index: number): Array<any> | undefined;
|
|
2966
|
+
/**
|
|
2967
|
+
* v66 — a frame's placed image as `{ uri, width, height, encoded }`
|
|
2968
|
+
* with `encoded` a `Uint8Array`, or `undefined` when there is none
|
|
2969
|
+
* (the cases `placedAssetBytes` answers `found: false`).
|
|
2970
|
+
*/
|
|
2971
|
+
placedAssetBytesDirect(element_id: string): object | undefined;
|
|
2827
2972
|
/**
|
|
2828
2973
|
* Render the visible pages at the current camera into the
|
|
2829
2974
|
* bound surface. Camera operates in CSS pixels; the
|
|
@@ -2835,6 +2980,11 @@ export class CanvasWorker {
|
|
|
2835
2980
|
* CPU path in that case.
|
|
2836
2981
|
*/
|
|
2837
2982
|
presentFrame(scale: number, tx: number, ty: number, dpr: number): boolean;
|
|
2983
|
+
/**
|
|
2984
|
+
* v66 — a `.paged` part's bytes as a `Uint8Array`, or `undefined`
|
|
2985
|
+
* when the part is absent or no document is loaded.
|
|
2986
|
+
*/
|
|
2987
|
+
readPagedPartDirect(path: string): Uint8Array | undefined;
|
|
2838
2988
|
/**
|
|
2839
2989
|
* Sub-phase D — render `page_id` to a PNG via the Vello GPU
|
|
2840
2990
|
* path (off-surface). Returns `None` if GPU is not
|
|
@@ -2888,6 +3038,24 @@ export class CanvasWorker {
|
|
|
2888
3038
|
* when measuring memory behaviour.
|
|
2889
3039
|
*/
|
|
2890
3040
|
setSceneCacheBudget(max_entries: number): void;
|
|
3041
|
+
/**
|
|
3042
|
+
* v66 — binary sibling of `SubmitSceneLayer` for the one-image
|
|
3043
|
+
* case: the frame's scene layer becomes the RGBA8 image in `rgba`
|
|
3044
|
+
* (`width*height*4` bytes) drawn at `x, y, w, h` frame-content
|
|
3045
|
+
* points. Take a `Uint8Array` (transfer it to the worker first);
|
|
3046
|
+
* no `number[]`, no JSON parse. Returns the `sceneLayerApplied`
|
|
3047
|
+
* envelope as JSON, like `handleMessage`. Only the pages showing
|
|
3048
|
+
* the frame lose their cached scene.
|
|
3049
|
+
*/
|
|
3050
|
+
submitSceneImageDirect(seq: number, element_id: string, caller: string | null | undefined, rgba: Uint8Array, width: number, height: number, x: number, y: number, w: number, h: number): string;
|
|
3051
|
+
/**
|
|
3052
|
+
* v66 — patch rectangles of the image `submitSceneImageDirect`
|
|
3053
|
+
* set: `rects` is a `Uint32Array` of `x, y, w, h` (image pixels)
|
|
3054
|
+
* per tile, `rgba` the tiles' pixels back to back in that order.
|
|
3055
|
+
* Validated whole before any byte moves. Returns the
|
|
3056
|
+
* `sceneLayerApplied` envelope as JSON.
|
|
3057
|
+
*/
|
|
3058
|
+
submitSceneImageTilesDirect(seq: number, element_id: string, caller: string | null | undefined, rects: Uint32Array, rgba: Uint8Array): string;
|
|
2891
3059
|
/**
|
|
2892
3060
|
* Handle one main-thread message. Input is the JSON string
|
|
2893
3061
|
* the JS side produced via `JSON.stringify(msg)`. Output is
|
|
@@ -2910,6 +3078,11 @@ export class CanvasWorker {
|
|
|
2910
3078
|
* in `packages/shell/src/gestures/gesture-sab.ts`.
|
|
2911
3079
|
*/
|
|
2912
3080
|
updateGestureRaw(handle_lo: number, handle_hi: number, dx: number, dy: number, modifier_bits: number): string;
|
|
3081
|
+
/**
|
|
3082
|
+
* v66 — `WritePagedPart` with a `Uint8Array` body. Returns the
|
|
3083
|
+
* `pagedPartWritten` / `pagedPartFailed` envelope as JSON.
|
|
3084
|
+
*/
|
|
3085
|
+
writePagedPartDirect(seq: number, path: string, caller: string | null | undefined, bytes: Uint8Array): string;
|
|
2913
3086
|
/**
|
|
2914
3087
|
* Protocol version constant; the JS side compares against
|
|
2915
3088
|
* its bundled value before sending `LoadDocument`.
|
|
@@ -2940,11 +3113,14 @@ export interface InitOutput {
|
|
|
2940
3113
|
readonly canvasworker_initGpu: (a: number, b: any, c: number, d: number) => any;
|
|
2941
3114
|
readonly canvasworker_loadDocumentDirect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
2942
3115
|
readonly canvasworker_measureText: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
3116
|
+
readonly canvasworker_mutateWithBytesDirect: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
2943
3117
|
readonly canvasworker_new: () => number;
|
|
2944
3118
|
readonly canvasworker_pageCount: (a: number) => number;
|
|
2945
3119
|
readonly canvasworker_pageInfo: (a: number, b: number) => any;
|
|
3120
|
+
readonly canvasworker_placedAssetBytesDirect: (a: number, b: number, c: number) => any;
|
|
2946
3121
|
readonly canvasworker_presentFrame: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
2947
3122
|
readonly canvasworker_protocolVersion: (a: number) => number;
|
|
3123
|
+
readonly canvasworker_readPagedPartDirect: (a: number, b: number, c: number) => [number, number];
|
|
2948
3124
|
readonly canvasworker_renderPageVelloPng: (a: number, b: number, c: number, d: number) => any;
|
|
2949
3125
|
readonly canvasworker_renderTilePng: (a: number, b: number, c: number, d: number) => [number, number];
|
|
2950
3126
|
readonly canvasworker_resizeGpu: (a: number, b: number, c: number) => void;
|
|
@@ -2952,7 +3128,10 @@ export interface InitOutput {
|
|
|
2952
3128
|
readonly canvasworker_sceneCacheSize: (a: number) => number;
|
|
2953
3129
|
readonly canvasworker_selectionGeometryJson: (a: number, b: number, c: number) => [number, number];
|
|
2954
3130
|
readonly canvasworker_setSceneCacheBudget: (a: number, b: number) => void;
|
|
3131
|
+
readonly canvasworker_submitSceneImageDirect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => [number, number];
|
|
3132
|
+
readonly canvasworker_submitSceneImageTilesDirect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
2955
3133
|
readonly canvasworker_updateGestureRaw: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
3134
|
+
readonly canvasworker_writePagedPartDirect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
2956
3135
|
readonly gestureSabBytes: () => number;
|
|
2957
3136
|
readonly gestureSabLayout: () => any;
|
|
2958
3137
|
readonly on_start: () => 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.38-canary.3",
|
|
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",
|