fika-editor 3.2.6 → 3.2.8
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.
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* "AI is writing" reveal of a freshly generated slide.
|
|
3
3
|
*
|
|
4
4
|
* Non-text elements (pictures, shapes, lines, charts, formulas…) pop in one
|
|
5
|
-
* after another with a tiny stagger;
|
|
5
|
+
* after another with a tiny stagger; panels behind text wait for their copy.
|
|
6
|
+
* Text boxes are then typed out and tables
|
|
6
7
|
* are filled cell by cell, in element order. The store is written directly on
|
|
7
8
|
* every frame (no history snapshots, host `onChange` muted) and the final
|
|
8
9
|
* content lands through the regular `slides.update` command once, so undo and
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PPTElement, PPTTableElement, PPTTextElement } from '../types/slides';
|
|
2
|
+
import type { FikaRevealOptions } from './reveal';
|
|
3
|
+
interface CellPlan {
|
|
4
|
+
row: number;
|
|
5
|
+
col: number;
|
|
6
|
+
units: number;
|
|
7
|
+
}
|
|
8
|
+
type TypedPlan = {
|
|
9
|
+
kind: 'text';
|
|
10
|
+
element: PPTTextElement;
|
|
11
|
+
units: number;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'table';
|
|
14
|
+
element: PPTTableElement;
|
|
15
|
+
units: number;
|
|
16
|
+
cells: CellPlan[];
|
|
17
|
+
};
|
|
18
|
+
interface Plan {
|
|
19
|
+
instant: PPTElement[];
|
|
20
|
+
/** Background shape ID → first contained typed element ID. */
|
|
21
|
+
backgrounds: Map<string, string>;
|
|
22
|
+
typed: TypedPlan[];
|
|
23
|
+
staggerGap: number;
|
|
24
|
+
staggerMs: number;
|
|
25
|
+
typingMs: number;
|
|
26
|
+
/** Cumulative end offsets (ms, from typing start) per typed element. */
|
|
27
|
+
typedEnds: number[];
|
|
28
|
+
}
|
|
29
|
+
export declare function buildPlan(elements: PPTElement[], options: FikaRevealOptions): Plan;
|
|
30
|
+
/** Elements visible at `elapsed` ms, in their final order. */
|
|
31
|
+
export declare function frameElements(plan: Plan, finalElements: PPTElement[], elapsed: number): {
|
|
32
|
+
elements: PPTElement[];
|
|
33
|
+
activeId: string | null;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -24,8 +24,8 @@ export declare const DEFAULT_FIT_FONT_FAMILY = "-apple-system, BlinkMacSystemFon
|
|
|
24
24
|
export declare function resolvePaintFontFamily(family?: string | null): string;
|
|
25
25
|
/** Matches `ul, ol { padding-inline-start: 1em }` when the list has no inline pad. */
|
|
26
26
|
export declare const DEFAULT_LIST_PADDING_EM = 1;
|
|
27
|
-
/** Matches `li { padding-inline-start: 0.
|
|
28
|
-
export declare const LIST_MARKER_GAP_EM
|
|
27
|
+
/** Matches `li { padding-inline-start: 0.5333333333em }` (marker-to-text gap). */
|
|
28
|
+
export declare const LIST_MARKER_GAP_EM: number;
|
|
29
29
|
/**
|
|
30
30
|
* @deprecated Prefer per-block `listIndentPx` from the imported list padding.
|
|
31
31
|
* Kept as a fallback indent (px) when a list item has no padding of its own.
|