videomail-client 13.4.1 → 13.4.2

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.
@@ -2203,7 +2203,7 @@ var __webpack_modules__ = {
2203
2203
  }
2204
2204
  var util = Object.create(__webpack_require__("./node_modules/core-util-is/lib/util.js"));
2205
2205
  util.inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
2206
- var debugUtil = __webpack_require__("?2927");
2206
+ var debugUtil = __webpack_require__("?c5fd");
2207
2207
  var debug = void 0;
2208
2208
  debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
2209
2209
  var BufferList = __webpack_require__("./node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/BufferList.js");
@@ -3326,7 +3326,7 @@ var __webpack_modules__ = {
3326
3326
  if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
3327
3327
  }
3328
3328
  var Buffer = __webpack_require__("./node_modules/duplexify/node_modules/safe-buffer/index.js").Buffer;
3329
- var util = __webpack_require__("?82dc");
3329
+ var util = __webpack_require__("?6dfc");
3330
3330
  function copyBuffer(src, target, offset) {
3331
3331
  src.copy(target, offset);
3332
3332
  }
@@ -4899,7 +4899,7 @@ var __webpack_modules__ = {
4899
4899
  },
4900
4900
  "./node_modules/global/document.js": function(module, __unused_webpack_exports, __webpack_require__) {
4901
4901
  var topLevel = void 0 !== __webpack_require__.g ? __webpack_require__.g : 'undefined' != typeof window ? window : {};
4902
- var minDoc = __webpack_require__("?7a90");
4902
+ var minDoc = __webpack_require__("?a7ce");
4903
4903
  var doccy;
4904
4904
  if ('undefined' != typeof document) doccy = document;
4905
4905
  else {
@@ -5350,7 +5350,7 @@ var __webpack_modules__ = {
5350
5350
  }
5351
5351
  return $replace.call(str, sepRegex, '$&_');
5352
5352
  }
5353
- var utilInspect = __webpack_require__("?aa23");
5353
+ var utilInspect = __webpack_require__("?3f0e");
5354
5354
  var inspectCustom = utilInspect.custom;
5355
5355
  var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
5356
5356
  var quotes = {
@@ -8470,7 +8470,7 @@ var __webpack_modules__ = {
8470
8470
  }
8471
8471
  var util = Object.create(__webpack_require__("./node_modules/core-util-is/lib/util.js"));
8472
8472
  util.inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
8473
- var debugUtil = __webpack_require__("?5f55");
8473
+ var debugUtil = __webpack_require__("?3152");
8474
8474
  var debug = void 0;
8475
8475
  debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
8476
8476
  var BufferList = __webpack_require__("./node_modules/websocket-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js");
@@ -9593,7 +9593,7 @@ var __webpack_modules__ = {
9593
9593
  if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
9594
9594
  }
9595
9595
  var Buffer = __webpack_require__("./node_modules/websocket-stream/node_modules/safe-buffer/index.js").Buffer;
9596
- var util = __webpack_require__("?9936");
9596
+ var util = __webpack_require__("?3412");
9597
9597
  function copyBuffer(src, target, offset) {
9598
9598
  src.copy(target, offset);
9599
9599
  }
@@ -10193,12 +10193,12 @@ var __webpack_modules__ = {
10193
10193
  }
10194
10194
  }
10195
10195
  },
10196
- "?82dc": function() {},
10197
- "?2927": function() {},
10198
- "?7a90": function() {},
10199
- "?aa23": function() {},
10200
- "?9936": function() {},
10201
- "?5f55": function() {},
10196
+ "?6dfc": function() {},
10197
+ "?c5fd": function() {},
10198
+ "?a7ce": function() {},
10199
+ "?3f0e": function() {},
10200
+ "?3412": function() {},
10201
+ "?3152": function() {},
10202
10202
  "./node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module) {
10203
10203
  "use strict";
10204
10204
  module.exports = function(cssWithMappingToString) {
@@ -10664,7 +10664,7 @@ var __webpack_exports__ = {};
10664
10664
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10665
10665
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10666
10666
  var package_namespaceObject = {
10667
- rE: "13.4.1"
10667
+ rE: "13.4.2"
10668
10668
  };
10669
10669
  var defined = __webpack_require__("./node_modules/defined/index.js");
10670
10670
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -16431,7 +16431,7 @@ var __webpack_exports__ = {};
16431
16431
  unit: "px"
16432
16432
  };
16433
16433
  let width = videoWidth;
16434
- if (width < 1) throw error_createError({
16434
+ if (void 0 !== width && width < 1) throw error_createError({
16435
16435
  message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
16436
16436
  options
16437
16437
  });
@@ -16827,8 +16827,8 @@ var __webpack_exports__ = {};
16827
16827
  }
16828
16828
  createCanvas() {
16829
16829
  const canvas = document.createElement("canvas");
16830
- const dimension = this.getRawWidth(true);
16831
- if (dimension.value) canvas.width = dimension.value;
16830
+ const rawWidthDimension = this.getRawWidth(true);
16831
+ if (rawWidthDimension.value) canvas.width = rawWidthDimension.value;
16832
16832
  const rawHeight = this.getRawHeight(true);
16833
16833
  if (rawHeight) canvas.height = rawHeight;
16834
16834
  return canvas;
@@ -16847,7 +16847,7 @@ var __webpack_exports__ = {};
16847
16847
  }
16848
16848
  getRawWidth(responsive) {
16849
16849
  let rawWidth = this.getVideoWidth();
16850
- const dimension = {
16850
+ const widthDimension = {
16851
16851
  unit: "px"
16852
16852
  };
16853
16853
  if (this.options.video.width || this.options.video.height) if (responsive) {
@@ -16855,11 +16855,11 @@ var __webpack_exports__ = {};
16855
16855
  rawWidth = dimension.value;
16856
16856
  } else rawWidth = this.options.video.width;
16857
16857
  if (responsive) {
16858
- const dimension = this.recorder.limitWidth(rawWidth);
16859
- rawWidth = null == dimension ? void 0 : dimension.value;
16858
+ const widthDimension = this.recorder.limitWidth(rawWidth);
16859
+ rawWidth = null == widthDimension ? void 0 : widthDimension.value;
16860
16860
  }
16861
- dimension.value = rawWidth;
16862
- return dimension;
16861
+ widthDimension.value = rawWidth;
16862
+ return widthDimension;
16863
16863
  }
16864
16864
  getRawHeight(responsive) {
16865
16865
  let rawHeight;
@@ -17863,7 +17863,7 @@ var __webpack_exports__ = {};
17863
17863
  }
17864
17864
  calculateHeight(responsive) {
17865
17865
  let videoWidth;
17866
- let target;
17866
+ let target = "(unknown)";
17867
17867
  if (this.userMedia) {
17868
17868
  target = "userMedia";
17869
17869
  videoWidth = this.userMedia.getVideoWidth();
package/dist/esm/index.js CHANGED
@@ -3606,7 +3606,7 @@ const constants = {
3606
3606
  }
3607
3607
  };
3608
3608
  var package_namespaceObject = {
3609
- rE: "13.4.1"
3609
+ rE: "13.4.2"
3610
3610
  };
3611
3611
  function canPlayType_canPlayType(video, type) {
3612
3612
  const canPlayType = video.canPlayType(`video/${type}`);
@@ -5790,7 +5790,7 @@ function calculateHeight(responsive, videoWidth, options, target, ratio, element
5790
5790
  unit: "px"
5791
5791
  };
5792
5792
  let width = videoWidth;
5793
- if (width < 1) throw error_createError({
5793
+ if (void 0 !== width && width < 1) throw error_createError({
5794
5794
  message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
5795
5795
  options
5796
5796
  });
@@ -6156,8 +6156,8 @@ class UserMedia extends util_Despot {
6156
6156
  }
6157
6157
  createCanvas() {
6158
6158
  const canvas = document.createElement("canvas");
6159
- const dimension = this.getRawWidth(true);
6160
- if (dimension.value) canvas.width = dimension.value;
6159
+ const rawWidthDimension = this.getRawWidth(true);
6160
+ if (rawWidthDimension.value) canvas.width = rawWidthDimension.value;
6161
6161
  const rawHeight = this.getRawHeight(true);
6162
6162
  if (rawHeight) canvas.height = rawHeight;
6163
6163
  return canvas;
@@ -6176,7 +6176,7 @@ class UserMedia extends util_Despot {
6176
6176
  }
6177
6177
  getRawWidth(responsive) {
6178
6178
  let rawWidth = this.getVideoWidth();
6179
- const dimension = {
6179
+ const widthDimension = {
6180
6180
  unit: "px"
6181
6181
  };
6182
6182
  if (this.options.video.width || this.options.video.height) if (responsive) {
@@ -6184,11 +6184,11 @@ class UserMedia extends util_Despot {
6184
6184
  rawWidth = dimension.value;
6185
6185
  } else rawWidth = this.options.video.width;
6186
6186
  if (responsive) {
6187
- const dimension = this.recorder.limitWidth(rawWidth);
6188
- rawWidth = dimension?.value;
6187
+ const widthDimension = this.recorder.limitWidth(rawWidth);
6188
+ rawWidth = widthDimension?.value;
6189
6189
  }
6190
- dimension.value = rawWidth;
6191
- return dimension;
6190
+ widthDimension.value = rawWidth;
6191
+ return widthDimension;
6192
6192
  }
6193
6193
  getRawHeight(responsive) {
6194
6194
  let rawHeight;
@@ -7194,7 +7194,7 @@ class Recorder extends util_Despot {
7194
7194
  }
7195
7195
  calculateHeight(responsive) {
7196
7196
  let videoWidth;
7197
- let target;
7197
+ let target = "(unknown)";
7198
7198
  if (this.userMedia) {
7199
7199
  target = "userMedia";
7200
7200
  videoWidth = this.userMedia.getVideoWidth();
@@ -1,4 +1,4 @@
1
1
  import { Dimension } from "../../../types/dimension";
2
2
  import { VideomailClientOptions } from "../../../types/options";
3
- declare function calculateHeight(responsive: boolean, videoWidth: number, options: VideomailClientOptions, target: string, ratio?: number, element?: HTMLElement | null): Dimension;
3
+ declare function calculateHeight(responsive: boolean, videoWidth: number | undefined, options: VideomailClientOptions, target: string, ratio?: number, element?: HTMLElement | null): Dimension;
4
4
  export default calculateHeight;
package/dist/umd/index.js CHANGED
@@ -2209,7 +2209,7 @@
2209
2209
  }
2210
2210
  var util = Object.create(__webpack_require__("./node_modules/core-util-is/lib/util.js"));
2211
2211
  util.inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
2212
- var debugUtil = __webpack_require__("?2927");
2212
+ var debugUtil = __webpack_require__("?c5fd");
2213
2213
  var debug = void 0;
2214
2214
  debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
2215
2215
  var BufferList = __webpack_require__("./node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/BufferList.js");
@@ -3332,7 +3332,7 @@
3332
3332
  if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
3333
3333
  }
3334
3334
  var Buffer = __webpack_require__("./node_modules/duplexify/node_modules/safe-buffer/index.js").Buffer;
3335
- var util = __webpack_require__("?82dc");
3335
+ var util = __webpack_require__("?6dfc");
3336
3336
  function copyBuffer(src, target, offset) {
3337
3337
  src.copy(target, offset);
3338
3338
  }
@@ -4905,7 +4905,7 @@
4905
4905
  },
4906
4906
  "./node_modules/global/document.js": function(module1, __unused_webpack_exports, __webpack_require__) {
4907
4907
  var topLevel = void 0 !== __webpack_require__.g ? __webpack_require__.g : 'undefined' != typeof window ? window : {};
4908
- var minDoc = __webpack_require__("?7a90");
4908
+ var minDoc = __webpack_require__("?a7ce");
4909
4909
  var doccy;
4910
4910
  if ('undefined' != typeof document) doccy = document;
4911
4911
  else {
@@ -5356,7 +5356,7 @@
5356
5356
  }
5357
5357
  return $replace.call(str, sepRegex, '$&_');
5358
5358
  }
5359
- var utilInspect = __webpack_require__("?aa23");
5359
+ var utilInspect = __webpack_require__("?3f0e");
5360
5360
  var inspectCustom = utilInspect.custom;
5361
5361
  var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
5362
5362
  var quotes = {
@@ -8476,7 +8476,7 @@
8476
8476
  }
8477
8477
  var util = Object.create(__webpack_require__("./node_modules/core-util-is/lib/util.js"));
8478
8478
  util.inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
8479
- var debugUtil = __webpack_require__("?5f55");
8479
+ var debugUtil = __webpack_require__("?3152");
8480
8480
  var debug = void 0;
8481
8481
  debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
8482
8482
  var BufferList = __webpack_require__("./node_modules/websocket-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js");
@@ -9599,7 +9599,7 @@
9599
9599
  if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
9600
9600
  }
9601
9601
  var Buffer = __webpack_require__("./node_modules/websocket-stream/node_modules/safe-buffer/index.js").Buffer;
9602
- var util = __webpack_require__("?9936");
9602
+ var util = __webpack_require__("?3412");
9603
9603
  function copyBuffer(src, target, offset) {
9604
9604
  src.copy(target, offset);
9605
9605
  }
@@ -10199,12 +10199,12 @@
10199
10199
  }
10200
10200
  }
10201
10201
  },
10202
- "?82dc": function() {},
10203
- "?2927": function() {},
10204
- "?7a90": function() {},
10205
- "?aa23": function() {},
10206
- "?9936": function() {},
10207
- "?5f55": function() {},
10202
+ "?6dfc": function() {},
10203
+ "?c5fd": function() {},
10204
+ "?a7ce": function() {},
10205
+ "?3f0e": function() {},
10206
+ "?3412": function() {},
10207
+ "?3152": function() {},
10208
10208
  "./node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module1) {
10209
10209
  "use strict";
10210
10210
  module1.exports = function(cssWithMappingToString) {
@@ -10670,7 +10670,7 @@
10670
10670
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10671
10671
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10672
10672
  var package_namespaceObject = {
10673
- rE: "13.4.1"
10673
+ rE: "13.4.2"
10674
10674
  };
10675
10675
  var defined = __webpack_require__("./node_modules/defined/index.js");
10676
10676
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -16192,7 +16192,7 @@
16192
16192
  unit: "px"
16193
16193
  };
16194
16194
  let width = videoWidth;
16195
- if (width < 1) throw error_createError({
16195
+ if (void 0 !== width && width < 1) throw error_createError({
16196
16196
  message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
16197
16197
  options
16198
16198
  });
@@ -16571,8 +16571,8 @@
16571
16571
  }
16572
16572
  createCanvas() {
16573
16573
  const canvas = document.createElement("canvas");
16574
- const dimension = this.getRawWidth(true);
16575
- if (dimension.value) canvas.width = dimension.value;
16574
+ const rawWidthDimension = this.getRawWidth(true);
16575
+ if (rawWidthDimension.value) canvas.width = rawWidthDimension.value;
16576
16576
  const rawHeight = this.getRawHeight(true);
16577
16577
  if (rawHeight) canvas.height = rawHeight;
16578
16578
  return canvas;
@@ -16591,7 +16591,7 @@
16591
16591
  }
16592
16592
  getRawWidth(responsive) {
16593
16593
  let rawWidth = this.getVideoWidth();
16594
- const dimension = {
16594
+ const widthDimension = {
16595
16595
  unit: "px"
16596
16596
  };
16597
16597
  if (this.options.video.width || this.options.video.height) if (responsive) {
@@ -16599,11 +16599,11 @@
16599
16599
  rawWidth = dimension.value;
16600
16600
  } else rawWidth = this.options.video.width;
16601
16601
  if (responsive) {
16602
- const dimension = this.recorder.limitWidth(rawWidth);
16603
- rawWidth = dimension?.value;
16602
+ const widthDimension = this.recorder.limitWidth(rawWidth);
16603
+ rawWidth = widthDimension?.value;
16604
16604
  }
16605
- dimension.value = rawWidth;
16606
- return dimension;
16605
+ widthDimension.value = rawWidth;
16606
+ return widthDimension;
16607
16607
  }
16608
16608
  getRawHeight(responsive) {
16609
16609
  let rawHeight;
@@ -17609,7 +17609,7 @@
17609
17609
  }
17610
17610
  calculateHeight(responsive) {
17611
17611
  let videoWidth;
17612
- let target;
17612
+ let target = "(unknown)";
17613
17613
  if (this.userMedia) {
17614
17614
  target = "userMedia";
17615
17615
  videoWidth = this.userMedia.getVideoWidth();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "13.4.1",
3
+ "version": "13.4.2",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -79,14 +79,14 @@
79
79
  "@eslint/js": "9.39.1",
80
80
  "@rsbuild/plugin-node-polyfill": "1.4.2",
81
81
  "@rsbuild/plugin-stylus": "1.2.0",
82
- "@rsdoctor/rspack-plugin": "1.3.8",
83
- "@rslib/core": "0.17.1",
84
- "@storybook/addon-a11y": "9.1.16",
85
- "@storybook/addon-docs": "9.1.16",
86
- "@storybook/addon-links": "9.1.16",
87
- "@storybook/html": "9.1.16",
88
- "@tsconfig/node22": "22.0.2",
89
- "@tsconfig/strictest": "2.0.7",
82
+ "@rsdoctor/rspack-plugin": "1.3.9",
83
+ "@rslib/core": "0.17.2",
84
+ "@storybook/addon-a11y": "10.0.7",
85
+ "@storybook/addon-docs": "10.0.7",
86
+ "@storybook/addon-links": "10.0.7",
87
+ "@storybook/html": "10.0.7",
88
+ "@tsconfig/node22": "22.0.3",
89
+ "@tsconfig/strictest": "2.0.8",
90
90
  "@types/defined": "1.0.2",
91
91
  "@types/node": "24.10.1",
92
92
  "@types/superagent": "8.1.9",
@@ -98,29 +98,29 @@
98
98
  "eslint": "9.39.1",
99
99
  "eslint-import-resolver-typescript": "4.4.4",
100
100
  "eslint-plugin-de-morgan": "2.0.0",
101
- "eslint-plugin-depend": "1.3.1",
101
+ "eslint-plugin-depend": "1.4.0",
102
102
  "eslint-plugin-import-x": "4.16.1",
103
- "eslint-plugin-package-json": "0.68.0",
103
+ "eslint-plugin-package-json": "0.79.0",
104
104
  "eslint-plugin-promise": "7.2.1",
105
105
  "eslint-plugin-regexp": "2.10.0",
106
106
  "eslint-plugin-security": "3.0.1",
107
107
  "eslint-plugin-simple-import-sort": "12.1.1",
108
- "eslint-plugin-storybook": "9.1.16",
108
+ "eslint-plugin-storybook": "10.0.7",
109
109
  "globals": "16.5.0",
110
110
  "jsdom": "27.2.0",
111
- "msw": "2.11.6",
111
+ "msw": "2.12.2",
112
112
  "msw-storybook-addon": "2.0.6",
113
113
  "prettier": "3.6.2",
114
114
  "prettier-plugin-curly": "0.4.0",
115
115
  "prettier-plugin-packagejson": "2.5.19",
116
116
  "prettier-plugin-sh": "0.18.0",
117
117
  "release-it": "19.0.6",
118
- "storybook": "9.1.16",
119
- "storybook-html-rsbuild": "2.1.4",
118
+ "storybook": "10.0.7",
119
+ "storybook-html-rsbuild": "2.1.5",
120
120
  "type-fest": "5.2.0",
121
121
  "typescript": "5.9.3",
122
122
  "typescript-eslint": "8.41.0",
123
- "vitest": "4.0.8"
123
+ "vitest": "4.0.9"
124
124
  },
125
125
  "engines": {
126
126
  "node": "^24.11.0",