@lobehub/ui 5.52.0 → 5.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -3
- package/es/awesome/BottomGradientButton/BottomGradientButton.mjs +2 -2
- package/es/awesome/BottomGradientButton/BottomGradientButton.mjs.map +1 -1
- package/es/awesome/BottomGradientButton/index.d.mts +1 -1
- package/es/awesome/BottomGradientButton/style.mjs +4 -1
- package/es/awesome/BottomGradientButton/style.mjs.map +1 -1
- package/es/awesome/BottomGradientButton/type.d.mts +2 -2
- package/es/awesome/GradientButton/GradientButton.mjs +2 -2
- package/es/awesome/GradientButton/GradientButton.mjs.map +1 -1
- package/es/awesome/GradientButton/type.d.mts +2 -2
- package/es/awesome/Hero/Hero.mjs +35 -29
- package/es/awesome/Hero/Hero.mjs.map +1 -1
- package/es/awesome/Hero/style.mjs +4 -0
- package/es/awesome/Hero/style.mjs.map +1 -1
- package/es/awesome/index.d.mts +1 -1
- package/es/awesome/landingActions.mjs +1 -1
- package/es/awesome/landingActions.mjs.map +1 -1
- package/es/base-ui/Input/style.d.mts +1 -1
- package/es/base-ui/Input/style.mjs +5 -0
- package/es/base-ui/Input/style.mjs.map +1 -1
- package/es/base-ui/index.d.mts +5 -5
- package/es/chat/BackBottom/BackBottom.mjs +4 -4
- package/es/chat/BackBottom/BackBottom.mjs.map +1 -1
- package/es/chat/BackBottom/type.d.mts +3 -4
- package/es/chat/ChatInputArea/ChatInputArea.mjs +32 -24
- package/es/chat/ChatInputArea/ChatInputArea.mjs.map +1 -1
- package/es/chat/ChatInputArea/components/ChatInputAreaInner.mjs +1 -1
- package/es/chat/ChatInputArea/components/ChatInputAreaInner.mjs.map +1 -1
- package/es/chat/ChatInputArea/components/ChatSendButton.mjs +1 -1
- package/es/chat/ChatInputArea/components/ChatSendButton.mjs.map +1 -1
- package/es/chat/ChatInputArea/style.mjs +12 -1
- package/es/chat/ChatInputArea/style.mjs.map +1 -1
- package/es/chat/ChatInputArea/type.d.mts +7 -8
- package/es/chat/ChatItem/components/Avatar.mjs +1 -1
- package/es/chat/ChatItem/components/Avatar.mjs.map +1 -1
- package/es/chat/ChatItem/components/ErrorContent.mjs +1 -1
- package/es/chat/ChatItem/components/ErrorContent.mjs.map +1 -1
- package/es/chat/ChatItem/type.d.mts +4 -4
- package/es/chat/ChatList/ChatList.mjs +4 -3
- package/es/chat/ChatList/ChatList.mjs.map +1 -1
- package/es/chat/ChatList/components/ChatListItem.mjs +3 -5
- package/es/chat/ChatList/components/ChatListItem.mjs.map +1 -1
- package/es/chat/ChatList/components/HistoryDivider.mjs +1 -1
- package/es/chat/ChatList/components/HistoryDivider.mjs.map +1 -1
- package/es/chat/ChatList/type.d.mts +2 -2
- package/es/chat/EditableMessageList/EditableMessageList.mjs +2 -3
- package/es/chat/EditableMessageList/EditableMessageList.mjs.map +1 -1
- package/es/chat/MessageInput/MessageInput.mjs +3 -3
- package/es/chat/MessageInput/MessageInput.mjs.map +1 -1
- package/es/chat/MessageInput/type.d.mts +2 -2
- package/es/chat/MessageModal/MessageModal.mjs +4 -5
- package/es/chat/MessageModal/MessageModal.mjs.map +1 -1
- package/es/chat/MessageModal/type.d.mts +3 -3
- package/es/chat/TokenTag/TokenTag.mjs +1 -1
- package/es/chat/TokenTag/TokenTag.mjs.map +1 -1
- package/es/color/ColorScales/ScaleRow.mjs +6 -4
- package/es/color/ColorScales/ScaleRow.mjs.map +1 -1
- package/es/color/ColorScales/index.mjs +10 -9
- package/es/color/ColorScales/index.mjs.map +1 -1
- package/es/color/CssVar/ScaleRow.mjs +6 -4
- package/es/color/CssVar/ScaleRow.mjs.map +1 -1
- package/es/color/CssVar/VarRow.mjs +6 -4
- package/es/color/CssVar/VarRow.mjs.map +1 -1
- package/es/color/CssVar/index.mjs +10 -9
- package/es/color/CssVar/index.mjs.map +1 -1
- package/es/eslint/index.mjs +100 -0
- package/es/eslint/index.mjs.map +1 -1
- package/es/mobile/ChatInputArea/ChatInputArea.mjs +1 -1
- package/es/mobile/ChatInputArea/ChatInputArea.mjs.map +1 -1
- package/es/mobile/ChatInputArea/components/ChatSendButton.mjs +1 -1
- package/es/mobile/ChatInputArea/components/ChatSendButton.mjs.map +1 -1
- package/es/mobile/ChatInputArea/type.d.mts +6 -7
- package/es/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.mjs.map +1 -1
- package/es/static-css/baseline.mjs +0 -2
- package/es/static-css/baseline.mjs.map +1 -1
- package/es/storybook/StoryBook/index.mjs +1 -1
- package/es/storybook/StoryBook/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
|
|
3
|
+
import { ToastHost } from "../../base-ui/Toast/imperative.mjs";
|
|
3
4
|
import { styles } from "./style.mjs";
|
|
4
5
|
import ScaleRow from "./ScaleRow.mjs";
|
|
5
6
|
import { memo } from "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Space } from "antd";
|
|
8
8
|
//#region src/color/ColorScales/index.tsx
|
|
9
9
|
const ColorScales = memo(({ name, scale, midHighLight }) => {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
11
11
|
horizontal: true,
|
|
12
12
|
align: "center",
|
|
13
13
|
flex: 1,
|
|
14
14
|
justify: "center",
|
|
15
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
15
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
16
16
|
style: { padding: "8px 16px 32px 0" },
|
|
17
|
-
children: /* @__PURE__ */ jsxs(
|
|
18
|
-
|
|
19
|
-
size: 2,
|
|
17
|
+
children: /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
18
|
+
gap: 2,
|
|
20
19
|
children: [
|
|
21
|
-
/* @__PURE__ */ jsxs(
|
|
22
|
-
|
|
20
|
+
/* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
21
|
+
horizontal: true,
|
|
22
|
+
align: "center",
|
|
23
|
+
gap: 2,
|
|
23
24
|
children: [/* @__PURE__ */ jsx(FlexBasic_default, {
|
|
24
25
|
horizontal: true,
|
|
25
26
|
align: "center",
|
|
@@ -68,7 +69,7 @@ const ColorScales = memo(({ name, scale, midHighLight }) => {
|
|
|
68
69
|
}, "darkA")
|
|
69
70
|
]
|
|
70
71
|
})
|
|
71
|
-
})
|
|
72
|
+
}), /* @__PURE__ */ jsx(ToastHost, {})]
|
|
72
73
|
});
|
|
73
74
|
});
|
|
74
75
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Flexbox"],"sources":["../../../src/color/ColorScales/index.tsx"],"sourcesContent":["'use client';\n\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Flexbox"],"sources":["../../../src/color/ColorScales/index.tsx"],"sourcesContent":["'use client';\n\nimport { memo } from 'react';\n\nimport { ToastHost } from '@/base-ui/Toast';\nimport { Flexbox } from '@/Flex';\n\nimport type { ColorScaleItem } from '../types';\nimport ScaleRow from './ScaleRow';\nimport { styles } from './style';\n\nexport interface ColorScalesProps {\n /**\n * @description Index of the mid highlight color in the scale\n */\n midHighLight: number;\n /**\n * @description Name of the color scale\n */\n name: string;\n /**\n * @description Color scale item object\n */\n scale: ColorScaleItem;\n}\n\nconst ColorScales = memo<ColorScalesProps>(({ name, scale, midHighLight }) => {\n return (\n <Flexbox horizontal align={'center'} flex={1} justify={'center'}>\n <div style={{ padding: '8px 16px 32px 0' }}>\n <Flexbox gap={2}>\n <Flexbox horizontal align={'center'} gap={2} key=\"scale-title\">\n <Flexbox horizontal align={'center'} className={styles.scaleRowTitle} key=\"scale-num\" />\n {Array.from({ length: scale.light.length })\n .fill('')\n .map((_, index) => {\n if (index === 0 || index === 12) return false;\n\n const isMidHighlight = midHighLight === index;\n\n return (\n <div className={styles.scaleBox} key={`num${index}`}>\n <div className={styles.scaleBox}>\n <Flexbox\n horizontal\n align={'center'}\n className={styles.scaleItem}\n justify={'center'}\n style={{\n fontWeight: isMidHighlight ? 700 : 400,\n opacity: 0.5,\n }}\n >\n {index}\n </Flexbox>\n </div>\n </div>\n );\n })}\n </Flexbox>\n <ScaleRow key=\"light\" name={name} scale={scale.light} title=\"light\" />\n <ScaleRow key=\"lightA\" name={name} scale={scale.lightA} title=\"lightA\" />\n <ScaleRow key=\"dark\" name={name} scale={scale.dark} title=\"dark\" />\n <ScaleRow key=\"darkA\" name={name} scale={scale.darkA} title=\"darkA\" />\n </Flexbox>\n </div>\n <ToastHost />\n </Flexbox>\n );\n});\n\nexport default ColorScales;\n"],"mappings":";;;;;;;;AA0BA,MAAM,cAAc,MAAwB,EAAE,MAAM,OAAO,mBAAmB;CAC5E,OACE,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAU,MAAM;EAAG,SAAS;EAAvD,UAAA,CACE,oBAAC,OAAD;GAAK,OAAO,EAAE,SAAS,kBAAkB;GACvC,UAAA,qBAACA,mBAAD;IAAS,KAAK;IAAd,UAAA;KACE,qBAACA,mBAAD;MAAS,YAAA;MAAW,OAAO;MAAU,KAAK;MAA1C,UAAA,CACE,oBAACA,mBAAD;OAAS,YAAA;OAAW,OAAO;OAAU,WAAW,OAAO;MAAgC,GAAb,WAAa,GACtF,MAAM,KAAK,EAAE,QAAQ,MAAM,MAAM,OAAO,CAAC,CAAC,CACxC,KAAK,EAAE,CAAC,CACR,KAAK,GAAG,UAAU;OACjB,IAAI,UAAU,KAAK,UAAU,IAAI,OAAO;OAExC,MAAM,iBAAiB,iBAAiB;OAExC,OACE,oBAAC,OAAD;QAAK,WAAW,OAAO;QACrB,UAAA,oBAAC,OAAD;SAAK,WAAW,OAAO;SACrB,UAAA,oBAACA,mBAAD;UACE,YAAA;UACA,OAAO;UACP,WAAW,OAAO;UAClB,SAAS;UACT,OAAO;WACL,YAAY,iBAAiB,MAAM;WACnC,SAAS;UACX;UAEC,UAAA;SACM,CAAA;QACN,CAAA;OACF,GAfiC,MAAM,OAevC;MAET,CAAC,CACI;KA5BwC,GAAA,aA4BxC;KACT,oBAAC,UAAD;MAA4B;MAAM,OAAO,MAAM;MAAO,OAAM;KAAS,GAAvD,OAAuD;KACrE,oBAAC,UAAD;MAA6B;MAAM,OAAO,MAAM;MAAQ,OAAM;KAAU,GAA1D,QAA0D;KACxE,oBAAC,UAAD;MAA2B;MAAM,OAAO,MAAM;MAAM,OAAM;KAAQ,GAApD,MAAoD;KAClE,oBAAC,UAAD;MAA4B;MAAM,OAAO,MAAM;MAAO,OAAM;KAAS,GAAvD,OAAuD;IAC9D;;EACN,CAAA,GACL,oBAAC,WAAD,CAAY,CAAA,CACL;;AAEb,CAAC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
|
|
2
2
|
import { copyToClipboard } from "../../utils/copyToClipboard.mjs";
|
|
3
|
+
import { toast } from "../../base-ui/Toast/imperative.mjs";
|
|
3
4
|
import { styles } from "./style.mjs";
|
|
4
5
|
import { memo } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Space, message } from "antd";
|
|
7
7
|
//#region src/color/CssVar/ScaleRow.tsx
|
|
8
8
|
const ScaleRow = memo(({ name, title, scale }) => {
|
|
9
9
|
const style = {};
|
|
10
|
-
return /* @__PURE__ */ jsxs(
|
|
11
|
-
|
|
10
|
+
return /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
11
|
+
horizontal: true,
|
|
12
|
+
align: "center",
|
|
13
|
+
gap: 2,
|
|
12
14
|
children: [/* @__PURE__ */ jsx("div", {
|
|
13
15
|
className: styles.scaleRowTitle,
|
|
14
16
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -24,7 +26,7 @@ const ScaleRow = memo(({ name, title, scale }) => {
|
|
|
24
26
|
onClick: async () => {
|
|
25
27
|
const content = `token.${name}${index} /* ${color} */`;
|
|
26
28
|
await copyToClipboard(content);
|
|
27
|
-
|
|
29
|
+
toast.success(content);
|
|
28
30
|
},
|
|
29
31
|
children: /* @__PURE__ */ jsx(FlexBasic_default, {
|
|
30
32
|
horizontal: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScaleRow.mjs","names":["Flexbox"],"sources":["../../../src/color/CssVar/ScaleRow.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ScaleRow.mjs","names":["Flexbox"],"sources":["../../../src/color/CssVar/ScaleRow.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport { toast } from '@/base-ui/Toast';\nimport { Flexbox } from '@/Flex';\nimport { copyToClipboard } from '@/utils/copyToClipboard';\n\nimport { styles } from './style';\n\nexport interface IScaleRow {\n name: string;\n scale: string[];\n title: 'light' | 'dark';\n}\n\nconst ScaleRow = memo<IScaleRow>(({ name, title, scale }) => {\n const style = {};\n const isAlpha = false;\n\n return (\n <Flexbox horizontal align={'center'} gap={2}>\n <div className={styles.scaleRowTitle} key={title}>\n <div className={styles.text}>{title}</div>\n </div>\n {scale.map((color, index) => {\n if (index === 0 || index === 12) return false;\n\n return (\n <div\n className={styles.scaleBox}\n key={index}\n style={style}\n title={color}\n onClick={async () => {\n const content = `token.${name}${index}${isAlpha ? 'A' : ''} /* ${color} */`;\n\n await copyToClipboard(content);\n toast.success(content);\n }}\n >\n <Flexbox\n horizontal\n align={'center'}\n className={styles.scaleItem}\n justify={'center'}\n style={{ backgroundColor: color }}\n />\n </div>\n );\n })}\n </Flexbox>\n );\n});\n\nexport default ScaleRow;\n"],"mappings":";;;;;;;AAcA,MAAM,WAAW,MAAiB,EAAE,MAAM,OAAO,YAAY;CAC3D,MAAM,QAAQ,CAAC;CAGf,OACE,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAU,KAAK;EAA1C,UAAA,CACE,oBAAC,OAAD;GAAK,WAAW,OAAO;GACrB,UAAA,oBAAC,OAAD;IAAK,WAAW,OAAO;IAAO,UAAA;GAAW,CAAA;EACtC,GAFsC,KAEtC,GACJ,MAAM,KAAK,OAAO,UAAU;GAC3B,IAAI,UAAU,KAAK,UAAU,IAAI,OAAO;GAExC,OACE,oBAAC,OAAD;IACE,WAAW,OAAO;IAEX;IACP,OAAO;IACP,SAAS,YAAY;KACnB,MAAM,UAAU,SAAS,OAAO,MAAA,MAAiC,MAAM;KAEvE,MAAM,gBAAgB,OAAO;KAC7B,MAAM,QAAQ,OAAO;IACvB;IAEA,UAAA,oBAACA,mBAAD;KACE,YAAA;KACA,OAAO;KACP,WAAW,OAAO;KAClB,SAAS;KACT,OAAO,EAAE,iBAAiB,MAAM;IACjC,CAAA;GACE,GAjBE,KAiBF;EAET,CAAC,CACM;;AAEb,CAAC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
|
|
2
2
|
import { copyToClipboard } from "../../utils/copyToClipboard.mjs";
|
|
3
|
+
import { toast } from "../../base-ui/Toast/imperative.mjs";
|
|
3
4
|
import { styles } from "./style.mjs";
|
|
4
5
|
import { memo } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { cssVar } from "antd-style";
|
|
7
|
-
import { Space, message } from "antd";
|
|
8
8
|
//#region src/color/CssVar/VarRow.tsx
|
|
9
9
|
const ScaleRow = memo(({ name }) => {
|
|
10
|
-
return /* @__PURE__ */ jsxs(
|
|
11
|
-
|
|
10
|
+
return /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
11
|
+
horizontal: true,
|
|
12
|
+
align: "center",
|
|
13
|
+
gap: 2,
|
|
12
14
|
children: [/* @__PURE__ */ jsx("div", {
|
|
13
15
|
className: styles.scaleRowTitle,
|
|
14
16
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -33,7 +35,7 @@ const ScaleRow = memo(({ name }) => {
|
|
|
33
35
|
onClick: async () => {
|
|
34
36
|
const content = cssVar[`${name}${color}`];
|
|
35
37
|
await copyToClipboard(content);
|
|
36
|
-
|
|
38
|
+
toast.success(content);
|
|
37
39
|
},
|
|
38
40
|
children: /* @__PURE__ */ jsx(FlexBasic_default, {
|
|
39
41
|
horizontal: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VarRow.mjs","names":["Flexbox"],"sources":["../../../src/color/CssVar/VarRow.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"VarRow.mjs","names":["Flexbox"],"sources":["../../../src/color/CssVar/VarRow.tsx"],"sourcesContent":["import { cssVar } from 'antd-style';\nimport { memo } from 'react';\n\nimport { toast } from '@/base-ui/Toast';\nimport { Flexbox } from '@/Flex';\nimport { copyToClipboard } from '@/utils/copyToClipboard';\n\nimport { styles } from './style';\n\nexport interface IScaleRow {\n name: string;\n}\n\nconst ScaleRow = memo<IScaleRow>(({ name }) => {\n return (\n <Flexbox horizontal align={'center'} gap={2}>\n <div className={styles.scaleRowTitle} key={name}>\n <div className={styles.text}>cssVar</div>\n </div>\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((color) => {\n return (\n <div\n className={styles.scaleBox}\n key={color}\n title={(cssVar as any)[`${name}${color}`] as any}\n onClick={async () => {\n const content = (cssVar as any)[`${name}${color}`] as any;\n\n await copyToClipboard(content);\n toast.success(content);\n }}\n >\n <Flexbox\n horizontal\n align={'center'}\n className={styles.scaleItem}\n justify={'center'}\n style={{ backgroundColor: (cssVar as any)[`${name}${color}`] as any }}\n />\n </div>\n );\n })}\n </Flexbox>\n );\n});\n\nexport default ScaleRow;\n"],"mappings":";;;;;;;;AAaA,MAAM,WAAW,MAAiB,EAAE,WAAW;CAC7C,OACE,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAU,KAAK;EAA1C,UAAA,CACE,oBAAC,OAAD;GAAK,WAAW,OAAO;GACrB,UAAA,oBAAC,OAAD;IAAK,WAAW,OAAO;IAAM,UAAA;GAAW,CAAA;EACrC,GAFsC,IAEtC,GACJ;GAAC;GAAG;GAAG;GAAG;GAAG;GAAG;GAAG;GAAG;GAAG;GAAG;EAAE,CAAC,CAAC,KAAK,UAAU;GAC9C,OACE,oBAAC,OAAD;IACE,WAAW,OAAO;IAElB,OAAQ,OAAe,GAAG,OAAO;IACjC,SAAS,YAAY;KACnB,MAAM,UAAW,OAAe,GAAG,OAAO;KAE1C,MAAM,gBAAgB,OAAO;KAC7B,MAAM,QAAQ,OAAO;IACvB;IAEA,UAAA,oBAACA,mBAAD;KACE,YAAA;KACA,OAAO;KACP,WAAW,OAAO;KAClB,SAAS;KACT,OAAO,EAAE,iBAAkB,OAAe,GAAG,OAAO,SAAgB;IACrE,CAAA;GACE,GAhBE,KAgBF;EAET,CAAC,CACM;;AAEb,CAAC"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
|
|
3
|
+
import { ToastHost } from "../../base-ui/Toast/imperative.mjs";
|
|
3
4
|
import { styles } from "./style.mjs";
|
|
4
5
|
import ScaleRow from "./ScaleRow.mjs";
|
|
5
6
|
import ScaleRow$1 from "./VarRow.mjs";
|
|
6
7
|
import { memo } from "react";
|
|
7
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { useThemeMode } from "antd-style";
|
|
9
|
-
import { Space } from "antd";
|
|
10
10
|
//#region src/color/CssVar/index.tsx
|
|
11
11
|
const ColorScales = memo(({ name, scale, midHighLight }) => {
|
|
12
12
|
const { isDarkMode } = useThemeMode();
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
14
14
|
horizontal: true,
|
|
15
15
|
align: "center",
|
|
16
16
|
flex: 1,
|
|
17
17
|
justify: "center",
|
|
18
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
18
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
19
19
|
style: { padding: "8px 16px 32px 0" },
|
|
20
|
-
children: /* @__PURE__ */ jsxs(
|
|
21
|
-
|
|
22
|
-
size: 2,
|
|
20
|
+
children: /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
21
|
+
gap: 2,
|
|
23
22
|
children: [
|
|
24
|
-
/* @__PURE__ */ jsxs(
|
|
25
|
-
|
|
23
|
+
/* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
24
|
+
horizontal: true,
|
|
25
|
+
align: "center",
|
|
26
|
+
gap: 2,
|
|
26
27
|
children: [/* @__PURE__ */ jsx(FlexBasic_default, {
|
|
27
28
|
horizontal: true,
|
|
28
29
|
align: "center",
|
|
@@ -73,7 +74,7 @@ const ColorScales = memo(({ name, scale, midHighLight }) => {
|
|
|
73
74
|
] })
|
|
74
75
|
]
|
|
75
76
|
})
|
|
76
|
-
})
|
|
77
|
+
}), /* @__PURE__ */ jsx(ToastHost, {})]
|
|
77
78
|
});
|
|
78
79
|
});
|
|
79
80
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Flexbox","VarRow"],"sources":["../../../src/color/CssVar/index.tsx"],"sourcesContent":["'use client';\n\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Flexbox","VarRow"],"sources":["../../../src/color/CssVar/index.tsx"],"sourcesContent":["'use client';\n\nimport { useThemeMode } from 'antd-style';\nimport { memo } from 'react';\n\nimport { ToastHost } from '@/base-ui/Toast';\nimport { Flexbox } from '@/Flex';\n\nimport { type ColorScaleItem } from '../types';\nimport ScaleRow from './ScaleRow';\nimport { styles } from './style';\nimport VarRow from './VarRow';\n\nexport interface ColorScalesProps {\n /**\n * @description Index of the mid highlight color in the scale\n */\n midHighLight: number;\n /**\n * @description Name of the color scale\n */\n name: string;\n /**\n * @description Color scale item object\n */\n scale: ColorScaleItem;\n}\n\nconst ColorScales = memo<ColorScalesProps>(({ name, scale, midHighLight }) => {\n const { isDarkMode } = useThemeMode();\n return (\n <Flexbox horizontal align={'center'} flex={1} justify={'center'}>\n <div style={{ padding: '8px 16px 32px 0' }}>\n <Flexbox gap={2}>\n <Flexbox horizontal align={'center'} gap={2} key=\"scale-title\">\n <Flexbox horizontal align={'center'} className={styles.scaleRowTitle} key=\"scale-num\" />\n {Array.from({ length: scale.light.length })\n .fill('')\n .map((_, index) => {\n if (index === 0 || index === 12) return false;\n\n const isMidHighlight = midHighLight === index;\n\n return (\n <div className={styles.scaleBox} key={`num${index}`}>\n <div className={styles.scaleBox}>\n <Flexbox\n horizontal\n align={'center'}\n className={styles.scaleItem}\n justify={'center'}\n style={{\n fontWeight: isMidHighlight ? 700 : 400,\n opacity: 0.5,\n }}\n >\n {index}\n </Flexbox>\n </div>\n </div>\n );\n })}\n </Flexbox>\n <VarRow name={name} />\n {isDarkMode ? (\n <>\n <ScaleRow key=\"dark\" name={name} scale={scale.dark} title=\"dark\" />\n <ScaleRow key=\"light\" name={name} scale={scale.light} title=\"light\" />\n </>\n ) : (\n <>\n {' '}\n <ScaleRow key=\"light\" name={name} scale={scale.light} title=\"light\" />\n <ScaleRow key=\"dark\" name={name} scale={scale.dark} title=\"dark\" />\n </>\n )}\n </Flexbox>\n </div>\n <ToastHost />\n </Flexbox>\n );\n});\n\nexport default ColorScales;\n"],"mappings":";;;;;;;;;;AA4BA,MAAM,cAAc,MAAwB,EAAE,MAAM,OAAO,mBAAmB;CAC5E,MAAM,EAAE,eAAe,aAAa;CACpC,OACE,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAU,MAAM;EAAG,SAAS;EAAvD,UAAA,CACE,oBAAC,OAAD;GAAK,OAAO,EAAE,SAAS,kBAAkB;GACvC,UAAA,qBAACA,mBAAD;IAAS,KAAK;IAAd,UAAA;KACE,qBAACA,mBAAD;MAAS,YAAA;MAAW,OAAO;MAAU,KAAK;MAA1C,UAAA,CACE,oBAACA,mBAAD;OAAS,YAAA;OAAW,OAAO;OAAU,WAAW,OAAO;MAAgC,GAAb,WAAa,GACtF,MAAM,KAAK,EAAE,QAAQ,MAAM,MAAM,OAAO,CAAC,CAAC,CACxC,KAAK,EAAE,CAAC,CACR,KAAK,GAAG,UAAU;OACjB,IAAI,UAAU,KAAK,UAAU,IAAI,OAAO;OAExC,MAAM,iBAAiB,iBAAiB;OAExC,OACE,oBAAC,OAAD;QAAK,WAAW,OAAO;QACrB,UAAA,oBAAC,OAAD;SAAK,WAAW,OAAO;SACrB,UAAA,oBAACA,mBAAD;UACE,YAAA;UACA,OAAO;UACP,WAAW,OAAO;UAClB,SAAS;UACT,OAAO;WACL,YAAY,iBAAiB,MAAM;WACnC,SAAS;UACX;UAEC,UAAA;SACM,CAAA;QACN,CAAA;OACF,GAfiC,MAAM,OAevC;MAET,CAAC,CACI;KA5BwC,GAAA,aA4BxC;KACT,oBAACC,YAAD,EAAc,KAAO,CAAA;KACpB,aACC,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,UAAD;MAA2B;MAAM,OAAO,MAAM;MAAM,OAAM;KAAQ,GAApD,MAAoD,GAClE,oBAAC,UAAD;MAA4B;MAAM,OAAO,MAAM;MAAO,OAAM;KAAS,GAAvD,OAAuD,CACrE,EAAA,CAAA,IAEF,qBAAA,YAAA,EAAA,UAAA;MACG;MACD,oBAAC,UAAD;OAA4B;OAAM,OAAO,MAAM;OAAO,OAAM;MAAS,GAAvD,OAAuD;MACrE,oBAAC,UAAD;OAA2B;OAAM,OAAO,MAAM;OAAM,OAAM;MAAQ,GAApD,MAAoD;KAClE,EAAA,CAAA;IAEG;;EACN,CAAA,GACL,oBAAC,WAAD,CAAY,CAAA,CACL;;AAEb,CAAC"}
|
package/es/eslint/index.mjs
CHANGED
|
@@ -6,10 +6,13 @@ const DEPRECATED_UI_COMPONENTS = [
|
|
|
6
6
|
"Alert",
|
|
7
7
|
"AutoComplete",
|
|
8
8
|
"Avatar",
|
|
9
|
+
"AvatarGroup",
|
|
10
|
+
"Burger",
|
|
9
11
|
"Button",
|
|
10
12
|
"Checkbox",
|
|
11
13
|
"CheckboxGroup",
|
|
12
14
|
"Collapse",
|
|
15
|
+
"DatePicker",
|
|
13
16
|
"DraggablePanel",
|
|
14
17
|
"DraggablePanelBody",
|
|
15
18
|
"DraggablePanelContainer",
|
|
@@ -19,8 +22,12 @@ const DEPRECATED_UI_COMPONENTS = [
|
|
|
19
22
|
"Dropdown",
|
|
20
23
|
"FormSubmitFooter",
|
|
21
24
|
"FormTitle",
|
|
25
|
+
"Input",
|
|
26
|
+
"InputNumber",
|
|
22
27
|
"InputOPT",
|
|
28
|
+
"InputPassword",
|
|
23
29
|
"Modal",
|
|
30
|
+
"ModalHost",
|
|
24
31
|
"Radio",
|
|
25
32
|
"RadioGroup",
|
|
26
33
|
"Segmented",
|
|
@@ -38,34 +45,75 @@ const DEPRECATED_UI_COMPONENTS = [
|
|
|
38
45
|
"Tabs",
|
|
39
46
|
"Tag",
|
|
40
47
|
"Text",
|
|
48
|
+
"TextArea",
|
|
41
49
|
"Tree"
|
|
42
50
|
];
|
|
43
51
|
const DEPRECATED_ANTD_ONLY = [
|
|
52
|
+
"Anchor",
|
|
44
53
|
"Badge",
|
|
54
|
+
"Breadcrumb",
|
|
55
|
+
"Card",
|
|
56
|
+
"Carousel",
|
|
57
|
+
"ColorPicker",
|
|
58
|
+
"Descriptions",
|
|
59
|
+
"Divider",
|
|
45
60
|
"Empty",
|
|
61
|
+
"FloatButton",
|
|
62
|
+
"List",
|
|
63
|
+
"Menu",
|
|
46
64
|
"Pagination",
|
|
47
65
|
"Popover",
|
|
48
66
|
"Progress",
|
|
67
|
+
"QRCode",
|
|
68
|
+
"Rate",
|
|
49
69
|
"Result",
|
|
50
70
|
"Spin",
|
|
71
|
+
"Statistic",
|
|
72
|
+
"Steps",
|
|
73
|
+
"Table",
|
|
51
74
|
"Tooltip",
|
|
75
|
+
"Typography",
|
|
52
76
|
"Upload"
|
|
53
77
|
];
|
|
54
78
|
const DEPRECATED_ANTD_COMPONENT_PATHS = [
|
|
55
79
|
"antd/es/alert",
|
|
56
80
|
"antd/es/alert/*",
|
|
81
|
+
"antd/es/anchor",
|
|
82
|
+
"antd/es/anchor/*",
|
|
57
83
|
"antd/es/auto-complete",
|
|
58
84
|
"antd/es/auto-complete/*",
|
|
59
85
|
"antd/es/badge",
|
|
60
86
|
"antd/es/badge/*",
|
|
87
|
+
"antd/es/breadcrumb",
|
|
88
|
+
"antd/es/breadcrumb/*",
|
|
89
|
+
"antd/es/card",
|
|
90
|
+
"antd/es/card/*",
|
|
91
|
+
"antd/es/carousel",
|
|
92
|
+
"antd/es/carousel/*",
|
|
61
93
|
"antd/es/checkbox",
|
|
62
94
|
"antd/es/checkbox/*",
|
|
63
95
|
"antd/es/collapse",
|
|
64
96
|
"antd/es/collapse/*",
|
|
97
|
+
"antd/es/color-picker",
|
|
98
|
+
"antd/es/color-picker/*",
|
|
99
|
+
"antd/es/date-picker",
|
|
100
|
+
"antd/es/date-picker/*",
|
|
101
|
+
"antd/es/descriptions",
|
|
102
|
+
"antd/es/descriptions/*",
|
|
103
|
+
"antd/es/divider",
|
|
104
|
+
"antd/es/divider/*",
|
|
65
105
|
"antd/es/dropdown",
|
|
66
106
|
"antd/es/dropdown/*",
|
|
67
107
|
"antd/es/empty",
|
|
68
108
|
"antd/es/empty/*",
|
|
109
|
+
"antd/es/float-button",
|
|
110
|
+
"antd/es/float-button/*",
|
|
111
|
+
"antd/es/input",
|
|
112
|
+
"antd/es/input-number",
|
|
113
|
+
"antd/es/input-number/*",
|
|
114
|
+
"antd/es/input/*",
|
|
115
|
+
"antd/es/list",
|
|
116
|
+
"antd/es/list/*",
|
|
69
117
|
"antd/es/message",
|
|
70
118
|
"antd/es/message/*",
|
|
71
119
|
"antd/es/notification",
|
|
@@ -76,8 +124,12 @@ const DEPRECATED_ANTD_COMPONENT_PATHS = [
|
|
|
76
124
|
"antd/es/popover/*",
|
|
77
125
|
"antd/es/progress",
|
|
78
126
|
"antd/es/progress/*",
|
|
127
|
+
"antd/es/qr-code",
|
|
128
|
+
"antd/es/qr-code/*",
|
|
79
129
|
"antd/es/radio",
|
|
80
130
|
"antd/es/radio/*",
|
|
131
|
+
"antd/es/rate",
|
|
132
|
+
"antd/es/rate/*",
|
|
81
133
|
"antd/es/result",
|
|
82
134
|
"antd/es/result/*",
|
|
83
135
|
"antd/es/skeleton",
|
|
@@ -86,28 +138,60 @@ const DEPRECATED_ANTD_COMPONENT_PATHS = [
|
|
|
86
138
|
"antd/es/slider/*",
|
|
87
139
|
"antd/es/spin",
|
|
88
140
|
"antd/es/spin/*",
|
|
141
|
+
"antd/es/statistic",
|
|
142
|
+
"antd/es/statistic/*",
|
|
143
|
+
"antd/es/steps",
|
|
144
|
+
"antd/es/steps/*",
|
|
89
145
|
"antd/es/switch",
|
|
90
146
|
"antd/es/switch/*",
|
|
147
|
+
"antd/es/table",
|
|
148
|
+
"antd/es/table/*",
|
|
91
149
|
"antd/es/tooltip",
|
|
92
150
|
"antd/es/tooltip/*",
|
|
93
151
|
"antd/es/tree",
|
|
94
152
|
"antd/es/tree/*",
|
|
153
|
+
"antd/es/typography",
|
|
154
|
+
"antd/es/typography/*",
|
|
95
155
|
"antd/es/upload",
|
|
96
156
|
"antd/es/upload/*",
|
|
97
157
|
"antd/lib/alert",
|
|
98
158
|
"antd/lib/alert/*",
|
|
159
|
+
"antd/lib/anchor",
|
|
160
|
+
"antd/lib/anchor/*",
|
|
99
161
|
"antd/lib/auto-complete",
|
|
100
162
|
"antd/lib/auto-complete/*",
|
|
101
163
|
"antd/lib/badge",
|
|
102
164
|
"antd/lib/badge/*",
|
|
165
|
+
"antd/lib/breadcrumb",
|
|
166
|
+
"antd/lib/breadcrumb/*",
|
|
167
|
+
"antd/lib/card",
|
|
168
|
+
"antd/lib/card/*",
|
|
169
|
+
"antd/lib/carousel",
|
|
170
|
+
"antd/lib/carousel/*",
|
|
103
171
|
"antd/lib/checkbox",
|
|
104
172
|
"antd/lib/checkbox/*",
|
|
105
173
|
"antd/lib/collapse",
|
|
106
174
|
"antd/lib/collapse/*",
|
|
175
|
+
"antd/lib/color-picker",
|
|
176
|
+
"antd/lib/color-picker/*",
|
|
177
|
+
"antd/lib/date-picker",
|
|
178
|
+
"antd/lib/date-picker/*",
|
|
179
|
+
"antd/lib/descriptions",
|
|
180
|
+
"antd/lib/descriptions/*",
|
|
181
|
+
"antd/lib/divider",
|
|
182
|
+
"antd/lib/divider/*",
|
|
107
183
|
"antd/lib/dropdown",
|
|
108
184
|
"antd/lib/dropdown/*",
|
|
109
185
|
"antd/lib/empty",
|
|
110
186
|
"antd/lib/empty/*",
|
|
187
|
+
"antd/lib/float-button",
|
|
188
|
+
"antd/lib/float-button/*",
|
|
189
|
+
"antd/lib/input",
|
|
190
|
+
"antd/lib/input-number",
|
|
191
|
+
"antd/lib/input-number/*",
|
|
192
|
+
"antd/lib/input/*",
|
|
193
|
+
"antd/lib/list",
|
|
194
|
+
"antd/lib/list/*",
|
|
111
195
|
"antd/lib/message",
|
|
112
196
|
"antd/lib/message/*",
|
|
113
197
|
"antd/lib/notification",
|
|
@@ -118,8 +202,12 @@ const DEPRECATED_ANTD_COMPONENT_PATHS = [
|
|
|
118
202
|
"antd/lib/popover/*",
|
|
119
203
|
"antd/lib/progress",
|
|
120
204
|
"antd/lib/progress/*",
|
|
205
|
+
"antd/lib/qr-code",
|
|
206
|
+
"antd/lib/qr-code/*",
|
|
121
207
|
"antd/lib/radio",
|
|
122
208
|
"antd/lib/radio/*",
|
|
209
|
+
"antd/lib/rate",
|
|
210
|
+
"antd/lib/rate/*",
|
|
123
211
|
"antd/lib/result",
|
|
124
212
|
"antd/lib/result/*",
|
|
125
213
|
"antd/lib/skeleton",
|
|
@@ -128,12 +216,20 @@ const DEPRECATED_ANTD_COMPONENT_PATHS = [
|
|
|
128
216
|
"antd/lib/slider/*",
|
|
129
217
|
"antd/lib/spin",
|
|
130
218
|
"antd/lib/spin/*",
|
|
219
|
+
"antd/lib/statistic",
|
|
220
|
+
"antd/lib/statistic/*",
|
|
221
|
+
"antd/lib/steps",
|
|
222
|
+
"antd/lib/steps/*",
|
|
131
223
|
"antd/lib/switch",
|
|
132
224
|
"antd/lib/switch/*",
|
|
225
|
+
"antd/lib/table",
|
|
226
|
+
"antd/lib/table/*",
|
|
133
227
|
"antd/lib/tooltip",
|
|
134
228
|
"antd/lib/tooltip/*",
|
|
135
229
|
"antd/lib/tree",
|
|
136
230
|
"antd/lib/tree/*",
|
|
231
|
+
"antd/lib/typography",
|
|
232
|
+
"antd/lib/typography/*",
|
|
137
233
|
"antd/lib/upload",
|
|
138
234
|
"antd/lib/upload/*"
|
|
139
235
|
];
|
|
@@ -167,6 +263,10 @@ const restrictedImports = { rules: { "no-restricted-imports": ["error", {
|
|
|
167
263
|
{
|
|
168
264
|
message: "Use `Spin variant=\"network\"` from \"@lobehub/ui/base-ui\" instead.",
|
|
169
265
|
name: "thinking-orbs"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
message: "ProComponents are deprecated. Use `Table` from \"@lobehub/ui/base-ui\" instead.",
|
|
269
|
+
name: "@ant-design/pro-components"
|
|
170
270
|
}
|
|
171
271
|
],
|
|
172
272
|
patterns: [{
|
package/es/eslint/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/eslint/index.ts"],"sourcesContent":["const DEPRECATED_UI_COMPONENTS = [\n 'Accordion',\n 'AccordionItem',\n 'ActionIcon',\n 'Alert',\n 'AutoComplete',\n 'Avatar',\n 'Button',\n 'Checkbox',\n 'CheckboxGroup',\n 'Collapse',\n 'DraggablePanel',\n 'DraggablePanelBody',\n 'DraggablePanelContainer',\n 'DraggablePanelFooter',\n 'DraggablePanelHeader',\n 'Drawer',\n 'Dropdown',\n 'FormSubmitFooter',\n 'FormTitle',\n 'InputOPT',\n 'Modal',\n 'Radio',\n 'RadioGroup',\n 'Segmented',\n 'Select',\n 'Skeleton',\n 'SkeletonAvatar',\n 'SkeletonBlock',\n 'SkeletonButton',\n 'SkeletonParagraph',\n 'SkeletonTags',\n 'SkeletonTitle',\n 'Slider',\n 'SliderWithInput',\n 'Switch',\n 'Tabs',\n 'Tag',\n 'Text',\n 'Tree',\n];\n\nconst DEPRECATED_ANTD_ONLY = [\n 'Badge',\n 'Empty',\n 'Pagination',\n 'Popover',\n 'Progress',\n 'Result',\n 'Spin',\n 'Tooltip',\n 'Upload',\n];\n\nconst DEPRECATED_ANTD_COMPONENT_PATHS = [\n 'antd/es/alert',\n 'antd/es/alert/*',\n 'antd/es/auto-complete',\n 'antd/es/auto-complete/*',\n 'antd/es/badge',\n 'antd/es/badge/*',\n 'antd/es/checkbox',\n 'antd/es/checkbox/*',\n 'antd/es/collapse',\n 'antd/es/collapse/*',\n 'antd/es/dropdown',\n 'antd/es/dropdown/*',\n 'antd/es/empty',\n 'antd/es/empty/*',\n 'antd/es/message',\n 'antd/es/message/*',\n 'antd/es/notification',\n 'antd/es/notification/*',\n 'antd/es/pagination',\n 'antd/es/pagination/*',\n 'antd/es/popover',\n 'antd/es/popover/*',\n 'antd/es/progress',\n 'antd/es/progress/*',\n 'antd/es/radio',\n 'antd/es/radio/*',\n 'antd/es/result',\n 'antd/es/result/*',\n 'antd/es/skeleton',\n 'antd/es/skeleton/*',\n 'antd/es/slider',\n 'antd/es/slider/*',\n 'antd/es/spin',\n 'antd/es/spin/*',\n 'antd/es/switch',\n 'antd/es/switch/*',\n 'antd/es/tooltip',\n 'antd/es/tooltip/*',\n 'antd/es/tree',\n 'antd/es/tree/*',\n 'antd/es/upload',\n 'antd/es/upload/*',\n 'antd/lib/alert',\n 'antd/lib/alert/*',\n 'antd/lib/auto-complete',\n 'antd/lib/auto-complete/*',\n 'antd/lib/badge',\n 'antd/lib/badge/*',\n 'antd/lib/checkbox',\n 'antd/lib/checkbox/*',\n 'antd/lib/collapse',\n 'antd/lib/collapse/*',\n 'antd/lib/dropdown',\n 'antd/lib/dropdown/*',\n 'antd/lib/empty',\n 'antd/lib/empty/*',\n 'antd/lib/message',\n 'antd/lib/message/*',\n 'antd/lib/notification',\n 'antd/lib/notification/*',\n 'antd/lib/pagination',\n 'antd/lib/pagination/*',\n 'antd/lib/popover',\n 'antd/lib/popover/*',\n 'antd/lib/progress',\n 'antd/lib/progress/*',\n 'antd/lib/radio',\n 'antd/lib/radio/*',\n 'antd/lib/result',\n 'antd/lib/result/*',\n 'antd/lib/skeleton',\n 'antd/lib/skeleton/*',\n 'antd/lib/slider',\n 'antd/lib/slider/*',\n 'antd/lib/spin',\n 'antd/lib/spin/*',\n 'antd/lib/switch',\n 'antd/lib/switch/*',\n 'antd/lib/tooltip',\n 'antd/lib/tooltip/*',\n 'antd/lib/tree',\n 'antd/lib/tree/*',\n 'antd/lib/upload',\n 'antd/lib/upload/*',\n];\n\nexport const restrictedImports = {\n rules: {\n 'no-restricted-imports': [\n 'error',\n {\n paths: [\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message:\n 'The antd-based wrapper is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: '@lobehub/ui',\n },\n {\n importNames: ['createStyles'],\n message:\n '`createStyles` is banned in this project. Use `createStaticStyles` from \"antd-style\" instead.',\n name: 'antd-style',\n },\n {\n importNames: [...DEPRECATED_UI_COMPONENTS, ...DEPRECATED_ANTD_ONLY],\n message: 'Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: 'antd',\n },\n {\n importNames: ['message', 'notification'],\n message: 'antd feedback APIs are deprecated. Use `toast` from \"@lobehub/ui/base-ui\".',\n name: 'antd',\n },\n {\n importNames: ['LoadingOutlined'],\n message: 'Use `Spin` from \"@lobehub/ui/base-ui\" instead of a hand-rolled spinner.',\n name: '@ant-design/icons',\n },\n {\n message: 'Use `Spin variant=\"network\"` from \"@lobehub/ui/base-ui\" instead.',\n name: 'thinking-orbs',\n },\n ],\n patterns: [\n {\n group: DEPRECATED_ANTD_COMPONENT_PATHS,\n message:\n 'Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n },\n ],\n },\n ],\n },\n};\n\nexport default [restrictedImports];\n"],"mappings":";AAAA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,kCAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB,EAC/B,OAAO,EACL,yBAAyB,CACvB,SACA;CACE,OAAO;EACL;GACE,aAAa;GACb,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,cAAc;GAC5B,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,GAAG,0BAA0B,GAAG,oBAAoB;GAClE,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,WAAW,cAAc;GACvC,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,iBAAiB;GAC/B,SAAS;GACT,MAAM;EACR;EACA;GACE,SAAS;GACT,MAAM;EACR;CACF;CACA,UAAU,CACR;EACE,OAAO;EACP,SACE;CACJ,CACF;AACF,CACF,EACF,EACF;AAEA,IAAA,iBAAe,CAAC,iBAAiB"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/eslint/index.ts"],"sourcesContent":["const DEPRECATED_UI_COMPONENTS = [\n 'Accordion',\n 'AccordionItem',\n 'ActionIcon',\n 'Alert',\n 'AutoComplete',\n 'Avatar',\n 'AvatarGroup',\n 'Burger',\n 'Button',\n 'Checkbox',\n 'CheckboxGroup',\n 'Collapse',\n 'DatePicker',\n 'DraggablePanel',\n 'DraggablePanelBody',\n 'DraggablePanelContainer',\n 'DraggablePanelFooter',\n 'DraggablePanelHeader',\n 'Drawer',\n 'Dropdown',\n 'FormSubmitFooter',\n 'FormTitle',\n 'Input',\n 'InputNumber',\n 'InputOPT',\n 'InputPassword',\n 'Modal',\n 'ModalHost',\n 'Radio',\n 'RadioGroup',\n 'Segmented',\n 'Select',\n 'Skeleton',\n 'SkeletonAvatar',\n 'SkeletonBlock',\n 'SkeletonButton',\n 'SkeletonParagraph',\n 'SkeletonTags',\n 'SkeletonTitle',\n 'Slider',\n 'SliderWithInput',\n 'Switch',\n 'Tabs',\n 'Tag',\n 'Text',\n 'TextArea',\n 'Tree',\n];\n\nconst DEPRECATED_ANTD_ONLY = [\n 'Anchor',\n 'Badge',\n 'Breadcrumb',\n 'Card',\n 'Carousel',\n 'ColorPicker',\n 'Descriptions',\n 'Divider',\n 'Empty',\n 'FloatButton',\n 'List',\n 'Menu',\n 'Pagination',\n 'Popover',\n 'Progress',\n 'QRCode',\n 'Rate',\n 'Result',\n 'Spin',\n 'Statistic',\n 'Steps',\n 'Table',\n 'Tooltip',\n 'Typography',\n 'Upload',\n];\n\nconst DEPRECATED_ANTD_COMPONENT_PATHS = [\n 'antd/es/alert',\n 'antd/es/alert/*',\n 'antd/es/anchor',\n 'antd/es/anchor/*',\n 'antd/es/auto-complete',\n 'antd/es/auto-complete/*',\n 'antd/es/badge',\n 'antd/es/badge/*',\n 'antd/es/breadcrumb',\n 'antd/es/breadcrumb/*',\n 'antd/es/card',\n 'antd/es/card/*',\n 'antd/es/carousel',\n 'antd/es/carousel/*',\n 'antd/es/checkbox',\n 'antd/es/checkbox/*',\n 'antd/es/collapse',\n 'antd/es/collapse/*',\n 'antd/es/color-picker',\n 'antd/es/color-picker/*',\n 'antd/es/date-picker',\n 'antd/es/date-picker/*',\n 'antd/es/descriptions',\n 'antd/es/descriptions/*',\n 'antd/es/divider',\n 'antd/es/divider/*',\n 'antd/es/dropdown',\n 'antd/es/dropdown/*',\n 'antd/es/empty',\n 'antd/es/empty/*',\n 'antd/es/float-button',\n 'antd/es/float-button/*',\n 'antd/es/input',\n 'antd/es/input-number',\n 'antd/es/input-number/*',\n 'antd/es/input/*',\n 'antd/es/list',\n 'antd/es/list/*',\n 'antd/es/message',\n 'antd/es/message/*',\n 'antd/es/notification',\n 'antd/es/notification/*',\n 'antd/es/pagination',\n 'antd/es/pagination/*',\n 'antd/es/popover',\n 'antd/es/popover/*',\n 'antd/es/progress',\n 'antd/es/progress/*',\n 'antd/es/qr-code',\n 'antd/es/qr-code/*',\n 'antd/es/radio',\n 'antd/es/radio/*',\n 'antd/es/rate',\n 'antd/es/rate/*',\n 'antd/es/result',\n 'antd/es/result/*',\n 'antd/es/skeleton',\n 'antd/es/skeleton/*',\n 'antd/es/slider',\n 'antd/es/slider/*',\n 'antd/es/spin',\n 'antd/es/spin/*',\n 'antd/es/statistic',\n 'antd/es/statistic/*',\n 'antd/es/steps',\n 'antd/es/steps/*',\n 'antd/es/switch',\n 'antd/es/switch/*',\n 'antd/es/table',\n 'antd/es/table/*',\n 'antd/es/tooltip',\n 'antd/es/tooltip/*',\n 'antd/es/tree',\n 'antd/es/tree/*',\n 'antd/es/typography',\n 'antd/es/typography/*',\n 'antd/es/upload',\n 'antd/es/upload/*',\n 'antd/lib/alert',\n 'antd/lib/alert/*',\n 'antd/lib/anchor',\n 'antd/lib/anchor/*',\n 'antd/lib/auto-complete',\n 'antd/lib/auto-complete/*',\n 'antd/lib/badge',\n 'antd/lib/badge/*',\n 'antd/lib/breadcrumb',\n 'antd/lib/breadcrumb/*',\n 'antd/lib/card',\n 'antd/lib/card/*',\n 'antd/lib/carousel',\n 'antd/lib/carousel/*',\n 'antd/lib/checkbox',\n 'antd/lib/checkbox/*',\n 'antd/lib/collapse',\n 'antd/lib/collapse/*',\n 'antd/lib/color-picker',\n 'antd/lib/color-picker/*',\n 'antd/lib/date-picker',\n 'antd/lib/date-picker/*',\n 'antd/lib/descriptions',\n 'antd/lib/descriptions/*',\n 'antd/lib/divider',\n 'antd/lib/divider/*',\n 'antd/lib/dropdown',\n 'antd/lib/dropdown/*',\n 'antd/lib/empty',\n 'antd/lib/empty/*',\n 'antd/lib/float-button',\n 'antd/lib/float-button/*',\n 'antd/lib/input',\n 'antd/lib/input-number',\n 'antd/lib/input-number/*',\n 'antd/lib/input/*',\n 'antd/lib/list',\n 'antd/lib/list/*',\n 'antd/lib/message',\n 'antd/lib/message/*',\n 'antd/lib/notification',\n 'antd/lib/notification/*',\n 'antd/lib/pagination',\n 'antd/lib/pagination/*',\n 'antd/lib/popover',\n 'antd/lib/popover/*',\n 'antd/lib/progress',\n 'antd/lib/progress/*',\n 'antd/lib/qr-code',\n 'antd/lib/qr-code/*',\n 'antd/lib/radio',\n 'antd/lib/radio/*',\n 'antd/lib/rate',\n 'antd/lib/rate/*',\n 'antd/lib/result',\n 'antd/lib/result/*',\n 'antd/lib/skeleton',\n 'antd/lib/skeleton/*',\n 'antd/lib/slider',\n 'antd/lib/slider/*',\n 'antd/lib/spin',\n 'antd/lib/spin/*',\n 'antd/lib/statistic',\n 'antd/lib/statistic/*',\n 'antd/lib/steps',\n 'antd/lib/steps/*',\n 'antd/lib/switch',\n 'antd/lib/switch/*',\n 'antd/lib/table',\n 'antd/lib/table/*',\n 'antd/lib/tooltip',\n 'antd/lib/tooltip/*',\n 'antd/lib/tree',\n 'antd/lib/tree/*',\n 'antd/lib/typography',\n 'antd/lib/typography/*',\n 'antd/lib/upload',\n 'antd/lib/upload/*',\n];\n\nexport const restrictedImports = {\n rules: {\n 'no-restricted-imports': [\n 'error',\n {\n paths: [\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message:\n 'The antd-based wrapper is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: '@lobehub/ui',\n },\n {\n importNames: ['createStyles'],\n message:\n '`createStyles` is banned in this project. Use `createStaticStyles` from \"antd-style\" instead.',\n name: 'antd-style',\n },\n {\n importNames: [...DEPRECATED_UI_COMPONENTS, ...DEPRECATED_ANTD_ONLY],\n message: 'Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: 'antd',\n },\n {\n importNames: ['message', 'notification'],\n message: 'antd feedback APIs are deprecated. Use `toast` from \"@lobehub/ui/base-ui\".',\n name: 'antd',\n },\n {\n importNames: ['LoadingOutlined'],\n message: 'Use `Spin` from \"@lobehub/ui/base-ui\" instead of a hand-rolled spinner.',\n name: '@ant-design/icons',\n },\n {\n message: 'Use `Spin variant=\"network\"` from \"@lobehub/ui/base-ui\" instead.',\n name: 'thinking-orbs',\n },\n {\n message: 'ProComponents are deprecated. Use `Table` from \"@lobehub/ui/base-ui\" instead.',\n name: '@ant-design/pro-components',\n },\n ],\n patterns: [\n {\n group: DEPRECATED_ANTD_COMPONENT_PATHS,\n message:\n 'Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n },\n ],\n },\n ],\n },\n};\n\nexport default [restrictedImports];\n"],"mappings":";AAAA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,kCAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB,EAC/B,OAAO,EACL,yBAAyB,CACvB,SACA;CACE,OAAO;EACL;GACE,aAAa;GACb,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,cAAc;GAC5B,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,GAAG,0BAA0B,GAAG,oBAAoB;GAClE,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,WAAW,cAAc;GACvC,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,iBAAiB;GAC/B,SAAS;GACT,MAAM;EACR;EACA;GACE,SAAS;GACT,MAAM;EACR;EACA;GACE,SAAS;GACT,MAAM;EACR;CACF;CACA,UAAU,CACR;EACE,OAAO;EACP,SACE;CACJ,CACF;AACF,CACF,EACF,EACF;AAEA,IAAA,iBAAe,CAAC,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInputArea.mjs","names":["Flexbox"],"sources":["../../../src/mobile/ChatInputArea/ChatInputArea.tsx"],"sourcesContent":["'use client';\n\nimport { useSize } from 'ahooks';\nimport { cx } from 'antd-style';\nimport { ChevronDown, ChevronUp } from 'lucide-react';\nimport {\n type FC,\n memo,\n type PropsWithChildren,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport ActionIcon from '@/base-ui/ActionIcon';\nimport ChatInputAreaInner from '@/chat/ChatInputArea/components/ChatInputAreaInner';\nimport { Flexbox } from '@/Flex';\nimport SafeArea from '@/mobile/SafeArea';\n\nimport { styles } from './style';\nimport { type ChatInputAreaProps } from './type';\n\nconst ChatInputArea = memo<ChatInputAreaProps>(\n ({\n ref,\n className,\n style,\n topAddons,\n textAreaLeftAddons,\n textAreaRightAddons,\n bottomAddons,\n expand = false,\n setExpand,\n onSend,\n onInput,\n loading,\n value,\n safeArea,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const size = useSize(containerRef);\n const [showFullscreen, setShowFullscreen] = useState<boolean>(false);\n const [isFocused, setIsFocused] = useState<boolean>(false);\n\n useEffect(() => {\n if (!size?.height) return;\n setShowFullscreen(size.height > 72);\n }, [size]);\n\n const InnerContainer: FC<\n PropsWithChildren & {\n bottomAddons?: ReactNode;\n textAreaLeftAddons?: ReactNode;\n textAreaRightAddons?: ReactNode;\n topAddons?: ReactNode;\n }\n > = useCallback(\n ({ children, ...r }) =>\n expand ? (\n <Flexbox className={styles.inner} gap={8}>\n <Flexbox horizontal gap={8} justify={'flex-end'}>\n {r.textAreaLeftAddons}\n {r.textAreaRightAddons}\n </Flexbox>\n {children}\n {r.topAddons}\n {r.bottomAddons}\n </Flexbox>\n ) : (\n <Flexbox horizontal align={'flex-end'} className={styles.inner} gap={8}>\n {r.textAreaLeftAddons}\n {children}\n {r.textAreaRightAddons}\n </Flexbox>\n ),\n [expand, loading],\n );\n\n const showAddons = !expand && !isFocused;\n\n return (\n <Flexbox\n className={cx(styles.container, expand && styles.expand, className)}\n gap={12}\n style={style}\n >\n {topAddons && <Flexbox style={showAddons ? {} : { display: 'none' }}>{topAddons}</Flexbox>}\n <Flexbox\n className={cx(expand && styles.expand)}\n ref={containerRef}\n style={{ position: 'relative' }}\n >\n {showFullscreen && (\n <ActionIcon\n active\n className={styles.expandButton}\n icon={expand ? ChevronDown : ChevronUp}\n id={'sssssss'}\n size={{ blockSize: 24, borderRadius: '50%', size: 14 }}\n style={expand ? { top: 6 } : {}}\n onClick={() => setExpand?.(!expand)}\n />\n )}\n <InnerContainer\n bottomAddons={bottomAddons}\n textAreaLeftAddons={textAreaLeftAddons}\n textAreaRightAddons={textAreaRightAddons}\n topAddons={topAddons}\n >\n <ChatInputAreaInner\n autoSize={expand ? false : { maxRows: 6, minRows: 1 }}\n className={styles.expandTextArea}\n loading={loading}\n ref={ref}\n style={{
|
|
1
|
+
{"version":3,"file":"ChatInputArea.mjs","names":["Flexbox"],"sources":["../../../src/mobile/ChatInputArea/ChatInputArea.tsx"],"sourcesContent":["'use client';\n\nimport { useSize } from 'ahooks';\nimport { cx } from 'antd-style';\nimport { ChevronDown, ChevronUp } from 'lucide-react';\nimport {\n type FC,\n memo,\n type PropsWithChildren,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport ActionIcon from '@/base-ui/ActionIcon';\nimport ChatInputAreaInner from '@/chat/ChatInputArea/components/ChatInputAreaInner';\nimport { Flexbox } from '@/Flex';\nimport SafeArea from '@/mobile/SafeArea';\n\nimport { styles } from './style';\nimport { type ChatInputAreaProps } from './type';\n\nconst ChatInputArea = memo<ChatInputAreaProps>(\n ({\n ref,\n className,\n style,\n topAddons,\n textAreaLeftAddons,\n textAreaRightAddons,\n bottomAddons,\n expand = false,\n setExpand,\n onSend,\n onInput,\n loading,\n value,\n safeArea,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const size = useSize(containerRef);\n const [showFullscreen, setShowFullscreen] = useState<boolean>(false);\n const [isFocused, setIsFocused] = useState<boolean>(false);\n\n useEffect(() => {\n if (!size?.height) return;\n setShowFullscreen(size.height > 72);\n }, [size]);\n\n const InnerContainer: FC<\n PropsWithChildren & {\n bottomAddons?: ReactNode;\n textAreaLeftAddons?: ReactNode;\n textAreaRightAddons?: ReactNode;\n topAddons?: ReactNode;\n }\n > = useCallback(\n ({ children, ...r }) =>\n expand ? (\n <Flexbox className={styles.inner} gap={8}>\n <Flexbox horizontal gap={8} justify={'flex-end'}>\n {r.textAreaLeftAddons}\n {r.textAreaRightAddons}\n </Flexbox>\n {children}\n {r.topAddons}\n {r.bottomAddons}\n </Flexbox>\n ) : (\n <Flexbox horizontal align={'flex-end'} className={styles.inner} gap={8}>\n {r.textAreaLeftAddons}\n {children}\n {r.textAreaRightAddons}\n </Flexbox>\n ),\n [expand, loading],\n );\n\n const showAddons = !expand && !isFocused;\n\n return (\n <Flexbox\n className={cx(styles.container, expand && styles.expand, className)}\n gap={12}\n style={style}\n >\n {topAddons && <Flexbox style={showAddons ? {} : { display: 'none' }}>{topAddons}</Flexbox>}\n <Flexbox\n className={cx(expand && styles.expand)}\n ref={containerRef}\n style={{ position: 'relative' }}\n >\n {showFullscreen && (\n <ActionIcon\n active\n className={styles.expandButton}\n icon={expand ? ChevronDown : ChevronUp}\n id={'sssssss'}\n size={{ blockSize: 24, borderRadius: '50%', size: 14 }}\n style={expand ? { top: 6 } : {}}\n onClick={() => setExpand?.(!expand)}\n />\n )}\n <InnerContainer\n bottomAddons={bottomAddons}\n textAreaLeftAddons={textAreaLeftAddons}\n textAreaRightAddons={textAreaRightAddons}\n topAddons={topAddons}\n >\n <ChatInputAreaInner\n autoSize={expand ? false : { maxRows: 6, minRows: 1 }}\n className={styles.expandTextArea}\n loading={loading}\n ref={ref}\n style={{ minHeight: 36, paddingBlock: 6 }}\n value={value}\n variant={expand ? 'borderless' : 'filled'}\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n onInput={onInput}\n onSend={onSend}\n />\n </InnerContainer>\n </Flexbox>\n {bottomAddons && (\n <Flexbox style={showAddons ? {} : { display: 'none' }}>{bottomAddons}</Flexbox>\n )}\n {safeArea && !isFocused && <SafeArea position={'bottom'} />}\n </Flexbox>\n );\n },\n);\n\nChatInputArea.displayName = 'ChatInputArea';\n\nexport default ChatInputArea;\n"],"mappings":";;;;;;;;;;;;AAwBA,MAAM,gBAAgB,MACnB,EACC,KACA,WACA,OACA,WACA,oBACA,qBACA,cACA,SAAS,OACT,WACA,QACA,SACA,SACA,OACA,eACI;CACJ,MAAM,eAAe,OAAuB,IAAI;CAChD,MAAM,OAAO,QAAQ,YAAY;CACjC,MAAM,CAAC,gBAAgB,qBAAqB,SAAkB,KAAK;CACnE,MAAM,CAAC,WAAW,gBAAgB,SAAkB,KAAK;CAEzD,gBAAgB;EACd,IAAI,CAAC,MAAM,QAAQ;EACnB,kBAAkB,KAAK,SAAS,EAAE;CACpC,GAAG,CAAC,IAAI,CAAC;CAET,MAAM,iBAOF,aACD,EAAE,UAAU,GAAG,QACd,SACE,qBAACA,mBAAD;EAAS,WAAW,OAAO;EAAO,KAAK;EAAvC,UAAA;GACE,qBAACA,mBAAD;IAAS,YAAA;IAAW,KAAK;IAAG,SAAS;IAArC,UAAA,CACG,EAAE,oBACF,EAAE,mBACI;;GACR;GACA,EAAE;GACF,EAAE;EACI;CAET,CAAA,IAAA,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAY,WAAW,OAAO;EAAO,KAAK;EAArE,UAAA;GACG,EAAE;GACF;GACA,EAAE;EACI;CAEb,CAAA,GAAA,CAAC,QAAQ,OAAO,CAClB;CAEA,MAAM,aAAa,CAAC,UAAU,CAAC;CAE/B,OACE,qBAACA,mBAAD;EACE,WAAW,GAAG,OAAO,WAAW,UAAU,OAAO,QAAQ,SAAS;EAClE,KAAK;EACE;EAHT,UAAA;GAKG,aAAa,oBAACA,mBAAD;IAAS,OAAO,aAAa,CAAC,IAAI,EAAE,SAAS,OAAO;IAAI,UAAA;GAAmB,CAAA;GACzF,qBAACA,mBAAD;IACE,WAAW,GAAG,UAAU,OAAO,MAAM;IACrC,KAAK;IACL,OAAO,EAAE,UAAU,WAAW;IAHhC,UAAA,CAKG,kBACC,oBAAC,YAAD;KACE,QAAA;KACA,WAAW,OAAO;KAClB,MAAM,SAAS,cAAc;KAC7B,IAAI;KACJ,MAAM;MAAE,WAAW;MAAI,cAAc;MAAO,MAAM;KAAG;KACrD,OAAO,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC;KAC9B,eAAe,YAAY,CAAC,MAAM;IACnC,CAAA,GAEH,oBAAC,gBAAD;KACgB;KACM;KACC;KACV;KAEX,UAAA,oBAAC,oBAAD;MACE,UAAU,SAAS,QAAQ;OAAE,SAAS;OAAG,SAAS;MAAE;MACpD,WAAW,OAAO;MACT;MACJ;MACL,OAAO;OAAE,WAAW;OAAI,cAAc;MAAE;MACjC;MACP,SAAS,SAAS,eAAe;MACjC,cAAc,aAAa,KAAK;MAChC,eAAe,aAAa,IAAI;MACvB;MACD;KACT,CAAA;IACa,CAAA,CACT;;GACR,gBACC,oBAACA,mBAAD;IAAS,OAAO,aAAa,CAAC,IAAI,EAAE,SAAS,OAAO;IAAI,UAAA;GAAsB,CAAA;GAE/E,YAAY,CAAC,aAAa,oBAAC,UAAD,EAAU,UAAU,SAAW,CAAA;EACnD;;AAEb,CACF;AAEA,cAAc,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatSendButton.mjs","names":[],"sources":["../../../../src/mobile/ChatInputArea/components/ChatSendButton.tsx"],"sourcesContent":["'use client';\n\nimport { SendHorizontal } from 'lucide-react';\nimport { memo } from 'react';\n\nimport Button from '@/Button';\n\nimport type { ChatSendButtonProps } from '../type';\n\nconst ChatSendButton = memo<ChatSendButtonProps>(({ ref, loading, onStop, onSend, ...rest }) => {\n return (\n <Button\n icon={SendHorizontal}\n loading={loading}\n ref={ref}\n type={'primary'}\n onClick={(e) => {\n e.preventDefault();\n if (loading) {\n onStop?.(e);\n } else {\n onSend?.(e);\n }\n }}\n {...rest}\n />\n );\n});\n\nChatSendButton.displayName = 'ChatSendButton';\n\nexport default ChatSendButton;\n"],"mappings":";;;;;;AASA,MAAM,iBAAiB,MAA2B,EAAE,KAAK,SAAS,QAAQ,QAAQ,GAAG,WAAW;CAC9F,OACE,oBAAC,QAAD;EACE,MAAM;EACG;EACJ;EACL,MAAM;EACN,UAAU,MAAM;GACd,EAAE,eAAe;GACjB,IAAI,SACF,SAAS,CAAC;QAEV,SAAS,CAAC;EAEd;EACA,GAAI;CACL,CAAA;AAEL,CAAC;AAED,eAAe,cAAc"}
|
|
1
|
+
{"version":3,"file":"ChatSendButton.mjs","names":[],"sources":["../../../../src/mobile/ChatInputArea/components/ChatSendButton.tsx"],"sourcesContent":["'use client';\n\nimport { SendHorizontal } from 'lucide-react';\nimport { memo } from 'react';\n\nimport Button from '@/base-ui/Button';\n\nimport type { ChatSendButtonProps } from '../type';\n\nconst ChatSendButton = memo<ChatSendButtonProps>(({ ref, loading, onStop, onSend, ...rest }) => {\n return (\n <Button\n icon={SendHorizontal}\n loading={loading}\n ref={ref}\n type={'primary'}\n onClick={(e) => {\n e.preventDefault();\n if (loading) {\n onStop?.(e);\n } else {\n onSend?.(e);\n }\n }}\n {...rest}\n />\n );\n});\n\nChatSendButton.displayName = 'ChatSendButton';\n\nexport default ChatSendButton;\n"],"mappings":";;;;;;AASA,MAAM,iBAAiB,MAA2B,EAAE,KAAK,SAAS,QAAQ,QAAQ,GAAG,WAAW;CAC9F,OACE,oBAAC,QAAD;EACE,MAAM;EACG;EACJ;EACL,MAAM;EACN,UAAU,MAAM;GACd,EAAE,eAAe;GACjB,IAAI,SACF,SAAS,CAAC;QAEV,SAAS,CAAC;EAEd;EACA,GAAI;CACL,CAAA;AAEL,CAAC;AAED,eAAe,cAAc"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { ButtonProps } from "../../Button/type.mjs";
|
|
2
|
-
import "../../Button/index.mjs";
|
|
1
|
+
import { ButtonProps } from "../../base-ui/Button/type.mjs";
|
|
2
|
+
import "../../base-ui/Button/index.mjs";
|
|
3
3
|
import { ChatInputAreaInnerProps } from "../../chat/ChatInputArea/type.mjs";
|
|
4
4
|
import "../../chat/ChatInputArea/index.mjs";
|
|
5
|
-
import { CSSProperties, ReactNode, Ref } from "react";
|
|
6
|
-
import { TextAreaRef } from "antd/es/input/TextArea.js";
|
|
5
|
+
import { CSSProperties, MouseEventHandler, ReactNode, Ref } from "react";
|
|
7
6
|
//#region src/mobile/ChatInputArea/type.d.ts
|
|
8
7
|
interface ChatInputAreaProps extends ChatInputAreaInnerProps {
|
|
9
8
|
bottomAddons?: ReactNode;
|
|
10
9
|
expand?: boolean;
|
|
11
|
-
ref?: Ref<
|
|
10
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
12
11
|
safeArea?: boolean;
|
|
13
12
|
setExpand?: (expand: boolean) => void;
|
|
14
13
|
style?: CSSProperties;
|
|
@@ -17,8 +16,8 @@ interface ChatInputAreaProps extends ChatInputAreaInnerProps {
|
|
|
17
16
|
topAddons?: ReactNode;
|
|
18
17
|
}
|
|
19
18
|
interface ChatSendButtonProps extends Omit<ButtonProps, 'onClick'> {
|
|
20
|
-
onSend?:
|
|
21
|
-
onStop?:
|
|
19
|
+
onSend?: MouseEventHandler<HTMLElement>;
|
|
20
|
+
onStop?: MouseEventHandler<HTMLElement>;
|
|
22
21
|
}
|
|
23
22
|
//#endregion
|
|
24
23
|
export { ChatInputAreaProps, ChatSendButtonProps };
|