videomail-client 11.4.4 → 11.4.6

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.
@@ -10642,7 +10642,7 @@ var __webpack_exports__ = {};
10642
10642
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10643
10643
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10644
10644
  var package_namespaceObject = {
10645
- rE: "11.4.4"
10645
+ rE: "11.4.6"
10646
10646
  };
10647
10647
  var defined = __webpack_require__("./node_modules/defined/index.js");
10648
10648
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -18033,7 +18033,8 @@ var __webpack_exports__ = {};
18033
18033
  }
18034
18034
  build() {
18035
18035
  let playerOnly = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : false, parentElement = arguments.length > 1 ? arguments[1] : void 0;
18036
- this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElement ? `, parentElement="${util_pretty(parentElement)}"` : ""})`);
18036
+ const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
18037
+ this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElementInfo})`);
18037
18038
  if (parentElement) this.visualsElement = parentElement.querySelector(`.${this.options.selectors.visualsClass}`);
18038
18039
  else this.visualsElement = this.container.querySelector(`.${this.options.selectors.visualsClass}`);
18039
18040
  if (!this.visualsElement) if (playerOnly && parentElement) this.visualsElement = parentElement;
@@ -18131,7 +18132,8 @@ var __webpack_exports__ = {};
18131
18132
  return this.recorder;
18132
18133
  }
18133
18134
  validate() {
18134
- return this.recorder.validate() && this.isReplayShown();
18135
+ if (this.isReplayShown()) return true;
18136
+ return this.recorder.validate();
18135
18137
  }
18136
18138
  getRecordingStats() {
18137
18139
  return this.recorder.getRecordingStats();
@@ -18551,8 +18553,9 @@ var __webpack_exports__ = {};
18551
18553
  event
18552
18554
  });
18553
18555
  else this.emit("VALIDATING");
18554
- const visualsValid = this.visuals.validate() && this.buttons.isRecordAgainButtonEnabled();
18555
18556
  let whyInvalid;
18557
+ const isRecordAgainButtonEnabled = this.buttons.isRecordAgainButtonEnabled();
18558
+ const visualsValid = this.visuals.validate() && isRecordAgainButtonEnabled;
18556
18559
  let invalidData;
18557
18560
  if (this.form) {
18558
18561
  const invalidInput = this.form.getInvalidElement();
@@ -18597,7 +18600,10 @@ var __webpack_exports__ = {};
18597
18600
  }
18598
18601
  if (!valid) whyInvalid = "At least one recipient is required";
18599
18602
  }
18600
- } else valid = visualsValid;
18603
+ } else {
18604
+ valid = visualsValid;
18605
+ whyInvalid = "Because visuals aren't valid";
18606
+ }
18601
18607
  if (valid) this.emit("VALID");
18602
18608
  else if (invalidData) this.emit("INVALID", {
18603
18609
  whyInvalid,
package/dist/esm/index.js CHANGED
@@ -3607,7 +3607,7 @@ const constants = {
3607
3607
  }
3608
3608
  };
3609
3609
  var package_namespaceObject = {
3610
- rE: "11.4.4"
3610
+ rE: "11.4.6"
3611
3611
  };
3612
3612
  const VideoType = {
3613
3613
  WebM: "webm",
@@ -7449,7 +7449,8 @@ class Visuals extends util_Despot {
7449
7449
  return this.recorderInsides.isCountingDown();
7450
7450
  }
7451
7451
  build(playerOnly = false, parentElement) {
7452
- this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElement ? `, parentElement="${util_pretty(parentElement)}"` : ""})`);
7452
+ const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
7453
+ this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElementInfo})`);
7453
7454
  if (parentElement) this.visualsElement = parentElement.querySelector(`.${this.options.selectors.visualsClass}`);
7454
7455
  else this.visualsElement = this.container.querySelector(`.${this.options.selectors.visualsClass}`);
7455
7456
  if (!this.visualsElement) if (playerOnly && parentElement) this.visualsElement = parentElement;
@@ -7544,7 +7545,8 @@ class Visuals extends util_Despot {
7544
7545
  return this.recorder;
7545
7546
  }
7546
7547
  validate() {
7547
- return this.recorder.validate() && this.isReplayShown();
7548
+ if (this.isReplayShown()) return true;
7549
+ return this.recorder.validate();
7548
7550
  }
7549
7551
  getRecordingStats() {
7550
7552
  return this.recorder.getRecordingStats();
@@ -7950,8 +7952,9 @@ class Container extends util_Despot {
7950
7952
  event
7951
7953
  });
7952
7954
  else this.emit("VALIDATING");
7953
- const visualsValid = this.visuals.validate() && this.buttons.isRecordAgainButtonEnabled();
7954
7955
  let whyInvalid;
7956
+ const isRecordAgainButtonEnabled = this.buttons.isRecordAgainButtonEnabled();
7957
+ const visualsValid = this.visuals.validate() && isRecordAgainButtonEnabled;
7955
7958
  let invalidData;
7956
7959
  if (this.form) {
7957
7960
  const invalidInput = this.form.getInvalidElement();
@@ -7996,7 +7999,10 @@ class Container extends util_Despot {
7996
7999
  }
7997
8000
  if (!valid) whyInvalid = "At least one recipient is required";
7998
8001
  }
7999
- } else valid = visualsValid;
8002
+ } else {
8003
+ valid = visualsValid;
8004
+ whyInvalid = "Because visuals aren't valid";
8005
+ }
8000
8006
  if (valid) this.emit("VALID");
8001
8007
  else if (invalidData) this.emit("INVALID", {
8002
8008
  whyInvalid,
@@ -40,7 +40,7 @@ export interface ValidatingParams {
40
40
  event?: any;
41
41
  }
42
42
  export interface InvalidParams {
43
- whyInvalid?: string;
43
+ whyInvalid?: string | undefined;
44
44
  invalidData?: Record<string, string>;
45
45
  }
46
46
  interface VideomailEvents {
package/dist/umd/index.js CHANGED
@@ -10648,7 +10648,7 @@
10648
10648
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10649
10649
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10650
10650
  var package_namespaceObject = {
10651
- rE: "11.4.4"
10651
+ rE: "11.4.6"
10652
10652
  };
10653
10653
  var defined = __webpack_require__("./node_modules/defined/index.js");
10654
10654
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -17817,7 +17817,8 @@
17817
17817
  return this.recorderInsides.isCountingDown();
17818
17818
  }
17819
17819
  build(playerOnly = false, parentElement) {
17820
- this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElement ? `, parentElement="${util_pretty(parentElement)}"` : ""})`);
17820
+ const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
17821
+ this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElementInfo})`);
17821
17822
  if (parentElement) this.visualsElement = parentElement.querySelector(`.${this.options.selectors.visualsClass}`);
17822
17823
  else this.visualsElement = this.container.querySelector(`.${this.options.selectors.visualsClass}`);
17823
17824
  if (!this.visualsElement) if (playerOnly && parentElement) this.visualsElement = parentElement;
@@ -17912,7 +17913,8 @@
17912
17913
  return this.recorder;
17913
17914
  }
17914
17915
  validate() {
17915
- return this.recorder.validate() && this.isReplayShown();
17916
+ if (this.isReplayShown()) return true;
17917
+ return this.recorder.validate();
17916
17918
  }
17917
17919
  getRecordingStats() {
17918
17920
  return this.recorder.getRecordingStats();
@@ -18318,8 +18320,9 @@
18318
18320
  event
18319
18321
  });
18320
18322
  else this.emit("VALIDATING");
18321
- const visualsValid = this.visuals.validate() && this.buttons.isRecordAgainButtonEnabled();
18322
18323
  let whyInvalid;
18324
+ const isRecordAgainButtonEnabled = this.buttons.isRecordAgainButtonEnabled();
18325
+ const visualsValid = this.visuals.validate() && isRecordAgainButtonEnabled;
18323
18326
  let invalidData;
18324
18327
  if (this.form) {
18325
18328
  const invalidInput = this.form.getInvalidElement();
@@ -18364,7 +18367,10 @@
18364
18367
  }
18365
18368
  if (!valid) whyInvalid = "At least one recipient is required";
18366
18369
  }
18367
- } else valid = visualsValid;
18370
+ } else {
18371
+ valid = visualsValid;
18372
+ whyInvalid = "Because visuals aren't valid";
18373
+ }
18368
18374
  if (valid) this.emit("VALID");
18369
18375
  else if (invalidData) this.emit("INVALID", {
18370
18376
  whyInvalid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "11.4.4",
3
+ "version": "11.4.6",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -42,6 +42,7 @@
42
42
  "scripts": {
43
43
  "audit": "npx audit-ci --config audit-ci.json",
44
44
  "build:prod": "cross-env NODE_ENV=production rslib build",
45
+ "build:prod:doc": "cross-env RSDOCTOR=true npm run build:prod",
45
46
  "build:storybook": "storybook build",
46
47
  "chromatic": "npx chromatic --project-token=chpt_742ead9ab882938",
47
48
  "lint": "eslint --color .",
@@ -78,7 +79,7 @@
78
79
  "@eslint/js": "9.36.0",
79
80
  "@rsbuild/plugin-node-polyfill": "1.4.2",
80
81
  "@rsbuild/plugin-stylus": "1.2.0",
81
- "@rsdoctor/rspack-plugin": "1.2.3",
82
+ "@rsdoctor/rspack-plugin": "1.3.1",
82
83
  "@rslib/core": "0.13.2",
83
84
  "@storybook/addon-a11y": "9.1.8",
84
85
  "@storybook/addon-docs": "9.1.8",
@@ -87,16 +88,16 @@
87
88
  "@tsconfig/node22": "22.0.2",
88
89
  "@tsconfig/strictest": "2.0.6",
89
90
  "@types/defined": "1.0.2",
90
- "@types/node": "22.15.30",
91
+ "@types/node": "22.18.6",
91
92
  "@types/superagent": "8.1.9",
92
93
  "@types/ua-parser-js": "0.7.39",
93
94
  "@vitest/eslint-plugin": "1.3.13",
94
95
  "audit-ci": "7.1.0",
95
- "chromatic": "13.2.0",
96
- "cross-env": "10.0.0",
96
+ "chromatic": "13.3.0",
97
+ "cross-env": "10.1.0",
97
98
  "eslint": "9.36.0",
98
99
  "eslint-import-resolver-typescript": "4.4.4",
99
- "eslint-plugin-de-morgan": "1.3.1",
100
+ "eslint-plugin-de-morgan": "2.0.0",
100
101
  "eslint-plugin-depend": "1.3.1",
101
102
  "eslint-plugin-import-x": "4.16.1",
102
103
  "eslint-plugin-package-json": "0.56.3",
@@ -117,13 +118,13 @@
117
118
  "storybook": "9.1.8",
118
119
  "storybook-html-rsbuild": "2.1.1",
119
120
  "type-fest": "5.0.1",
120
- "typescript": "5.9.2",
121
+ "typescript": "5.9.3",
121
122
  "typescript-eslint": "8.41.0",
122
123
  "vitest": "3.2.4"
123
124
  },
124
125
  "engines": {
125
- "node": "^22.16.0",
126
- "npm": "^10.9.2"
126
+ "node": "^22.20.0",
127
+ "npm": "^10.9.3"
127
128
  },
128
129
  "msw": {
129
130
  "workerDirectory": [