@digipair/skill-web-chatbot 0.5.10 → 0.5.12

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/index.cjs2.js CHANGED
@@ -51882,14 +51882,14 @@ function indent(str, spaces) {
51882
51882
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
51883
51883
  // match is required
51884
51884
  if (!match) {
51885
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
51885
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
51886
51886
  v: nextMatch1
51887
51887
  };
51888
51888
  }
51889
51889
  var token = match.token, offset = match.offset;
51890
51890
  i1 += offset;
51891
51891
  if (token === " ") {
51892
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
51892
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
51893
51893
  }
51894
51894
  tokens1 = _to_consumable_array$9(tokens1).concat([
51895
51895
  token
@@ -51908,7 +51908,7 @@ function indent(str, spaces) {
51908
51908
  if (contextKeys.some(function(el) {
51909
51909
  return el.startsWith(name);
51910
51910
  })) {
51911
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
51911
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
51912
51912
  }
51913
51913
  if (dateTimeIdentifiers.some(function(el) {
51914
51914
  return el === name;
@@ -51927,9 +51927,9 @@ function indent(str, spaces) {
51927
51927
  if (dateTimeIdentifiers.some(function(el) {
51928
51928
  return el.startsWith(name);
51929
51929
  })) {
51930
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
51930
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
51931
51931
  }
51932
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
51932
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
51933
51933
  v: nextMatch1
51934
51934
  };
51935
51935
  };
@@ -56021,12 +56021,12 @@ class ChatElement extends s$3 {
56021
56021
  });
56022
56022
  }, 1);
56023
56023
  return x`
56024
- <section class="container">
56025
- ${this.messages.map((message)=>x`<section class="${message.role}">
56026
- ${o$1(this.converter.makeHtml(message.role === 'user' ? message.content.replace(/\n/g, ' \n') : message.content.replace(/```markdown([\s\S]*?)```/g, (_, group)=>group)))}
56027
- </section>`)}
56028
- ${((_this_currentBoost1 = this.currentBoost) == null ? void 0 : _this_currentBoost1.name) ? x`<section class="user">${this.currentBoost.name}</section>` : T}
56029
- ${((_this_currentBoost2 = this.currentBoost) == null ? void 0 : _this_currentBoost2.text) ? x`<section class="assistant">${this.currentBoost.text}</section>` : T}
56024
+ <section class="container">
56025
+ ${this.messages.map((message)=>x`<section class="${message.role}">
56026
+ ${o$1(this.converter.makeHtml(message.role === 'user' ? message.content.replace(/\n/g, ' \n') : message.content.replace(/```markdown([\s\S]*?)```/g, (_, group)=>group)))}
56027
+ </section>`)}
56028
+ ${((_this_currentBoost1 = this.currentBoost) == null ? void 0 : _this_currentBoost1.name) ? x`<section class="user">${this.currentBoost.name}</section>` : T}
56029
+ ${((_this_currentBoost2 = this.currentBoost) == null ? void 0 : _this_currentBoost2.text) ? x`<section class="assistant">${this.currentBoost.text}</section>` : T}
56030
56030
  <digipair-chatbot-inputs
56031
56031
  @change=${()=>this.requestUpdate()}
56032
56032
  .inputs=${((_this_currentBoost3 = this.currentBoost) == null ? void 0 : _this_currentBoost3.inputs) || []}
@@ -56120,25 +56120,34 @@ ChatElement.styles = [
56120
56120
  }
56121
56121
 
56122
56122
  .assistant {
56123
- background-color: #dcf8c6; /* Couleur de fond des messages de l'assistant */
56124
- color: #000; /* Couleur du texte des messages de l'assistant */
56123
+ background-color: var(
56124
+ --digipair-color-primary,
56125
+ #52dfdb
56126
+ ); /* Couleur de fond des messages de l'assistant */
56127
+ color: var(
56128
+ --digipair-color-text-primary,
56129
+ #242e3b
56130
+ ); /* Couleur du texte des messages de l'assistant */
56125
56131
  align-self: flex-start;
56126
56132
  margin-right: auto;
56127
56133
  }
56128
56134
 
56129
56135
  .user {
56130
- background-color: rgb(112, 183, 253);
56131
- color: #fff; /* Couleur du texte des messages de l'utilisateur */
56136
+ background-color: var(--digipair-color-secondary, #242e3b);
56137
+ color: var(
56138
+ --digipair-color-text-secondary,
56139
+ #FFFFFF
56140
+ ); /* Couleur du texte des messages de l'utilisateur */
56132
56141
  align-self: flex-end;
56133
56142
  margin-left: auto;
56134
56143
  }
56135
56144
 
56136
56145
  .assistant a {
56137
- color: #000000;
56146
+ color: var(--digipair-color-text-primary, #242e3b);
56138
56147
  }
56139
56148
 
56140
56149
  .user a {
56141
- color: #ffffff;
56150
+ color: var(--digipair-color-text-secondary, #FFFFFF);
56142
56151
  }
56143
56152
 
56144
56153
  .input-container {
@@ -56185,7 +56194,7 @@ ChatElement.styles = [
56185
56194
  bottom: 5px;
56186
56195
  left: 8px;
56187
56196
  right: 40px;
56188
- margin-top: 5px;
56197
+ margin-top: 5px;
56189
56198
  margin-left: 4px;
56190
56199
  margin-bottom: 5px;
56191
56200
  }
@@ -56216,17 +56225,17 @@ ChatElement.styles = [
56216
56225
  p {
56217
56226
  margin: 0;
56218
56227
  }
56219
-
56220
- [name="microphone"] {
56221
- position: absolute;
56222
- right: 10px;
56223
- top: 12px;
56228
+
56229
+ [name='microphone'] {
56230
+ position: absolute;
56231
+ right: 10px;
56232
+ top: 12px;
56224
56233
  }
56225
-
56226
- [name="begin"] {
56234
+
56235
+ [name='begin'] {
56227
56236
  position: absolute;
56228
- right: 10px;
56229
- top: 40px;
56237
+ right: 10px;
56238
+ top: 40px;
56230
56239
  }
56231
56240
  `
56232
56241
  ];
@@ -57961,8 +57970,15 @@ class ChatbotElement extends s$3 {
57961
57970
  return x``;
57962
57971
  }
57963
57972
  return x`
57973
+ <style>
57974
+ --digipair-color-primary: ${this.metadata.primary};
57975
+ --digipair-color-text-primary: ${this.metadata.textPrimary};
57976
+ --digipair-color-secondary: ${this.metadata.secondary};
57977
+ --digipair-color-text-secondary: ${this.metadata.textSecondary};
57978
+ </style>
57979
+
57964
57980
  <section class="container result-${this.resultState}">
57965
- <section class="result" style="border: 1px solid ${this.metadata.color}">
57981
+ <section class="result" style="border: 1px solid var(--digipair-color-primary, #52DFDB)">
57966
57982
  <digipair-chatbot-chat
57967
57983
  ?loading=${this.loading}
57968
57984
  .messages=${this.messages}
@@ -57975,14 +57991,14 @@ class ChatbotElement extends s$3 {
57975
57991
  ${!this.currentBoost ? this.boosters.map((boost)=>x`
57976
57992
  <span
57977
57993
  class="action"
57978
- style="border: 1px solid ${this.metadata.color}"
57994
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
57979
57995
  @click=${()=>this.executeBoost(boost)}
57980
57996
  >${boost.name}</span
57981
57997
  >
57982
57998
  `) : x`
57983
57999
  <span
57984
58000
  class="action"
57985
- style="border: 1px solid ${this.metadata.color}"
58001
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
57986
58002
  @click=${()=>{
57987
58003
  this.currentBoost = null;
57988
58004
  this.boosters = [];
@@ -57992,7 +58008,10 @@ class ChatbotElement extends s$3 {
57992
58008
  `}
57993
58009
  </section>
57994
58010
 
57995
- <section class="panel" style="border: 1px solid ${this.metadata.color}"></section>
58011
+ <section
58012
+ class="panel"
58013
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
58014
+ ></section>
57996
58015
  <img
57997
58016
  @click=${()=>this.resultState !== 'closed' ? this.closeResult() : this.openResult()}
57998
58017
  class="logo ${this.loading ? 'loading' : ''}"
@@ -58387,8 +58406,15 @@ class DigipairFullElement extends s$3 {
58387
58406
  return x``;
58388
58407
  }
58389
58408
  return x`
58409
+ <style>
58410
+ --digipair-color-primary: ${this.metadata.primary};
58411
+ --digipair-color-primary: ${this.metadata.secondary};
58412
+ --digipair-color-text-primary: ${this.metadata.textPrimary};
58413
+ --digipair-color-text-primary: ${this.metadata.textSecondary};
58414
+ </style>
58415
+
58390
58416
  <section class="container">
58391
- <section class="result" style="border: 1px solid ${this.metadata.color}">
58417
+ <section class="result" style="border: 1px solid var(--digipair-color-primary, #52DFDB)">
58392
58418
  <digipair-chatbot-chat
58393
58419
  ?loading=${this.loading}
58394
58420
  .messages=${this.messages}
@@ -58402,7 +58428,7 @@ class DigipairFullElement extends s$3 {
58402
58428
  <div>
58403
58429
  <span
58404
58430
  class="action"
58405
- style="border: 1px solid ${this.metadata.color}"
58431
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
58406
58432
  @click=${()=>this.executeBoost(boost)}
58407
58433
  >${boost.name}</span
58408
58434
  >
@@ -58412,7 +58438,7 @@ class DigipairFullElement extends s$3 {
58412
58438
  <div>
58413
58439
  <span
58414
58440
  class="action"
58415
- style="border: 1px solid ${this.metadata.color}"
58441
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
58416
58442
  @click=${()=>{
58417
58443
  this.currentBoost = null;
58418
58444
  }}
@@ -58422,7 +58448,10 @@ class DigipairFullElement extends s$3 {
58422
58448
  `}
58423
58449
  </section>
58424
58450
 
58425
- <section class="panel" style="border: 1px solid ${this.metadata.color}"></section>
58451
+ <section
58452
+ class="panel"
58453
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
58454
+ ></section>
58426
58455
  <img
58427
58456
  class="logo ${this.loading ? 'loading' : ''}"
58428
58457
  src=${this.metadata.avatar}
package/index.esm2.js CHANGED
@@ -51862,14 +51862,14 @@ function indent(str, spaces) {
51862
51862
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
51863
51863
  // match is required
51864
51864
  if (!match) {
51865
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
51865
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
51866
51866
  v: nextMatch1
51867
51867
  };
51868
51868
  }
51869
51869
  var token = match.token, offset = match.offset;
51870
51870
  i1 += offset;
51871
51871
  if (token === " ") {
51872
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
51872
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
51873
51873
  }
51874
51874
  tokens1 = _to_consumable_array$9(tokens1).concat([
51875
51875
  token
@@ -51888,7 +51888,7 @@ function indent(str, spaces) {
51888
51888
  if (contextKeys.some(function(el) {
51889
51889
  return el.startsWith(name);
51890
51890
  })) {
51891
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
51891
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
51892
51892
  }
51893
51893
  if (dateTimeIdentifiers.some(function(el) {
51894
51894
  return el === name;
@@ -51907,9 +51907,9 @@ function indent(str, spaces) {
51907
51907
  if (dateTimeIdentifiers.some(function(el) {
51908
51908
  return el.startsWith(name);
51909
51909
  })) {
51910
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
51910
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
51911
51911
  }
51912
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
51912
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
51913
51913
  v: nextMatch1
51914
51914
  };
51915
51915
  };
@@ -56001,12 +56001,12 @@ class ChatElement extends s$3 {
56001
56001
  });
56002
56002
  }, 1);
56003
56003
  return x`
56004
- <section class="container">
56005
- ${this.messages.map((message)=>x`<section class="${message.role}">
56006
- ${o$1(this.converter.makeHtml(message.role === 'user' ? message.content.replace(/\n/g, ' \n') : message.content.replace(/```markdown([\s\S]*?)```/g, (_, group)=>group)))}
56007
- </section>`)}
56008
- ${((_this_currentBoost1 = this.currentBoost) == null ? void 0 : _this_currentBoost1.name) ? x`<section class="user">${this.currentBoost.name}</section>` : T}
56009
- ${((_this_currentBoost2 = this.currentBoost) == null ? void 0 : _this_currentBoost2.text) ? x`<section class="assistant">${this.currentBoost.text}</section>` : T}
56004
+ <section class="container">
56005
+ ${this.messages.map((message)=>x`<section class="${message.role}">
56006
+ ${o$1(this.converter.makeHtml(message.role === 'user' ? message.content.replace(/\n/g, ' \n') : message.content.replace(/```markdown([\s\S]*?)```/g, (_, group)=>group)))}
56007
+ </section>`)}
56008
+ ${((_this_currentBoost1 = this.currentBoost) == null ? void 0 : _this_currentBoost1.name) ? x`<section class="user">${this.currentBoost.name}</section>` : T}
56009
+ ${((_this_currentBoost2 = this.currentBoost) == null ? void 0 : _this_currentBoost2.text) ? x`<section class="assistant">${this.currentBoost.text}</section>` : T}
56010
56010
  <digipair-chatbot-inputs
56011
56011
  @change=${()=>this.requestUpdate()}
56012
56012
  .inputs=${((_this_currentBoost3 = this.currentBoost) == null ? void 0 : _this_currentBoost3.inputs) || []}
@@ -56100,25 +56100,34 @@ ChatElement.styles = [
56100
56100
  }
56101
56101
 
56102
56102
  .assistant {
56103
- background-color: #dcf8c6; /* Couleur de fond des messages de l'assistant */
56104
- color: #000; /* Couleur du texte des messages de l'assistant */
56103
+ background-color: var(
56104
+ --digipair-color-primary,
56105
+ #52dfdb
56106
+ ); /* Couleur de fond des messages de l'assistant */
56107
+ color: var(
56108
+ --digipair-color-text-primary,
56109
+ #242e3b
56110
+ ); /* Couleur du texte des messages de l'assistant */
56105
56111
  align-self: flex-start;
56106
56112
  margin-right: auto;
56107
56113
  }
56108
56114
 
56109
56115
  .user {
56110
- background-color: rgb(112, 183, 253);
56111
- color: #fff; /* Couleur du texte des messages de l'utilisateur */
56116
+ background-color: var(--digipair-color-secondary, #242e3b);
56117
+ color: var(
56118
+ --digipair-color-text-secondary,
56119
+ #FFFFFF
56120
+ ); /* Couleur du texte des messages de l'utilisateur */
56112
56121
  align-self: flex-end;
56113
56122
  margin-left: auto;
56114
56123
  }
56115
56124
 
56116
56125
  .assistant a {
56117
- color: #000000;
56126
+ color: var(--digipair-color-text-primary, #242e3b);
56118
56127
  }
56119
56128
 
56120
56129
  .user a {
56121
- color: #ffffff;
56130
+ color: var(--digipair-color-text-secondary, #FFFFFF);
56122
56131
  }
56123
56132
 
56124
56133
  .input-container {
@@ -56165,7 +56174,7 @@ ChatElement.styles = [
56165
56174
  bottom: 5px;
56166
56175
  left: 8px;
56167
56176
  right: 40px;
56168
- margin-top: 5px;
56177
+ margin-top: 5px;
56169
56178
  margin-left: 4px;
56170
56179
  margin-bottom: 5px;
56171
56180
  }
@@ -56196,17 +56205,17 @@ ChatElement.styles = [
56196
56205
  p {
56197
56206
  margin: 0;
56198
56207
  }
56199
-
56200
- [name="microphone"] {
56201
- position: absolute;
56202
- right: 10px;
56203
- top: 12px;
56208
+
56209
+ [name='microphone'] {
56210
+ position: absolute;
56211
+ right: 10px;
56212
+ top: 12px;
56204
56213
  }
56205
-
56206
- [name="begin"] {
56214
+
56215
+ [name='begin'] {
56207
56216
  position: absolute;
56208
- right: 10px;
56209
- top: 40px;
56217
+ right: 10px;
56218
+ top: 40px;
56210
56219
  }
56211
56220
  `
56212
56221
  ];
@@ -57941,8 +57950,15 @@ class ChatbotElement extends s$3 {
57941
57950
  return x``;
57942
57951
  }
57943
57952
  return x`
57953
+ <style>
57954
+ --digipair-color-primary: ${this.metadata.primary};
57955
+ --digipair-color-text-primary: ${this.metadata.textPrimary};
57956
+ --digipair-color-secondary: ${this.metadata.secondary};
57957
+ --digipair-color-text-secondary: ${this.metadata.textSecondary};
57958
+ </style>
57959
+
57944
57960
  <section class="container result-${this.resultState}">
57945
- <section class="result" style="border: 1px solid ${this.metadata.color}">
57961
+ <section class="result" style="border: 1px solid var(--digipair-color-primary, #52DFDB)">
57946
57962
  <digipair-chatbot-chat
57947
57963
  ?loading=${this.loading}
57948
57964
  .messages=${this.messages}
@@ -57955,14 +57971,14 @@ class ChatbotElement extends s$3 {
57955
57971
  ${!this.currentBoost ? this.boosters.map((boost)=>x`
57956
57972
  <span
57957
57973
  class="action"
57958
- style="border: 1px solid ${this.metadata.color}"
57974
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
57959
57975
  @click=${()=>this.executeBoost(boost)}
57960
57976
  >${boost.name}</span
57961
57977
  >
57962
57978
  `) : x`
57963
57979
  <span
57964
57980
  class="action"
57965
- style="border: 1px solid ${this.metadata.color}"
57981
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
57966
57982
  @click=${()=>{
57967
57983
  this.currentBoost = null;
57968
57984
  this.boosters = [];
@@ -57972,7 +57988,10 @@ class ChatbotElement extends s$3 {
57972
57988
  `}
57973
57989
  </section>
57974
57990
 
57975
- <section class="panel" style="border: 1px solid ${this.metadata.color}"></section>
57991
+ <section
57992
+ class="panel"
57993
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
57994
+ ></section>
57976
57995
  <img
57977
57996
  @click=${()=>this.resultState !== 'closed' ? this.closeResult() : this.openResult()}
57978
57997
  class="logo ${this.loading ? 'loading' : ''}"
@@ -58367,8 +58386,15 @@ class DigipairFullElement extends s$3 {
58367
58386
  return x``;
58368
58387
  }
58369
58388
  return x`
58389
+ <style>
58390
+ --digipair-color-primary: ${this.metadata.primary};
58391
+ --digipair-color-primary: ${this.metadata.secondary};
58392
+ --digipair-color-text-primary: ${this.metadata.textPrimary};
58393
+ --digipair-color-text-primary: ${this.metadata.textSecondary};
58394
+ </style>
58395
+
58370
58396
  <section class="container">
58371
- <section class="result" style="border: 1px solid ${this.metadata.color}">
58397
+ <section class="result" style="border: 1px solid var(--digipair-color-primary, #52DFDB)">
58372
58398
  <digipair-chatbot-chat
58373
58399
  ?loading=${this.loading}
58374
58400
  .messages=${this.messages}
@@ -58382,7 +58408,7 @@ class DigipairFullElement extends s$3 {
58382
58408
  <div>
58383
58409
  <span
58384
58410
  class="action"
58385
- style="border: 1px solid ${this.metadata.color}"
58411
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
58386
58412
  @click=${()=>this.executeBoost(boost)}
58387
58413
  >${boost.name}</span
58388
58414
  >
@@ -58392,7 +58418,7 @@ class DigipairFullElement extends s$3 {
58392
58418
  <div>
58393
58419
  <span
58394
58420
  class="action"
58395
- style="border: 1px solid ${this.metadata.color}"
58421
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
58396
58422
  @click=${()=>{
58397
58423
  this.currentBoost = null;
58398
58424
  }}
@@ -58402,7 +58428,10 @@ class DigipairFullElement extends s$3 {
58402
58428
  `}
58403
58429
  </section>
58404
58430
 
58405
- <section class="panel" style="border: 1px solid ${this.metadata.color}"></section>
58431
+ <section
58432
+ class="panel"
58433
+ style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
58434
+ ></section>
58406
58435
  <img
58407
58436
  class="logo ${this.loading ? 'loading' : ''}"
58408
58437
  src=${this.metadata.avatar}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-chatbot",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "dependencies": {},
5
5
  "typings": "./index.d.ts",
6
6
  "main": "./index.cjs.js",