@ant-design/agentic-ui 2.29.19 → 2.29.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AILabel/index.js +2 -2
- package/dist/AILabel/style.js +1 -1
- package/dist/AgentRunBar/Robot.js +1 -1
- package/dist/AgentRunBar/index.js +2 -2
- package/dist/AgentRunBar/style.js +1 -1
- package/dist/AgenticLayout/index.js +2 -2
- package/dist/AgenticLayout/style.js +2 -2
- package/dist/AnswerAlert/components/ErrorIcon.js +1 -1
- package/dist/AnswerAlert/components/InfoIcon.js +1 -1
- package/dist/AnswerAlert/components/SuccessIcon.js +1 -1
- package/dist/AnswerAlert/components/WarningIcon.js +1 -1
- package/dist/AnswerAlert/index.js +1 -1
- package/dist/AnswerAlert/style.js +1 -1
- package/dist/BackTo/BackTop.js +1 -1
- package/dist/BackTo/ScrollVisibleButton.js +4 -4
- package/dist/BackTo/hooks/useScrollVisible.js +1 -1
- package/dist/BackTo/icons/BottomIcon.js +1 -1
- package/dist/BackTo/icons/TopIcon.js +1 -1
- package/dist/BackTo/style.js +1 -1
- package/dist/Bubble/AIBubble.js +5 -5
- package/dist/Bubble/Avatar/index.js +1 -1
- package/dist/Bubble/Avatar/isEmoji.js +1 -1
- package/dist/Bubble/Bubble.js +1 -1
- package/dist/Bubble/BubbleBeforeNode.js +3 -3
- package/dist/Bubble/FileView.js +6 -6
- package/dist/Bubble/List/PureBubbleList.js +3 -3
- package/dist/Bubble/List/index.js +3 -3
- package/dist/Bubble/List/style.js +1 -1
- package/dist/Bubble/MessagesContent/BubbleContext.js +2 -2
- package/dist/Bubble/MessagesContent/BubbleExtra.js +9 -11
- package/dist/Bubble/MessagesContent/CopyButton/index.js +2 -2
- package/dist/Bubble/MessagesContent/DocInfo.js +7 -7
- package/dist/Bubble/MessagesContent/EXCEPTION.js +1 -1
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +1 -1
- package/dist/Bubble/MessagesContent/VoiceButton/index.js +8 -8
- package/dist/Bubble/MessagesContent/VoiceButton/style.js +1 -1
- package/dist/Bubble/MessagesContent/docInfoStyle.js +1 -1
- package/dist/Bubble/MessagesContent/icons.js +2 -2
- package/dist/Bubble/MessagesContent/index.js +10 -10
- package/dist/Bubble/MessagesContent/style.js +15 -8
- package/dist/Bubble/PureBubble.js +1 -1
- package/dist/Bubble/Title.js +4 -4
- package/dist/Bubble/UserBubble.js +4 -4
- package/dist/Bubble/schema-editor/SchemaEditorBridgeManager.js +3 -3
- package/dist/Bubble/schema-editor/useSchemaEditorBridge.js +1 -1
- package/dist/Bubble/style.js +1 -1
- package/dist/ChatBootPage/ButtonTab.js +1 -1
- package/dist/ChatBootPage/ButtonTabGroup.js +2 -2
- package/dist/ChatBootPage/ButtonTabGroupStyle.js +2 -2
- package/dist/ChatBootPage/ButtonTabStyle.js +2 -2
- package/dist/ChatBootPage/CaseReply.js +2 -2
- package/dist/ChatBootPage/CaseReplyStyle.js +2 -2
- package/dist/ChatBootPage/Title.js +1 -1
- package/dist/ChatBootPage/style.js +2 -2
- package/dist/ChatLayout/components/FooterBackground/index.js +1 -1
- package/dist/ChatLayout/index.js +1 -1
- package/dist/ChatLayout/style.js +1 -1
- package/dist/Components/ActionIconBox/index.js +12 -12
- package/dist/Components/ActionIconBox/style.js +1 -1
- package/dist/Components/ActionItemBox/ActionItemBox.js +1 -1
- package/dist/Components/ActionItemBox/style.js +1 -1
- package/dist/Components/Button/IconButton/index.js +1 -1
- package/dist/Components/Button/IconButton/style.js +1 -1
- package/dist/Components/Button/SwitchButton/index.js +3 -3
- package/dist/Components/Button/SwitchButton/style.js +1 -1
- package/dist/Components/Button/ToggleButton/index.js +1 -1
- package/dist/Components/Button/ToggleButton/style.js +1 -1
- package/dist/Components/GradientText/style.js +2 -2
- package/dist/Components/ImageList.js +2 -2
- package/dist/Components/LayoutHeader/index.js +4 -4
- package/dist/Components/LayoutHeader/style.js +2 -2
- package/dist/Components/Loading/CreativeRecommendationLoading.js +1 -1
- package/dist/Components/Loading/CreativeSparkLoading.js +1 -1
- package/dist/Components/Loading/Loading.js +1 -1
- package/dist/Components/Loading/style.js +1 -1
- package/dist/Components/Robot/index.js +1 -1
- package/dist/Components/Robot/lotties/BlowingWindLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/BouncingLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/DazingLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/PeekLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/ThinkingLottie/index.js +1 -1
- package/dist/Components/SuggestionList/index.js +4 -4
- package/dist/Components/SuggestionList/style.js +1 -1
- package/dist/Components/TextAnimate/index.js +2 -2
- package/dist/Components/TextAnimate/style.js +2 -2
- package/dist/Components/TypingAnimation/index.js +1 -1
- package/dist/Components/TypingAnimation/style.js +2 -2
- package/dist/Components/VisualList/index.js +3 -3
- package/dist/Components/VisualList/style.js +1 -1
- package/dist/Components/effects/CreativeRecommendationEffect/index.js +1 -1
- package/dist/Components/effects/LoadingEffect/index.js +1 -1
- package/dist/Components/icons/LoadingSpinnerIcon.js +1 -1
- package/dist/Components/lotties/CreativeSparkLottie/index.js +1 -1
- package/dist/Components/lotties/DazingLottie/index.js +1 -1
- package/dist/Components/lotties/LoadingLottie/index.js +1 -1
- package/dist/Components/lotties/TextLoading/index.js +1 -1
- package/dist/Components/lotties/TextLoading/style.js +1 -1
- package/dist/Components/lotties/ThinkingLottie/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Abstract/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Abstract/style.js +1 -1
- package/dist/Components/lotties/bubble-actions/Copy/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Dislike/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Like/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/More/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Play/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Quote/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Refresh/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Share/index.js +1 -1
- package/dist/History/components/HistoryActionsBox.js +9 -9
- package/dist/History/components/HistoryEmpty.js +1 -1
- package/dist/History/components/HistoryEmptyIcon.js +1 -1
- package/dist/History/components/HistoryItem.js +4 -4
- package/dist/History/components/HistoryList.js +2 -2
- package/dist/History/components/LoadMoreComponent.js +2 -2
- package/dist/History/components/NewChatComponent.js +1 -1
- package/dist/History/components/NewChatComponent.style.js +2 -2
- package/dist/History/components/SearchComponent.js +6 -6
- package/dist/History/hooks/useHistory.js +1 -1
- package/dist/History/index.js +3 -3
- package/dist/History/menu.js +2 -2
- package/dist/History/style.js +1 -1
- package/dist/History/utils/index.js +2 -2
- package/dist/Hooks/useAutoScroll.js +3 -3
- package/dist/Hooks/useClickAway.js +2 -2
- package/dist/Hooks/useCopied.js +1 -1
- package/dist/Hooks/useElementSize.js +1 -1
- package/dist/Hooks/useIntersectionOnce.js +1 -1
- package/dist/Hooks/useRefFunction/index.js +1 -1
- package/dist/Hooks/useSpeechSynthesis.js +1 -1
- package/dist/Hooks/useStyle/index.js +2 -2
- package/dist/I18n/index.js +1 -1
- package/dist/Icons/animated/VoicePlayLottie/index.js +1 -1
- package/dist/Icons/animated/VoicingLottie/index.js +1 -1
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +7 -7
- package/dist/MarkdownEditor/editor/Editor.js +18 -18
- package/dist/MarkdownEditor/editor/components/CommentList/index.js +6 -6
- package/dist/MarkdownEditor/editor/components/CommentList/style.js +1 -1
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.js +2 -2
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/style.js +1 -1
- package/dist/MarkdownEditor/editor/components/LazyElement/index.js +1 -1
- package/dist/MarkdownEditor/editor/components/LazyElement/style.js +2 -2
- package/dist/MarkdownEditor/editor/components/MediaErrorLink.js +2 -2
- package/dist/MarkdownEditor/editor/components/fntTag/index.js +1 -1
- package/dist/MarkdownEditor/editor/components/fntTag/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Blockquote/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Break/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Card/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Code/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Comment/index.js +3 -3
- package/dist/MarkdownEditor/editor/elements/CommentLeaf/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/FncLeaf/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/FootnoteDefinition/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/FootnoteReference/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Head/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Hr/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Image/index.js +17 -17
- package/dist/MarkdownEditor/editor/elements/InlineKatex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Katex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/LinkCard/ReadonlyLinkCard.js +2 -2
- package/dist/MarkdownEditor/editor/elements/LinkCard/index.js +4 -4
- package/dist/MarkdownEditor/editor/elements/List/List.js +2 -2
- package/dist/MarkdownEditor/editor/elements/List/ListItem.js +9 -9
- package/dist/MarkdownEditor/editor/elements/Media/ReadonlyMedia.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Media/index.js +15 -15
- package/dist/MarkdownEditor/editor/elements/Mermaid/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Paragraph/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Schema/index.js +4 -4
- package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +5 -5
- package/dist/MarkdownEditor/editor/elements/Table/SimpleTable.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +5 -5
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableContext.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/Td/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Table/index.js +5 -5
- package/dist/MarkdownEditor/editor/elements/Table/useScrollShadow.js +2 -2
- package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +18 -18
- package/dist/MarkdownEditor/editor/elements/index.js +9 -9
- package/dist/MarkdownEditor/editor/parser/parse/applyContextPropsAndConfig.js +2 -2
- package/dist/MarkdownEditor/editor/parser/parse/parseBlockElements.js +9 -9
- package/dist/MarkdownEditor/editor/parser/parse/parseCode.js +5 -5
- package/dist/MarkdownEditor/editor/parser/parse/parseElements.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseEmptyLines.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseFootnote.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseHtml.js +18 -18
- package/dist/MarkdownEditor/editor/parser/parse/parseMath.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseMedia.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +10 -10
- package/dist/MarkdownEditor/editor/parser/parse/parseText.js +5 -5
- package/dist/MarkdownEditor/editor/parser/parserMarkdownToSlateNode.js +24 -24
- package/dist/MarkdownEditor/editor/parser/parserMdToSchema.js +2 -2
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +41 -41
- package/dist/MarkdownEditor/editor/plugins/catchError.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/elements.js +21 -21
- package/dist/MarkdownEditor/editor/plugins/handlePaste.js +9 -9
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/arrow.js +4 -4
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/backspace.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/enter.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/match.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/tab.js +4 -4
- package/dist/MarkdownEditor/editor/plugins/insertParsedHtmlNodes.js +44 -44
- package/dist/MarkdownEditor/editor/plugins/parseMarkdownToNodesAndInsert.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/useHighlight.js +5 -5
- package/dist/MarkdownEditor/editor/plugins/useKeyboard.js +5 -5
- package/dist/MarkdownEditor/editor/plugins/useOnchange.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/utils.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withCardPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withCodeTagPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withInlineNodes.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/withLinkAndMediaPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withListsPlugin.js +3 -3
- package/dist/MarkdownEditor/editor/plugins/withMarkdown.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/withSchemaPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withVoidNodes.js +1 -1
- package/dist/MarkdownEditor/editor/store.js +6 -6
- package/dist/MarkdownEditor/editor/style.js +2 -2
- package/dist/MarkdownEditor/editor/tools/DragHandle.js +2 -2
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +22 -22
- package/dist/MarkdownEditor/editor/tools/InsertLink.js +7 -7
- package/dist/MarkdownEditor/editor/tools/Leading.js +8 -8
- package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.js +6 -6
- package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.js +5 -5
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +7 -7
- package/dist/MarkdownEditor/editor/tools/ToolBar/ToolBar.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ColorPickerButton.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormattingTools.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/HeadingDropdown.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/config/toolsConfig.js +9 -9
- package/dist/MarkdownEditor/editor/tools/ToolBar/floatBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/hooks/useToolBarLogic.js +4 -4
- package/dist/MarkdownEditor/editor/tools/ToolBar/toolBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/tools/insertAutocompleteStyle.js +1 -1
- package/dist/MarkdownEditor/editor/utils/ace.js +3 -3
- package/dist/MarkdownEditor/editor/utils/docx/docxDeserializer.js +2 -2
- package/dist/MarkdownEditor/editor/utils/docx/module.js +9 -9
- package/dist/MarkdownEditor/editor/utils/docx/utils.js +5 -5
- package/dist/MarkdownEditor/editor/utils/dom.js +5 -5
- package/dist/MarkdownEditor/editor/utils/editorCommands.js +5 -5
- package/dist/MarkdownEditor/editor/utils/editorUtils.js +17 -17
- package/dist/MarkdownEditor/editor/utils/index.js +9 -9
- package/dist/MarkdownEditor/editor/utils/keyboard.js +4 -4
- package/dist/MarkdownEditor/editor/utils/markdownToHtml.js +6 -6
- package/dist/MarkdownEditor/editor/utils/media.js +2 -2
- package/dist/MarkdownEditor/editor/utils/path.js +3 -3
- package/dist/MarkdownEditor/editor/utils/performanceMonitor.js +2 -2
- package/dist/MarkdownEditor/editor/utils/useLocalState.js +1 -1
- package/dist/MarkdownEditor/hooks/editor.js +2 -2
- package/dist/MarkdownEditor/hooks/subscribe.js +1 -1
- package/dist/MarkdownEditor/index.js +1 -1
- package/dist/MarkdownEditor/style.js +1 -1
- package/dist/MarkdownEditor/utils/exportHtml.js +2 -2
- package/dist/MarkdownEditor/utils/native-table/native-table-editor.js +4 -4
- package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.js +8 -8
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileIcon.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +10 -10
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +10 -10
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/index.js +18 -18
- package/dist/MarkdownInputField/AttachmentButton/style.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/utils.js +8 -8
- package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +4 -4
- package/dist/MarkdownInputField/BorderBeamAnimation.js +1 -1
- package/dist/MarkdownInputField/Enlargement/index.js +1 -1
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +8 -8
- package/dist/MarkdownInputField/FileMapView/index.js +2 -2
- package/dist/MarkdownInputField/FileMapView/style.js +1 -1
- package/dist/MarkdownInputField/FilePaste/index.js +2 -2
- package/dist/MarkdownInputField/FileUploadManager/index.js +2 -2
- package/dist/MarkdownInputField/MarkdownInputField.js +10 -10
- package/dist/MarkdownInputField/QuickActions/index.js +5 -5
- package/dist/MarkdownInputField/RefinePromptButton/index.js +3 -3
- package/dist/MarkdownInputField/RefinePromptButton/style.js +1 -1
- package/dist/MarkdownInputField/SendActions/index.js +6 -6
- package/dist/MarkdownInputField/SendButton/index.js +3 -3
- package/dist/MarkdownInputField/SendButton/style.js +1 -1
- package/dist/MarkdownInputField/SkillModeBar/index.js +3 -3
- package/dist/MarkdownInputField/SkillModeBar/style.js +1 -1
- package/dist/MarkdownInputField/Suggestion/index.js +8 -8
- package/dist/MarkdownInputField/TopOperatingArea/index.js +2 -2
- package/dist/MarkdownInputField/TopOperatingArea/style.js +2 -2
- package/dist/MarkdownInputField/VoiceInput/index.js +2 -2
- package/dist/MarkdownInputField/VoiceInput/style.js +1 -1
- package/dist/MarkdownInputField/VoiceInputManager/index.js +3 -3
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldActions.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldHandlers.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldLayout.js +2 -2
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldRefs.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldState.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldStyles.js +1 -1
- package/dist/MarkdownInputField/style.js +2 -2
- package/dist/MarkdownInputField/utils/renderHelpers.js +5 -5
- package/dist/Plugins/chart/AreaChart/index.js +4 -4
- package/dist/Plugins/chart/AreaChart/style.js +1 -1
- package/dist/Plugins/chart/BarChart/index.js +11 -11
- package/dist/Plugins/chart/BarChart/style.js +1 -1
- package/dist/Plugins/chart/ChartAttrToolBar/ChartAttrToolBarStyle.js +1 -1
- package/dist/Plugins/chart/ChartAttrToolBar/index.js +3 -3
- package/dist/Plugins/chart/ChartMark/Area.js +2 -2
- package/dist/Plugins/chart/ChartMark/Bar.js +2 -2
- package/dist/Plugins/chart/ChartMark/Column.js +2 -2
- package/dist/Plugins/chart/ChartMark/Container.js +1 -1
- package/dist/Plugins/chart/ChartMark/Line.js +2 -2
- package/dist/Plugins/chart/ChartMark/Pie.js +2 -2
- package/dist/Plugins/chart/ChartRender.js +19 -19
- package/dist/Plugins/chart/ChartStatistic/index.js +3 -3
- package/dist/Plugins/chart/ChartStatistic/style.js +1 -1
- package/dist/Plugins/chart/ChartStatistic/utils.js +2 -2
- package/dist/Plugins/chart/DonutChart/Legend.js +3 -3
- package/dist/Plugins/chart/DonutChart/hooks.js +5 -5
- package/dist/Plugins/chart/DonutChart/index.js +11 -11
- package/dist/Plugins/chart/DonutChart/plugins.js +3 -3
- package/dist/Plugins/chart/DonutChart/style.js +1 -1
- package/dist/Plugins/chart/FunnelChart/index.js +14 -14
- package/dist/Plugins/chart/FunnelChart/style.js +1 -1
- package/dist/Plugins/chart/LineChart/index.js +3 -3
- package/dist/Plugins/chart/LineChart/style.js +1 -1
- package/dist/Plugins/chart/RadarChart/index.js +7 -7
- package/dist/Plugins/chart/RadarChart/style.js +1 -1
- package/dist/Plugins/chart/ScatterChart/index.js +7 -7
- package/dist/Plugins/chart/ScatterChart/style.js +1 -1
- package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +1 -1
- package/dist/Plugins/chart/components/ChartContainer/style.js +2 -2
- package/dist/Plugins/chart/components/ChartFilter/ChartFilter.js +6 -6
- package/dist/Plugins/chart/components/ChartFilter/style.js +1 -1
- package/dist/Plugins/chart/components/ChartToolBar/ChartToolBar.js +2 -2
- package/dist/Plugins/chart/components/ChartToolBar/style.js +1 -1
- package/dist/Plugins/chart/components/icons/TimeIcon.js +1 -1
- package/dist/Plugins/chart/components/index.js +1 -1
- package/dist/Plugins/chart/hooks/useChartDataFilter.js +1 -1
- package/dist/Plugins/chart/hooks/useChartStatistics.js +1 -1
- package/dist/Plugins/chart/hooks/useChartTheme.js +1 -1
- package/dist/Plugins/chart/hooks/useResponsiveSize.js +2 -2
- package/dist/Plugins/chart/index.js +8 -8
- package/dist/Plugins/chart/loadChartRuntime.js +1 -1
- package/dist/Plugins/chart/utils/registerChart.js +3 -3
- package/dist/Plugins/chart/utils.js +12 -12
- package/dist/Plugins/code/CodeUI/Katex/Katex.js +1 -1
- package/dist/Plugins/code/components/AceEditor.js +2 -2
- package/dist/Plugins/code/components/CodeContainer.js +3 -3
- package/dist/Plugins/code/components/CodeRenderer.js +2 -2
- package/dist/Plugins/code/components/CodeToolbar.js +5 -5
- package/dist/Plugins/code/components/LanguageSelector.js +7 -7
- package/dist/Plugins/code/components/LoadImage.js +3 -3
- package/dist/Plugins/code/components/ThinkBlock.js +2 -2
- package/dist/Plugins/code/index.js +1 -1
- package/dist/Plugins/code/langIcons/AbapIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ActionscriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AdaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ApacheIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ApexIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AplIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ApplescriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AstroIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AwkIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BallerinaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BatIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BicepIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BladeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CadenceIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ClojureIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CmakeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CobolIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CodeqlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CoffeeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ConsoleIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CppIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CrystalIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CsharpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CssIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DartIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DatabaseIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DiffIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DockerIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DotenvIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ElixirIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ElmIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ErbIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ErlangIcon.js +1 -1
- package/dist/Plugins/code/langIcons/FsharpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GdscriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GlslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GnuplotIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GraphqlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GroovyIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HackIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HamlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HandlebarsIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HaskellIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HclIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HclLightIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HjsonIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HlslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HtmlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HttpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ImbaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/IniIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JavaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JavascriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JinjaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/Json5Icon.js +1 -1
- package/dist/Plugins/code/langIcons/JsonIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JsonnetIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JuliaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/KotlinIcon.js +1 -1
- package/dist/Plugins/code/langIcons/KustoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LessIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LiquidIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LispIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LuaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MakefileIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MarkdownIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MarkojsIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MatlabIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MdxIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MermaidIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MojoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/NginxIcon.js +1 -1
- package/dist/Plugins/code/langIcons/NimIcon.js +1 -1
- package/dist/Plugins/code/langIcons/NixIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ObjectiveCIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ObjectiveCppIcon.js +1 -1
- package/dist/Plugins/code/langIcons/OcamlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PascalIcon.js +1 -1
- package/dist/Plugins/code/langIcons/Perl6Icon.js +1 -1
- package/dist/Plugins/code/langIcons/PerlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PhpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PostcssIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PowershellIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PrismaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PrologIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ProtoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PugIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PuppetIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PurescriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PythonIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RazorIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ReactIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ReactTsIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RubyIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RustIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SasIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SassIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ScalaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SchemeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ShaderlabIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SolidityIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SparqlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/StataIcon.js +1 -1
- package/dist/Plugins/code/langIcons/StylusIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SvelteIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SwiftIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SystemverilogIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TclIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TexIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TomlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TwigIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TypescriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VerilogIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VhdlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VimIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VueIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WebassemblyIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WenyanIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WgslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WolframlanguageIcon.js +1 -1
- package/dist/Plugins/code/langIcons/XmlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/XslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/YamlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ZigIcon.js +1 -1
- package/dist/Plugins/code/loadAceEditor.js +3 -3
- package/dist/Plugins/katex/InlineKatex.js +2 -2
- package/dist/Plugins/katex/Katex.js +1 -1
- package/dist/Plugins/katex/index.js +2 -2
- package/dist/Plugins/katex/loadKatex.js +2 -2
- package/dist/Plugins/mermaid/Mermaid.js +1 -1
- package/dist/Plugins/mermaid/MermaidFallback.js +1 -1
- package/dist/Plugins/mermaid/MermaidRendererImpl.js +1 -1
- package/dist/Plugins/mermaid/index.js +5 -5
- package/dist/Plugins/mermaid/style.js +1 -1
- package/dist/Plugins/mermaid/useMermaidRender.js +1 -1
- package/dist/Plugins/mermaid/utils.js +3 -3
- package/dist/Quote/index.js +2 -2
- package/dist/Quote/style.js +1 -1
- package/dist/Schema/SchemaEditor/AceEditorWrapper.js +1 -1
- package/dist/Schema/SchemaEditor/index.js +6 -6
- package/dist/Schema/SchemaEditor/style.js +1 -1
- package/dist/Schema/SchemaForm/index.js +4 -4
- package/dist/Schema/SchemaRenderer/index.js +8 -8
- package/dist/TaskList/index.js +4 -4
- package/dist/TaskList/style.js +1 -1
- package/dist/ThoughtChainList/CostMillis.js +2 -2
- package/dist/ThoughtChainList/DeepThink.js +1 -1
- package/dist/ThoughtChainList/DotAni/index.js +1 -1
- package/dist/ThoughtChainList/DotAni/style.js +1 -1
- package/dist/ThoughtChainList/MarkdownEditor.js +2 -2
- package/dist/ThoughtChainList/RagRetrievalInfo.js +2 -2
- package/dist/ThoughtChainList/TableSql.js +8 -8
- package/dist/ThoughtChainList/TitleInfo.js +3 -3
- package/dist/ThoughtChainList/ToolCall.js +7 -7
- package/dist/ThoughtChainList/WebSearch.js +1 -1
- package/dist/ThoughtChainList/style.js +1 -1
- package/dist/ToolUseBar/BarItem/Content.js +5 -5
- package/dist/ToolUseBar/BarItem/index.js +1 -1
- package/dist/ToolUseBar/index.js +1 -1
- package/dist/ToolUseBar/style.js +1 -1
- package/dist/ToolUseBarThink/index.js +10 -10
- package/dist/ToolUseBarThink/style.js +1 -1
- package/dist/Types/message.d.ts +1 -0
- package/dist/Utils/debugUtils.js +1 -1
- package/dist/Utils/formatTime.js +1 -1
- package/dist/Utils/getScroll.js +2 -2
- package/dist/Utils/loadCSS.js +2 -2
- package/dist/Utils/proxySandbox/ProxySandbox.js +37 -37
- package/dist/Utils/proxySandbox/SecurityContextManager.js +6 -6
- package/dist/Utils/scrollTo.js +1 -1
- package/dist/Utils/throttleByAnimationFrame.js +2 -2
- package/dist/WelcomeMessage/index.js +1 -1
- package/dist/WelcomeMessage/style.js +1 -1
- package/dist/Workspace/Browser/index.js +13 -13
- package/dist/Workspace/Browser/style.js +1 -1
- package/dist/Workspace/File/FileComponent.js +38 -38
- package/dist/Workspace/File/FileTypeProcessor.js +8 -8
- package/dist/Workspace/File/PreviewComponent.js +14 -14
- package/dist/Workspace/File/style.js +1 -1
- package/dist/Workspace/File/utils.js +3 -3
- package/dist/Workspace/HtmlPreview/index.js +5 -5
- package/dist/Workspace/HtmlPreview/style.js +1 -1
- package/dist/Workspace/RealtimeFollow/index.js +18 -18
- package/dist/Workspace/RealtimeFollow/style.js +1 -1
- package/dist/Workspace/Task/index.js +3 -3
- package/dist/Workspace/Task/style.js +1 -1
- package/dist/Workspace/index.js +9 -9
- package/dist/Workspace/style.js +1 -1
- package/dist/Workspace/types.js +3 -3
- package/dist/Workspace/utils/codeLanguageUtils.js +3 -3
- package/dist/Workspace/utils.js +2 -2
- package/package.json +4 -3
|
@@ -249,13 +249,13 @@ import { PreviewComponent } from "./PreviewComponent";
|
|
|
249
249
|
import { useFileStyle } from "./style";
|
|
250
250
|
import { generateUniqueId, getFileTypeIcon, getGroupIcon } from "./utils";
|
|
251
251
|
// 通用的键盘事件处理函数
|
|
252
|
-
var handleKeyboardEvent = function(e, callback) {
|
|
252
|
+
var handleKeyboardEvent = function handleKeyboardEvent(e, callback) {
|
|
253
253
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
254
254
|
callback(e);
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
257
|
// 通用的下载处理函数
|
|
258
|
-
var handleFileDownload = function(file) {
|
|
258
|
+
var handleFileDownload = function handleFileDownload(file) {
|
|
259
259
|
var blobUrl = null;
|
|
260
260
|
try {
|
|
261
261
|
// 创建下载链接
|
|
@@ -293,7 +293,7 @@ var handleFileDownload = function(file) {
|
|
|
293
293
|
}
|
|
294
294
|
};
|
|
295
295
|
// 通用的默认分享处理函数
|
|
296
|
-
var handleDefaultShare = function(file, locale) {
|
|
296
|
+
var handleDefaultShare = function handleDefaultShare(file, locale) {
|
|
297
297
|
return _async_to_generator(function() {
|
|
298
298
|
var shareUrl, error;
|
|
299
299
|
return _ts_generator(this, function(_state) {
|
|
@@ -348,16 +348,16 @@ var handleDefaultShare = function(file, locale) {
|
|
|
348
348
|
})();
|
|
349
349
|
};
|
|
350
350
|
// 确保节点有唯一ID的辅助函数
|
|
351
|
-
var ensureNodeWithId = function(node) {
|
|
351
|
+
var ensureNodeWithId = function ensureNodeWithId(node) {
|
|
352
352
|
return _object_spread_props(_object_spread({}, node), {
|
|
353
353
|
id: node.id || generateUniqueId(node)
|
|
354
354
|
});
|
|
355
355
|
};
|
|
356
356
|
// 获取文件预览源的辅助函数
|
|
357
|
-
var getPreviewSource = function(file) {
|
|
357
|
+
var getPreviewSource = function getPreviewSource(file) {
|
|
358
358
|
return file.previewUrl || file.url || '';
|
|
359
359
|
};
|
|
360
|
-
var AccessibleButton = function(param) {
|
|
360
|
+
var AccessibleButton = function AccessibleButton(param) {
|
|
361
361
|
var icon = param.icon, onClick = param.onClick, className = param.className, ariaLabel = param.ariaLabel, id = param.id;
|
|
362
362
|
return /*#__PURE__*/ React.createElement("div", {
|
|
363
363
|
id: id,
|
|
@@ -365,7 +365,7 @@ var AccessibleButton = function(param) {
|
|
|
365
365
|
onClick: onClick,
|
|
366
366
|
role: "button",
|
|
367
367
|
tabIndex: 0,
|
|
368
|
-
onKeyDown: function(e) {
|
|
368
|
+
onKeyDown: function onKeyDown(e) {
|
|
369
369
|
return handleKeyboardEvent(e, onClick);
|
|
370
370
|
},
|
|
371
371
|
"aria-label": ariaLabel
|
|
@@ -383,14 +383,14 @@ var SearchInput = /*#__PURE__*/ React.memo(function(param) {
|
|
|
383
383
|
placeholder: searchPlaceholder || (locale === null || locale === void 0 ? void 0 : locale['workspace.searchPlaceholder']) || '搜索文件名',
|
|
384
384
|
prefix: /*#__PURE__*/ React.createElement(Search, null),
|
|
385
385
|
value: keyword !== null && keyword !== void 0 ? keyword : '',
|
|
386
|
-
onChange: function(e) {
|
|
386
|
+
onChange: function onChange1(e) {
|
|
387
387
|
return onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
|
|
388
388
|
}
|
|
389
389
|
}));
|
|
390
390
|
});
|
|
391
391
|
SearchInput.displayName = 'SearchInput';
|
|
392
392
|
// 文件项组件
|
|
393
|
-
var FileItemComponent = function(param) {
|
|
393
|
+
var FileItemComponent = function FileItemComponent(param) {
|
|
394
394
|
var file = param.file, onClick = param.onClick, onDownload = param.onDownload, onPreview = param.onPreview, onShare = param.onShare, onLocate = param.onLocate, prefixCls = param.prefixCls, hashId = param.hashId, _param_bindDomId = param.bindDomId, bindDomId = _param_bindDomId === void 0 ? false : _param_bindDomId;
|
|
395
395
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
396
396
|
var locale = useContext(I18nContext).locale;
|
|
@@ -400,7 +400,7 @@ var FileItemComponent = function(param) {
|
|
|
400
400
|
var fileTypeInfo = fileTypeProcessor.inferFileType(fileWithId);
|
|
401
401
|
// 禁用状态
|
|
402
402
|
var isDisabled = fileWithId.disabled === true;
|
|
403
|
-
var handleClick = function() {
|
|
403
|
+
var handleClick = function handleClick() {
|
|
404
404
|
// 禁用状态下不响应点击
|
|
405
405
|
if (isDisabled) return;
|
|
406
406
|
// 如果有传入 onClick 事件,优先使用
|
|
@@ -420,7 +420,7 @@ var FileItemComponent = function(param) {
|
|
|
420
420
|
}
|
|
421
421
|
return Boolean(onDownload || fileWithId.url || fileWithId.content || fileWithId.file);
|
|
422
422
|
}();
|
|
423
|
-
var handleDownload = function(e) {
|
|
423
|
+
var handleDownload = function handleDownload(e) {
|
|
424
424
|
e.stopPropagation();
|
|
425
425
|
// 优先使用用户传入的下载方法
|
|
426
426
|
if (onDownload) {
|
|
@@ -429,11 +429,11 @@ var FileItemComponent = function(param) {
|
|
|
429
429
|
}
|
|
430
430
|
handleFileDownload(fileWithId);
|
|
431
431
|
};
|
|
432
|
-
var handlePreview = function(e) {
|
|
432
|
+
var handlePreview = function handlePreview(e) {
|
|
433
433
|
e.stopPropagation();
|
|
434
434
|
onPreview === null || onPreview === void 0 ? void 0 : onPreview(fileWithId);
|
|
435
435
|
};
|
|
436
|
-
var handleShare = function(e) {
|
|
436
|
+
var handleShare = function handleShare(e) {
|
|
437
437
|
e.stopPropagation();
|
|
438
438
|
// 如果有自定义的分享方法,优先使用
|
|
439
439
|
if (onShare) {
|
|
@@ -459,7 +459,7 @@ var FileItemComponent = function(param) {
|
|
|
459
459
|
}();
|
|
460
460
|
var showShareButton = fileWithId.canShare === true;
|
|
461
461
|
var showLocationButton = fileWithId.canLocate === true;
|
|
462
|
-
var handleLocate = function(e) {
|
|
462
|
+
var handleLocate = function handleLocate(e) {
|
|
463
463
|
e.stopPropagation();
|
|
464
464
|
onLocate === null || onLocate === void 0 ? void 0 : onLocate(fileWithId);
|
|
465
465
|
};
|
|
@@ -539,7 +539,7 @@ var FileItemComponent = function(param) {
|
|
|
539
539
|
className: classNames("".concat(finalPrefixCls, "-item-time"), hashId)
|
|
540
540
|
}, formatLastModified(fileWithId.lastModified)))))), /*#__PURE__*/ React.createElement("div", {
|
|
541
541
|
className: classNames("".concat(finalPrefixCls, "-item-actions"), hashId),
|
|
542
|
-
onClick: function(e) {
|
|
542
|
+
onClick: function onClick(e) {
|
|
543
543
|
return e.stopPropagation();
|
|
544
544
|
}
|
|
545
545
|
}, fileWithId.renderActions ? fileWithId.renderActions(renderContext) : !isDisabled ? /*#__PURE__*/ React.createElement(React.Fragment, null, builtinActions.preview, builtinActions.locate, builtinActions.share, builtinActions.download) : null)),
|
|
@@ -550,17 +550,17 @@ var FileItemComponent = function(param) {
|
|
|
550
550
|
});
|
|
551
551
|
};
|
|
552
552
|
// 分组标题栏组件
|
|
553
|
-
var GroupHeader = function(param) {
|
|
553
|
+
var GroupHeader = function GroupHeader(param) {
|
|
554
554
|
var group = param.group, onToggle = param.onToggle, onGroupDownload = param.onGroupDownload, prefixCls = param.prefixCls, hashId = param.hashId;
|
|
555
555
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
556
556
|
var locale = useContext(I18nContext).locale;
|
|
557
557
|
var finalPrefixCls = prefixCls || getPrefixCls('workspace-file');
|
|
558
558
|
var groupTypeInfo = fileTypeProcessor.inferFileType(group);
|
|
559
559
|
var groupType = group.type || groupTypeInfo.fileType;
|
|
560
|
-
var handleToggle = function() {
|
|
560
|
+
var handleToggle = function handleToggle() {
|
|
561
561
|
onToggle === null || onToggle === void 0 ? void 0 : onToggle(group.id, groupType, !group.collapsed);
|
|
562
562
|
};
|
|
563
|
-
var handleDownload = function(e) {
|
|
563
|
+
var handleDownload = function handleDownload(e) {
|
|
564
564
|
e.stopPropagation();
|
|
565
565
|
onGroupDownload === null || onGroupDownload === void 0 ? void 0 : onGroupDownload(group.children, groupType);
|
|
566
566
|
};
|
|
@@ -607,7 +607,7 @@ var GroupHeader = function(param) {
|
|
|
607
607
|
});
|
|
608
608
|
};
|
|
609
609
|
// 文件分组组件
|
|
610
|
-
var FileGroupComponent = function(param) {
|
|
610
|
+
var FileGroupComponent = function FileGroupComponent(param) {
|
|
611
611
|
var group = param.group, onToggle = param.onToggle, onGroupDownload = param.onGroupDownload, onDownload = param.onDownload, onFileClick = param.onFileClick, onPreview = param.onPreview, onShare = param.onShare, onLocate = param.onLocate, prefixCls = param.prefixCls, hashId = param.hashId, bindDomId = param.bindDomId;
|
|
612
612
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
613
613
|
var finalPrefixCls = prefixCls || getPrefixCls('workspace-file');
|
|
@@ -673,7 +673,7 @@ var FileGroupComponent = function(param) {
|
|
|
673
673
|
});
|
|
674
674
|
}))));
|
|
675
675
|
};
|
|
676
|
-
export var FileComponent = function(param) {
|
|
676
|
+
export var FileComponent = function FileComponent(param) {
|
|
677
677
|
var nodes = param.nodes, onGroupDownload = param.onGroupDownload, onDownload = param.onDownload, onShare = param.onShare, onFileClick = param.onFileClick, onLocate = param.onLocate, onToggleGroup = param.onToggleGroup, onGroupToggle = param.onGroupToggle, onPreview = param.onPreview, onBack = param.onBack, resetKey = param.resetKey, markdownEditorProps = param.markdownEditorProps, customActions = param.customActions, actionRef = param.actionRef, loading = param.loading, loadingRender = param.loadingRender, emptyRender = param.emptyRender, keyword = param.keyword, onChange = param.onChange, _param_showSearch = param.showSearch, showSearch = _param_showSearch === void 0 ? false : _param_showSearch, searchPlaceholder = param.searchPlaceholder, _param_bindDomId = param.bindDomId, bindDomId = _param_bindDomId === void 0 ? false : _param_bindDomId;
|
|
678
678
|
var _useState = _sliced_to_array(useState(null), 2), previewFile = _useState[0], setPreviewFile = _useState[1];
|
|
679
679
|
var _useState1 = _sliced_to_array(useState(null), 2), customPreviewContent = _useState1[0], setCustomPreviewContent = _useState1[1];
|
|
@@ -697,7 +697,7 @@ export var FileComponent = function(param) {
|
|
|
697
697
|
var prefixCls = getPrefixCls('workspace-file');
|
|
698
698
|
var _useFileStyle = useFileStyle(prefixCls), wrapSSR = _useFileStyle.wrapSSR, hashId = _useFileStyle.hashId;
|
|
699
699
|
// 确保节点有稳定的唯一 ID(使用缓存)
|
|
700
|
-
var ensureNodeWithStableId = function(node) {
|
|
700
|
+
var ensureNodeWithStableId = function ensureNodeWithStableId(node) {
|
|
701
701
|
if (node.id) return _object_spread({}, node);
|
|
702
702
|
// 尝试从缓存获取 ID
|
|
703
703
|
var cachedId = nodeIdCacheRef.current.get(node);
|
|
@@ -711,7 +711,7 @@ export var FileComponent = function(param) {
|
|
|
711
711
|
});
|
|
712
712
|
};
|
|
713
713
|
// 返回列表(供预览页调用)
|
|
714
|
-
var handleBackToList = function() {
|
|
714
|
+
var handleBackToList = function handleBackToList() {
|
|
715
715
|
// 使进行中的预览请求失效
|
|
716
716
|
previewRequestIdRef.current++;
|
|
717
717
|
setPreviewFile(null);
|
|
@@ -732,7 +732,7 @@ export var FileComponent = function(param) {
|
|
|
732
732
|
useEffect(function() {
|
|
733
733
|
if (!previewFile) return;
|
|
734
734
|
// 在所有节点中查找与当前预览文件匹配的文件
|
|
735
|
-
var findUpdatedFile = function(nodesList) {
|
|
735
|
+
var findUpdatedFile = function findUpdatedFile1(nodesList) {
|
|
736
736
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
737
737
|
try {
|
|
738
738
|
for(var _iterator = nodesList[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -773,7 +773,7 @@ export var FileComponent = function(param) {
|
|
|
773
773
|
nodes
|
|
774
774
|
]);
|
|
775
775
|
// 处理分组折叠/展开
|
|
776
|
-
var handleToggleGroup = function(groupId, type, collapsed) {
|
|
776
|
+
var handleToggleGroup = function handleToggleGroup(groupId, type, collapsed) {
|
|
777
777
|
// 更新内部状态,使用 groupId 作为 key
|
|
778
778
|
setCollapsedGroups(function(prev) {
|
|
779
779
|
return _object_spread_props(_object_spread({}, prev), _define_property({}, groupId, collapsed));
|
|
@@ -786,7 +786,7 @@ export var FileComponent = function(param) {
|
|
|
786
786
|
}
|
|
787
787
|
};
|
|
788
788
|
// 包装后的返回逻辑,允许外部拦截
|
|
789
|
-
var handleBack = function() {
|
|
789
|
+
var handleBack = function handleBack() {
|
|
790
790
|
return _async_to_generator(function() {
|
|
791
791
|
var result, _;
|
|
792
792
|
return _ts_generator(this, function(_state) {
|
|
@@ -833,7 +833,7 @@ export var FileComponent = function(param) {
|
|
|
833
833
|
})();
|
|
834
834
|
};
|
|
835
835
|
// 预览页面的下载(供预览页调用)
|
|
836
|
-
var handleDownloadInPreview = function(file) {
|
|
836
|
+
var handleDownloadInPreview = function handleDownloadInPreview(file) {
|
|
837
837
|
// 优先使用用户传入的下载方法
|
|
838
838
|
if (onDownload) {
|
|
839
839
|
onDownload(file);
|
|
@@ -842,7 +842,7 @@ export var FileComponent = function(param) {
|
|
|
842
842
|
handleFileDownload(file);
|
|
843
843
|
};
|
|
844
844
|
// 预览文件处理
|
|
845
|
-
var handlePreview = function(file) {
|
|
845
|
+
var handlePreview = function handlePreview(file) {
|
|
846
846
|
return _async_to_generator(function() {
|
|
847
847
|
var currentCallId, previewData, content, err, previewSrc;
|
|
848
848
|
return _ts_generator(this, function(_state) {
|
|
@@ -885,14 +885,14 @@ export var FileComponent = function(param) {
|
|
|
885
885
|
if (/*#__PURE__*/ React.isValidElement(previewData) || typeof previewData === 'string' || typeof previewData === 'number' || typeof previewData === 'boolean') {
|
|
886
886
|
setPreviewFile(file);
|
|
887
887
|
content = /*#__PURE__*/ React.isValidElement(previewData) ? /*#__PURE__*/ React.cloneElement(previewData, {
|
|
888
|
-
setPreviewHeader: function(header) {
|
|
888
|
+
setPreviewHeader: function setPreviewHeader(header) {
|
|
889
889
|
return setCustomPreviewHeader(header);
|
|
890
890
|
},
|
|
891
891
|
back: handleBackToList,
|
|
892
|
-
download: function() {
|
|
892
|
+
download: function download() {
|
|
893
893
|
return handleDownloadInPreview(file);
|
|
894
894
|
},
|
|
895
|
-
share: function() {
|
|
895
|
+
share: function share() {
|
|
896
896
|
if (onShare) {
|
|
897
897
|
// 为保持回调参数签名一致,显式传入第二个参数为 undefined
|
|
898
898
|
onShare(file, undefined);
|
|
@@ -957,14 +957,14 @@ export var FileComponent = function(param) {
|
|
|
957
957
|
React.useEffect(function() {
|
|
958
958
|
if (!actionRef) return;
|
|
959
959
|
actionRef.current = {
|
|
960
|
-
openPreview: function(file) {
|
|
960
|
+
openPreview: function openPreview(file) {
|
|
961
961
|
var fileWithId = ensureNodeWithStableId(file);
|
|
962
962
|
void handlePreview(fileWithId);
|
|
963
963
|
},
|
|
964
|
-
backToList: function() {
|
|
964
|
+
backToList: function backToList() {
|
|
965
965
|
handleBackToList();
|
|
966
966
|
},
|
|
967
|
-
updatePreviewHeader: function(partial) {
|
|
967
|
+
updatePreviewHeader: function updatePreviewHeader(partial) {
|
|
968
968
|
setHeaderFileOverride(function(prev) {
|
|
969
969
|
return _object_spread({}, prev || {}, partial);
|
|
970
970
|
});
|
|
@@ -980,7 +980,7 @@ export var FileComponent = function(param) {
|
|
|
980
980
|
]);
|
|
981
981
|
var hasKeyword = Boolean((keyword !== null && keyword !== void 0 ? keyword : '').trim());
|
|
982
982
|
// 渲染搜索框组件 - 确保在所有情况下都保持一致
|
|
983
|
-
var renderSearchInput = function() {
|
|
983
|
+
var renderSearchInput = function renderSearchInput() {
|
|
984
984
|
if (!showSearch) return null;
|
|
985
985
|
return /*#__PURE__*/ React.createElement(SearchInput, {
|
|
986
986
|
keyword: keyword,
|
|
@@ -992,7 +992,7 @@ export var FileComponent = function(param) {
|
|
|
992
992
|
});
|
|
993
993
|
};
|
|
994
994
|
// 渲染空状态内容
|
|
995
|
-
var renderEmptyContent = function() {
|
|
995
|
+
var renderEmptyContent = function renderEmptyContent() {
|
|
996
996
|
if (hasKeyword) {
|
|
997
997
|
return /*#__PURE__*/ React.createElement(Typography.Text, {
|
|
998
998
|
type: "secondary"
|
|
@@ -1011,7 +1011,7 @@ export var FileComponent = function(param) {
|
|
|
1011
1011
|
src: imagePreview.src,
|
|
1012
1012
|
preview: {
|
|
1013
1013
|
visible: imagePreview.visible,
|
|
1014
|
-
onVisibleChange: function(visible) {
|
|
1014
|
+
onVisibleChange: function onVisibleChange(visible) {
|
|
1015
1015
|
setImagePreview(function(prev) {
|
|
1016
1016
|
return _object_spread_props(_object_spread({}, prev), {
|
|
1017
1017
|
visible: visible
|
|
@@ -1026,7 +1026,7 @@ export var FileComponent = function(param) {
|
|
|
1026
1026
|
file: previewFile,
|
|
1027
1027
|
onBack: handleBack,
|
|
1028
1028
|
onDownload: handleDownloadInPreview,
|
|
1029
|
-
onShare: function(file, options) {
|
|
1029
|
+
onShare: function onShare1(file, options) {
|
|
1030
1030
|
if (onShare) {
|
|
1031
1031
|
onShare(file, {
|
|
1032
1032
|
anchorEl: options === null || options === void 0 ? void 0 : options.anchorEl,
|
|
@@ -1045,7 +1045,7 @@ export var FileComponent = function(param) {
|
|
|
1045
1045
|
}), ImagePreviewComponent);
|
|
1046
1046
|
}
|
|
1047
1047
|
// 渲染文件内容
|
|
1048
|
-
var renderFileContent = function() {
|
|
1048
|
+
var renderFileContent = function renderFileContent() {
|
|
1049
1049
|
if ((!nodes || nodes.length === 0) && !loading) {
|
|
1050
1050
|
return /*#__PURE__*/ React.createElement("div", {
|
|
1051
1051
|
className: classNames("".concat(prefixCls, "-empty"), hashId)
|
|
@@ -323,30 +323,30 @@ import { PreviewCapability, dataSourceManager } from "./DataSourceStrategy";
|
|
|
323
323
|
* 全局文件类型处理器实例
|
|
324
324
|
*/ export var fileTypeProcessor = new FileTypeProcessor(dataSourceManager);
|
|
325
325
|
var DEFAULT_MIME_TYPE = 'application/octet-stream';
|
|
326
|
-
var isFileCategory = function(file, category) {
|
|
326
|
+
var isFileCategory = function isFileCategory(file, category) {
|
|
327
327
|
return fileTypeProcessor.inferFileType(file).category === category;
|
|
328
328
|
};
|
|
329
329
|
/**
|
|
330
330
|
* 文件类型判断便捷函数
|
|
331
|
-
*/ export var isImageFile = function(file) {
|
|
331
|
+
*/ export var isImageFile = function isImageFile(file) {
|
|
332
332
|
return isFileCategory(file, FileCategory.Image);
|
|
333
333
|
};
|
|
334
|
-
export var isVideoFile = function(file) {
|
|
334
|
+
export var isVideoFile = function isVideoFile(file) {
|
|
335
335
|
return isFileCategory(file, FileCategory.Video);
|
|
336
336
|
};
|
|
337
|
-
export var isPdfFile = function(file) {
|
|
337
|
+
export var isPdfFile = function isPdfFile(file) {
|
|
338
338
|
return isFileCategory(file, FileCategory.PDF);
|
|
339
339
|
};
|
|
340
|
-
export var isTextFile = function(file) {
|
|
340
|
+
export var isTextFile = function isTextFile(file) {
|
|
341
341
|
return isFileCategory(file, FileCategory.Text);
|
|
342
342
|
};
|
|
343
|
-
export var isArchiveFile = function(file) {
|
|
343
|
+
export var isArchiveFile = function isArchiveFile(file) {
|
|
344
344
|
return isFileCategory(file, FileCategory.Archive);
|
|
345
345
|
};
|
|
346
|
-
export var isAudioFile = function(file) {
|
|
346
|
+
export var isAudioFile = function isAudioFile(file) {
|
|
347
347
|
return isFileCategory(file, FileCategory.Audio);
|
|
348
348
|
};
|
|
349
|
-
export var getMimeType = function(file) {
|
|
349
|
+
export var getMimeType = function getMimeType(file) {
|
|
350
350
|
var result = fileTypeProcessor.processFile(file);
|
|
351
351
|
return result.dataSource.mimeType || DEFAULT_MIME_TYPE;
|
|
352
352
|
};
|
|
@@ -99,7 +99,7 @@ var HTML_EXTENSIONS = [
|
|
|
99
99
|
'.htm'
|
|
100
100
|
];
|
|
101
101
|
var EDITOR_PADDING = '0 12px';
|
|
102
|
-
var isHtmlFile = function(fileName, mimeType) {
|
|
102
|
+
var isHtmlFile = function isHtmlFile(fileName, mimeType) {
|
|
103
103
|
var name = (fileName === null || fileName === void 0 ? void 0 : fileName.toLowerCase()) || '';
|
|
104
104
|
var byExtension = HTML_EXTENSIONS.some(function(ext) {
|
|
105
105
|
return name.endsWith(ext);
|
|
@@ -107,11 +107,11 @@ var isHtmlFile = function(fileName, mimeType) {
|
|
|
107
107
|
var byMimeType = mimeType === HTML_MIME_TYPE;
|
|
108
108
|
return byExtension || byMimeType;
|
|
109
109
|
};
|
|
110
|
-
var getContentStatus = function(state) {
|
|
110
|
+
var getContentStatus = function getContentStatus(state) {
|
|
111
111
|
if ('error' in state) return 'error';
|
|
112
112
|
return state.status === 'loading' ? 'loading' : 'done';
|
|
113
113
|
};
|
|
114
|
-
var buildMarkdownContent = function(raw, category, fileName) {
|
|
114
|
+
var buildMarkdownContent = function buildMarkdownContent(raw, category, fileName) {
|
|
115
115
|
if (category === 'code') {
|
|
116
116
|
var language = getLanguageFromFilename(fileName);
|
|
117
117
|
return wrapContentInCodeBlock(raw, language);
|
|
@@ -119,7 +119,7 @@ var buildMarkdownContent = function(raw, category, fileName) {
|
|
|
119
119
|
return raw;
|
|
120
120
|
};
|
|
121
121
|
// 占位符组件
|
|
122
|
-
var PlaceholderContent = function(param) {
|
|
122
|
+
var PlaceholderContent = function PlaceholderContent(param) {
|
|
123
123
|
var children = param.children, showFileInfo = param.showFileInfo, file = param.file, onDownload = param.onDownload, locale = param.locale, prefixCls = param.prefixCls, hashId = param.hashId;
|
|
124
124
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
125
125
|
var finalPrefixCls = prefixCls || getPrefixCls('workspace-preview');
|
|
@@ -136,7 +136,7 @@ var PlaceholderContent = function(param) {
|
|
|
136
136
|
};
|
|
137
137
|
/**
|
|
138
138
|
* 文件预览组件
|
|
139
|
-
*/ export var PreviewComponent = function(param) {
|
|
139
|
+
*/ export var PreviewComponent = function PreviewComponent(param) {
|
|
140
140
|
var file = param.file, customContent = param.customContent, customHeader = param.customHeader, customActions = param.customActions, onBack = param.onBack, onDownload = param.onDownload, onShare = param.onShare, onLocate = param.onLocate, markdownEditorProps = param.markdownEditorProps, headerFileOverride = param.headerFileOverride;
|
|
141
141
|
var _ref, _ref1;
|
|
142
142
|
var locale = useContext(I18nContext).locale;
|
|
@@ -153,17 +153,17 @@ var PlaceholderContent = function(param) {
|
|
|
153
153
|
}), 2), contentState = _useState1[0], setContentState = _useState1[1];
|
|
154
154
|
var _useState2 = _sliced_to_array(useState('preview'), 2), htmlViewMode = _useState2[0], setHtmlViewMode = _useState2[1];
|
|
155
155
|
var canDownload = file.canDownload !== false;
|
|
156
|
-
var handleDownload = function() {
|
|
156
|
+
var handleDownload = function handleDownload() {
|
|
157
157
|
if (!canDownload) return;
|
|
158
158
|
onDownload === null || onDownload === void 0 ? void 0 : onDownload(file);
|
|
159
159
|
};
|
|
160
|
-
var handleShare = function(e) {
|
|
160
|
+
var handleShare = function handleShare(e) {
|
|
161
161
|
onShare === null || onShare === void 0 ? void 0 : onShare(file, {
|
|
162
162
|
anchorEl: e.currentTarget,
|
|
163
163
|
origin: 'preview'
|
|
164
164
|
});
|
|
165
165
|
};
|
|
166
|
-
var handleLocate = function() {
|
|
166
|
+
var handleLocate = function handleLocate() {
|
|
167
167
|
onLocate === null || onLocate === void 0 ? void 0 : onLocate(file);
|
|
168
168
|
};
|
|
169
169
|
useEffect(function() {
|
|
@@ -186,7 +186,7 @@ var PlaceholderContent = function(param) {
|
|
|
186
186
|
var typeInference = processResult.typeInference, dataSource = processResult.dataSource;
|
|
187
187
|
var isTextOrCode = typeInference.category === 'text' || typeInference.category === 'code';
|
|
188
188
|
if (!isTextOrCode) return;
|
|
189
|
-
var setReadyContent = function(raw) {
|
|
189
|
+
var setReadyContent = function setReadyContent(raw) {
|
|
190
190
|
setContentState({
|
|
191
191
|
status: 'ready',
|
|
192
192
|
mdContent: buildMarkdownContent(raw, typeInference.category, file.name),
|
|
@@ -247,7 +247,7 @@ var PlaceholderContent = function(param) {
|
|
|
247
247
|
file.name
|
|
248
248
|
]);
|
|
249
249
|
var isCurrentFileHtml = isHtmlFile(file.name, processResult === null || processResult === void 0 ? void 0 : processResult.dataSource.mimeType);
|
|
250
|
-
var renderPreviewContent = function() {
|
|
250
|
+
var renderPreviewContent = function renderPreviewContent() {
|
|
251
251
|
if (file.loading) {
|
|
252
252
|
var _file_content;
|
|
253
253
|
return /*#__PURE__*/ React.createElement("div", {
|
|
@@ -334,7 +334,7 @@ var PlaceholderContent = function(param) {
|
|
|
334
334
|
"aria-label": (locale === null || locale === void 0 ? void 0 : locale['workspace.file.download']) || '下载'
|
|
335
335
|
}, "下载"))));
|
|
336
336
|
}
|
|
337
|
-
var renderTextOrCode = function() {
|
|
337
|
+
var renderTextOrCode = function renderTextOrCode() {
|
|
338
338
|
if (isCurrentFileHtml) {
|
|
339
339
|
var htmlStatus = getContentStatus(contentState);
|
|
340
340
|
return /*#__PURE__*/ React.createElement("div", {
|
|
@@ -370,7 +370,7 @@ var PlaceholderContent = function(param) {
|
|
|
370
370
|
}
|
|
371
371
|
}, markdownEditorProps)));
|
|
372
372
|
};
|
|
373
|
-
var getPreviewErrorMessage = function(category) {
|
|
373
|
+
var getPreviewErrorMessage = function getPreviewErrorMessage(category) {
|
|
374
374
|
var messages = {
|
|
375
375
|
image: (locale === null || locale === void 0 ? void 0 : locale['workspace.file.cannotGetImagePreview']) || '无法获取图片预览',
|
|
376
376
|
video: (locale === null || locale === void 0 ? void 0 : locale['workspace.file.cannotGetVideoPreview']) || '无法获取视频预览',
|
|
@@ -379,7 +379,7 @@ var PlaceholderContent = function(param) {
|
|
|
379
379
|
};
|
|
380
380
|
return messages[category] || "无法获取".concat(category, "预览");
|
|
381
381
|
};
|
|
382
|
-
var renderMediaPreview = function(category) {
|
|
382
|
+
var renderMediaPreview = function renderMediaPreview(category) {
|
|
383
383
|
if (!dataSource.previewUrl) {
|
|
384
384
|
return /*#__PURE__*/ React.createElement(PlaceholderContent, {
|
|
385
385
|
locale: locale,
|
|
@@ -482,7 +482,7 @@ var PlaceholderContent = function(param) {
|
|
|
482
482
|
}
|
|
483
483
|
],
|
|
484
484
|
value: htmlViewMode,
|
|
485
|
-
onChange: function(val) {
|
|
485
|
+
onChange: function onChange(val) {
|
|
486
486
|
return setHtmlViewMode(val);
|
|
487
487
|
}
|
|
488
488
|
}), customActions && /*#__PURE__*/ React.createElement("div", {
|
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { useEditorStyleRegister } from "../../Hooks/useStyle";
|
|
54
|
-
var genStyle = function(token) {
|
|
54
|
+
var genStyle = function genStyle(token) {
|
|
55
55
|
var _obj, _obj1, _obj2, _obj3, _obj4, _obj5, _obj6;
|
|
56
56
|
return _obj6 = {
|
|
57
57
|
// 定位高亮动画关键帧
|
|
@@ -85,7 +85,7 @@ var _obj;
|
|
|
85
85
|
var TYPE_ICON_MAP = (_obj = {}, _define_property(_obj, FileCategory.Text, /*#__PURE__*/ React.createElement(FileMarkdown, null)), _define_property(_obj, FileCategory.Code, /*#__PURE__*/ React.createElement(FileXml, null)), _define_property(_obj, FileCategory.PDF, /*#__PURE__*/ React.createElement(FilePdf, null)), _define_property(_obj, FileCategory.Word, /*#__PURE__*/ React.createElement(FileDoc, null)), _define_property(_obj, FileCategory.Excel, /*#__PURE__*/ React.createElement(FileXlsx, null)), _define_property(_obj, FileCategory.Image, /*#__PURE__*/ React.createElement(FilePic, null)), _define_property(_obj, FileCategory.Video, /*#__PURE__*/ React.createElement(FileVideo, null)), _define_property(_obj, FileCategory.Audio, /*#__PURE__*/ React.createElement(FileAudio, null)), _define_property(_obj, FileCategory.Archive, /*#__PURE__*/ React.createElement(FileZip, null)), _define_property(_obj, FileCategory.Other, /*#__PURE__*/ React.createElement(FileOther, null)), _obj);
|
|
86
86
|
/**
|
|
87
87
|
* 获取文件类型图标
|
|
88
|
-
*/ export var getFileTypeIcon = function(type, customIcon, fileName) {
|
|
88
|
+
*/ export var getFileTypeIcon = function getFileTypeIcon(type, customIcon, fileName) {
|
|
89
89
|
if (customIcon) {
|
|
90
90
|
return customIcon;
|
|
91
91
|
}
|
|
@@ -104,7 +104,7 @@ var TYPE_ICON_MAP = (_obj = {}, _define_property(_obj, FileCategory.Text, /*#__P
|
|
|
104
104
|
};
|
|
105
105
|
/**
|
|
106
106
|
* 获取分组图标 - 如果分组中有不同类型的文件,显示文件夹图标
|
|
107
|
-
*/ export var getGroupIcon = function(group, groupType, customIcon) {
|
|
107
|
+
*/ export var getGroupIcon = function getGroupIcon(group, groupType, customIcon) {
|
|
108
108
|
if (customIcon) {
|
|
109
109
|
return customIcon;
|
|
110
110
|
}
|
|
@@ -161,7 +161,7 @@ var TYPE_ICON_MAP = (_obj = {}, _define_property(_obj, FileCategory.Text, /*#__P
|
|
|
161
161
|
return getFileTypeIcon(groupType);
|
|
162
162
|
};
|
|
163
163
|
// 生成唯一ID的工具函数
|
|
164
|
-
export var generateUniqueId = function(node) {
|
|
164
|
+
export var generateUniqueId = function generateUniqueId(node) {
|
|
165
165
|
if (node.id) return node.id;
|
|
166
166
|
// 使用文件名、类型和时间戳组合生成唯一ID
|
|
167
167
|
var timestamp = Date.now();
|
|
@@ -149,14 +149,14 @@ import { useHtmlPreviewStyle } from "./style";
|
|
|
149
149
|
* - 支持自定义渲染内容
|
|
150
150
|
* - 响应式布局设计
|
|
151
151
|
* - 支持受控和非受控模式
|
|
152
|
-
*/ export var HtmlPreview = function(props) {
|
|
152
|
+
*/ export var HtmlPreview = function HtmlPreview(props) {
|
|
153
153
|
var html = props.html, inputStatus = props.status, viewMode = props.viewMode, _props_defaultViewMode = props.defaultViewMode, defaultViewMode = _props_defaultViewMode === void 0 ? 'preview' : _props_defaultViewMode, onViewModeChange = props.onViewModeChange, markdownEditorProps = props.markdownEditorProps, iframeProps = props.iframeProps, labels = props.labels, loadingRender = props.loadingRender, errorRender = props.errorRender, className = props.className, style = props.style, _props_showSegmented = props.showSegmented, showSegmented = _props_showSegmented === void 0 ? true : _props_showSegmented, segmentedItems = props.segmentedItems, emptyRender = props.emptyRender;
|
|
154
154
|
var status = inputStatus === 'generating' ? 'loading' : inputStatus;
|
|
155
155
|
var isControlled = viewMode !== undefined;
|
|
156
156
|
var _useState = _sliced_to_array(useState(defaultViewMode), 2), innerMode = _useState[0], setInnerMode = _useState[1];
|
|
157
157
|
var mode = isControlled ? viewMode : innerMode;
|
|
158
158
|
var locale = useContext(I18nContext).locale;
|
|
159
|
-
var handleModeChange = function(m) {
|
|
159
|
+
var handleModeChange = function handleModeChange(m) {
|
|
160
160
|
if (!isControlled) setInnerMode(m);
|
|
161
161
|
onViewModeChange === null || onViewModeChange === void 0 ? void 0 : onViewModeChange(m);
|
|
162
162
|
};
|
|
@@ -182,7 +182,7 @@ import { useHtmlPreviewStyle } from "./style";
|
|
|
182
182
|
className: classNames("".concat(prefixCls, "-overlay"), (_obj = {}, _define_property(_obj, "".concat(prefixCls, "-overlay--loading"), status === 'loading'), _define_property(_obj, "".concat(prefixCls, "-overlay--error"), status === 'error'), _obj))
|
|
183
183
|
}, status === 'loading' ? loadingNode || /*#__PURE__*/ React.createElement(Spin, null) : errorNode || /*#__PURE__*/ React.createElement("span", null, (locale === null || locale === void 0 ? void 0 : locale['htmlPreview.renderFailed']) || '页面渲染失败'));
|
|
184
184
|
}();
|
|
185
|
-
var getMergedMdConfig = function() {
|
|
185
|
+
var getMergedMdConfig = function getMergedMdConfig() {
|
|
186
186
|
var defaultMdConfig = {
|
|
187
187
|
width: '100%',
|
|
188
188
|
height: '100%',
|
|
@@ -211,7 +211,7 @@ import { useHtmlPreviewStyle } from "./style";
|
|
|
211
211
|
}, segmentedItems && segmentedItems.length > 0 ? /*#__PURE__*/ React.createElement(Segmented, {
|
|
212
212
|
options: segmentedItems,
|
|
213
213
|
value: mode,
|
|
214
|
-
onChange: function(v) {
|
|
214
|
+
onChange: function onChange(v) {
|
|
215
215
|
return handleModeChange(String(v));
|
|
216
216
|
}
|
|
217
217
|
}) : /*#__PURE__*/ React.createElement(Segmented, {
|
|
@@ -227,7 +227,7 @@ import { useHtmlPreviewStyle } from "./style";
|
|
|
227
227
|
}
|
|
228
228
|
],
|
|
229
229
|
value: mode,
|
|
230
|
-
onChange: function(v) {
|
|
230
|
+
onChange: function onChange(v) {
|
|
231
231
|
return handleModeChange(v);
|
|
232
232
|
}
|
|
233
233
|
})), /*#__PURE__*/ React.createElement("div", {
|
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { useEditorStyleRegister } from "../../Hooks/useStyle";
|
|
54
|
-
var genStyle = function(token) {
|
|
54
|
+
var genStyle = function genStyle(token) {
|
|
55
55
|
var _obj, _obj1;
|
|
56
56
|
return _define_property({}, "".concat(token.componentCls), (_obj1 = {
|
|
57
57
|
display: 'flex',
|