Skip to content

Commit

Permalink
add dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
binarykitchen committed Dec 20, 2024
1 parent 0594965 commit cdcbfcc
Show file tree
Hide file tree
Showing 66 changed files with 44,759 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ npm-debug.log
.DS_Store
*.code-workspace
storybook-static
dist
# Put it back after https://github.com/web-infra-dev/rslib/discussions/496#discussioncomment-11612863
# dist
17,917 changes: 17,917 additions & 0 deletions dist/cjs/index.cjs

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions dist/esm/client.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { PartialVideomailClientOptions } from "./types/options";
import Videomail from "./types/Videomail";
import Despot from "./util/Despot";
export interface StartOverParams {
keepHidden?: boolean | undefined;
}
export interface ShowParams {
goBack?: boolean | undefined;
playerOnly?: boolean | undefined;
}
declare class VideomailClient extends Despot {
private container;
static ENC_TYPE_APP_JSON: string;
static ENC_TYPE_FORM: string;
constructor(options?: PartialVideomailClientOptions);
private validateOptions;
build(): HTMLElement | null | undefined;
show(params?: ShowParams): HTMLElement;
startOver(params?: StartOverParams): void;
unload(startingOver?: boolean): void;
replay(videomail: Videomail, replayParentElementId?: string): HTMLVideoElement;
hide(): void;
getByAlias(alias: string): Promise<Videomail>;
getByKey(key: string): Promise<Videomail>;
isDirty(): boolean;
isBuilt(): boolean;
isRecording(): any;
submit(): void;
getLogLines(): string[] | undefined;
}
export default VideomailClient;
9 changes: 9 additions & 0 deletions dist/esm/constants.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
declare const _default: {
SITE_NAME_LABEL: string;
VERSION_LABEL: string;
public: {
ENC_TYPE_APP_JSON: string;
ENC_TYPE_FORM: string;
};
};
export default _default;
13 changes: 13 additions & 0 deletions dist/esm/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import VideomailClient from "./client";
import { FullVideomailErrorData, VideomailErrorData } from "./types/error";
import VideomailEvents from "./types/events";
import { PartialVideomailClientOptions } from "./types/options";
import RecordingStats from "./types/RecordingStats";
import Videomail from "./types/Videomail";
import { VideoType } from "./types/VideoType";
export type { Videomail };
export type { VideomailEvents };
export type { PartialVideomailClientOptions };
export type { RecordingStats };
export { VideoType, VideomailClient };
export type { VideomailErrorData, FullVideomailErrorData };
7,900 changes: 7,900 additions & 0 deletions dist/esm/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/esm/options.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { VideomailClientOptions } from "./types/options";
declare const options: VideomailClientOptions;
export default options;
21 changes: 21 additions & 0 deletions dist/esm/resource.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { VideomailClientOptions } from "./types/options";
import Videomail, { PartialVideomail } from "./types/Videomail";
import Response from "superagent/lib/node/response";
import VideomailError from "./util/error/VideomailError";
import { FormInputs } from "./wrappers/form";
declare class Resource {
private readonly options;
private readonly timezoneId;
constructor(options: VideomailClientOptions);
private applyDefaultValue;
private applyDefaultValues;
private get;
private write;
getByAlias(alias: string): Promise<Videomail>;
getByKey(key: string): Promise<Videomail>;
reportError(err: VideomailError): Promise<void>;
post(videomail: PartialVideomail): Promise<Response>;
put(videomail: PartialVideomail): Promise<Response>;
form(formData: FormInputs, url: string): Promise<Response>;
}
export default Resource;
3 changes: 3 additions & 0 deletions dist/esm/types/DeepPartial.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
13 changes: 13 additions & 0 deletions dist/esm/types/RecordingStats.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
interface RecordingStats {
waitingTime?: number | undefined;
avgFps?: number | undefined;
wantedFps?: number;
avgInterval?: number;
wantedInterval?: number;
intervalSum?: number;
framesCount?: number;
videoType?: string;
samplesCount?: number;
sampleRate?: number;
}
export default RecordingStats;
2 changes: 2 additions & 0 deletions dist/esm/types/VideoFormat.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
type VideoFormat = Record<string, number | string | Record<string, string>>;
export default VideoFormat;
4 changes: 4 additions & 0 deletions dist/esm/types/VideoType.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export declare enum VideoType {
WebM = "webm",
MP4 = "mp4"
}
51 changes: 51 additions & 0 deletions dist/esm/types/Videomail.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { DeepPartial } from "./DeepPartial";
import RecordingStats from "./RecordingStats";
import VideoFormat from "./VideoFormat";
interface Videomail {
alias: string;
bcc?: string[] | undefined;
body?: string;
cc?: string[] | undefined;
connection?: Record<string, number | string>;
correctUrl: string;
dateCreated: number;
dateCreatedPretty: string;
dateUpdated: number;
expiresAfter: number;
expiresAfterIso: string;
expiresAfterPretty: string;
format?: VideoFormat;
from: string;
height?: number | undefined;
key: string;
mp4?: string;
vtt?: string;
captions?: string | undefined;
parentKey?: string;
poster: string;
recordingStats?: RecordingStats | undefined;
rejectedBcc?: string[];
rejectedCc?: string[];
rejectedTo?: string[];
accepted?: string[];
replyAllUrl?: string;
replyUrl: string;
sending: boolean;
sent?: boolean;
sentBcc?: string[];
sentCc?: string[];
sentDate?: number;
sentDateIso?: string;
sentDatePretty?: string;
sentTo?: string[];
siteName: string;
siteTitle?: string;
subject?: string;
to?: string[] | undefined;
url: string;
videomailClientVersion: string;
webm?: string;
width?: number | undefined;
}
export type PartialVideomail = DeepPartial<Videomail>;
export default Videomail;
4 changes: 4 additions & 0 deletions dist/esm/types/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export declare const NodeEnvType: {
readonly DEVELOPMENT: "development";
readonly PRODUCTION: "production";
};
32 changes: 32 additions & 0 deletions dist/esm/types/error.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { IBrowser, ICPU, IDevice, IEngine, IOS } from "ua-parser-js";
export interface VideomailErrorData {
cause?: any;
err?: Error | undefined;
explanation?: string | undefined;
logLines?: string[] | undefined;
message: string;
promise?: Promise<any> | undefined;
reason?: any;
siteName?: string | undefined;
title: string;
trace?: string | undefined;
code?: string | undefined;
status?: number | undefined;
stack?: string | undefined;
errType?: string | undefined;
errTarget?: EventTarget | null;
errStringified?: string | undefined;
event?: Event | undefined;
eventStringified?: string | undefined;
}
export interface FullVideomailErrorData extends VideomailErrorData {
browser: IBrowser;
cookie?: string | undefined;
cpu?: ICPU | undefined;
device?: IDevice | undefined;
engine: IEngine;
location: string;
orientation?: string | undefined;
os?: IOS | undefined;
screen: string;
}
91 changes: 91 additions & 0 deletions dist/esm/types/events/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import Response from "superagent/lib/node/response";
import VideomailError from "../../util/error/VideomailError";
import { FormReadyParams } from "../../wrappers/container";
import RecordingStats from "../RecordingStats";
import Videomail from "../Videomail";
export interface UserMediaReadyParams {
switchingFacingMode?: ConstrainDOMString | undefined;
recordWhenReady?: boolean | undefined;
paused?: boolean | undefined;
}
export interface ErrorParams {
exc?: unknown;
err?: VideomailError;
}
export interface RecordingParams {
framesCount: number;
}
export interface StoppingParams {
limitReached?: boolean | undefined;
}
export interface ProgressParams {
frameProgress: string;
sampleProgress?: string | undefined;
}
export interface PreviewParams {
key?: string;
width?: number | undefined;
height?: number | undefined;
hasAudio: boolean;
}
export interface StoppedParams {
recordingStats?: RecordingStats | undefined;
}
export interface SubmittedParams {
videomail: Videomail;
response: Response;
}
export interface ValidatingParams {
targetName?: any;
event?: any;
}
export interface InvalidParams {
whyInvalid?: string;
invalidData?: Record<string, string>;
}
interface VideomailEvents {
ASKING_WEBCAM_PERMISSION: () => void;
BEGIN_AUDIO_ENCODING: () => void;
BEGIN_VIDEO_ENCODING: () => void;
BLOCKING: () => void;
BUILT: () => void;
CONNECTED: () => void;
CONNECTING: () => void;
COUNTDOWN: () => void;
DISABLING_AUDIO: () => void;
DISCONNECTED: () => void;
ENABLING_AUDIO: () => void;
ERROR: (params: ErrorParams) => void;
EVENT_EMITTED: () => void;
FIRST_FRAME_SENT: () => void;
FORM_READY: (params: FormReadyParams) => void;
GOING_BACK: () => void;
HIDE: () => void;
INVALID: (params: InvalidParams) => void;
INVISIBLE: () => void;
LOADED_META_DATA: () => void;
LOADING_USER_MEDIA: () => void;
NOTIFYING: () => void;
PAUSED: () => void;
PREVIEW: (params?: PreviewParams) => void;
PREVIEW_SHOWN: () => void;
PROGRESS: (params: ProgressParams) => void;
RECORDING: (params: RecordingParams) => void;
REPLAY_SHOWN: () => void;
RESETTING: () => void;
RESUMING: () => void;
SENDING_FIRST_FRAME: () => void;
SERVER_READY: () => void;
STARTING_OVER: () => void;
STOPPED: (params: StoppedParams) => void;
STOPPING: (params: StoppingParams) => void;
SUBMITTED: (params: SubmittedParams) => void;
SUBMITTING: () => void;
SWITCH_FACING_MODE: () => void;
UNLOADING: () => void;
USER_MEDIA_READY: (params: UserMediaReadyParams) => void;
VALID: () => void;
VALIDATING: (params?: ValidatingParams) => void;
VISIBLE: () => void;
}
export default VideomailEvents;
Loading

0 comments on commit cdcbfcc

Please sign in to comment.