@sobree/core 0.1.41 → 0.1.43

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.
@@ -41,6 +41,14 @@ export interface DocumentImport {
41
41
  */
42
42
  export interface ConvertOptions {
43
43
  replaceParagraphs?: Map<Element, Block>;
44
+ /** Whether the document carries inline-frame groups (section textbox
45
+ * pills, `<wp:inline>` drawing groups). These are the layouts whose
46
+ * frame heights our paginator estimates imperfectly, so for them we
47
+ * fall back to honouring Word's `<w:lastRenderedPageBreak/>` hints.
48
+ * A plain text-flow document paginates accurately on its own and must
49
+ * IGNORE the hints (ECMA-376's guidance), or stale hints fragment its
50
+ * pages. Set by the importer from the parsed inline-frame count. */
51
+ hasComplexFrames?: boolean;
44
52
  }
45
53
  export declare function convertDocumentXml(xmlDoc: Document, ctx: ConvertContext, opts?: ConvertOptions): DocumentImport;
46
54
  /**
@@ -0,0 +1,11 @@
1
+ import { AnchoredFrame, Block } from '../../doc/types';
2
+ /**
3
+ * Replace each qualifying picture band with an `InlineFrame` at its anchor
4
+ * paragraph and drop those frames from the overlay set. Pure — inputs
5
+ * untouched. Body length is preserved (the empty anchor paragraph is
6
+ * REPLACED, never removed), so downstream paragraph indices stay valid.
7
+ */
8
+ export declare function groupAnchoredPictureBands(body: readonly Block[], frames: readonly AnchoredFrame[]): {
9
+ body: Block[];
10
+ frames: AnchoredFrame[];
11
+ };