@xibosignage/xibo-layout-renderer 1.0.7 → 1.0.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.
- package/dist/src/index.d.ts +8 -0
- package/dist/styles.css +72 -69
- package/dist/xibo-layout-renderer.cjs.js +2830 -8
- package/dist/xibo-layout-renderer.cjs.js.map +1 -1
- package/dist/xibo-layout-renderer.d.ts +135 -1
- package/dist/xibo-layout-renderer.esm.js +2805 -9
- package/dist/xibo-layout-renderer.esm.js.map +1 -1
- package/dist/xibo-layout-renderer.js +2830 -8
- package/dist/xibo-layout-renderer.min.js +9 -9
- package/dist/xibo-layout-renderer.min.js.map +1 -1
- package/package.json +2 -1
|
@@ -30,6 +30,7 @@ interface IMediaEvents {
|
|
|
30
30
|
start: (media: IMedia) => void;
|
|
31
31
|
end: (media: IMedia) => void;
|
|
32
32
|
}
|
|
33
|
+
declare function Media(region: IRegion, mediaId: string, xml: Element, options: OptionsType, xlr: IXlr): IMedia;
|
|
33
34
|
|
|
34
35
|
interface IMedia {
|
|
35
36
|
checkIframeStatus: boolean;
|
|
@@ -122,6 +123,9 @@ interface IRegion {
|
|
|
122
123
|
}
|
|
123
124
|
declare const initialRegion: IRegion;
|
|
124
125
|
|
|
126
|
+
declare function initRenderingDOM(targetContainer: Element | null): void;
|
|
127
|
+
declare function getXlf(layoutOptions: OptionsType): Promise<string>;
|
|
128
|
+
declare function getLayout(params: GetLayoutParamType): GetLayoutType;
|
|
125
129
|
interface ILayoutEvents {
|
|
126
130
|
start: (layout: ILayout) => void;
|
|
127
131
|
end: (layout: ILayout) => void;
|
|
@@ -239,4 +243,134 @@ type GetLayoutType = {
|
|
|
239
243
|
|
|
240
244
|
declare function XiboLayoutRenderer(inputLayouts: InputLayoutType[], options?: OptionsType): IXlr;
|
|
241
245
|
|
|
242
|
-
|
|
246
|
+
declare function nextId(options: {
|
|
247
|
+
idCounter: number;
|
|
248
|
+
}): number;
|
|
249
|
+
declare const getMediaId: ({ mediaType, containerName }: IMedia) => string;
|
|
250
|
+
declare const capitalizeStr: (inputStr: string) => string;
|
|
251
|
+
type MediaTypes = 'video' | 'audio' | 'image';
|
|
252
|
+
declare function preloadMediaBlob(src: string, type: MediaTypes): Promise<string>;
|
|
253
|
+
declare function fetchJSON(url: string): Promise<any>;
|
|
254
|
+
declare function getFileExt(filename: string): string;
|
|
255
|
+
declare function audioFileType(str: string): string | undefined;
|
|
256
|
+
declare function videoFileType(str: string): string | undefined;
|
|
257
|
+
/**
|
|
258
|
+
* Create expiration day based on current date
|
|
259
|
+
* @param numDays Number of days as expiry
|
|
260
|
+
* @returns JSON string format of date
|
|
261
|
+
*/
|
|
262
|
+
declare function setExpiry(numDays: number): string;
|
|
263
|
+
|
|
264
|
+
declare function VideoMedia(media: IMedia, xlr: IXlr): {
|
|
265
|
+
init(): void;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
declare function AudioMedia(media: IMedia): {
|
|
269
|
+
init(): void;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
declare const platform: OptionsType;
|
|
273
|
+
|
|
274
|
+
declare function Region(layout: ILayout, xml: Element, regionId: string, options: OptionsType, xlr: IXlr): IRegion;
|
|
275
|
+
|
|
276
|
+
interface ISplashScreen {
|
|
277
|
+
init: () => void;
|
|
278
|
+
show: () => void;
|
|
279
|
+
hide: () => void;
|
|
280
|
+
}
|
|
281
|
+
interface PreviewSplashElement extends HTMLDivElement {
|
|
282
|
+
hide: () => void;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
declare const defaultTrans: (duration: number, trans: 'in' | 'out') => {
|
|
286
|
+
keyframes: {
|
|
287
|
+
display: string;
|
|
288
|
+
}[];
|
|
289
|
+
timing: KeyframeAnimationOptions;
|
|
290
|
+
};
|
|
291
|
+
declare const fadeInElem: (duration: number) => {
|
|
292
|
+
keyframes: {
|
|
293
|
+
opacity: number;
|
|
294
|
+
}[];
|
|
295
|
+
timing: KeyframeAnimationOptions;
|
|
296
|
+
};
|
|
297
|
+
declare const fadeOutElem: (duration: number) => {
|
|
298
|
+
keyframes: ({
|
|
299
|
+
opacity: number;
|
|
300
|
+
zIndex?: undefined;
|
|
301
|
+
} | {
|
|
302
|
+
opacity: number;
|
|
303
|
+
zIndex: number;
|
|
304
|
+
})[];
|
|
305
|
+
timing: KeyframeAnimationOptions;
|
|
306
|
+
};
|
|
307
|
+
type KeyframeOptionsType = {
|
|
308
|
+
from: {
|
|
309
|
+
[k: string]: any;
|
|
310
|
+
};
|
|
311
|
+
to: {
|
|
312
|
+
[k: string]: any;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
declare const flyInElem: (duration: number, keyframeOptions: KeyframeOptionsType | undefined, direction?: string) => {
|
|
316
|
+
keyframes: ({
|
|
317
|
+
opacity: number;
|
|
318
|
+
zIndex?: undefined;
|
|
319
|
+
} | {
|
|
320
|
+
opacity: number;
|
|
321
|
+
zIndex: number;
|
|
322
|
+
})[];
|
|
323
|
+
timing: KeyframeAnimationOptions;
|
|
324
|
+
};
|
|
325
|
+
declare const flyOutElem: (duration: number, keyframeOptions: KeyframeOptionsType | undefined, direction?: string) => {
|
|
326
|
+
keyframes: Keyframe[];
|
|
327
|
+
timing: KeyframeAnimationOptions;
|
|
328
|
+
};
|
|
329
|
+
type TransitionNameType = 'fadeIn' | 'fadeOut' | 'flyIn' | 'flyOut' | 'defaultIn' | 'defaultOut';
|
|
330
|
+
type TransitionElementOptions = {
|
|
331
|
+
duration: number;
|
|
332
|
+
keyframes?: KeyframeOptionsType;
|
|
333
|
+
direction?: string;
|
|
334
|
+
};
|
|
335
|
+
declare const transitionElement: (transition: TransitionNameType, options: TransitionElementOptions) => {
|
|
336
|
+
keyframes: {
|
|
337
|
+
display: string;
|
|
338
|
+
}[];
|
|
339
|
+
timing: KeyframeAnimationOptions;
|
|
340
|
+
} | {
|
|
341
|
+
keyframes: {
|
|
342
|
+
opacity: number;
|
|
343
|
+
}[];
|
|
344
|
+
timing: KeyframeAnimationOptions;
|
|
345
|
+
} | {
|
|
346
|
+
keyframes: ({
|
|
347
|
+
opacity: number;
|
|
348
|
+
zIndex?: undefined;
|
|
349
|
+
} | {
|
|
350
|
+
opacity: number;
|
|
351
|
+
zIndex: number;
|
|
352
|
+
})[];
|
|
353
|
+
timing: KeyframeAnimationOptions;
|
|
354
|
+
} | {
|
|
355
|
+
keyframes: ({
|
|
356
|
+
opacity: number;
|
|
357
|
+
zIndex?: undefined;
|
|
358
|
+
} | {
|
|
359
|
+
opacity: number;
|
|
360
|
+
zIndex: number;
|
|
361
|
+
})[];
|
|
362
|
+
timing: KeyframeAnimationOptions;
|
|
363
|
+
} | {
|
|
364
|
+
keyframes: Keyframe[];
|
|
365
|
+
timing: KeyframeAnimationOptions;
|
|
366
|
+
};
|
|
367
|
+
type compassPoints = 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW';
|
|
368
|
+
type flyTransitionParams = {
|
|
369
|
+
trans: 'in' | 'out';
|
|
370
|
+
direction: compassPoints;
|
|
371
|
+
height: string | number;
|
|
372
|
+
width: string | number;
|
|
373
|
+
};
|
|
374
|
+
declare const flyTransitionKeyframes: (params: flyTransitionParams) => KeyframeOptionsType;
|
|
375
|
+
|
|
376
|
+
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, XiboLayoutRenderer as default, defaultTrans, fadeInElem, fadeOutElem, fetchJSON, flyInElem, flyOutElem, flyTransitionKeyframes, type flyTransitionParams, getFileExt, getLayout, getMediaId, getXlf, initRenderingDOM, initialLayout, initialMedia, initialRegion, initialXlr, nextId, platform, preloadMediaBlob, setExpiry, transitionElement, videoFileType };
|