@sobree/core 0.1.35 → 0.1.36

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.
@@ -12,10 +12,33 @@ import { SectionProperties } from '../../../doc/types';
12
12
  * - `data-col-count` — column count (every multi-column wrapper)
13
13
  * - `data-pag-cid` — stable section id, so the flow pass can
14
14
  * re-consolidate a section's per-page wrappers
15
+ * - `data-col-fill`="1" — fill column 0 to the page bottom, then column
16
+ * 1 (newspaper) instead of balancing the last
17
+ * page; see `columnsFillNotBalance`
15
18
  * - unequal: `data-col-widths-mm` + `data-col-gaps-mm` (explicit)
16
19
  * - equal: `data-col-gap-mm` (tracks sized by the flow pass)
20
+ *
21
+ * `nextSection` is the section that BEGINS immediately after this one; its
22
+ * break type is what TERMINATES this one, and so decides balance vs fill.
23
+ */
24
+ export declare function openColumnContainerIfNeeded(host: HTMLElement, section: SectionProperties | undefined, sectionIndex?: number, nextSection?: SectionProperties | undefined): HTMLElement;
25
+ /**
26
+ * Whether a multi-column section should FILL column-first (column 0 to the
27
+ * page bottom, then column 1) rather than balance its last page.
28
+ *
29
+ * Word balances a multi-column section's columns only when the section ends
30
+ * at a CONTINUOUS section break (or the document end); a section terminated
31
+ * by a hard page break (`nextPage` / `evenPage` / `oddPage`) fills column by
32
+ * column instead, leaving the second column short when the text runs out.
33
+ * `nextSection` is the section that begins right after — its break `type` is
34
+ * this section's terminator. No next section ⇒ document end ⇒ balance.
35
+ * (OOXML's `<w:type>` default is `nextPage`, so an unset type fills.)
17
36
  */
18
- export declare function openColumnContainerIfNeeded(host: HTMLElement, section: SectionProperties | undefined, sectionIndex?: number): HTMLElement;
37
+ export declare function columnsFillNotBalance(nextSection: SectionProperties | undefined): boolean;
38
+ /** Whether `section` begins on a fresh page — its break `type` is a hard
39
+ * page break (`nextPage` / `evenPage` / `oddPage`). A continuous (or unset)
40
+ * section continues on the running page. */
41
+ export declare function sectionStartsOnFreshPage(section: SectionProperties | undefined): boolean;
19
42
  /**
20
43
  * If `container` is a column-flow container, move any trailing
21
44
  * visually-empty paragraphs out of it and append them to `host`. Keeps