@vouchfor/embeds 0.0.0-experiment.beea728 → 0.0.0-experiment.c2f4786

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/dist/es/embeds.js +978 -1445
  2. package/dist/es/embeds.js.map +1 -1
  3. package/dist/es/src/components/DialogEmbed/DialogOverlay.d.ts +20 -0
  4. package/dist/es/src/components/DialogEmbed/DialogPortal.d.ts +36 -0
  5. package/dist/es/src/components/DialogEmbed/index.d.ts +38 -0
  6. package/dist/es/src/components/PlayerEmbed/controllers/event-forwarder.d.ts +15 -0
  7. package/dist/es/src/components/{Embed → PlayerEmbed}/controllers/fetcher.d.ts +4 -4
  8. package/dist/es/src/components/{Embed/controllers/tracking.d.ts → PlayerEmbed/controllers/tracking/index.d.ts} +14 -11
  9. package/dist/es/src/components/PlayerEmbed/controllers/tracking/utils.d.ts +17 -0
  10. package/dist/es/src/components/PlayerEmbed/index.d.ts +75 -0
  11. package/dist/es/src/components/PlayerEmbed/tests/data.d.ts +4 -0
  12. package/dist/es/src/components/PlayerEmbed/tests/media-data.d.ts +19 -0
  13. package/dist/es/src/index.d.ts +2 -1
  14. package/dist/iife/dialog-embed/embed.iife.js +4042 -0
  15. package/dist/iife/dialog-embed/embed.iife.js.map +1 -0
  16. package/dist/iife/embeds.iife.js +2963 -466
  17. package/dist/iife/embeds.iife.js.map +1 -1
  18. package/dist/iife/player-embed/embed.iife.js +3904 -0
  19. package/dist/iife/player-embed/embed.iife.js.map +1 -0
  20. package/package.json +44 -31
  21. package/src/components/DialogEmbed/Dialog.stories.ts +91 -0
  22. package/src/components/DialogEmbed/DialogOverlay.ts +131 -0
  23. package/src/components/DialogEmbed/DialogPortal.ts +126 -0
  24. package/src/components/DialogEmbed/index.ts +97 -0
  25. package/src/components/PlayerEmbed/MultiEmbed.stories.ts +135 -0
  26. package/src/components/{Embed/Embed.stories.ts → PlayerEmbed/PlayerEmbed.stories.ts} +30 -16
  27. package/src/components/{Embed → PlayerEmbed}/controllers/event-forwarder.ts +6 -5
  28. package/src/components/{Embed → PlayerEmbed}/controllers/fetcher.ts +11 -11
  29. package/src/components/{Embed/controllers/tracking.ts → PlayerEmbed/controllers/tracking/index.ts} +53 -121
  30. package/src/components/PlayerEmbed/controllers/tracking/utils.ts +95 -0
  31. package/src/components/{Embed → PlayerEmbed}/index.ts +97 -44
  32. package/src/components/PlayerEmbed/tests/PlayerEmbed.spec.ts +87 -0
  33. package/src/components/PlayerEmbed/tests/data.ts +227 -0
  34. package/src/components/PlayerEmbed/tests/media-data.ts +22 -0
  35. package/src/index.ts +2 -1
  36. package/dist/es/src/components/Embed/index.d.ts +0 -69
@@ -1,69 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import type { Scene, Scenes, TemplateInstance } from '@vouchfor/canvas-video';
3
- import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
4
- import type { Environment } from '../../utils/env';
5
- type EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
6
- env: Environment;
7
- apiKey: string;
8
- disableTracking?: boolean;
9
- trackingSource?: string;
10
- vouchId?: string;
11
- templateId?: string;
12
- questions?: number[];
13
- };
14
- declare class Embed extends LitElement {
15
- private _mediaPlayerRef;
16
- data: EmbedProps['data'];
17
- vouchId: EmbedProps['vouchId'];
18
- templateId: EmbedProps['templateId'];
19
- questions: EmbedProps['questions'];
20
- env: EmbedProps['env'];
21
- apiKey: EmbedProps['apiKey'];
22
- disableTracking: EmbedProps['disableTracking'];
23
- trackingSource: EmbedProps['trackingSource'];
24
- controls: EmbedProps['controls'];
25
- preload: EmbedProps['preload'];
26
- autoplay: EmbedProps['autoplay'];
27
- aspectRatio: EmbedProps['aspectRatio'];
28
- private eventController;
29
- private _fetcherController;
30
- private _trackingController;
31
- vouch: EmbedProps['data'];
32
- template: TemplateInstance | undefined;
33
- get fetching(): boolean;
34
- get waiting(): boolean | undefined;
35
- get seeking(): boolean | undefined;
36
- get paused(): boolean | undefined;
37
- get captions(): boolean | undefined;
38
- get fullscreen(): boolean | undefined;
39
- get duration(): number | undefined;
40
- set currentTime(value: number);
41
- get currentTime(): number;
42
- set playbackRate(value: number);
43
- get playbackRate(): number;
44
- set volume(value: number);
45
- get volume(): number;
46
- set muted(value: boolean);
47
- get muted(): boolean;
48
- get scene(): Scene | null;
49
- get scenes(): Scene[];
50
- get sceneConfig(): Scenes | null;
51
- get videoState(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/controllers/scenes").VideoStateMap | undefined;
52
- get mediaPlayer(): MediaPlayer | undefined;
53
- play(): void;
54
- pause(): void;
55
- setScene(index: number): void;
56
- render(): import("lit").TemplateResult<1>;
57
- }
58
- declare global {
59
- interface HTMLElementTagNameMap {
60
- 'vouch-embed': Embed;
61
- }
62
- namespace JSX {
63
- interface IntrinsicElements {
64
- 'vouch-embed': Embed;
65
- }
66
- }
67
- }
68
- export { Embed };
69
- export type { EmbedProps };