@inappstory/slide-api 0.1.23 → 0.1.25

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/index.d.cts CHANGED
@@ -1,6 +1,37 @@
1
1
  import { Player } from '@inappstory/video-player';
2
2
 
3
+ declare const enum CARD_TYPE {
4
+ STORY = 1,
5
+ UGC_STORY = 2,
6
+ GAME_CARD = 3,
7
+ IN_APP_MESSAGING = 4,
8
+ BANNER = 5
9
+ }
10
+ type GetSdkClientVariables = () => Record<string, any>;
11
+ interface ShowSlideEvent {
12
+ cardId: number;
13
+ index: number;
14
+ }
15
+ interface SlideLeftEvent {
16
+ cardId: number;
17
+ index: number;
18
+ }
19
+ interface EventHandlersEventMap {
20
+ showSlide: ShowSlideEvent;
21
+ slideLeft: SlideLeftEvent;
22
+ }
23
+ declare const enum CARD_LOADING_STATE {
24
+ LOADING = 0,
25
+ LOADED = 1,
26
+ LOADING_ERROR = 2
27
+ }
28
+ declare const enum SLIDE_IN_CACHE_STATUS {
29
+ FAILURE = 0,
30
+ SUCCESS = 1
31
+ }
32
+
3
33
  interface IAnimation {
34
+ init(slide: HTMLElement, animate?: boolean): void;
4
35
  start(slide: HTMLElement, animate?: boolean): void | ((isStop: boolean) => () => void);
5
36
  stop(slide: HTMLElement, animate?: boolean): void;
6
37
  pause(slide: HTMLElement): void;
@@ -995,6 +1026,8 @@ declare global {
995
1026
  type: "text";
996
1027
  textValue: string;
997
1028
  }) => void;
1029
+ _onEvent<K extends keyof EventHandlersEventMap>(name: K, event: EventHandlersEventMap[K]): void;
1030
+ _onCardLoadingStateChange(state: CARD_LOADING_STATE, reason?: string): void;
998
1031
  }
999
1032
  }
1000
1033
 
@@ -1004,21 +1037,25 @@ declare class SlideTimeline {
1004
1037
  private readonly slideDisabledTimer;
1005
1038
  private readonly slideReady;
1006
1039
  private readonly _afterAppResumeQueuePush;
1007
- private readonly sdkApi;
1008
- constructor(slideIndex: number, slideDuration: number, slideDisabledTimer: boolean, slideReady: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, sdkApi: SDKApi);
1040
+ private readonly slideApiDeps;
1041
+ constructor(slideIndex: number, slideDuration: number, slideDisabledTimer: boolean, slideReady: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, slideApiDeps: ISlideApiDeps);
1009
1042
  private resumedAt;
1010
1043
  private timeSpent;
1011
1044
  private timelineDisabledState;
1012
1045
  private currentState;
1046
+ private deferredDataWaitingStateTimerId;
1047
+ private deferredResumeStateTimerId;
1048
+ private dataWaitingStartedAt;
1013
1049
  static get layoutService(): LayoutService;
1014
1050
  private get layoutService();
1015
1051
  get isSDKSupportUpdateTimeline(): boolean;
1016
1052
  get isSdkSupportTimelineOnBeforeStart(): boolean;
1017
1053
  get index(): number;
1018
1054
  get isTimelineDisabled(): boolean;
1055
+ get durationMs(): number;
1019
1056
  private updateTimeline;
1020
1057
  /**
1021
- * trigger timeline update for new slide in sdk, before slide strat event (prevent timeout in timeline while we wait for video start)
1058
+ * trigger timeline update for new slide in sdk, before slide start event (prevent timeout in timeline while we wait for video start)
1022
1059
  */
1023
1060
  triggerSlideLoadState(): void;
1024
1061
  /**
@@ -1030,8 +1067,8 @@ declare class SlideTimeline {
1030
1067
  /**
1031
1068
  *
1032
1069
  */
1033
- slidePaused(videoCurrentTime: number | null): void;
1034
- slideResumed(videoCurrentTime: number | null): void;
1070
+ slidePaused(currentTime: number | null): void;
1071
+ slideResumed(getVideoCurrentTime?: () => number): void;
1035
1072
  slideStopped(): void;
1036
1073
  /**
1037
1074
  * Update timer state (duration from 0 to actual value) and start timeline
@@ -1040,6 +1077,9 @@ declare class SlideTimeline {
1040
1077
  startDisabledTimeline(fallback: () => void): void;
1041
1078
  onSlideDataWaiting(videoCurrentTime: number | null): void;
1042
1079
  onSlideError(videoCurrentTime: number | null): void;
1080
+ private clearDeferredDataWaitingStateTimerId;
1081
+ private clearDeferredResumeStateTimerId;
1082
+ private onBeforeStateChanged;
1043
1083
  }
1044
1084
 
1045
1085
  type APIResponse<DTO> = {
@@ -1124,16 +1164,59 @@ interface SDKApi {
1124
1164
  }): void;
1125
1165
  isSdkSupportTimelineOnBeforeStart(): boolean;
1126
1166
  isSdkSupportCorrectPauseResumeLifecycle(): boolean;
1167
+ emitEvent<K extends keyof EventHandlersEventMap>(name: K, event: EventHandlersEventMap[K]): void;
1168
+ onCardLoadingStateChange(state: CARD_LOADING_STATE, reason?: string): void;
1127
1169
  }
1128
1170
 
1129
- declare const enum CARD_TYPE {
1130
- STORY = 1,
1131
- UGC_STORY = 2,
1132
- GAME_CARDS = 3,
1133
- IN_APP_MESSAGING = 4,
1134
- BANNER = 5
1171
+ interface ISlideApiDeps {
1172
+ getWidgetsSharedData: SDKApi["getWidgetsSharedData"];
1173
+ showToast: SDKApi["showToast"];
1174
+ writeToClipboard: SDKApi["writeToClipboard"];
1175
+ isExistsShare: SDKApi["isExistsShare"];
1176
+ sdkCanSendShareComplete: SDKApi["sdkCanSendShareComplete"];
1177
+ share: SDKApi["share"];
1178
+ shareSlideScreenshot: SDKApi["shareSlideScreenshot"];
1179
+ getCardSessionValue: SDKApi["getCardSessionValue"];
1180
+ setCardSessionValue: SDKApi["setCardSessionValue"];
1181
+ isAndroid: SDKApi["isAndroid"];
1182
+ isWeb: SDKApi["isWeb"];
1183
+ isIOS: SDKApi["isIOS"];
1184
+ isExistsShowCardTextInput: SDKApi["isExistsShowCardTextInput"];
1185
+ showCardTextInput: SDKApi["showCardTextInput"];
1186
+ openUrl: SDKApi["openUrl"];
1187
+ openGame: SDKApi["openGame"];
1188
+ openStory: SDKApi["openStory"];
1189
+ closeCard: SDKApi["closeCard"];
1190
+ vibrate: SDKApi["vibrate"];
1191
+ disableVerticalSwipeGesture: SDKApi["disableVerticalSwipeGesture"];
1192
+ enableVerticalSwipeGesture: SDKApi["enableVerticalSwipeGesture"];
1193
+ disableBackpress: SDKApi["disableBackpress"];
1194
+ enableBackpress: SDKApi["enableBackpress"];
1195
+ sendApiRequest: SDKApi["sendApiRequest"];
1196
+ sendStatisticEvent: SDKApi["sendStatisticEvent"];
1197
+ setCardLocalData: SDKApi["setCardLocalData"];
1198
+ getCardLocalData: SDKApi["getCardLocalData"];
1199
+ getCardServerData: SDKApi["getCardServerData"];
1200
+ cardAnimation: SDKApi["cardAnimation"];
1201
+ updateCardServerDataLocally: SDKApi["updateCardServerDataLocally"];
1202
+ getCardFonts: SDKApi["getCardFonts"];
1203
+ isExistsShowNextCard: SDKApi["isExistsShowNextCard"];
1204
+ cardShowNext: SDKApi["cardShowNext"];
1205
+ isExistsShowCardSlide: SDKApi["isExistsShowCardSlide"];
1206
+ showCardSlide: SDKApi["showCardSlide"];
1207
+ enableHorizontalSwipeGesture: SDKApi["enableHorizontalSwipeGesture"];
1208
+ disableHorizontalSwipeGesture: SDKApi["disableHorizontalSwipeGesture"];
1209
+ isExistsShowLayer: SDKApi["isExistsShowLayer"];
1210
+ showLayer: SDKApi["showLayer"];
1211
+ showNextSlide: SDKApi["showNextSlide"];
1212
+ isSdkSupportCorrectPauseResumeLifecycle: SDKApi["isSdkSupportCorrectPauseResumeLifecycle"];
1213
+ isSdkSupportTimelineOnBeforeStart: SDKApi["isSdkSupportTimelineOnBeforeStart"];
1214
+ updateTimeline: SDKApi["updateTimeline"];
1215
+ /** @deprecated, used only in native sdk **/
1216
+ cardPausedCallback: SDKApi["cardPausedCallback"];
1217
+ /** @deprecated, used only in native sdk **/
1218
+ cardResumedCallback: SDKApi["cardResumedCallback"];
1135
1219
  }
1136
- type GetSdkClientVariables = () => Record<string, any>;
1137
1220
 
1138
1221
  type WidgetOptionsBase = {
1139
1222
  slide: HTMLElement | null;
@@ -1173,7 +1256,7 @@ type WidgetCallbacks = {
1173
1256
  onWidgetRequireResumeUI: OnWidgetRequireResumeUI;
1174
1257
  };
1175
1258
  type WidgetDeps = {
1176
- sdkApi: SDKApi;
1259
+ slideApiDeps: ISlideApiDeps;
1177
1260
  slideRoot: HTMLElement;
1178
1261
  getLayoutDirection: () => "ltr" | "rtl";
1179
1262
  getSdkClientVariables: GetSdkClientVariables;
@@ -1244,15 +1327,15 @@ declare class WidgetBase<WidgetOptions extends WidgetOptionsBase> {
1244
1327
  static createInstance<Widget extends WidgetBase<WidgetOptions>, WidgetOptions extends WidgetOptionsBase>(instantiate: (element: HTMLElement, options: Partial<WidgetOptions>) => Widget, element: HTMLElement, options: Partial<WidgetOptions>): Widget;
1245
1328
  static initWidget<Widget extends WidgetBase<WidgetOptions>, WidgetOptions extends WidgetOptionsBase>(htmlElement: HTMLElement, localData: Record<string, any>, instantiate: (element: HTMLElement, options: Partial<WidgetOptions>) => Widget): Promise<Record<string, any>>;
1246
1329
  static get widgetsService(): WidgetsService;
1247
- static getLocalData(sdkApi: SDKApi): Promise<Record<string, any>>;
1330
+ static getLocalData(slideApiDeps: ISlideApiDeps): Promise<Record<string, any>>;
1248
1331
  getLocalData(): Promise<Record<string, any>>;
1249
- static setLocalData(sdkApi: SDKApi, keyValue: Record<string, any>, sendToServer?: boolean, syncWithRuntimeLocalData?: boolean): void;
1332
+ static setLocalData(slideApiDeps: ISlideApiDeps, keyValue: Record<string, any>, sendToServer?: boolean, syncWithRuntimeLocalData?: boolean): void;
1250
1333
  setLocalData(keyValue: Record<string, any>, sendToServer?: boolean, syncWithRuntimeLocalData?: boolean): void;
1251
1334
  get statisticEventBaseFieldsShortForm(): StatisticEventBaseFieldsShortForm;
1252
1335
  static getStatisticEventBaseFieldsShortForm(cardId: number, cardType: CARD_TYPE, slideIndex: number): StatisticEventBaseFieldsShortForm;
1253
1336
  get statisticEventBaseFieldsFullForm(): StatisticEventBaseFieldsFullForm;
1254
1337
  static getStatisticEventBaseFieldsFullForm(cardId: number, cardType: CARD_TYPE, slideIndex: number): StatisticEventBaseFieldsFullForm;
1255
- static sendStatisticEventToApp(sdkApi: SDKApi, name: string, data: Record<string, string | number | Array<string | number>>, devPayload?: Record<string, string | number | Array<string | number>>, options?: {
1338
+ static sendStatisticEventToApp(slideApiDeps: ISlideApiDeps, name: string, data: Record<string, string | number | Array<string | number>>, devPayload?: Record<string, string | number | Array<string | number>>, options?: {
1256
1339
  forceEnableStatisticV2?: boolean;
1257
1340
  }): void;
1258
1341
  sendStatisticEventToApp(name: string, data: Record<string, string | number | Array<string | number>>, devPayload?: Record<string, string | number | Array<string | number>>, options?: {
@@ -1417,6 +1500,8 @@ interface SDKInterface {
1417
1500
  type: "text";
1418
1501
  textValue: string;
1419
1502
  }): void;
1503
+ onEvent<K extends keyof EventHandlersEventMap>(name: K, event: EventHandlersEventMap[K]): void;
1504
+ onCardLoadingStateChange(state: CARD_LOADING_STATE, reason?: string): void;
1420
1505
  }
1421
1506
 
1422
1507
  type LocalData = Record<string, any>;
@@ -1428,6 +1513,7 @@ declare global {
1428
1513
  }
1429
1514
 
1430
1515
  interface IElement {
1516
+ get nodeRef(): HTMLElement;
1431
1517
  init(localData: LocalData): Promise<boolean>;
1432
1518
  onPause(): void;
1433
1519
  onResume(): void;
@@ -1450,6 +1536,7 @@ declare class DataInput implements IElement {
1450
1536
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetDataInput.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1451
1537
  static isTypeOf(element: IElement): element is DataInput;
1452
1538
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1539
+ get nodeRef(): HTMLElement;
1453
1540
  init(localData: LocalData): Promise<boolean>;
1454
1541
  onPause(): void;
1455
1542
  onResume(): void;
@@ -1472,6 +1559,7 @@ declare class Poll implements IElement {
1472
1559
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetPoll.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1473
1560
  static isTypeOf(element: IElement): element is Poll;
1474
1561
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1562
+ get nodeRef(): HTMLElement;
1475
1563
  init(localData: LocalData): Promise<boolean>;
1476
1564
  onPause(): void;
1477
1565
  onResume(): void;
@@ -1495,6 +1583,7 @@ declare class PollLayers implements IElement {
1495
1583
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _layersNodesRefs: Array<HTMLElement>, _widgetApi: typeof WidgetPollLayers.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1496
1584
  static isTypeOf(element: IElement): element is PollLayers;
1497
1585
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1586
+ get nodeRef(): HTMLElement;
1498
1587
  init(localData: LocalData): Promise<boolean>;
1499
1588
  onPause(): void;
1500
1589
  onResume(): void;
@@ -1516,6 +1605,7 @@ declare class Products implements IElement {
1516
1605
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetProducts.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1517
1606
  static isTypeOf(element: IElement): element is Products;
1518
1607
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1608
+ get nodeRef(): HTMLElement;
1519
1609
  init(localData: LocalData): Promise<boolean>;
1520
1610
  onPause(): void;
1521
1611
  onResume(): void;
@@ -1540,6 +1630,7 @@ declare class Quest implements IElement {
1540
1630
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetQuest.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1541
1631
  static isTypeOf(element: IElement): element is Quest;
1542
1632
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1633
+ get nodeRef(): HTMLElement;
1543
1634
  init(localData: LocalData): Promise<boolean>;
1544
1635
  onPause(): void;
1545
1636
  onResume(): void;
@@ -1568,6 +1659,7 @@ declare class Quiz implements IElement {
1568
1659
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetQuiz.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1569
1660
  static isTypeOf(element: IElement): element is Quiz;
1570
1661
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1662
+ get nodeRef(): HTMLElement;
1571
1663
  init(localData: LocalData): Promise<boolean>;
1572
1664
  onPause(): void;
1573
1665
  onResume(): void;
@@ -1590,6 +1682,7 @@ declare class QuizGrouped implements IElement {
1590
1682
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetQuizGrouped.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1591
1683
  static isTypeOf(element: IElement): element is QuizGrouped;
1592
1684
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1685
+ get nodeRef(): HTMLElement;
1593
1686
  init(localData: LocalData): Promise<boolean>;
1594
1687
  onPause(): void;
1595
1688
  onResume(): void;
@@ -1612,6 +1705,7 @@ declare class RangeSlider implements IElement {
1612
1705
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetRangeSlider.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1613
1706
  static isTypeOf(element: IElement): element is RangeSlider;
1614
1707
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1708
+ get nodeRef(): HTMLElement;
1615
1709
  init(localData: LocalData): Promise<boolean>;
1616
1710
  onPause(): void;
1617
1711
  onResume(): void;
@@ -1634,6 +1728,7 @@ declare class Rate implements IElement {
1634
1728
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetRate.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1635
1729
  static isTypeOf(element: IElement): element is Rate;
1636
1730
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1731
+ get nodeRef(): HTMLElement;
1637
1732
  init(localData: LocalData): Promise<boolean>;
1638
1733
  onPause(): void;
1639
1734
  onResume(): void;
@@ -1658,6 +1753,7 @@ declare class Share implements IElement {
1658
1753
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _layersNodesRefs: Array<HTMLElement>, _widgetApi: typeof WidgetShare.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1659
1754
  static isTypeOf(element: IElement): element is Share;
1660
1755
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1756
+ get nodeRef(): HTMLElement;
1661
1757
  init(localData: LocalData): Promise<boolean>;
1662
1758
  onPause(): void;
1663
1759
  onResume(): void;
@@ -1677,6 +1773,7 @@ declare class SwipeUp implements IElement {
1677
1773
  constructor(_elementNodeRef: HTMLElement, _layer: Layer);
1678
1774
  static isTypeOf(element: IElement): element is SwipeUp;
1679
1775
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1776
+ get nodeRef(): HTMLElement;
1680
1777
  init(localData: LocalData): Promise<boolean>;
1681
1778
  onPause(): void;
1682
1779
  onResume(): void;
@@ -1696,6 +1793,7 @@ declare class SwipeUpItems implements IElement {
1696
1793
  constructor(_elementNodeRef: HTMLElement, _layer: Layer);
1697
1794
  static isTypeOf(element: IElement): element is SwipeUpItems;
1698
1795
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1796
+ get nodeRef(): HTMLElement;
1699
1797
  init(localData: LocalData): Promise<boolean>;
1700
1798
  onPause(): void;
1701
1799
  onResume(): void;
@@ -1718,6 +1816,7 @@ declare class Test implements IElement {
1718
1816
  constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetTest.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
1719
1817
  static isTypeOf(element: IElement): element is Test;
1720
1818
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1819
+ get nodeRef(): HTMLElement;
1721
1820
  init(localData: LocalData): Promise<boolean>;
1722
1821
  onPause(): void;
1723
1822
  onResume(): void;
@@ -1734,7 +1833,7 @@ declare class Video implements IElement {
1734
1833
  private readonly _elementNodeRef;
1735
1834
  private readonly _layer;
1736
1835
  private readonly _VideoPlayer;
1737
- private readonly _sdkApi;
1836
+ private readonly _slideApiDeps;
1738
1837
  private static readonly _className;
1739
1838
  static className(): string;
1740
1839
  private readonly _video;
@@ -1742,9 +1841,10 @@ declare class Video implements IElement {
1742
1841
  private readonly _vodData;
1743
1842
  private _vodPlayerInstance;
1744
1843
  private _videoStateAdapter;
1745
- constructor(_elementNodeRef: HTMLElement, _layer: Layer, _VideoPlayer: typeof Player | undefined, _sdkApi: SDKApi);
1844
+ constructor(_elementNodeRef: HTMLElement, _layer: Layer, _VideoPlayer: typeof Player | undefined, _slideApiDeps: ISlideApiDeps);
1746
1845
  static isTypeOf(element: IElement): element is Video;
1747
1846
  mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
1847
+ get nodeRef(): HTMLElement;
1748
1848
  init(localData: LocalData): Promise<boolean>;
1749
1849
  private _isScreenOnPause;
1750
1850
  onPause(): void;
@@ -1752,6 +1852,7 @@ declare class Video implements IElement {
1752
1852
  onStart(): void;
1753
1853
  onStop(): void;
1754
1854
  onBeforeUnmount(): Promise<void>;
1855
+ get durationMs(): number;
1755
1856
  private _initVOD;
1756
1857
  private _convertMpdUrls;
1757
1858
  private _destroyVODPlayer;
@@ -1759,14 +1860,15 @@ declare class Video implements IElement {
1759
1860
  get isLayerForcePaused(): boolean;
1760
1861
  private _videoStartedPromise;
1761
1862
  get videoStartedPromise(): Promise<{
1762
- currentTime: number;
1863
+ getVideoCurrentTime: () => number;
1763
1864
  }> | null;
1764
- start(muted?: boolean, loop?: boolean): Promise<{
1765
- currentTime: number;
1865
+ get isLooped(): boolean;
1866
+ start(muted: boolean | undefined, getIsLooped: () => boolean): Promise<{
1867
+ getVideoCurrentTime: () => number;
1766
1868
  }>;
1767
1869
  pause(resetVideoTime?: boolean): number | null;
1768
1870
  resume(): Promise<{
1769
- currentTime: number;
1871
+ getVideoCurrentTime: () => number;
1770
1872
  }>;
1771
1873
  stop({ prepareForRestart }: {
1772
1874
  prepareForRestart: ON_SLIDE_STOP_PREPARE_FOR_RESTART;
@@ -1780,8 +1882,7 @@ declare class Slide {
1780
1882
  private readonly _slideReadyPromise;
1781
1883
  private readonly _afterAppResumeQueuePush;
1782
1884
  private readonly _afterStartInitQueuePush;
1783
- private readonly _showNextSlide;
1784
- readonly sdkApi: SDKApi;
1885
+ readonly slideApiDeps: ISlideApiDeps;
1785
1886
  private readonly _slideRoot;
1786
1887
  private readonly _getLayoutDirection;
1787
1888
  private readonly _slidePauseUI;
@@ -1789,7 +1890,7 @@ declare class Slide {
1789
1890
  private readonly _getSdkClientVariables;
1790
1891
  private readonly _layers;
1791
1892
  private _start;
1792
- constructor(_slidesNodesRefs: Array<HTMLElement>, _slideReadyPromise: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, _afterStartInitQueuePush: (cb: () => void) => void, _showNextSlide: (duration: number) => void, sdkApi: SDKApi, _slideRoot: HTMLElement, _getLayoutDirection: () => "ltr" | "rtl", _slidePauseUI: () => Promise<void>, _slideResumeUI: () => Promise<void>, _getSdkClientVariables: GetSdkClientVariables);
1893
+ constructor(_slidesNodesRefs: Array<HTMLElement>, _slideReadyPromise: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, _afterStartInitQueuePush: (cb: () => void) => void, slideApiDeps: ISlideApiDeps, _slideRoot: HTMLElement, _getLayoutDirection: () => "ltr" | "rtl", _slidePauseUI: () => Promise<void>, _slideResumeUI: () => Promise<void>, _getSdkClientVariables: GetSdkClientVariables);
1793
1894
  private _activeLayer;
1794
1895
  get activeLayer(): Layer;
1795
1896
  get layers(): Array<Layer>;
@@ -1819,8 +1920,7 @@ declare class Layer {
1819
1920
  private readonly _slideReadyPromise;
1820
1921
  private readonly _afterAppResumeQueuePush;
1821
1922
  private readonly _afterStartInitQueuePush;
1822
- private readonly _showNextSlide;
1823
- readonly sdkApi: SDKApi;
1923
+ readonly slideApiDeps: ISlideApiDeps;
1824
1924
  private readonly _slideRoot;
1825
1925
  private readonly _getLayoutDirection;
1826
1926
  private readonly _slidePauseUI;
@@ -1836,7 +1936,7 @@ declare class Layer {
1836
1936
  private _elements;
1837
1937
  private readonly _timeline;
1838
1938
  private readonly _widgetDeps;
1839
- constructor(_nodeRef: HTMLElement, _slide: Slide, _slideReadyPromise: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, _afterStartInitQueuePush: (cb: () => void) => void, _showNextSlide: (duration: number) => void, sdkApi: SDKApi, _slideRoot: HTMLElement, _getLayoutDirection: () => "ltr" | "rtl", _slidePauseUI: () => Promise<void>, _slideResumeUI: () => Promise<void>, _getSdkClientVariables: GetSdkClientVariables);
1939
+ constructor(_nodeRef: HTMLElement, _slide: Slide, _slideReadyPromise: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, _afterStartInitQueuePush: (cb: () => void) => void, slideApiDeps: ISlideApiDeps, _slideRoot: HTMLElement, _getLayoutDirection: () => "ltr" | "rtl", _slidePauseUI: () => Promise<void>, _slideResumeUI: () => Promise<void>, _getSdkClientVariables: GetSdkClientVariables);
1840
1940
  init(localData: LocalData): Array<Promise<boolean>>;
1841
1941
  onAfterAllMediaResourcesLoaded(): void;
1842
1942
  get nodeRef(): HTMLElement;
@@ -1845,6 +1945,7 @@ declare class Layer {
1845
1945
  get timeline(): SlideTimeline;
1846
1946
  get layoutService(): LayoutService;
1847
1947
  getLocalData(): Promise<LocalData>;
1948
+ findElementByNodeRef(nodeRef: HTMLElement): IElement | undefined;
1848
1949
  get isQuest(): boolean;
1849
1950
  private _initTextFit;
1850
1951
  private _initTextElementAutoWidthCorrection;
@@ -1889,7 +1990,7 @@ declare class Layer {
1889
1990
  get isLayerForcePaused(): boolean;
1890
1991
  }
1891
1992
 
1892
- declare class SlideApi$1 {
1993
+ declare class CardApi {
1893
1994
  private readonly config;
1894
1995
  get layoutDirection(): "ltr" | "rtl";
1895
1996
  private static renderedBoxClassName;
@@ -1900,10 +2001,12 @@ declare class SlideApi$1 {
1900
2001
  private readonly _getViewportHeight;
1901
2002
  private readonly _overlappingActionBarHeight;
1902
2003
  private readonly _separateUserAndAppPause;
2004
+ private readonly _useSdkCacheForMultislideMode;
1903
2005
  readonly sdkApi: SDKApi;
1904
- private activeCard;
1905
- private cards;
1906
- private multiCardsMode;
2006
+ private activeSlide;
2007
+ private slides;
2008
+ private slidesMode;
2009
+ private sizeMetrics;
1907
2010
  constructor(config: {
1908
2011
  sdkApi: SDKApi;
1909
2012
  slideWrapper: HTMLElement;
@@ -1927,6 +2030,7 @@ declare class SlideApi$1 {
1927
2030
  separateUserAndAppPause: boolean;
1928
2031
  root: HTMLElement;
1929
2032
  nonce?: string;
2033
+ useSdkCacheForMultislideMode: boolean;
1930
2034
  });
1931
2035
  get state(): number;
1932
2036
  destroy(): Promise<void>;
@@ -1941,13 +2045,8 @@ declare class SlideApi$1 {
1941
2045
  result: boolean;
1942
2046
  reason?: string;
1943
2047
  }>;
1944
- private cardsSlider;
1945
- showSlides(cards: Array<string>, cardAppearance: Record<string, any>): Promise<{
1946
- cardId: number;
1947
- slideIndex: number;
1948
- result: boolean;
1949
- reason?: string;
1950
- }>;
2048
+ private slider;
2049
+ showSlides(slides: Array<string>, cardAppearance: Record<string, any>, index?: number): Promise<void>;
1951
2050
  handleBackpress(): void;
1952
2051
  private get layoutService();
1953
2052
  private getLocalData;
@@ -1993,9 +2092,10 @@ declare class SlideApi$1 {
1993
2092
  private _sdkClientVariables;
1994
2093
  getSdkClientVariables(): ReturnType<GetSdkClientVariables>;
1995
2094
  setSdkClientVariables(variables: Record<string, any>): void;
2095
+ setSlideInCacheStatus(index: number, status: SLIDE_IN_CACHE_STATUS): void;
1996
2096
  }
1997
2097
 
1998
- declare class SlideApi extends SlideApi$1 {
2098
+ declare class SlideApi extends CardApi {
1999
2099
  private root;
2000
2100
  private slideWrapper;
2001
2101
  constructor(_sdkInterface: SDKInterface, config: {
@@ -2011,9 +2111,10 @@ declare class SlideApi extends SlideApi$1 {
2011
2111
  }) => void;
2012
2112
  VODPlayer?: typeof Player;
2013
2113
  overlappingActionBarHeight?: number;
2114
+ useSdkCacheForMultislideMode: boolean;
2014
2115
  });
2015
2116
  destroy(): Promise<void>;
2016
2117
  }
2017
2118
 
2018
- export { ON_SLIDE_STOP_PREPARE_FOR_RESTART, SlideApi, TIMELINE_ACTION, Widgets };
2019
- export type { FontDTO, SDKInterface, WidgetPollSharedData, WidgetRangeSliderSharedData, WidgetVoteSharedData, WidgetsSharedDataMap };
2119
+ export { CARD_LOADING_STATE, ON_SLIDE_STOP_PREPARE_FOR_RESTART, SLIDE_IN_CACHE_STATUS, SlideApi, TIMELINE_ACTION, Widgets };
2120
+ export type { EventHandlersEventMap, FontDTO, SDKInterface, ShowSlideEvent, WidgetPollSharedData, WidgetRangeSliderSharedData, WidgetVoteSharedData, WidgetsSharedDataMap };