@lobehub/chat 1.2.2 → 1.2.4

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 (101) hide show
  1. package/.stylelintrc.js +1 -0
  2. package/CHANGELOG.md +50 -0
  3. package/README.md +1 -1
  4. package/locales/ar/plugin.json +1 -1
  5. package/locales/ar/portal.json +7 -1
  6. package/locales/bg-BG/plugin.json +1 -1
  7. package/locales/bg-BG/portal.json +7 -1
  8. package/locales/de-DE/plugin.json +1 -1
  9. package/locales/de-DE/portal.json +7 -1
  10. package/locales/en-US/plugin.json +1 -1
  11. package/locales/en-US/portal.json +8 -2
  12. package/locales/es-ES/plugin.json +1 -1
  13. package/locales/es-ES/portal.json +7 -1
  14. package/locales/fr-FR/plugin.json +1 -1
  15. package/locales/fr-FR/portal.json +7 -1
  16. package/locales/it-IT/plugin.json +1 -1
  17. package/locales/it-IT/portal.json +7 -1
  18. package/locales/ja-JP/plugin.json +1 -1
  19. package/locales/ja-JP/portal.json +7 -1
  20. package/locales/ko-KR/plugin.json +1 -1
  21. package/locales/ko-KR/portal.json +7 -1
  22. package/locales/nl-NL/plugin.json +1 -1
  23. package/locales/nl-NL/portal.json +7 -1
  24. package/locales/pl-PL/plugin.json +1 -1
  25. package/locales/pl-PL/portal.json +7 -1
  26. package/locales/pt-BR/plugin.json +1 -1
  27. package/locales/pt-BR/portal.json +7 -1
  28. package/locales/ru-RU/plugin.json +1 -1
  29. package/locales/ru-RU/portal.json +7 -1
  30. package/locales/tr-TR/plugin.json +1 -1
  31. package/locales/tr-TR/portal.json +7 -1
  32. package/locales/vi-VN/plugin.json +1 -1
  33. package/locales/vi-VN/portal.json +7 -1
  34. package/locales/zh-CN/plugin.json +1 -1
  35. package/locales/zh-CN/portal.json +8 -2
  36. package/locales/zh-TW/portal.json +7 -1
  37. package/package.json +9 -6
  38. package/src/app/(main)/@nav/_layout/Mobile.tsx +2 -3
  39. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/DragUpload.tsx +1 -1
  40. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/TextArea.tsx +2 -1
  41. package/src/app/(main)/chat/(workspace)/@portal/features/{Tools/ToolUI → ArtifactUI}/Footer.tsx +18 -7
  42. package/src/app/(main)/chat/(workspace)/@portal/features/{Tools/ToolUI → ArtifactUI}/ToolRender.tsx +4 -3
  43. package/src/app/(main)/chat/(workspace)/@portal/features/{Tools/ToolUI → ArtifactUI}/index.tsx +2 -2
  44. package/src/app/(main)/chat/(workspace)/@portal/features/{Tools/ToolList → Artifacts/ArtifactList}/Item/index.tsx +3 -3
  45. package/src/app/(main)/chat/(workspace)/@portal/features/{Tools/ToolList → Artifacts/ArtifactList}/Item/style.ts +3 -2
  46. package/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/index.tsx +61 -0
  47. package/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/index.tsx +21 -0
  48. package/src/app/(main)/chat/(workspace)/@portal/features/Header.tsx +1 -1
  49. package/src/app/(main)/chat/(workspace)/@portal/index.tsx +12 -6
  50. package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/style.ts +8 -4
  51. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem.tsx +1 -1
  52. package/src/app/(main)/chat/(workspace)/_layout/Desktop/Portal.tsx +7 -7
  53. package/src/app/(main)/chat/(workspace)/_layout/Desktop/TopicPanel.tsx +3 -3
  54. package/src/app/(main)/chat/(workspace)/_layout/Desktop/index.tsx +2 -2
  55. package/src/app/(main)/chat/(workspace)/features/ShareButton/style.ts +6 -6
  56. package/src/app/(main)/chat/@session/_layout/Desktop/PanelBody.tsx +3 -1
  57. package/src/app/(main)/chat/@session/_layout/Desktop/SessionHeader.tsx +1 -1
  58. package/src/app/(main)/chat/@session/features/SessionListContent/ListItem/index.tsx +2 -5
  59. package/src/app/(main)/chat/@session/features/SkeletonList.tsx +2 -3
  60. package/src/app/(main)/chat/features/Migration/Start.tsx +1 -1
  61. package/src/app/(main)/chat/settings/features/SubmitAgentButton/style.ts +4 -3
  62. package/src/app/(main)/market/@detail/features/TokenTag.tsx +2 -1
  63. package/src/app/(main)/market/@detail/features/style.ts +4 -3
  64. package/src/app/(main)/market/_layout/Desktop/DetailSidebar.tsx +1 -1
  65. package/src/app/(main)/market/_layout/Desktop/Hero.tsx +3 -2
  66. package/src/app/(main)/market/features/AgentCard/AgentCardBanner.tsx +1 -1
  67. package/src/app/(main)/market/features/AgentCard/index.tsx +2 -2
  68. package/src/app/(main)/market/features/AgentList.tsx +1 -1
  69. package/src/app/(main)/profile/[[...slugs]]/Client.tsx +4 -3
  70. package/src/app/(main)/settings/_layout/Desktop/SideBar.tsx +4 -2
  71. package/src/app/(main)/settings/about/features/ItemCard.tsx +2 -1
  72. package/src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +5 -1
  73. package/src/app/(main)/settings/llm/components/ProviderModelList/index.tsx +1 -1
  74. package/src/app/(main)/welcome/features/Hero.tsx +1 -1
  75. package/src/components/Menu/index.tsx +4 -3
  76. package/src/components/Notification/index.tsx +4 -4
  77. package/src/database/client/models/message.ts +1 -1
  78. package/src/features/AgentSetting/AgentPlugin/LoadingList.tsx +1 -1
  79. package/src/features/AgentSetting/AgentPlugin/index.tsx +1 -1
  80. package/src/features/Conversation/Error/APIKeyForm/ProviderAvatar.tsx +10 -0
  81. package/src/features/Conversation/Error/OllamaBizError/SetupGuide.tsx +3 -3
  82. package/src/features/Conversation/Messages/Tool/Inspector/index.tsx +4 -4
  83. package/src/features/Conversation/Messages/Tool/Inspector/style.ts +2 -1
  84. package/src/features/Conversation/Messages/Tool/index.tsx +1 -1
  85. package/src/features/Conversation/components/BackBottom/style.ts +6 -6
  86. package/src/features/Conversation/components/InboxWelcome/QuestionSuggest.tsx +4 -2
  87. package/src/features/Conversation/components/InboxWelcome/index.tsx +5 -7
  88. package/src/features/PluginsUI/Render/Loading.tsx +4 -4
  89. package/src/features/User/DataStatistics.tsx +2 -1
  90. package/src/features/User/UserPanel/index.tsx +2 -2
  91. package/src/locales/default/plugin.ts +1 -1
  92. package/src/locales/default/portal.ts +8 -2
  93. package/src/store/chat/slices/message/action.ts +1 -1
  94. package/src/store/chat/slices/plugin/action.ts +25 -1
  95. package/src/store/chat/slices/portal/action.test.ts +14 -14
  96. package/src/store/chat/slices/portal/action.ts +5 -5
  97. package/src/store/chat/slices/portal/initialState.ts +3 -3
  98. package/src/store/chat/slices/portal/selectors.test.ts +18 -18
  99. package/src/store/chat/slices/portal/selectors.ts +9 -9
  100. package/src/tools/dalle/Render/Item/index.tsx +2 -2
  101. package/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/index.tsx +0 -39
@@ -9,7 +9,7 @@ import Footer from './Footer';
9
9
  import ToolRender from './ToolRender';
10
10
 
11
11
  const ToolUI = () => {
12
- const messageId = useChatStore(chatPortalSelectors.toolUIMessageId);
12
+ const messageId = useChatStore(chatPortalSelectors.artifactMessageId);
13
13
  const message = useChatStore(chatSelectors.getMessageById(messageId || ''), isEqual);
14
14
 
15
15
  // make sure the message and id is valid
@@ -26,7 +26,7 @@ const ToolUI = () => {
26
26
 
27
27
  return (
28
28
  <>
29
- <Flexbox height={'100%'} paddingInline={12}>
29
+ <Flexbox flex={1} height={'100%'} paddingInline={12}>
30
30
  <ToolRender />
31
31
  </Flexbox>
32
32
  <Footer />
@@ -15,13 +15,13 @@ import { ChatPluginPayload } from '@/types/message';
15
15
 
16
16
  import { useStyles } from './style';
17
17
 
18
- export interface InspectorProps {
18
+ export interface ArtifactItemProps {
19
19
  identifier?: string;
20
20
  messageId: string;
21
21
  payload?: ChatPluginPayload;
22
22
  }
23
23
 
24
- const Inspector = memo<InspectorProps>(({ payload, messageId, identifier = 'unknown' }) => {
24
+ const ArtifactItem = memo<ArtifactItemProps>(({ payload, messageId, identifier = 'unknown' }) => {
25
25
  const { t } = useTranslation('plugin');
26
26
  const { styles, cx } = useStyles();
27
27
 
@@ -71,4 +71,4 @@ const Inspector = memo<InspectorProps>(({ payload, messageId, identifier = 'unkn
71
71
  );
72
72
  });
73
73
 
74
- export default Inspector;
74
+ export default ArtifactItem;
@@ -5,12 +5,13 @@ export const useStyles = createStyles(({ css, token }) => ({
5
5
  cursor: pointer;
6
6
 
7
7
  width: 100%;
8
- padding: 10px 8px;
8
+ padding-block: 10px;
9
+ padding-inline: 8px;
9
10
  padding-inline-end: 12px;
10
11
 
11
12
  color: ${token.colorText};
12
13
 
13
- background: ${token.colorBgContainer};
14
+ background: ${token.colorBgElevated};
14
15
  border-radius: 8px;
15
16
 
16
17
  &:hover {
@@ -0,0 +1,61 @@
1
+ import { Avatar, Icon } from '@lobehub/ui';
2
+ import { Skeleton, Typography } from 'antd';
3
+ import { useTheme } from 'antd-style';
4
+ import isEqual from 'fast-deep-equal';
5
+ import { Origami } from 'lucide-react';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { Center, Flexbox } from 'react-layout-kit';
8
+ import Balancer from 'react-wrap-balancer';
9
+
10
+ import { useChatStore } from '@/store/chat';
11
+ import { chatSelectors } from '@/store/chat/selectors';
12
+
13
+ import ArtifactItem from './Item';
14
+
15
+ const ArtifactList = () => {
16
+ const { t } = useTranslation('portal');
17
+ const messages = useChatStore(chatSelectors.currentToolMessages, isEqual);
18
+ const isCurrentChatLoaded = useChatStore(chatSelectors.isCurrentChatLoaded);
19
+
20
+ const theme = useTheme();
21
+ return !isCurrentChatLoaded ? (
22
+ <Flexbox gap={12} paddingInline={12}>
23
+ {[1, 1, 1, 1, 1, 1].map((key, index) => (
24
+ <Skeleton.Button
25
+ active
26
+ block
27
+ key={`${key}-${index}`}
28
+ style={{ borderRadius: 8, height: 68 }}
29
+ />
30
+ ))}
31
+ </Flexbox>
32
+ ) : messages.length === 0 ? (
33
+ <Center
34
+ gap={8}
35
+ paddingBlock={24}
36
+ style={{ border: `1px dashed ${theme.colorSplit}`, borderRadius: 8, marginInline: 12 }}
37
+ >
38
+ <Avatar
39
+ avatar={<Icon icon={Origami} size={'large'} />}
40
+ background={theme.colorFillTertiary}
41
+ size={48}
42
+ />
43
+ <Balancer>
44
+ <Typography.Link type={'secondary'}>{t('emptyArtifactList')}</Typography.Link>
45
+ </Balancer>
46
+ </Center>
47
+ ) : (
48
+ <Flexbox gap={12} paddingInline={12}>
49
+ {messages.map((m) => (
50
+ <ArtifactItem
51
+ identifier={m.plugin?.identifier}
52
+ key={m.id}
53
+ messageId={m.id}
54
+ payload={m.plugin}
55
+ />
56
+ ))}
57
+ </Flexbox>
58
+ );
59
+ };
60
+
61
+ export default ArtifactList;
@@ -0,0 +1,21 @@
1
+ import { Typography } from 'antd';
2
+ import { memo } from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { Flexbox } from 'react-layout-kit';
5
+
6
+ import ToolList from './ArtifactList';
7
+
8
+ export const Artifacts = memo(() => {
9
+ const { t } = useTranslation('portal');
10
+
11
+ return (
12
+ <Flexbox gap={8}>
13
+ <Typography.Title level={5} style={{ marginInline: 12 }}>
14
+ {t('Artifacts')}
15
+ </Typography.Title>
16
+ <ToolList />
17
+ </Flexbox>
18
+ );
19
+ });
20
+
21
+ export default Artifacts;
@@ -17,7 +17,7 @@ import { toolSelectors } from '@/store/tool/selectors';
17
17
 
18
18
  const Header = memo(() => {
19
19
  const [showToolUI, toggleInspector, closeToolUI, toolUIIdentifier = ''] = useChatStore((s) => [
20
- chatPortalSelectors.showToolUI(s),
20
+ chatPortalSelectors.showArtifactUI(s),
21
21
  s.toggleDock,
22
22
  s.closeToolUI,
23
23
  chatPortalSelectors.toolUIIdentifier(s),
@@ -6,13 +6,19 @@ import { Flexbox } from 'react-layout-kit';
6
6
  import { useChatStore } from '@/store/chat';
7
7
  import { chatPortalSelectors } from '@/store/chat/selectors';
8
8
 
9
- import ToolList from './features/Tools/ToolList';
10
- import ToolUI from './features/Tools/ToolUI';
9
+ import ToolUI from './features/ArtifactUI';
10
+ import Artifacts from './features/Artifacts';
11
11
 
12
- const Inspector = memo(() => {
13
- const showToolUI = useChatStore(chatPortalSelectors.showToolUI);
12
+ const PortalView = memo(() => {
13
+ const showToolUI = useChatStore(chatPortalSelectors.showArtifactUI);
14
14
 
15
- return <Flexbox height={'100%'}>{showToolUI ? <ToolUI /> : <ToolList />}</Flexbox>;
15
+ if (showToolUI) return <ToolUI />;
16
+
17
+ return (
18
+ <Flexbox height={'100%'}>
19
+ <Artifacts />
20
+ </Flexbox>
21
+ );
16
22
  });
17
23
 
18
- export default Inspector;
24
+ export default PortalView;
@@ -3,8 +3,12 @@ import { createStyles } from 'antd-style';
3
3
  export const useStyles = createStyles(({ css, token }) => ({
4
4
  prompt: css`
5
5
  overflow: hidden auto;
6
- padding: 0 16px 16px;
6
+
7
+ padding-block: 0 16px;
8
+ padding-inline: 16px;
9
+
7
10
  opacity: 0.75;
11
+
8
12
  transition: opacity 200ms ${token.motionEaseOut};
9
13
 
10
14
  &:hover {
@@ -14,15 +18,15 @@ export const useStyles = createStyles(({ css, token }) => ({
14
18
  promptBox: css`
15
19
  position: relative;
16
20
  overflow: hidden;
17
- border-bottom: 1px solid ${token.colorBorder};
21
+ border-block-end: 1px solid ${token.colorBorder};
18
22
  `,
19
23
  promptMask: css`
20
24
  pointer-events: none;
21
25
 
22
26
  position: absolute;
23
27
  z-index: 10;
24
- bottom: 0;
25
- left: 0;
28
+ inset-block-end: 0;
29
+ inset-inline-start: 0;
26
30
 
27
31
  width: 100%;
28
32
  height: 32px;
@@ -35,7 +35,7 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
35
35
  }
36
36
  `,
37
37
  split: css`
38
- border-bottom: 1px solid ${token.colorSplit};
38
+ border-block-end: 1px solid ${token.colorSplit};
39
39
  `,
40
40
  }));
41
41
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { DraggablePanel, DraggablePanelContainer } from '@lobehub/ui';
4
4
  import { createStyles, useResponsive } from 'antd-style';
5
+ import { rgba } from 'polished';
5
6
  import { PropsWithChildren, memo } from 'react';
6
7
  import { Flexbox } from 'react-layout-kit';
7
8
 
@@ -10,7 +11,7 @@ import { CHAT_DOCK_TOOL_UI_WIDTH, CHAT_DOCK_WIDTH, MAX_WIDTH } from '@/const/lay
10
11
  import { useChatStore } from '@/store/chat';
11
12
  import { chatPortalSelectors } from '@/store/chat/slices/portal/selectors';
12
13
 
13
- const useStyles = createStyles(({ css, token }) => ({
14
+ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
14
15
  content: css`
15
16
  display: flex;
16
17
  flex-direction: column;
@@ -21,16 +22,15 @@ const useStyles = createStyles(({ css, token }) => ({
21
22
  background: ${token.colorBgLayout};
22
23
  `,
23
24
  header: css`
24
- border-bottom: 1px solid ${token.colorBorder};
25
+ border-block-end: 1px solid ${token.colorBorder};
25
26
  `,
26
27
  panel: css`
27
28
  overflow: hidden;
28
29
 
29
30
  height: 100%;
30
- margin: 12px;
31
+ margin: 4px;
31
32
 
32
- background: ${token.colorBgContainer};
33
- border: 1px solid ${token.colorPrimaryActive};
33
+ background: ${isDarkMode ? rgba(token.colorBgElevated, 0.8) : token.colorBgElevated};
34
34
  border-radius: 8px;
35
35
  `,
36
36
  }));
@@ -40,8 +40,8 @@ const PortalPanel = memo(({ children }: PropsWithChildren) => {
40
40
  const { md = true } = useResponsive();
41
41
 
42
42
  const [showInspector, showToolUI] = useChatStore((s) => [
43
- chatPortalSelectors.showDock(s),
44
- chatPortalSelectors.showToolUI(s),
43
+ chatPortalSelectors.showPortal(s),
44
+ chatPortalSelectors.showArtifactUI(s),
45
45
  ]);
46
46
 
47
47
  return (
@@ -23,7 +23,7 @@ const useStyles = createStyles(({ css, token }) => ({
23
23
  background: ${token.colorBgLayout};
24
24
  `,
25
25
  header: css`
26
- border-bottom: 1px solid ${token.colorBorder};
26
+ border-block-end: 1px solid ${token.colorBorder};
27
27
  `,
28
28
  }));
29
29
 
@@ -34,7 +34,7 @@ const TopicPanel = memo(({ children }: PropsWithChildren) => {
34
34
  systemStatusSelectors.showChatSideBar(s),
35
35
  s.toggleChatSideBar,
36
36
  ]);
37
- const showInspector = useChatStore(chatPortalSelectors.showDock);
37
+ const showPortal = useChatStore(chatPortalSelectors.showPortal);
38
38
 
39
39
  const [cacheExpand, setCacheExpand] = useState<boolean>(Boolean(showAgentSettings));
40
40
 
@@ -50,7 +50,7 @@ const TopicPanel = memo(({ children }: PropsWithChildren) => {
50
50
  }, [lg, cacheExpand]);
51
51
 
52
52
  return (
53
- !showInspector && (
53
+ !showPortal && (
54
54
  <DraggablePanel
55
55
  className={styles.drawer}
56
56
  classNames={{
@@ -2,8 +2,8 @@ import { Flexbox } from 'react-layout-kit';
2
2
 
3
3
  import { LayoutProps } from '../type';
4
4
  import ChatHeader from './ChatHeader';
5
- import Inspector from './Portal';
6
5
  import HotKeys from './HotKeys';
6
+ import Portal from './Portal';
7
7
  import TopicPanel from './TopicPanel';
8
8
 
9
9
  const Layout = ({ children, topic, conversation, portal }: LayoutProps) => {
@@ -24,7 +24,7 @@ const Layout = ({ children, topic, conversation, portal }: LayoutProps) => {
24
24
  {conversation}
25
25
  </Flexbox>
26
26
  {children}
27
- <Inspector>{portal}</Inspector>
27
+ <Portal>{portal}</Portal>
28
28
  <TopicPanel>{topic}</TopicPanel>
29
29
  </Flexbox>
30
30
  <HotKeys />
@@ -25,13 +25,13 @@ export const useStyles = createStyles(({ css, token, stylish, cx }, withBackgrou
25
25
  ),
26
26
  footer: css`
27
27
  padding: 16px;
28
- border-top: 1px solid ${token.colorBorder};
28
+ border-block-start: 1px solid ${token.colorBorder};
29
29
  `,
30
30
  header: css`
31
- margin-bottom: -24px;
31
+ margin-block-end: -24px;
32
32
  padding: 16px;
33
33
  background: ${token.colorBgContainer};
34
- border-bottom: 1px solid ${token.colorBorder};
34
+ border-block-end: 1px solid ${token.colorBorder};
35
35
  `,
36
36
  preview: cx(
37
37
  stylish.noScrollbar,
@@ -56,10 +56,10 @@ export const useStyles = createStyles(({ css, token, stylish, cx }, withBackgrou
56
56
  `,
57
57
  ),
58
58
  role: css`
59
- margin-top: 12px;
60
- padding-top: 12px;
59
+ margin-block-start: 12px;
60
+ padding-block-start: 12px;
61
61
  opacity: 0.75;
62
- border-top: 1px dashed ${token.colorBorderSecondary};
62
+ border-block-start: 1px dashed ${token.colorBorderSecondary};
63
63
 
64
64
  * {
65
65
  font-size: 12px !important;
@@ -9,7 +9,9 @@ const useStyles = createStyles(
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  gap: 2px;
12
- padding: 8px 8px 0;
12
+
13
+ padding-block: 8px 0;
14
+ padding-inline: 8px;
13
15
  `,
14
16
  );
15
17
 
@@ -22,7 +22,7 @@ export const useStyles = createStyles(({ css, token }) => ({
22
22
  `,
23
23
  top: css`
24
24
  position: sticky;
25
- top: 0;
25
+ inset-block-start: 0;
26
26
  `,
27
27
  }));
28
28
 
@@ -11,16 +11,13 @@ const useStyles = createStyles(({ css, token }) => {
11
11
  return {
12
12
  container: css`
13
13
  position: relative;
14
-
15
14
  margin-block: 2px;
16
- padding-right: 16px;
17
- padding-left: 8px;
18
-
15
+ padding-inline: 8px 16px;
19
16
  border-radius: ${token.borderRadius}px;
20
17
  `,
21
18
  mobile: css`
22
19
  margin-block: 0;
23
- padding-left: 12px;
20
+ padding-inline-start: 12px;
24
21
  border-radius: 0;
25
22
  `,
26
23
  title: css`
@@ -8,7 +8,7 @@ import { Flexbox } from 'react-layout-kit';
8
8
  const useStyles = createStyles(({ css }) => ({
9
9
  paragraph: css`
10
10
  height: 12px !important;
11
- margin-top: 12px !important;
11
+ margin-block-start: 12px !important;
12
12
 
13
13
  > li {
14
14
  height: 12px !important;
@@ -16,8 +16,7 @@ const useStyles = createStyles(({ css }) => ({
16
16
  `,
17
17
  title: css`
18
18
  height: 14px !important;
19
- margin-top: 4px !important;
20
- margin-bottom: 12px !important;
19
+ margin-block: 4px 12px !important;
21
20
 
22
21
  > li {
23
22
  height: 14px !important;
@@ -35,7 +35,7 @@ const useStyles = createStyles(({ css, token, isDarkMode, responsive }) => ({
35
35
  intro: css`
36
36
  ${responsive.mobile} {
37
37
  width: 350px;
38
- margin-top: 24px;
38
+ margin-block-start: 24px;
39
39
  line-height: ${token.lineHeight};
40
40
  }
41
41
  `,
@@ -10,8 +10,9 @@ export const useStyles = createStyles(({ css, token, prefixCls }) => ({
10
10
  `,
11
11
  container: css`
12
12
  position: relative;
13
- padding: 16px 16px 24px;
14
- border-bottom: 1px solid ${token.colorBorderSecondary};
13
+ padding-block: 16px 24px;
14
+ padding-inline: 16px;
15
+ border-block-end: 1px solid ${token.colorBorderSecondary};
15
16
  `,
16
17
  date: css`
17
18
  font-size: 12px;
@@ -28,7 +29,7 @@ export const useStyles = createStyles(({ css, token, prefixCls }) => ({
28
29
  }
29
30
  `,
30
31
  nav: css`
31
- padding-top: 4px;
32
+ padding-block-start: 4px;
32
33
 
33
34
  .${prefixCls}-tabs-tab {
34
35
  margin: 4px !important;
@@ -5,7 +5,8 @@ import { useTokenCount } from '@/hooks/useTokenCount';
5
5
 
6
6
  const useStyles = createStyles(
7
7
  ({ css, token }) => css`
8
- padding: 2px 5px;
8
+ padding-block: 2px;
9
+ padding-inline: 5px;
9
10
 
10
11
  font-size: 12px;
11
12
  line-height: 1;
@@ -6,8 +6,9 @@ export const useStyles = createStyles(({ css, token, prefixCls }) => ({
6
6
  `,
7
7
  container: css`
8
8
  position: relative;
9
- padding: 16px 16px 24px;
10
- border-bottom: 1px solid ${token.colorBorderSecondary};
9
+ padding-block: 16px 24px;
10
+ padding-inline: 16px;
11
+ border-block-end: 1px solid ${token.colorBorderSecondary};
11
12
  `,
12
13
  desc: css`
13
14
  color: ${token.colorTextSecondary};
@@ -24,7 +25,7 @@ export const useStyles = createStyles(({ css, token, prefixCls }) => ({
24
25
  color: ${token.colorTextDescription};
25
26
  `,
26
27
  title: css`
27
- margin-bottom: 0;
28
+ margin-block-end: 0;
28
29
  font-weight: bold;
29
30
  text-align: center;
30
31
  `,
@@ -19,7 +19,7 @@ const useStyles = createStyles(({ css, token, stylish }) => ({
19
19
  background: ${token.colorBgContainer};
20
20
  `,
21
21
  header: css`
22
- border-bottom: 1px solid ${token.colorBorder};
22
+ border-block-end: 1px solid ${token.colorBorder};
23
23
  `,
24
24
  noScrollbar: stylish.noScrollbar,
25
25
  }));
@@ -8,7 +8,8 @@ import { Center } from 'react-layout-kit';
8
8
  const useStyles = createStyles(({ css, responsive }) => ({
9
9
  background: css`
10
10
  width: 80%;
11
- margin: -60px 0 -20px;
11
+ margin-block: -60px -20px;
12
+ margin-inline: 0;
12
13
 
13
14
  ${responsive.md} {
14
15
  display: none;
@@ -17,7 +18,7 @@ const useStyles = createStyles(({ css, responsive }) => ({
17
18
  title: css`
18
19
  z-index: 2;
19
20
 
20
- margin-top: 24px;
21
+ margin-block-start: 24px;
21
22
 
22
23
  font-size: min(56px, 5vw);
23
24
  font-weight: 800;
@@ -10,7 +10,7 @@ export const useStyles = createStyles(({ css, token }) => ({
10
10
  overflow: hidden;
11
11
 
12
12
  height: 64px;
13
- margin-bottom: -56px;
13
+ margin-block-end: -56px;
14
14
 
15
15
  background: ${token.colorFillSecondary};
16
16
  `,
@@ -39,7 +39,7 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
39
39
  `,
40
40
  desc: css`
41
41
  min-height: 44px;
42
- margin-bottom: 0 !important;
42
+ margin-block-end: 0 !important;
43
43
  color: ${token.colorTextDescription};
44
44
  `,
45
45
  inner: css`
@@ -49,7 +49,7 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
49
49
  color: ${token.colorTextDescription};
50
50
  `,
51
51
  title: css`
52
- margin-bottom: 0 !important;
52
+ margin-block-end: 0 !important;
53
53
  font-size: 18px !important;
54
54
  font-weight: bold;
55
55
  `,
@@ -20,7 +20,7 @@ const useStyles = createStyles(({ css, responsive }) => ({
20
20
  min-height: 332px;
21
21
  `,
22
22
  title: css`
23
- margin-top: 0.5em;
23
+ margin-block-start: 0.5em;
24
24
  font-size: 24px;
25
25
  font-weight: 600;
26
26
  ${responsive.mobile} {
@@ -28,11 +28,12 @@ export const useStyles = createStyles(
28
28
 
29
29
  width: 280px;
30
30
  max-width: unset;
31
- margin-right: 0;
32
- padding: 24px 12px 16px;
31
+ margin-inline-end: 0;
32
+ padding-block: 24px 16px;
33
+ padding-inline: 12px;
33
34
 
34
35
  background: ${token.colorBgContainer};
35
- border-right: 1px solid ${token.colorSplit};
36
+ border-inline-end: 1px solid ${token.colorSplit};
36
37
  `,
37
38
  navbarMobileMenuRow: cx(
38
39
  mobile &&
@@ -8,7 +8,8 @@ import BrandWatermark from '@/components/BrandWatermark';
8
8
 
9
9
  const useStyles = createStyles(({ token, css }) => ({
10
10
  container: css`
11
- padding: 24px 12px 16px;
11
+ padding-block: 24px 16px;
12
+ padding-inline: 12px;
12
13
  background: ${token.colorBgContainer};
13
14
  border-inline-end: 1px solid ${token.colorBorder};
14
15
  `,
@@ -17,7 +18,8 @@ const useStyles = createStyles(({ token, css }) => ({
17
18
  color: ${token.colorTextDescription};
18
19
  `,
19
20
  header: css`
20
- padding: 0 0.75rem;
21
+ padding-block: 0;
22
+ padding-inline: 0.75rem;
21
23
  `,
22
24
  logo: css`
23
25
  fill: ${token.colorText};
@@ -9,7 +9,8 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
9
9
  card: css`
10
10
  cursor: pointer;
11
11
 
12
- padding: 12px 16px;
12
+ padding-block: 12px;
13
+ padding-inline: 16px;
13
14
 
14
15
  background: ${isDarkMode ? token.colorFillTertiary : token.colorBgContainer};
15
16
  border: 1px solid ${token.colorFillSecondary};
@@ -18,8 +18,12 @@ import { GlobalLLMProviderKey } from '@/types/user/settings';
18
18
  const useStyles = createStyles(({ css, token }) => ({
19
19
  hover: css`
20
20
  cursor: pointer;
21
- padding: 4px 8px;
21
+
22
+ padding-block: 4px;
23
+ padding-inline: 8px;
24
+
22
25
  border-radius: ${token.borderRadius}px;
26
+
23
27
  transition: all 0.2s ease-in-out;
24
28
 
25
29
  &:hover {
@@ -33,7 +33,7 @@ const styles = {
33
33
  reset: css`
34
34
  position: absolute;
35
35
  z-index: 20;
36
- top: 50%;
36
+ inset-block-start: 50%;
37
37
  inset-inline-end: 28px;
38
38
  transform: translateY(-50%);
39
39
  `,
@@ -16,7 +16,7 @@ const useStyles = createStyles(({ css, token }) => {
16
16
  text-wrap: balance;
17
17
  `,
18
18
  title: css`
19
- margin-bottom: 0;
19
+ margin-block-end: 0;
20
20
 
21
21
  font-size: min(56px, 7vw);
22
22
  font-weight: 800;
@@ -18,11 +18,11 @@ const useStyles = createStyles(({ css, token, prefixCls }) => ({
18
18
  border-color: ${token.colorFillTertiary};
19
19
 
20
20
  &:first-child {
21
- margin-top: 0;
21
+ margin-block-start: 0;
22
22
  }
23
23
 
24
24
  &:last-child {
25
- margin-bottom: 0;
25
+ margin-block-end: 0;
26
26
  }
27
27
  }
28
28
 
@@ -33,7 +33,8 @@ const useStyles = createStyles(({ css, token, prefixCls }) => ({
33
33
 
34
34
  height: unset;
35
35
  min-height: 2rem;
36
- padding: 0.375rem 0.75rem;
36
+ padding-block: 0.375rem;
37
+ padding-inline: 0.75rem;
37
38
 
38
39
  line-height: 2;
39
40