@innovastudio/contentbox 1.6.65 → 1.6.66

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.6.65",
4
+ "version": "1.6.66",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -52,7 +52,7 @@
52
52
  "ws": "^8.13.0"
53
53
  },
54
54
  "dependencies": {
55
- "@innovastudio/contentbuilder": "^1.5.55",
55
+ "@innovastudio/contentbuilder": "^1.5.56",
56
56
  "js-beautify": "^1.14.0"
57
57
  }
58
58
  }
@@ -103544,7 +103544,7 @@ class Dictation {
103544
103544
  const btnOk = this.modalDisclaimer.querySelector('.input-ok');
103545
103545
  btnOk.addEventListener('click', () => {
103546
103546
  this.builder.util.hideModal(this.modalDisclaimer);
103547
- this.openDictation();
103547
+ this.openDictation_();
103548
103548
  });
103549
103549
  let info = `
103550
103550
  <div style="font-weight:500;margin: 25px 0 7px;">${util.out('Dictation')}</div>
@@ -107018,14 +107018,12 @@ ${answer}
107018
107018
  };
107019
107019
  try {
107020
107020
  /*
107021
- let headers = {
107022
- ...this.builder.headers,
107023
- ...this.builder.defaultHeaders
107024
- };
107025
107021
  const response = await fetch(this.builder.sendCommandUrl, {
107026
107022
  signal: this.signal, // Abort
107027
107023
  method: 'POST',
107028
- headers,
107024
+ headers: {
107025
+ 'Content-Type': 'application/json',
107026
+ },
107029
107027
  body: JSON.stringify(messages),
107030
107028
  });
107031
107029
  const data = await response.json();
@@ -107035,15 +107033,13 @@ ${answer}
107035
107033
  if (this.builder.sendCommand) {
107036
107034
  data = await this.builder.sendCommand(messages);
107037
107035
  } else {
107038
- let headers = {
107039
- ...this.builder.headers,
107040
- ...this.builder.defaultHeaders
107041
- };
107042
107036
  const response = await fetch(this.builder.sendCommandUrl, {
107043
107037
  signal: this.signal,
107044
107038
  // Abort
107045
107039
  method: 'POST',
107046
- headers,
107040
+ headers: {
107041
+ 'Content-Type': 'application/json'
107042
+ },
107047
107043
  body: JSON.stringify(messages)
107048
107044
  });
107049
107045
  data = await response.json();
@@ -107107,13 +107103,11 @@ ${answer}
107107
107103
  if (this.builder.consoleLog) {
107108
107104
  if (!(error + '').includes('Failed to fetch')) {
107109
107105
  // Only if not CORS error
107110
- let headers = {
107111
- ...this.builder.headers,
107112
- ...this.builder.defaultHeaders
107113
- };
107114
107106
  const response = await fetch(this.builder.sendCommandUrl, {
107115
107107
  method: 'POST',
107116
- headers,
107108
+ headers: {
107109
+ 'Content-Type': 'application/json'
107110
+ },
107117
107111
  body: JSON.stringify(messages)
107118
107112
  });
107119
107113
  const data = await response.text();