wineater-bot 3.0.14 → 3.0.16

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.
@@ -6862,7 +6862,7 @@ const Ra = `
6862
6862
  box-sizing: border-box;
6863
6863
  z-index: 10000;
6864
6864
  max-width: 1200px;
6865
- min-width: 1024;
6865
+ min-width: 1024px;
6866
6866
  min-height: 500px;
6867
6867
  margin: 40px auto;
6868
6868
  }
@@ -7001,6 +7001,11 @@ width: 100%;
7001
7001
  }
7002
7002
 
7003
7003
  /* Карточка рекомендации */
7004
+
7005
+ .bar-widget #wine-placeholder {
7006
+ min-height: 0;
7007
+ }
7008
+
7004
7009
  .wine-recommendation-tile {
7005
7010
  display: flex;
7006
7011
  padding: 16px;
@@ -7014,6 +7019,18 @@ width: 100%;
7014
7019
  cursor: pointer;
7015
7020
  }
7016
7021
 
7022
+ .wine-recommendation-tile img {
7023
+ width: 100%;
7024
+ height: auto;
7025
+ border-radius: 8px;
7026
+ margin-bottom: 8px;
7027
+ }
7028
+
7029
+ .wine-recommendation-tile:hover {
7030
+ transform: scale(1.05);
7031
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
7032
+ }
7033
+
7017
7034
  #loading-indicator {
7018
7035
  position: absolute;
7019
7036
  top: 50%;
@@ -7048,25 +7065,25 @@ width: 100%;
7048
7065
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
7049
7066
  }
7050
7067
 
7068
+ /* Стиль для Somm Selection */
7051
7069
  .somm-selection {
7052
7070
  position: relative;
7053
- border: 2px solid #FFD700; /* Золотая рамка */
7054
- background: linear-gradient(white, #FFF8DC); /* Легкий золотистый фон */
7055
- box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4); /* Золотая тень */
7071
+ border: 2px solid #FFD700;
7072
+ background: linear-gradient(white, #FFF8DC);
7073
+ box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
7056
7074
  }
7057
7075
 
7058
- /* Подпись Somm Selection */
7059
7076
  .somm-selection-badge {
7060
7077
  position: absolute;
7061
7078
  top: -10px;
7062
7079
  left: 10px;
7063
- background: linear-gradient(90deg, #FFD700, #FFB800); /* Градиентная золотая заливка */
7080
+ background: linear-gradient(90deg, #FFD700, #FFB800);
7064
7081
  color: #FFF;
7065
7082
  font-size: 12px;
7066
7083
  font-weight: bold;
7067
7084
  padding: 4px 8px;
7068
7085
  border-radius: 4px;
7069
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Тень для выделения */
7086
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
7070
7087
  }
7071
7088
 
7072
7089
  /* Изображение */
@@ -7079,22 +7096,19 @@ width: 100%;
7079
7096
 
7080
7097
  /* Детали карточки */
7081
7098
  .tile-details {
7082
- font-size: 14px;
7083
- color: #333;
7084
- flex: 1;
7099
+ text-align: left;
7085
7100
  }
7086
7101
 
7087
7102
  .tile-details strong {
7088
- display: block;
7089
- font-size: 18px;
7103
+ font-size: 16px;
7090
7104
  margin-bottom: 4px;
7091
7105
  font-weight: bold;
7092
- color: #1F1F1F;
7106
+ display: block;
7093
7107
  }
7094
7108
 
7095
7109
  .tile-details p {
7110
+ font-size: 14px;
7096
7111
  margin: 4px 0;
7097
- color: #555;
7098
7112
  }
7099
7113
 
7100
7114
  .tile-details a {
@@ -7269,6 +7283,44 @@ width: 100%;
7269
7283
  box-shadow: 0 4px 8px rgba(123, 43, 235, 0.15);
7270
7284
  }
7271
7285
 
7286
+ /* Адаптивность для мобильных устройств */
7287
+ @media screen and (max-width: 768px) {
7288
+ #wine-widget-container {
7289
+ flex-direction: column;
7290
+ padding: 16px;
7291
+ min-width: 100vw;
7292
+ }
7293
+
7294
+ #wine-placeholder {
7295
+ display: flex;
7296
+ gap: 8px;
7297
+ overflow-x: auto;
7298
+ scroll-snap-type: x mandatory;
7299
+ padding: 8px 0;
7300
+ width: 100%;
7301
+ min-width: calc(100vw - 32px);
7302
+ }
7303
+
7304
+ #wine-widget-header p {
7305
+ display: none;
7306
+ }
7307
+
7308
+ .wine-recommendation-tile {
7309
+ width: 200px;
7310
+ text-align: center;
7311
+ }
7312
+
7313
+ .tile-details {
7314
+ text-align: center;
7315
+ }
7316
+
7317
+ .wine-recommendation-tile {
7318
+ flex: 0 0 auto;
7319
+ scroll-snap-align: center;
7320
+ width: 240px;
7321
+ display: block;
7322
+ }
7323
+ }
7272
7324
 
7273
7325
 
7274
7326
  .hidden {
@@ -7671,7 +7723,7 @@ class La {
7671
7723
  e.insertAdjacentHTML("beforeend", n), this.addEventListenersStoreVersion();
7672
7724
  } else {
7673
7725
  const n = `
7674
- <div id="wine-widget-container">
7726
+ <div id="wine-widget-container" class="bar-widget">
7675
7727
  <div id="wine-widget-right">
7676
7728
  ${fn.dishGroups.map((s) => `
7677
7729
  <!-- Обёртка группы -->
@@ -674,7 +674,7 @@ If you're using serverside rendering in your app, make sure that tracker is load
674
674
  box-sizing: border-box;
675
675
  z-index: 10000;
676
676
  max-width: 1200px;
677
- min-width: 1024;
677
+ min-width: 1024px;
678
678
  min-height: 500px;
679
679
  margin: 40px auto;
680
680
  }
@@ -813,6 +813,11 @@ width: 100%;
813
813
  }
814
814
 
815
815
  /* Карточка рекомендации */
816
+
817
+ .bar-widget #wine-placeholder {
818
+ min-height: 0;
819
+ }
820
+
816
821
  .wine-recommendation-tile {
817
822
  display: flex;
818
823
  padding: 16px;
@@ -826,6 +831,18 @@ width: 100%;
826
831
  cursor: pointer;
827
832
  }
828
833
 
834
+ .wine-recommendation-tile img {
835
+ width: 100%;
836
+ height: auto;
837
+ border-radius: 8px;
838
+ margin-bottom: 8px;
839
+ }
840
+
841
+ .wine-recommendation-tile:hover {
842
+ transform: scale(1.05);
843
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
844
+ }
845
+
829
846
  #loading-indicator {
830
847
  position: absolute;
831
848
  top: 50%;
@@ -860,25 +877,25 @@ width: 100%;
860
877
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
861
878
  }
862
879
 
880
+ /* Стиль для Somm Selection */
863
881
  .somm-selection {
864
882
  position: relative;
865
- border: 2px solid #FFD700; /* Золотая рамка */
866
- background: linear-gradient(white, #FFF8DC); /* Легкий золотистый фон */
867
- box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4); /* Золотая тень */
883
+ border: 2px solid #FFD700;
884
+ background: linear-gradient(white, #FFF8DC);
885
+ box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
868
886
  }
869
887
 
870
- /* Подпись Somm Selection */
871
888
  .somm-selection-badge {
872
889
  position: absolute;
873
890
  top: -10px;
874
891
  left: 10px;
875
- background: linear-gradient(90deg, #FFD700, #FFB800); /* Градиентная золотая заливка */
892
+ background: linear-gradient(90deg, #FFD700, #FFB800);
876
893
  color: #FFF;
877
894
  font-size: 12px;
878
895
  font-weight: bold;
879
896
  padding: 4px 8px;
880
897
  border-radius: 4px;
881
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Тень для выделения */
898
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
882
899
  }
883
900
 
884
901
  /* Изображение */
@@ -891,22 +908,19 @@ width: 100%;
891
908
 
892
909
  /* Детали карточки */
893
910
  .tile-details {
894
- font-size: 14px;
895
- color: #333;
896
- flex: 1;
911
+ text-align: left;
897
912
  }
898
913
 
899
914
  .tile-details strong {
900
- display: block;
901
- font-size: 18px;
915
+ font-size: 16px;
902
916
  margin-bottom: 4px;
903
917
  font-weight: bold;
904
- color: #1F1F1F;
918
+ display: block;
905
919
  }
906
920
 
907
921
  .tile-details p {
922
+ font-size: 14px;
908
923
  margin: 4px 0;
909
- color: #555;
910
924
  }
911
925
 
912
926
  .tile-details a {
@@ -1081,6 +1095,44 @@ width: 100%;
1081
1095
  box-shadow: 0 4px 8px rgba(123, 43, 235, 0.15);
1082
1096
  }
1083
1097
 
1098
+ /* Адаптивность для мобильных устройств */
1099
+ @media screen and (max-width: 768px) {
1100
+ #wine-widget-container {
1101
+ flex-direction: column;
1102
+ padding: 16px;
1103
+ min-width: 100vw;
1104
+ }
1105
+
1106
+ #wine-placeholder {
1107
+ display: flex;
1108
+ gap: 8px;
1109
+ overflow-x: auto;
1110
+ scroll-snap-type: x mandatory;
1111
+ padding: 8px 0;
1112
+ width: 100%;
1113
+ min-width: calc(100vw - 32px);
1114
+ }
1115
+
1116
+ #wine-widget-header p {
1117
+ display: none;
1118
+ }
1119
+
1120
+ .wine-recommendation-tile {
1121
+ width: 200px;
1122
+ text-align: center;
1123
+ }
1124
+
1125
+ .tile-details {
1126
+ text-align: center;
1127
+ }
1128
+
1129
+ .wine-recommendation-tile {
1130
+ flex: 0 0 auto;
1131
+ scroll-snap-align: center;
1132
+ width: 240px;
1133
+ display: block;
1134
+ }
1135
+ }
1084
1136
 
1085
1137
 
1086
1138
  .hidden {
@@ -1114,7 +1166,7 @@ width: 100%;
1114
1166
  </div>
1115
1167
  </div>
1116
1168
  `;e.insertAdjacentHTML("beforeend",n),this.addEventListenersStoreVersion()}else{const n=`
1117
- <div id="wine-widget-container">
1169
+ <div id="wine-widget-container" class="bar-widget">
1118
1170
  <div id="wine-widget-right">
1119
1171
  ${kn.dishGroups.map(s=>`
1120
1172
  <!-- Обёртка группы -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wineater-bot",
3
- "version": "3.0.14",
3
+ "version": "3.0.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.js",
@@ -12,7 +12,7 @@ const widgetStyles = `
12
12
  box-sizing: border-box;
13
13
  z-index: 10000;
14
14
  max-width: 1200px;
15
- min-width: 1024;
15
+ min-width: 1024px;
16
16
  min-height: 500px;
17
17
  margin: 40px auto;
18
18
  }
@@ -151,6 +151,11 @@ width: 100%;
151
151
  }
152
152
 
153
153
  /* Карточка рекомендации */
154
+
155
+ .bar-widget #wine-placeholder {
156
+ min-height: 0;
157
+ }
158
+
154
159
  .wine-recommendation-tile {
155
160
  display: flex;
156
161
  padding: 16px;
@@ -164,6 +169,18 @@ width: 100%;
164
169
  cursor: pointer;
165
170
  }
166
171
 
172
+ .wine-recommendation-tile img {
173
+ width: 100%;
174
+ height: auto;
175
+ border-radius: 8px;
176
+ margin-bottom: 8px;
177
+ }
178
+
179
+ .wine-recommendation-tile:hover {
180
+ transform: scale(1.05);
181
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
182
+ }
183
+
167
184
  #loading-indicator {
168
185
  position: absolute;
169
186
  top: 50%;
@@ -198,25 +215,25 @@ width: 100%;
198
215
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
199
216
  }
200
217
 
218
+ /* Стиль для Somm Selection */
201
219
  .somm-selection {
202
220
  position: relative;
203
- border: 2px solid #FFD700; /* Золотая рамка */
204
- background: linear-gradient(white, #FFF8DC); /* Легкий золотистый фон */
205
- box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4); /* Золотая тень */
221
+ border: 2px solid #FFD700;
222
+ background: linear-gradient(white, #FFF8DC);
223
+ box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
206
224
  }
207
225
 
208
- /* Подпись Somm Selection */
209
226
  .somm-selection-badge {
210
227
  position: absolute;
211
228
  top: -10px;
212
229
  left: 10px;
213
- background: linear-gradient(90deg, #FFD700, #FFB800); /* Градиентная золотая заливка */
230
+ background: linear-gradient(90deg, #FFD700, #FFB800);
214
231
  color: #FFF;
215
232
  font-size: 12px;
216
233
  font-weight: bold;
217
234
  padding: 4px 8px;
218
235
  border-radius: 4px;
219
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Тень для выделения */
236
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
220
237
  }
221
238
 
222
239
  /* Изображение */
@@ -229,22 +246,19 @@ width: 100%;
229
246
 
230
247
  /* Детали карточки */
231
248
  .tile-details {
232
- font-size: 14px;
233
- color: #333;
234
- flex: 1;
249
+ text-align: left;
235
250
  }
236
251
 
237
252
  .tile-details strong {
238
- display: block;
239
- font-size: 18px;
253
+ font-size: 16px;
240
254
  margin-bottom: 4px;
241
255
  font-weight: bold;
242
- color: #1F1F1F;
256
+ display: block;
243
257
  }
244
258
 
245
259
  .tile-details p {
260
+ font-size: 14px;
246
261
  margin: 4px 0;
247
- color: #555;
248
262
  }
249
263
 
250
264
  .tile-details a {
@@ -419,6 +433,44 @@ width: 100%;
419
433
  box-shadow: 0 4px 8px rgba(123, 43, 235, 0.15);
420
434
  }
421
435
 
436
+ /* Адаптивность для мобильных устройств */
437
+ @media screen and (max-width: 768px) {
438
+ #wine-widget-container {
439
+ flex-direction: column;
440
+ padding: 16px;
441
+ min-width: 100vw;
442
+ }
443
+
444
+ #wine-placeholder {
445
+ display: flex;
446
+ gap: 8px;
447
+ overflow-x: auto;
448
+ scroll-snap-type: x mandatory;
449
+ padding: 8px 0;
450
+ width: 100%;
451
+ min-width: calc(100vw - 32px);
452
+ }
453
+
454
+ #wine-widget-header p {
455
+ display: none;
456
+ }
457
+
458
+ .wine-recommendation-tile {
459
+ width: 200px;
460
+ text-align: center;
461
+ }
462
+
463
+ .tile-details {
464
+ text-align: center;
465
+ }
466
+
467
+ .wine-recommendation-tile {
468
+ flex: 0 0 auto;
469
+ scroll-snap-align: center;
470
+ width: 240px;
471
+ display: block;
472
+ }
473
+ }
422
474
 
423
475
 
424
476
  .hidden {
package/src/js/widget.js CHANGED
@@ -71,7 +71,7 @@ export class WineWidget {
71
71
  this.addEventListenersStoreVersion();
72
72
  } else {
73
73
  const barHTML = `
74
- <div id="wine-widget-container">
74
+ <div id="wine-widget-container" class="bar-widget">
75
75
  <div id="wine-widget-right">
76
76
  ${barConfig.dishGroups.map(group => `
77
77
  <!-- Обёртка группы -->
@@ -383,49 +383,49 @@ export class WineWidget {
383
383
  }
384
384
 
385
385
  initializeSearchAnimation() {
386
- const searchInput = document.getElementById('wine-search-input');
387
- const suggestions = translator.translate('placeholderSuggestions');
388
- let index = 0;
389
- let charIndex = 0;
390
- let typingForward = true;
391
- let isInputFocused = false;
392
-
393
- const typeEffect = () => {
394
- if (isInputFocused) return; // Если фокус в поле ввода, эффект останавливается
395
- if (typingForward) {
396
- searchInput.placeholder = suggestions[index].substring(0, charIndex++);
397
- if (charIndex > suggestions[index].length) {
398
- typingForward = false;
399
- setTimeout(typeEffect, 2000); // Пауза после завершения строки
400
- } else {
401
- setTimeout(typeEffect, 100); // Скорость ввода
402
- }
386
+ const searchInput = document.getElementById('wine-search-input');
387
+ const suggestions = translator.translate('placeholderSuggestions');
388
+ let index = 0;
389
+ let charIndex = 0;
390
+ let typingForward = true;
391
+ let isInputFocused = false;
392
+
393
+ const typeEffect = () => {
394
+ if (isInputFocused) return; // Если фокус в поле ввода, эффект останавливается
395
+ if (typingForward) {
396
+ searchInput.placeholder = suggestions[index].substring(0, charIndex++);
397
+ if (charIndex > suggestions[index].length) {
398
+ typingForward = false;
399
+ setTimeout(typeEffect, 2000); // Пауза после завершения строки
403
400
  } else {
404
- searchInput.placeholder = suggestions[index].substring(0, charIndex--);
405
- if (charIndex < 0) {
406
- typingForward = true;
407
- index = (index + 1) % suggestions.length; // Переход к следующей подсказке
408
- setTimeout(typeEffect, 500); // Пауза перед началом следующей строки
409
- } else {
410
- setTimeout(typeEffect, 50); // Скорость удаления
411
- }
401
+ setTimeout(typeEffect, 100); // Скорость ввода
412
402
  }
413
- };
414
-
403
+ } else {
404
+ searchInput.placeholder = suggestions[index].substring(0, charIndex--);
405
+ if (charIndex < 0) {
406
+ typingForward = true;
407
+ index = (index + 1) % suggestions.length; // Переход к следующей подсказке
408
+ setTimeout(typeEffect, 500); // Пауза перед началом следующей строки
409
+ } else {
410
+ setTimeout(typeEffect, 50); // Скорость удаления
411
+ }
412
+ }
413
+ };
414
+
415
+ typeEffect();
416
+
417
+ // Очистка строки и остановка эффекта при фокусе
418
+ searchInput.addEventListener('focus', () => {
419
+ searchInput.placeholder = '';
420
+ isInputFocused = true; // Останавливаем эффект
421
+ });
422
+
423
+ // Возобновление эффекта при потере фокуса
424
+ searchInput.addEventListener('blur', () => {
425
+ isInputFocused = false; // Возобновляем эффект
426
+ charIndex = 0;
427
+ typingForward = true;
415
428
  typeEffect();
416
-
417
- // Очистка строки и остановка эффекта при фокусе
418
- searchInput.addEventListener('focus', () => {
419
- searchInput.placeholder = '';
420
- isInputFocused = true; // Останавливаем эффект
421
- });
422
-
423
- // Возобновление эффекта при потере фокуса
424
- searchInput.addEventListener('blur', () => {
425
- isInputFocused = false; // Возобновляем эффект
426
- charIndex = 0;
427
- typingForward = true;
428
- typeEffect();
429
- });
430
- }
429
+ });
430
+ }
431
431
  }