deep-chat-dev 9.0.161 → 9.0.163

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.
package/dist/deepChat.js CHANGED
@@ -215,10 +215,10 @@ var je = /*#__PURE__*/function () {
215
215
  value:
216
216
  // prettier-ignore
217
217
  function add(e, t, i, n) {
218
- i !== void 0 && e.addEventListener("keydown", je.onKeyDown.bind(this, i)), e.oninput = je.onInput.bind(this, i, n), e.onpaste = function (r) {
218
+ i !== void 0 && e.addEventListener("keydown", je.onKeyDown.bind(this, i)), e.oninput = je.onInput.bind(this, i, n), e.addEventListener("paste", function (r) {
219
219
  var o;
220
220
  r.preventDefault(), (o = r.clipboardData) != null && o.files.length && t.addFilesToAnyType(Array.from(r.clipboardData.files));
221
- };
221
+ });
222
222
  }
223
223
  // preventing insertion early for a nicer UX
224
224
  // prettier-ignore
@@ -254,7 +254,7 @@ var us = /*#__PURE__*/function () {
254
254
  var i, n;
255
255
  e.preventDefault();
256
256
  var t = (i = e.clipboardData) == null ? void 0 : i.getData("text/plain");
257
- (n = document.execCommand) == null || n.call(document, "insertText", !1, t);
257
+ t && ((n = document.execCommand) == null || n.call(document, "insertText", !1, t));
258
258
  }
259
259
  }]);
260
260
  }();
@@ -286,7 +286,7 @@ var Ae = /*#__PURE__*/function () {
286
286
  key: "addEventListeners",
287
287
  value: function addEventListeners(e, t) {
288
288
  var i, n, r;
289
- e.onfocus = this.onFocus.bind(this, (i = t == null ? void 0 : t.styles) == null ? void 0 : i.focus), (n = t == null ? void 0 : t.styles) != null && n.focus && (e.onblur = this.onBlur.bind(this, t.styles.focus, (r = t == null ? void 0 : t.styles) == null ? void 0 : r.container)), e.addEventListener("keydown", this.onKeydown.bind(this)), e.onpaste = us.sanitizePastedTextContent;
289
+ e.onfocus = this.onFocus.bind(this, (i = t == null ? void 0 : t.styles) == null ? void 0 : i.focus), (n = t == null ? void 0 : t.styles) != null && n.focus && (e.onblur = this.onBlur.bind(this, t.styles.focus, (r = t == null ? void 0 : t.styles) == null ? void 0 : r.container)), e.addEventListener("keydown", this.onKeydown.bind(this)), e.addEventListener("paste", us.sanitizePastedTextContent);
290
290
  }
291
291
  }, {
292
292
  key: "onFocus",
@@ -12885,7 +12885,7 @@ var k = /*#__PURE__*/function (_Bt4) {
12885
12885
  key: "submitFromInput",
12886
12886
  value: function () {
12887
12887
  var _submitFromInput = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee117() {
12888
- var t, e, _i22;
12888
+ var e, t;
12889
12889
  return _regeneratorRuntime().wrap(function _callee117$(_context117) {
12890
12890
  while (1) switch (_context117.prev = _context117.next) {
12891
12891
  case 0:
@@ -12897,9 +12897,9 @@ var k = /*#__PURE__*/function (_Bt4) {
12897
12897
  text: "",
12898
12898
  files: e
12899
12899
  });else {
12900
- _i22 = (t = this._inputElementRef.textContent) == null ? void 0 : t.trim();
12900
+ t = this._inputElementRef.innerText.trim();
12901
12901
  this.attemptSubmit({
12902
- text: _i22,
12902
+ text: t,
12903
12903
  files: e
12904
12904
  });
12905
12905
  }
@@ -13182,8 +13182,8 @@ var bn = /*#__PURE__*/function (_ze) {
13182
13182
  var e = atob(this._dataURL.split(",")[1]),
13183
13183
  t = new Array(e.length);
13184
13184
  for (var a = 0; a < e.length; a++) t[a] = e.charCodeAt(a);
13185
- var _i23 = new Uint8Array(t),
13186
- n = new Blob([_i23], {
13185
+ var _i22 = new Uint8Array(t),
13186
+ n = new Blob([_i22], {
13187
13187
  type: this._format
13188
13188
  }),
13189
13189
  r = this._format === "image/jpeg" ? "jpeg" : "png",
@@ -13199,8 +13199,8 @@ var bn = /*#__PURE__*/function (_ze) {
13199
13199
  if (!this._stopped) {
13200
13200
  if (!this._dataURL) {
13201
13201
  t.width = e.videoWidth, t.height = e.videoHeight;
13202
- var _i24 = t.getContext("2d");
13203
- _i24 == null || _i24.drawImage(e, 0, 0, t.width, t.height);
13202
+ var _i23 = t.getContext("2d");
13203
+ _i23 == null || _i23.drawImage(e, 0, 0, t.width, t.height);
13204
13204
  }
13205
13205
  requestAnimationFrame(this.updateCanvas.bind(this, e, t));
13206
13206
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deep-chat-dev",
3
- "version": "9.0.161",
3
+ "version": "9.0.163",
4
4
  "description": "Customizable chat component for AI APIs",
5
5
  "main": "./dist/deepChat.js",
6
6
  "module": "./dist/deepChat.js",