@memori.ai/memori-react 8.45.6 → 8.46.1

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 (270) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/ChatBubble/ChatBubble.css +94 -9
  3. package/dist/components/ChatInputs/ChatInputs.css +7 -5
  4. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +27 -0
  5. package/dist/components/MemoriWidget/MemoriWidget.js +36 -29
  6. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  7. package/dist/components/layouts/chat.css +11 -1
  8. package/dist/components/layouts/totem.css +2 -0
  9. package/dist/helpers/message.js +45 -1
  10. package/dist/helpers/message.js.map +1 -1
  11. package/dist/styles.css +19 -0
  12. package/dist/version.d.ts +1 -1
  13. package/dist/version.js +1 -1
  14. package/esm/components/ChatBubble/ChatBubble.css +94 -9
  15. package/esm/components/ChatInputs/ChatInputs.css +7 -5
  16. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +27 -0
  17. package/esm/components/MemoriWidget/MemoriWidget.js +36 -29
  18. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  19. package/esm/components/layouts/chat.css +11 -1
  20. package/esm/components/layouts/totem.css +2 -0
  21. package/esm/helpers/message.js +45 -1
  22. package/esm/helpers/message.js.map +1 -1
  23. package/esm/styles.css +19 -0
  24. package/esm/version.d.ts +1 -1
  25. package/esm/version.js +1 -1
  26. package/package.json +2 -2
  27. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.css +0 -78
  28. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +0 -39
  29. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +0 -43
  30. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +0 -1
  31. package/dist/components/ContentPreviewModal/DocumentMarkdown.d.ts +0 -7
  32. package/dist/components/ContentPreviewModal/DocumentMarkdown.js +0 -31
  33. package/dist/components/ContentPreviewModal/DocumentMarkdown.js.map +0 -1
  34. package/dist/components/DrawerFooter/DrawerFooter.css +0 -62
  35. package/dist/components/DrawerFooter/DrawerFooter.d.ts +0 -12
  36. package/dist/components/DrawerFooter/DrawerFooter.js +0 -10
  37. package/dist/components/DrawerFooter/DrawerFooter.js.map +0 -1
  38. package/dist/components/IconButton/IconButton.css +0 -135
  39. package/dist/components/IconButton/IconButton.d.ts +0 -9
  40. package/dist/components/IconButton/IconButton.js +0 -36
  41. package/dist/components/IconButton/IconButton.js.map +0 -1
  42. package/dist/components/LoginModal/LoginModal.css +0 -270
  43. package/dist/components/LoginModal/LoginModal.d.ts +0 -19
  44. package/dist/components/LoginModal/LoginModal.js +0 -355
  45. package/dist/components/LoginModal/LoginModal.js.map +0 -1
  46. package/dist/components/MobileSessionPanel/MobileSessionPanel.css +0 -540
  47. package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +0 -65
  48. package/dist/components/MobileSessionPanel/MobileSessionPanel.js +0 -254
  49. package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +0 -1
  50. package/dist/components/PositionPopover/PositionPopover.css +0 -218
  51. package/dist/components/PositionPopover/PositionPopover.d.ts +0 -22
  52. package/dist/components/PositionPopover/PositionPopover.js +0 -208
  53. package/dist/components/PositionPopover/PositionPopover.js.map +0 -1
  54. package/dist/components/ReasoningBlock/ReasoningBlock.css +0 -156
  55. package/dist/components/ReasoningBlock/ReasoningBlock.d.ts +0 -7
  56. package/dist/components/ReasoningBlock/ReasoningBlock.js +0 -61
  57. package/dist/components/ReasoningBlock/ReasoningBlock.js.map +0 -1
  58. package/dist/components/SideDrawer/SideDrawer.css +0 -112
  59. package/dist/components/SideDrawer/SideDrawer.d.ts +0 -22
  60. package/dist/components/SideDrawer/SideDrawer.js +0 -17
  61. package/dist/components/SideDrawer/SideDrawer.js.map +0 -1
  62. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +0 -4
  63. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +0 -144
  64. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +0 -1
  65. package/dist/components/layouts/WebsiteAssistant/website-assistant.css +0 -889
  66. package/dist/components/layouts/fullpage.css +0 -628
  67. package/dist/helpers/artifactPanel.d.ts +0 -6
  68. package/dist/helpers/artifactPanel.js +0 -42
  69. package/dist/helpers/artifactPanel.js.map +0 -1
  70. package/dist/helpers/chatScroll.d.ts +0 -12
  71. package/dist/helpers/chatScroll.js +0 -14
  72. package/dist/helpers/chatScroll.js.map +0 -1
  73. package/dist/helpers/conversationHistory.d.ts +0 -16
  74. package/dist/helpers/conversationHistory.js +0 -89
  75. package/dist/helpers/conversationHistory.js.map +0 -1
  76. package/dist/helpers/conversationTitle.d.ts +0 -8
  77. package/dist/helpers/conversationTitle.js +0 -27
  78. package/dist/helpers/conversationTitle.js.map +0 -1
  79. package/dist/helpers/enhanceBubbleCodeBlocks.d.ts +0 -5
  80. package/dist/helpers/enhanceBubbleCodeBlocks.js +0 -97
  81. package/dist/helpers/enhanceBubbleCodeBlocks.js.map +0 -1
  82. package/dist/helpers/highlightMatches.d.ts +0 -2
  83. package/dist/helpers/highlightMatches.js +0 -54
  84. package/dist/helpers/highlightMatches.js.map +0 -1
  85. package/dist/helpers/positionPopover.d.ts +0 -3
  86. package/dist/helpers/positionPopover.js +0 -22
  87. package/dist/helpers/positionPopover.js.map +0 -1
  88. package/dist/helpers/prism.d.ts +0 -16
  89. package/dist/helpers/prism.js +0 -78
  90. package/dist/helpers/prism.js.map +0 -1
  91. package/dist/helpers/reasoning.d.ts +0 -7
  92. package/dist/helpers/reasoning.js +0 -43
  93. package/dist/helpers/reasoning.js.map +0 -1
  94. package/dist/helpers/relativeTime.d.ts +0 -3
  95. package/dist/helpers/relativeTime.js +0 -56
  96. package/dist/helpers/relativeTime.js.map +0 -1
  97. package/dist/helpers/sourcesCount.d.ts +0 -2
  98. package/dist/helpers/sourcesCount.js +0 -22
  99. package/dist/helpers/sourcesCount.js.map +0 -1
  100. package/dist/helpers/tts/muteSpeaker.d.ts +0 -13
  101. package/dist/helpers/tts/muteSpeaker.js +0 -26
  102. package/dist/helpers/tts/muteSpeaker.js.map +0 -1
  103. package/dist/helpers/usePressTooltip.d.ts +0 -18
  104. package/dist/helpers/usePressTooltip.js +0 -38
  105. package/dist/helpers/usePressTooltip.js.map +0 -1
  106. package/dist/icons/FacebookIcon.d.ts +0 -3
  107. package/dist/icons/FacebookIcon.js +0 -6
  108. package/dist/icons/FacebookIcon.js.map +0 -1
  109. package/dist/icons/LinkedinIcon.d.ts +0 -3
  110. package/dist/icons/LinkedinIcon.js +0 -6
  111. package/dist/icons/LinkedinIcon.js.map +0 -1
  112. package/dist/icons/MemoriIcon.d.ts +0 -3
  113. package/dist/icons/MemoriIcon.js +0 -8
  114. package/dist/icons/MemoriIcon.js.map +0 -1
  115. package/dist/icons/TelegramIcon.d.ts +0 -3
  116. package/dist/icons/TelegramIcon.js +0 -6
  117. package/dist/icons/TelegramIcon.js.map +0 -1
  118. package/dist/icons/TwitterIcon.d.ts +0 -3
  119. package/dist/icons/TwitterIcon.js +0 -6
  120. package/dist/icons/TwitterIcon.js.map +0 -1
  121. package/dist/icons/WhatsappIcon.d.ts +0 -3
  122. package/dist/icons/WhatsappIcon.js +0 -6
  123. package/dist/icons/WhatsappIcon.js.map +0 -1
  124. package/dist/icons/artifacts/DocumentIcon.d.ts +0 -3
  125. package/dist/icons/artifacts/DocumentIcon.js +0 -6
  126. package/dist/icons/artifacts/DocumentIcon.js.map +0 -1
  127. package/dist/icons/artifacts/HtmlIcon.d.ts +0 -3
  128. package/dist/icons/artifacts/HtmlIcon.js +0 -6
  129. package/dist/icons/artifacts/HtmlIcon.js.map +0 -1
  130. package/dist/icons/artifacts/JavascriptIcon.d.ts +0 -3
  131. package/dist/icons/artifacts/JavascriptIcon.js +0 -6
  132. package/dist/icons/artifacts/JavascriptIcon.js.map +0 -1
  133. package/dist/icons/artifacts/MarkdownIcon.d.ts +0 -3
  134. package/dist/icons/artifacts/MarkdownIcon.js +0 -6
  135. package/dist/icons/artifacts/MarkdownIcon.js.map +0 -1
  136. package/dist/icons/artifacts/PythonIcon.d.ts +0 -3
  137. package/dist/icons/artifacts/PythonIcon.js +0 -6
  138. package/dist/icons/artifacts/PythonIcon.js.map +0 -1
  139. package/dist/icons/artifacts/SvgIcon.d.ts +0 -3
  140. package/dist/icons/artifacts/SvgIcon.js +0 -6
  141. package/dist/icons/artifacts/SvgIcon.js.map +0 -1
  142. package/dist/icons/artifacts/XmlIcon.d.ts +0 -3
  143. package/dist/icons/artifacts/XmlIcon.js +0 -6
  144. package/dist/icons/artifacts/XmlIcon.js.map +0 -1
  145. package/dist/icons/artifacts/cssIcon.d.ts +0 -3
  146. package/dist/icons/artifacts/cssIcon.js +0 -6
  147. package/dist/icons/artifacts/cssIcon.js.map +0 -1
  148. package/dist/styles/motion.css +0 -25
  149. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.css +0 -78
  150. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +0 -39
  151. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js +0 -40
  152. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +0 -1
  153. package/esm/components/ContentPreviewModal/DocumentMarkdown.d.ts +0 -7
  154. package/esm/components/ContentPreviewModal/DocumentMarkdown.js +0 -28
  155. package/esm/components/ContentPreviewModal/DocumentMarkdown.js.map +0 -1
  156. package/esm/components/DrawerFooter/DrawerFooter.css +0 -62
  157. package/esm/components/DrawerFooter/DrawerFooter.d.ts +0 -12
  158. package/esm/components/DrawerFooter/DrawerFooter.js +0 -8
  159. package/esm/components/DrawerFooter/DrawerFooter.js.map +0 -1
  160. package/esm/components/IconButton/IconButton.css +0 -135
  161. package/esm/components/IconButton/IconButton.d.ts +0 -9
  162. package/esm/components/IconButton/IconButton.js +0 -33
  163. package/esm/components/IconButton/IconButton.js.map +0 -1
  164. package/esm/components/LoginModal/LoginModal.css +0 -270
  165. package/esm/components/LoginModal/LoginModal.d.ts +0 -19
  166. package/esm/components/LoginModal/LoginModal.js +0 -352
  167. package/esm/components/LoginModal/LoginModal.js.map +0 -1
  168. package/esm/components/MobileSessionPanel/MobileSessionPanel.css +0 -540
  169. package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +0 -65
  170. package/esm/components/MobileSessionPanel/MobileSessionPanel.js +0 -251
  171. package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +0 -1
  172. package/esm/components/PositionPopover/PositionPopover.css +0 -218
  173. package/esm/components/PositionPopover/PositionPopover.d.ts +0 -22
  174. package/esm/components/PositionPopover/PositionPopover.js +0 -203
  175. package/esm/components/PositionPopover/PositionPopover.js.map +0 -1
  176. package/esm/components/ReasoningBlock/ReasoningBlock.css +0 -156
  177. package/esm/components/ReasoningBlock/ReasoningBlock.d.ts +0 -7
  178. package/esm/components/ReasoningBlock/ReasoningBlock.js +0 -58
  179. package/esm/components/ReasoningBlock/ReasoningBlock.js.map +0 -1
  180. package/esm/components/SideDrawer/SideDrawer.css +0 -112
  181. package/esm/components/SideDrawer/SideDrawer.d.ts +0 -22
  182. package/esm/components/SideDrawer/SideDrawer.js +0 -12
  183. package/esm/components/SideDrawer/SideDrawer.js.map +0 -1
  184. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +0 -4
  185. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +0 -141
  186. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +0 -1
  187. package/esm/components/layouts/WebsiteAssistant/website-assistant.css +0 -889
  188. package/esm/components/layouts/fullpage.css +0 -628
  189. package/esm/helpers/artifactPanel.d.ts +0 -6
  190. package/esm/helpers/artifactPanel.js +0 -37
  191. package/esm/helpers/artifactPanel.js.map +0 -1
  192. package/esm/helpers/chatScroll.d.ts +0 -12
  193. package/esm/helpers/chatScroll.js +0 -9
  194. package/esm/helpers/chatScroll.js.map +0 -1
  195. package/esm/helpers/conversationHistory.d.ts +0 -16
  196. package/esm/helpers/conversationHistory.js +0 -82
  197. package/esm/helpers/conversationHistory.js.map +0 -1
  198. package/esm/helpers/conversationTitle.d.ts +0 -8
  199. package/esm/helpers/conversationTitle.js +0 -23
  200. package/esm/helpers/conversationTitle.js.map +0 -1
  201. package/esm/helpers/enhanceBubbleCodeBlocks.d.ts +0 -5
  202. package/esm/helpers/enhanceBubbleCodeBlocks.js +0 -94
  203. package/esm/helpers/enhanceBubbleCodeBlocks.js.map +0 -1
  204. package/esm/helpers/highlightMatches.d.ts +0 -2
  205. package/esm/helpers/highlightMatches.js +0 -49
  206. package/esm/helpers/highlightMatches.js.map +0 -1
  207. package/esm/helpers/positionPopover.d.ts +0 -3
  208. package/esm/helpers/positionPopover.js +0 -17
  209. package/esm/helpers/positionPopover.js.map +0 -1
  210. package/esm/helpers/prism.d.ts +0 -16
  211. package/esm/helpers/prism.js +0 -74
  212. package/esm/helpers/prism.js.map +0 -1
  213. package/esm/helpers/reasoning.d.ts +0 -7
  214. package/esm/helpers/reasoning.js +0 -39
  215. package/esm/helpers/reasoning.js.map +0 -1
  216. package/esm/helpers/relativeTime.d.ts +0 -3
  217. package/esm/helpers/relativeTime.js +0 -50
  218. package/esm/helpers/relativeTime.js.map +0 -1
  219. package/esm/helpers/sourcesCount.d.ts +0 -2
  220. package/esm/helpers/sourcesCount.js +0 -18
  221. package/esm/helpers/sourcesCount.js.map +0 -1
  222. package/esm/helpers/tts/muteSpeaker.d.ts +0 -13
  223. package/esm/helpers/tts/muteSpeaker.js +0 -21
  224. package/esm/helpers/tts/muteSpeaker.js.map +0 -1
  225. package/esm/helpers/usePressTooltip.d.ts +0 -18
  226. package/esm/helpers/usePressTooltip.js +0 -35
  227. package/esm/helpers/usePressTooltip.js.map +0 -1
  228. package/esm/icons/FacebookIcon.d.ts +0 -3
  229. package/esm/icons/FacebookIcon.js +0 -4
  230. package/esm/icons/FacebookIcon.js.map +0 -1
  231. package/esm/icons/LinkedinIcon.d.ts +0 -3
  232. package/esm/icons/LinkedinIcon.js +0 -4
  233. package/esm/icons/LinkedinIcon.js.map +0 -1
  234. package/esm/icons/MemoriIcon.d.ts +0 -3
  235. package/esm/icons/MemoriIcon.js +0 -6
  236. package/esm/icons/MemoriIcon.js.map +0 -1
  237. package/esm/icons/TelegramIcon.d.ts +0 -3
  238. package/esm/icons/TelegramIcon.js +0 -4
  239. package/esm/icons/TelegramIcon.js.map +0 -1
  240. package/esm/icons/TwitterIcon.d.ts +0 -3
  241. package/esm/icons/TwitterIcon.js +0 -4
  242. package/esm/icons/TwitterIcon.js.map +0 -1
  243. package/esm/icons/WhatsappIcon.d.ts +0 -3
  244. package/esm/icons/WhatsappIcon.js +0 -4
  245. package/esm/icons/WhatsappIcon.js.map +0 -1
  246. package/esm/icons/artifacts/DocumentIcon.d.ts +0 -3
  247. package/esm/icons/artifacts/DocumentIcon.js +0 -4
  248. package/esm/icons/artifacts/DocumentIcon.js.map +0 -1
  249. package/esm/icons/artifacts/HtmlIcon.d.ts +0 -3
  250. package/esm/icons/artifacts/HtmlIcon.js +0 -4
  251. package/esm/icons/artifacts/HtmlIcon.js.map +0 -1
  252. package/esm/icons/artifacts/JavascriptIcon.d.ts +0 -3
  253. package/esm/icons/artifacts/JavascriptIcon.js +0 -4
  254. package/esm/icons/artifacts/JavascriptIcon.js.map +0 -1
  255. package/esm/icons/artifacts/MarkdownIcon.d.ts +0 -3
  256. package/esm/icons/artifacts/MarkdownIcon.js +0 -4
  257. package/esm/icons/artifacts/MarkdownIcon.js.map +0 -1
  258. package/esm/icons/artifacts/PythonIcon.d.ts +0 -3
  259. package/esm/icons/artifacts/PythonIcon.js +0 -4
  260. package/esm/icons/artifacts/PythonIcon.js.map +0 -1
  261. package/esm/icons/artifacts/SvgIcon.d.ts +0 -3
  262. package/esm/icons/artifacts/SvgIcon.js +0 -4
  263. package/esm/icons/artifacts/SvgIcon.js.map +0 -1
  264. package/esm/icons/artifacts/XmlIcon.d.ts +0 -3
  265. package/esm/icons/artifacts/XmlIcon.js +0 -4
  266. package/esm/icons/artifacts/XmlIcon.js.map +0 -1
  267. package/esm/icons/artifacts/cssIcon.d.ts +0 -3
  268. package/esm/icons/artifacts/cssIcon.js +0 -4
  269. package/esm/icons/artifacts/cssIcon.js.map +0 -1
  270. package/esm/styles/motion.css +0 -25
@@ -1,203 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Button, Popover, Tooltip } from '@memori.ai/ui';
3
- import IconButton from '../IconButton/IconButton';
4
- import { MapPin, Pencil } from 'lucide-react';
5
- import { useCallback, useEffect, useRef, useState } from 'react';
6
- import { useTranslation } from 'react-i18next';
7
- import { getUncertaintyByViewport } from '../../helpers/venue';
8
- import { useDebounceFn } from '../../helpers/utils';
9
- import { VenueCombobox, VenueMapPreview, getPlaceName, } from '../VenueWidget/VenueWidget';
10
- import cx from 'classnames';
11
- const GEOCODE_TIMEOUT_MS = 8000;
12
- function hasShareableCoords(v) {
13
- return !!((v === null || v === void 0 ? void 0 : v.latitude) && (v === null || v === void 0 ? void 0 : v.longitude));
14
- }
15
- export const PositionPopoverContent = ({ venue, setVenue, autoStartGeolocation = false, }) => {
16
- var _a;
17
- const { t } = useTranslation();
18
- const [geolocationLoading, setGeolocationLoading] = useState(false);
19
- const [editingLocation, setEditingLocation] = useState(false);
20
- const [permissionDeniedMessage, setPermissionDeniedMessage] = useState(null);
21
- const [geocodingError, setGeocodingError] = useState(null);
22
- const [fetching, setFetching] = useState(false);
23
- const [query, setQuery] = useState('');
24
- const [suggestions, setSuggestions] = useState([]);
25
- const geoGenRef = useRef(0);
26
- const autocompleteInputRef = useRef(null);
27
- const autoStartedRef = useRef(false);
28
- const sharingActive = geolocationLoading || hasShareableCoords(venue);
29
- const handleSearch = useDebounceFn(async (value) => {
30
- setFetching(true);
31
- try {
32
- const response = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(value)}&format=jsonv2&limit=5&addressdetails=1`);
33
- const data = await response.json();
34
- setSuggestions(data);
35
- }
36
- catch (_a) {
37
- setGeocodingError(String(t('widget.geocodingFailed')));
38
- }
39
- finally {
40
- setFetching(false);
41
- }
42
- }, 1000);
43
- const onQueryChange = useCallback((value, opts) => {
44
- setQuery(value);
45
- if (opts === null || opts === void 0 ? void 0 : opts.skipSearch)
46
- return;
47
- if (!value.trim()) {
48
- setSuggestions([]);
49
- return;
50
- }
51
- handleSearch(value);
52
- }, [handleSearch]);
53
- const handleAutocompletePick = useCallback((value) => {
54
- const placeName = getPlaceName(value);
55
- setVenue({
56
- latitude: value.lat,
57
- longitude: value.lon,
58
- placeName,
59
- uncertainty: (value === null || value === void 0 ? void 0 : value.boundingbox)
60
- ? getUncertaintyByViewport(value.boundingbox)
61
- : 2,
62
- });
63
- setEditingLocation(false);
64
- setQuery('');
65
- setSuggestions([]);
66
- setGeocodingError(null);
67
- setPermissionDeniedMessage(null);
68
- }, [setVenue, t]);
69
- const startGeolocation = useCallback(() => {
70
- const gen = ++geoGenRef.current;
71
- setPermissionDeniedMessage(null);
72
- setGeocodingError(null);
73
- if (!navigator.geolocation) {
74
- setGeolocationLoading(false);
75
- setPermissionDeniedMessage(String(t('widget.positionUnavailableManual')));
76
- setEditingLocation(true);
77
- return;
78
- }
79
- setGeolocationLoading(true);
80
- navigator.geolocation.getCurrentPosition(pos => {
81
- if (gen !== geoGenRef.current)
82
- return;
83
- const next = {
84
- latitude: pos.coords.latitude,
85
- longitude: pos.coords.longitude,
86
- placeName: '',
87
- uncertainty: pos.coords.accuracy / 1000,
88
- };
89
- setVenue(next);
90
- setGeolocationLoading(false);
91
- const controller = new AbortController();
92
- const timeoutId = window.setTimeout(() => controller.abort(), GEOCODE_TIMEOUT_MS);
93
- void (async () => {
94
- try {
95
- const result = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${pos.coords.latitude}&lon=${pos.coords.longitude}&format=jsonv2&addressdetails=1`, { signal: controller.signal });
96
- if (gen !== geoGenRef.current)
97
- return;
98
- const response = (await result.json());
99
- const placeName = getPlaceName(response);
100
- setVenue({
101
- ...next,
102
- placeName,
103
- });
104
- }
105
- catch (e) {
106
- if (gen !== geoGenRef.current)
107
- return;
108
- if (e.name === 'AbortError')
109
- return;
110
- console.error('[PositionPopover] reverse geocode failed', e);
111
- setGeocodingError(String(t('widget.geocodingFailed')));
112
- }
113
- finally {
114
- window.clearTimeout(timeoutId);
115
- }
116
- })();
117
- }, err => {
118
- if (gen !== geoGenRef.current)
119
- return;
120
- setGeolocationLoading(false);
121
- setVenue(undefined);
122
- const code = err.code;
123
- if (code === 1) {
124
- setPermissionDeniedMessage(String(t('widget.positionUnavailableManual')));
125
- setEditingLocation(true);
126
- }
127
- else {
128
- setGeocodingError(String(t('widget.geocodingFailed')));
129
- }
130
- }, { enableHighAccuracy: true, timeout: 15000, maximumAge: 0 });
131
- }, [setVenue, t]);
132
- const toggleSharing = useCallback(() => {
133
- setPermissionDeniedMessage(null);
134
- setGeocodingError(null);
135
- if (sharingActive && !geolocationLoading) {
136
- geoGenRef.current += 1;
137
- setVenue({
138
- latitude: 0,
139
- longitude: 0,
140
- placeName: '',
141
- uncertainty: 0,
142
- });
143
- setEditingLocation(false);
144
- setQuery('');
145
- setSuggestions([]);
146
- return;
147
- }
148
- if (geolocationLoading) {
149
- geoGenRef.current += 1;
150
- setGeolocationLoading(false);
151
- setVenue(undefined);
152
- return;
153
- }
154
- startGeolocation();
155
- }, [geolocationLoading, setVenue, sharingActive, startGeolocation]);
156
- useEffect(() => {
157
- if (!autoStartGeolocation) {
158
- autoStartedRef.current = false;
159
- return;
160
- }
161
- if (autoStartedRef.current)
162
- return;
163
- if (hasShareableCoords(venue) || geolocationLoading)
164
- return;
165
- autoStartedRef.current = true;
166
- startGeolocation();
167
- }, [autoStartGeolocation, geolocationLoading, startGeolocation, venue]);
168
- useEffect(() => {
169
- if (!editingLocation)
170
- return;
171
- const id = requestAnimationFrame(() => {
172
- var _a;
173
- (_a = autocompleteInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
174
- });
175
- return () => cancelAnimationFrame(id);
176
- }, [editingLocation]);
177
- const inlineError = permissionDeniedMessage || geocodingError;
178
- const shareLocationHint = t('widget.shareLocationHint') || 'Get answers tailored to where you are';
179
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "memori-position-popover__row memori-position-popover__switch-row", children: _jsxs("button", { type: "button", className: "memori-dropdown--auth-row", onClick: () => {
180
- toggleSharing();
181
- }, children: [_jsx("span", { className: "memori-dropdown--auth-icon-wrap", children: _jsx(MapPin, { size: 16 }) }), _jsxs("span", { className: "memori-dropdown--auth-copy", children: [_jsx("span", { className: "memori-dropdown--auth-title", children: t('widget.shareLocation') || 'Share my location' }), _jsx(Tooltip, { title: shareLocationHint, placement: "top", children: _jsx("span", { className: "memori-dropdown--auth-subtitle", children: shareLocationHint }) })] }), _jsx("span", { className: cx('memori-dropdown--switch', sharingActive && 'memori-dropdown--switch--on'), "aria-hidden": true })] }) }), (sharingActive || geolocationLoading || editingLocation) && (_jsx("div", { className: "memori-position-popover__tag-block", children: geolocationLoading ? (_jsxs("div", { className: "memori-position-popover__tag memori-position-popover__tag--loading", "aria-busy": "true", "aria-live": "polite", children: [_jsx("span", { className: "memori-position-popover__spinner", "aria-hidden": true }), _jsx("span", { className: "memori-position-popover__tag-skeleton" })] })) : editingLocation ? (_jsx("div", { className: "memori-position-popover__autocomplete-wrap", children: _jsx(VenueCombobox, { venue: venue, query: query, fetching: fetching, suggestions: suggestions, onQueryChange: onQueryChange, onChange: handleAutocompletePick, getPlaceName: getPlaceName, t: t, autocompleteRootId: "memori-position-popover-venue-search", inputRef: autocompleteInputRef }) })) : (_jsxs("div", { className: "memori-position-popover__tag", children: [_jsx("span", { className: "memori-position-popover__tag-text", children: ((_a = venue === null || venue === void 0 ? void 0 : venue.placeName) === null || _a === void 0 ? void 0 : _a.trim())
182
- ? venue.placeName
183
- : t('widget.positionResolving') }), _jsx(Button, { type: "button", variant: "ghost", icon: _jsx(Pencil, { size: 16, strokeWidth: 2, "aria-hidden": true }), size: "sm", className: "memori-position-popover__tag-edit", "aria-label": String(t('widget.editPositionAria')), onClick: () => {
184
- setEditingLocation(true);
185
- setPermissionDeniedMessage(null);
186
- } })] })) })), inlineError && (_jsx("p", { className: "memori-position-popover__error", role: "alert", children: inlineError })), hasShareableCoords(venue) && !geolocationLoading && (_jsx("div", { className: "memori-position-popover__map", children: _jsx(VenueMapPreview, { venue: venue }) }))] }));
187
- };
188
- const PositionPopover = ({ venue, setVenue, open, onOpenChange, triggerClassName, triggerButtonVariant = 'toolbar', triggerAriaLabel, positionerClassName, autoStartGeolocation = false, }) => {
189
- const sharingActive = hasShareableCoords(venue);
190
- return (_jsx(Popover, { open: open, onOpenChange: onOpenChange, modal: false, closable: false, placement: "bottom-end", sideOffset: 8, contentClassName: "memori-position-popover__popup", slotProps: {
191
- trigger: {
192
- className: triggerClassName,
193
- render: (props) => {
194
- return (_jsx(IconButton, { ...props, type: "button", variant: triggerButtonVariant, active: open, className: cx('memori-header--button', 'memori-header--button--position', sharingActive && 'memori-header--button--position--active', triggerClassName), "aria-label": triggerAriaLabel, "aria-expanded": open, icon: _jsx(MapPin, { "aria-hidden": true }) }));
195
- },
196
- },
197
- positioner: {
198
- className: cx('memori-position-popover__positioner', positionerClassName),
199
- },
200
- }, content: _jsx(PositionPopoverContent, { venue: venue, setVenue: setVenue, autoStartGeolocation: open && autoStartGeolocation }), children: null }));
201
- };
202
- export default PositionPopover;
203
- //# sourceMappingURL=PositionPopover.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PositionPopover.js","sourceRoot":"","sources":["../../../src/components/PositionPopover/PositionPopover.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAA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KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,EACf,SAAS,EAAC,YAAY,EACtB,UAAU,EAAE,CAAC,EACb,gBAAgB,EAAC,gCAAgC,EACjD,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,SAAS,EAAE,gBAAgB;gBAC3B,MAAM,EAAE,CAAC,KAA0C,EAAE,EAAE;oBACrD,OAAO,CACL,KAAC,UAAU,OACL,KAAK,EACT,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,EAAE,CACX,uBAAuB,EACvB,iCAAiC,EACjC,aAAa,IAAI,yCAAyC,EAC1D,gBAAgB,CACjB,gBACW,gBAAgB,mBACb,IAAI,EACnB,IAAI,EAAE,KAAC,MAAM,0BAAe,GAC5B,CACH,CAAC;gBACJ,CAAC;aACF;YACD,UAAU,EAAE;gBACV,SAAS,EAAE,EAAE,CACX,qCAAqC,EACrC,mBAAmB,CACpB;aACF;SACF,EACD,OAAO,EACL,KAAC,sBAAsB,IACrB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,oBAAoB,EAAE,IAAI,IAAI,oBAAoB,GAClD,YAGH,IAAI,GACG,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,156 +0,0 @@
1
- .memori-reasoning {
2
- display: flex;
3
- width: 100%;
4
- max-width: 100%;
5
- flex-direction: column;
6
- align-items: flex-start;
7
- margin-bottom: 0;
8
- }
9
-
10
- .memori-reasoning__trigger {
11
- display: inline-flex;
12
- align-items: center;
13
- padding: 2px 4px 2px 0;
14
- border: 0;
15
- border-radius: 6px;
16
- margin: 0;
17
- background: transparent;
18
- color: color-mix(in oklch, var(--memori-text-color) 52%, transparent);
19
- cursor: pointer;
20
- font-family: inherit;
21
- font-size: 13px;
22
- font-weight: 500;
23
- gap: 4px;
24
- letter-spacing: -0.01em;
25
- line-height: 1.4;
26
- transition: color 0.16s ease;
27
- }
28
-
29
- .memori-reasoning__trigger:hover,
30
- .memori-reasoning__trigger:focus-visible {
31
- color: color-mix(in oklch, var(--memori-text-color) 82%, transparent);
32
- }
33
-
34
- .memori-reasoning__trigger:focus-visible {
35
- outline: 2px solid var(--memori-primary, currentColor);
36
- outline-offset: 2px;
37
- }
38
-
39
- .memori-reasoning__chevron {
40
- width: 14px;
41
- height: 14px;
42
- flex-shrink: 0;
43
- opacity: 0.85;
44
- transform: rotate(0deg);
45
- transform-origin: 50% 50%;
46
- transition: transform 0.2s ease;
47
- }
48
-
49
- .memori-reasoning--open .memori-reasoning__chevron {
50
- transform: rotate(90deg);
51
- }
52
-
53
- .memori-reasoning__label {
54
- min-width: 0;
55
- }
56
-
57
- .memori-reasoning__label--thinking {
58
- animation: memori-reasoning-shimmer 1.8s ease-in-out infinite;
59
- -webkit-background-clip: text;
60
- background-clip: text;
61
- background-image: linear-gradient(
62
- 90deg,
63
- color-mix(in oklch, var(--memori-text-color) 38%, transparent) 0%,
64
- color-mix(in oklch, var(--memori-text-color) 38%, transparent) 36%,
65
- var(--memori-text-color) 50%,
66
- color-mix(in oklch, var(--memori-text-color) 38%, transparent) 64%,
67
- color-mix(in oklch, var(--memori-text-color) 38%, transparent) 100%
68
- );
69
- background-size: 220% 100%;
70
- color: transparent;
71
- }
72
-
73
- .memori-reasoning__collapsible {
74
- display: grid;
75
- width: 100%;
76
- grid-template-rows: 0fr;
77
- opacity: 0;
78
- transition:
79
- grid-template-rows 0.22s ease,
80
- opacity 0.18s ease;
81
- }
82
-
83
- .memori-reasoning--open .memori-reasoning__collapsible {
84
- grid-template-rows: 1fr;
85
- opacity: 1;
86
- }
87
-
88
- .memori-reasoning__clip {
89
- overflow: hidden;
90
- min-height: 0;
91
- }
92
-
93
- .memori-reasoning__panel {
94
- display: grid;
95
- width: 100%;
96
- padding: 4px 0 8px;
97
- grid-template-columns: 12px minmax(0, 1fr);
98
- }
99
-
100
- .memori-reasoning__panel::before {
101
- width: 1px;
102
- border-radius: 1px;
103
- margin: 2px 0;
104
- background: color-mix(in oklch, var(--memori-text-color) 16%, transparent);
105
- content: '';
106
- justify-self: center;
107
- }
108
-
109
- .memori-reasoning__body {
110
- min-width: 0;
111
- color: color-mix(in oklch, var(--memori-text-color) 62%, transparent);
112
- font-size: 13px;
113
- font-style: normal;
114
- font-weight: 400;
115
- letter-spacing: 0;
116
- line-height: 1.65;
117
- overflow-wrap: anywhere;
118
- white-space: pre-wrap;
119
- }
120
-
121
- .memori-reasoning--streaming.memori-reasoning--overflow .memori-reasoning__body {
122
- overflow: hidden;
123
- max-height: 9.5rem;
124
- -webkit-mask-image: linear-gradient(to bottom, #000 48%, transparent 100%);
125
- mask-image: linear-gradient(to bottom, #000 48%, transparent 100%);
126
- }
127
-
128
- .memori-reasoning--open:not(.memori-reasoning--streaming) .memori-reasoning__body {
129
- max-height: min(40vh, 22rem);
130
- overflow-x: hidden;
131
- overflow-y: auto;
132
- }
133
-
134
- @keyframes memori-reasoning-shimmer {
135
- 0% {
136
- background-position: 100% 50%;
137
- }
138
-
139
- 100% {
140
- background-position: 0% 50%;
141
- }
142
- }
143
-
144
- @media (prefers-reduced-motion: reduce) {
145
- .memori-reasoning__chevron,
146
- .memori-reasoning__collapsible {
147
- transition: none;
148
- }
149
-
150
- .memori-reasoning__label--thinking {
151
- animation: none;
152
- background: none;
153
- color: color-mix(in oklch, var(--memori-text-color) 58%, transparent);
154
- -webkit-text-fill-color: unset;
155
- }
156
- }
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export interface ReasoningBlockProps {
3
- content: string;
4
- complete: boolean;
5
- }
6
- declare const ReasoningBlock: React.FC<ReasoningBlockProps>;
7
- export default ReasoningBlock;
@@ -1,58 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useId, useLayoutEffect, useRef, useState, } from 'react';
3
- import cx from 'classnames';
4
- import { ChevronRight } from 'lucide-react';
5
- import { useTranslation } from 'react-i18next';
6
- const ReasoningBlock = ({ content, complete, }) => {
7
- const { t } = useTranslation();
8
- const panelId = useId();
9
- const userToggled = useRef(false);
10
- const startedAt = useRef(null);
11
- const bodyRef = useRef(null);
12
- const [open, setOpen] = useState(!complete);
13
- const [elapsedSeconds, setElapsedSeconds] = useState(null);
14
- const [overflowing, setOverflowing] = useState(false);
15
- useEffect(() => {
16
- if (!complete && startedAt.current == null) {
17
- startedAt.current = Date.now();
18
- }
19
- }, [complete]);
20
- useEffect(() => {
21
- if (!complete || startedAt.current == null || elapsedSeconds != null) {
22
- return;
23
- }
24
- setElapsedSeconds(Math.max(1, Math.round((Date.now() - startedAt.current) / 1000)));
25
- }, [complete, elapsedSeconds]);
26
- useEffect(() => {
27
- if (userToggled.current)
28
- return;
29
- setOpen(!complete);
30
- }, [complete]);
31
- useLayoutEffect(() => {
32
- const el = bodyRef.current;
33
- if (!el)
34
- return;
35
- if (open && !complete) {
36
- el.scrollTop = el.scrollHeight;
37
- }
38
- setOverflowing(el.scrollHeight > el.clientHeight + 1);
39
- }, [content, open, complete]);
40
- const label = !complete
41
- ? t('thinking') || 'Thinking'
42
- : elapsedSeconds != null
43
- ? t('thoughtFor', { count: elapsedSeconds }) ||
44
- `Thought for ${elapsedSeconds}s`
45
- : t('thought') || 'Thought';
46
- return (_jsxs("div", { className: cx('memori-reasoning', {
47
- 'memori-reasoning--open': open,
48
- 'memori-reasoning--streaming': !complete,
49
- 'memori-reasoning--overflow': overflowing,
50
- }), children: [_jsxs("button", { type: "button", className: "memori-reasoning__trigger", "aria-expanded": open, "aria-controls": panelId, onClick: () => {
51
- userToggled.current = true;
52
- setOpen(value => !value);
53
- }, children: [_jsx(ChevronRight, { className: "memori-reasoning__chevron", "aria-hidden": true, size: 14, strokeWidth: 2.25 }), _jsx("span", { className: cx('memori-reasoning__label', {
54
- 'memori-reasoning__label--thinking': !complete,
55
- }), children: label })] }), _jsx("div", { id: panelId, className: "memori-reasoning__collapsible", role: "region", "aria-hidden": !open, children: _jsx("div", { className: "memori-reasoning__clip", children: _jsx("div", { className: "memori-reasoning__panel", children: _jsx("div", { className: "memori-reasoning__body", ref: bodyRef, children: content }) }) }) })] }));
56
- };
57
- export default ReasoningBlock;
58
- //# sourceMappingURL=ReasoningBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReasoningBlock.js","sourceRoot":"","sources":["../../../src/components/ReasoningBlock/ReasoningBlock.tsx"],"names":[],"mappings":";AAAA,OAAc,EACZ,SAAS,EACT,KAAK,EACL,eAAe,EACf,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAO/C,MAAM,cAAc,GAAkC,CAAC,EACrD,OAAO,EACP,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,SAAS,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAC1E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;YAC3C,SAAS,CAAC,OAAO,GAAG,IAA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gBAC1C,eAAe,cAAc,GAAG;YAClC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC;IAE9B,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CAAC,kBAAkB,EAAE;YAChC,wBAAwB,EAAE,IAAI;YAC9B,6BAA6B,EAAE,CAAC,QAAQ;YACxC,4BAA4B,EAAE,WAAW;SAC1C,CAAC,aAEF,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,2BAA2B,mBACtB,IAAI,mBACJ,OAAO,EACtB,OAAO,EAAE,GAAG,EAAE;oBACZ,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;oBAC3B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC,aAED,KAAC,YAAY,IACX,SAAS,EAAC,2BAA2B,uBAErC,IAAI,EAAE,EAAE,EACR,WAAW,EAAE,IAAI,GACjB,EACF,eACE,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE;4BACvC,mCAAmC,EAAE,CAAC,QAAQ;yBAC/C,CAAC,YAED,KAAK,GACD,IACA,EACT,cACE,EAAE,EAAE,OAAO,EACX,SAAS,EAAC,+BAA+B,EACzC,IAAI,EAAC,QAAQ,iBACA,CAAC,IAAI,YAElB,cAAK,SAAS,EAAC,wBAAwB,YACrC,cAAK,SAAS,EAAC,yBAAyB,YACtC,cAAK,SAAS,EAAC,wBAAwB,EAAC,GAAG,EAAE,OAAO,YACjD,OAAO,GACJ,GACF,GACF,GACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,112 +0,0 @@
1
- .memori-side-drawer.memori-drawer {
2
- display: flex;
3
- min-height: 0;
4
- flex-direction: column;
5
- }
6
-
7
- .memori-side-drawer .memori-drawer__header {
8
- align-items: flex-start;
9
- gap: var(--memori-spacing-md);
10
- }
11
-
12
- .memori-side-drawer .memori-drawer__header > :first-child {
13
- min-width: 0;
14
- flex: 1 1 auto;
15
- }
16
-
17
- .memori-side-drawer .memori-drawer__title {
18
- font-size: var(--memori-text-size-2xl);
19
- }
20
-
21
- .memori-side-drawer .memori-drawer__description {
22
- color: color-mix(in oklch, var(--memori-text-color) 64%, transparent);
23
- }
24
-
25
- .memori-side-drawer .memori-drawer__body {
26
- display: flex;
27
- overflow: hidden;
28
- min-height: 0;
29
- flex: 1 1 auto;
30
- flex-direction: column;
31
- padding: 0;
32
- padding-bottom: var(--memori-spacing-lg);
33
- }
34
-
35
- .memori-side-drawer__body {
36
- display: flex;
37
- overflow: auto;
38
- min-height: 0;
39
- flex: 1 1 auto;
40
- flex-direction: column;
41
- padding: var(--memori-spacing-md) var(--memori-spacing-lg);
42
- gap: var(--memori-spacing-md);
43
- scrollbar-color: color-mix(in oklch, var(--memori-neutral, #6b7280) 55%, transparent) transparent;
44
- scrollbar-width: thin;
45
- }
46
-
47
- .memori-side-drawer__body::-webkit-scrollbar {
48
- width: 8px;
49
- }
50
-
51
- .memori-side-drawer__body::-webkit-scrollbar-track {
52
- background: transparent;
53
- }
54
-
55
- .memori-side-drawer__body::-webkit-scrollbar-thumb {
56
- border-radius: 999px;
57
- background-color: color-mix(in oklch, var(--memori-neutral, #6b7280) 45%, transparent);
58
- }
59
-
60
- .memori-side-drawer__body::-webkit-scrollbar-thumb:hover {
61
- background-color: color-mix(in oklch, var(--memori-neutral, #6b7280) 60%, transparent);
62
- }
63
-
64
- .memori-side-drawer .memori-drawer__footer {
65
- display: block;
66
- justify-content: stretch;
67
- padding: var(--memori-spacing-md) var(--memori-spacing-lg);
68
- }
69
-
70
- .memori-side-drawer .memori-drawer__footer .memori-drawer-footer {
71
- width: 100%;
72
- padding: 0;
73
- border-top: none;
74
- box-shadow: none;
75
- }
76
-
77
- .memori-side-drawer-empty {
78
- display: flex;
79
- flex-direction: column;
80
- align-items: center;
81
- padding: var(--memori-spacing-xl) var(--memori-spacing-md);
82
- color: var(--memori-text-color);
83
- gap: var(--memori-spacing-sm);
84
- text-align: center;
85
- }
86
-
87
- .memori-side-drawer-empty__icon {
88
- display: inline-flex;
89
- width: 3.25rem;
90
- height: 3.25rem;
91
- align-items: center;
92
- justify-content: center;
93
- border-radius: var(--memori-radius-surface);
94
- margin-bottom: var(--memori-spacing-xs);
95
- background: var(--memori-main-background);
96
- color: color-mix(in oklch, var(--memori-text-color) 55%, transparent);
97
- }
98
-
99
- .memori-side-drawer-empty__title {
100
- margin: 0;
101
- font-size: var(--memori-text-size-lg);
102
- font-weight: var(--memori-text-weight-semibold);
103
- line-height: var(--memori-text-line-tight);
104
- }
105
-
106
- .memori-side-drawer-empty__text {
107
- max-width: 22.5rem;
108
- margin: 0;
109
- color: color-mix(in oklch, var(--memori-text-color) 64%, transparent);
110
- font-size: var(--memori-text-size-sm);
111
- line-height: var(--memori-text-line-relaxed);
112
- }
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- export interface SideDrawerProps {
3
- open?: boolean;
4
- onClose: () => void;
5
- title: React.ReactNode;
6
- description?: React.ReactNode;
7
- footer?: React.ReactNode;
8
- children?: React.ReactNode;
9
- className?: string;
10
- size?: 'sm' | 'md' | 'lg';
11
- loading?: boolean;
12
- closeLabel?: string;
13
- }
14
- declare const SideDrawer: React.FC<SideDrawerProps>;
15
- export interface SideDrawerEmptyProps {
16
- icon?: React.ReactNode;
17
- title: React.ReactNode;
18
- description?: React.ReactNode;
19
- children?: React.ReactNode;
20
- }
21
- export declare const SideDrawerEmpty: React.FC<SideDrawerEmptyProps>;
22
- export default SideDrawer;
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import cx from 'classnames';
3
- import { Drawer } from '@memori.ai/ui';
4
- const SideDrawer = ({ open = true, onClose, title, description, footer, children, className, size = 'md', loading, closeLabel, }) => {
5
- return (_jsx(Drawer, { open: open, anchor: "right", size: size, loading: loading, closeLabel: closeLabel, className: cx('memori-side-drawer', className), title: title, description: description, footer: footer, onClose: onClose, onOpenChange: nextOpen => {
6
- if (!nextOpen)
7
- onClose();
8
- }, children: _jsx("div", { className: "memori-side-drawer__body", children: children }) }));
9
- };
10
- export const SideDrawerEmpty = ({ icon, title, description, children, }) => (_jsxs("div", { className: "memori-side-drawer-empty", role: "status", children: [icon != null && (_jsx("span", { className: "memori-side-drawer-empty__icon", "aria-hidden": true, children: icon })), _jsx("p", { className: "memori-side-drawer-empty__title", children: title }), description != null && (_jsx("p", { className: "memori-side-drawer-empty__text", children: description })), children] }));
11
- export default SideDrawer;
12
- //# sourceMappingURL=SideDrawer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SideDrawer.js","sourceRoot":"","sources":["../../../src/components/SideDrawer/SideDrawer.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAoBvC,MAAM,UAAU,GAA8B,CAAC,EAC7C,IAAI,GAAG,IAAI,EACX,OAAO,EACP,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,IAAI,EACX,OAAO,EACP,UAAU,GACX,EAAE,EAAE;IACH,OAAO,CACL,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,MAAM,EAAC,OAAO,EACd,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,SAAS,CAAC,EAC9C,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,QAAQ,CAAC,EAAE;YACvB,IAAI,CAAC,QAAQ;gBAAE,OAAO,EAAE,CAAC;QAC3B,CAAC,YAED,cAAK,SAAS,EAAC,0BAA0B,YAAE,QAAQ,GAAO,GACnD,CACV,CAAC;AACJ,CAAC,CAAC;AASF,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,GACT,EAAE,EAAE,CAAC,CACJ,eAAK,SAAS,EAAC,0BAA0B,EAAC,IAAI,EAAC,QAAQ,aACpD,IAAI,IAAI,IAAI,IAAI,CACf,eAAM,SAAS,EAAC,gCAAgC,iCAC7C,IAAI,GACA,CACR,EACD,YAAG,SAAS,EAAC,iCAAiC,YAAE,KAAK,GAAK,EACzD,WAAW,IAAI,IAAI,IAAI,CACtB,YAAG,SAAS,EAAC,gCAAgC,YAAE,WAAW,GAAK,CAChE,EACA,QAAQ,IACL,CACP,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { LayoutProps } from '../../MemoriWidget/MemoriWidget';
3
- declare const WebsiteAssistantLayout: React.FC<LayoutProps>;
4
- export default WebsiteAssistantLayout;