@paged-media/idml-viewer 0.70.1 → 0.71.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paged-media/idml-viewer",
3
- "version": "0.70.1",
3
+ "version": "0.71.0",
4
4
  "description": "Standalone IDML viewer for the browser — camera, pages, input and events over the @paged-media/sdk WebGPU ViewerSession.",
5
5
  "license": "MPL-2.0 OR LicenseRef-PMEL",
6
6
  "repository": {
@@ -26,6 +26,18 @@ export type ByteBuf = number[];
26
26
  */
27
27
  export type SceneBlendMode = "multiply" | "screen" | "overlay" | "darken" | "lighten" | "colorDodge" | "colorBurn" | "hardLight" | "softLight" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity";
28
28
 
29
+ /**
30
+ * A malformed address or selector, with the byte offset the problem
31
+ * starts at — user input, so an answer, never a panic.
32
+ */
33
+ export interface GrammarError {
34
+ /**
35
+ * Byte offset into the input.
36
+ */
37
+ position: number;
38
+ message: string;
39
+ }
40
+
29
41
  /**
30
42
  * A plugin gradient paint for [`SceneItem::FillPathGradient`] (C-1.3).
31
43
  * Coordinates are frame-content points (mapped by the frame transform
@@ -114,6 +126,32 @@ export interface ScenePaint {
114
126
  a: number;
115
127
  }
116
128
 
129
+ /**
130
+ * A style family — which of the document\'s five style tables a
131
+ * `style:` address names.
132
+ */
133
+ export type StyleFamily = "paragraph" | "character" | "object" | "cell" | "table";
134
+
135
+ /**
136
+ * ADR 132 — the RESOLVED target of a `Mutation::Set` / a property
137
+ * read: every object kind a property can live on, named by the ids the
138
+ * dedicated operations take.
139
+ *
140
+ * The wire names a target by [`Address`] (ADR 131); the engine resolves
141
+ * that against the document into this enum ([`query::Index::to_virtual_target`],
142
+ * total over every core address kind) — `frame:` finds its kind,
143
+ * `page:#n` its page id, a style\'s display name its `Self`, and a
144
+ * `table:`/`cell:` the story that owns the table. `Element` carries the
145
+ * six page-item kinds plus `storyRange:` through the existing `ElementId`.
146
+ *
147
+ * This enum\'s JSON (`{ \"kind\": \"layer\", \"layerId\": \"ua\" }`) was the
148
+ * `Set` target at protocol 70 before addresses landed; it is still
149
+ * accepted in that position as a DEPRECATED alias (see
150
+ * [`From<VirtualTarget> for Address`](Address)). The id fields are spelled
151
+ * `…Id` so batch handle substitution (`$h:`) reaches them.
152
+ */
153
+ export type VirtualTarget = { kind: "doc" } | { kind: "page"; pageId: string } | { kind: "layer"; layerId: string } | { kind: "master"; masterId: string } | { kind: "story"; storyId: string } | { kind: "field"; storyId: string; offset: number } | { kind: "swatch"; swatchId: string } | { kind: "gradient"; gradientId: string } | { kind: "colorGroup"; groupId: string } | { kind: "numberingList"; listId: string } | { kind: "style"; family: StyleFamily; styleId: string } | { kind: "section"; sectionId: string } | { kind: "guide"; guideId: string } | { kind: "condition"; conditionId: string } | { kind: "textVariable"; variableId: string } | { kind: "spread"; spreadId: string } | { kind: "conditionSet"; setId: string } | { kind: "hyperlink"; hyperlinkId: string } | { kind: "table"; storyId: string; tableId: string } | { kind: "cell"; storyId: string; tableId: string; row: number; col: number } | { kind: "element"; elementId: ElementId };
154
+
117
155
  /**
118
156
  * Continuous-layout geometry for every page, so the TS wrapper
119
157
  * computes fit / goToPage / currentPage / scroll extents without
@@ -139,6 +177,13 @@ export interface PagesLayout {
139
177
  */
140
178
  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 } };
141
179
 
180
+ /**
181
+ * Every object in a document, by one name. See the module docs for the
182
+ * string grammar, which is the canonical form; this enum is its typed
183
+ * mirror on the wire.
184
+ */
185
+ export type Address = { kind: "doc" } | { 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: "frame"; id: string } | { kind: "page"; id: string } | { kind: "pageNumber"; n: number } | { kind: "spread"; id: string } | { kind: "layer"; id: string } | { kind: "master"; id: string } | { kind: "story"; id: string } | { kind: "storyRange"; storyId: string; start: number; end: number } | { kind: "field"; storyId: string; offset: number } | { kind: "table"; id: string } | { kind: "cell"; tableId: string; row: number; col: number } | { kind: "style"; family: StyleFamily; id: string } | { kind: "swatch"; id: string } | { kind: "gradient"; id: string } | { kind: "colorGroup"; id: string } | { kind: "numberingList"; id: string } | { kind: "guide"; id: string } | { kind: "condition"; id: string } | { kind: "conditionSet"; id: string } | { kind: "section"; id: string } | { kind: "hyperlink"; id: string } | { kind: "textVariable"; id: string } | { kind: "onMaster"; master: string; item: Address } | { kind: "plugin"; pluginId: string; objectKind: string; id: string } | { kind: "handle"; name: string };
186
+
142
187
  /**
143
188
  * How a `SetElementSelection` request combines with the current set.
144
189
  * Mirrors the canonical macOS / industry convention:
@@ -194,6 +239,13 @@ export interface Diagnostics {
194
239
  messages: Diagnostic[];
195
240
  }
196
241
 
242
+ /**
243
+ * The kind of an [`Address`], without its payload — what a selector\'s
244
+ * kind step names, and the key the published id grammar is generated
245
+ * from.
246
+ */
247
+ export type AddressKind = "doc" | "textFrame" | "rectangle" | "oval" | "polygon" | "graphicLine" | "group" | "frame" | "page" | "spread" | "layer" | "master" | "story" | "storyRange" | "field" | "table" | "cell" | "style" | "swatch" | "gradient" | "colorGroup" | "numberingList" | "guide" | "condition" | "conditionSet" | "section" | "hyperlink" | "textVariable" | "plugin" | "handle";
248
+
197
249
  /**
198
250
  * W1.13 — cell qualifier for a content address that points INTO a
199
251
  * table cell rather than the story\'s main paragraph flow.
package/wasm/paged_sdk.js CHANGED
@@ -1351,7 +1351,7 @@ function __wbg_get_imports() {
1351
1351
  arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
1352
1352
  }, arguments); },
1353
1353
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
1354
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1827, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1354
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1825, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1355
1355
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h78ff2cea7266d1aa);
1356
1356
  return ret;
1357
1357
  },
Binary file