react-covideo-embed 0.1.9 → 0.1.11

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.
@@ -1,6 +1,9 @@
1
- /// <reference types="react" />
1
+ import { CSSProperties } from 'react';
2
2
  type Props = {
3
3
  children: React.ReactNode;
4
+ extendStyle?: {
5
+ wrapper?: CSSProperties;
6
+ };
4
7
  };
5
- export declare const Container: ({ children }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Container: ({ children, extendStyle }: Props) => import("react/jsx-runtime").JSX.Element;
6
9
  export {};
@@ -1,5 +1,10 @@
1
1
  export type ENVIRONMENT = 'sandbox' | 'production';
2
- export declare const JWT_COOKIE_NAME = "react-covideo-embed-jwt";
2
+ export declare enum COOKIE_NAMES {
3
+ jwt = "react-covideo-embed-jwt",
4
+ merge = "react-covideo-merge",
5
+ recordSettings = "record_settings",
6
+ recordError = "react-covideo-record-error"
7
+ }
3
8
  export declare let token: any;
4
9
  export declare let apiExpress: string;
5
10
  export declare const updateToken: (tokenNew: string, hasExternalJwt?: boolean) => void;
@@ -17,4 +17,5 @@ export declare const isSafari: boolean;
17
17
  export declare const toMB: (KB: number) => string;
18
18
  export declare function capitalizeFirstLetter(string: string): string;
19
19
  export declare function extractUrls(str: string): [] | RegExpMatchArray;
20
+ export declare function clearCookies(): void;
20
21
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-covideo-embed",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "private": false,
5
5
  "description": "Covideo platform as an embeddable React component.",
6
6
  "main": "./build/index.js",
@@ -1,52 +0,0 @@
1
- /// <reference types="react" />
2
- import '../index.css';
3
- export declare enum Feature {
4
- UPLOAD = "upload",
5
- FOLDER = "folder",
6
- RECORD_SCREEN = "recordScreen",
7
- MERGE = "merge",
8
- RECORD_CAM = "recordCam",
9
- WHEELS_TV = "wheelsTV",
10
- RECORD_BOTH = "recordBoth",
11
- TRIM = "trim",
12
- INSERT = "insert",
13
- LANDING_PAGE = "landingPage",
14
- QUICKSHARE = "quickshare",
15
- CTA = "CTA",
16
- VOICEOVER = "voiceover",
17
- REACTIONS = "reactions"
18
- }
19
- export type FeatureType = 'insert' | 'recordScreen' | 'recordBoth' | 'recordCam' | 'upload' | 'trim' | 'merge' | 'wheelsTV' | 'voiceover' | 'quickshare' | 'folder' | 'landingPage' | 'CTA' | 'reactions';
20
- export declare enum Environment {
21
- SANDBOX = "sandbox",
22
- PRODUCTION = "production"
23
- }
24
- export type EnvironmentType = 'sandbox' | 'production';
25
- export type ShareData = {
26
- url: string;
27
- thumbnail: string;
28
- html: string;
29
- };
30
- export type CovideoEmbedProps = {
31
- /**
32
- * JWT token from Covideo.
33
- * If provided, disables the module's login/logout pages.
34
- * If not provided, users need to log in through the module's login page.
35
- */
36
- token?: string;
37
- /** Which Covideo environment to target */
38
- env?: Environment | EnvironmentType;
39
- /** Which Covideo features to hide */
40
- hideFeatures?: Feature[] | FeatureType[];
41
- /**
42
- * Callback triggered when a video is inserted.
43
- * @param shareData - Contains the video url, thumbnail url and HTML of the inserted video.
44
- */
45
- onVideoInsert?: (shareData: ShareData) => void;
46
- /**
47
- * Callback triggered when there is an error inserting a video.
48
- * @param error - The error occurred during video insert.
49
- */
50
- onVideoInsertError?: (error: unknown) => void;
51
- };
52
- export declare const CovideoEmbed: React.FC<CovideoEmbedProps>;