@sequent-org/moodboard 1.4.44 → 1.4.45
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 +1 -1
- package/src/ui/chat/ChatWindow.js +31 -3
- package/src/ui/styles/chat.css +5 -3
package/package.json
CHANGED
|
@@ -504,7 +504,7 @@ export class ChatWindow {
|
|
|
504
504
|
worldY: existing.worldY
|
|
505
505
|
};
|
|
506
506
|
this._reserveAiImageLaneSlotForMessage(message.id, existing.worldX, existing.worldY);
|
|
507
|
-
this._applyPendingOverlayScreenLayout(existing.el, screenLayout, { animate: true, enterDistance });
|
|
507
|
+
this._applyPendingOverlayScreenLayout(existing.el, screenLayout, { animate: true, enterDistance, scale: s });
|
|
508
508
|
return;
|
|
509
509
|
}
|
|
510
510
|
|
|
@@ -514,6 +514,16 @@ export class ChatWindow {
|
|
|
514
514
|
const overlay = document.createElement('div');
|
|
515
515
|
overlay.className = 'moodboard-chat__pending-overlay moodboard-chat__pending-overlay--enter';
|
|
516
516
|
overlay.style.cssText = `left:${layout.left}px;top:${layout.top}px;width:${layout.width}px;height:${layout.height}px`;
|
|
517
|
+
|
|
518
|
+
overlay.style.borderRadius = `${Math.max(2, Math.round(12 * s))}px`;
|
|
519
|
+
|
|
520
|
+
const fontSize = Math.round(20 * s);
|
|
521
|
+
const labelLeft = 12 * Math.min(1, s);
|
|
522
|
+
const labelBottom = 10 * Math.min(1, s);
|
|
523
|
+
overlay.style.setProperty('--moodboard-chat-pending-label-font-size', `${fontSize}px`);
|
|
524
|
+
overlay.style.setProperty('--moodboard-chat-pending-label-left', `${labelLeft}px`);
|
|
525
|
+
overlay.style.setProperty('--moodboard-chat-pending-label-bottom', `${labelBottom}px`);
|
|
526
|
+
|
|
517
527
|
overlay.style.setProperty('--moodboard-chat-board-animation-ms', `${BOARD_IMAGE_REARRANGE_MS}ms`);
|
|
518
528
|
overlay.style.setProperty('--moodboard-chat-pending-enter-x', `${enterDistance}px`);
|
|
519
529
|
|
|
@@ -695,7 +705,7 @@ export class ChatWindow {
|
|
|
695
705
|
record.worldX = layout.worldX;
|
|
696
706
|
record.worldY = layout.worldY;
|
|
697
707
|
this._reserveAiImageLaneSlotForMessage(messageId, layout.worldX, layout.worldY);
|
|
698
|
-
this._applyPendingOverlayScreenLayout(record.el, layout, { animate: true });
|
|
708
|
+
this._applyPendingOverlayScreenLayout(record.el, layout, { animate: true, scale });
|
|
699
709
|
existingOverlaysShifted = true;
|
|
700
710
|
}
|
|
701
711
|
|
|
@@ -777,11 +787,20 @@ export class ChatWindow {
|
|
|
777
787
|
};
|
|
778
788
|
}
|
|
779
789
|
|
|
780
|
-
_applyPendingOverlayScreenLayout(el, layout, { animate = false, enterDistance } = {}) {
|
|
790
|
+
_applyPendingOverlayScreenLayout(el, layout, { animate = false, enterDistance, scale = 1 } = {}) {
|
|
781
791
|
el.style.left = `${layout.left}px`;
|
|
782
792
|
el.style.top = `${layout.top}px`;
|
|
783
793
|
el.style.width = `${layout.width}px`;
|
|
784
794
|
el.style.height = `${layout.height}px`;
|
|
795
|
+
el.style.borderRadius = `${Math.max(2, Math.round(12 * scale))}px`;
|
|
796
|
+
|
|
797
|
+
const fontSize = Math.round(20 * scale);
|
|
798
|
+
const labelLeft = 12 * Math.min(1, scale);
|
|
799
|
+
const labelBottom = 10 * Math.min(1, scale);
|
|
800
|
+
el.style.setProperty('--moodboard-chat-pending-label-font-size', `${fontSize}px`);
|
|
801
|
+
el.style.setProperty('--moodboard-chat-pending-label-left', `${labelLeft}px`);
|
|
802
|
+
el.style.setProperty('--moodboard-chat-pending-label-bottom', `${labelBottom}px`);
|
|
803
|
+
|
|
785
804
|
if (!animate) return;
|
|
786
805
|
|
|
787
806
|
el.style.setProperty('--moodboard-chat-board-animation-ms', `${BOARD_IMAGE_REARRANGE_MS}ms`);
|
|
@@ -821,6 +840,15 @@ export class ChatWindow {
|
|
|
821
840
|
el.style.top = `${Math.round(screenY - hScreen / 2)}px`;
|
|
822
841
|
el.style.width = `${wScreen}px`;
|
|
823
842
|
el.style.height = `${hScreen}px`;
|
|
843
|
+
el.style.borderRadius = `${Math.max(2, Math.round(12 * s))}px`;
|
|
844
|
+
|
|
845
|
+
const fontSize = Math.round(20 * s);
|
|
846
|
+
const labelLeft = 12 * Math.min(1, s);
|
|
847
|
+
const labelBottom = 10 * Math.min(1, s);
|
|
848
|
+
el.style.setProperty('--moodboard-chat-pending-label-font-size', `${fontSize}px`);
|
|
849
|
+
el.style.setProperty('--moodboard-chat-pending-label-left', `${labelLeft}px`);
|
|
850
|
+
el.style.setProperty('--moodboard-chat-pending-label-bottom', `${labelBottom}px`);
|
|
851
|
+
|
|
824
852
|
if (disableTransition) {
|
|
825
853
|
void el.offsetWidth;
|
|
826
854
|
el.style.removeProperty('transition');
|
package/src/ui/styles/chat.css
CHANGED
|
@@ -734,13 +734,15 @@
|
|
|
734
734
|
|
|
735
735
|
.moodboard-chat__pending-image-label {
|
|
736
736
|
position: absolute;
|
|
737
|
-
bottom: 10px;
|
|
738
|
-
left: 12px;
|
|
737
|
+
bottom: var(--moodboard-chat-pending-label-bottom, 10px);
|
|
738
|
+
left: var(--moodboard-chat-pending-label-left, 12px);
|
|
739
739
|
font-family: 'GeistSans', 'GeistSans Fallback', 'Roboto', Arial, sans-serif;
|
|
740
|
-
font-size: 20px;
|
|
740
|
+
font-size: var(--moodboard-chat-pending-label-font-size, 20px);
|
|
741
741
|
font-weight: 400;
|
|
742
742
|
color: #ffffff;
|
|
743
743
|
pointer-events: none;
|
|
744
|
+
white-space: nowrap;
|
|
745
|
+
text-align: left;
|
|
744
746
|
}
|
|
745
747
|
|
|
746
748
|
/* Блок ошибки сервера */
|