@paged-media/introspect-wasm 0.49.0 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog.json +1336 -0
- package/package.json +3 -2
- package/paged_introspect_wasm.d.ts +152 -27
- package/paged_introspect_wasm.js +27 -0
- package/paged_introspect_wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paged-media/introspect-wasm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "paged_introspect_wasm.js",
|
|
6
6
|
"types": "paged_introspect_wasm.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"paged_introspect_wasm.js",
|
|
9
9
|
"paged_introspect_wasm_bg.wasm",
|
|
10
|
-
"paged_introspect_wasm.d.ts"
|
|
10
|
+
"paged_introspect_wasm.d.ts",
|
|
11
|
+
"catalog.json"
|
|
11
12
|
],
|
|
12
13
|
"license": "MPL-2.0 OR LicenseRef-PMEL"
|
|
13
14
|
}
|
|
@@ -23,6 +23,18 @@ export type SceneBlendMode = "multiply" | "screen" | "overlay" | "darken" | "lig
|
|
|
23
23
|
*/
|
|
24
24
|
export type SceneGradient = { type: "linear"; x0: number; y0: number; x1: number; y1: number; stops: SceneGradientStop[] } | { type: "radial"; cx: number; cy: number; radius: number; stops: SceneGradientStop[] } | { type: "sweep"; cx: number; cy: number; start_angle: number; stops: SceneGradientStop[] };
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* A plugin-submitted pixel layer: a set of independently-positioned RGBA8
|
|
28
|
+
* tiles to composite INSIDE a frame during an interactive gesture. All
|
|
29
|
+
* coordinates are frame-content points (the same space as
|
|
30
|
+
* [`SceneLayer`]); core applies the frame transform + content-box clip at
|
|
31
|
+
* compose time. Ephemeral — re-streamed per drag, never a document
|
|
32
|
+
* mutation.
|
|
33
|
+
*/
|
|
34
|
+
export interface PixelLayer {
|
|
35
|
+
tiles: PixelTile[];
|
|
36
|
+
}
|
|
37
|
+
|
|
26
38
|
/**
|
|
27
39
|
* A plugin-submitted vector layer in frame-content coordinates. Keyed
|
|
28
40
|
* (on the wire) by the host element id of the frame it renders into.
|
|
@@ -106,6 +118,67 @@ export interface GroupSpec {
|
|
|
106
118
|
itemTransform?: [number, number, number, number, number, number] | null;
|
|
107
119
|
}
|
|
108
120
|
|
|
121
|
+
/**
|
|
122
|
+
* B-22 — the region-level Pathfinder verbs, all resolved over one
|
|
123
|
+
* planar arrangement (Illustrator\'s Pathfinder row, as opposed to the
|
|
124
|
+
* Shape Modes row that [`PathfinderKind`] covers).
|
|
125
|
+
*
|
|
126
|
+
* Every verb reads the arrangement\'s faces and decides, per face,
|
|
127
|
+
* WHICH input owns it. Ownership defaults to the TOPMOST input
|
|
128
|
+
* covering the face — `min(signature)`, since `elements` arrives
|
|
129
|
+
* top-to-bottom — which is what makes the results carry the fill you
|
|
130
|
+
* see on screen at that spot.
|
|
131
|
+
*/
|
|
132
|
+
export type PathfinderRegionVerb = "divide" | "trim" | "merge" | "crop" | "outline" | "minusBack";
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* B-22 — whether `PathfinderFaces` keeps the named faces or removes
|
|
136
|
+
* them (Shape Builder\'s drag vs alt-drag).
|
|
137
|
+
*/
|
|
138
|
+
export type FaceSelectMode = "keep" | "remove";
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* C-28 — wire mirror of [`paged_model::OpacityMaskType`] (the same
|
|
142
|
+
* mirror convention [`PathAnchorSpec`] follows: `paged-model` carries
|
|
143
|
+
* no `tsify` dependency, so wire-visible enums are declared here and
|
|
144
|
+
* converted at the boundary).
|
|
145
|
+
*/
|
|
146
|
+
export type OpacityMaskMode = "luminosity" | "alpha";
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* C-29 — the `<TextPath>` knobs [`Operation::AttachTextToPath`]
|
|
150
|
+
* exposes. Grouped into one struct so the op, its inverse and the
|
|
151
|
+
* wire all name the same thing.
|
|
152
|
+
*
|
|
153
|
+
* Every field maps to an attribute the RENDERER ALREADY HONOURS
|
|
154
|
+
* (verified against `paged_renderer::pipeline::text_path`):
|
|
155
|
+
*
|
|
156
|
+
* * `path_type_alignment` → `PathTypeAlignment`: the glyph\'s
|
|
157
|
+
* vertical seat — `BaselinePathType` (default) / `CenterPathType`
|
|
158
|
+
* / `AscenderPathType` / `DescenderPathType`.
|
|
159
|
+
* * `flip_path_effect` → `FlipPathEffect`: `Flipped` reverses the
|
|
160
|
+
* path direction so the text reads the other way round.
|
|
161
|
+
* * `start_bracket` / `end_bracket` → `StartBracket` /
|
|
162
|
+
* `EndBracket`: the arc-length window the text flows within. The
|
|
163
|
+
* renderer clamps both to the tessellated path length, centres
|
|
164
|
+
* the run in the window when it fits, and drops glyphs past
|
|
165
|
+
* `EndBracket` while reporting `OversetTextDropped`.
|
|
166
|
+
*
|
|
167
|
+
* **Deliberately NOT exposed: `PathEffect`.** Only
|
|
168
|
+
* `RainbowPathEffect` actually renders; `SkewPathEffect`,
|
|
169
|
+
* `Path3DRibbonEffect`, `StairStepPathEffect` and
|
|
170
|
+
* `GravityPathEffect` parse but draw as Rainbow. A knob whose value
|
|
171
|
+
* is silently ignored is worse than no knob, so the op does not take
|
|
172
|
+
* one and the created `TextPath` leaves the attribute absent — which
|
|
173
|
+
* IS Rainbow, the IDML default.
|
|
174
|
+
*/
|
|
175
|
+
export interface TextPathSpec {
|
|
176
|
+
pathTypeAlignment?: string | null;
|
|
177
|
+
flipPathEffect?: string | null;
|
|
178
|
+
startBracket?: number | null;
|
|
179
|
+
endBracket?: number | null;
|
|
180
|
+
}
|
|
181
|
+
|
|
109
182
|
/**
|
|
110
183
|
* Description of a node about to be inserted. Carries the minimal
|
|
111
184
|
* Stage-1 supported field set plus `item_transform` — `RemoveNode` →
|
|
@@ -119,7 +192,7 @@ export interface GroupSpec {
|
|
|
119
192
|
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[] };
|
|
120
193
|
|
|
121
194
|
/**
|
|
122
|
-
* Editor-ops — wire mirror of `
|
|
195
|
+
* Editor-ops — wire mirror of `paged_model::GradientFeatherParams`.
|
|
123
196
|
* Whole-struct authoring (kind + axis + stop LIST change together;
|
|
124
197
|
* `Value` has no generic list form, so the drop-shadow per-field
|
|
125
198
|
* shape doesn\'t fit). The renderer already draws this effect; only
|
|
@@ -138,7 +211,7 @@ export interface GradientFeatherSpec {
|
|
|
138
211
|
}
|
|
139
212
|
|
|
140
213
|
/**
|
|
141
|
-
* Editor-ops — wire mirror of `
|
|
214
|
+
* Editor-ops — wire mirror of `paged_model::GradientFeatherStop`
|
|
142
215
|
* (the AST type predates `PartialEq`/`Tsify`; the mirror keeps the
|
|
143
216
|
* op wire-shaped, the `PathAnchorSpec` precedent).
|
|
144
217
|
*/
|
|
@@ -166,6 +239,23 @@ export interface InvalidationHint {
|
|
|
166
239
|
structural: boolean;
|
|
167
240
|
}
|
|
168
241
|
|
|
242
|
+
/**
|
|
243
|
+
* One RGBA8 tile of a [`PixelLayer`]. `rgba` is tightly packed
|
|
244
|
+
* (`width*height*4`, row-major); the tile is placed at the `(x, y)`
|
|
245
|
+
* frame-content point with display size `(w, h)` points. A malformed tile
|
|
246
|
+
* (length ≠ `width*height*4`, or a zero-area buffer/dest) lowers to
|
|
247
|
+
* nothing, never a panic — identical to the `SceneItem::Image` contract.
|
|
248
|
+
*/
|
|
249
|
+
export interface PixelTile {
|
|
250
|
+
rgba: number[];
|
|
251
|
+
width: number;
|
|
252
|
+
height: number;
|
|
253
|
+
x: number;
|
|
254
|
+
y: number;
|
|
255
|
+
w: number;
|
|
256
|
+
h: number;
|
|
257
|
+
}
|
|
258
|
+
|
|
169
259
|
/**
|
|
170
260
|
* One colour stop in a [`SceneGradient`]. `offset` is `0.0..=1.0` along
|
|
171
261
|
* the gradient axis; the colour is sRGB (linearised at lowering).
|
|
@@ -269,10 +359,10 @@ export type PageId = string;
|
|
|
269
359
|
* document\'s `BTreeMap` palettes/stylesheets rather than the scene
|
|
270
360
|
* tree, so they\'re top-level variants rather than `InsertNode`.
|
|
271
361
|
*/
|
|
272
|
-
export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath; value: Value } | { kind: "InsertNode"; parent: NodeId; position: number; node: NodeSpec; z_slot?: number | null } | { kind: "RemoveNode"; node: NodeId } | { kind: "MoveNode"; node: NodeId; new_parent: NodeId; position: number } | { kind: "Batch"; ops: Operation[] } | { kind: "InsertPage"; after_page_id?: string | null; master_id?: string | null; spread_self_id?: string | null; page_self_id?: string | null; restore_spread_json?: string | null } | { kind: "RemovePage"; page_id: string } | { kind: "MoveLayer"; layer_id: string; new_index: number } | { kind: "InsertLayer"; position: number; name: string; self_id?: string | null } | { kind: "RemoveLayer"; layer_id: string } | { kind: "CreateSwatch"; spec: SwatchSpec } | { kind: "EditSwatch"; swatch_id: string; spec: SwatchSpec } | { kind: "DeleteSwatch"; swatch_id: string } | { kind: "CreateParagraphStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameParagraphStyle"; style_id: string; name: string } | { kind: "DeleteParagraphStyle"; style_id: string } | { kind: "CreateCharacterStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCharacterStyle"; style_id: string; name: string } | { kind: "DeleteCharacterStyle"; style_id: string } | { kind: "CreateObjectStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameObjectStyle"; style_id: string; name: string } | { kind: "DeleteObjectStyle"; style_id: string } | { kind: "CreateCellStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCellStyle"; style_id: string; name: string } | { kind: "DeleteCellStyle"; style_id: string } | { kind: "CreateTableStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameTableStyle"; style_id: string; name: string } | { kind: "DeleteTableStyle"; style_id: string } | { kind: "CreateGroup"; spec: GroupSpec } | { kind: "DissolveGroup"; group_id: string; restore_slots?: number[] | null } | { kind: "SetGroupTransform"; group: string; transform?: [number, number, number, number, number, number] | null; prev?: [number, number, number, number, number, number] | null } | { kind: "CreateGradient"; spec: GradientSpec } | { kind: "EditGradient"; gradient_id: string; spec: GradientSpec } | { kind: "DeleteGradient"; gradient_id: string } | { kind: "CreateColorGroup"; spec: ColorGroupSpec } | { kind: "EditColorGroup"; group_id: string; spec: ColorGroupSpec } | { kind: "DeleteColorGroup"; group_id: string } | { kind: "CreateNumberingList"; spec: NumberingListSpec } | { kind: "EditNumberingList"; list_id: string; spec: NumberingListSpec } | { kind: "DeleteNumberingList"; list_id: string } | { kind: "SetStyleProperty"; collection: StyleCollection; style_id: string; path: PropertyPath; value: Value } | { kind: "PathfinderBoolean"; kept: NodeId; others: NodeId[]; opKind: PathfinderKind } | { kind: "LinkFrames"; from: string; to: string } | { kind: "UnlinkFrames"; frame: string; prev_next?: string | null } | { kind: "ApplyStyle"; story_id: string; start: number; end: number; style: string; scope: StyleScope } | { kind: "InsertField"; story_id: string; offset: number; field: FieldKind } | { kind: "DeleteField"; story_id: string; offset: number; field: FieldKind } | { kind: "SetFieldValue"; story_id: string; offset: number; value?: string | null } | { kind: "PlaceImage"; frame: NodeId; image_uri?: string | null; fit?: string | null } | { kind: "InsertGuide"; spread_id: string; orientation: GuideOrientationSpec; position: number; page_index?: number; guide_id?: string | null } | { kind: "MoveGuide"; guide_id: string; position: number } | { kind: "DeleteGuide"; guide_id: string } | { kind: "SetConditionVisible"; condition: string; visible: boolean } | { kind: "ActivateConditionSet"; set: string } | { kind: "RestoreConditionVisibility"; states: [string, boolean][] } | { kind: "ApplyMasterToPage"; page: string; master?: string | null } | { kind: "DuplicatePage"; page: string; clone_spread_json?: string | null } | { kind: "InsertSection"; at_page: string; prefix?: string | null; numbering_style?: string | null; start_at?: number | null; self_id?: string | null } | { kind: "EditSection"; section_id: string; prefix?: string | null | null; numbering_style?: string | null; start_at?: number | null | null } | { kind: "DeleteSection"; section_id: string } | { kind: "SetRowHeight"; story_id: string; table_id: string; row: number; height?: number | null } | { kind: "SetColumnWidth"; story_id: string; table_id: string; col: number; width?: number | null } | { kind: "InsertTableRow"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableRow"; story_id: string; table_id: string; at: number } | { kind: "InsertTableColumn"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableColumn"; story_id: string; table_id: string; at: number } | { kind: "InsertHeaderRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveHeaderRow"; story_id: string; table_id: string } | { kind: "InsertFooterRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveFooterRow"; story_id: string; table_id: string } | { kind: "SetCellSpan"; story_id: string; table_id: string; row: number; col: number; row_span: number; column_span: number };
|
|
362
|
+
export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath; value: Value } | { kind: "InsertNode"; parent: NodeId; position: number; node: NodeSpec; z_slot?: number | null } | { kind: "RemoveNode"; node: NodeId } | { kind: "MoveNode"; node: NodeId; new_parent: NodeId; position: number } | { kind: "ReorderNode"; node: NodeId; target: ZOrderTarget } | { kind: "Batch"; ops: Operation[] } | { kind: "InsertPage"; after_page_id?: string | null; master_id?: string | null; spread_self_id?: string | null; page_self_id?: string | null; restore_spread_json?: string | null } | { kind: "RemovePage"; page_id: string } | { kind: "MoveLayer"; layer_id: string; new_index: number } | { kind: "InsertLayer"; position: number; name: string; self_id?: string | null } | { kind: "RemoveLayer"; layer_id: string } | { kind: "CreateSwatch"; spec: SwatchSpec } | { kind: "EditSwatch"; swatch_id: string; spec: SwatchSpec } | { kind: "DeleteSwatch"; swatch_id: string } | { kind: "CreateParagraphStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameParagraphStyle"; style_id: string; name: string } | { kind: "DeleteParagraphStyle"; style_id: string } | { kind: "CreateCharacterStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCharacterStyle"; style_id: string; name: string } | { kind: "DeleteCharacterStyle"; style_id: string } | { kind: "CreateObjectStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameObjectStyle"; style_id: string; name: string } | { kind: "DeleteObjectStyle"; style_id: string } | { kind: "CreateCellStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCellStyle"; style_id: string; name: string } | { kind: "DeleteCellStyle"; style_id: string } | { kind: "CreateTableStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameTableStyle"; style_id: string; name: string } | { kind: "DeleteTableStyle"; style_id: string } | { kind: "CreateGroup"; spec: GroupSpec } | { kind: "DissolveGroup"; group_id: string; restore_slots?: number[] | null } | { kind: "SetGroupTransform"; group: string; transform?: [number, number, number, number, number, number] | null; prev?: [number, number, number, number, number, number] | null } | { kind: "CreateGradient"; spec: GradientSpec } | { kind: "EditGradient"; gradient_id: string; spec: GradientSpec } | { kind: "DeleteGradient"; gradient_id: string } | { kind: "CreateColorGroup"; spec: ColorGroupSpec } | { kind: "EditColorGroup"; group_id: string; spec: ColorGroupSpec } | { kind: "DeleteColorGroup"; group_id: string } | { kind: "CreateNumberingList"; spec: NumberingListSpec } | { kind: "EditNumberingList"; list_id: string; spec: NumberingListSpec } | { kind: "DeleteNumberingList"; list_id: string } | { kind: "SetStyleProperty"; collection: StyleCollection; style_id: string; path: PropertyPath; value: Value } | { kind: "PathfinderBoolean"; kept: NodeId; others: NodeId[]; opKind: PathfinderKind } | { kind: "PathfinderRegion"; elements: NodeId[]; verb: PathfinderRegionVerb } | { kind: "PathfinderFaces"; elements: NodeId[]; faces: string[]; mode: FaceSelectMode } | { kind: "JoinPaths"; kept: NodeId; other: NodeId } | { kind: "PasteInto"; container: NodeId; child: NodeId; child_index?: number | null } | { kind: "ReleaseFrom"; child: NodeId; restore_slot?: number | null } | { kind: "ApplyOpacityMask"; target: NodeId; mask: NodeId; mask_type?: OpacityMaskMode; invert?: boolean } | { kind: "ReleaseOpacityMask"; target: NodeId; restore_slot?: number | null } | { kind: "AttachTextToPath"; host: NodeId; story_id: string; spec?: TextPathSpec } | { kind: "DetachTextFromPath"; host: NodeId; index?: number | null; restore?: TextPathSpec | null } | { kind: "LinkFrames"; from: string; to: string } | { kind: "UnlinkFrames"; frame: string; prev_next?: string | null } | { kind: "ApplyStyle"; story_id: string; start: number; end: number; style: string; scope: StyleScope; cell?: CellAddr | null } | { kind: "InsertField"; story_id: string; offset: number; field: FieldKind } | { kind: "DeleteField"; story_id: string; offset: number; field: FieldKind } | { kind: "InsertAnchoredFrame"; story_id: string; offset: number; width: number; height: number; image_uri?: string | null; self_id: string } | { kind: "RemoveAnchoredFrame"; story_id: string; self_id: string } | { kind: "InsertHyperlink"; story_id: string; start: number; end: number; url: string; source_id: string; dest_id: string; hyperlink_id: string } | { kind: "RemoveHyperlink"; story_id: string; start: number; end: number; url: string; source_id: string; dest_id: string; hyperlink_id: string } | { kind: "SetFieldValue"; story_id: string; offset: number; value?: string | null } | { kind: "PlaceImage"; frame: NodeId; image_uri?: string | null; fit?: string | null } | { kind: "ReplaceImageBytes"; frame: NodeId; bytes?: number[] | null; prior_has_image_element?: boolean | null } | { kind: "InsertGuide"; spread_id: string; orientation: GuideOrientationSpec; position: number; page_index?: number; guide_id?: string | null } | { kind: "MoveGuide"; guide_id: string; position: number } | { kind: "DeleteGuide"; guide_id: string } | { kind: "SetConditionVisible"; condition: string; visible: boolean } | { kind: "ActivateConditionSet"; set: string } | { kind: "RestoreConditionVisibility"; states: [string, boolean][] } | { kind: "ApplyMasterToPage"; page: string; master?: string | null } | { kind: "DuplicatePage"; page: string; clone_spread_json?: string | null } | { kind: "InsertSection"; at_page: string; prefix?: string | null; numbering_style?: string | null; start_at?: number | null; self_id?: string | null } | { kind: "EditSection"; section_id: string; prefix?: string | null | null; numbering_style?: string | null; start_at?: number | null | null } | { kind: "DeleteSection"; section_id: string } | { kind: "SetRowHeight"; story_id: string; table_id: string; row: number; height?: number | null } | { kind: "SetColumnWidth"; story_id: string; table_id: string; col: number; width?: number | null } | { kind: "InsertTableRow"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableRow"; story_id: string; table_id: string; at: number } | { kind: "InsertTableColumn"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableColumn"; story_id: string; table_id: string; at: number } | { kind: "InsertHeaderRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveHeaderRow"; story_id: string; table_id: string } | { kind: "InsertFooterRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveFooterRow"; story_id: string; table_id: string } | { kind: "SetCellSpan"; story_id: string; table_id: string; row: number; col: number; row_span: number; column_span: number };
|
|
273
363
|
|
|
274
364
|
/**
|
|
275
|
-
* Track J — wire-shape mirror of `
|
|
365
|
+
* Track J — wire-shape mirror of `paged_model::PathAnchor`. The
|
|
276
366
|
* parse-side type doesn\'t carry `Deserialize`/`PartialEq`/`Tsify`,
|
|
277
367
|
* and the mutate API needs all three so this Op crosses the wasm
|
|
278
368
|
* boundary. The field shapes match exactly: `anchor` is the
|
|
@@ -290,7 +380,7 @@ export interface PathAnchorSpec {
|
|
|
290
380
|
* of a specific kind; the apply layer\'s `TypeMismatch` error fires if
|
|
291
381
|
* the variant doesn\'t match what the path expects.
|
|
292
382
|
*/
|
|
293
|
-
export type Value = { type: "bounds"; value: [number, number, number, number] } | { type: "colorRef"; value: string | null } | { type: "length"; value: number | null } | { type: "transform"; value: [number, number, number, number, number, number] | null } | { type: "pathPoint"; value: { address: PathPointAddress; position: [number, number] } } | { type: "pathPointInsert"; value: { index: number; anchor: PathAnchorSpec; prevSubpathStarts?: number[] | null } } | { type: "pathPointRemove"; value: { index: number; prevSubpathStarts?: number[] | null } } | { type: "pathPointCurveType"; value: { index: number; smooth: boolean; prev?: PathAnchorSpec | null } } | { type: "pluginMetadata"; value: { key: string; value: string | null; caller?: string | null; prev?: string | null | null } } | { type: "bool"; value: boolean } | { type: "text"; value: string } | { type: "framePath"; value: { anchors: PathAnchorSpec[]; subpathStarts: number[] } } | { type: "pathOpenAt"; value: { index: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "outlineStroke"; value: { width: number; cap: string; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "outlineStrokeVariable"; value: { widths: number[]; cap: string; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "offsetPath"; value: { delta: number; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "simplifyPath"; value: { tolerance: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "gradientFeather"; value: GradientFeatherSpec | null } | { type: "paragraphRule"; value: ParagraphRuleSpec | null } | { type: "tabStops"; value: TabStopSpec[] } | { type: "lengths"; value: number[] };
|
|
383
|
+
export type Value = { type: "bounds"; value: [number, number, number, number] } | { type: "colorRef"; value: string | null } | { type: "length"; value: number | null } | { type: "transform"; value: [number, number, number, number, number, number] | null } | { type: "pathPoint"; value: { address: PathPointAddress; position: [number, number] } } | { type: "pathPointInsert"; value: { index: number; anchor: PathAnchorSpec; prevSubpathStarts?: number[] | null } } | { type: "pathPointRemove"; value: { index: number; prevSubpathStarts?: number[] | null } } | { type: "pathPointCurveType"; value: { index: number; smooth: boolean; prev?: PathAnchorSpec | null } } | { type: "pluginMetadata"; value: { key: string; value: string | null; caller?: string | null; prev?: string | null | null } } | { type: "bool"; value: boolean } | { type: "text"; value: string } | { type: "framePath"; value: { anchors: PathAnchorSpec[]; subpathStarts: number[] } } | { type: "pathOpenAt"; value: { index: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "outlineStroke"; value: { width: number; cap: string; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "outlineStrokeVariable"; value: { widths: number[]; cap: string; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "offsetPath"; value: { delta: number; join: string; miterLimit: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "simplifyPath"; value: { tolerance: number; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "closePath"; value: { subpath?: number | null; prevAnchors?: PathAnchorSpec[] | null; prevSubpathStarts?: number[] | null; prevSubpathOpen?: boolean[] | null } } | { type: "gradientFeather"; value: GradientFeatherSpec | null } | { type: "paragraphRule"; value: ParagraphRuleSpec | null } | { type: "tabStops"; value: TabStopSpec[] } | { type: "lengths"; value: number[] };
|
|
294
384
|
|
|
295
385
|
/**
|
|
296
386
|
* Typed property path for `SetProperty` Ops. A closed enum (rather
|
|
@@ -300,23 +390,10 @@ export type Value = { type: "bounds"; value: [number, number, number, number] }
|
|
|
300
390
|
* (`\"fill.color\"`) — so JS callers don\'t need to learn the Rust
|
|
301
391
|
* enum shape.
|
|
302
392
|
*/
|
|
303
|
-
export type PropertyPath = "frameBounds" | "frameFillColor" | "frameStrokeColor" | "frameStrokeWeight" | "frameOpacity" | "frameTransform" | "imageContentTransform" | "framePathPoint" | "pathPointInsert" | "pathPointRemove" | "pathPointCurveType" | "layerVisible" | "layerLocked" | "layerPrintable" | "layerName" | "characterFontSize" | "characterLeading" | "characterTracking" | "characterFillColor" | "paragraphSpaceBefore" | "paragraphSpaceAfter" | "paragraphFirstLineIndent" | "appliedParagraphStyle" | "appliedCharacterStyle" | "appliedObjectStyle" | "appliedCellStyle" | "appliedTableStyle" | "framePath" | "frameNonprinting" | "frameFillTint" | "frameGradientFillAngle" | "frameGradientFillLength" | "frameGradientStrokeAngle" | "frameGradientStrokeLength" | "pathOpenAt" | "outlineStroke" | "outlineStrokeVariable" | "offsetPath" | "simplifyPath" | "frameGradientFeather" | "pageBounds" | "frameDropShadowMode" | "frameDropShadowXOffset" | "frameDropShadowYOffset" | "frameDropShadowSize" | "frameDropShadowOpacity" | "frameDropShadowColor" | "frameDropShadow" | "frameFittingCrops" | "frameFittingType" | "frameTextWrapMode" | "frameTextWrapOffsets" | "frameTextWrapContourType" | "frameTextWrapContourIncludeInside" | "paragraphJustification" | "paragraphStyleNextStyle" | "paragraphAppliedNumberingList" | "frameStrokeEndCap" | "frameInsetSpacing" | "appliedConditions" | "characterFontFamily" | "characterFontStyle" | "characterKerningMethod" | "characterCase" | "characterPosition" | "characterLanguage" | "characterBaselineShift" | "characterHorizontalScale" | "characterVerticalScale" | "characterSkew" | "characterUnderline" | "characterStrikethru" | "characterLigatures" | "characterOtfFeatures" | "paragraphLeftIndent" | "paragraphRightIndent" | "paragraphDropCapCharacters" | "paragraphDropCapLines" | "paragraphHyphenation" | "paragraphKeepLinesTogether" | "paragraphKeepWithNext" | "paragraphRuleAbove" | "paragraphRuleBelow" | "paragraphTabStops" | "paragraphListType" | "paragraphBulletCharacter" | "paragraphNumberingFormat" | "textFrameColumnCount" | "textFrameColumnGutter" | "textFrameColumnBalance" | "textFrameVerticalJustification" | "textFrameAutoSizing" | "textFrameFirstBaseline" | "textWrapInvert" | "frameFittingReferencePoint" | "frameAutoFit" | "frameStrokeType" | "frameStrokeJoin" | "frameStrokeMiterLimit" | "frameStrokeAlignment" | "frameStrokeGapColor" | "frameStrokeGapTint" | "frameStrokeDashArray" | "frameCornerOptionTopLeft" | "frameCornerOptionTopRight" | "frameCornerOptionBottomLeft" | "frameCornerOptionBottomRight" | "frameCornerRadiusTopLeft" | "frameCornerRadiusTopRight" | "frameCornerRadiusBottomLeft" | "frameCornerRadiusBottomRight" | "frameRotationAngle" | "frameScaleX" | "frameScaleY" | "frameFlipH" | "frameFlipV" | "frameOverprintFill" | "frameOverprintStroke" | "frameInnerShadowEnabled" | "frameInnerShadowBlendMode" | "frameInnerShadowColor" | "frameInnerShadowOpacity" | "frameInnerShadowAngle" | "frameInnerShadowDistance" | "frameInnerShadowSize" | "frameInnerShadowChoke" | "frameInnerShadowNoise" | "frameOuterGlowEnabled" | "frameOuterGlowBlendMode" | "frameOuterGlowColor" | "frameOuterGlowOpacity" | "frameOuterGlowSpread" | "frameOuterGlowSize" | "frameOuterGlowNoise" | "frameInnerGlowEnabled" | "frameInnerGlowBlendMode" | "frameInnerGlowColor" | "frameInnerGlowOpacity" | "frameInnerGlowChoke" | "frameInnerGlowSize" | "frameInnerGlowSource" | "frameInnerGlowNoise" | "frameBevelEnabled" | "frameBevelStyle" | "frameBevelTechnique" | "frameBevelDepth" | "frameBevelDirection" | "frameBevelSize" | "frameBevelSoften" | "frameBevelAngle" | "frameBevelAltitude" | "frameBevelHighlightColor" | "frameBevelShadowColor" | "frameBevelHighlightOpacity" | "frameBevelShadowOpacity" | "frameSatinEnabled" | "frameSatinBlendMode" | "frameSatinColor" | "frameSatinOpacity" | "frameSatinAngle" | "frameSatinDistance" | "frameSatinSize" | "frameSatinInvert" | "frameFeatherEnabled" | "frameFeatherWidth" | "frameFeatherCornerType" | "frameFeatherNoise" | "frameFeatherChoke" | "frameDirectionalFeatherEnabled" | "frameDirectionalFeatherLeftWidth" | "frameDirectionalFeatherRightWidth" | "frameDirectionalFeatherTopWidth" | "frameDirectionalFeatherBottomWidth" | "frameDirectionalFeatherAngle" | "frameDirectionalFeatherNoise" | "frameDirectionalFeatherChoke" | "frameBlendMode" | "nextTextFrame" | "previousTextFrame" | "cellFillColor" | "cellFillTint" | "cellInsetTop" | "cellInsetLeft" | "cellInsetBottom" | "cellInsetRight" | "cellVerticalJustification" | "cellTopEdgeStrokeColor" | "cellTopEdgeStrokeWeight" | "cellTopEdgeStrokeTint" | "cellBottomEdgeStrokeColor" | "cellBottomEdgeStrokeWeight" | "cellBottomEdgeStrokeTint" | "cellLeftEdgeStrokeColor" | "cellLeftEdgeStrokeWeight" | "cellLeftEdgeStrokeTint" | "cellRightEdgeStrokeColor" | "cellRightEdgeStrokeWeight" | "cellRightEdgeStrokeTint" | "tableRowCount" | "tableColumnCount" | "pluginMetadata" | "anchoredPosition" | "anchorPoint" | "anchoredXOffset" | "anchoredYOffset" | "anchoredHorizontalReference" | "anchoredVerticalReference" | "anchoredHorizontalAlignment" | "anchoredVerticalAlignment" | "anchoredSpineRelative" | "anchoredLockPosition" | "elementVisible" | "elementLocked" | "frameStrokeStartArrowhead" | "frameStrokeEndArrowhead";
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* W0.2 — wire mirror of `paged_parse::TabStop`. The `ParagraphTabStops`
|
|
307
|
-
* path replaces the paragraph\'s whole `<TabList>` in one op; `Value`
|
|
308
|
-
* has no per-element list-edit form, so the UI sends the full new
|
|
309
|
-
* stop list (the gradient-feather stop-list precedent).
|
|
310
|
-
*/
|
|
311
|
-
export interface TabStopSpec {
|
|
312
|
-
position: number;
|
|
313
|
-
alignment?: string | null;
|
|
314
|
-
alignmentCharacter?: string | null;
|
|
315
|
-
leader?: string | null;
|
|
316
|
-
}
|
|
393
|
+
export type PropertyPath = "frameBounds" | "frameFillColor" | "frameStrokeColor" | "frameStrokeWeight" | "frameOpacity" | "frameTransform" | "imageContentTransform" | "framePathPoint" | "pathPointInsert" | "pathPointRemove" | "pathPointCurveType" | "layerVisible" | "layerLocked" | "layerPrintable" | "layerName" | "characterFontSize" | "characterLeading" | "characterTracking" | "characterFillColor" | "paragraphSpaceBefore" | "paragraphSpaceAfter" | "paragraphFirstLineIndent" | "appliedParagraphStyle" | "appliedCharacterStyle" | "appliedObjectStyle" | "appliedCellStyle" | "appliedTableStyle" | "framePath" | "frameNonprinting" | "frameFillTint" | "frameGradientFillAngle" | "frameGradientFillLength" | "frameGradientStrokeAngle" | "frameGradientStrokeLength" | "pathOpenAt" | "outlineStroke" | "outlineStrokeVariable" | "offsetPath" | "simplifyPath" | "closePath" | "frameGradientFeather" | "pageBounds" | "frameDropShadowMode" | "frameDropShadowXOffset" | "frameDropShadowYOffset" | "frameDropShadowSize" | "frameDropShadowOpacity" | "frameDropShadowColor" | "frameDropShadow" | "frameFittingCrops" | "frameFittingType" | "frameTextWrapMode" | "frameTextWrapOffsets" | "frameTextWrapContourType" | "frameTextWrapContourIncludeInside" | "paragraphJustification" | "paragraphStyleNextStyle" | "paragraphAppliedNumberingList" | "frameStrokeEndCap" | "frameInsetSpacing" | "appliedConditions" | "characterFontFamily" | "characterFontStyle" | "characterKerningMethod" | "characterCase" | "characterPosition" | "characterLanguage" | "characterBaselineShift" | "characterHorizontalScale" | "characterVerticalScale" | "characterSkew" | "characterUnderline" | "characterStrikethru" | "characterLigatures" | "characterOtfFeatures" | "paragraphLeftIndent" | "paragraphRightIndent" | "paragraphDropCapCharacters" | "paragraphDropCapLines" | "paragraphHyphenation" | "paragraphKeepLinesTogether" | "paragraphKeepWithNext" | "paragraphRuleAbove" | "paragraphRuleBelow" | "paragraphTabStops" | "paragraphListType" | "paragraphBulletCharacter" | "paragraphNumberingFormat" | "textFrameColumnCount" | "textFrameColumnGutter" | "textFrameColumnBalance" | "textFrameVerticalJustification" | "textFrameAutoSizing" | "textFrameFirstBaseline" | "textWrapInvert" | "frameFittingReferencePoint" | "frameAutoFit" | "frameStrokeType" | "frameStrokeJoin" | "frameStrokeMiterLimit" | "frameStrokeAlignment" | "frameStrokeGapColor" | "frameStrokeGapTint" | "frameStrokeDashArray" | "frameCornerOptionTopLeft" | "frameCornerOptionTopRight" | "frameCornerOptionBottomLeft" | "frameCornerOptionBottomRight" | "frameCornerRadiusTopLeft" | "frameCornerRadiusTopRight" | "frameCornerRadiusBottomLeft" | "frameCornerRadiusBottomRight" | "frameRotationAngle" | "frameScaleX" | "frameScaleY" | "frameFlipH" | "frameFlipV" | "frameOverprintFill" | "frameOverprintStroke" | "frameInnerShadowEnabled" | "frameInnerShadowBlendMode" | "frameInnerShadowColor" | "frameInnerShadowOpacity" | "frameInnerShadowAngle" | "frameInnerShadowDistance" | "frameInnerShadowSize" | "frameInnerShadowChoke" | "frameInnerShadowNoise" | "frameOuterGlowEnabled" | "frameOuterGlowBlendMode" | "frameOuterGlowColor" | "frameOuterGlowOpacity" | "frameOuterGlowSpread" | "frameOuterGlowSize" | "frameOuterGlowNoise" | "frameInnerGlowEnabled" | "frameInnerGlowBlendMode" | "frameInnerGlowColor" | "frameInnerGlowOpacity" | "frameInnerGlowChoke" | "frameInnerGlowSize" | "frameInnerGlowSource" | "frameInnerGlowNoise" | "frameBevelEnabled" | "frameBevelStyle" | "frameBevelTechnique" | "frameBevelDepth" | "frameBevelDirection" | "frameBevelSize" | "frameBevelSoften" | "frameBevelAngle" | "frameBevelAltitude" | "frameBevelHighlightColor" | "frameBevelShadowColor" | "frameBevelHighlightOpacity" | "frameBevelShadowOpacity" | "frameSatinEnabled" | "frameSatinBlendMode" | "frameSatinColor" | "frameSatinOpacity" | "frameSatinAngle" | "frameSatinDistance" | "frameSatinSize" | "frameSatinInvert" | "frameFeatherEnabled" | "frameFeatherWidth" | "frameFeatherCornerType" | "frameFeatherNoise" | "frameFeatherChoke" | "frameDirectionalFeatherEnabled" | "frameDirectionalFeatherLeftWidth" | "frameDirectionalFeatherRightWidth" | "frameDirectionalFeatherTopWidth" | "frameDirectionalFeatherBottomWidth" | "frameDirectionalFeatherAngle" | "frameDirectionalFeatherNoise" | "frameDirectionalFeatherChoke" | "frameBlendMode" | "nextTextFrame" | "previousTextFrame" | "cellFillColor" | "cellFillTint" | "cellInsetTop" | "cellInsetLeft" | "cellInsetBottom" | "cellInsetRight" | "cellVerticalJustification" | "cellTopEdgeStrokeColor" | "cellTopEdgeStrokeWeight" | "cellTopEdgeStrokeTint" | "cellBottomEdgeStrokeColor" | "cellBottomEdgeStrokeWeight" | "cellBottomEdgeStrokeTint" | "cellLeftEdgeStrokeColor" | "cellLeftEdgeStrokeWeight" | "cellLeftEdgeStrokeTint" | "cellRightEdgeStrokeColor" | "cellRightEdgeStrokeWeight" | "cellRightEdgeStrokeTint" | "tableRowCount" | "tableColumnCount" | "pluginMetadata" | "anchoredPosition" | "anchorPoint" | "anchoredXOffset" | "anchoredYOffset" | "anchoredHorizontalReference" | "anchoredVerticalReference" | "anchoredHorizontalAlignment" | "anchoredVerticalAlignment" | "anchoredSpineRelative" | "anchoredLockPosition" | "elementVisible" | "elementLocked" | "frameStrokeStartArrowhead" | "frameStrokeEndArrowhead";
|
|
317
394
|
|
|
318
395
|
/**
|
|
319
|
-
* W0.2 — wire mirror of `
|
|
396
|
+
* W0.2 — wire mirror of `paged_model::ParagraphRule` (the
|
|
320
397
|
* AST type predates `Tsify`; the mirror keeps the op wire-shaped,
|
|
321
398
|
* the `GradientFeatherSpec` precedent). Carries every field the
|
|
322
399
|
* parser models so the whole-struct `ParagraphRuleAbove` /
|
|
@@ -334,10 +411,17 @@ export interface ParagraphRuleSpec {
|
|
|
334
411
|
}
|
|
335
412
|
|
|
336
413
|
/**
|
|
337
|
-
* W0.
|
|
338
|
-
*
|
|
414
|
+
* W0.2 — wire mirror of `paged_model::TabStop`. The `ParagraphTabStops`
|
|
415
|
+
* path replaces the paragraph\'s whole `<TabList>` in one op; `Value`
|
|
416
|
+
* has no per-element list-edit form, so the UI sends the full new
|
|
417
|
+
* stop list (the gradient-feather stop-list precedent).
|
|
339
418
|
*/
|
|
340
|
-
export
|
|
419
|
+
export interface TabStopSpec {
|
|
420
|
+
position: number;
|
|
421
|
+
alignment?: string | null;
|
|
422
|
+
alignmentCharacter?: string | null;
|
|
423
|
+
leader?: string | null;
|
|
424
|
+
}
|
|
341
425
|
|
|
342
426
|
/**
|
|
343
427
|
* W0.5 — the kind of field marker inserted by
|
|
@@ -345,12 +429,12 @@ export type StyleScope = "paragraph" | "character";
|
|
|
345
429
|
* built-ins (single private-use marker chars the renderer
|
|
346
430
|
* substitutes); v43 (D-01) adds the plugin `Placeholder` — a tagged,
|
|
347
431
|
* edit-surviving anchor run whose text is the field\'s cached display
|
|
348
|
-
* value (see `
|
|
432
|
+
* value (see `paged_model::PlaceholderField`).
|
|
349
433
|
*/
|
|
350
434
|
export type FieldKind = "pageNumber" | "nextPageNumber" | { placeholder: { plugin: string; key: string; value?: string | undefined } };
|
|
351
435
|
|
|
352
436
|
/**
|
|
353
|
-
* W0.5 — wire mirror of `
|
|
437
|
+
* W0.5 — wire mirror of `paged_model::GuideOrientation`
|
|
354
438
|
* (which is `Deserialize` but lives in the parse crate; kept here so
|
|
355
439
|
* the operation wire type doesn\'t depend on the parser\'s
|
|
356
440
|
* serialization shape).
|
|
@@ -369,7 +453,7 @@ export interface NestedParent {
|
|
|
369
453
|
|
|
370
454
|
/**
|
|
371
455
|
* W1.22 (engine gap 22) — wire description of a `<NumberingList>`
|
|
372
|
-
* resource, mirroring `
|
|
456
|
+
* resource, mirroring `paged_model::NumberingListDef`. The
|
|
373
457
|
* CRUD ops (`CreateNumberingList` / `EditNumberingList` /
|
|
374
458
|
* `DeleteNumberingList`) carry this. `self_id` is minted
|
|
375
459
|
* (`NumberingList/u<n>`) when absent on create; echoed resolved in
|
|
@@ -421,7 +505,7 @@ export interface GradientSpec {
|
|
|
421
505
|
|
|
422
506
|
/**
|
|
423
507
|
* Wire-format description of a colour swatch (`<Color>`), mirroring
|
|
424
|
-
* the editable fields of `
|
|
508
|
+
* the editable fields of `paged_model::ColorEntry` with primitive,
|
|
425
509
|
* `Deserialize`-able types (the AST `ColorEntry` is `Serialize`-only).
|
|
426
510
|
* Carried by the swatch-collection mutations so create / edit /
|
|
427
511
|
* delete-undo are lossless. `space` / `model` / `alternate_space` are
|
|
@@ -452,6 +536,37 @@ export interface SwatchSpec {
|
|
|
452
536
|
alpha?: number | null;
|
|
453
537
|
}
|
|
454
538
|
|
|
539
|
+
/**
|
|
540
|
+
* [`Operation::ApplyStyle`].
|
|
541
|
+
*/
|
|
542
|
+
export type StyleScope = "paragraph" | "character";
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* v59 — where [`Operation::ReorderNode`] puts its target inside the
|
|
546
|
+
* sibling list it already belongs to.
|
|
547
|
+
*
|
|
548
|
+
* **Both forms deliberately ship.** The four RELATIVE verbs are what a
|
|
549
|
+
* UI and a plugin can actually express: they are read-modify-write
|
|
550
|
+
* against whatever the list happens to be at apply time, so a
|
|
551
|
+
* concurrent insert or delete between \"the caller read the order\" and
|
|
552
|
+
* \"the engine applied the op\" cannot silently restack the wrong item —
|
|
553
|
+
* there is no stale index to be wrong. They map 1:1 onto the Arrange
|
|
554
|
+
* menu every DTP app ships (Illustrator\'s Object ▸ Arrange, InDesign\'s
|
|
555
|
+
* Object ▸ Arrange, PowerPoint\'s Bring Forward…).
|
|
556
|
+
*
|
|
557
|
+
* [`ZOrderTarget::Index`] is the absolute form, and it is what makes
|
|
558
|
+
* the inverse EXACT: the apply layer records the slot the node came
|
|
559
|
+
* from and hands back `Index(that slot)`. It is also the honest way to
|
|
560
|
+
* express \"restore this exact order\" for a drag in a layers panel.
|
|
561
|
+
* Because an absolute index CAN go stale, an out-of-range `Index` is
|
|
562
|
+
* rejected loudly (`OperationError::InvalidPosition`) instead of being
|
|
563
|
+
* clamped — a caller working from a stale model should hear about it.
|
|
564
|
+
*
|
|
565
|
+
* Serialised externally-tagged (the [`FieldKind`] convention):
|
|
566
|
+
* `\"front\"` / `\"back\"` / `\"forward\"` / `\"backward\"` / `{\"index\": 3}`.
|
|
567
|
+
*/
|
|
568
|
+
export type ZOrderTarget = "front" | "back" | "forward" | "backward" | { index: number };
|
|
569
|
+
|
|
455
570
|
|
|
456
571
|
export class Inspector {
|
|
457
572
|
free(): void;
|
|
@@ -492,6 +607,15 @@ export class Inspector {
|
|
|
492
607
|
undo(): string;
|
|
493
608
|
}
|
|
494
609
|
|
|
610
|
+
/**
|
|
611
|
+
* The engine capability catalog (host fns, id grammar, the settable
|
|
612
|
+
* property paths, constraints) as a JSON string — the published
|
|
613
|
+
* single-source contract every surface projects (ADR 019). Static: needs
|
|
614
|
+
* no open document. The headless `paged-run describe` emits the same
|
|
615
|
+
* `paged_introspect::api_catalog()`.
|
|
616
|
+
*/
|
|
617
|
+
export function describeCatalog(): string;
|
|
618
|
+
|
|
495
619
|
export function on_start(): void;
|
|
496
620
|
|
|
497
621
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -499,6 +623,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
499
623
|
export interface InitOutput {
|
|
500
624
|
readonly memory: WebAssembly.Memory;
|
|
501
625
|
readonly __wbg_inspector_free: (a: number, b: number) => void;
|
|
626
|
+
readonly describeCatalog: () => [number, number, number, number];
|
|
502
627
|
readonly inspector_apply: (a: number, b: number, c: number) => [number, number, number, number];
|
|
503
628
|
readonly inspector_new: (a: number, b: number) => [number, number, number];
|
|
504
629
|
readonly inspector_properties: (a: number, b: number, c: number) => [number, number, number, number];
|
package/paged_introspect_wasm.js
CHANGED
|
@@ -166,6 +166,33 @@ export class Inspector {
|
|
|
166
166
|
}
|
|
167
167
|
if (Symbol.dispose) Inspector.prototype[Symbol.dispose] = Inspector.prototype.free;
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* The engine capability catalog (host fns, id grammar, the settable
|
|
171
|
+
* property paths, constraints) as a JSON string — the published
|
|
172
|
+
* single-source contract every surface projects (ADR 019). Static: needs
|
|
173
|
+
* no open document. The headless `paged-run describe` emits the same
|
|
174
|
+
* `paged_introspect::api_catalog()`.
|
|
175
|
+
* @returns {string}
|
|
176
|
+
*/
|
|
177
|
+
export function describeCatalog() {
|
|
178
|
+
let deferred2_0;
|
|
179
|
+
let deferred2_1;
|
|
180
|
+
try {
|
|
181
|
+
const ret = wasm.describeCatalog();
|
|
182
|
+
var ptr1 = ret[0];
|
|
183
|
+
var len1 = ret[1];
|
|
184
|
+
if (ret[3]) {
|
|
185
|
+
ptr1 = 0; len1 = 0;
|
|
186
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
187
|
+
}
|
|
188
|
+
deferred2_0 = ptr1;
|
|
189
|
+
deferred2_1 = len1;
|
|
190
|
+
return getStringFromWasm0(ptr1, len1);
|
|
191
|
+
} finally {
|
|
192
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
169
196
|
export function on_start() {
|
|
170
197
|
wasm.on_start();
|
|
171
198
|
}
|
|
Binary file
|