@paged-media/introspect-wasm 0.51.0 → 0.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@paged-media/introspect-wasm",
3
- "version": "0.51.0",
3
+ "version": "0.61.1",
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
  }
@@ -118,6 +118,67 @@ export interface GroupSpec {
118
118
  itemTransform?: [number, number, number, number, number, number] | null;
119
119
  }
120
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
+
121
182
  /**
122
183
  * Description of a node about to be inserted. Carries the minimal
123
184
  * Stage-1 supported field set plus `item_transform` — `RemoveNode` →
@@ -131,7 +192,7 @@ export interface GroupSpec {
131
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[] };
132
193
 
133
194
  /**
134
- * Editor-ops — wire mirror of `paged_parse::GradientFeatherParams`.
195
+ * Editor-ops — wire mirror of `paged_model::GradientFeatherParams`.
135
196
  * Whole-struct authoring (kind + axis + stop LIST change together;
136
197
  * `Value` has no generic list form, so the drop-shadow per-field
137
198
  * shape doesn\'t fit). The renderer already draws this effect; only
@@ -150,7 +211,7 @@ export interface GradientFeatherSpec {
150
211
  }
151
212
 
152
213
  /**
153
- * Editor-ops — wire mirror of `paged_parse::GradientFeatherStop`
214
+ * Editor-ops — wire mirror of `paged_model::GradientFeatherStop`
154
215
  * (the AST type predates `PartialEq`/`Tsify`; the mirror keeps the
155
216
  * op wire-shaped, the `PathAnchorSpec` precedent).
156
217
  */
@@ -298,10 +359,10 @@ export type PageId = string;
298
359
  * document\'s `BTreeMap` palettes/stylesheets rather than the scene
299
360
  * tree, so they\'re top-level variants rather than `InsertNode`.
300
361
  */
301
- export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath; value: Value } | { kind: "InsertNode"; parent: NodeId; position: number; node: NodeSpec; z_slot?: number | null } | { kind: "RemoveNode"; node: NodeId } | { kind: "MoveNode"; node: NodeId; new_parent: NodeId; position: number } | { kind: "Batch"; ops: Operation[] } | { kind: "InsertPage"; after_page_id?: string | null; master_id?: string | null; spread_self_id?: string | null; page_self_id?: string | null; restore_spread_json?: string | null } | { kind: "RemovePage"; page_id: string } | { kind: "MoveLayer"; layer_id: string; new_index: number } | { kind: "InsertLayer"; position: number; name: string; self_id?: string | null } | { kind: "RemoveLayer"; layer_id: string } | { kind: "CreateSwatch"; spec: SwatchSpec } | { kind: "EditSwatch"; swatch_id: string; spec: SwatchSpec } | { kind: "DeleteSwatch"; swatch_id: string } | { kind: "CreateParagraphStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameParagraphStyle"; style_id: string; name: string } | { kind: "DeleteParagraphStyle"; style_id: string } | { kind: "CreateCharacterStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCharacterStyle"; style_id: string; name: string } | { kind: "DeleteCharacterStyle"; style_id: string } | { kind: "CreateObjectStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameObjectStyle"; style_id: string; name: string } | { kind: "DeleteObjectStyle"; style_id: string } | { kind: "CreateCellStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameCellStyle"; style_id: string; name: string } | { kind: "DeleteCellStyle"; style_id: string } | { kind: "CreateTableStyle"; self_id?: string | null; name?: string | null; based_on?: string | null; restore_json?: string | null } | { kind: "RenameTableStyle"; style_id: string; name: string } | { kind: "DeleteTableStyle"; style_id: string } | { kind: "CreateGroup"; spec: GroupSpec } | { kind: "DissolveGroup"; group_id: string; restore_slots?: number[] | null } | { kind: "SetGroupTransform"; group: string; transform?: [number, number, number, number, number, number] | null; prev?: [number, number, number, number, number, number] | null } | { kind: "CreateGradient"; spec: GradientSpec } | { kind: "EditGradient"; gradient_id: string; spec: GradientSpec } | { kind: "DeleteGradient"; gradient_id: string } | { kind: "CreateColorGroup"; spec: ColorGroupSpec } | { kind: "EditColorGroup"; group_id: string; spec: ColorGroupSpec } | { kind: "DeleteColorGroup"; group_id: string } | { kind: "CreateNumberingList"; spec: NumberingListSpec } | { kind: "EditNumberingList"; list_id: string; spec: NumberingListSpec } | { kind: "DeleteNumberingList"; list_id: string } | { kind: "SetStyleProperty"; collection: StyleCollection; style_id: string; path: PropertyPath; value: Value } | { kind: "PathfinderBoolean"; kept: NodeId; others: NodeId[]; opKind: PathfinderKind } | { kind: "LinkFrames"; from: string; to: string } | { kind: "UnlinkFrames"; frame: string; prev_next?: string | null } | { kind: "ApplyStyle"; story_id: string; start: number; end: number; style: string; scope: StyleScope } | { kind: "InsertField"; story_id: string; offset: number; field: FieldKind } | { kind: "DeleteField"; story_id: string; offset: number; field: FieldKind } | { kind: "SetFieldValue"; story_id: string; offset: number; value?: string | null } | { kind: "PlaceImage"; frame: NodeId; image_uri?: string | null; fit?: string | null } | { kind: "ReplaceImageBytes"; frame: NodeId; bytes?: number[] | null; prior_has_image_element?: boolean | null } | { kind: "InsertGuide"; spread_id: string; orientation: GuideOrientationSpec; position: number; page_index?: number; guide_id?: string | null } | { kind: "MoveGuide"; guide_id: string; position: number } | { kind: "DeleteGuide"; guide_id: string } | { kind: "SetConditionVisible"; condition: string; visible: boolean } | { kind: "ActivateConditionSet"; set: string } | { kind: "RestoreConditionVisibility"; states: [string, boolean][] } | { kind: "ApplyMasterToPage"; page: string; master?: string | null } | { kind: "DuplicatePage"; page: string; clone_spread_json?: string | null } | { kind: "InsertSection"; at_page: string; prefix?: string | null; numbering_style?: string | null; start_at?: number | null; self_id?: string | null } | { kind: "EditSection"; section_id: string; prefix?: string | null | null; numbering_style?: string | null; start_at?: number | null | null } | { kind: "DeleteSection"; section_id: string } | { kind: "SetRowHeight"; story_id: string; table_id: string; row: number; height?: number | null } | { kind: "SetColumnWidth"; story_id: string; table_id: string; col: number; width?: number | null } | { kind: "InsertTableRow"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableRow"; story_id: string; table_id: string; at: number } | { kind: "InsertTableColumn"; story_id: string; table_id: string; at: number; restore?: TableLineRestoreJson | null } | { kind: "DeleteTableColumn"; story_id: string; table_id: string; at: number } | { kind: "InsertHeaderRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveHeaderRow"; story_id: string; table_id: string } | { kind: "InsertFooterRow"; story_id: string; table_id: string; restore?: TableLineRestoreJson | null } | { kind: "RemoveFooterRow"; story_id: string; table_id: string } | { kind: "SetCellSpan"; story_id: string; table_id: string; row: number; col: number; row_span: number; column_span: number };
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 };
302
363
 
303
364
  /**
304
- * Track J — wire-shape mirror of `paged_parse::PathAnchor`. The
365
+ * Track J — wire-shape mirror of `paged_model::PathAnchor`. The
305
366
  * parse-side type doesn\'t carry `Deserialize`/`PartialEq`/`Tsify`,
306
367
  * and the mutate API needs all three so this Op crosses the wasm
307
368
  * boundary. The field shapes match exactly: `anchor` is the
@@ -319,7 +380,7 @@ export interface PathAnchorSpec {
319
380
  * of a specific kind; the apply layer\'s `TypeMismatch` error fires if
320
381
  * the variant doesn\'t match what the path expects.
321
382
  */
322
- 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[] };
323
384
 
324
385
  /**
325
386
  * Typed property path for `SetProperty` Ops. A closed enum (rather
@@ -329,23 +390,10 @@ export type Value = { type: "bounds"; value: [number, number, number, number] }
329
390
  * (`\"fill.color\"`) — so JS callers don\'t need to learn the Rust
330
391
  * enum shape.
331
392
  */
332
- 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";
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";
333
394
 
334
395
  /**
335
- * W0.2 — wire mirror of `paged_parse::TabStop`. The `ParagraphTabStops`
336
- * path replaces the paragraph\'s whole `<TabList>` in one op; `Value`
337
- * has no per-element list-edit form, so the UI sends the full new
338
- * stop list (the gradient-feather stop-list precedent).
339
- */
340
- export interface TabStopSpec {
341
- position: number;
342
- alignment?: string | null;
343
- alignmentCharacter?: string | null;
344
- leader?: string | null;
345
- }
346
-
347
- /**
348
- * W0.2 — wire mirror of `paged_parse::styles::ParagraphRule` (the
396
+ * W0.2 — wire mirror of `paged_model::ParagraphRule` (the
349
397
  * AST type predates `Tsify`; the mirror keeps the op wire-shaped,
350
398
  * the `GradientFeatherSpec` precedent). Carries every field the
351
399
  * parser models so the whole-struct `ParagraphRuleAbove` /
@@ -363,10 +411,17 @@ export interface ParagraphRuleSpec {
363
411
  }
364
412
 
365
413
  /**
366
- * W0.5 — character- vs paragraph-level style application for
367
- * [`Operation::ApplyStyle`].
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).
368
418
  */
369
- export type StyleScope = "paragraph" | "character";
419
+ export interface TabStopSpec {
420
+ position: number;
421
+ alignment?: string | null;
422
+ alignmentCharacter?: string | null;
423
+ leader?: string | null;
424
+ }
370
425
 
371
426
  /**
372
427
  * W0.5 — the kind of field marker inserted by
@@ -374,12 +429,12 @@ export type StyleScope = "paragraph" | "character";
374
429
  * built-ins (single private-use marker chars the renderer
375
430
  * substitutes); v43 (D-01) adds the plugin `Placeholder` — a tagged,
376
431
  * edit-surviving anchor run whose text is the field\'s cached display
377
- * value (see `paged_parse::PlaceholderField`).
432
+ * value (see `paged_model::PlaceholderField`).
378
433
  */
379
434
  export type FieldKind = "pageNumber" | "nextPageNumber" | { placeholder: { plugin: string; key: string; value?: string | undefined } };
380
435
 
381
436
  /**
382
- * W0.5 — wire mirror of `paged_parse::GuideOrientation`
437
+ * W0.5 — wire mirror of `paged_model::GuideOrientation`
383
438
  * (which is `Deserialize` but lives in the parse crate; kept here so
384
439
  * the operation wire type doesn\'t depend on the parser\'s
385
440
  * serialization shape).
@@ -398,7 +453,7 @@ export interface NestedParent {
398
453
 
399
454
  /**
400
455
  * W1.22 (engine gap 22) — wire description of a `<NumberingList>`
401
- * resource, mirroring `paged_parse::styles::NumberingListDef`. The
456
+ * resource, mirroring `paged_model::NumberingListDef`. The
402
457
  * CRUD ops (`CreateNumberingList` / `EditNumberingList` /
403
458
  * `DeleteNumberingList`) carry this. `self_id` is minted
404
459
  * (`NumberingList/u<n>`) when absent on create; echoed resolved in
@@ -450,7 +505,7 @@ export interface GradientSpec {
450
505
 
451
506
  /**
452
507
  * Wire-format description of a colour swatch (`<Color>`), mirroring
453
- * the editable fields of `paged_parse::ColorEntry` with primitive,
508
+ * the editable fields of `paged_model::ColorEntry` with primitive,
454
509
  * `Deserialize`-able types (the AST `ColorEntry` is `Serialize`-only).
455
510
  * Carried by the swatch-collection mutations so create / edit /
456
511
  * delete-undo are lossless. `space` / `model` / `alternate_space` are
@@ -481,6 +536,37 @@ export interface SwatchSpec {
481
536
  alpha?: number | null;
482
537
  }
483
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
+
484
570
 
485
571
  export class Inspector {
486
572
  free(): void;
@@ -521,6 +607,15 @@ export class Inspector {
521
607
  undo(): string;
522
608
  }
523
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
+
524
619
  export function on_start(): void;
525
620
 
526
621
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
@@ -528,6 +623,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
528
623
  export interface InitOutput {
529
624
  readonly memory: WebAssembly.Memory;
530
625
  readonly __wbg_inspector_free: (a: number, b: number) => void;
626
+ readonly describeCatalog: () => [number, number, number, number];
531
627
  readonly inspector_apply: (a: number, b: number, c: number) => [number, number, number, number];
532
628
  readonly inspector_new: (a: number, b: number) => [number, number, number];
533
629
  readonly inspector_properties: (a: number, b: number, c: number) => [number, number, number, number];
@@ -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