@blotoutio/providers-shop-gpt-sdk 1.61.0 → 1.61.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.
Files changed (4) hide show
  1. package/index.cjs.js +58 -30
  2. package/index.js +58 -30
  3. package/index.mjs +58 -30
  4. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -10123,60 +10123,88 @@ if (!customElements.get('feedback-dialog')) {
10123
10123
  customElements.define('feedback-dialog', FeedbackDialog);
10124
10124
  }
10125
10125
 
10126
+ const THINKING_TO_TYPING_DELAY = 4000;
10126
10127
  class TypingIndicator extends i$1 {
10128
+ constructor() {
10129
+ super(...arguments);
10130
+ this.label = 'Thinking';
10131
+ }
10132
+ connectedCallback() {
10133
+ super.connectedCallback();
10134
+ this.label = 'Thinking';
10135
+ this.phaseTimer = setTimeout(() => {
10136
+ this.label = 'Typing';
10137
+ }, THINKING_TO_TYPING_DELAY);
10138
+ }
10139
+ disconnectedCallback() {
10140
+ super.disconnectedCallback();
10141
+ if (this.phaseTimer) {
10142
+ clearTimeout(this.phaseTimer);
10143
+ this.phaseTimer = undefined;
10144
+ }
10145
+ }
10127
10146
  render() {
10128
10147
  return b `
10129
- <div class="typing-dots">
10130
- <div class="dot"></div>
10131
- <div class="dot"></div>
10132
- <div class="dot"></div>
10148
+ <div class="indicator" role="status" aria-live="polite">
10149
+ <span>${this.label}</span><span class="dots"></span>
10133
10150
  </div>
10134
10151
  `;
10135
10152
  }
10136
10153
  }
10137
10154
  TypingIndicator.styles = [
10138
10155
  i$4 `
10139
- .typing-dots {
10140
- display: flex;
10141
- align-items: center;
10142
- justify-content: center;
10143
- gap: 8px;
10144
- }
10145
-
10146
- .dot {
10147
- width: 6px;
10148
- height: 6px;
10149
- background-color: #b6b6b6;
10150
- border-radius: 50%;
10151
- animation: bounce 1.2s infinite ease-in-out;
10156
+ .indicator {
10157
+ display: inline-flex;
10158
+ align-items: baseline;
10159
+ font-size: 14px;
10160
+ font-weight: 500;
10161
+ color: #8b8b8b;
10162
+ animation: pulse 1.5s ease-in-out infinite;
10152
10163
  }
10153
10164
 
10154
- .dot:nth-child(1) {
10155
- animation-delay: 0s;
10165
+ /* Animated ellipsis that keeps the label width stable. */
10166
+ .dots {
10167
+ display: inline-block;
10168
+ width: 1.1em;
10169
+ text-align: left;
10156
10170
  }
10157
10171
 
10158
- .dot:nth-child(2) {
10159
- animation-delay: 0.2s;
10172
+ .dots::after {
10173
+ content: '';
10174
+ animation: ellipsis 1.4s steps(1, end) infinite;
10160
10175
  }
10161
10176
 
10162
- .dot:nth-child(3) {
10163
- animation-delay: 0.4s;
10177
+ @keyframes ellipsis {
10178
+ 0% {
10179
+ content: '';
10180
+ }
10181
+ 25% {
10182
+ content: '.';
10183
+ }
10184
+ 50% {
10185
+ content: '..';
10186
+ }
10187
+ 75%,
10188
+ 100% {
10189
+ content: '...';
10190
+ }
10164
10191
  }
10165
10192
 
10166
- @keyframes bounce {
10193
+ @keyframes pulse {
10167
10194
  0%,
10168
- 80%,
10169
10195
  100% {
10170
- transform: translateY(0);
10171
- background-color: #b6b6b6;
10196
+ opacity: 0.5;
10172
10197
  }
10173
- 40% {
10174
- transform: translateY(-4px);
10175
- background-color: #8b8b8b;
10198
+ 50% {
10199
+ opacity: 1;
10176
10200
  }
10177
10201
  }
10178
10202
  `,
10179
10203
  ];
10204
+ __decorate([
10205
+ r$1(),
10206
+ __metadata("design:type", String)
10207
+ ], TypingIndicator.prototype, "label", void 0);
10180
10208
  if (!customElements.get('typing-indicator')) {
10181
10209
  customElements.define('typing-indicator', TypingIndicator);
10182
10210
  }
package/index.js CHANGED
@@ -10124,60 +10124,88 @@ ${this.comment ? this.comment : A}</textarea
10124
10124
  customElements.define('feedback-dialog', FeedbackDialog);
10125
10125
  }
10126
10126
 
10127
+ const THINKING_TO_TYPING_DELAY = 4000;
10127
10128
  class TypingIndicator extends i$1 {
10129
+ constructor() {
10130
+ super(...arguments);
10131
+ this.label = 'Thinking';
10132
+ }
10133
+ connectedCallback() {
10134
+ super.connectedCallback();
10135
+ this.label = 'Thinking';
10136
+ this.phaseTimer = setTimeout(() => {
10137
+ this.label = 'Typing';
10138
+ }, THINKING_TO_TYPING_DELAY);
10139
+ }
10140
+ disconnectedCallback() {
10141
+ super.disconnectedCallback();
10142
+ if (this.phaseTimer) {
10143
+ clearTimeout(this.phaseTimer);
10144
+ this.phaseTimer = undefined;
10145
+ }
10146
+ }
10128
10147
  render() {
10129
10148
  return b `
10130
- <div class="typing-dots">
10131
- <div class="dot"></div>
10132
- <div class="dot"></div>
10133
- <div class="dot"></div>
10149
+ <div class="indicator" role="status" aria-live="polite">
10150
+ <span>${this.label}</span><span class="dots"></span>
10134
10151
  </div>
10135
10152
  `;
10136
10153
  }
10137
10154
  }
10138
10155
  TypingIndicator.styles = [
10139
10156
  i$4 `
10140
- .typing-dots {
10141
- display: flex;
10142
- align-items: center;
10143
- justify-content: center;
10144
- gap: 8px;
10145
- }
10146
-
10147
- .dot {
10148
- width: 6px;
10149
- height: 6px;
10150
- background-color: #b6b6b6;
10151
- border-radius: 50%;
10152
- animation: bounce 1.2s infinite ease-in-out;
10157
+ .indicator {
10158
+ display: inline-flex;
10159
+ align-items: baseline;
10160
+ font-size: 14px;
10161
+ font-weight: 500;
10162
+ color: #8b8b8b;
10163
+ animation: pulse 1.5s ease-in-out infinite;
10153
10164
  }
10154
10165
 
10155
- .dot:nth-child(1) {
10156
- animation-delay: 0s;
10166
+ /* Animated ellipsis that keeps the label width stable. */
10167
+ .dots {
10168
+ display: inline-block;
10169
+ width: 1.1em;
10170
+ text-align: left;
10157
10171
  }
10158
10172
 
10159
- .dot:nth-child(2) {
10160
- animation-delay: 0.2s;
10173
+ .dots::after {
10174
+ content: '';
10175
+ animation: ellipsis 1.4s steps(1, end) infinite;
10161
10176
  }
10162
10177
 
10163
- .dot:nth-child(3) {
10164
- animation-delay: 0.4s;
10178
+ @keyframes ellipsis {
10179
+ 0% {
10180
+ content: '';
10181
+ }
10182
+ 25% {
10183
+ content: '.';
10184
+ }
10185
+ 50% {
10186
+ content: '..';
10187
+ }
10188
+ 75%,
10189
+ 100% {
10190
+ content: '...';
10191
+ }
10165
10192
  }
10166
10193
 
10167
- @keyframes bounce {
10194
+ @keyframes pulse {
10168
10195
  0%,
10169
- 80%,
10170
10196
  100% {
10171
- transform: translateY(0);
10172
- background-color: #b6b6b6;
10197
+ opacity: 0.5;
10173
10198
  }
10174
- 40% {
10175
- transform: translateY(-4px);
10176
- background-color: #8b8b8b;
10199
+ 50% {
10200
+ opacity: 1;
10177
10201
  }
10178
10202
  }
10179
10203
  `,
10180
10204
  ];
10205
+ __decorate([
10206
+ r$1(),
10207
+ __metadata("design:type", String)
10208
+ ], TypingIndicator.prototype, "label", void 0);
10181
10209
  if (!customElements.get('typing-indicator')) {
10182
10210
  customElements.define('typing-indicator', TypingIndicator);
10183
10211
  }
package/index.mjs CHANGED
@@ -10121,60 +10121,88 @@ if (!customElements.get('feedback-dialog')) {
10121
10121
  customElements.define('feedback-dialog', FeedbackDialog);
10122
10122
  }
10123
10123
 
10124
+ const THINKING_TO_TYPING_DELAY = 4000;
10124
10125
  class TypingIndicator extends i$1 {
10126
+ constructor() {
10127
+ super(...arguments);
10128
+ this.label = 'Thinking';
10129
+ }
10130
+ connectedCallback() {
10131
+ super.connectedCallback();
10132
+ this.label = 'Thinking';
10133
+ this.phaseTimer = setTimeout(() => {
10134
+ this.label = 'Typing';
10135
+ }, THINKING_TO_TYPING_DELAY);
10136
+ }
10137
+ disconnectedCallback() {
10138
+ super.disconnectedCallback();
10139
+ if (this.phaseTimer) {
10140
+ clearTimeout(this.phaseTimer);
10141
+ this.phaseTimer = undefined;
10142
+ }
10143
+ }
10125
10144
  render() {
10126
10145
  return b `
10127
- <div class="typing-dots">
10128
- <div class="dot"></div>
10129
- <div class="dot"></div>
10130
- <div class="dot"></div>
10146
+ <div class="indicator" role="status" aria-live="polite">
10147
+ <span>${this.label}</span><span class="dots"></span>
10131
10148
  </div>
10132
10149
  `;
10133
10150
  }
10134
10151
  }
10135
10152
  TypingIndicator.styles = [
10136
10153
  i$4 `
10137
- .typing-dots {
10138
- display: flex;
10139
- align-items: center;
10140
- justify-content: center;
10141
- gap: 8px;
10142
- }
10143
-
10144
- .dot {
10145
- width: 6px;
10146
- height: 6px;
10147
- background-color: #b6b6b6;
10148
- border-radius: 50%;
10149
- animation: bounce 1.2s infinite ease-in-out;
10154
+ .indicator {
10155
+ display: inline-flex;
10156
+ align-items: baseline;
10157
+ font-size: 14px;
10158
+ font-weight: 500;
10159
+ color: #8b8b8b;
10160
+ animation: pulse 1.5s ease-in-out infinite;
10150
10161
  }
10151
10162
 
10152
- .dot:nth-child(1) {
10153
- animation-delay: 0s;
10163
+ /* Animated ellipsis that keeps the label width stable. */
10164
+ .dots {
10165
+ display: inline-block;
10166
+ width: 1.1em;
10167
+ text-align: left;
10154
10168
  }
10155
10169
 
10156
- .dot:nth-child(2) {
10157
- animation-delay: 0.2s;
10170
+ .dots::after {
10171
+ content: '';
10172
+ animation: ellipsis 1.4s steps(1, end) infinite;
10158
10173
  }
10159
10174
 
10160
- .dot:nth-child(3) {
10161
- animation-delay: 0.4s;
10175
+ @keyframes ellipsis {
10176
+ 0% {
10177
+ content: '';
10178
+ }
10179
+ 25% {
10180
+ content: '.';
10181
+ }
10182
+ 50% {
10183
+ content: '..';
10184
+ }
10185
+ 75%,
10186
+ 100% {
10187
+ content: '...';
10188
+ }
10162
10189
  }
10163
10190
 
10164
- @keyframes bounce {
10191
+ @keyframes pulse {
10165
10192
  0%,
10166
- 80%,
10167
10193
  100% {
10168
- transform: translateY(0);
10169
- background-color: #b6b6b6;
10194
+ opacity: 0.5;
10170
10195
  }
10171
- 40% {
10172
- transform: translateY(-4px);
10173
- background-color: #8b8b8b;
10196
+ 50% {
10197
+ opacity: 1;
10174
10198
  }
10175
10199
  }
10176
10200
  `,
10177
10201
  ];
10202
+ __decorate([
10203
+ r$1(),
10204
+ __metadata("design:type", String)
10205
+ ], TypingIndicator.prototype, "label", void 0);
10178
10206
  if (!customElements.get('typing-indicator')) {
10179
10207
  customElements.define('typing-indicator', TypingIndicator);
10180
10208
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-shop-gpt-sdk",
3
- "version": "1.61.0",
3
+ "version": "1.61.2",
4
4
  "description": "Shop GPT SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",