@memori.ai/memori-react 9.0.0-alpha.10 → 9.0.0-alpha.13

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 (108) hide show
  1. package/CHANGELOG.md +270 -0
  2. package/dist/components/Chat/Chat.css +19 -0
  3. package/dist/components/ChatBubble/ChatBubble.js +11 -23
  4. package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
  5. package/dist/components/ChatInputs/ChatInputs.css +77 -3
  6. package/dist/components/ChatTextArea/ChatTextArea.css +5 -25
  7. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.css +7 -2
  8. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/styles.css +31 -15
  9. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +181 -150
  10. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +7 -7
  11. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
  12. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/components/TabSwitch.css +11 -2
  13. package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +1 -0
  14. package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +1 -1
  15. package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
  16. package/dist/components/MemoriWidget/MemoriWidget.js +120 -116
  17. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  18. package/dist/components/MicrophoneButton/MicrophoneButton.css +22 -0
  19. package/dist/components/PoweredBy/PoweredBy.css +1 -8
  20. package/dist/components/StartPanel/StartPanel.js +1 -1
  21. package/dist/components/StartPanel/StartPanel.js.map +1 -1
  22. package/dist/components/layouts/Chat.js +6 -1
  23. package/dist/components/layouts/Chat.js.map +1 -1
  24. package/dist/components/layouts/WebsiteAssistant/website-assistant.css +5 -5
  25. package/dist/components/layouts/chat.css +98 -3
  26. package/dist/components/layouts/fullpage.css +7 -7
  27. package/dist/components/layouts/hidden-chat.css +2 -2
  28. package/dist/components/layouts/zoomed-full-body.css +6 -6
  29. package/dist/helpers/media.js +18 -3
  30. package/dist/helpers/media.js.map +1 -1
  31. package/dist/index.js +16 -16
  32. package/dist/index.js.map +1 -1
  33. package/dist/styles.css +1 -1
  34. package/dist/version.d.ts +1 -1
  35. package/dist/version.js +1 -1
  36. package/esm/components/Chat/Chat.css +19 -0
  37. package/esm/components/ChatBubble/ChatBubble.js +12 -24
  38. package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
  39. package/esm/components/ChatInputs/ChatInputs.css +77 -3
  40. package/esm/components/ChatTextArea/ChatTextArea.css +5 -25
  41. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.css +7 -2
  42. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/styles.css +31 -15
  43. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +181 -150
  44. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +8 -8
  45. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
  46. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/components/TabSwitch.css +11 -2
  47. package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +1 -0
  48. package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +2 -2
  49. package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
  50. package/esm/components/MemoriWidget/MemoriWidget.js +121 -117
  51. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  52. package/esm/components/MicrophoneButton/MicrophoneButton.css +22 -0
  53. package/esm/components/PoweredBy/PoweredBy.css +1 -8
  54. package/esm/components/StartPanel/StartPanel.js +1 -1
  55. package/esm/components/StartPanel/StartPanel.js.map +1 -1
  56. package/esm/components/layouts/Chat.js +6 -1
  57. package/esm/components/layouts/Chat.js.map +1 -1
  58. package/esm/components/layouts/WebsiteAssistant/website-assistant.css +5 -5
  59. package/esm/components/layouts/chat.css +98 -3
  60. package/esm/components/layouts/fullpage.css +7 -7
  61. package/esm/components/layouts/hidden-chat.css +2 -2
  62. package/esm/components/layouts/zoomed-full-body.css +6 -6
  63. package/esm/helpers/media.js +18 -3
  64. package/esm/helpers/media.js.map +1 -1
  65. package/esm/index.js +17 -17
  66. package/esm/index.js.map +1 -1
  67. package/esm/styles.css +1 -1
  68. package/esm/version.d.ts +1 -1
  69. package/esm/version.js +1 -1
  70. package/package.json +2 -2
  71. package/src/__snapshots__/index.test.tsx.snap +0 -50
  72. package/src/components/Chat/Chat.css +19 -0
  73. package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +10 -10
  74. package/src/components/ChatBubble/ChatBubble.test.tsx +25 -1
  75. package/src/components/ChatBubble/ChatBubble.tsx +20 -27
  76. package/src/components/ChatInputs/ChatInputs.css +77 -3
  77. package/src/components/ChatTextArea/ChatTextArea.css +5 -25
  78. package/src/components/MemoriArtifactSystem/ArtifactDrawer.stories.tsx +1 -1
  79. package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.css +7 -2
  80. package/src/components/MemoriArtifactSystem/components/ArtifactActions/styles.css +31 -15
  81. package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +181 -150
  82. package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.tsx +63 -74
  83. package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/components/TabSwitch.css +11 -2
  84. package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +1 -0
  85. package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +2 -2
  86. package/src/components/MemoriWidget/MemoriWidget.tsx +8 -1
  87. package/src/components/MicrophoneButton/MicrophoneButton.css +22 -0
  88. package/src/components/PoweredBy/PoweredBy.css +1 -8
  89. package/src/components/StartPanel/StartPanel.tsx +1 -1
  90. package/src/components/layouts/Chat.tsx +14 -1
  91. package/src/components/layouts/HiddenChat.tsx +1 -1
  92. package/src/components/layouts/WebsiteAssistant/__snapshots__/WebsiteAssistant.test.tsx.snap +10 -0
  93. package/src/components/layouts/WebsiteAssistant/website-assistant.css +5 -5
  94. package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +17 -2
  95. package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +30 -2
  96. package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +10 -0
  97. package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +15 -1
  98. package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +15 -1
  99. package/src/components/layouts/chat.css +98 -3
  100. package/src/components/layouts/fullpage.css +7 -7
  101. package/src/components/layouts/hidden-chat.css +2 -2
  102. package/src/components/layouts/layouts.stories.tsx +8 -8
  103. package/src/components/layouts/zoomed-full-body.css +6 -6
  104. package/src/helpers/media.test.ts +36 -0
  105. package/src/helpers/media.ts +39 -12
  106. package/src/index.tsx +1 -5
  107. package/src/styles.css +18 -5
  108. package/src/version.ts +1 -1
@@ -19,16 +19,41 @@
19
19
 
20
20
  /*
21
21
  * Split-panel width for ArtifactDrawer.
22
- * Must stay in sync with HiddenChat's sidebar shift (`right: 46%`).
22
+ * Must stay in sync with HiddenChat's sidebar shift (`right: 55%`).
23
23
  * @memori.ai/ui Drawer uses `--memori-modal-size-*` (not the legacy
24
24
  * `--memori-drawer--width-*` tokens), and size="md" maps to `--memori-modal-size-md`.
25
25
  */
26
26
  .memori-drawer--right.memori-drawer--size-md.memori-artifact-panel-drawer {
27
- --memori-modal-size-md: 46%;
28
- width: 46%;
27
+ --memori-modal-size-md: 55%;
28
+ width: 55%;
29
29
  max-width: 100vw;
30
30
  }
31
31
 
32
+ @media (max-width: 1260px) {
33
+ .memori-drawer--right.memori-drawer--size-md.memori-artifact-panel-drawer,
34
+ .memori-drawer--right.memori-artifact-panel-drawer-fullscreen {
35
+ --memori-modal-size-md: 100%;
36
+ width: 100% !important;
37
+ max-width: 100% !important;
38
+ height: 100% !important;
39
+ max-height: 100dvh !important;
40
+ border-radius: 0;
41
+ border-left: none;
42
+ box-shadow: none;
43
+ }
44
+
45
+ .memori-artifact-panel-drawer .memori-drawer__body,
46
+ .memori-artifact-panel-drawer-fullscreen .memori-drawer__body {
47
+ display: flex;
48
+ overflow: hidden;
49
+ height: 100%;
50
+ min-height: 0;
51
+ flex: 1 1 auto;
52
+ flex-direction: column;
53
+ padding: 0;
54
+ }
55
+ }
56
+
32
57
  .memori-drawer--right.memori-artifact-panel-drawer-fullscreen {
33
58
  --memori-modal-size-md: 100%;
34
59
  width: 100% !important;
@@ -94,7 +119,7 @@ body:has(.memori-artifact-panel-drawer-fullscreen) .memori-drawer__backdrop,
94
119
  flex-flow: column;
95
120
  align-items: flex-start;
96
121
  justify-content: space-between;
97
- padding-top: 1rem;
122
+ padding: 1rem var(--memori-spacing-md) 0;
98
123
  }
99
124
 
100
125
  .memori-artifact-panel--header-content {
@@ -104,10 +129,8 @@ body:has(.memori-artifact-panel-drawer-fullscreen) .memori-drawer__backdrop,
104
129
 
105
130
  .memori-artifact-panel--title {
106
131
  overflow: hidden;
107
- /* max-width: 90%; */
132
+ max-width: 100%;
108
133
  margin: 0 0 0.75rem;
109
- background: white;
110
- background-clip: text;
111
134
  color: var(--artifact-drawer-text);
112
135
  font-size: var(--memori-text-size-heading-large);
113
136
  font-weight: var(--memori-text-weight-bold);
@@ -201,13 +224,7 @@ body:has(.memori-artifact-panel-drawer-fullscreen) .memori-drawer__backdrop,
201
224
  }
202
225
 
203
226
  .memori-artifact-panel--main::before {
204
- position: absolute;
205
- top: 0;
206
- right: 0;
207
- left: 0;
208
- height: 1px;
209
- background: white;
210
- content: '';
227
+ display: none;
211
228
  }
212
229
 
213
230
  .memori-artifact-drawer--backdrop {
@@ -336,13 +353,6 @@ body:has(.memori-artifact-panel-drawer-fullscreen) .memori-drawer__backdrop,
336
353
  gap: var(--memori-spacing-sm);
337
354
  }
338
355
 
339
- .memori-artifact-panel-drawer-fullscreen > div > div > div {
340
- width: 100% !important;
341
- max-width: 100% !important;
342
- box-shadow: none !important;
343
- transform: translateX(0) !important;
344
- }
345
-
346
356
  .memori-artifact-drawer--header-actions {
347
357
  z-index: 100;
348
358
  display: flex;
@@ -622,6 +632,8 @@ body:has(.memori-artifact-panel-drawer-fullscreen) .memori-drawer__backdrop,
622
632
  flex-flow: row;
623
633
  align-items: center;
624
634
  padding: 0 var(--memori-spacing-md);
635
+ padding-bottom: var(--memori-spacing-sm);
636
+ border-bottom: 1px solid color-mix(in oklch, var(--memori-border-color) 75%, transparent);
625
637
  margin-top: var(--memori-spacing-lg);
626
638
  /* justify-content: space-between; */
627
639
  gap: var(--memori-spacing-sm);
@@ -684,18 +696,26 @@ body:has(.memori-artifact-panel-drawer-fullscreen) .memori-drawer__backdrop,
684
696
  }
685
697
 
686
698
  .memori-artifact-drawer--close-desktop {
687
- width: 48px;
688
- min-width: 48px;
689
- height: 48px;
690
- min-height: 48px;
699
+ width: 38px;
700
+ min-width: 38px;
701
+ height: 38px;
702
+ min-height: 38px;
691
703
  padding: 0;
692
- border: var(--memori-border) solid var(--memori-border-color);
704
+ border: 1px solid color-mix(in srgb, var(--memori-text-color, #111827) 16%, transparent);
693
705
  margin: 0;
694
706
  margin-left: 0 !important;
695
707
  }
696
708
 
697
709
  .memori-artifact-drawer--close-desktop:hover {
698
- color: #fff !important;
710
+ border-color: color-mix(in srgb, var(--memori-text-color, #111827) 16%, transparent);
711
+ background: color-mix(in srgb, var(--memori-text-color, #111827) 8%, transparent);
712
+ color: inherit !important;
713
+ }
714
+
715
+ .memori-artifact-drawer--close-desktop:hover .memori-artifact-panel--close-icon,
716
+ .memori-artifact-drawer--close:hover .memori-artifact-panel--close-icon {
717
+ color: inherit !important;
718
+ stroke: currentColor;
699
719
  }
700
720
 
701
721
  /* Mobile Drawer Panel */
@@ -744,48 +764,108 @@ body:has(.memori-artifact-panel-drawer-fullscreen) .memori-drawer__backdrop,
744
764
  display: none;
745
765
  }
746
766
 
747
- /* Mobile header: full-width bar with tabs on left, actions on right */
767
+ /* Mobile header: full-width toolbar — tabs left, more+close right */
748
768
  .memori-artifact-drawer-top-right {
769
+ display: flex;
770
+ overflow: visible;
749
771
  width: 100%;
772
+ box-sizing: border-box;
773
+ flex-shrink: 0;
774
+ align-items: center;
750
775
  justify-content: space-between;
751
776
  padding: var(--memori-spacing-sm) var(--memori-spacing-md);
752
777
  border-bottom: 1px solid var(--memori-border-color);
753
- margin-bottom: var(--memori-spacing-xs);
778
+ margin: 0;
779
+ background: var(--memori-secondary-background);
780
+ gap: var(--memori-spacing-sm);
781
+ }
782
+
783
+ .memori-artifact-drawer-top-right-actions {
784
+ display: inline-flex;
785
+ flex-shrink: 0;
786
+ align-items: center;
787
+ margin-left: auto;
788
+ gap: var(--memori-spacing-sm);
789
+ }
790
+
791
+ .memori-artifact-drawer-top-right .memori-mobile-actions-menu {
792
+ margin-left: 0;
754
793
  }
755
794
 
756
- /* Make mobile action buttons match the tab switch height */
795
+ /* Tabs.Root from @memori.ai/ui defaults to width:100% — that pushes actions off-screen */
796
+ .memori-artifact-drawer-top-right .memori-tab-switch,
797
+ .memori-artifact-drawer-top-right .memori-tabs {
798
+ width: auto;
799
+ max-width: fit-content;
800
+ flex: 0 0 auto;
801
+ justify-content: flex-start;
802
+ }
803
+
804
+ .memori-artifact-drawer-top-right .memori-tab-switch__tab {
805
+ min-width: 40px;
806
+ flex: 0 0 auto;
807
+ }
808
+
809
+ /* Make mobile action buttons match header toolbar buttons */
757
810
  .memori-artifact-drawer-top-right .memori-button--more-options,
758
811
  .memori-artifact-drawer-top-right .memori-artifact-drawer--close {
759
812
  display: flex;
760
- width: 40px;
761
- min-width: 40px;
762
- height: 40px;
763
- min-height: 40px;
813
+ width: 38px;
814
+ min-width: 38px;
815
+ height: 38px;
816
+ min-height: 38px;
764
817
  align-items: center;
765
818
  justify-content: center;
766
819
  padding: 0;
767
- border: 1px solid var(--memori-border-color);
820
+ border: 1px solid color-mix(in srgb, var(--memori-text-color, #111827) 16%, transparent);
768
821
  border-radius: var(--memori-radius-box);
822
+ margin-left: 0;
769
823
  }
770
824
 
771
- .memori-artifact-drawer-top-right .memori-artifact-drawer--close {
772
- margin-left: 0;
825
+ .memori-artifact-drawer-top-right .memori-button--more-options:hover,
826
+ .memori-artifact-drawer-top-right .memori-artifact-drawer--close:hover {
827
+ border-color: color-mix(in srgb, var(--memori-text-color, #111827) 16%, transparent);
828
+ background: color-mix(in srgb, var(--memori-text-color, #111827) 8%, transparent);
773
829
  }
774
830
 
775
- /* Solid opaque dropdown popover on mobile */
776
- .memori-artifact-drawer-top-right .memori-mobile-dropdown {
777
- z-index: 1100;
778
- border: 1px solid var(--memori-border-color);
779
- backdrop-filter: none;
780
- background: var(--memori-main-background, #fff);
781
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
831
+ /* Content fills remaining viewport under the toolbar (no floating card) */
832
+ .memori-artifact-panel-drawer .memori-artifact-panel--content,
833
+ .memori-artifact-panel-drawer-fullscreen .memori-artifact-panel--content {
834
+ overflow: hidden;
835
+ width: 100%;
836
+ height: auto;
837
+ min-height: 0;
838
+ max-height: none;
839
+ flex: 1 1 auto;
840
+ gap: 0;
841
+ }
842
+
843
+ .memori-artifact-panel-drawer .memori-artifact-panel--main,
844
+ .memori-artifact-panel-drawer-fullscreen .memori-artifact-panel--main {
845
+ overflow: hidden;
846
+ min-height: 0;
847
+ flex: 1 1 auto;
848
+ }
849
+
850
+ .memori-artifact-panel-drawer .memori-artifact-preview,
851
+ .memori-artifact-panel-drawer-fullscreen .memori-artifact-preview,
852
+ .memori-artifact-panel-drawer .memori-artifact-preview-content,
853
+ .memori-artifact-panel-drawer-fullscreen .memori-artifact-preview-content,
854
+ .memori-artifact-panel-drawer .memori-artifact-tab-content--active,
855
+ .memori-artifact-panel-drawer-fullscreen .memori-artifact-tab-content--active,
856
+ .memori-artifact-panel-drawer .memori-artifact-content,
857
+ .memori-artifact-panel-drawer-fullscreen .memori-artifact-content {
858
+ border-radius: 0;
782
859
  }
783
860
 
784
- /* Dropdown icon visibility */
785
- .memori-artifact-drawer-top-right .memori-mobile-dropdown .memori-artifact-action-icon {
786
- width: 18px;
787
- height: 18px;
788
- color: var(--memori-text-color);
861
+ .memori-artifact-panel-drawer .memori-artifact-tab-content--active,
862
+ .memori-artifact-panel-drawer-fullscreen .memori-artifact-tab-content--active {
863
+ padding: 0;
864
+ }
865
+
866
+ .memori-artifact-panel-drawer .memori-artifact-preview-content,
867
+ .memori-artifact-panel-drawer-fullscreen .memori-artifact-preview-content {
868
+ background: transparent;
789
869
  }
790
870
  }
791
871
 
@@ -954,139 +1034,90 @@ body:has(.memori-artifact-panel-drawer-fullscreen) .memori-drawer__backdrop,
954
1034
  z-index: 1001;
955
1035
  display: flex;
956
1036
  align-items: center;
957
- padding: 0rem 1rem;
958
1037
  gap: var(--memori-spacing-sm);
959
1038
  }
960
1039
 
961
- /* Mobile Actions Dropdown */
1040
+ /* Mobile Actions Dropdown — portaled popup (not under .top-right) */
962
1041
  .memori-mobile-actions-menu {
963
1042
  position: relative;
964
1043
  display: inline-block;
965
- margin-left: auto;
966
1044
  }
967
1045
 
968
1046
  .memori-mobile-actions-trigger {
969
1047
  display: inline-block;
970
1048
  }
971
1049
 
1050
+ .memori-dropdown__popup.memori-mobile-dropdown,
972
1051
  .memori-mobile-dropdown {
973
- position: absolute;
974
- z-index: 1000;
975
- top: 100%;
976
- right: 0;
1052
+ z-index: 1100;
977
1053
  min-width: 200px;
978
- border: 1px solid var(--artifact-drawer-border);
979
- border-radius: var(--artifact-drawer-radius);
980
- margin-top: var(--memori-spacing-sm);
981
- backdrop-filter: blur(10px);
982
- background: var(--artifact-drawer-bg);
983
- box-shadow: var(--artifact-drawer-shadow);
984
- }
985
-
986
- /* Mobile-specific dropdown positioning */
987
- @media (max-width: 1260px) {
988
- .memori-artifact-drawer--close {
989
- margin-left: 0;
990
- }
991
-
992
- .memori-artifact-panel--header {
993
- margin-bottom: var(--memori-spacing-sm);
994
- }
995
-
996
- .memori-mobile-dropdown {
997
- right: 0;
998
- left: auto;
999
- min-width: 180px;
1000
- max-width: calc(100vw - 2rem);
1001
- }
1002
-
1003
- .memori-mobile-dropdown-list {
1004
- padding: 0.25rem;
1005
- gap: var(--memori-spacing-xs);
1006
- }
1007
-
1008
- .memori-mobile-dropdown .memori-artifact-action-btn {
1009
- min-height: 44px; /* Ensure touch-friendly size */
1010
- padding: 0.625rem 0.75rem;
1011
- font-size: var(--memori-text-size-small);
1012
- }
1013
-
1014
- .memori-mobile-dropdown .memori-artifact-action-text {
1015
- color: var(--artifact-drawer-text);
1016
- font-size: 0.8125rem;
1017
- font-weight: var(--memori-text-weight-semibold);
1018
- }
1019
-
1020
- .memori-mobile-dropdown .memori-artifact-action-icon {
1021
- width: 16px;
1022
- height: 16px;
1023
- flex-shrink: 0;
1024
- }
1025
- }
1026
-
1027
- .memori-mobile-dropdown-list {
1028
- display: flex;
1029
- flex-direction: column;
1030
- padding: 0.5rem;
1031
- gap: var(--memori-spacing-xs);
1054
+ max-width: min(280px, calc(100vw - 1.5rem));
1055
+ padding: var(--memori-spacing-xs);
1056
+ border: 1px solid var(--memori-border-color);
1057
+ border-radius: var(--memori-radius-box);
1058
+ /* Soft contrast vs canvas — not pure white / not heavy fill */
1059
+ background: color-mix(
1060
+ in srgb,
1061
+ var(--memori-text-color) 6%,
1062
+ var(--memori-secondary-background)
1063
+ ) !important;
1064
+ box-shadow: var(--memori-shadow-lg);
1065
+ color: var(--memori-text-color);
1032
1066
  }
1033
1067
 
1034
- .memori-mobile-dropdown .memori-artifact-action-btn {
1068
+ .memori-mobile-dropdown .memori-artifact-action-btn,
1069
+ .memori-mobile-dropdown .memori-dropdown__item,
1070
+ .memori-dropdown__popup.memori-mobile-dropdown .memori-dropdown__item {
1035
1071
  display: flex;
1036
1072
  width: 100%;
1073
+ min-height: 40px;
1037
1074
  align-items: center;
1038
1075
  justify-content: flex-start;
1039
- padding: var(--memori-spacing-sm) var(--memori-spacing-md);
1076
+ padding: 0.5rem 0.75rem;
1040
1077
  border: 1px solid transparent;
1041
- border-radius: var(--artifact-drawer-radius);
1078
+ border-radius: var(--memori-radius-box);
1042
1079
  background: transparent;
1043
- color: var(--artifact-drawer-text);
1044
- text-align: left;
1045
- transition: all 0.2s ease;
1046
- }
1047
-
1048
- .memori-mobile-dropdown .memori-artifact-action-btn:hover {
1049
- border-color: var(--memori-primary);
1050
- background: var(--memori-primary-subtle);
1051
- color: var(--memori-primary);
1052
- }
1053
-
1054
- .memori-mobile-dropdown .memori-artifact-action-text {
1055
- overflow: visible;
1056
- margin-left: var(--memori-spacing-sm);
1057
- color: inherit;
1080
+ color: var(--memori-text-color);
1058
1081
  font-size: var(--memori-text-size-small);
1059
1082
  font-weight: var(--memori-text-weight-medium);
1060
- white-space: nowrap;
1061
- }
1062
-
1063
- /* Mobile Dropdown Animations */
1064
- .memori-mobile-dropdown-enter {
1065
- transition: all 0.2s ease-out;
1083
+ gap: var(--memori-spacing-sm);
1084
+ text-align: left;
1066
1085
  }
1067
1086
 
1068
- .memori-mobile-dropdown-enter-from {
1069
- opacity: 0;
1070
- transform: translateY(-10px) scale(0.95);
1087
+ .memori-mobile-dropdown .memori-artifact-action-btn:hover,
1088
+ .memori-mobile-dropdown .memori-dropdown__item:hover:not([data-disabled]),
1089
+ .memori-dropdown__popup.memori-mobile-dropdown .memori-dropdown__item:hover:not([data-disabled]),
1090
+ .memori-dropdown__popup.memori-mobile-dropdown .memori-dropdown__item[data-highlighted]:not([data-disabled]) {
1091
+ border-color: transparent;
1092
+ background: color-mix(in srgb, var(--memori-text-color) 10%, transparent) !important;
1093
+ color: var(--memori-text-color);
1071
1094
  }
1072
1095
 
1073
- .memori-mobile-dropdown-enter-to {
1074
- opacity: 1;
1075
- transform: translateY(0) scale(1);
1096
+ .memori-mobile-dropdown .memori-artifact-action-icon,
1097
+ .memori-mobile-dropdown .memori-dropdown__item-icon,
1098
+ .memori-mobile-dropdown .memori-dropdown__item-icon svg {
1099
+ width: 16px;
1100
+ height: 16px;
1101
+ flex-shrink: 0;
1102
+ color: inherit;
1103
+ fill: none !important;
1104
+ stroke: currentColor;
1076
1105
  }
1077
1106
 
1078
- .memori-mobile-dropdown-leave {
1079
- transition: all 0.15s ease-in;
1080
- }
1107
+ @media (max-width: 1260px) {
1108
+ .memori-artifact-drawer--close {
1109
+ margin-left: 0;
1110
+ }
1081
1111
 
1082
- .memori-mobile-dropdown-leave-from {
1083
- opacity: 1;
1084
- transform: translateY(0) scale(1);
1085
- }
1112
+ .memori-artifact-panel--header {
1113
+ margin-bottom: var(--memori-spacing-sm);
1114
+ }
1086
1115
 
1087
- .memori-mobile-dropdown-leave-to {
1088
- opacity: 0;
1089
- transform: translateY(-10px) scale(0.95);
1116
+ .memori-dropdown__popup.memori-mobile-dropdown,
1117
+ .memori-mobile-dropdown {
1118
+ min-width: 180px;
1119
+ max-width: calc(100vw - 1.5rem);
1120
+ }
1090
1121
  }
1091
1122
 
1092
1123
  /* Focus and Accessibility */
@@ -16,6 +16,7 @@ import {
16
16
  Download,
17
17
  Link as LinkIcon,
18
18
  Printer,
19
+ Copy,
19
20
  } from 'lucide-react';
20
21
  import ArtifactActions from '../ArtifactActions/ArtifactActions';
21
22
  import { useArtifact } from '../../context/ArtifactContext';
@@ -152,7 +153,7 @@ const ArtifactDrawer: React.FC<{
152
153
  anchor="right"
153
154
  size="md"
154
155
  className={
155
- state.isFullscreen
156
+ state.isFullscreen || isMobile
156
157
  ? 'memori-artifact-panel-drawer-fullscreen'
157
158
  : 'memori-artifact-panel-drawer'
158
159
  }
@@ -295,43 +296,45 @@ const ArtifactDrawer: React.FC<{
295
296
  hasPreview={hasPreview}
296
297
  />
297
298
  )}
298
- <Dropdown className="memori-mobile-actions-menu">
299
- <Dropdown.Trigger
300
- showChevron={false}
301
- className="memori-mobile-actions-trigger"
302
- render={(
303
- props: React.ButtonHTMLAttributes<HTMLButtonElement>
304
- ) => (
305
- <Button
306
- {...props}
307
- className={cx(
308
- 'memori-button',
309
- 'memori-button--more-options',
310
- 'memori-button--icon-only'
311
- )}
312
- variant="ghost"
313
- title={t('artifact.actions') || 'Actions'}
314
- >
315
- <MoreVertical className="memori-artifact-action-icon" />
316
- </Button>
317
- )}
318
- />
319
- <Dropdown.Menu className="memori-mobile-dropdown">
320
- <div className="memori-mobile-dropdown-list">
321
- <Button
322
- onClick={handleCopy}
323
- disabled={false}
299
+ <div className="memori-artifact-drawer-top-right-actions">
300
+ <Dropdown className="memori-mobile-actions-menu">
301
+ <Dropdown.Trigger
302
+ showChevron={false}
303
+ className="memori-mobile-actions-trigger"
304
+ render={(
305
+ props: React.ButtonHTMLAttributes<HTMLButtonElement>
306
+ ) => (
307
+ <Button
308
+ {...props}
309
+ className={cx(
310
+ 'memori-button',
311
+ 'memori-button--more-options',
312
+ 'memori-button--icon-only'
313
+ )}
314
+ variant="ghost"
315
+ title={t('artifact.actions') || 'Actions'}
316
+ >
317
+ <MoreVertical className="memori-artifact-action-icon" />
318
+ </Button>
319
+ )}
320
+ />
321
+ <Dropdown.Menu
322
+ className="memori-mobile-dropdown"
323
+ placement="bottom"
324
+ align="end"
325
+ sideOffset={8}
326
+ container={surfaceEl ?? undefined}
327
+ >
328
+ <Dropdown.Item
324
329
  className="memori-artifact-action-btn"
325
- variant="ghost"
326
- title={t('artifact.copy') || 'Copy'}
330
+ onClick={handleCopy}
331
+ icon={<Copy className="memori-artifact-action-icon" />}
332
+ label={t('artifact.copy') || 'Copy'}
327
333
  >
328
- <span className="memori-artifact-action-text">
329
- {t('artifact.copy') || 'Copy'}
330
- </span>
331
- </Button>
334
+ {t('artifact.copy') || 'Copy'}
335
+ </Dropdown.Item>
332
336
 
333
337
  {formats.map(format => {
334
- // Get appropriate icon based on action type
335
338
  const getIcon = () => {
336
339
  switch (format.action) {
337
340
  case 'copy':
@@ -355,27 +358,24 @@ const ArtifactDrawer: React.FC<{
355
358
  };
356
359
 
357
360
  return (
358
- <Button
361
+ <Dropdown.Item
359
362
  key={format.id}
363
+ className="memori-artifact-action-btn"
360
364
  onClick={() => handleCopyFormat(format)}
361
365
  disabled={
362
366
  copyState.loading &&
363
367
  copyState.activeFormat === format.id
364
368
  }
365
- className="memori-artifact-action-btn"
366
- variant="ghost"
367
369
  icon={getIcon()}
368
- title={format.label}
370
+ label={format.label}
369
371
  >
370
- <span className="memori-artifact-action-text">
371
- {format.label}
372
- </span>
373
- </Button>
372
+ {format.label}
373
+ </Dropdown.Item>
374
374
  );
375
375
  })}
376
376
 
377
- {/* External open action (not from hook) */}
378
- <Button
377
+ <Dropdown.Item
378
+ className="memori-artifact-action-btn"
379
379
  onClick={() =>
380
380
  handleOpenExternal(
381
381
  state.currentArtifact ?? {
@@ -388,42 +388,31 @@ const ArtifactDrawer: React.FC<{
388
388
  }
389
389
  )
390
390
  }
391
- disabled={false}
392
- className="memori-artifact-action-btn"
393
- variant="ghost"
394
391
  icon={<LinkIcon className="memori-artifact-action-icon" />}
395
- title={t('artifact.external') || 'External'}
392
+ label={t('artifact.external') || 'External'}
396
393
  >
397
- <span className="memori-artifact-action-text">
398
- {t('artifact.external') || 'External'}
399
- </span>
400
- </Button>
401
- </div>
402
- </Dropdown.Menu>
403
- </Dropdown>
394
+ {t('artifact.external') || 'External'}
395
+ </Dropdown.Item>
396
+ </Dropdown.Menu>
397
+ </Dropdown>
398
+ <Button
399
+ onClick={closeArtifact}
400
+ className={cx(
401
+ 'memori-artifact-drawer--close',
402
+ 'memori-button--icon-only'
403
+ )}
404
+ variant="ghost"
405
+ aria-label={t('artifact.close') || 'Close'}
406
+ title={t('artifact.close') || 'Close'}
407
+ icon={
408
+ <X className="memori-artifact-panel--close-icon" aria-hidden />
409
+ }
410
+ />
411
+ </div>
404
412
  </>
405
413
  )}
406
-
407
- {/* Close Button */}
408
- {isMobile && (
409
- <Button
410
- onClick={closeArtifact}
411
- className={cx(
412
- 'memori-artifact-drawer--close',
413
- 'memori-button--icon-only'
414
- )}
415
- variant="ghost"
416
- aria-label={t('artifact.close') || 'Close'}
417
- title={t('artifact.close') || 'Close'}
418
- icon={
419
- <X className="memori-artifact-panel--close-icon" aria-hidden />
420
- }
421
- />
422
- )}
423
414
  </div>
424
415
 
425
- <div className="memori-artifact-panel--header"></div>
426
-
427
416
  {/* Content */}
428
417
  <div className="memori-artifact-panel--content">
429
418
  <div className="memori-artifact-panel--main">
@@ -1,17 +1,26 @@
1
1
  .memori-tab-switch {
2
2
  display: flex;
3
+ width: auto;
3
4
  max-width: fit-content;
5
+ flex: 0 0 auto;
4
6
  align-items: center;
5
- justify-content: center;
7
+ justify-content: flex-start;
6
8
  }
7
9
 
8
10
  .memori-tab-switch__list {
9
11
  display: flex;
12
+ width: auto;
13
+ flex: 0 0 auto;
10
14
  gap: var(--memori-spacing-xs);
11
15
  }
12
16
 
17
+ .memori-tabs[data-memori-variant='segmented'] .memori-tabs__list--horizontal {
18
+ background-color: transparent;
19
+ }
20
+
13
21
  .memori-tab-switch__tab {
14
- min-width: 70px;
22
+ min-width: 40px;
23
+ flex: 0 0 auto;
15
24
  }
16
25
 
17
26
  .memori-tab-switch__icon {