diff --git a/package.json b/package.json index af1ecacdc..b74a32780 100644 --- a/package.json +++ b/package.json @@ -81,9 +81,10 @@ "style-loader": "^3.3.1", "ts-loader": "^9.4.2", "turbo": "^1.8.3", - "typescript": "^5.1.6", - "webpack": "^5.88.0", - "webpack-cli": "^5.0.0" + "typescript": "^5.3.3", + "webpack": "^5.96.1", + "webpack-cli": "^5.1.4", + "terser-webpack-plugin": "^5.3.10" }, "publishConfig": { "access": "public" diff --git a/packages/studio-components/ai-coding-prompt.md b/packages/studio-components/ai-coding-prompt.md new file mode 100644 index 000000000..e3ce99a77 --- /dev/null +++ b/packages/studio-components/ai-coding-prompt.md @@ -0,0 +1,45 @@ +# AI 辅助组件优化与开发协作 Prompt + +## 原始版本 + +1. 代码结构:尽量避免长代码的出现,可以使用 function 或者 hooks 进行代码拆分。让整体代码清晰易懂。 +2. 性能优化:减少不必要的重渲染。只有涉及复杂逻辑计算,才使用 useMemo 优化,style 等计算请不要使用useMemo +3. 状态管理:数据流请使用 useState,如果有多个状态,请合并成一个state,使用 setState 更新 +4. 类型推断:请确保 typescript 类型准确,避免 any 出现。 +5. 代码注释:对于复杂难维护的代码,请加上代码注释,如果注释是 /\*\* \*/ 要另起一行,// 则可以追加在代码后面。 +6. 组件文档:文档通过 dumi 运行的,中文文档是 index.md, 英文文档是 index.en-US.md,确保内容一致 +7. 样式优化:请不要使用 CSS 文件,尽量使用 Antd 提供的组件进行组合,要考虑 响应式设计,避免使用固定高度和宽度,要考虑主题色,使用token 进行样式定制 +8. 其他优化细节,你可以自己补充完善 + +## 开发协作模式 + +以下是我们与 AI 助手协作开发的有效模式: + +### 1. 渐进式优化 + +- 一次专注于一个方面的优化 +- 每次更改后等待反馈 +- 根据反馈调整优化方向 + +### 2. 代码审查流程 + +- AI 提供优化建议 +- 开发者审查并给出反馈 +- AI 根据反馈进行调整 +- 最终确认后提交代码 + +### 3. 文档同步 + +- 代码更改与文档更新同步进行 +- 确保中英文文档一致 +- 提供详细的使用示例 + +### 4. Git 工作流 + +- 使用清晰的英文提交信息 +- 遵循 angular conventional commits 规范 +- 相关文件一起提交(组件代码、文档等) + +``` + +``` diff --git a/packages/studio-components/src/CollapseCard/index.en-US.md b/packages/studio-components/src/CollapseCard/index.en-US.md new file mode 100644 index 000000000..580a64c3f --- /dev/null +++ b/packages/studio-components/src/CollapseCard/index.en-US.md @@ -0,0 +1,87 @@ +--- +title: CollapseCard +group: + title: Data Display + order: 1 +--- + +# CollapseCard + +A collapsible card component that supports custom title, content and styles. + +## When To Use + +- When you need to display collapsible content areas +- When you need to save page space while maintaining content accessibility +- When you need to group related content + +## Examples + +### Basic Usage + +```tsx +import React from 'react'; +import { CollapseCard } from '@graphscope/studio-components'; + +const Demo = () => { + return ( + +
This is the card content
+
+ ); +}; + +export default Demo; +``` + +### With Tooltip + +```tsx +import React from 'react'; +import { CollapseCard } from '@graphscope/studio-components'; + +const Demo = () => { + return ( + +
This is the card content
+
+ ); +}; + +export default Demo; +``` + +### With Border + +```tsx +import React from 'react'; +import { CollapseCard } from '@graphscope/studio-components'; + +const Demo = () => { + return ( + +
This is the card content
+
+ ); +}; + +export default Demo; +``` + +## API + +### CollapseCard + +| Property | Description | Type | Default | +| --------------- | ------------------------------------- | ----------------------------- | ------- | +| bordered | Whether to show border | `boolean` | `false` | +| ghost | Whether to use transparent background | `boolean` | `true` | +| title | Card title | `React.ReactNode` | - | +| children | Card content | `React.ReactNode` | - | +| defaultCollapse | Whether to collapse by default | `boolean` | `false` | +| tooltip | Tooltip content | `React.ReactNode` | - | +| style | Custom style | `React.CSSProperties` | - | +| className | Custom class name | `string` | - | +| onChange | Callback when expand/collapse | `(isActive: boolean) => void` | - | + + diff --git a/packages/studio-components/src/CollapseCard/index.md b/packages/studio-components/src/CollapseCard/index.md new file mode 100644 index 000000000..72f9d7fa8 --- /dev/null +++ b/packages/studio-components/src/CollapseCard/index.md @@ -0,0 +1,89 @@ +--- +title: CollapseCard 可折叠卡片 +group: + title: 数据展示 + order: 1 +--- + +# CollapseCard 可折叠卡片 + +一个可折叠的卡片组件,支持自定义标题、内容和样式。 + +## 何时使用 + +- 需要展示可折叠的内容区域时 +- 需要节省页面空间,同时保持内容可访问性时 +- 需要分组展示相关内容时 + +## 代码演示 + +### 基础用法 + +```tsx +import React from 'react'; +import { CollapseCard } from '@graphscope/studio-components'; + +const Demo = () => { + return ( + +
这是卡片的内容
+
+ ); +}; + +export default Demo; +``` + +### 带提示信息 + +```tsx +import React from 'react'; +import { CollapseCard } from '@graphscope/studio-components'; + +const Demo = () => { + return ( + +
这是卡片的内容
+
+ ); +}; + +export default Demo; +``` + +### 带边框 + +```tsx +import React from 'react'; +import { CollapseCard } from '@graphscope/studio-components'; + +const Demo = () => { + return ( + +
这是卡片的内容
+
+ ); +}; + +export default Demo; +``` + +## API + +### CollapseCard + +| 参数 | 说明 | 类型 | 默认值 | +| --------------- | ----------------- | ----------------------------- | ------- | +| bordered | 是否显示边框 | `boolean` | `false` | +| ghost | 是否透明背景 | `boolean` | `true` | +| title | 卡片标题 | `React.ReactNode` | - | +| children | 卡片内容 | `React.ReactNode` | - | +| defaultCollapse | 默认是否折叠 | `boolean` | `false` | +| tooltip | 提示信息 | `React.ReactNode` | - | +| style | 自定义样式 | `React.CSSProperties` | - | +| className | 自定义类名 | `string` | - | +| onChange | 展开/收起时的回调 | `(isActive: boolean) => void` | - | + +``` + +``` diff --git a/packages/studio-components/src/CollapseCard/index.tsx b/packages/studio-components/src/CollapseCard/index.tsx index ed4dc906e..8bb2b4df4 100644 --- a/packages/studio-components/src/CollapseCard/index.tsx +++ b/packages/studio-components/src/CollapseCard/index.tsx @@ -1,47 +1,132 @@ -import React, { useState } from 'react'; +import React, { useMemo, useCallback } from 'react'; import { CaretRightOutlined, QuestionCircleOutlined } from '@ant-design/icons'; -import { Collapse, theme, Flex, Typography, Select, Space, Tooltip } from 'antd'; +import { Collapse, theme, Flex, Typography, Space, Tooltip } from 'antd'; +import type { CollapseProps } from 'antd'; import { useDynamicStyle } from '../hooks/useDynamicStyle'; -interface IAdvancedSettingProps { + +/** + * CollapseCard 组件的属性接口 + */ +export interface ICollapseCardProps { + /** 是否显示边框 */ bordered?: boolean; + /** 是否透明背景 */ ghost?: boolean; + /** 卡片标题 */ title: React.ReactNode; + /** 卡片内容 */ children: React.ReactNode; + /** 默认是否折叠 */ defaultCollapse?: boolean; + /** 提示信息 */ tooltip?: React.ReactNode; + /** 自定义样式 */ style?: React.CSSProperties; + /** 自定义类名 */ + className?: string; + /** 展开/收起时的回调 */ + onChange?: (isActive: boolean) => void; } -const CollapseCard: React.FunctionComponent = props => { - const { bordered, children, title, defaultCollapse, tooltip, style = {} } = props; +/** + * 可折叠卡片组件 + * @description 一个可折叠的卡片组件,支持自定义标题、内容和样式 + */ +const CollapseCard: React.FC = ({ + bordered = false, + ghost = true, + children, + title, + defaultCollapse = false, + tooltip, + style = {}, + className = '', + onChange, +}) => { + const { token } = theme.useToken(); const id = 'Studio-Collapse-Card'; const defaultActiveKey = defaultCollapse ? [] : [id]; + + // 使用 useMemo 优化样式计算 + const cardStyle = useMemo( + () => ({ + ...style, + backgroundColor: token.colorBgContainer, + borderRadius: token.borderRadiusLG, + boxShadow: bordered ? token.boxShadowTertiary : 'none', + }), + [style, token, bordered], + ); + + // 使用 useMemo 优化标题样式 + const titleStyle = useMemo( + () => ({ + margin: 0, + color: token.colorTextHeading, + fontSize: token.fontSizeLG, + fontWeight: token.fontWeightStrong, + }), + [token], + ); + + // 使用 useMemo 优化图标样式 + const iconStyle = useMemo( + () => ({ + transition: `transform ${token.motionDurationMid} ease`, + fontSize: token.fontSizeLG, + }), + [token], + ); + + // 动态样式注入 useDynamicStyle( - `.${id} .ant-collapse-header {padding:0px !important;} - .${id} .ant-collapse-content-box {padding:12px 0px !important;} + `.${id} .ant-collapse-header { + padding: ${token.padding}px !important; + transition: all ${token.motionDurationMid} ease; + } + .${id} .ant-collapse-content-box { + padding: ${token.padding}px ${token.paddingLG}px !important; + } `, id, ); + + // 使用 useCallback 优化事件处理函数 + const handleChange = useCallback( + (activeKeys: string | string[]) => { + const isActive = Array.isArray(activeKeys) ? activeKeys.includes(id) : activeKeys === id; + onChange?.(isActive); + }, + [id, onChange], + ); + + // 使用 useCallback 优化展开图标渲染函数 + const renderExpandIcon = useCallback( + (props: { isActive?: boolean }) => , + [iconStyle], + ); + return ( } + onChange={handleChange} + expandIcon={renderExpandIcon} items={[ { key: id, label: ( - + {title} {tooltip && ( - + )} diff --git a/packages/studio-components/src/EditableText/index.en-US.md b/packages/studio-components/src/EditableText/index.en-US.md new file mode 100644 index 000000000..926bb8c3b --- /dev/null +++ b/packages/studio-components/src/EditableText/index.en-US.md @@ -0,0 +1,86 @@ +--- +title: EditableText +group: + title: Data Display + order: 1 +--- + +# EditableText + +An editable text component that supports double-click editing, enter confirmation, and blur saving. + +## When To Use + +- When you need to let users edit text content directly +- When you need to display editable text fields +- When you need to implement Excel-like cell editing functionality + +## Examples + +### Basic Usage + +```tsx +import React from 'react'; +import { EditableText } from '@graphscope/studio-components'; + +const Demo = () => { + const handleTextChange = (text: string) => { + console.log('Text updated:', text); + }; + + return ; +}; + +export default Demo; +``` + +### Disabled State + +```tsx +import React from 'react'; +import { EditableText } from '@graphscope/studio-components'; + +const Demo = () => { + return {}} disabled />; +}; + +export default Demo; +``` + +### Custom Style + +```tsx +import React from 'react'; +import { EditableText } from '@graphscope/studio-components'; + +const Demo = () => { + return ( + {}} + style={{ + color: 'blue', + fontSize: '16px', + }} + maxWidth={200} + minWidth={100} + /> + ); +}; + +export default Demo; +``` + +## API + +### EditableText + +| Property | Description | Type | Default | +| ------------ | -------------------- | ------------------------ | ------- | +| text | Initial text content | `string` | - | +| onTextChange | Text change callback | `(text: string) => void` | - | +| id | Component identifier | `string` | - | +| style | Custom styles | `React.CSSProperties` | - | +| disabled | Whether disabled | `boolean` | `false` | +| maxWidth | Maximum width (px) | `number` | `100` | +| minWidth | Minimum width (px) | `number` | `60` | diff --git a/packages/studio-components/src/EditableText/index.md b/packages/studio-components/src/EditableText/index.md index 28d40100f..0273cc50e 100644 --- a/packages/studio-components/src/EditableText/index.md +++ b/packages/studio-components/src/EditableText/index.md @@ -1,8 +1,90 @@ --- -order: 1 -title: 可编辑文本 +title: EditableText 可编辑文本 +group: + title: 数据展示 + order: 1 --- +# EditableText 可编辑文本 + +可编辑文本组件,支持双击编辑、回车确认、失焦保存等功能。 + +## 何时使用 + +- 需要让用户直接编辑文本内容时 +- 需要展示可编辑的文本字段时 +- 需要实现类似 Excel 单元格编辑功能时 + +## 代码演示 + +### 基础用法 + +```tsx +import React from 'react'; +import { EditableText } from '@graphscope/studio-components'; + +const Demo = () => { + const handleTextChange = (text: string) => { + console.log('文本已更新:', text); + }; + + return ; +}; + +export default Demo; +``` + +### 禁用状态 + +```tsx +import React from 'react'; +import { EditableText } from '@graphscope/studio-components'; + +const Demo = () => { + return {}} disabled />; +}; + +export default Demo; +``` + +### 自定义样式 + +```tsx +import React from 'react'; +import { EditableText } from '@graphscope/studio-components'; + +const Demo = () => { + return ( + {}} + style={{ + color: 'blue', + fontSize: '16px', + }} + maxWidth={200} + minWidth={100} + /> + ); +}; + +export default Demo; +``` + +## API + +### EditableText + +| 参数 | 说明 | 类型 | 默认值 | +| ------------ | -------------------- | ------------------------ | ------- | +| text | 初始文本内容 | `string` | - | +| onTextChange | 文本变化时的回调函数 | `(text: string) => void` | - | +| id | 组件唯一标识符 | `string` | - | +| style | 自定义样式 | `React.CSSProperties` | - | +| disabled | 是否禁用编辑功能 | `boolean` | `false` | +| maxWidth | 最大宽度(像素) | `number` | `100` | +| minWidth | 最小宽度(像素) | `number` | `60` | + ```jsx import React, { useState } from 'react'; import { EditableText } from '@graphscope/studio-components'; diff --git a/packages/studio-components/src/EditableText/index.tsx b/packages/studio-components/src/EditableText/index.tsx index 9bbcbef0e..b597f80d5 100644 --- a/packages/studio-components/src/EditableText/index.tsx +++ b/packages/studio-components/src/EditableText/index.tsx @@ -1,36 +1,110 @@ import React, { useState, useRef, useEffect } from 'react'; import { debounce } from '../Utils/index'; -const EditableText = ({ text, onTextChange, id, style = {}, disabled }) => { - const [isEditing, setIsEditing] = useState(false); - const [editableText, setEditableText] = useState(text); +import { theme } from 'antd'; - const inputRef = useRef(null); +/** + * EditableText 组件的状态接口 + */ +interface EditableTextState { + isEditing: boolean; + editableText: string; + isHovered: boolean; + textWidth: number; +} +/** + * EditableText 组件的属性接口 + */ +interface EditableTextProps { + /** 初始文本内容 */ + text: string; + /** 文本变化时的回调函数 */ + onTextChange: (text: string) => void; + /** 组件唯一标识符 */ + id?: string; + /** 自定义样式 */ + style?: React.CSSProperties; + /** 是否禁用编辑功能 */ + disabled?: boolean; + /** 最大宽度 */ + maxWidth?: number; + /** 最小宽度 */ + minWidth?: number; + /** 文本对齐方式 */ + textAlign?: 'left' | 'center' | 'right'; + /** 悬停时是否显示背景色 */ + hoverBackground?: boolean; +} + +/** + * 可编辑文本组件 + * + * 支持双击编辑、回车确认、失焦保存等功能 + * 可以通过 style 属性自定义样式 + * 支持禁用状态 + */ +const EditableText = (props: EditableTextProps) => { + const { + text, + onTextChange, + id, + style = {}, + disabled = false, + maxWidth = 100, + minWidth = 60, + textAlign = 'center', + hoverBackground = true, + } = props; + + // 获取 antd 主题 token + const { token } = theme.useToken(); + + // 合并状态管理 + const [state, setState] = useState({ + isEditing: false, + editableText: text, + isHovered: false, + textWidth: 0, + }); + + const inputRef = useRef(null); + const textRef = useRef(null); + + // 当进入编辑模式时自动聚焦 useEffect(() => { - if (isEditing && inputRef.current) { - // 当进入编辑模式时聚焦到输入框 + if (state.isEditing && inputRef.current) { inputRef.current.focus(); } - }, [isEditing]); + }, [state.isEditing]); + + // 同步外部文本变化 useEffect(() => { - setEditableText(text); + setState(prev => ({ ...prev, editableText: text })); }, [text]); - const handleDoubleClick = e => { + // 测量文本宽度 + useEffect(() => { + if (textRef.current) { + const width = textRef.current.offsetWidth; + setState(prev => ({ ...prev, textWidth: width })); + } + }, [state.editableText]); + + // 防抖处理文本更新 + const debouncedOnTextChange = React.useMemo(() => debounce(onTextChange, 300), [onTextChange]); + + const handleDoubleClick = (e: React.MouseEvent) => { e.stopPropagation(); e.preventDefault(); if (disabled) return; - // 开启编辑模式 - setIsEditing(true); + setState(prev => ({ ...prev, isEditing: true })); }; - const handleChange = e => { - // 更新输入框中的文本 - setEditableText(e.target.value); + const handleChange = (e: React.ChangeEvent) => { + setState(prev => ({ ...prev, editableText: e.target.value })); }; - const handleKeyDown = e => { - // 当用户按下回车键时结束编辑 + const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === 'Enter') { handleSave(); e.preventDefault(); @@ -38,54 +112,104 @@ const EditableText = ({ text, onTextChange, id, style = {}, disabled }) => { }; const handleBlur = () => { - // 当用户点击输入框外部时结束编辑 handleSave(); }; const handleSave = () => { - // 将文本保存并结束编辑模式 - onTextChange(editableText); - setIsEditing(false); + const { editableText } = state; + debouncedOnTextChange(editableText); + setState(prev => ({ ...prev, isEditing: false })); + }; + + const handleMouseEnter = () => { + if (!disabled) { + setState(prev => ({ ...prev, isHovered: true })); + } + }; + + const handleMouseLeave = () => { + setState(prev => ({ ...prev, isHovered: false })); + }; + + const commonStyles: React.CSSProperties = { + textAlign, + fontSize: '12px', + transition: 'all 0.2s ease', + ...style, + }; + + const containerStyle: React.CSSProperties = { + position: 'relative', + minWidth: `${minWidth}px`, + maxWidth: `${maxWidth}px`, + height: '24px', // 固定高度避免抖动 + borderRadius: '4px', + overflow: 'hidden', + }; + + const getBackgroundStyle = () => { + if (disabled) return { backgroundColor: token.colorBgContainerDisabled }; + if (state.isEditing) return { backgroundColor: 'rgba(0, 0, 0, 0.04)' }; + if (state.isHovered && hoverBackground) return { backgroundColor: 'rgba(0, 0, 0, 0.02)' }; + return {}; + }; + + const getTextStyle = () => { + if (disabled) { + return { + color: token.colorTextDisabled, + cursor: 'not-allowed', + }; + } + return { + cursor: 'pointer', + }; }; return ( -
- {isEditing ? ( +
+ {state.isEditing ? ( ) : (
- {editableText} + {state.editableText}
)}
diff --git a/packages/studio-components/src/EmptyCanvas/index.en-US.md b/packages/studio-components/src/EmptyCanvas/index.en-US.md new file mode 100644 index 000000000..d4d949997 --- /dev/null +++ b/packages/studio-components/src/EmptyCanvas/index.en-US.md @@ -0,0 +1,85 @@ +--- +title: EmptyCanvas +group: + title: Data Display + order: 2 +--- + +# EmptyCanvas + +A component for displaying empty states with customizable description and styles. + +## When To Use + +- When there is no data to display +- When you need to show an empty state message +- When you need to customize the empty state style + +## Examples + +### Basic Usage + +```tsx +import React from 'react'; +import { EmptyCanvas } from '@graphscope/studio-components'; + +const Demo = () => { + return ; +}; + +export default Demo; +``` + +### Custom Description + +```tsx +import React from 'react'; +import { EmptyCanvas } from '@graphscope/studio-components'; + +const Demo = () => { + return ; +}; + +export default Demo; +``` + +### Custom Style + +```tsx +import React from 'react'; +import { EmptyCanvas } from '@graphscope/studio-components'; + +const Demo = () => { + return ; +}; + +export default Demo; +``` + +### Custom Image Size + +```tsx +import React from 'react'; +import { EmptyCanvas } from '@graphscope/studio-components'; + +const Demo = () => { + return ; +}; + +export default Demo; +``` + +## API + +### EmptyCanvas + +| Property | Description | Type | Default | +| ----------- | ----------------------------------------- | --------------------------- | ------------ | +| description | Empty state description | `string \| React.ReactNode` | `'暂无数据'` | +| style | Custom style | `React.CSSProperties` | - | +| className | Custom class name | `string` | - | +| imageSize | Image size, can be a number or percentage | `number \| string` | `'60%'` | + +``` + +``` diff --git a/packages/studio-components/src/EmptyCanvas/index.md b/packages/studio-components/src/EmptyCanvas/index.md index df5f6c93d..e39c3f6a5 100644 --- a/packages/studio-components/src/EmptyCanvas/index.md +++ b/packages/studio-components/src/EmptyCanvas/index.md @@ -1,4 +1,84 @@ -# EmptyCanvas +--- +title: EmptyCanvas 空画布 +group: + title: 数据展示 + order: 2 +--- + +# EmptyCanvas 空画布 + +用于展示空状态的组件,支持自定义描述文本和样式。 + +## 何时使用 + +- 当没有数据需要展示时 +- 当需要展示空状态提示时 +- 当需要自定义空状态样式时 + +## 代码演示 + +### 基础用法 + +```tsx +import React from 'react'; +import { EmptyCanvas } from '@graphscope/studio-components'; + +const Demo = () => { + return ; +}; + +export default Demo; +``` + +### 自定义描述 + +```tsx +import React from 'react'; +import { EmptyCanvas } from '@graphscope/studio-components'; + +const Demo = () => { + return ; +}; + +export default Demo; +``` + +### 自定义样式 + +```tsx +import React from 'react'; +import { EmptyCanvas } from '@graphscope/studio-components'; + +const Demo = () => { + return ; +}; + +export default Demo; +``` + +### 自定义图片大小 + +```tsx +import React from 'react'; +import { EmptyCanvas } from '@graphscope/studio-components'; + +const Demo = () => { + return ; +}; + +export default Demo; +``` + +## API + +### EmptyCanvas + +| 参数 | 说明 | 类型 | 默认值 | +| ----------- | ---------------------------- | --------------------------- | ------------ | +| description | 空状态描述文本 | `string \| React.ReactNode` | `'暂无数据'` | +| style | 自定义样式 | `React.CSSProperties` | - | +| className | 自定义类名 | `string` | - | +| imageSize | 图片大小,可以是数字或百分比 | `number \| string` | `'60%'` | ```jsx import React, { useState } from 'react'; @@ -6,7 +86,7 @@ import { EmptyCanvas } from '@graphscope/studio-components'; export default () => { return (
- +
); }; diff --git a/packages/studio-components/src/EmptyCanvas/index.tsx b/packages/studio-components/src/EmptyCanvas/index.tsx index 24568618b..0be42acde 100644 --- a/packages/studio-components/src/EmptyCanvas/index.tsx +++ b/packages/studio-components/src/EmptyCanvas/index.tsx @@ -1,13 +1,32 @@ -import * as React from 'react'; +import React from 'react'; import { Typography, theme, Flex } from 'antd'; import Image from './image'; -interface IEmptyProps { +/** + * EmptyCanvas 组件的属性接口 + */ +export interface IEmptyCanvasProps { + /** 空状态描述文本 */ description?: string | React.ReactNode; + /** 自定义样式 */ + style?: React.CSSProperties; + /** 自定义类名 */ + className?: string; + /** 图片大小,可以是数字或百分比 */ + imageSize?: number | string; } -const Empty: React.FunctionComponent = props => { - const { description } = props; +/** + * 空画布组件 + * @description 用于展示空状态的组件,支持自定义描述文本和样式 + */ +const EmptyCanvas: React.FC = ({ + description = '暂无数据', + style = {}, + className = '', + imageSize = '60%', +}) => { + const { token } = theme.useToken(); return ( = props => { align="center" justify="center" style={{ - fontSize: '14px', + fontSize: token.fontSize, height: '100%', width: '100%', + position: 'relative', + ...style, }} + className={className} > {description} @@ -39,4 +64,4 @@ const Empty: React.FunctionComponent = props => { ); }; -export default Empty; +export default EmptyCanvas; diff --git a/packages/studio-components/src/EngineFeature/index.tsx b/packages/studio-components/src/EngineFeature/index.tsx index 6a2a4cfbb..8c59367e7 100644 --- a/packages/studio-components/src/EngineFeature/index.tsx +++ b/packages/studio-components/src/EngineFeature/index.tsx @@ -1,29 +1,45 @@ import * as React from 'react'; + +/** + * @interface IGrootCaseProps - 引擎特性组件属性接口 + * @property {React.ReactNode} children - 子节点 + * @property {SupportFeature} match - 匹配的特性 + */ interface IGrootCaseProps { children: React.ReactNode; match: SupportFeature; } +/** + * @enum SupportFeature - 支持的特性枚举 + * @value MULTIPLE_GRAPHS - 是否支持多图 + * @value BATCH_CREATE_SCHEMA - 是否支持批量创建图模型 + * @value SCHEMA_UPDATE - schema是否支持更新修改 + * @value LOAD_CSV_DATA - 是否支持CSV导图 + * @value QUERY_MULTIPLE_VERSIONS - 是否支持查询多版本 + * @value DOWNLOAD_DATA_TASK_CONFIG - 是否支持下载数据导入的任务配置 + * @value BATCH_LOAD_DATA - 是否支持批量导入数据 + */ export type SupportFeature = - /** 是否支持多图 */ | 'MULTIPLE_GRAPHS' - /** 是否支持批量创建图模型 */ | 'BATCH_CREATE_SCHEMA' - /** schema是否支持更新修改 */ | 'SCHEMA_UPDATE' - /** 是否支持CSV导图 */ | 'LOAD_CSV_DATA' - /** 是否支持查询多版本 */ | 'QUERY_MULTIPLE_VERSIONS' - /** 是否支持下载数据导入的任务配置*/ | 'DOWNLOAD_DATA_TASK_CONFIG' - /** 是否支持批量导入数据 */ | 'BATCH_LOAD_DATA'; +/** + * @type Features - 特性类型 + */ type Features = { [K in SupportFeature]: boolean; }; +/** + * @function getSupportFeature - 获取支持的特性 + * @returns {Features} - 支持的特性对象 + */ export const getSupportFeature = (): Features => { if (window.GS_ENGINE_TYPE === 'groot') { return { @@ -47,7 +63,7 @@ export const getSupportFeature = (): Features => { BATCH_LOAD_DATA: true, }; } - //interactive + // interactive return { BATCH_CREATE_SCHEMA: true, LOAD_CSV_DATA: true, @@ -59,6 +75,11 @@ export const getSupportFeature = (): Features => { }; }; +/** + * @function EngineFeature - 引擎特性组件 + * @param {IGrootCaseProps} props - 组件属性 + * @returns {JSX.Element} - 渲染的 JSX 元素 + */ const EngineFeature: React.FunctionComponent = props => { const { children, match } = props; const feature = getSupportFeature(); @@ -66,7 +87,7 @@ const EngineFeature: React.FunctionComponent = props => { return (
{children} diff --git a/packages/studio-components/src/FullScreen/index.en-US.md b/packages/studio-components/src/FullScreen/index.en-US.md new file mode 100644 index 000000000..7e40e06fa --- /dev/null +++ b/packages/studio-components/src/FullScreen/index.en-US.md @@ -0,0 +1,132 @@ +--- +title: FullScreen +group: + title: General + order: 1 +--- + +# FullScreen + +A simple component to toggle fullscreen mode for a specified container. + +## When To Use + +- When you need to toggle fullscreen mode for a specific area +- Useful in data visualization, image viewing, and similar scenarios + +## Examples + +### Basic Usage + +```jsx +import React, { useRef } from 'react'; +import { FullScreen } from '@graphscope/studio-components'; + +export default () => { + const containerRef = useRef(null); + return ( +
+ +
+ Click the button in the top-left corner to enter fullscreen mode +
+
+ ); +}; +``` + +### Custom Styling + +```jsx +import React, { useRef } from 'react'; +import { FullScreen } from '@graphscope/studio-components'; + +export default () => { + const containerRef = useRef(null); + return ( +
+ +
+ Fullscreen button with custom styling +
+
+ ); +}; +``` + +### Listen to Fullscreen State Changes + +```jsx +import React, { useRef, useState } from 'react'; +import { FullScreen } from '@graphscope/studio-components'; +import { message } from 'antd'; + +export default () => { + const containerRef = useRef(null); + const [isFullScreen, setIsFullScreen] = useState(false); + + const handleFullScreenChange = fullScreen => { + setIsFullScreen(fullScreen); + message.info(`Current fullscreen state: ${fullScreen ? 'Fullscreen' : 'Normal'}`); + }; + + return ( +
+ +
+ Fullscreen state: {isFullScreen ? 'Fullscreen' : 'Normal'} +
+
+ ); +}; +``` + +## API + +### FullScreen + +| Property | Description | Type | Default | +| ------------------ | ---------------------------------------------------------------- | -------------------------------------- | ------------ | +| containerRef | Reference to the container element to be displayed in fullscreen | React.RefObject | - | +| title | Tooltip text, supports internationalization | string \| React.ReactNode | 'Fullscreen' | +| placement | Tooltip placement | 'top' \| 'right' \| 'bottom' \| 'left' | 'left' | +| className | Custom CSS class name for the button | string | - | +| style | Custom inline styles for the button | React.CSSProperties | - | +| onFullScreenChange | Callback when fullscreen state changes | (isFullScreen: boolean) => void | - | + +``` + +``` diff --git a/packages/studio-components/src/FullScreen/index.md b/packages/studio-components/src/FullScreen/index.md index df0847eaa..bbf47f788 100644 --- a/packages/studio-components/src/FullScreen/index.md +++ b/packages/studio-components/src/FullScreen/index.md @@ -1,6 +1,27 @@ +--- +title: FullScreen 全屏 +group: + title: 通用 + order: 1 +--- + +# FullScreen 全屏 + +一个简单的全屏切换组件,可以将指定容器切换为全屏模式。 + +## 何时使用 + +- 需要将某个区域切换为全屏显示时 +- 在数据可视化、图片查看等场景下使用 + +## 代码演示 + +### 基础用法 + ```jsx -import React, { useState, useRef } from 'react'; +import React, { useRef } from 'react'; import { FullScreen } from '@graphscope/studio-components'; + export default () => { const containerRef = useRef(null); return ( @@ -8,11 +29,100 @@ export default () => {
- Trigger full screen + 点击左上角按钮进入全屏模式
); }; ``` + +### 自定义样式 + +```jsx +import React, { useRef } from 'react'; +import { FullScreen } from '@graphscope/studio-components'; + +export default () => { + const containerRef = useRef(null); + return ( +
+ +
+ 自定义样式的全屏按钮 +
+
+ ); +}; +``` + +### 监听全屏状态变化 + +```jsx +import React, { useRef, useState } from 'react'; +import { FullScreen } from '@graphscope/studio-components'; +import { message } from 'antd'; + +export default () => { + const containerRef = useRef(null); + const [isFullScreen, setIsFullScreen] = useState(false); + + const handleFullScreenChange = fullScreen => { + setIsFullScreen(fullScreen); + message.info(`当前全屏状态: ${fullScreen ? '全屏' : '非全屏'}`); + }; + + return ( +
+ +
+ 全屏状态: {isFullScreen ? '全屏' : '非全屏'} +
+
+ ); +}; +``` + +## API + +### FullScreen + +| 参数 | 说明 | 类型 | 默认值 | +| ------------------ | ---------------------- | -------------------------------------- | ------------ | +| containerRef | 需要全屏显示的容器引用 | React.RefObject | - | +| title | 提示文本,支持国际化 | string \| React.ReactNode | 'Fullscreen' | +| placement | 提示框位置 | 'top' \| 'right' \| 'bottom' \| 'left' | 'left' | +| className | 自定义按钮样式类名 | string | - | +| style | 自定义按钮样式 | React.CSSProperties | - | +| onFullScreenChange | 全屏状态变化回调 | (isFullScreen: boolean) => void | - | diff --git a/packages/studio-components/src/FullScreen/index.tsx b/packages/studio-components/src/FullScreen/index.tsx index 4303847a5..ee58ba70c 100644 --- a/packages/studio-components/src/FullScreen/index.tsx +++ b/packages/studio-components/src/FullScreen/index.tsx @@ -2,31 +2,69 @@ import * as React from 'react'; import { Button, TooltipProps, Tooltip } from 'antd'; import { FormattedMessage } from 'react-intl'; import { FullscreenOutlined, FullscreenExitOutlined } from '@ant-design/icons'; + +/** + * 全屏组件的属性接口 + */ interface IFullScreenProps { + /** 提示文本,支持国际化 */ title?: TooltipProps['title']; + /** 提示框位置 */ placement?: TooltipProps['placement']; + /** 需要全屏显示的容器引用 */ containerRef: React.RefObject; + /** 自定义按钮样式类名 */ + className?: string; + /** 自定义按钮样式 */ + style?: React.CSSProperties; + /** 全屏状态变化回调 */ + onFullScreenChange?: (isFullScreen: boolean) => void; } +/** + * 全屏组件 + * + * 提供一个按钮,点击后可以将指定容器切换为全屏模式 + */ const FullScreen: React.FunctionComponent = props => { - const { containerRef, title = 'Fullscreen', placement = 'left' } = props; + const { containerRef, title = 'Fullscreen', placement = 'left', className, style, onFullScreenChange } = props; + const [isFullScreen, setIsFullScreen] = React.useState(false); const icon = isFullScreen ? : ; + + // 处理全屏切换 const handleClick = () => { if (document.fullscreenElement) { document.exitFullscreen(); setIsFullScreen(false); + onFullScreenChange?.(false); } else { if (containerRef.current) { containerRef.current.requestFullscreen(); setIsFullScreen(true); + onFullScreenChange?.(true); } } }; + // 监听全屏状态变化 + React.useEffect(() => { + const handleFullScreenChange = () => { + const newIsFullScreen = !!document.fullscreenElement; + setIsFullScreen(newIsFullScreen); + onFullScreenChange?.(newIsFullScreen); + }; + + document.addEventListener('fullscreenchange', handleFullScreenChange); + + return () => { + document.removeEventListener('fullscreenchange', handleFullScreenChange); + }; + }, [onFullScreenChange]); + return ( } placement={placement}> -
} + middlePanel={
Middle Panel Content
} + rightPanel={
Right Panel Content
} + leftMinWidth={20} + leftMaxWidth={40} + rightMinWidth={20} + rightMaxWidth={40} + /> + ); +}; + +export default Demo; +``` + +## API + +### ResizablePanel + +| Property | Description | Type | Default | +| ------------- | --------------------------------------- | --------------------- | ------- | +| leftPanel | Left panel content | `React.ReactNode` | - | +| middlePanel | Middle panel content | `React.ReactNode` | - | +| rightPanel | Right panel content | `React.ReactNode` | - | +| leftMinWidth | Minimum width percentage of left panel | `number` | 20 | +| leftMaxWidth | Maximum width percentage of left panel | `number` | 40 | +| rightMinWidth | Minimum width percentage of right panel | `number` | 20 | +| rightMaxWidth | Maximum width percentage of right panel | `number` | 40 | +| style | Custom styles | `React.CSSProperties` | - | +| className | Custom class name | `string` | - | diff --git a/packages/studio-components/src/ResizablePanel/index.md b/packages/studio-components/src/ResizablePanel/index.md index 3bc3f7be9..09aad7fa8 100644 --- a/packages/studio-components/src/ResizablePanel/index.md +++ b/packages/studio-components/src/ResizablePanel/index.md @@ -1,7 +1,105 @@ --- -title: ResizablePanels +title: ResizablePanel 可调整大小面板 +group: + title: 布局 + order: 2 --- +# ResizablePanel 可调整大小面板 + +## 组件介绍 + +ResizablePanel 是一个可调整大小的面板组件,支持左侧、中间和右侧三个面板区域。用户可以通过拖拽手柄来调整各个面板的宽度。 + +## 使用场景 + +- 需要可调整大小的面板布局 +- 需要灵活的面板宽度控制 + +## 代码演示 + +### 基础用法 + +```tsx +import React from 'react'; +import { ResizablePanel } from '@graphscope/studio-components'; + +const Demo = () => { + return ( +
+ 左侧面板
} + middlePanel={
中间面板
} + rightPanel={
右侧面板
} + /> + + ); +}; + +export default Demo; +``` + +### 自定义最小和最大宽度 + +```tsx +import React from 'react'; +import { ResizablePanel } from '@graphscope/studio-components'; + +const Demo = () => { + return ( +
+ 左侧面板
} + middlePanel={
中间面板
} + rightPanel={
右侧面板
} + leftMinWidth={20} + leftMaxWidth={40} + rightMinWidth={20} + rightMaxWidth={40} + /> + + ); +}; + +export default Demo; +``` + +### 仅使用两个面板 + +```tsx +import React from 'react'; +import { ResizablePanel } from '@graphscope/studio-components'; + +const Demo = () => { + return ( +
+ 左侧面板
} + middlePanel={
右侧面板
} + /> + + ); +}; + +export default Demo; +``` + +## API + +### ResizablePanel + +| 属性 | 说明 | 类型 | 默认值 | +| ------------- | ---------------------- | ------------------- | ------ | +| leftPanel | 左侧面板内容 | React.ReactNode | - | +| middlePanel | 中间面板内容 | React.ReactNode | - | +| rightPanel | 右侧面板内容 | React.ReactNode | - | +| leftMinWidth | 左侧面板最小宽度百分比 | number | 20 | +| leftMaxWidth | 左侧面板最大宽度百分比 | number | 40 | +| rightMinWidth | 右侧面板最小宽度百分比 | number | 20 | +| rightMaxWidth | 右侧面板最大宽度百分比 | number | 40 | +| style | 自定义样式 | React.CSSProperties | - | +| className | 自定义类名 | string | - | + ```jsx import React from 'react'; import ResizablePanel from './index.tsx'; diff --git a/packages/studio-components/src/ResizablePanel/index.tsx b/packages/studio-components/src/ResizablePanel/index.tsx index be2568549..024f2e03e 100644 --- a/packages/studio-components/src/ResizablePanel/index.tsx +++ b/packages/studio-components/src/ResizablePanel/index.tsx @@ -1,65 +1,172 @@ -import React from 'react'; -import { Panel, PanelGroup } from 'react-resizable-panels'; -import ResizeHandle from './ResizeHandle'; - -interface IResizablePanelsProps { - leftSide?: React.ReactNode; - middleSide?: React.ReactNode; - rightSide?: React.ReactNode; - leftMinSize?: number; - leftMaxSize?: number; - rightMinSize?: number; - rightMaxSize?: number; -} +import React, { useState, useRef, useEffect, useMemo, useCallback } from 'react'; -const styles: Record = { - Container: { - width: '100%', - height: '100%', - display: 'flex', - flexDirection: 'column', - gap: '1rem', - }, - Panel: { display: 'flex', flexDirection: 'row' }, - PanelContent: { - height: '100%', - width: '100%', - borderRadius: '0.5rem', - }, -}; +/** + * 可调整大小面板组件的属性接口 + */ +export interface IResizablePanelProps { + /** 左侧面板内容 */ + leftPanel?: React.ReactNode; + /** 中间面板内容 */ + middlePanel?: React.ReactNode; + /** 右侧面板内容 */ + rightPanel?: React.ReactNode; + /** 左侧面板最小宽度百分比 */ + leftMinWidth?: number; + /** 左侧面板最大宽度百分比 */ + leftMaxWidth?: number; + /** 右侧面板最小宽度百分比 */ + rightMinWidth?: number; + /** 右侧面板最大宽度百分比 */ + rightMaxWidth?: number; + /** 自定义样式 */ + style?: React.CSSProperties; + /** 自定义类名 */ + className?: string; +} -const ResizablePanels: React.FC = ({ - leftSide, - middleSide, - rightSide, - leftMinSize = 20, - leftMaxSize = 40, - rightMinSize = 20, - rightMaxSize = 40, +/** + * 可调整大小面板组件 + * + * 一个简单的可调整大小的面板组件,支持左侧、中间和右侧三个面板区域 + */ +const ResizablePanel: React.FC = ({ + leftPanel, + middlePanel, + rightPanel, + leftMinWidth = 20, + leftMaxWidth = 40, + rightMinWidth = 20, + rightMaxWidth = 40, + style, + className, }) => { - const renderLeftPanel = () => ( - -
{leftSide}
-
- ); + // 面板宽度状态 + const [panelState, setPanelState] = useState<{ leftWidth: number; rightWidth: number }>({ + leftWidth: 30, + rightWidth: 30, + }); + + // 拖拽状态 + const [dragState, setDragState] = useState<{ isDraggingLeft: boolean; isDraggingRight: boolean }>({ + isDraggingLeft: false, + isDraggingRight: false, + }); + + // 容器引用 + const containerRef = useRef(null); + + // 处理左侧拖拽 + const handleLeftDragStart = useCallback(() => { + setDragState(prev => ({ ...prev, isDraggingLeft: true })); + }, []); + + // 处理右侧拖拽 + const handleRightDragStart = useCallback(() => { + setDragState(prev => ({ ...prev, isDraggingRight: true })); + }, []); + + // 处理拖拽结束 + const handleDragEnd = useCallback(() => { + setDragState({ isDraggingLeft: false, isDraggingRight: false }); + }, []); + + // 处理拖拽移动 + const handleDragMove = useCallback( + (e: MouseEvent) => { + if (!containerRef.current) return; + + const containerWidth = containerRef.current.offsetWidth; + const containerRect = containerRef.current.getBoundingClientRect(); - const renderRightPanel = () => ( - -
{rightSide}
-
+ if (dragState.isDraggingLeft) { + // 计算左侧面板宽度百分比 + const newLeftWidth = ((e.clientX - containerRect.left) / containerWidth) * 100; + + // 限制在最小和最大宽度之间 + if (newLeftWidth >= leftMinWidth && newLeftWidth <= leftMaxWidth) { + setPanelState(prev => ({ ...prev, leftWidth: newLeftWidth })); + } + } + + if (dragState.isDraggingRight) { + // 计算右侧面板宽度百分比 + const newRightWidth = ((containerRect.right - e.clientX) / containerWidth) * 100; + + // 限制在最小和最大宽度之间 + if (newRightWidth >= rightMinWidth && newRightWidth <= rightMaxWidth) { + setPanelState(prev => ({ ...prev, rightWidth: newRightWidth })); + } + } + }, + [dragState, leftMinWidth, leftMaxWidth, rightMinWidth, rightMaxWidth], ); + // 添加和移除全局事件监听 + useEffect(() => { + if (dragState.isDraggingLeft || dragState.isDraggingRight) { + document.addEventListener('mousemove', handleDragMove); + document.addEventListener('mouseup', handleDragEnd); + } + + return () => { + document.removeEventListener('mousemove', handleDragMove); + document.removeEventListener('mouseup', handleDragEnd); + }; + }, [dragState, handleDragMove, handleDragEnd]); + + // 计算中间面板宽度 + const middleWidth = useMemo(() => 100 - panelState.leftWidth - panelState.rightWidth, [panelState]); + return ( -
- - {leftSide && [renderLeftPanel(), ]} - -
{middleSide}
-
- {rightSide && [, renderRightPanel()]} -
+
+ {/* 左侧面板 */} + {leftPanel &&
{leftPanel}
} + + {/* 左侧拖拽手柄 */} + {leftPanel && ( +
+ )} + + {/* 中间面板 */} + {middlePanel &&
{middlePanel}
} + + {/* 右侧拖拽手柄 */} + {rightPanel && ( +
+ )} + + {/* 右侧面板 */} + {rightPanel &&
{rightPanel}
}
); }; -export default ResizablePanels; +// 导出组件 +export { ResizablePanel }; +export default ResizablePanel; diff --git a/packages/studio-components/src/SegmentedTabs/index.en-US.md b/packages/studio-components/src/SegmentedTabs/index.en-US.md new file mode 100644 index 000000000..bc8c0cac9 --- /dev/null +++ b/packages/studio-components/src/SegmentedTabs/index.en-US.md @@ -0,0 +1,115 @@ +--- +title: SegmentedTabs +group: + title: Navigation + order: 1 +--- + +# SegmentedTabs + +A segmented tabs component based on Ant Design Segmented, supporting URL parameter synchronization and custom styles. + +## When To Use + +- When you need to display multiple related content in a limited space +- When you need to categorize content +- When you need tabs that synchronize with URL parameters + +## Examples + +### Basic Usage + +```tsx +import React from 'react'; +import { SegmentedTabs } from '@graphscope/studio-components'; + +const Demo = () => { + const items = [ + { + key: 'tab1', + label: 'Tab One', + children:
Content of Tab One
, + }, + { + key: 'tab2', + label: 'Tab Two', + children:
Content of Tab Two
, + }, + ]; + + return ; +}; + +export default Demo; +``` + +### With Icons + +```tsx +import React from 'react'; +import { SegmentedTabs } from '@graphscope/studio-components'; +import { HomeOutlined, UserOutlined } from '@ant-design/icons'; + +const Demo = () => { + const items = [ + { + key: 'tab1', + label: 'Tab One', + icon: , + children:
Content of Tab One
, + }, + { + key: 'tab2', + label: 'Tab Two', + icon: , + children:
Content of Tab Two
, + }, + ]; + + return ; +}; + +export default Demo; +``` + +### Block Display + +```tsx +import React from 'react'; +import { SegmentedTabs } from '@graphscope/studio-components'; + +const Demo = () => { + const items = [ + { + key: 'tab1', + label: 'Tab One', + children:
Content of Tab One
, + }, + { + key: 'tab2', + label: 'Tab Two', + children:
Content of Tab Two
, + }, + ]; + + return ; +}; + +export default Demo; +``` + +## API + +### SegmentedTabs + +| Property | Description | Type | Default | +| ------------- | ------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------- | +| items | Tab item configuration | `{ key: string; children: React.ReactNode; label?: React.ReactNode; icon?: React.ReactNode }[]` | - | +| queryKey | URL query parameter key for saving the active tab | `string` | `'tab'` | +| rootStyle | Custom style for the root container | `React.CSSProperties` | - | +| tabStyle | Custom style for the tabs | `React.CSSProperties` | - | +| tableHeight | Height of the tabs | `number` | `40` | +| defaultActive | Default active tab | `string` | - | +| block | Whether to display as block | `boolean` | - | +| value | Current value in controlled mode | `string` | - | +| onChange | Callback when tab changes | `(value: string) => void` | - | diff --git a/packages/studio-components/src/SegmentedTabs/index.md b/packages/studio-components/src/SegmentedTabs/index.md index 521d819d4..b3f834004 100644 --- a/packages/studio-components/src/SegmentedTabs/index.md +++ b/packages/studio-components/src/SegmentedTabs/index.md @@ -1,4 +1,118 @@ -# SegmentedTabs +--- +title: SegmentedTabs 分段式选项卡 +group: + title: 导航 + order: 1 +--- + +# SegmentedTabs 分段式选项卡 + +基于 Ant Design Segmented 组件的选项卡,支持 URL 参数同步和自定义样式。 + +## 何时使用 + +- 需要在有限空间内展示多个相关内容时 +- 需要将内容分类展示时 +- 需要与 URL 参数同步的选项卡时 + +## 代码演示 + +### 基础用法 + +```tsx +import React from 'react'; +import { SegmentedTabs } from '@graphscope/studio-components'; + +const Demo = () => { + const items = [ + { + key: 'tab1', + label: '选项卡一', + children:
选项卡一的内容
, + }, + { + key: 'tab2', + label: '选项卡二', + children:
选项卡二的内容
, + }, + ]; + + return ; +}; + +export default Demo; +``` + +### 带图标 + +```tsx +import React from 'react'; +import { SegmentedTabs } from '@graphscope/studio-components'; +import { HomeOutlined, UserOutlined } from '@ant-design/icons'; + +const Demo = () => { + const items = [ + { + key: 'tab1', + label: '选项卡一', + icon: , + children:
选项卡一的内容
, + }, + { + key: 'tab2', + label: '选项卡二', + icon: , + children:
选项卡二的内容
, + }, + ]; + + return ; +}; + +export default Demo; +``` + +### 块级显示 + +```tsx +import React from 'react'; +import { SegmentedTabs } from '@graphscope/studio-components'; + +const Demo = () => { + const items = [ + { + key: 'tab1', + label: '选项卡一', + children:
选项卡一的内容
, + }, + { + key: 'tab2', + label: '选项卡二', + children:
选项卡二的内容
, + }, + ]; + + return ; +}; + +export default Demo; +``` + +## API + +### SegmentedTabs + +| 参数 | 说明 | 类型 | 默认值 | +| ------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------- | ------- | +| items | 选项卡项配置 | `{ key: string; children: React.ReactNode; label?: React.ReactNode; icon?: React.ReactNode }[]` | - | +| queryKey | URL 查询参数键名,用于保存当前激活的选项卡 | `string` | `'tab'` | +| rootStyle | 根容器自定义样式 | `React.CSSProperties` | - | +| tabStyle | 选项卡自定义样式 | `React.CSSProperties` | - | +| tableHeight | 选项卡高度 | `number` | `40` | +| defaultActive | 默认激活的选项卡 | `string` | - | +| block | 是否块级显示 | `boolean` | - | +| value | 受控模式下的当前值 | `string` | - | +| onChange | 选项卡切换回调 | `(value: string) => void` | - | ```jsx import React, { useState } from 'react'; diff --git a/packages/studio-components/src/SegmentedTabs/index.tsx b/packages/studio-components/src/SegmentedTabs/index.tsx index eb97663ea..846ead3b3 100644 --- a/packages/studio-components/src/SegmentedTabs/index.tsx +++ b/packages/studio-components/src/SegmentedTabs/index.tsx @@ -1,88 +1,115 @@ +import React, { useMemo, useCallback } from 'react'; import { Segmented, theme } from 'antd'; -import * as React from 'react'; -import { ReactNode } from 'react'; import { getSearchParams, setSearchParams } from '../Utils'; +/** + * SegmentedTabs 组件的属性接口 + */ export interface SegmentedTabsProps { - items: { key: string; children: ReactNode; label?: React.ReactNode; icon?: ReactNode }[]; + /** 选项卡项配置 */ + items: { + /** 选项卡的唯一标识 */ + key: string; + /** 选项卡内容 */ + children: React.ReactNode; + /** 选项卡标签 */ + label?: React.ReactNode; + /** 选项卡图标 */ + icon?: React.ReactNode; + }[]; + /** URL 查询参数键名,用于保存当前激活的选项卡 */ queryKey?: string; + /** 根容器自定义样式 */ rootStyle?: React.CSSProperties; + /** 选项卡自定义样式 */ tabStyle?: React.CSSProperties; + /** 选项卡高度 */ tableHeight?: number; + /** 默认激活的选项卡 */ defaultActive?: string; + /** 是否块级显示 */ block?: boolean; + /** 受控模式下的当前值 */ value?: string; + /** 选项卡切换回调 */ onChange?: (value: string) => void; } -const SegmentedTabs: React.FunctionComponent = props => { - const { - items, - tableHeight = 40, - queryKey = 'tab', - rootStyle = {}, - tabStyle = {}, - defaultActive, - block, - value, - onChange, - } = props; - //@ts-ignore - const [state, setState] = React.useState<{ active: string }>(() => { +/** + * 分段式选项卡组件 + * @description 基于 Ant Design Segmented 组件的选项卡,支持 URL 参数同步和自定义样式 + */ +const SegmentedTabs: React.FC = ({ + items, + tableHeight = 40, + queryKey = 'tab', + rootStyle = {}, + tabStyle = {}, + defaultActive, + block, + value, + onChange, +}) => { + const { token } = theme.useToken(); + + // 初始化状态,从 URL 参数或默认值获取当前激活的选项卡 + const [activeTab, setActiveTab] = React.useState(() => { const defaultKey = getSearchParams(queryKey); - const active = defaultKey || defaultActive || items[0]?.key || ''; - return { - active, - }; + return defaultKey || defaultActive || items[0]?.key || ''; }); - const styles: Record = { - tabs: { - height: '100%', - padding: '12px 0px', - boxSizing: 'border-box', - }, - appear: { - display: 'block', - padding: '0px 6px', - height: `calc(100% - ${tableHeight}px)`, - }, - hidden: { - display: 'none', - padding: '0px 6px', - height: `calc(100% - ${tableHeight}px)`, - }, - }; + // 使用 useMemo 优化样式计算 + const styles = useMemo>( + () => ({ + tabs: { + height: '100%', + padding: `${token.padding}px 0px`, + boxSizing: 'border-box', + }, + appear: { + display: 'block', + padding: `0px ${token.paddingXS}px`, + height: `calc(100% - ${tableHeight}px)`, + }, + hidden: { + display: 'none', + padding: `0px ${token.paddingXS}px`, + height: `calc(100% - ${tableHeight}px)`, + }, + }), + [token.padding, token.paddingXS, tableHeight], + ); - const { active } = state; + // 使用 useMemo 优化选项计算 + const options = useMemo( + () => + items.map(item => ({ + value: item.key, + label: item.label, + icon: item.icon, + })), + [items], + ); - const options = items.map(item => { - return { - value: item.key, - label: item.label, - icon: item.icon, - }; - }); + // 使用 useCallback 优化事件处理函数 + const handleChange = useCallback( + (newValue: string) => { + if (onChange) { + onChange(newValue); + return; + } - const handleChange = value => { - if (onChange) { - onChange(value); - return; - } + setSearchParams({ + [queryKey]: newValue, + }); - setSearchParams({ - [queryKey]: value, - }); + setActiveTab(newValue); + }, + [onChange, queryKey], + ); - setState(preState => { - return { - ...preState, - active: value, - }; - }); - }; - const val = value || active; - const { token } = theme.useToken(); + // 当前激活的选项卡值 + const currentValue = value || activeTab; return (
= props => { > <> {items.map(item => { const { key, children } = item; - const isActive = key === val; + const isActive = key === currentValue; return (
{children} diff --git a/packages/studio-components/src/Toolbar/index.en-US.md b/packages/studio-components/src/Toolbar/index.en-US.md new file mode 100644 index 000000000..d9ce884ca --- /dev/null +++ b/packages/studio-components/src/Toolbar/index.en-US.md @@ -0,0 +1,124 @@ +--- +title: Toolbar +group: + title: Navigation + order: 2 +--- + +# Toolbar + +A customizable toolbar component that supports horizontal and vertical arrangements, with configurable position and styles. + +## When To Use + +- When you need to display a group of action buttons in a fixed position +- When you need to customize toolbar styles and position +- When you need to control toolbar display effects + +## Examples + +### Basic Usage + +```tsx +import React from 'react'; +import { Button } from 'antd'; +import { Toolbar } from '@graphscope/studio-components'; +import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons'; + +const Demo = () => { + return ( +
+ +
+ ); +}; + +export default Demo; +``` + +### Horizontal Arrangement + +```tsx +import React from 'react'; +import { Button } from 'antd'; +import { Toolbar } from '@graphscope/studio-components'; +import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons'; + +const Demo = () => { + return ( +
+ +
+ ); +}; + +export default Demo; +``` + +### Custom Position + +```tsx +import React from 'react'; +import { Button } from 'antd'; +import { Toolbar } from '@graphscope/studio-components'; +import { PlusOutlined, EditOutlined } from '@ant-design/icons'; + +const Demo = () => { + return ( +
+ +
+ ); +}; + +export default Demo; +``` + +### Custom Styles + +```tsx +import React from 'react'; +import { Button } from 'antd'; +import { Toolbar } from '@graphscope/studio-components'; +import { PlusOutlined, EditOutlined } from '@ant-design/icons'; + +const Demo = () => { + return ( +
+ +
+ ); +}; + +export default Demo; +``` + +## API + +### Toolbar + +| Property | Description | Type | Default | +| ---------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | +| children | Toolbar content | `React.ReactNode` | - | +| style | Custom style | `React.CSSProperties` | - | +| direction | Arrangement direction | `'horizontal' \| 'vertical'` | `'vertical'` | +| noSpace | Whether to disable spacing | `boolean` | `false` | +| position | Toolbar position | `{ top?: string \| number; left?: string \| number; right?: string \| number; bottom?: string \| number; }` | `{ top: '12px', left: '24px' }` | +| shadow | Whether to show shadow | `boolean` | `true` | +| background | Whether to show background | `boolean` | `true` | +| rounded | Whether to show rounded corners | `boolean` | `true` | +| padding | Padding | `string \| number` | `'4px'` | diff --git a/packages/studio-components/src/Toolbar/index.md b/packages/studio-components/src/Toolbar/index.md index 6adbb36ad..171d00721 100644 --- a/packages/studio-components/src/Toolbar/index.md +++ b/packages/studio-components/src/Toolbar/index.md @@ -1,18 +1,124 @@ -# Toolbar +--- +title: Toolbar 工具栏 +group: + title: 导航 + order: 2 +--- -```jsx -import React, { useState } from 'react'; -import { Space, Button } from 'antd'; -import { Toolbar, Icons } from '@graphscope/studio-components'; +# Toolbar 工具栏 -export default () => { +一个可自定义的工具栏组件,支持水平和垂直排列,可配置位置、样式等。 + +## 何时使用 + +- 需要在一个固定位置展示一组操作按钮时 +- 需要自定义工具栏样式和位置时 +- 需要控制工具栏的显示效果时 + +## 代码演示 + +### 基础用法 + +```tsx +import React from 'react'; +import { Button } from 'antd'; +import { Toolbar } from '@graphscope/studio-components'; +import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons'; + +const Demo = () => { return ( -
+
-
+ ); +}; + +export default Demo; +``` + +### 水平排列 + +```tsx +import React from 'react'; +import { Button } from 'antd'; +import { Toolbar } from '@graphscope/studio-components'; +import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons'; + +const Demo = () => { + return ( +
+ +
+ ); +}; + +export default Demo; +``` + +### 自定义位置 + +```tsx +import React from 'react'; +import { Button } from 'antd'; +import { Toolbar } from '@graphscope/studio-components'; +import { PlusOutlined, EditOutlined } from '@ant-design/icons'; + +const Demo = () => { + return ( +
+ +
+ ); +}; + +export default Demo; +``` + +### 自定义样式 + +```tsx +import React from 'react'; +import { Button } from 'antd'; +import { Toolbar } from '@graphscope/studio-components'; +import { PlusOutlined, EditOutlined } from '@ant-design/icons'; + +const Demo = () => { + return ( +
+ +
); }; + +export default Demo; ``` + +## API + +### Toolbar + +| 参数 | 说明 | 类型 | 默认值 | +| ---------- | -------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | +| children | 工具栏内容 | `React.ReactNode` | - | +| style | 自定义样式 | `React.CSSProperties` | - | +| direction | 排列方向 | `'horizontal' \| 'vertical'` | `'vertical'` | +| noSpace | 是否禁用间距 | `boolean` | `false` | +| position | 工具栏位置 | `{ top?: string \| number; left?: string \| number; right?: string \| number; bottom?: string \| number; }` | `{ top: '12px', left: '24px' }` | +| shadow | 是否显示阴影 | `boolean` | `true` | +| background | 是否显示背景色 | `boolean` | `true` | +| rounded | 是否显示圆角 | `boolean` | `true` | +| padding | 内边距 | `string \| number` | `'4px'` | diff --git a/packages/studio-components/src/Toolbar/index.tsx b/packages/studio-components/src/Toolbar/index.tsx index 6f7fca058..9709a187d 100644 --- a/packages/studio-components/src/Toolbar/index.tsx +++ b/packages/studio-components/src/Toolbar/index.tsx @@ -1,36 +1,69 @@ import * as React from 'react'; - import { Space, theme } from 'antd'; -interface IToolbarProps { + +/** + * Toolbar 组件的属性接口 + */ +export interface IToolbarProps { + /** 工具栏内容 */ children: React.ReactNode; + /** 自定义样式 */ style?: React.CSSProperties; + /** 排列方向 */ direction?: 'horizontal' | 'vertical'; + /** 是否禁用间距 */ noSpace?: boolean; + /** 工具栏位置 */ + position?: { + top?: string | number; + left?: string | number; + right?: string | number; + bottom?: string | number; + }; + /** 是否显示阴影 */ + shadow?: boolean; + /** 是否显示背景色 */ + background?: boolean; + /** 是否显示圆角 */ + rounded?: boolean; + /** 内边距 */ + padding?: string | number; } -const Toolbar: React.FunctionComponent = props => { - const { children, style, direction = 'vertical', noSpace } = props; +/** + * 工具栏组件 + * @description 一个可自定义的工具栏组件,支持水平和垂直排列,可配置位置、样式等 + */ +const Toolbar: React.FC = ({ + children, + style, + direction = 'vertical', + noSpace = false, + position = { top: '12px', left: '24px' }, + shadow = true, + background = true, + rounded = true, + padding = '4px', +}) => { const { token } = theme.useToken(); - const _children = noSpace ? children : {children}; - return ( -
- {_children} -
- ); + + const containerStyle: React.CSSProperties = { + boxShadow: shadow ? token.boxShadow : 'none', + borderRadius: rounded ? token.borderRadius : 0, + background: background ? token.colorBgContainer : 'transparent', + display: 'flex', + flexDirection: 'column', + position: 'absolute', + top: position.top, + left: position.left, + right: position.right, + bottom: position.bottom, + zIndex: 999, + padding, + ...style, + }; + + return
{noSpace ? children : {children}}
; }; export default Toolbar; diff --git a/packages/studio-components/src/TypingText/index.en-US.md b/packages/studio-components/src/TypingText/index.en-US.md new file mode 100644 index 000000000..f2080a389 --- /dev/null +++ b/packages/studio-components/src/TypingText/index.en-US.md @@ -0,0 +1,108 @@ +--- +title: TypingText +group: + title: Feedback + order: 1 +--- + +# TypingText + +A typing effect text component based on typewriter-effect, supporting custom typing speed, deletion speed, and loop playback. + +## When To Use + +- When you need to display a typing effect +- When you need to emphasize text content +- When you need to show loading or generation process + +## Examples + +### Basic Usage + +```tsx +import React from 'react'; +import { TypingText } from '@graphscope/studio-components'; + +const Demo = () => { + return This is a typing effect text; +}; + +export default Demo; +``` + +### Custom Speed + +```tsx +import React from 'react'; +import { TypingText } from '@graphscope/studio-components'; + +const Demo = () => { + return ( + + This is a typing effect text with custom speed + + ); +}; + +export default Demo; +``` + +### Loop Playback + +```tsx +import React from 'react'; +import { TypingText } from '@graphscope/studio-components'; + +const Demo = () => { + return This is a typing effect text with loop playback; +}; + +export default Demo; +``` + +### Completion Callback + +```tsx +import React from 'react'; +import { TypingText } from '@graphscope/studio-components'; + +const Demo = () => { + const handleComplete = () => { + console.log('Typing effect completed'); + }; + + return This is a typing effect text with completion callback; +}; + +export default Demo; +``` + +### Custom Loading Text + +```tsx +import React from 'react'; +import { TypingText } from '@graphscope/studio-components'; + +const Demo = () => { + return This is a typing effect text with custom loading text; +}; + +export default Demo; +``` + +## API + +### TypingText + +| Property | Description | Type | Default | +| ----------- | ----------------------------------------- | ------------ | ----------------- | +| children | Text content to display | `string` | - | +| delay | Typing delay time (ms) | `number` | `10` | +| deleteSpeed | Deletion speed (ms) | `number` | `10` | +| loop | Whether to loop playback | `boolean` | `false` | +| onComplete | Callback function when typing is complete | `() => void` | - | +| loadingText | Loading text to display | `string` | `'Generating...'` | + +``` + +``` diff --git a/packages/studio-components/src/TypingText/index.md b/packages/studio-components/src/TypingText/index.md index 519da4ff2..196046dea 100644 --- a/packages/studio-components/src/TypingText/index.md +++ b/packages/studio-components/src/TypingText/index.md @@ -1,15 +1,108 @@ -```jsx -import React, { useState } from 'react'; -import { Space, Button } from 'antd'; +--- +title: TypingText 打字机效果文本 +group: + title: 反馈 + order: 1 +--- + +# TypingText 打字机效果文本 + +一个基于 typewriter-effect 实现的打字机效果文本组件,支持自定义打字速度、删除速度和循环播放。 + +## 何时使用 + +- 需要展示打字机效果时 +- 需要强调文本内容时 +- 需要展示加载或生成过程时 + +## 代码演示 + +### 基础用法 + +```tsx +import React from 'react'; +import { TypingText } from '@graphscope/studio-components'; + +const Demo = () => { + return 这是一段打字机效果文本; +}; + +export default Demo; +``` + +### 自定义速度 + +```tsx +import React from 'react'; import { TypingText } from '@graphscope/studio-components'; -export default () => { +const Demo = () => { return ( - - GraphScope Portal is a user-friendly web interface that simplifies managing graph data with GraphScope. It offers - one-stop access to data modeling, importing, querying, and monitoring, catering to both Interactive and Insight - engines within the GraphScope Flex architecture. + + 这是一段自定义速度的打字机效果文本 ); }; + +export default Demo; +``` + +### 循环播放 + +```tsx +import React from 'react'; +import { TypingText } from '@graphscope/studio-components'; + +const Demo = () => { + return 这是一段循环播放的打字机效果文本; +}; + +export default Demo; +``` + +### 完成回调 + +```tsx +import React from 'react'; +import { TypingText } from '@graphscope/studio-components'; + +const Demo = () => { + const handleComplete = () => { + console.log('打字效果完成'); + }; + + return 这是一段带有完成回调的打字机效果文本; +}; + +export default Demo; +``` + +### 自定义加载提示 + +```tsx +import React from 'react'; +import { TypingText } from '@graphscope/studio-components'; + +const Demo = () => { + return 这是一段带有自定义加载提示的打字机效果文本; +}; + +export default Demo; +``` + +## API + +### TypingText + +| 参数 | 说明 | 类型 | 默认值 | +| ----------- | -------------------- | ------------ | ----------------- | +| children | 要显示的文本内容 | `string` | - | +| delay | 打字延迟时间(毫秒) | `number` | `10` | +| deleteSpeed | 删除速度(毫秒) | `number` | `10` | +| loop | 是否循环播放 | `boolean` | `false` | +| onComplete | 打字完成后的回调函数 | `() => void` | - | +| loadingText | 加载提示文本 | `string` | `'Generating...'` | + +``` + ``` diff --git a/packages/studio-components/src/TypingText/index.tsx b/packages/studio-components/src/TypingText/index.tsx index b72b19048..5f1d4f0c3 100644 --- a/packages/studio-components/src/TypingText/index.tsx +++ b/packages/studio-components/src/TypingText/index.tsx @@ -1,28 +1,69 @@ import * as React from 'react'; import Typewriter from 'typewriter-effect'; -interface ITypingTextProps { +import { useCallback } from 'react'; + +/** + * TypingText 组件的属性接口 + */ +export interface ITypingTextProps { + /** 要显示的文本内容 */ children: string; + /** 打字延迟时间(毫秒) */ + delay?: number; + /** 删除速度(毫秒) */ + deleteSpeed?: number; + /** 是否循环播放 */ + loop?: boolean; + /** 打字完成后的回调函数 */ + onComplete?: () => void; + /** 加载提示文本 */ + loadingText?: string; } -const TypingText: React.FunctionComponent = ({ children }) => { - return ( - { +/** + * 打字机效果文本组件 + * @description 使用 typewriter-effect 实现的打字机效果文本组件 + */ +const TypingText: React.FC = ({ + children, + delay = 10, + deleteSpeed = 10, + loop = false, + onComplete, + loadingText = 'Generating...', +}) => { + // 使用 useCallback 优化初始化函数 + const handleInit = useCallback( + (typewriter: any) => { + if (loop) { + // 循环播放时,直接显示文本,不显示加载提示 + typewriter.typeString(children).pauseFor(1000).deleteAll().start(); + } else { + // 非循环播放时,显示加载提示然后显示实际文本 typewriter - .typeString('Generating...') + .typeString(loadingText) .pauseFor(100) - .deleteChars(14) + .deleteChars(loadingText.length) .typeString(children) .start() - .callFunction(function (state) { + .callFunction(function (state: any) { state.elements.cursor.style.display = 'none'; + onComplete?.(); }); + } + }, + [children, loop, onComplete, loadingText], + ); + + return ( + ); }; diff --git a/packages/studio-components/src/index.tsx b/packages/studio-components/src/index.tsx index 80d858ad6..fcaa86de4 100644 --- a/packages/studio-components/src/index.tsx +++ b/packages/studio-components/src/index.tsx @@ -1,45 +1,51 @@ -import Illustration from './Illustration'; +/** + * @file index.tsx - 主入口文件 + * 该文件导出了所有组件、钩子和类型定义 + */ -export { default as EditableText } from './EditableText'; -export { default as EmptyCanvas } from './EmptyCanvas'; -export { default as SegmentedTabs } from './SegmentedTabs'; -export { default as TableCard } from './TableCard'; -export { default as Toolbar } from './Toolbar'; -export { default as Logo, LogoImage, LogoText } from './Logo'; -export { default as PropertiesList } from './PropertiesList'; -export { default as MappingFields } from './PropertiesList/MappingFields'; -export { default as Section } from './Section'; -export { default as MultipleInstance } from './MultipleInstance'; -export { default as SplitSection } from './SplitSection'; -export { default as ResultConfig } from './ResultConfig'; -export { default as StudioProvier } from './Provider'; -export { default as ImportFiles } from './ImportFiles'; -export { default as SideTabs } from './SideTabs'; -export { default as ResizablePanels } from './ResizablePanel'; -export { default as FullScreen } from './FullScreen'; -export { default as Slot } from './Slot'; -export { default as TypingText } from './TypingText'; -export { default as CreatePortal } from './CreatePortal'; -export { default as Layout } from './layout'; -export { default as GlobalSpin } from './GlobalSpin'; -/** all */ -export * as Utils from './Utils'; -export * as Icons from './Icons'; +// 组件 +export { default as EditableText } from './EditableText'; // 可编辑文本组件 +export { default as EmptyCanvas } from './EmptyCanvas'; // 空白画布组件 +export { default as SegmentedTabs } from './SegmentedTabs'; // 分段标签组件 +export { default as TableCard } from './TableCard'; // 表格卡片组件 +export { default as Toolbar } from './Toolbar'; // 工具栏组件 +export { default as Logo, LogoImage, LogoText } from './Logo'; // Logo 组件 +export { default as PropertiesList } from './PropertiesList'; // 属性列表组件 +export { default as MappingFields } from './PropertiesList/MappingFields'; // 映射字段组件 +export { default as Section } from './Section'; // 段落组件 +export { default as MultipleInstance } from './MultipleInstance'; // 多实例组件 +export { default as SplitSection } from './SplitSection'; // 分割段落组件 +export { default as ResultConfig } from './ResultConfig'; // 结果配置组件 +export { default as StudioProvider } from './Provider'; // 提供者组件 +export { default as StudioProvier } from './Provider'; // 提供者组件(兼容旧版本) +export { default as ImportFiles } from './ImportFiles'; // 导入文件组件 +export { default as SideTabs } from './SideTabs'; // 侧边标签组件 +export { default as ResizablePanel } from './ResizablePanel'; // 可调整大小面板组件 +export { default as FullScreen } from './FullScreen'; // 全屏组件 +export { default as Slot } from './Slot'; // 插槽组件 +export { default as TypingText } from './TypingText'; // 打字效果文本组件 +export { default as CreatePortal } from './CreatePortal'; // 创建门户组件 +export { default as Layout } from './layout'; // 布局组件 +export { default as GlobalSpin } from './GlobalSpin'; // 全局加载中组件 +export * as Utils from './Utils'; // 工具函数 +export * as Icons from './Icons'; // 图标组件 +export { default as Illustration } from './Illustration'; // 插图组件 +export { default as CollapseCard } from './CollapseCard'; // 可折叠卡片组件 +export { default as EngineFeature } from './EngineFeature'; // 引擎特性组件 +export { default as HomePage } from './HomePage'; // 首页组件 -/** export hooks */ -export { useSection } from './Section/useSection'; -export { useMultipleInstance } from './MultipleInstance/useMultipleInstance'; -export { useStudioProvier } from './Provider/useThemeConfigProvider'; -export { useCustomToken } from './Provider/useCustomToken'; -/** export typing */ -export type { SegmentedTabsProps } from './SegmentedTabs'; -export type { Property } from './PropertiesList/typing'; -export type { ParsedFile } from './Utils/parseCSV'; +// 钩子 +export { useSection } from './Section/useSection'; // 段落钩子 +export { useMultipleInstance } from './MultipleInstance/useMultipleInstance'; // 多实例钩子 +export { useStudioProvider } from './Provider/useThemeConfigProvider'; // 提供者钩子 +export { useStudioProvier } from './Provider/useThemeConfigProvider'; // 提供者钩子(兼容旧版本) +export { useCustomToken } from './Provider/useCustomToken'; // 自定义令牌钩子 +export { useDynamicStyle } from './hooks/useDynamicStyle'; // 动态样式钩子 +export { useHistory } from './hooks/useHistory'; // 历史记录钩子 -export { useDynamicStyle } from './hooks/useDynamicStyle'; -export { useHistory } from './hooks/useHistory'; -export { default as Illustration } from './Illustration'; -export { default as CollapseCard } from './CollapseCard'; +// 类型 +import type { SegmentedTabsProps } from './SegmentedTabs'; +import type { Property } from './PropertiesList/typing'; +import type { ParsedFile } from './Utils/parseCSV'; -export { default as EngineFeature } from './EngineFeature'; -export { default as HomePage } from './HomePage'; +export type { SegmentedTabsProps, Property, ParsedFile }; diff --git a/packages/studio-draw-pattern/package.json b/packages/studio-draw-pattern/package.json index 6e9fb0442..0506057ce 100644 --- a/packages/studio-draw-pattern/package.json +++ b/packages/studio-draw-pattern/package.json @@ -33,7 +33,8 @@ "father": "^4.4.5", "typescript": "^5.5.4", "vite": "^5.4.16", - "vitest": "^2.0.5" + "vitest": "^2.0.5", + "@swc/core": "^1.3.53" }, "dependencies": { "@ant-design/icons": "^5.2.6", @@ -47,4 +48,4 @@ "uuid": "^10.0.0", "zustand": "^4.5.5" } -} +} \ No newline at end of file diff --git a/packages/studio-importor/src/app/button-controller/import-and-export-config.tsx b/packages/studio-importor/src/app/button-controller/import-and-export-config.tsx index ee2ed114c..d1fe3e956 100644 --- a/packages/studio-importor/src/app/button-controller/import-and-export-config.tsx +++ b/packages/studio-importor/src/app/button-controller/import-and-export-config.tsx @@ -71,8 +71,8 @@ const Content = () => { style={{ height: '160px' }} icon={ - - + + } /> diff --git a/packages/studio-importor/src/app/import-schema/import-from-yaml/index.tsx b/packages/studio-importor/src/app/import-schema/import-from-yaml/index.tsx index 2a76df2df..6496609ce 100644 --- a/packages/studio-importor/src/app/import-schema/import-from-yaml/index.tsx +++ b/packages/studio-importor/src/app/import-schema/import-from-yaml/index.tsx @@ -32,7 +32,7 @@ const hackContent = jsonContent => { }; const ImportFromYAML = (props: IProps) => { - const { style = {}, icon = , disabled } = props; + const { style = {}, icon = , disabled } = props; const { updateStore, store } = useContext(); const { appMode, nodes, edges } = store; const customRequest: UploadProps['customRequest'] = async options => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 69d17a14b..e6f513d90 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -89,13 +89,13 @@ importers: version: 6.11.0(webpack@5.96.1) dumi: specifier: ^2.2.17 - version: 2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1) + version: 2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1) dumi-theme-antd: specifier: ^0.4.2 - version: 0.4.2(@babel/core@7.26.0)(@types/react@18.2.0)(antd@5.22.2(date-fns@2.30.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(date-fns@2.30.0)(dumi@2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1))(immer@10.1.1)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0) + version: 0.4.2(@babel/core@7.26.0)(@types/react@18.2.0)(antd@5.22.2(date-fns@2.30.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(date-fns@2.30.0)(dumi@2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1))(immer@10.1.1)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0) father: specifier: ^4.4.1 - version: 4.5.1(@babel/core@7.26.0)(@types/node@22.13.14)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))) + version: 4.5.1(@babel/core@7.26.0)(@types/node@22.13.14)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1) file-loader: specifier: ^6.2.0 version: 6.2.0(webpack@5.96.1) @@ -126,20 +126,23 @@ importers: style-loader: specifier: ^3.3.1 version: 3.3.4(webpack@5.96.1) + terser-webpack-plugin: + specifier: ^5.3.10 + version: 5.3.10(webpack@5.96.1) ts-loader: specifier: ^9.4.2 - version: 9.5.1(typescript@5.6.3)(webpack@5.96.1) + version: 9.5.1(typescript@5.8.2)(webpack@5.96.1) turbo: specifier: ^1.8.3 version: 1.13.4 typescript: - specifier: ^5.1.6 - version: 5.6.3 + specifier: ^5.3.3 + version: 5.8.2 webpack: - specifier: ^5.88.0 + specifier: ^5.96.1 version: 5.96.1(webpack-cli@5.1.4(webpack@5.96.1)) webpack-cli: - specifier: ^5.0.0 + specifier: ^5.1.4 version: 5.1.4(webpack@5.96.1) docs/interactive: @@ -256,7 +259,7 @@ importers: devDependencies: '@vitejs/plugin-react': specifier: ^4.2.1 - version: 4.3.3(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + version: 4.3.3(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) jszip: specifier: ^3.10.1 version: 3.10.1 @@ -265,13 +268,13 @@ importers: version: 2.8.1 vite: specifier: ^5.4.16 - version: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + version: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) vite-plugin-top-level-await: specifier: ^1.4.4 - version: 1.4.4(@swc/helpers@0.5.15)(rollup@4.38.0)(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + version: 1.4.4(@swc/helpers@0.5.15)(rollup@4.38.0)(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) vite-plugin-wasm: specifier: ^3.3.0 - version: 3.3.0(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + version: 3.3.0(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) examples/mcp-portal: dependencies: @@ -364,6 +367,9 @@ importers: specifier: ^4.5.5 version: 4.5.5(@types/react@18.2.0)(immer@10.1.1)(react@18.2.0) devDependencies: + '@swc/core': + specifier: ^1.3.53 + version: 1.9.2(@swc/helpers@0.5.15) '@types/lodash': specifier: ^4.14.202 version: 4.17.13 @@ -378,19 +384,19 @@ importers: version: 9.0.8 '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.3(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + version: 4.3.3(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) father: specifier: ^4.4.5 - version: 4.5.1(@babel/core@7.26.0)(@types/node@22.13.14)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))) + version: 4.5.1(@babel/core@7.26.0)(@types/node@22.14.1)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))) typescript: specifier: ^5.5.4 version: 5.6.3 vite: specifier: ^5.4.16 - version: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + version: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) vitest: specifier: ^2.0.5 - version: 2.1.5(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + version: 2.1.5(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) packages/studio-driver: dependencies: @@ -451,16 +457,16 @@ importers: devDependencies: '@vitejs/plugin-react': specifier: ^4.2.1 - version: 4.3.3(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + version: 4.3.3(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) vite: specifier: ^5.4.16 - version: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + version: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) vite-plugin-top-level-await: specifier: ^1.4.4 - version: 1.4.4(@swc/helpers@0.5.15)(rollup@4.38.0)(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + version: 1.4.4(@swc/helpers@0.5.15)(rollup@4.38.0)(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) vite-plugin-wasm: specifier: ^3.3.0 - version: 3.3.0(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + version: 3.3.0(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) packages/studio-graph: dependencies: @@ -536,10 +542,10 @@ importers: version: 3.1.7 '@vitejs/plugin-react': specifier: ^4.3.4 - version: 4.3.4(vite@6.2.4(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1)) + version: 4.3.4(vite@6.2.4(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1)) vite: specifier: ^6.0.3 - version: 6.2.4(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1) + version: 6.2.4(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1) packages/studio-graph-editor: dependencies: @@ -594,10 +600,10 @@ importers: version: 4.17.13 '@vitejs/plugin-react': specifier: ^4.2.1 - version: 4.3.3(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + version: 4.3.3(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) vite: specifier: ^5.4.16 - version: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + version: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) packages/studio-importor: dependencies: @@ -704,7 +710,7 @@ importers: devDependencies: father: specifier: ^4.4.1 - version: 4.5.1(@babel/core@7.26.0)(@types/node@22.13.14)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))) + version: 4.5.1(@babel/core@7.26.0)(@types/node@22.14.1)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))) packages/studio-server: dependencies: @@ -884,13 +890,13 @@ importers: version: 18.2.0 '@vitejs/plugin-react': specifier: ^4.3.3 - version: 4.3.3(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + version: 4.3.3(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) father: specifier: ^4.4.1 - version: 4.5.1(@babel/core@7.26.0)(@types/node@22.13.14)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))) + version: 4.5.1(@babel/core@7.26.0)(@types/node@22.14.1)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))) vite: specifier: ^5.4.16 - version: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + version: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) packages: @@ -3895,6 +3901,9 @@ packages: '@types/node@22.13.14': resolution: {integrity: sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==} + '@types/node@22.14.1': + resolution: {integrity: sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==} + '@types/node@22.8.7': resolution: {integrity: sha512-LidcG+2UeYIWcMuMUpBKOnryBWG/rnmOHQR5apjn8myTQcx3rinFRn7DcIFhMnS0PPFSC6OafdIKEad0lj6U0Q==} @@ -11600,6 +11609,9 @@ packages: undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + unfetch@5.0.0: resolution: {integrity: sha512-3xM2c89siXg0nHvlmYsQ2zkLASvVMBisZm5lF3gFDqfF2xonNStDJyMpvaOBe0a1Edxmqrf2E0HBdmy9QyZaeg==} @@ -14347,6 +14359,14 @@ snapshots: transitivePeerDependencies: - '@types/node' + '@microsoft/api-extractor-model@7.28.4(@types/node@22.14.1)': + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.63.0(@types/node@22.14.1) + transitivePeerDependencies: + - '@types/node' + '@microsoft/api-extractor@7.39.1(@types/node@22.13.14)': dependencies: '@microsoft/api-extractor-model': 7.28.4(@types/node@22.13.14) @@ -14364,6 +14384,23 @@ snapshots: transitivePeerDependencies: - '@types/node' + '@microsoft/api-extractor@7.39.1(@types/node@22.14.1)': + dependencies: + '@microsoft/api-extractor-model': 7.28.4(@types/node@22.14.1) + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.63.0(@types/node@22.14.1) + '@rushstack/rig-package': 0.5.1 + '@rushstack/ts-command-line': 4.17.1 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.22.8 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.3.3 + transitivePeerDependencies: + - '@types/node' + '@microsoft/tsdoc-config@0.16.2': dependencies: '@microsoft/tsdoc': 0.14.2 @@ -14946,6 +14983,18 @@ snapshots: optionalDependencies: '@types/node': 22.13.14 + '@rushstack/node-core-library@3.63.0(@types/node@22.14.1)': + dependencies: + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.8 + semver: 7.5.4 + z-schema: 5.0.5 + optionalDependencies: + '@types/node': 22.14.1 + '@rushstack/rig-package@0.5.1': dependencies: resolve: 1.22.8 @@ -15368,7 +15417,7 @@ snapshots: '@types/eslint-scope@3.7.7': dependencies: '@types/eslint': 9.6.1 - '@types/estree': 1.0.6 + '@types/estree': 1.0.7 '@types/eslint@9.6.1': dependencies: @@ -15406,7 +15455,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.14.1 '@types/hapi__joi@17.1.9': {} @@ -15454,7 +15503,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.14.1 '@types/lodash@4.17.13': {} @@ -15490,6 +15539,10 @@ snapshots: dependencies: undici-types: 6.20.0 + '@types/node@22.14.1': + dependencies: + undici-types: 6.21.0 + '@types/node@22.8.7': dependencies: undici-types: 6.19.8 @@ -15535,7 +15588,7 @@ snapshots: '@types/responselike@1.0.3': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.14.1 '@types/sax@1.2.7': dependencies: @@ -15597,6 +15650,25 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 5.62.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/type-utils': 5.62.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/utils': 5.62.0(eslint@9.23.0)(typescript@5.8.2) + debug: 4.3.7(supports-color@5.5.0) + eslint: 9.23.0 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare-lite: 1.4.0 + semver: 7.6.3 + tsutils: 3.21.0(typescript@5.8.2) + optionalDependencies: + typescript: 5.8.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/parser@5.62.0(eslint@9.23.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 5.62.0 @@ -15609,6 +15681,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@5.62.0(eslint@9.23.0)(typescript@5.8.2)': + dependencies: + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.2) + debug: 4.3.7(supports-color@5.5.0) + eslint: 9.23.0 + optionalDependencies: + typescript: 5.8.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/scope-manager@5.62.0': dependencies: '@typescript-eslint/types': 5.62.0 @@ -15626,6 +15710,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/type-utils@5.62.0(eslint@9.23.0)(typescript@5.8.2)': + dependencies: + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.2) + '@typescript-eslint/utils': 5.62.0(eslint@9.23.0)(typescript@5.8.2) + debug: 4.3.7(supports-color@5.5.0) + eslint: 9.23.0 + tsutils: 3.21.0(typescript@5.8.2) + optionalDependencies: + typescript: 5.8.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/types@5.62.0': {} '@typescript-eslint/typescript-estree@5.62.0(typescript@5.6.3)': @@ -15642,6 +15738,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@5.62.0(typescript@5.8.2)': + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + debug: 4.3.7(supports-color@5.5.0) + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.6.3 + tsutils: 3.21.0(typescript@5.8.2) + optionalDependencies: + typescript: 5.8.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@5.62.0(eslint@9.23.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.23.0) @@ -15657,6 +15767,21 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@5.62.0(eslint@9.23.0)(typescript@5.8.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.23.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.2) + eslint: 9.23.0 + eslint-scope: 5.1.1 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@5.62.0': dependencies: '@typescript-eslint/types': 5.62.0 @@ -15792,6 +15917,40 @@ snapshots: - supports-color - terser + '@umijs/bundler-webpack@4.3.34(type-fest@1.4.0)(typescript@5.3.3)(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1)))': + dependencies: + '@svgr/core': 6.5.1 + '@svgr/plugin-jsx': 6.5.1(@svgr/core@6.5.1) + '@svgr/plugin-svgo': 6.5.1(@svgr/core@6.5.1) + '@types/hapi__joi': 17.1.9 + '@umijs/babel-preset-umi': 4.3.34 + '@umijs/bundler-utils': 4.3.34 + '@umijs/case-sensitive-paths-webpack-plugin': 1.0.1 + '@umijs/mfsu': 4.3.34 + '@umijs/react-refresh-webpack-plugin': 0.5.11(react-refresh@0.14.0)(type-fest@1.4.0)(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))) + '@umijs/utils': 4.3.34 + cors: 2.8.5 + css-loader: 6.7.1(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))) + es5-imcompatible-versions: 0.1.90 + fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.3.3)(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))) + jest-worker: 29.4.3 + lightningcss: 1.22.1 + node-libs-browser: 2.2.1 + postcss: 8.5.3 + postcss-preset-env: 7.5.0(postcss@8.5.3) + react-error-overlay: 6.0.9 + react-refresh: 0.14.0 + transitivePeerDependencies: + - '@types/webpack' + - sockjs-client + - supports-color + - type-fest + - typescript + - webpack + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + '@umijs/bundler-webpack@4.3.34(type-fest@1.4.0)(typescript@5.3.3)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1)))': dependencies: '@svgr/core': 6.5.1 @@ -15826,7 +15985,7 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - '@umijs/bundler-webpack@4.3.34(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1)': + '@umijs/bundler-webpack@4.3.34(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1)': dependencies: '@svgr/core': 6.5.1 '@svgr/plugin-jsx': 6.5.1(@svgr/core@6.5.1) @@ -15841,7 +16000,7 @@ snapshots: cors: 2.8.5 css-loader: 6.7.1(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))) es5-imcompatible-versions: 0.1.90 - fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.6.3)(webpack@5.96.1) + fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.8.2)(webpack@5.96.1) jest-worker: 29.4.3 lightningcss: 1.22.1 node-libs-browser: 2.2.1 @@ -15915,15 +16074,15 @@ snapshots: '@babel/runtime': 7.23.6 query-string: 6.14.1 - '@umijs/lint@4.3.34(eslint@9.23.0)(stylelint@14.16.1)(typescript@5.6.3)': + '@umijs/lint@4.3.34(eslint@9.23.0)(stylelint@14.16.1)(typescript@5.8.2)': dependencies: '@babel/core': 7.23.6 '@babel/eslint-parser': 7.23.3(@babel/core@7.23.6)(eslint@9.23.0) '@stylelint/postcss-css-in-js': 0.38.0(postcss-syntax@0.36.2(postcss@8.5.3))(postcss@8.5.3) - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.23.0)(typescript@5.6.3))(eslint@9.23.0)(typescript@5.6.3) - '@typescript-eslint/parser': 5.62.0(eslint@9.23.0)(typescript@5.6.3) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/parser': 5.62.0(eslint@9.23.0)(typescript@5.8.2) '@umijs/babel-preset-umi': 4.3.34 - eslint-plugin-jest: 27.2.3(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.23.0)(typescript@5.6.3))(eslint@9.23.0)(typescript@5.6.3))(eslint@9.23.0)(typescript@5.6.3) + eslint-plugin-jest: 27.2.3(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2) eslint-plugin-react: 7.33.2(eslint@9.23.0) eslint-plugin-react-hooks: 4.6.0(eslint@9.23.0) postcss: 8.5.3 @@ -16030,7 +16189,7 @@ snapshots: dependencies: tsx: 3.12.2 - '@umijs/preset-umi@4.3.34(@types/node@22.13.14)(@types/react@18.2.0)(lightningcss@1.22.1)(rollup@3.29.5)(sass@1.81.0)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1)': + '@umijs/preset-umi@4.3.34(@types/node@22.13.14)(@types/react@18.2.0)(lightningcss@1.22.1)(rollup@3.29.5)(sass@1.81.0)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1)': dependencies: '@iconify/utils': 2.1.1 '@svgr/core': 6.5.1 @@ -16040,7 +16199,7 @@ snapshots: '@umijs/bundler-mako': 0.9.6 '@umijs/bundler-utils': 4.3.34 '@umijs/bundler-vite': 4.3.34(@types/node@22.13.14)(lightningcss@1.22.1)(postcss@8.5.3)(rollup@3.29.5)(sass@1.81.0)(terser@5.36.0) - '@umijs/bundler-webpack': 4.3.34(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1) + '@umijs/bundler-webpack': 4.3.34(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1) '@umijs/core': 4.3.34 '@umijs/did-you-know': 1.0.3 '@umijs/es-module-parser': 0.0.7 @@ -16088,6 +16247,22 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve + '@umijs/react-refresh-webpack-plugin@0.5.11(react-refresh@0.14.0)(type-fest@1.4.0)(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1)))': + dependencies: + ansi-html-community: 0.0.8 + common-path-prefix: 3.0.0 + core-js-pure: 3.39.0 + error-stack-parser: 2.1.4 + find-up: 5.0.0 + html-entities: 2.5.2 + loader-utils: 2.0.4 + react-refresh: 0.14.0 + schema-utils: 3.3.0 + source-map: 0.7.4 + webpack: 5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1)) + optionalDependencies: + type-fest: 1.4.0 + '@umijs/react-refresh-webpack-plugin@0.5.11(react-refresh@0.14.0)(type-fest@1.4.0)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1)))': dependencies: ansi-html-community: 0.0.8 @@ -16166,14 +16341,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@4.3.3(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0))': + '@vitejs/plugin-react@4.3.3(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0))': dependencies: '@babel/core': 7.26.0 '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + vite: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) transitivePeerDependencies: - supports-color @@ -16188,14 +16363,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@4.3.4(vite@6.2.4(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1))': + '@vitejs/plugin-react@4.3.4(vite@6.2.4(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1))': dependencies: '@babel/core': 7.26.0 '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 6.2.4(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1) + vite: 6.2.4(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1) transitivePeerDependencies: - supports-color @@ -16206,13 +16381,13 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.5(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0))': + '@vitest/mocker@2.1.5(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0))': dependencies: '@vitest/spy': 2.1.5 estree-walker: 3.0.3 magic-string: 0.30.13 optionalDependencies: - vite: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + vite: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) '@vitest/pretty-format@2.1.5': dependencies: @@ -17675,6 +17850,18 @@ snapshots: optionalDependencies: webpack: 5.96.1(webpack-cli@5.1.4(webpack@5.96.1)) + css-loader@6.7.1(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))): + dependencies: + icss-utils: 5.1.0(postcss@8.5.3) + postcss: 8.5.3 + postcss-modules-extract-imports: 3.1.0(postcss@8.5.3) + postcss-modules-local-by-default: 4.1.0(postcss@8.5.3) + postcss-modules-scope: 3.2.1(postcss@8.5.3) + postcss-modules-values: 4.0.0(postcss@8.5.3) + postcss-value-parser: 4.2.0 + semver: 7.6.3 + webpack: 5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1)) + css-loader@6.7.1(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))): dependencies: icss-utils: 5.1.0(postcss@8.5.3) @@ -18238,7 +18425,7 @@ snapshots: dumi-assets-types@2.4.14: {} - dumi-theme-antd@0.4.2(@babel/core@7.26.0)(@types/react@18.2.0)(antd@5.22.2(date-fns@2.30.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(date-fns@2.30.0)(dumi@2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1))(immer@10.1.1)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0): + dumi-theme-antd@0.4.2(@babel/core@7.26.0)(@types/react@18.2.0)(antd@5.22.2(date-fns@2.30.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(date-fns@2.30.0)(dumi@2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1))(immer@10.1.1)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0): dependencies: '@ant-design/cssinjs': 1.20.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@ant-design/icons': 5.3.6(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -18251,7 +18438,7 @@ snapshots: antd-token-previewer: 2.0.0-alpha.6(@babel/core@7.26.0)(@types/react@18.2.0)(date-fns@2.30.0)(immer@10.1.1)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0) classnames: 2.3.2 dayjs: 1.11.7 - dumi: 2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1) + dumi: 2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1) lodash.clonedeep: 4.5.0 prism-react-renderer: 2.4.0(react@18.2.0) rc-drawer: 6.2.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -18270,7 +18457,7 @@ snapshots: - react-is - supports-color - dumi@2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1): + dumi@2.4.14(@babel/core@7.26.0)(@swc/helpers@0.5.15)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1): dependencies: '@ant-design/icons-svg': 4.4.2 '@makotot/ghostui': 2.0.0(react@18.2.0) @@ -18321,7 +18508,7 @@ snapshots: react-copy-to-clipboard: 5.1.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0) react-error-boundary: 4.1.2(react@18.2.0) - react-intl: 6.8.9(react@18.2.0)(typescript@5.6.3) + react-intl: 6.8.9(react@18.2.0)(typescript@5.8.2) react-loading-skeleton: 3.5.0(react@18.2.0) react-simple-code-editor: 0.13.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) rehype-autolink-headings: 6.1.1 @@ -18335,7 +18522,7 @@ snapshots: sass: 1.81.0 sitemap: 7.1.2 sucrase: 3.35.0 - umi: 4.3.34(@babel/core@7.26.0)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(sass@1.81.0)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1) + umi: 4.3.34(@babel/core@7.26.0)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(sass@1.81.0)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1) unified: 10.1.2 unist-util-visit: 4.1.2 unist-util-visit-parents: 5.1.3 @@ -18769,6 +18956,16 @@ snapshots: - supports-color - typescript + eslint-plugin-jest@27.2.3(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2): + dependencies: + '@typescript-eslint/utils': 5.62.0(eslint@9.23.0)(typescript@5.8.2) + eslint: 9.23.0 + optionalDependencies: + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2) + transitivePeerDependencies: + - supports-color + - typescript + eslint-plugin-react-hooks@4.6.0(eslint@9.23.0): dependencies: eslint: 9.23.0 @@ -19134,7 +19331,7 @@ snapshots: dependencies: reusify: 1.0.4 - father@4.5.1(@babel/core@7.26.0)(@types/node@22.13.14)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))): + father@4.5.1(@babel/core@7.26.0)(@types/node@22.13.14)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1): dependencies: '@microsoft/api-extractor': 7.39.1(@types/node@22.13.14) '@umijs/babel-preset-umi': 4.3.34 @@ -19172,6 +19369,82 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve + father@4.5.1(@babel/core@7.26.0)(@types/node@22.14.1)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))): + dependencies: + '@microsoft/api-extractor': 7.39.1(@types/node@22.14.1) + '@umijs/babel-preset-umi': 4.3.34 + '@umijs/bundler-utils': 4.3.34 + '@umijs/bundler-webpack': 4.3.34(type-fest@1.4.0)(typescript@5.3.3)(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))) + '@umijs/case-sensitive-paths-webpack-plugin': 1.0.1 + '@umijs/core': 4.3.34 + '@umijs/utils': 4.3.34 + '@vercel/ncc': 0.33.3 + babel-plugin-dynamic-import-node: 2.3.3 + babel-plugin-module-resolver: 4.1.0 + babel-plugin-styled-components: 2.1.4(@babel/core@7.26.0)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(supports-color@5.5.0) + babel-plugin-transform-define: 2.0.1 + enhanced-resolve: 5.9.3 + esbuild: 0.17.19 + fast-glob: 3.2.12 + file-system-cache: 2.0.0 + loader-runner: 4.2.0 + minimatch: 3.1.2 + piscina: 4.7.0 + tsconfig-paths: 4.0.0 + typescript: 5.3.3 + typescript-transform-paths: 3.4.6(typescript@5.3.3) + v8-compile-cache: 2.3.0 + transitivePeerDependencies: + - '@babel/core' + - '@types/node' + - '@types/webpack' + - sockjs-client + - styled-components + - supports-color + - type-fest + - webpack + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + + father@4.5.1(@babel/core@7.26.0)(@types/node@22.14.1)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(type-fest@1.4.0)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))): + dependencies: + '@microsoft/api-extractor': 7.39.1(@types/node@22.14.1) + '@umijs/babel-preset-umi': 4.3.34 + '@umijs/bundler-utils': 4.3.34 + '@umijs/bundler-webpack': 4.3.34(type-fest@1.4.0)(typescript@5.3.3)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))) + '@umijs/case-sensitive-paths-webpack-plugin': 1.0.1 + '@umijs/core': 4.3.34 + '@umijs/utils': 4.3.34 + '@vercel/ncc': 0.33.3 + babel-plugin-dynamic-import-node: 2.3.3 + babel-plugin-module-resolver: 4.1.0 + babel-plugin-styled-components: 2.1.4(@babel/core@7.26.0)(styled-components@5.3.11(@babel/core@7.26.0)(react-dom@18.2.0(react@18.2.0))(react-is@18.3.1)(react@18.2.0))(supports-color@5.5.0) + babel-plugin-transform-define: 2.0.1 + enhanced-resolve: 5.9.3 + esbuild: 0.17.19 + fast-glob: 3.2.12 + file-system-cache: 2.0.0 + loader-runner: 4.2.0 + minimatch: 3.1.2 + piscina: 4.7.0 + tsconfig-paths: 4.0.0 + typescript: 5.3.3 + typescript-transform-paths: 3.4.6(typescript@5.3.3) + v8-compile-cache: 2.3.0 + transitivePeerDependencies: + - '@babel/core' + - '@types/node' + - '@types/webpack' + - sockjs-client + - styled-components + - supports-color + - type-fest + - webpack + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + fault@2.0.1: dependencies: format: 0.2.2 @@ -19404,6 +19677,23 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 + fork-ts-checker-webpack-plugin@8.0.0(typescript@5.3.3)(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))): + dependencies: + '@babel/code-frame': 7.26.2 + chalk: 4.1.2 + chokidar: 3.6.0 + cosmiconfig: 7.1.0 + deepmerge: 4.3.1 + fs-extra: 10.1.0 + memfs: 3.5.3 + minimatch: 3.1.2 + node-abort-controller: 3.1.1 + schema-utils: 3.3.0 + semver: 7.6.3 + tapable: 2.2.1 + typescript: 5.3.3 + webpack: 5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1)) + fork-ts-checker-webpack-plugin@8.0.0(typescript@5.3.3)(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))): dependencies: '@babel/code-frame': 7.26.2 @@ -19421,7 +19711,7 @@ snapshots: typescript: 5.3.3 webpack: 5.96.1(webpack-cli@5.1.4(webpack@5.96.1)) - fork-ts-checker-webpack-plugin@8.0.0(typescript@5.6.3)(webpack@5.96.1): + fork-ts-checker-webpack-plugin@8.0.0(typescript@5.8.2)(webpack@5.96.1): dependencies: '@babel/code-frame': 7.26.2 chalk: 4.1.2 @@ -19435,7 +19725,7 @@ snapshots: schema-utils: 3.3.0 semver: 7.6.3 tapable: 2.2.1 - typescript: 5.6.3 + typescript: 5.8.2 webpack: 5.96.1(webpack-cli@5.1.4(webpack@5.96.1)) form-data@4.0.1: @@ -20692,7 +20982,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.13.14 + '@types/node': 22.14.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -20717,7 +21007,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.13.14 + '@types/node': 22.14.1 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -20730,7 +21020,7 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.13.14 + '@types/node': 22.14.1 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -23152,10 +23442,10 @@ snapshots: prepend-http@1.0.4: {} - prettier-plugin-organize-imports@3.2.4(prettier@3.3.3)(typescript@5.6.3): + prettier-plugin-organize-imports@3.2.4(prettier@3.3.3)(typescript@5.8.2): dependencies: prettier: 3.3.3 - typescript: 5.6.3 + typescript: 5.8.2 prettier-plugin-packagejson@2.4.3(prettier@3.3.3): dependencies: @@ -25229,7 +25519,18 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.10(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))): + terser-webpack-plugin@5.3.10(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.2 + terser: 5.36.0 + webpack: 5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1)) + optionalDependencies: + '@swc/core': 1.9.2(@swc/helpers@0.5.15) + + terser-webpack-plugin@5.3.10(webpack@5.96.1): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 @@ -25394,14 +25695,14 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-loader@9.5.1(typescript@5.6.3)(webpack@5.96.1): + ts-loader@9.5.1(typescript@5.8.2)(webpack@5.96.1): dependencies: chalk: 4.1.2 enhanced-resolve: 5.17.1 micromatch: 4.0.8 semver: 7.6.3 source-map: 0.7.4 - typescript: 5.6.3 + typescript: 5.8.2 webpack: 5.96.1(webpack-cli@5.1.4(webpack@5.96.1)) ts-toolbelt@9.6.0: {} @@ -25423,6 +25724,11 @@ snapshots: tslib: 1.14.1 typescript: 5.6.3 + tsutils@3.21.0(typescript@5.8.2): + dependencies: + tslib: 1.14.1 + typescript: 5.8.2 + tsx@3.12.2: dependencies: '@esbuild-kit/cjs-loader': 2.4.4 @@ -25562,19 +25868,19 @@ snapshots: dependencies: '@lukeed/csprng': 1.1.0 - umi@4.3.34(@babel/core@7.26.0)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(sass@1.81.0)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1): + umi@4.3.34(@babel/core@7.26.0)(@types/node@22.13.14)(@types/react@18.2.0)(eslint@9.23.0)(lightningcss@1.22.1)(prettier@3.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@3.29.5)(sass@1.81.0)(stylelint@14.16.1)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1): dependencies: '@babel/runtime': 7.23.6 '@umijs/bundler-utils': 4.3.34 - '@umijs/bundler-webpack': 4.3.34(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1) + '@umijs/bundler-webpack': 4.3.34(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1) '@umijs/core': 4.3.34 - '@umijs/lint': 4.3.34(eslint@9.23.0)(stylelint@14.16.1)(typescript@5.6.3) - '@umijs/preset-umi': 4.3.34(@types/node@22.13.14)(@types/react@18.2.0)(lightningcss@1.22.1)(rollup@3.29.5)(sass@1.81.0)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.6.3)(webpack@5.96.1) + '@umijs/lint': 4.3.34(eslint@9.23.0)(stylelint@14.16.1)(typescript@5.8.2) + '@umijs/preset-umi': 4.3.34(@types/node@22.13.14)(@types/react@18.2.0)(lightningcss@1.22.1)(rollup@3.29.5)(sass@1.81.0)(terser@5.36.0)(type-fest@1.4.0)(typescript@5.8.2)(webpack@5.96.1) '@umijs/renderer-react': 4.3.34(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@umijs/server': 4.3.34 '@umijs/test': 4.3.34(@babel/core@7.26.0) '@umijs/utils': 4.3.34 - prettier-plugin-organize-imports: 3.2.4(prettier@3.3.3)(typescript@5.6.3) + prettier-plugin-organize-imports: 3.2.4(prettier@3.3.3)(typescript@5.8.2) prettier-plugin-packagejson: 2.4.3(prettier@3.3.3) transitivePeerDependencies: - '@babel/core' @@ -25620,6 +25926,8 @@ snapshots: undici-types@6.20.0: {} + undici-types@6.21.0: {} + unfetch@5.0.0: {} unified@10.1.2: @@ -25946,13 +26254,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.5(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0): + vite-node@2.1.5(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0): dependencies: cac: 6.7.14 debug: 4.3.7(supports-color@5.5.0) es-module-lexer: 1.5.4 pathe: 1.1.2 - vite: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + vite: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) transitivePeerDependencies: - '@types/node' - less @@ -25985,12 +26293,12 @@ snapshots: picocolors: 1.1.1 vite: 5.4.16(@types/node@22.9.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) - vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.15)(rollup@4.38.0)(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)): + vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.15)(rollup@4.38.0)(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)): dependencies: '@rollup/plugin-virtual': 3.0.2(rollup@4.38.0) '@swc/core': 1.9.2(@swc/helpers@0.5.15) uuid: 10.0.0 - vite: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + vite: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) transitivePeerDependencies: - '@swc/helpers' - rollup @@ -26005,9 +26313,9 @@ snapshots: - '@swc/helpers' - rollup - vite-plugin-wasm@3.3.0(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)): + vite-plugin-wasm@3.3.0(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)): dependencies: - vite: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + vite: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) vite-plugin-wasm@3.3.0(vite@5.4.16(@types/node@22.9.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)): dependencies: @@ -26026,13 +26334,13 @@ snapshots: sass: 1.81.0 terser: 5.36.0 - vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0): + vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0): dependencies: esbuild: 0.21.5 postcss: 8.5.3 rollup: 4.38.0 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.14.1 fsevents: 2.3.3 less: 4.2.0 lightningcss: 1.22.1 @@ -26052,13 +26360,13 @@ snapshots: sass: 1.81.0 terser: 5.36.0 - vite@6.2.4(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1): + vite@6.2.4(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)(yaml@2.5.1): dependencies: esbuild: 0.25.2 postcss: 8.5.3 rollup: 4.38.0 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.14.1 fsevents: 2.3.3 less: 4.2.0 lightningcss: 1.22.1 @@ -26066,10 +26374,10 @@ snapshots: terser: 5.36.0 yaml: 2.5.1 - vitest@2.1.5(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0): + vitest@2.1.5(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0): dependencies: '@vitest/expect': 2.1.5 - '@vitest/mocker': 2.1.5(vite@5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) + '@vitest/mocker': 2.1.5(vite@5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0)) '@vitest/pretty-format': 2.1.5 '@vitest/runner': 2.1.5 '@vitest/snapshot': 2.1.5 @@ -26085,11 +26393,11 @@ snapshots: tinyexec: 0.3.1 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.16(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) - vite-node: 2.1.5(@types/node@22.13.14)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + vite: 5.4.16(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) + vite-node: 2.1.5(@types/node@22.14.1)(less@4.2.0)(lightningcss@1.22.1)(sass@1.81.0)(terser@5.36.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.14.1 transitivePeerDependencies: - less - lightningcss @@ -26164,10 +26472,42 @@ snapshots: webpack-sources@3.2.3: {} + webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1)): + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.7 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + acorn: 8.14.0 + browserslist: 4.24.2 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.17.1 + es-module-lexer: 1.5.4 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.10(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack@5.96.1(@swc/core@1.9.2(@swc/helpers@0.5.15))(webpack-cli@5.1.4(webpack@5.96.1))) + watchpack: 2.4.2 + webpack-sources: 3.2.3 + optionalDependencies: + webpack-cli: 5.1.4(webpack@5.96.1) + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1)): dependencies: '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.6 + '@types/estree': 1.0.7 '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 @@ -26186,7 +26526,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.96.1(webpack-cli@5.1.4(webpack@5.96.1))) + terser-webpack-plugin: 5.3.10(webpack@5.96.1) watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: