@beyondwork/docx-react-component 1.0.103 → 1.0.105

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.
Files changed (45) hide show
  1. package/package.json +1 -1
  2. package/src/api/public-types.ts +66 -1
  3. package/src/api/v3/_runtime-handle.ts +2 -0
  4. package/src/api/v3/ai/_pe2-evidence.ts +153 -0
  5. package/src/api/v3/ai/bundle.ts +13 -5
  6. package/src/api/v3/ai/inspect.ts +7 -1
  7. package/src/api/v3/ai/outline.ts +2 -7
  8. package/src/api/v3/ai/replacement.ts +113 -0
  9. package/src/api/v3/runtime/geometry.ts +79 -0
  10. package/src/api/v3/ui/_types.ts +86 -0
  11. package/src/api/v3/ui/index.ts +5 -0
  12. package/src/api/v3/ui/overlays.ts +104 -0
  13. package/src/io/ooxml/parse-drawing.ts +99 -1
  14. package/src/io/ooxml/parse-fields.ts +27 -6
  15. package/src/io/ooxml/parse-shapes.ts +130 -0
  16. package/src/model/canonical-document.ts +34 -3
  17. package/src/model/canonical-layout-inputs.ts +979 -0
  18. package/src/model/layout/index.ts +9 -0
  19. package/src/model/layout/page-graph-types.ts +150 -0
  20. package/src/model/layout/runtime-page-graph-types.ts +23 -0
  21. package/src/runtime/collab/runtime-collab-sync.ts +3 -3
  22. package/src/runtime/debug/build-debug-inspector-snapshot.ts +17 -4
  23. package/src/runtime/document-runtime.ts +30 -14
  24. package/src/runtime/event-refresh-hints.ts +35 -5
  25. package/src/runtime/formatting/formatting-context.ts +110 -9
  26. package/src/runtime/formatting/index.ts +2 -0
  27. package/src/runtime/formatting/layout-inputs.ts +67 -3
  28. package/src/runtime/geometry/caret-geometry.ts +82 -10
  29. package/src/runtime/geometry/geometry-facet.ts +44 -0
  30. package/src/runtime/geometry/geometry-index.ts +1268 -0
  31. package/src/runtime/geometry/geometry-types.ts +227 -1
  32. package/src/runtime/geometry/index.ts +26 -0
  33. package/src/runtime/geometry/inert-geometry-facet.ts +3 -0
  34. package/src/runtime/geometry/object-handles.ts +7 -4
  35. package/src/runtime/geometry/replacement-envelope.ts +41 -2
  36. package/src/runtime/layout/layout-engine-instance.ts +2 -0
  37. package/src/runtime/layout/layout-engine-version.ts +44 -1
  38. package/src/runtime/layout/page-graph.ts +877 -2
  39. package/src/runtime/layout/project-block-fragments.ts +101 -1
  40. package/src/runtime/layout/public-facet.ts +152 -0
  41. package/src/runtime/prerender/graph-canonicalize.ts +44 -0
  42. package/src/runtime/surface-projection.ts +43 -3
  43. package/src/runtime/workflow/coordinator.ts +57 -11
  44. package/src/ui/ui-controller-factory.ts +11 -0
  45. package/src/ui-tailwind/chrome-overlay/tw-page-stack-overlay-layer.tsx +3 -0
@@ -906,8 +906,8 @@ export interface CanonicalParagraphFormatting {
906
906
  * templates for side-by-side "instructional column + body column"
907
907
  * paragraphs and for drop-caps.
908
908
  *
909
- * Added 2026-04-23 per `docs/KNOWN-ISSUES-VISUAL.md §2.3 "w:framePr
910
- * 2-column inset text frames"`. Before this type existed, L01's parser
909
+ * Added 2026-04-23 after the visual issue-register finding on `w:framePr`
910
+ * 2-column inset text frames. Before this type existed, L01's parser
911
911
  * fell through to `OpaqueBlockNode` whenever `<w:pPr>` contained
912
912
  * `<w:framePr>`, which hid the paragraph from L04 pagination and L11
913
913
  * render. Canonical representation unblocks downstream adoption.
@@ -1472,6 +1472,8 @@ export interface FieldRegistryEntry {
1472
1472
  readonly displayText: string;
1473
1473
  /** Paragraph index in document order where this field appears. */
1474
1474
  readonly paragraphIndex: number;
1475
+ /** Stable story key for the story that owns this field instance. */
1476
+ readonly storyKey?: string;
1475
1477
  /** Runtime refresh status. */
1476
1478
  readonly refreshStatus: FieldRefreshStatus;
1477
1479
  /** Parsed field switches carried from FieldNode.switches. Present only for REF/PAGEREF/NOTEREF/TOC entries with recognized switches. */
@@ -1846,6 +1848,25 @@ export interface OpaqueInlineNode {
1846
1848
 
1847
1849
  // ---- Complex rendering inline nodes (read-only previews) ----
1848
1850
 
1851
+ export type PreserveOnlyObjectFallbackHint =
1852
+ | "drawing-inline"
1853
+ | "drawing-floating"
1854
+ | "chart"
1855
+ | "smartart"
1856
+ | "shape"
1857
+ | "wordart"
1858
+ | "vml-shape"
1859
+ | "ole-object"
1860
+ | "opaque-object";
1861
+
1862
+ export interface PreserveOnlyObjectSizing {
1863
+ readonly sourceId?: string;
1864
+ readonly display: "inline" | "floating" | "unknown";
1865
+ readonly extentEmu?: { widthEmu: number; heightEmu: number };
1866
+ readonly fallbackHint: PreserveOnlyObjectFallbackHint;
1867
+ readonly relationshipIds?: string[];
1868
+ }
1869
+
1849
1870
  /**
1850
1871
  * Read-only preview of a chart (c:chart). The original drawing XML is stored in
1851
1872
  * rawXml for lossless round-trip export. If a fallback image was present in
@@ -1872,6 +1893,7 @@ export interface ChartPreviewNode {
1872
1893
  */
1873
1894
  readonly parsedData?: ChartModel;
1874
1895
  readonly rawXml: string;
1896
+ readonly preserveOnlyObject?: PreserveOnlyObjectSizing;
1875
1897
  }
1876
1898
 
1877
1899
  /**
@@ -1882,6 +1904,7 @@ export interface SmartArtPreviewNode {
1882
1904
  readonly type: "smartart_preview";
1883
1905
  readonly previewMediaId?: string;
1884
1906
  readonly rawXml: string;
1907
+ readonly preserveOnlyObject?: PreserveOnlyObjectSizing;
1885
1908
  }
1886
1909
 
1887
1910
  /**
@@ -1913,6 +1936,7 @@ export interface ShapeNode {
1913
1936
  */
1914
1937
  readonly txbxBlocks?: BlockNode[];
1915
1938
  readonly rawXml: string;
1939
+ readonly preserveOnlyObject?: PreserveOnlyObjectSizing;
1916
1940
  }
1917
1941
 
1918
1942
  /**
@@ -1924,6 +1948,7 @@ export interface WordArtNode {
1924
1948
  readonly text: string;
1925
1949
  readonly geometry?: string;
1926
1950
  readonly rawXml: string;
1951
+ readonly preserveOnlyObject?: PreserveOnlyObjectSizing;
1927
1952
  }
1928
1953
 
1929
1954
  /**
@@ -1936,6 +1961,7 @@ export interface VmlShapeNode {
1936
1961
  readonly text?: string;
1937
1962
  readonly shapeType?: string;
1938
1963
  readonly rawXml: string;
1964
+ readonly preserveOnlyObject?: PreserveOnlyObjectSizing;
1939
1965
  }
1940
1966
 
1941
1967
  /**
@@ -2110,6 +2136,7 @@ export interface ShapeContent {
2110
2136
  */
2111
2137
  readonly txbxBlocks?: BlockNode[];
2112
2138
  readonly rawXml: string;
2139
+ readonly preserveOnlyObject?: PreserveOnlyObjectSizing;
2113
2140
  }
2114
2141
 
2115
2142
  export interface TextBoxBodyProperties {
@@ -2129,7 +2156,7 @@ export interface DrawingFrameNode {
2129
2156
  | ShapeContent
2130
2157
  | ChartPreviewNode
2131
2158
  | SmartArtPreviewNode
2132
- | { type: "opaque"; rawXml: string };
2159
+ | { type: "opaque"; rawXml: string; preserveOnlyObject?: PreserveOnlyObjectSizing };
2133
2160
  }
2134
2161
 
2135
2162
  export interface OpaqueBlockNode {
@@ -4388,6 +4415,10 @@ function validateFieldRegistryEntry(
4388
4415
  });
4389
4416
  }
4390
4417
 
4418
+ if (record.storyKey !== undefined) {
4419
+ expectString(record.storyKey, `${path}.storyKey`, issues);
4420
+ }
4421
+
4391
4422
  if (
4392
4423
  typeof record.refreshStatus !== "string" ||
4393
4424
  !FIELD_REFRESH_STATUSES.has(record.refreshStatus as FieldRefreshStatus)