fika-editor 3.6.8 → 3.6.9
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,5 +2,18 @@ import type { PPTElement } from '../types/slides';
|
|
|
2
2
|
export { applyLiveLayoutOntoStore } from './liveLayoutCommit';
|
|
3
3
|
export declare const commitAllLiveEditors: () => void;
|
|
4
4
|
export declare const commitAuthoritativeEditors: typeof commitAllLiveEditors;
|
|
5
|
-
/**
|
|
6
|
-
export
|
|
5
|
+
/** The slide a gesture edits and its elements when the pointer went down. */
|
|
6
|
+
export interface SlideCommitBase {
|
|
7
|
+
slideId: string;
|
|
8
|
+
elements: PPTElement[];
|
|
9
|
+
}
|
|
10
|
+
/** Capture at gesture start; pass to `commitSlideElements` at gesture end. */
|
|
11
|
+
export declare const captureSlideCommitBase: () => SlideCommitBase | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Flush the active editor, then persist live layout onto store-owned elements.
|
|
14
|
+
*
|
|
15
|
+
* With a `base`, the commit lands on the slide the gesture started on, even if
|
|
16
|
+
* the host switched slides meanwhile. Returns the element list the canvas
|
|
17
|
+
* should show now: the CURRENT slide's.
|
|
18
|
+
*/
|
|
19
|
+
export declare const commitSlideElements: (liveList: PPTElement[], base?: SlideCommitBase) => PPTElement[];
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { PPTElement } from '../types/slides';
|
|
2
|
+
export declare const mergeGestureLayout: (liveList: PPTElement[], base: PPTElement[], store: PPTElement[], foreignIds: ReadonlySet<string>) => PPTElement[];
|
|
2
3
|
export declare const applyLiveLayoutOntoStore: (liveList: PPTElement[], storeList: PPTElement[]) => PPTElement[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Slide } from '../types/slides';
|
|
2
|
+
/**
|
|
3
|
+
* Element ids must be unique across a deck: lookups by id (editor commits,
|
|
4
|
+
* agent commands without a slideId) take the first match. Decks saved while a
|
|
5
|
+
* gesture could commit one slide's element list onto another carry whole
|
|
6
|
+
* slides of repeated ids. Later repeats get a slide-scoped id (deterministic,
|
|
7
|
+
* so reloading the same saved deck yields the same ids), and references inside
|
|
8
|
+
* that slide (frames, animations, notes) follow. Returns `slides` itself when
|
|
9
|
+
* nothing collides.
|
|
10
|
+
*/
|
|
11
|
+
export declare function repairDuplicateElementIds(slides: Slide[]): Slide[];
|