@sobree/core 0.1.45 → 0.1.46
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/dist/doc/styles.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { NamedStyle, ParagraphProperties, RunProperties, SobreeDocument } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Merge one run-property layer of the STYLE hierarchy onto the accumulated
|
|
4
|
+
* base. Non-toggle fields override (leaf wins); toggle fields XOR (absent =
|
|
5
|
+
* `false`, the XOR identity). This is the correct combinator for style→style
|
|
6
|
+
* inheritance — it is NOT used for DIRECT run formatting, where an explicit
|
|
7
|
+
* `<w:b w:val="0"/>` must absolutely override the styles' XOR (a plain spread
|
|
8
|
+
* handles that, since the importer stores the explicit `false`).
|
|
9
|
+
*/
|
|
10
|
+
export declare function mergeRunStyleLayer(base: RunProperties, over: RunProperties): RunProperties;
|
|
2
11
|
/**
|
|
3
12
|
* Style-cascade resolver — walks `styleId` up its `basedOn` chain and
|
|
4
13
|
* merges defaults base-first, leaf-last. The result is what the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InlineRun, NamedStyle } from '../../../doc/types';
|
|
1
|
+
import { InlineRun, NamedStyle, RunProperties } from '../../../doc/types';
|
|
2
2
|
/**
|
|
3
3
|
* Render a list of InlineRuns into DOM children of `parent`. Empty run
|
|
4
4
|
* lists produce a `<br>` placeholder so contenteditable can place a
|
|
@@ -7,7 +7,7 @@ import { InlineRun, NamedStyle } from '../../../doc/types';
|
|
|
7
7
|
* `rawParts` is threaded through so `DrawingRun` can resolve its
|
|
8
8
|
* `partPath` to an `<img src>` via a blob URL / data URI.
|
|
9
9
|
*/
|
|
10
|
-
export declare function appendInlineRuns(parent: HTMLElement, runs: readonly InlineRun[], rawParts?: Record<string, Uint8Array>, styles?: readonly NamedStyle[]): void;
|
|
10
|
+
export declare function appendInlineRuns(parent: HTMLElement, runs: readonly InlineRun[], rawParts?: Record<string, Uint8Array>, styles?: readonly NamedStyle[], paragraphRunDefaults?: RunProperties): void;
|
|
11
11
|
/** Convert a raw part's bytes (from `doc.rawParts`) into a blob URL
|
|
12
12
|
* the browser can render as `<img src>` / `background-image`. Exported
|
|
13
13
|
* for the section-frame renderer in `block.ts` which paints the
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NamedStyle, ParagraphProperties } from '../../../doc/types';
|
|
2
|
-
export declare function applyParagraphProps(el: HTMLElement, props: ParagraphProperties, styles?: readonly NamedStyle[]):
|
|
1
|
+
import { NamedStyle, ParagraphProperties, RunProperties } from '../../../doc/types';
|
|
2
|
+
export declare function applyParagraphProps(el: HTMLElement, props: ParagraphProperties, styles?: readonly NamedStyle[]): RunProperties;
|