@lobehub/ui 5.53.0 → 5.55.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/Image/index.d.mts +2 -1
- package/es/Image/index.mjs +2 -1
- package/es/Image/index.mjs.map +1 -1
- package/es/Image/useImagePreview.d.mts +11 -0
- package/es/Image/useImagePreview.mjs +32 -0
- package/es/Image/useImagePreview.mjs.map +1 -0
- package/es/Image/viewer/registry.d.mts +1 -1
- 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.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/index.d.mts +2 -1
- package/es/index.mjs +2 -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/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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageModal.mjs","names":["messageModalMessages","useControlledState","Flexbox","textStyles"],"sources":["../../../src/chat/MessageModal/MessageModal.tsx"],"sourcesContent":["'use client';\n\nimport { useResponsive } from 'antd-style';\nimport { memo, useState } from 'react';\nimport useControlledState from 'use-merge-value';\n\nimport Button from '@/Button';\nimport { styles as textStyles } from '@/chat/MessageInput/style';\nimport CodeEditor from '@/CodeEditor';\nimport { Flexbox } from '@/Flex';\nimport messageModalMessages from '@/i18n/resources/en/messageModal';\nimport { useTranslation } from '@/i18n/useTranslation';\nimport
|
|
1
|
+
{"version":3,"file":"MessageModal.mjs","names":["messageModalMessages","useControlledState","Flexbox","textStyles"],"sources":["../../../src/chat/MessageModal/MessageModal.tsx"],"sourcesContent":["'use client';\n\nimport { useResponsive } from 'antd-style';\nimport { memo, useState } from 'react';\nimport useControlledState from 'use-merge-value';\n\nimport Button from '@/base-ui/Button';\nimport { TextArea } from '@/base-ui/Input';\nimport { Modal } from '@/base-ui/Modal';\nimport { styles as textStyles } from '@/chat/MessageInput/style';\nimport CodeEditor from '@/CodeEditor';\nimport { Flexbox } from '@/Flex';\nimport messageModalMessages from '@/i18n/resources/en/messageModal';\nimport { useTranslation } from '@/i18n/useTranslation';\nimport Markdown from '@/Markdown';\n\nimport { type MessageModalProps } from './type';\n\nconst MessageModal = memo<MessageModalProps>(\n ({\n editing,\n open,\n height = '75vh',\n onOpenChange,\n onEditingChange,\n placeholder,\n value,\n language = 'markdown',\n onChange,\n text,\n footer,\n extra,\n }) => {\n const { mobile } = useResponsive();\n const { t } = useTranslation(messageModalMessages);\n const [isEdit, setTyping] = useControlledState(false, {\n onChange: onEditingChange,\n value: editing,\n });\n\n const [showModal, setShowModal] = useControlledState(false, {\n onChange: onOpenChange,\n value: open,\n });\n\n const [temporaryValue, setMessage] = useState(value);\n\n const confirmText = text?.confirm ?? t('messageModal.confirm');\n const cancelText = text?.cancel ?? t('messageModal.cancel');\n const editText = text?.edit ?? t('messageModal.edit');\n\n const modalFooter = isEdit ? (\n <Flexbox direction={'horizontal-reverse'} gap={8}>\n <Button\n type=\"primary\"\n onClick={() => {\n setTyping(false);\n onChange?.(temporaryValue);\n setMessage(value);\n }}\n >\n {confirmText}\n </Button>\n <Button\n onClick={() => {\n setTyping(false);\n setMessage(value);\n }}\n >\n {cancelText}\n </Button>\n </Flexbox>\n ) : (\n footer\n );\n\n return (\n <Modal\n allowFullscreen\n destroyOnHidden\n cancelText={cancelText}\n footer={modalFooter}\n height={height}\n okText={editText}\n open={showModal}\n title={text?.title}\n onOk={() => setTyping(true)}\n onCancel={() => {\n setShowModal(false);\n setTyping(false);\n setMessage(value);\n }}\n >\n {isEdit ? (\n mobile ? (\n <TextArea\n autoSize\n className={textStyles}\n defaultValue={temporaryValue}\n placeholder={placeholder}\n value={temporaryValue}\n variant={'borderless'}\n onBlur={(e) => setMessage(e.target.value)}\n onChange={(value) => setMessage(value.target.value)}\n />\n ) : (\n <CodeEditor\n className={textStyles}\n defaultValue={temporaryValue}\n language={language}\n placeholder={placeholder}\n value={temporaryValue}\n variant={'borderless'}\n onBlur={(e) => setMessage(e.target.value)}\n onValueChange={(value) => setMessage(value)}\n />\n )\n ) : (\n <>\n {extra}\n <Markdown variant={'chat'}>{String(value || placeholder)}</Markdown>\n </>\n )}\n </Modal>\n );\n },\n);\n\nMessageModal.displayName = 'MessageModal';\n\nexport default MessageModal;\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAM,eAAe,MAClB,EACC,SACA,MACA,SAAS,QACT,cACA,iBACA,aACA,OACA,WAAW,YACX,UACA,MACA,QACA,YACI;CACJ,MAAM,EAAE,WAAW,cAAc;CACjC,MAAM,EAAE,MAAM,eAAeA,oBAAoB;CACjD,MAAM,CAAC,QAAQ,aAAaC,cAAmB,OAAO;EACpD,UAAU;EACV,OAAO;CACT,CAAC;CAED,MAAM,CAAC,WAAW,gBAAgBA,cAAmB,OAAO;EAC1D,UAAU;EACV,OAAO;CACT,CAAC;CAED,MAAM,CAAC,gBAAgB,cAAc,SAAS,KAAK;CAEnD,MAAM,cAAc,MAAM,WAAW,EAAE,sBAAsB;CAC7D,MAAM,aAAa,MAAM,UAAU,EAAE,qBAAqB;CAC1D,MAAM,WAAW,MAAM,QAAQ,EAAE,mBAAmB;CA2BpD,OACE,oBAAC,OAAD;EACE,iBAAA;EACA,iBAAA;EACY;EACZ,QA9BgB,SAClB,qBAACC,mBAAD;GAAS,WAAW;GAAsB,KAAK;GAA/C,UAAA,CACE,oBAAC,QAAD;IACE,MAAK;IACL,eAAe;KACb,UAAU,KAAK;KACf,WAAW,cAAc;KACzB,WAAW,KAAK;IAClB;IAEC,UAAA;GACK,CAAA,GACR,oBAAC,QAAD;IACE,eAAe;KACb,UAAU,KAAK;KACf,WAAW,KAAK;IAClB;IAEC,UAAA;GACK,CAAA,CACD;EAET,CAAA,IAAA;EASU;EACR,QAAQ;EACR,MAAM;EACN,OAAO,MAAM;EACb,YAAY,UAAU,IAAI;EAC1B,gBAAgB;GACd,aAAa,KAAK;GAClB,UAAU,KAAK;GACf,WAAW,KAAK;EAClB;EAEC,UAAA,SACC,SACE,oBAAC,UAAD;GACE,UAAA;GACA,WAAWC;GACX,cAAc;GACD;GACb,OAAO;GACP,SAAS;GACT,SAAS,MAAM,WAAW,EAAE,OAAO,KAAK;GACxC,WAAW,UAAU,WAAW,MAAM,OAAO,KAAK;EACnD,CAAA,IAED,oBAAC,YAAD;GACE,WAAWA;GACX,cAAc;GACJ;GACG;GACb,OAAO;GACP,SAAS;GACT,SAAS,MAAM,WAAW,EAAE,OAAO,KAAK;GACxC,gBAAgB,UAAU,WAAW,KAAK;EAC3C,CAAA,IAGH,qBAAA,YAAA,EAAA,UAAA,CACG,OACD,oBAAC,UAAD;GAAU,SAAS;GAAS,UAAA,OAAO,SAAS,WAAW;EAAY,CAAA,CACnE,EAAA,CAAA;CAEC,CAAA;AAEX,CACF;AAEA,aAAa,cAAc"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../Modal/index.mjs";
|
|
1
|
+
import { ModalComponentProps } from "../../base-ui/Modal/type.mjs";
|
|
2
|
+
import "../../base-ui/Modal/index.mjs";
|
|
3
3
|
import { MessageInputProps } from "../MessageInput/type.mjs";
|
|
4
4
|
import "../MessageInput/index.mjs";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
//#region src/chat/MessageModal/type.d.ts
|
|
7
|
-
interface MessageModalProps extends Pick<
|
|
7
|
+
interface MessageModalProps extends Pick<ModalComponentProps, 'open' | 'footer'> {
|
|
8
8
|
editing?: boolean;
|
|
9
9
|
extra?: ReactNode;
|
|
10
10
|
height?: MessageInputProps['height'];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import ActionIcon from "../../base-ui/ActionIcon/ActionIcon.mjs";
|
|
3
|
+
import Progress from "../../base-ui/Progress/Progress.mjs";
|
|
3
4
|
import { useTranslation } from "../../i18n/useTranslation.mjs";
|
|
4
5
|
import chat_default from "../../i18n/resources/en/chat.mjs";
|
|
5
6
|
import { useMemo } from "react";
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
import { cssVar } from "antd-style";
|
|
8
|
-
import { Progress } from "antd";
|
|
9
9
|
import numeral from "numeral";
|
|
10
10
|
//#region src/chat/TokenTag/TokenTag.tsx
|
|
11
11
|
const format = (number) => numeral(number).format("0,0");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenTag.mjs","names":["chatMessages"],"sources":["../../../src/chat/TokenTag/TokenTag.tsx"],"sourcesContent":["'use client';\n\nimport {
|
|
1
|
+
{"version":3,"file":"TokenTag.mjs","names":["chatMessages"],"sources":["../../../src/chat/TokenTag/TokenTag.tsx"],"sourcesContent":["'use client';\n\nimport { cssVar } from 'antd-style';\nimport numeral from 'numeral';\nimport { type FC, useMemo } from 'react';\n\nimport ActionIcon from '@/base-ui/ActionIcon';\nimport Progress from '@/base-ui/Progress';\nimport chatMessages from '@/i18n/resources/en/chat';\nimport { useTranslation } from '@/i18n/useTranslation';\n\nimport type { TokenTagProps } from './type';\n\nconst format = (number: number) => numeral(number).format('0,0');\n\nconst TokenTag: FC<TokenTagProps> = ({\n mode = 'remained',\n maxValue,\n value,\n text,\n showInfo,\n size = 20,\n ...rest\n}) => {\n const { t } = useTranslation(chatMessages);\n const valueLeft = maxValue - value;\n const percent = value / maxValue;\n const remainedText = text?.remained ?? t('tokenTag.remained');\n const usedText = text?.used ?? t('tokenTag.used');\n const overloadText = text?.overload ?? t('tokenTag.overload');\n\n const data = useMemo(() => {\n let type: 'normal' | 'low' | 'overload';\n let color;\n\n if (percent < 0.7) {\n type = 'normal';\n color = cssVar.colorText;\n } else if (percent < 0.9) {\n type = 'low';\n color = cssVar.colorWarning;\n } else {\n type = 'overload';\n color = cssVar.colorError;\n }\n return {\n color,\n type,\n };\n }, [percent]);\n\n const title =\n valueLeft > 0\n ? [\n mode === 'remained' ? remainedText : usedText,\n mode === 'remained' ? format(valueLeft) : format(value),\n ].join(' ')\n : overloadText;\n\n return (\n <ActionIcon\n size={size}\n title={showInfo ? title : undefined}\n icon={\n <Progress\n percent={percent * 100}\n showInfo={false}\n size={Number(typeof size === 'object' ? size?.size || 20 : size) || 20}\n strokeColor={data.color}\n type=\"circle\"\n />\n }\n {...rest}\n />\n );\n};\n\nTokenTag.displayName = 'TokenTag';\n\nexport default TokenTag;\n"],"mappings":";;;;;;;;;;AAaA,MAAM,UAAU,WAAmB,QAAQ,MAAM,CAAC,CAAC,OAAO,KAAK;AAE/D,MAAM,YAA+B,EACnC,OAAO,YACP,UACA,OACA,MACA,UACA,OAAO,IACP,GAAG,WACC;CACJ,MAAM,EAAE,MAAM,eAAeA,YAAY;CACzC,MAAM,YAAY,WAAW;CAC7B,MAAM,UAAU,QAAQ;CACxB,MAAM,eAAe,MAAM,YAAY,EAAE,mBAAmB;CAC5D,MAAM,WAAW,MAAM,QAAQ,EAAE,eAAe;CAChD,MAAM,eAAe,MAAM,YAAY,EAAE,mBAAmB;CAE5D,MAAM,OAAO,cAAc;EACzB,IAAI;EACJ,IAAI;EAEJ,IAAI,UAAU,IAAK;GACjB,OAAO;GACP,QAAQ,OAAO;EACjB,OAAO,IAAI,UAAU,IAAK;GACxB,OAAO;GACP,QAAQ,OAAO;EACjB,OAAO;GACL,OAAO;GACP,QAAQ,OAAO;EACjB;EACA,OAAO;GACL;GACA;EACF;CACF,GAAG,CAAC,OAAO,CAAC;CAEZ,MAAM,QACJ,YAAY,IACR,CACE,SAAS,aAAa,eAAe,UACrC,SAAS,aAAa,OAAO,SAAS,IAAI,OAAO,KAAK,CACxD,CAAC,CAAC,KAAK,GAAG,IACV;CAEN,OACE,oBAAC,YAAD;EACQ;EACN,OAAO,WAAW,QAAQ,KAAA;EAC1B,MACE,oBAAC,UAAD;GACE,SAAS,UAAU;GACnB,UAAU;GACV,MAAM,OAAO,OAAO,SAAS,WAAW,MAAM,QAAQ,KAAK,IAAI,KAAK;GACpE,aAAa,KAAK;GAClB,MAAK;EACN,CAAA;EAEH,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc"}
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { alphaBg, 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/ColorScales/ScaleRow.tsx
|
|
8
8
|
const ScaleRow = memo(({ name, title, scale }) => {
|
|
9
9
|
let style = {};
|
|
@@ -23,8 +23,10 @@ const ScaleRow = memo(({ name, title, scale }) => {
|
|
|
23
23
|
};
|
|
24
24
|
isAlpha = true;
|
|
25
25
|
}
|
|
26
|
-
return /* @__PURE__ */ jsxs(
|
|
27
|
-
|
|
26
|
+
return /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
27
|
+
horizontal: true,
|
|
28
|
+
align: "center",
|
|
29
|
+
gap: 2,
|
|
28
30
|
children: [/* @__PURE__ */ jsx("div", {
|
|
29
31
|
className: styles.scaleRowTitle,
|
|
30
32
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -40,7 +42,7 @@ const ScaleRow = memo(({ name, title, scale }) => {
|
|
|
40
42
|
onClick: async () => {
|
|
41
43
|
const content = `token.${name}${index}${isAlpha ? "A" : ""} /* ${color} */`;
|
|
42
44
|
await copyToClipboard(content);
|
|
43
|
-
|
|
45
|
+
toast.success(content);
|
|
44
46
|
},
|
|
45
47
|
children: /* @__PURE__ */ jsx(FlexBasic_default, {
|
|
46
48
|
horizontal: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScaleRow.mjs","names":["Flexbox"],"sources":["../../../src/color/ColorScales/ScaleRow.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ScaleRow.mjs","names":["Flexbox"],"sources":["../../../src/color/ColorScales/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 { alphaBg, styles } from './style';\n\nexport interface IScaleRow {\n name: string;\n scale: string[];\n title: 'light' | 'lightA' | 'dark' | 'darkA';\n}\n\nconst ScaleRow = memo<IScaleRow>(({ name, title, scale }) => {\n let style = {};\n let isAlpha = false;\n\n switch (title) {\n case 'lightA': {\n style = { background: alphaBg.light, backgroundColor: '#fff' };\n isAlpha = true;\n break;\n }\n case 'darkA': {\n style = { background: alphaBg.dark, backgroundColor: '#000' };\n isAlpha = true;\n break;\n }\n default: {\n break;\n }\n }\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,IAAI,QAAQ,CAAC;CACb,IAAI,UAAU;CAEd,QAAQ,OAAR;EACE,KAAK;GACH,QAAQ;IAAE,YAAY,QAAQ;IAAO,iBAAiB;GAAO;GAC7D,UAAU;GACV;EAEF,KAAK;GACH,QAAQ;IAAE,YAAY,QAAQ;IAAM,iBAAiB;GAAO;GAC5D,UAAU;CAMd;CAEA,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,QAAQ,UAAU,MAAM,GAAG,MAAM,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,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/index.d.mts
CHANGED
|
@@ -185,6 +185,7 @@ import { AUTO_HEIGHT_MESSAGE_TYPE } from "./HtmlPreview/injectAutoHeightScript.m
|
|
|
185
185
|
import "./HtmlPreview/index.mjs";
|
|
186
186
|
import { ImagePreviewOptions, ImageProps, PreviewGroupProps } from "./Image/type.mjs";
|
|
187
187
|
import PreviewGroup from "./Image/PreviewGroup.mjs";
|
|
188
|
+
import { UseImagePreviewResult, useImagePreview } from "./Image/useImagePreview.mjs";
|
|
188
189
|
import Image from "./Image/index.mjs";
|
|
189
190
|
import A from "./A/index.mjs";
|
|
190
191
|
import { BadgeProps, BadgeSize, BadgeStatus } from "./base-ui/Badge/type.mjs";
|
|
@@ -328,4 +329,4 @@ import { LayoutToc } from "./Layout/components/LayoutToc.mjs";
|
|
|
328
329
|
import Layout from "./Layout/index.mjs";
|
|
329
330
|
import { rehypeStreamAnimated } from "@lobehub/streamdown";
|
|
330
331
|
import { ErrorBoundary, ErrorBoundaryProps } from "react-error-boundary";
|
|
331
|
-
export { A, type AProps, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionIcon, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconProps, type ActionIconSize, Alert, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemType, Block, type BlockProps, Burger, type BurgerProps, Button, type ButtonProps, type CDN, CLASSNAMES, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapse, type CollapseItemType, type CollapseProps, type ColorPalettes, type ColorPalettesAlpha, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, type DiffViewMode, type DivProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelProps, DraggableSideNav, type DraggableSideNavProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type MenuItemType as DropdownMenuItemType, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, _default as FlexBasic, type FlexBasicProps, _default as Flexbox, type FlexboxProps, FluentEmoji, type FluentEmojiProps, FontLoader, type FontLoaderProps, Footer, type FooterProps, Form, FormGroup, type FormGroupItemType, type FormGroupProps, type FormInstance, FormItem, type FormItemProps, FormModal, type FormModalProps, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, Freeze, type FreezeProps, type GenericItemType, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconProps, IconProvider, type IconSize, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, Input, InputNumber, type InputNumberProps, InputOPT, type InputOPTProps, InputPassword, type InputPasswordProps, type InputProps, type ItemType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, List, ListItem, type ListItemProps, type ListProps, type LobeCustomStylish, type LobeCustomToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, Menu, type MenuCheckboxItemType, type MenuInfo, type MenuItemType, type MenuProps, Mermaid, type MermaidProps, Meta, type MetaProps, Modal, ModalHost, type ModalHostProps, type ModalInstance, type ModalProps, ModalProvider, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationProps, type PaginationSize, PatchDiff, type PatchDiffProps, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, PopoverPortal, type PopoverPortalAtomProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, type RawModalComponent, type RawModalComponentProps, type RawModalInstance, type RawModalKeyOptions, type RawModalOptions, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedProps, Select, type SelectProps, _default$1 as ShikiLobeTheme, SideNav, type SideNavProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBlock, type SkeletonBlockProps, SkeletonButton, type SkeletonButtonProps, SkeletonParagraph, type SkeletonParagraphProps, type SkeletonProps, SkeletonTags, type SkeletonTagsProps, SkeletonTitle, type SkeletonTitleProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, type SvgProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Tabs, type TabsProps, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextProps, ThemeProvider, type ThemeProviderProps, ThemeSwitch, type ThemeSwitchProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, Video, type VideoProps, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, installGlobalFocusRing, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };
|
|
332
|
+
export { A, type AProps, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionIcon, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconProps, type ActionIconSize, Alert, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemType, Block, type BlockProps, Burger, type BurgerProps, Button, type ButtonProps, type CDN, CLASSNAMES, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapse, type CollapseItemType, type CollapseProps, type ColorPalettes, type ColorPalettesAlpha, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, type DiffViewMode, type DivProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelProps, DraggableSideNav, type DraggableSideNavProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type MenuItemType as DropdownMenuItemType, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, _default as FlexBasic, type FlexBasicProps, _default as Flexbox, type FlexboxProps, FluentEmoji, type FluentEmojiProps, FontLoader, type FontLoaderProps, Footer, type FooterProps, Form, FormGroup, type FormGroupItemType, type FormGroupProps, type FormInstance, FormItem, type FormItemProps, FormModal, type FormModalProps, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, Freeze, type FreezeProps, type GenericItemType, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconProps, IconProvider, type IconSize, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, Input, InputNumber, type InputNumberProps, InputOPT, type InputOPTProps, InputPassword, type InputPasswordProps, type InputProps, type ItemType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, List, ListItem, type ListItemProps, type ListProps, type LobeCustomStylish, type LobeCustomToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, Menu, type MenuCheckboxItemType, type MenuInfo, type MenuItemType, type MenuProps, Mermaid, type MermaidProps, Meta, type MetaProps, Modal, ModalHost, type ModalHostProps, type ModalInstance, type ModalProps, ModalProvider, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationProps, type PaginationSize, PatchDiff, type PatchDiffProps, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, PopoverPortal, type PopoverPortalAtomProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, type RawModalComponent, type RawModalComponentProps, type RawModalInstance, type RawModalKeyOptions, type RawModalOptions, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedProps, Select, type SelectProps, _default$1 as ShikiLobeTheme, SideNav, type SideNavProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBlock, type SkeletonBlockProps, SkeletonButton, type SkeletonButtonProps, SkeletonParagraph, type SkeletonParagraphProps, type SkeletonProps, SkeletonTags, type SkeletonTagsProps, SkeletonTitle, type SkeletonTitleProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, type SvgProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Tabs, type TabsProps, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextProps, ThemeProvider, type ThemeProviderProps, ThemeSwitch, type ThemeSwitchProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseImagePreviewResult, Video, type VideoProps, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, installGlobalFocusRing, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useImagePreview, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };
|
package/es/index.mjs
CHANGED
|
@@ -116,6 +116,7 @@ import { AUTO_HEIGHT_MESSAGE_TYPE } from "./HtmlPreview/injectAutoHeightScript.m
|
|
|
116
116
|
import { HtmlPreviewIframe } from "./HtmlPreview/Iframe.mjs";
|
|
117
117
|
import HtmlPreview from "./HtmlPreview/HtmlPreview.mjs";
|
|
118
118
|
import PreviewGroup from "./Image/PreviewGroup.mjs";
|
|
119
|
+
import { useImagePreview } from "./Image/useImagePreview.mjs";
|
|
119
120
|
import Image from "./Image/index.mjs";
|
|
120
121
|
import ImageSelect from "./ImageSelect/ImageSelect.mjs";
|
|
121
122
|
import Input from "./Input/Input.mjs";
|
|
@@ -168,4 +169,4 @@ import ThemeSwitch from "./ThemeSwitch/ThemeSwitch.mjs";
|
|
|
168
169
|
import Toc from "./Toc/Toc.mjs";
|
|
169
170
|
import { rehypeStreamAnimated } from "@lobehub/streamdown";
|
|
170
171
|
import { ErrorBoundary } from "react-error-boundary";
|
|
171
|
-
export { A, Accordion, AccordionItem, ActionIcon, ActionIconGroup, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Block, Burger, Button, CLASSNAMES, Center, Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapse, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelFooter, DraggablePanelHeader, DraggableSideNav, Drawer, Dropdown, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FluentEmoji, FontLoader, Footer, Form, FormGroup, FormItem, FormModal, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input, InputNumber, InputOPT, InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, ListItem, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Menu, Mermaid, Meta, Modal, ModalHost, ModalProvider, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, Select, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonBlock, SkeletonButton, SkeletonParagraph, SkeletonTags, SkeletonTitle, SliderWithInput, Snippet, SortableList, Spin, SyntaxHighlighter, SyntaxMermaid, Tabs, Tag, Text, TextArea, ThemeProvider, ThemeSwitch, ToastHost, Toc, Tooltip, TooltipGroup, Typography, Upload, UploadDragger, Video, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, installGlobalFocusRing, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };
|
|
172
|
+
export { A, Accordion, AccordionItem, ActionIcon, ActionIconGroup, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Block, Burger, Button, CLASSNAMES, Center, Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapse, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelFooter, DraggablePanelHeader, DraggableSideNav, Drawer, Dropdown, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FluentEmoji, FontLoader, Footer, Form, FormGroup, FormItem, FormModal, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input, InputNumber, InputOPT, InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, ListItem, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Menu, Mermaid, Meta, Modal, ModalHost, ModalProvider, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, Select, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonBlock, SkeletonButton, SkeletonParagraph, SkeletonTags, SkeletonTitle, SliderWithInput, Snippet, SortableList, Spin, SyntaxHighlighter, SyntaxMermaid, Tabs, Tag, Text, TextArea, ThemeProvider, ThemeSwitch, ToastHost, Toc, Tooltip, TooltipGroup, Typography, Upload, UploadDragger, Video, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, installGlobalFocusRing, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useImagePreview, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };
|
|
@@ -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 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseline.mjs","names":[],"sources":["../../src/static-css/baseline.ts"],"sourcesContent":["import type { AntdProbeName } from './registry';\n\n// The antd components @lobehub/ui internals can render. Kept in sync with the\n// source tree by baseline.test.ts — a failure there means this list must change.\nexport const lobeUiAntdBaseline: AntdProbeName[] = [\n 'alert',\n 'anchor',\n 'app',\n 'auto-complete',\n 'avatar',\n 'button',\n 'collapse',\n 'date-picker',\n 'divider',\n 'drawer',\n 'dropdown',\n 'form',\n 'input',\n 'input-number',\n 'input-textarea',\n 'menu',\n 'modal',\n '
|
|
1
|
+
{"version":3,"file":"baseline.mjs","names":[],"sources":["../../src/static-css/baseline.ts"],"sourcesContent":["import type { AntdProbeName } from './registry';\n\n// The antd components @lobehub/ui internals can render. Kept in sync with the\n// source tree by baseline.test.ts — a failure there means this list must change.\nexport const lobeUiAntdBaseline: AntdProbeName[] = [\n 'alert',\n 'anchor',\n 'app',\n 'auto-complete',\n 'avatar',\n 'button',\n 'collapse',\n 'date-picker',\n 'divider',\n 'drawer',\n 'dropdown',\n 'form',\n 'input',\n 'input-number',\n 'input-textarea',\n 'menu',\n 'modal',\n 'segmented',\n 'select',\n 'slider',\n 'tabs',\n 'tag',\n 'tag-preset',\n 'tag-status',\n];\n"],"mappings":";AAIA,MAAa,qBAAsC;CACjD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
|
|
3
3
|
import Center from "../../Flex/Center.mjs";
|
|
4
|
-
import DraggablePanel from "../../DraggablePanel/
|
|
4
|
+
import DraggablePanel from "../../base-ui/DraggablePanel/DraggablePanel.mjs";
|
|
5
5
|
import { styles } from "./style.mjs";
|
|
6
6
|
import { memo } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Flexbox"],"sources":["../../../src/storybook/StoryBook/index.tsx"],"sourcesContent":["'use client';\n\nimport { cx, useResponsive } from 'antd-style';\nimport { LevaPanel } from 'leva';\nimport { memo, type Ref } from 'react';\n\nimport DraggablePanel from '@/DraggablePanel';\nimport { Center, Flexbox, type FlexboxProps } from '@/Flex';\n\nimport { styles } from './style';\n\nexport interface StoryBookProps extends FlexboxProps {\n levaStore: any;\n noPadding?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StoryBook = memo<StoryBookProps>(\n ({ ref, levaStore, noPadding, className, children, ...rest }) => {\n const { mobile } = useResponsive();\n\n return (\n <Flexbox\n align={'stretch'}\n className={cx(styles.editor, className)}\n data-lobe-storybook=\"\"\n flex={1}\n height={'100%'}\n horizontal={!mobile}\n justify={'stretch'}\n ref={ref}\n width={'100%'}\n >\n <Center className={cx(noPadding ? styles.left : styles.leftWithPadding)} flex={1} {...rest}>\n {children}\n </Center>\n <DraggablePanel\n className={styles.right}\n minWidth={280}\n placement={mobile ? 'bottom' : 'right'}\n >\n <div className={styles.leva}>\n <LevaPanel fill flat store={levaStore} titleBar={false} />{' '}\n </div>\n </DraggablePanel>\n </Flexbox>\n );\n },\n);\n\nStoryBook.displayName = 'StoryBook';\n\nexport default StoryBook;\n\nexport { useControls, useCreateStore } from 'leva';\n"],"mappings":";;;;;;;;;;AAiBA,MAAa,YAAY,MACtB,EAAE,KAAK,WAAW,WAAW,WAAW,UAAU,GAAG,WAAW;CAC/D,MAAM,EAAE,WAAW,cAAc;CAEjC,OACE,qBAACA,mBAAD;EACE,OAAO;EACP,WAAW,GAAG,OAAO,QAAQ,SAAS;EACtC,uBAAoB;EACpB,MAAM;EACN,QAAQ;EACR,YAAY,CAAC;EACb,SAAS;EACJ;EACL,OAAO;EATT,UAAA,CAWE,oBAAC,QAAD;GAAQ,WAAW,GAAG,YAAY,OAAO,OAAO,OAAO,eAAe;GAAG,MAAM;GAAG,GAAI;GACnF;EACK,CAAA,GACR,oBAAC,gBAAD;GACE,WAAW,OAAO;GAClB,UAAU;GACV,WAAW,SAAS,WAAW;GAE/B,UAAA,qBAAC,OAAD;IAAK,WAAW,OAAO;IAAvB,UAAA,CACE,oBAAC,WAAD;KAAW,MAAA;KAAK,MAAA;KAAK,OAAO;KAAW,UAAU;IAAQ,CAAA,GAAE,GACxD;;EACS,CAAA,CACT;;AAEb,CACF;AAEA,UAAU,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Flexbox"],"sources":["../../../src/storybook/StoryBook/index.tsx"],"sourcesContent":["'use client';\n\nimport { cx, useResponsive } from 'antd-style';\nimport { LevaPanel } from 'leva';\nimport { memo, type Ref } from 'react';\n\nimport { DraggablePanel } from '@/base-ui/DraggablePanel';\nimport { Center, Flexbox, type FlexboxProps } from '@/Flex';\n\nimport { styles } from './style';\n\nexport interface StoryBookProps extends FlexboxProps {\n levaStore: any;\n noPadding?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StoryBook = memo<StoryBookProps>(\n ({ ref, levaStore, noPadding, className, children, ...rest }) => {\n const { mobile } = useResponsive();\n\n return (\n <Flexbox\n align={'stretch'}\n className={cx(styles.editor, className)}\n data-lobe-storybook=\"\"\n flex={1}\n height={'100%'}\n horizontal={!mobile}\n justify={'stretch'}\n ref={ref}\n width={'100%'}\n >\n <Center className={cx(noPadding ? styles.left : styles.leftWithPadding)} flex={1} {...rest}>\n {children}\n </Center>\n <DraggablePanel\n className={styles.right}\n minWidth={280}\n placement={mobile ? 'bottom' : 'right'}\n >\n <div className={styles.leva}>\n <LevaPanel fill flat store={levaStore} titleBar={false} />{' '}\n </div>\n </DraggablePanel>\n </Flexbox>\n );\n },\n);\n\nStoryBook.displayName = 'StoryBook';\n\nexport default StoryBook;\n\nexport { useControls, useCreateStore } from 'leva';\n"],"mappings":";;;;;;;;;;AAiBA,MAAa,YAAY,MACtB,EAAE,KAAK,WAAW,WAAW,WAAW,UAAU,GAAG,WAAW;CAC/D,MAAM,EAAE,WAAW,cAAc;CAEjC,OACE,qBAACA,mBAAD;EACE,OAAO;EACP,WAAW,GAAG,OAAO,QAAQ,SAAS;EACtC,uBAAoB;EACpB,MAAM;EACN,QAAQ;EACR,YAAY,CAAC;EACb,SAAS;EACJ;EACL,OAAO;EATT,UAAA,CAWE,oBAAC,QAAD;GAAQ,WAAW,GAAG,YAAY,OAAO,OAAO,OAAO,eAAe;GAAG,MAAM;GAAG,GAAI;GACnF;EACK,CAAA,GACR,oBAAC,gBAAD;GACE,WAAW,OAAO;GAClB,UAAU;GACV,WAAW,SAAS,WAAW;GAE/B,UAAA,qBAAC,OAAD;IAAK,WAAW,OAAO;IAAvB,UAAA,CACE,oBAAC,WAAD;KAAW,MAAA;KAAK,MAAA;KAAK,OAAO;KAAW,UAAU;IAAQ,CAAA,GAAE,GACxD;;EACS,CAAA,CACT;;AAEb,CACF;AAEA,UAAU,cAAc"}
|