videomail-client 10.2.3 → 10.2.5

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.
@@ -13597,12 +13597,13 @@ var __webpack_exports__ = {};
13597
13597
  }
13598
13598
  Despot_define_property(Despot, "EMITTER", createNanoEvents());
13599
13599
  const util_Despot = Despot;
13600
- const REGEX = /^[\s,]+|[\s,]+$/gu;
13600
+ const REGEX = /[ ,]+/u;
13601
13601
  function trimEmail(email) {
13602
13602
  return email.replace(REGEX, "");
13603
13603
  }
13604
13604
  function trimEmails(emails) {
13605
- return emails.split(REGEX).map((email)=>trimEmail(email));
13605
+ const uniqueAddresses = emails.split(REGEX).map((item)=>item.trim()).filter(Boolean);
13606
+ return new Set(uniqueAddresses);
13606
13607
  }
13607
13608
  function isNotButton(element) {
13608
13609
  return "BUTTON" !== element.tagName && "submit" !== element.getAttribute("type");
@@ -13870,7 +13871,7 @@ var __webpack_exports__ = {};
13870
13871
  }
13871
13872
  const wrappers_form = Form;
13872
13873
  var package_namespaceObject = {
13873
- i8: "10.2.3"
13874
+ i8: "10.2.5"
13874
13875
  };
13875
13876
  function resource_define_property(obj, key, value) {
13876
13877
  if (key in obj) Object.defineProperty(obj, key, {
@@ -17783,9 +17784,9 @@ var __webpack_exports__ = {};
17783
17784
  const toIsConfigured = "to" in recipients;
17784
17785
  const ccIsConfigured = "cc" in recipients;
17785
17786
  const bccIsConfigured = "bcc" in recipients;
17786
- const hasTo = recipients.to && recipients.to.length > 0;
17787
- const hasCc = recipients.cc && recipients.cc.length > 0;
17788
- const hasBcc = recipients.bcc && recipients.bcc.length > 0;
17787
+ const hasTo = recipients.to && recipients.to.size > 0;
17788
+ const hasCc = recipients.cc && recipients.cc.size > 0;
17789
+ const hasBcc = recipients.bcc && recipients.bcc.size > 0;
17789
17790
  if (toIsConfigured) {
17790
17791
  if (!hasTo) {
17791
17792
  if (ccIsConfigured && bccIsConfigured) {
@@ -1,13 +1,11 @@
1
1
  import VideomailClient from "./client";
2
2
  import { FullVideomailErrorData, VideomailErrorData } from "./types/error";
3
3
  import VideomailEvents from "./types/events";
4
- import { PartialVideomailClientOptions } from "./types/options";
5
4
  import RecordingStats from "./types/RecordingStats";
6
5
  import Videomail from "./types/Videomail";
7
6
  import { VideoType } from "./types/VideoType";
8
7
  export type { Videomail };
9
8
  export type { VideomailEvents };
10
- export type { PartialVideomailClientOptions };
11
9
  export type { RecordingStats };
12
10
  export { VideoType, VideomailClient };
13
11
  export type { VideomailErrorData, FullVideomailErrorData };
package/dist/esm/index.js CHANGED
@@ -3702,12 +3702,13 @@ class Despot_Despot {
3702
3702
  }
3703
3703
  }
3704
3704
  const Despot = Despot_Despot;
3705
- const REGEX = /^[\s,]+|[\s,]+$/gu;
3705
+ const REGEX = /[ ,]+/u;
3706
3706
  function trimEmail(email) {
3707
3707
  return email.replace(REGEX, "");
3708
3708
  }
3709
3709
  function trimEmails(emails) {
3710
- return emails.split(REGEX).map((email)=>trimEmail(email));
3710
+ const uniqueAddresses = emails.split(REGEX).map((item)=>item.trim()).filter(Boolean);
3711
+ return new Set(uniqueAddresses);
3711
3712
  }
3712
3713
  function isNotButton(element) {
3713
3714
  return "BUTTON" !== element.tagName && "submit" !== element.getAttribute("type");
@@ -3966,7 +3967,7 @@ class Form extends Despot {
3966
3967
  }
3967
3968
  const wrappers_form = Form;
3968
3969
  var package_namespaceObject = {
3969
- i8: "10.2.3"
3970
+ i8: "10.2.5"
3970
3971
  };
3971
3972
  function findOriginalExc(exc) {
3972
3973
  if (exc instanceof Error && "response" in exc) {
@@ -7614,9 +7615,9 @@ class Container extends Despot {
7614
7615
  const toIsConfigured = "to" in recipients;
7615
7616
  const ccIsConfigured = "cc" in recipients;
7616
7617
  const bccIsConfigured = "bcc" in recipients;
7617
- const hasTo = recipients.to && recipients.to.length > 0;
7618
- const hasCc = recipients.cc && recipients.cc.length > 0;
7619
- const hasBcc = recipients.bcc && recipients.bcc.length > 0;
7618
+ const hasTo = recipients.to && recipients.to.size > 0;
7619
+ const hasCc = recipients.cc && recipients.cc.size > 0;
7620
+ const hasBcc = recipients.bcc && recipients.bcc.size > 0;
7620
7621
  if (toIsConfigured) {
7621
7622
  if (!hasTo) {
7622
7623
  if (ccIsConfigured && bccIsConfigured) {
@@ -3,9 +3,9 @@ import RecordingStats from "./RecordingStats";
3
3
  import VideoFormat from "./VideoFormat";
4
4
  interface Videomail {
5
5
  alias: string;
6
- bcc?: string[] | undefined;
6
+ bcc?: Set<string> | undefined;
7
7
  body?: string;
8
- cc?: string[] | undefined;
8
+ cc?: Set<string> | undefined;
9
9
  connection?: Record<string, number | string>;
10
10
  correctUrl: string;
11
11
  dateCreated: number;
@@ -24,24 +24,24 @@ interface Videomail {
24
24
  parentKey?: string;
25
25
  poster: string;
26
26
  recordingStats?: RecordingStats | undefined;
27
- rejectedBcc?: string[];
28
- rejectedCc?: string[];
29
- rejectedTo?: string[];
30
- accepted?: string[];
27
+ rejectedBcc?: Set<string>;
28
+ rejectedCc?: Set<string>;
29
+ rejectedTo?: Set<string>;
30
+ accepted?: Set<string>;
31
31
  replyAllUrl?: string;
32
32
  replyUrl: string;
33
33
  sending: boolean;
34
34
  sent?: boolean;
35
- sentBcc?: string[];
36
- sentCc?: string[];
35
+ sentBcc?: Set<string>;
36
+ sentCc?: Set<string>;
37
37
  sentDate?: number;
38
38
  sentDateIso?: string;
39
39
  sentDatePretty?: string;
40
- sentTo?: string[];
40
+ sentTo?: Set<string>;
41
41
  siteName: string;
42
42
  siteTitle?: string;
43
43
  subject?: string;
44
- to?: string[] | undefined;
44
+ to?: Set<string> | undefined;
45
45
  url: string;
46
46
  versions: {
47
47
  ninjaFormPlugin?: string;
@@ -1,3 +1,3 @@
1
1
  declare function trimEmail(email: string): string;
2
- declare function trimEmails(emails: string): string[];
2
+ declare function trimEmails(emails: string): Set<string>;
3
3
  export { trimEmail, trimEmails };
@@ -9,8 +9,8 @@ export declare enum FormMethod {
9
9
  GET = "get"
10
10
  }
11
11
  declare class Form extends Despot {
12
- private container;
13
- private formElement;
12
+ private readonly container;
13
+ private readonly formElement;
14
14
  private keyInput?;
15
15
  private readonly FORM_FIELDS;
16
16
  constructor(container: Container, formElement: HTMLFormElement, options: VideomailClientOptions);
package/dist/umd/index.js CHANGED
@@ -13574,12 +13574,13 @@
13574
13574
  }
13575
13575
  }
13576
13576
  const Despot = Despot_Despot;
13577
- const REGEX = /^[\s,]+|[\s,]+$/gu;
13577
+ const REGEX = /[ ,]+/u;
13578
13578
  function trimEmail(email) {
13579
13579
  return email.replace(REGEX, "");
13580
13580
  }
13581
13581
  function trimEmails(emails) {
13582
- return emails.split(REGEX).map((email)=>trimEmail(email));
13582
+ const uniqueAddresses = emails.split(REGEX).map((item)=>item.trim()).filter(Boolean);
13583
+ return new Set(uniqueAddresses);
13583
13584
  }
13584
13585
  function isNotButton(element) {
13585
13586
  return "BUTTON" !== element.tagName && "submit" !== element.getAttribute("type");
@@ -13838,7 +13839,7 @@
13838
13839
  }
13839
13840
  const wrappers_form = Form;
13840
13841
  var package_namespaceObject = {
13841
- i8: "10.2.3"
13842
+ i8: "10.2.5"
13842
13843
  };
13843
13844
  function findOriginalExc(exc) {
13844
13845
  if (exc instanceof Error && "response" in exc) {
@@ -17564,9 +17565,9 @@
17564
17565
  const toIsConfigured = "to" in recipients;
17565
17566
  const ccIsConfigured = "cc" in recipients;
17566
17567
  const bccIsConfigured = "bcc" in recipients;
17567
- const hasTo = recipients.to && recipients.to.length > 0;
17568
- const hasCc = recipients.cc && recipients.cc.length > 0;
17569
- const hasBcc = recipients.bcc && recipients.bcc.length > 0;
17568
+ const hasTo = recipients.to && recipients.to.size > 0;
17569
+ const hasCc = recipients.cc && recipients.cc.size > 0;
17570
+ const hasBcc = recipients.bcc && recipients.bcc.size > 0;
17570
17571
  if (toIsConfigured) {
17571
17572
  if (!hasTo) {
17572
17573
  if (ccIsConfigured && bccIsConfigured) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "10.2.3",
3
+ "version": "10.2.5",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -78,18 +78,18 @@
78
78
  "@rsbuild/plugin-stylus": "1.0.7",
79
79
  "@rsdoctor/rspack-plugin": "0.4.13",
80
80
  "@rslib/core": "0.4.1",
81
- "@storybook/addon-a11y": "8.5.5",
81
+ "@storybook/addon-a11y": "8.5.6",
82
82
  "@storybook/addon-console": "3.0.0",
83
- "@storybook/addon-essentials": "8.5.5",
84
- "@storybook/addon-interactions": "8.5.5",
85
- "@storybook/addon-links": "8.5.5",
86
- "@storybook/html": "8.5.5",
87
- "@storybook/manager-api": "8.5.5",
88
- "@storybook/theming": "8.5.5",
83
+ "@storybook/addon-essentials": "8.5.6",
84
+ "@storybook/addon-interactions": "8.5.6",
85
+ "@storybook/addon-links": "8.5.6",
86
+ "@storybook/html": "8.5.6",
87
+ "@storybook/manager-api": "8.5.6",
88
+ "@storybook/theming": "8.5.6",
89
89
  "@tsconfig/node22": "22.0.0",
90
90
  "@tsconfig/strictest": "2.0.5",
91
91
  "@types/defined": "1.0.2",
92
- "@types/node": "22.13.2",
92
+ "@types/node": "22.13.4",
93
93
  "@types/superagent": "8.1.9",
94
94
  "@types/ua-parser-js": "0.7.39",
95
95
  "@vitest/eslint-plugin": "1.1.31",
@@ -97,24 +97,24 @@
97
97
  "chromatic": "11.25.2",
98
98
  "cross-env": "7.0.3",
99
99
  "eslint": "9.20.1",
100
- "eslint-import-resolver-typescript": "3.7.0",
100
+ "eslint-import-resolver-typescript": "3.8.0",
101
101
  "eslint-plugin-depend": "0.12.0",
102
102
  "eslint-plugin-import-x": "4.6.1",
103
103
  "eslint-plugin-promise": "7.2.1",
104
104
  "eslint-plugin-regexp": "2.7.0",
105
105
  "eslint-plugin-security": "3.0.1",
106
- "eslint-plugin-storybook": "0.11.2",
106
+ "eslint-plugin-storybook": "0.11.3",
107
107
  "globals": "15.15.0",
108
108
  "jsdom": "26.0.0",
109
109
  "msw": "2.7.0",
110
110
  "msw-storybook-addon": "2.0.4",
111
- "prettier": "3.5.0",
111
+ "prettier": "3.5.1",
112
112
  "prettier-plugin-curly": "0.3.1",
113
113
  "prettier-plugin-packagejson": "2.5.8",
114
114
  "prettier-plugin-sh": "0.14.0",
115
115
  "release-it": "18.1.2",
116
- "storybook": "8.5.5",
117
- "storybook-html-rsbuild": "0.1.9",
116
+ "storybook": "8.5.6",
117
+ "storybook-html-rsbuild": "0.1.10",
118
118
  "type-fest": "4.34.1",
119
119
  "typescript": "5.7.3",
120
120
  "typescript-eslint": "8.24.0",