@xibosignage/xibo-layout-renderer 1.0.19 → 1.0.20
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/src/Modules/Generators/Generators.d.ts +12 -0
- package/dist/src/Modules/SplashScreen/SplashScreen.d.ts +1 -0
- package/dist/src/Types/Layout/Layout.types.d.ts +11 -2
- package/dist/src/Types/Region/Region.types.d.ts +1 -0
- package/dist/src/Types/XLR/XLR.types.d.ts +20 -4
- package/dist/src/Types/XLR/index.d.ts +1 -1
- package/dist/xibo-layout-renderer.cjs.js +456 -346
- package/dist/xibo-layout-renderer.cjs.js.map +1 -1
- package/dist/xibo-layout-renderer.d.ts +37 -7
- package/dist/xibo-layout-renderer.esm.js +456 -346
- package/dist/xibo-layout-renderer.esm.js.map +1 -1
- package/dist/xibo-layout-renderer.js +456 -346
- package/dist/xibo-layout-renderer.min.js +8 -8
- package/dist/xibo-layout-renderer.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Emitter, Unsubscribe, DefaultEvents } from 'nanoevents';
|
|
2
2
|
import Player from 'video.js/dist/types/player';
|
|
3
3
|
|
|
4
|
+
type PrepareLayoutsType = {
|
|
5
|
+
moveNext?: boolean;
|
|
6
|
+
};
|
|
4
7
|
declare enum ELayoutType {
|
|
5
8
|
CURRENT = 0,
|
|
6
9
|
NEXT = 1
|
|
@@ -8,12 +11,22 @@ declare enum ELayoutType {
|
|
|
8
11
|
type IXlrEvents = {
|
|
9
12
|
layoutChange: (layoutId: number) => void;
|
|
10
13
|
};
|
|
14
|
+
interface IXlrPlayback {
|
|
15
|
+
currentLayout: ILayout | undefined;
|
|
16
|
+
nextLayout: ILayout | undefined;
|
|
17
|
+
currentLayoutIndex: number;
|
|
18
|
+
nextLayoutIndex: number;
|
|
19
|
+
isCurrentLayoutValid: boolean;
|
|
20
|
+
hasDefaultOnly: boolean;
|
|
21
|
+
}
|
|
11
22
|
interface IXlr {
|
|
12
23
|
inputLayouts: InputLayoutType[];
|
|
13
24
|
config: OptionsType;
|
|
14
|
-
layouts:
|
|
25
|
+
layouts: {
|
|
26
|
+
[key: string]: ILayout;
|
|
27
|
+
};
|
|
15
28
|
currentLayoutIndex: number;
|
|
16
|
-
currentLayoutId: number
|
|
29
|
+
currentLayoutId: number;
|
|
17
30
|
currentLayout: ILayout | undefined;
|
|
18
31
|
nextLayout: ILayout | undefined;
|
|
19
32
|
emitter: Emitter<IXlrEvents>;
|
|
@@ -21,11 +34,17 @@ interface IXlr {
|
|
|
21
34
|
init(): Promise<IXlr>;
|
|
22
35
|
playSchedules(xlr: IXlr): void;
|
|
23
36
|
prepareLayoutXlf(inputLayout: ILayout | undefined): Promise<ILayout>;
|
|
24
|
-
prepareLayouts(): Promise<IXlr>;
|
|
37
|
+
prepareLayouts(playback: IXlrPlayback): Promise<IXlr>;
|
|
25
38
|
updateLayouts(inputLayouts: InputLayoutType[]): void;
|
|
26
|
-
updateLoop(inputLayouts: InputLayoutType[]): void
|
|
39
|
+
updateLoop(inputLayouts: InputLayoutType[]): Promise<void>;
|
|
27
40
|
gotoPrevLayout(): void;
|
|
28
41
|
gotoNextLayout(): void;
|
|
42
|
+
uniqueLayouts: {
|
|
43
|
+
[layoutId: string]: InputLayoutType;
|
|
44
|
+
};
|
|
45
|
+
getLayout(inputLayout: InputLayoutType): ILayout | undefined;
|
|
46
|
+
updateScheduleLayouts(scheduleLayouts: InputLayoutType[]): Promise<void>;
|
|
47
|
+
parseLayouts(loopUpdate?: boolean): IXlrPlayback;
|
|
29
48
|
}
|
|
30
49
|
declare const initialXlr: IXlr;
|
|
31
50
|
|
|
@@ -126,6 +145,7 @@ interface IRegion {
|
|
|
126
145
|
on<E extends keyof IRegionEvents>(event: E, callback: IRegionEvents[E]): Unsubscribe;
|
|
127
146
|
prepareMediaObjects(): void;
|
|
128
147
|
reset(): void;
|
|
148
|
+
html: HTMLDivElement;
|
|
129
149
|
}
|
|
130
150
|
declare const initialRegion: IRegion;
|
|
131
151
|
|
|
@@ -174,8 +194,11 @@ declare class ActionController {
|
|
|
174
194
|
}
|
|
175
195
|
|
|
176
196
|
type InputLayoutType = {
|
|
177
|
-
|
|
197
|
+
response: any;
|
|
198
|
+
layoutId: number;
|
|
178
199
|
path?: string;
|
|
200
|
+
index?: number;
|
|
201
|
+
id?: number;
|
|
179
202
|
};
|
|
180
203
|
type OptionsType = {
|
|
181
204
|
xlfUrl: string;
|
|
@@ -197,10 +220,14 @@ type OptionsType = {
|
|
|
197
220
|
previewTranslations?: {
|
|
198
221
|
[k: string]: any;
|
|
199
222
|
};
|
|
223
|
+
icons?: {
|
|
224
|
+
splashScreen: string;
|
|
225
|
+
logo: string;
|
|
226
|
+
};
|
|
200
227
|
};
|
|
201
228
|
interface ILayout {
|
|
202
229
|
id: number | null;
|
|
203
|
-
layoutId: number
|
|
230
|
+
layoutId: number;
|
|
204
231
|
scheduleId?: number;
|
|
205
232
|
sw: number | null;
|
|
206
233
|
sh: number | null;
|
|
@@ -244,6 +271,7 @@ interface ILayout {
|
|
|
244
271
|
xlr: IXlr;
|
|
245
272
|
finishAllRegions(): Promise<void[]>;
|
|
246
273
|
inLoop: boolean;
|
|
274
|
+
removeLayout(): void;
|
|
247
275
|
}
|
|
248
276
|
declare const initialLayout: ILayout;
|
|
249
277
|
type GetLayoutParamType = {
|
|
@@ -252,6 +280,7 @@ type GetLayoutParamType = {
|
|
|
252
280
|
};
|
|
253
281
|
type GetLayoutType = {
|
|
254
282
|
currentLayoutIndex: number;
|
|
283
|
+
nextLayoutIndex: number;
|
|
255
284
|
inputLayouts: InputLayoutType[];
|
|
256
285
|
current: ILayout | undefined;
|
|
257
286
|
next: ILayout | undefined;
|
|
@@ -315,6 +344,7 @@ interface ISplashScreen {
|
|
|
315
344
|
}
|
|
316
345
|
interface PreviewSplashElement extends HTMLDivElement {
|
|
317
346
|
hide: () => void;
|
|
347
|
+
show: () => void;
|
|
318
348
|
}
|
|
319
349
|
|
|
320
350
|
declare const defaultTrans: (duration: number, trans: 'in' | 'out') => {
|
|
@@ -408,4 +438,4 @@ type flyTransitionParams = {
|
|
|
408
438
|
};
|
|
409
439
|
declare const flyTransitionKeyframes: (params: flyTransitionParams) => KeyframeOptionsType;
|
|
410
440
|
|
|
411
|
-
export { Action, ActionsWrapper, AudioMedia, ELayoutType, type GetLayoutParamType, type GetLayoutType, type ILayout, type ILayoutEvents, type IMedia, type IRegion, type IRegionEvents, type ISplashScreen, type IXlr, type InactOptions, type InputLayoutType, type KeyframeOptionsType, Media, type MediaTypes, type OptionsType, type PreviewSplashElement, Region, type TransitionElementOptions, type TransitionNameType, VideoMedia, audioFileType, capitalizeStr, type compassPoints, composeBgUrlByPlatform, composeMediaUrl, composeResourceUrl, composeResourceUrlByPlatform, XiboLayoutRenderer as default, defaultTrans, fadeInElem, fadeOutElem, fetchJSON, fetchText, flyInElem, flyOutElem, flyTransitionKeyframes, type flyTransitionParams, getDataBlob, getFileExt, getIndexByLayoutId, getLayout, getMediaId, getXlf, initRenderingDOM, initialLayout, initialMedia, initialRegion, initialXlr, isEmpty, nextId, platform, preloadMediaBlob, setExpiry, transitionElement, videoFileType };
|
|
441
|
+
export { Action, ActionsWrapper, AudioMedia, ELayoutType, type GetLayoutParamType, type GetLayoutType, type ILayout, type ILayoutEvents, type IMedia, type IRegion, type IRegionEvents, type ISplashScreen, type IXlr, type IXlrEvents, type InactOptions, type InputLayoutType, type KeyframeOptionsType, Media, type MediaTypes, type OptionsType, type PrepareLayoutsType, type PreviewSplashElement, Region, type TransitionElementOptions, type TransitionNameType, VideoMedia, audioFileType, capitalizeStr, type compassPoints, composeBgUrlByPlatform, composeMediaUrl, composeResourceUrl, composeResourceUrlByPlatform, XiboLayoutRenderer as default, defaultTrans, fadeInElem, fadeOutElem, fetchJSON, fetchText, flyInElem, flyOutElem, flyTransitionKeyframes, type flyTransitionParams, getDataBlob, getFileExt, getIndexByLayoutId, getLayout, getMediaId, getXlf, initRenderingDOM, initialLayout, initialMedia, initialRegion, initialXlr, isEmpty, nextId, platform, preloadMediaBlob, setExpiry, transitionElement, videoFileType };
|