@lofcz/pptist 2.0.15 → 2.0.16
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.
|
@@ -48,9 +48,12 @@ export interface PptistLayoutBuildResult {
|
|
|
48
48
|
* non-fatal warnings (e.g. a missing optional image). Text is auto-fit to each
|
|
49
49
|
* box via pretext, so content never overflows. Throws on missing required slots
|
|
50
50
|
* or an unknown layout.
|
|
51
|
+
*
|
|
52
|
+
* Async because slots may carry inline math; KaTeX is lazy-loaded up front (only
|
|
53
|
+
* when math is present) so the otherwise-synchronous builders can render it.
|
|
51
54
|
*/
|
|
52
55
|
export declare function buildLayoutSlide(layoutId: string, slots: Slots, preset: PptistStylePreset, viewport: {
|
|
53
56
|
width: number;
|
|
54
57
|
height: number;
|
|
55
|
-
}, backgroundMode?: PptistLayoutBackgroundMode): PptistLayoutBuildResult
|
|
58
|
+
}, backgroundMode?: PptistLayoutBackgroundMode): Promise<PptistLayoutBuildResult>;
|
|
56
59
|
export {};
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/** True when a string carries math delimiters the math parser should handle. */
|
|
2
|
+
export declare function containsMath(source: string): boolean;
|
|
1
3
|
export declare function markdownToHtml(markdown: string): Promise<string>;
|
|
4
|
+
/**
|
|
5
|
+
* Preload the math-capable markdown parser (lazy KaTeX + texmath) so
|
|
6
|
+
* `renderInlineMarkdown` can render `$…$` math synchronously afterwards. No-op
|
|
7
|
+
* once loaded; call before rendering content that may contain math.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ensureInlineMathReady(): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Render one line of markdown to inline HTML (no `<p>` wrapper) using the same
|
|
12
|
+
* CommonMark + texmath pipeline as {@link markdownToHtml}. Inline math (`$…$`)
|
|
13
|
+
* renders only when the math parser has been preloaded via
|
|
14
|
+
* {@link ensureInlineMathReady}; otherwise math delimiters read as literal text.
|
|
15
|
+
*/
|
|
16
|
+
export declare function renderInlineMarkdown(markdown: string): string;
|