@ant-design/agentic-ui 2.0.10 → 2.0.13
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/AgentRunBar/Robot.js +1 -1
- package/dist/AgentRunBar/index.js +1 -1
- package/dist/AgentRunBar/style.js +1 -1
- package/dist/AgenticLayout/index.d.ts +1 -1
- package/dist/AgenticLayout/index.js +1 -1
- package/dist/AgenticLayout/style.js +1 -1
- package/dist/AnswerAlert/style.js +1 -1
- package/dist/BackTo/BackBottom.js +2 -2
- package/dist/BackTo/BackTop.d.ts +14 -4
- package/dist/BackTo/BackTop.js +16 -14
- package/dist/BackTo/ScrollVisibleButton.d.ts +25 -10
- package/dist/BackTo/ScrollVisibleButton.js +27 -21
- package/dist/BackTo/hooks/useScrollVisible.js +2 -2
- package/dist/BackTo/style.js +1 -1
- package/dist/Bubble/AIBubble.d.ts +5 -28
- package/dist/Bubble/AIBubble.js +96 -126
- package/dist/Bubble/BubbleBeforeNode.d.ts +29 -0
- package/dist/Bubble/BubbleBeforeNode.js +80 -0
- package/dist/Bubble/BubbleConfigProvide.d.ts +1 -1
- package/dist/Bubble/BubbleConfigProvide.js +1 -1
- package/dist/Bubble/FileView.d.ts +10 -15
- package/dist/Bubble/FileView.js +63 -68
- package/dist/Bubble/List/style.js +1 -1
- package/dist/Bubble/MessagesContent/BubbleExtra.js +2 -2
- package/dist/Bubble/MessagesContent/CopyButton/index.d.ts +1 -1
- package/dist/Bubble/MessagesContent/CopyButton/index.js +2 -2
- package/dist/Bubble/MessagesContent/DocInfo.js +2 -2
- package/dist/Bubble/MessagesContent/VoiceButton/index.js +3 -3
- package/dist/Bubble/MessagesContent/VoiceButton/style.js +1 -1
- package/dist/Bubble/MessagesContent/docInfoStyle.js +1 -1
- package/dist/Bubble/MessagesContent/index.js +2 -2
- package/dist/Bubble/Title.d.ts +12 -35
- package/dist/Bubble/Title.js +18 -13
- package/dist/Bubble/UserBubble.d.ts +4 -27
- package/dist/Bubble/UserBubble.js +90 -110
- package/dist/Bubble/style.js +1 -1
- package/dist/ChatBoot/ButtonTabGroupStyle.js +1 -1
- package/dist/ChatBoot/ButtonTabStyle.js +1 -1
- package/dist/ChatBoot/CaseReplyStyle.js +1 -1
- package/dist/ChatBoot/style.js +1 -1
- package/dist/ChatLayout/index.d.ts +2 -2
- package/dist/ChatLayout/index.js +3 -3
- package/dist/ChatLayout/style.js +1 -1
- package/dist/ChatLayout/types.d.ts +1 -1
- package/dist/Components/ActionIconBox/index.js +157 -0
- package/dist/Components/ActionIconBox/style.js +117 -0
- package/dist/Components/ActionItemBox/ActionItemBox.js +162 -0
- package/dist/Components/ActionItemBox/index.js +7 -0
- package/dist/Components/ActionItemBox/style.js +373 -0
- package/dist/Components/Button/IconButton/index.js +46 -0
- package/dist/Components/Button/IconButton/style.js +355 -0
- package/dist/Components/Button/SwitchButton/index.js +99 -0
- package/dist/Components/Button/SwitchButton/style.js +158 -0
- package/dist/Components/Button/ToggleButton/index.js +63 -0
- package/dist/Components/Button/ToggleButton/style.js +277 -0
- package/dist/Components/Button/index.js +4 -0
- package/dist/Components/ImageList.js +138 -0
- package/dist/Components/LayoutHeader/index.js +94 -0
- package/dist/Components/LayoutHeader/style.js +70 -0
- package/dist/Components/Loading/index.d.ts +25 -0
- package/dist/Components/Loading/index.js +184 -0
- package/dist/Components/Loading/style.js +46 -0
- package/dist/Components/Robot/index.js +66 -0
- package/dist/Components/Robot/lotties/DazingLottie/index.js +52 -0
- package/dist/Components/Robot/lotties/ThinkingLottie/index.js +52 -0
- package/dist/Components/Robot/lotties/index.js +3 -0
- package/dist/Components/SuggestionList/index.js +195 -0
- package/dist/Components/SuggestionList/style.js +196 -0
- package/dist/Components/VisualList/index.js +188 -0
- package/dist/Components/VisualList/style.js +138 -0
- package/dist/Components/icons/LoadingSpinnerIcon.d.ts +38 -0
- package/dist/Components/icons/LoadingSpinnerIcon.js +83 -0
- package/dist/Components/lotties/DazingLottie/index.js +52 -0
- package/dist/Components/lotties/ThinkingLottie/index.js +52 -0
- package/dist/Components/lotties/index.js +3 -0
- package/dist/Constants/colors.js +98 -0
- package/dist/History/components/HistoryActionsBox.js +1 -1
- package/dist/History/components/HistoryItem.js +1 -1
- package/dist/History/components/LoadMoreComponent.js +2 -2
- package/dist/History/components/NewChatComponent.js +1 -1
- package/dist/History/components/NewChatComponent.style.js +1 -1
- package/dist/History/components/SearchComponent.js +4 -4
- package/dist/History/index.js +1 -1
- package/dist/History/style.js +1 -1
- package/dist/Hooks/useAutoScroll.js +90 -0
- package/dist/Hooks/useClickAway.js +23 -0
- package/dist/Hooks/useCopied.js +22 -0
- package/dist/Hooks/useDebounceFn/index.js +59 -0
- package/dist/Hooks/useLanguage.js +29 -0
- package/dist/Hooks/useRefFunction/index.js +13 -0
- package/dist/Hooks/useSpeechSynthesis.js +108 -0
- package/dist/Hooks/useStyle/index.js +64 -0
- package/dist/Hooks/useThrottleFn/index.js +44 -0
- package/dist/I18n/index.js +122 -0
- package/dist/I18n/locales.js +705 -0
- package/dist/Icons/animated/VoicePlayLottie/index.js +51 -0
- package/dist/Icons/animated/VoicingLottie/index.js +52 -0
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +1 -1
- package/dist/MarkdownEditor/editor/Editor.js +35 -3
- package/dist/MarkdownEditor/editor/components/CommentList/style.js +1 -1
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/style.js +1 -1
- package/dist/MarkdownEditor/editor/components/LazyElement/index.d.ts +10 -1
- package/dist/MarkdownEditor/editor/components/LazyElement/index.js +4 -2
- package/dist/MarkdownEditor/editor/components/LazyElement/style.js +1 -1
- package/dist/MarkdownEditor/editor/components/fntTag/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Image/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/LinkCard/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/List/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Media.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Paragraph.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Schema.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/Td/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/style.d.ts +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/TagPopup/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/index.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +2 -1
- package/dist/MarkdownEditor/editor/style.d.ts +1 -1
- package/dist/MarkdownEditor/editor/style.js +1 -1
- package/dist/MarkdownEditor/editor/tagStyles.js +1 -1
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.d.ts +1 -1
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +1 -1
- package/dist/MarkdownEditor/editor/tools/InsertLink.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/config/toolsConfig.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/floatBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/hooks/useToolBarLogic.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/toolBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/tools/insertAutocompleteStyle.js +1 -1
- package/dist/MarkdownEditor/index.js +1 -1
- package/dist/MarkdownEditor/style.js +1 -1
- package/dist/MarkdownEditor/types.d.ts +1 -1
- package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.d.ts +9 -72
- package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.js +61 -46
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +61 -42
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.d.ts +0 -41
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +56 -59
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/index.d.ts +58 -127
- package/dist/MarkdownInputField/AttachmentButton/index.js +170 -154
- package/dist/MarkdownInputField/AttachmentButton/style.js +1 -1
- package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +2 -2
- package/dist/MarkdownInputField/Enlargement/index.d.ts +9 -0
- package/dist/MarkdownInputField/Enlargement/index.js +41 -0
- package/dist/MarkdownInputField/Enlargement/style.d.ts +10 -0
- package/dist/MarkdownInputField/Enlargement/style.js +75 -0
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +1 -1
- package/dist/MarkdownInputField/FileMapView/style.js +1 -1
- package/dist/MarkdownInputField/FileUploadManager/index.js +3 -3
- package/dist/MarkdownInputField/MarkdownInputField.d.ts +24 -0
- package/dist/MarkdownInputField/MarkdownInputField.js +63 -10
- package/dist/MarkdownInputField/QuickActions/index.d.ts +6 -0
- package/dist/MarkdownInputField/QuickActions/index.js +39 -18
- package/dist/MarkdownInputField/RefinePromptButton/style.js +1 -1
- package/dist/MarkdownInputField/SendActions/index.js +2 -2
- package/dist/MarkdownInputField/SendButton/style.js +1 -1
- package/dist/MarkdownInputField/SkillModeBar/hooks/useSkillModeState.js +1 -1
- package/dist/MarkdownInputField/SkillModeBar/style.js +1 -1
- package/dist/MarkdownInputField/Suggestion/index.js +1 -1
- package/dist/MarkdownInputField/TopOperatingArea/style.js +1 -1
- package/dist/MarkdownInputField/VoiceInput/index.js +2 -2
- package/dist/MarkdownInputField/VoiceInput/style.js +1 -1
- package/dist/MarkdownInputField/VoiceInputManager/index.js +1 -1
- package/dist/MarkdownInputField/style.js +60 -3
- package/dist/Plugins/chart/AreaChart/index.js +410 -0
- package/dist/Plugins/chart/AreaChart/style.js +89 -0
- package/dist/Plugins/chart/BarChart/index.js +691 -0
- package/dist/Plugins/chart/BarChart/style.js +89 -0
- package/dist/Plugins/chart/ChartAttrToolBar/ChartAttrToolBarStyle.js +57 -0
- package/dist/Plugins/chart/ChartAttrToolBar/index.js +87 -0
- package/dist/Plugins/chart/ChartMark/Area.js +147 -0
- package/dist/Plugins/chart/ChartMark/Bar.js +151 -0
- package/dist/Plugins/chart/ChartMark/Column.js +150 -0
- package/dist/Plugins/chart/ChartMark/Container.js +81 -0
- package/dist/Plugins/chart/ChartMark/Line.js +150 -0
- package/dist/Plugins/chart/ChartMark/Pie.js +61 -0
- package/dist/Plugins/chart/ChartMark/index.js +13 -0
- package/dist/Plugins/chart/ChartRender.js +611 -0
- package/dist/Plugins/chart/ChartStatistic/index.js +70 -0
- package/dist/Plugins/chart/ChartStatistic/style.js +153 -0
- package/dist/Plugins/chart/ChartStatistic/utils.js +29 -0
- package/dist/Plugins/chart/DonutChart/Legend.js +136 -0
- package/dist/Plugins/chart/DonutChart/constants.js +25 -0
- package/dist/Plugins/chart/DonutChart/hooks.js +123 -0
- package/dist/Plugins/chart/DonutChart/index.js +501 -0
- package/dist/Plugins/chart/DonutChart/plugins.js +45 -0
- package/dist/Plugins/chart/DonutChart/style.js +176 -0
- package/dist/Plugins/chart/FunnelChart/index.js +605 -0
- package/dist/Plugins/chart/FunnelChart/style.js +66 -0
- package/dist/Plugins/chart/LineChart/index.js +396 -0
- package/dist/Plugins/chart/LineChart/style.js +89 -0
- package/dist/Plugins/chart/RadarChart/index.js +627 -0
- package/dist/Plugins/chart/RadarChart/style.js +111 -0
- package/dist/Plugins/chart/ScatterChart/index.js +670 -0
- package/dist/Plugins/chart/ScatterChart/style.js +93 -0
- package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +87 -0
- package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.js +46 -0
- package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundaryExample.js +70 -0
- package/dist/Plugins/chart/components/ChartContainer/index.js +7 -0
- package/dist/Plugins/chart/components/ChartContainer/style.js +90 -0
- package/dist/Plugins/chart/components/ChartFilter/ChartFilter.js +101 -0
- package/dist/Plugins/chart/components/ChartFilter/style.js +166 -0
- package/dist/Plugins/chart/components/ChartToolBar/ChartToolBar.js +68 -0
- package/dist/Plugins/chart/components/ChartToolBar/style.js +129 -0
- package/dist/Plugins/chart/components/icons/TimeIcon.js +32 -0
- package/dist/Plugins/chart/components/index.js +36 -0
- package/dist/Plugins/chart/const.js +26 -0
- package/dist/Plugins/chart/hooks/useChartStatistic.js +16 -0
- package/dist/Plugins/chart/index.js +375 -0
- package/dist/Plugins/chart/utils.js +98 -0
- package/dist/Plugins/code/CodeUI/Katex/Katex.js +75 -0
- package/dist/Plugins/code/components/AceEditor.js +257 -0
- package/dist/Plugins/code/components/AceEditorContainer.js +33 -0
- package/dist/Plugins/code/components/CodeContainer.js +63 -0
- package/dist/Plugins/code/components/CodeRenderer.js +163 -0
- package/dist/Plugins/code/components/CodeToolbar.js +206 -0
- package/dist/Plugins/code/components/HtmlPreview.js +23 -0
- package/dist/Plugins/code/components/LanguageSelector.js +110 -0
- package/dist/Plugins/code/components/LoadImage.js +49 -0
- package/dist/Plugins/code/components/ThinkBlock.js +47 -0
- package/dist/Plugins/code/components/index.js +23 -0
- package/dist/Plugins/code/hooks/index.js +9 -0
- package/dist/Plugins/code/hooks/useCodeEditorState.js +69 -0
- package/dist/Plugins/code/hooks/useRenderConditions.js +24 -0
- package/dist/Plugins/code/hooks/useToolbarConfig.js +47 -0
- package/dist/Plugins/code/index.js +98 -0
- package/dist/Plugins/code/langIconMap.js +181 -0
- package/dist/Plugins/code/langIcons/AbapIcon.js +65 -0
- package/dist/Plugins/code/langIcons/ActionscriptIcon.js +63 -0
- package/dist/Plugins/code/langIcons/AdaIcon.js +59 -0
- package/dist/Plugins/code/langIcons/ApacheIcon.js +379 -0
- package/dist/Plugins/code/langIcons/ApexIcon.js +92 -0
- package/dist/Plugins/code/langIcons/AplIcon.js +62 -0
- package/dist/Plugins/code/langIcons/ApplescriptIcon.js +63 -0
- package/dist/Plugins/code/langIcons/AstroIcon.js +69 -0
- package/dist/Plugins/code/langIcons/AwkIcon.js +82 -0
- package/dist/Plugins/code/langIcons/BallerinaIcon.js +68 -0
- package/dist/Plugins/code/langIcons/BatIcon.js +330 -0
- package/dist/Plugins/code/langIcons/BicepIcon.js +66 -0
- package/dist/Plugins/code/langIcons/BladeIcon.js +66 -0
- package/dist/Plugins/code/langIcons/CIcon.js +63 -0
- package/dist/Plugins/code/langIcons/CadenceIcon.js +65 -0
- package/dist/Plugins/code/langIcons/ClojureIcon.js +96 -0
- package/dist/Plugins/code/langIcons/CmakeIcon.js +71 -0
- package/dist/Plugins/code/langIcons/CobolIcon.js +83 -0
- package/dist/Plugins/code/langIcons/CodeqlIcon.js +93 -0
- package/dist/Plugins/code/langIcons/CoffeeIcon.js +63 -0
- package/dist/Plugins/code/langIcons/ConsoleIcon.js +63 -0
- package/dist/Plugins/code/langIcons/CppIcon.js +62 -0
- package/dist/Plugins/code/langIcons/CrystalIcon.js +64 -0
- package/dist/Plugins/code/langIcons/CsharpIcon.js +66 -0
- package/dist/Plugins/code/langIcons/CssIcon.js +59 -0
- package/dist/Plugins/code/langIcons/DIcon.js +60 -0
- package/dist/Plugins/code/langIcons/DartIcon.js +84 -0
- package/dist/Plugins/code/langIcons/DatabaseIcon.js +65 -0
- package/dist/Plugins/code/langIcons/DiffIcon.js +65 -0
- package/dist/Plugins/code/langIcons/DockerIcon.js +63 -0
- package/dist/Plugins/code/langIcons/DotenvIcon.js +64 -0
- package/dist/Plugins/code/langIcons/ElixirIcon.js +66 -0
- package/dist/Plugins/code/langIcons/ElmIcon.js +65 -0
- package/dist/Plugins/code/langIcons/ErbIcon.js +62 -0
- package/dist/Plugins/code/langIcons/ErlangIcon.js +63 -0
- package/dist/Plugins/code/langIcons/FsharpIcon.js +71 -0
- package/dist/Plugins/code/langIcons/GdscriptIcon.js +107 -0
- package/dist/Plugins/code/langIcons/GlslIcon.js +66 -0
- package/dist/Plugins/code/langIcons/GnuplotIcon.js +97 -0
- package/dist/Plugins/code/langIcons/GoIcon.js +102 -0
- package/dist/Plugins/code/langIcons/GraphqlIcon.js +73 -0
- package/dist/Plugins/code/langIcons/GroovyIcon.js +63 -0
- package/dist/Plugins/code/langIcons/HackIcon.js +73 -0
- package/dist/Plugins/code/langIcons/HamlIcon.js +63 -0
- package/dist/Plugins/code/langIcons/HandlebarsIcon.js +64 -0
- package/dist/Plugins/code/langIcons/HaskellIcon.js +75 -0
- package/dist/Plugins/code/langIcons/HclIcon.js +100 -0
- package/dist/Plugins/code/langIcons/HclLightIcon.js +104 -0
- package/dist/Plugins/code/langIcons/HjsonIcon.js +73 -0
- package/dist/Plugins/code/langIcons/HlslIcon.js +93 -0
- package/dist/Plugins/code/langIcons/HtmlIcon.js +63 -0
- package/dist/Plugins/code/langIcons/HttpIcon.js +63 -0
- package/dist/Plugins/code/langIcons/ImbaIcon.js +73 -0
- package/dist/Plugins/code/langIcons/IniIcon.js +62 -0
- package/dist/Plugins/code/langIcons/JavaIcon.js +63 -0
- package/dist/Plugins/code/langIcons/JavascriptIcon.js +63 -0
- package/dist/Plugins/code/langIcons/JinjaIcon.js +82 -0
- package/dist/Plugins/code/langIcons/Json5Icon.js +100 -0
- package/dist/Plugins/code/langIcons/JsonIcon.js +63 -0
- package/dist/Plugins/code/langIcons/JsonnetIcon.js +106 -0
- package/dist/Plugins/code/langIcons/JuliaIcon.js +57 -0
- package/dist/Plugins/code/langIcons/KotlinIcon.js +97 -0
- package/dist/Plugins/code/langIcons/KustoIcon.js +64 -0
- package/dist/Plugins/code/langIcons/LessIcon.js +66 -0
- package/dist/Plugins/code/langIcons/LiquidIcon.js +66 -0
- package/dist/Plugins/code/langIcons/LispIcon.js +63 -0
- package/dist/Plugins/code/langIcons/LuaIcon.js +79 -0
- package/dist/Plugins/code/langIcons/MakefileIcon.js +66 -0
- package/dist/Plugins/code/langIcons/MarkdownIcon.js +63 -0
- package/dist/Plugins/code/langIcons/MarkojsIcon.js +88 -0
- package/dist/Plugins/code/langIcons/MatlabIcon.js +75 -0
- package/dist/Plugins/code/langIcons/MdxIcon.js +62 -0
- package/dist/Plugins/code/langIcons/MermaidIcon.js +73 -0
- package/dist/Plugins/code/langIcons/MojoIcon.js +71 -0
- package/dist/Plugins/code/langIcons/NginxIcon.js +68 -0
- package/dist/Plugins/code/langIcons/NimIcon.js +62 -0
- package/dist/Plugins/code/langIcons/NixIcon.js +65 -0
- package/dist/Plugins/code/langIcons/ObjectiveCIcon.js +67 -0
- package/dist/Plugins/code/langIcons/ObjectiveCppIcon.js +65 -0
- package/dist/Plugins/code/langIcons/OcamlIcon.js +70 -0
- package/dist/Plugins/code/langIcons/PascalIcon.js +60 -0
- package/dist/Plugins/code/langIcons/Perl6Icon.js +401 -0
- package/dist/Plugins/code/langIcons/PerlIcon.js +63 -0
- package/dist/Plugins/code/langIcons/PhpIcon.js +59 -0
- package/dist/Plugins/code/langIcons/PostcssIcon.js +121 -0
- package/dist/Plugins/code/langIcons/PowershellIcon.js +66 -0
- package/dist/Plugins/code/langIcons/PrismaIcon.js +75 -0
- package/dist/Plugins/code/langIcons/PrologIcon.js +66 -0
- package/dist/Plugins/code/langIcons/ProtoIcon.js +81 -0
- package/dist/Plugins/code/langIcons/PugIcon.js +226 -0
- package/dist/Plugins/code/langIcons/PuppetIcon.js +57 -0
- package/dist/Plugins/code/langIcons/PurescriptIcon.js +72 -0
- package/dist/Plugins/code/langIcons/PythonIcon.js +70 -0
- package/dist/Plugins/code/langIcons/RIcon.js +59 -0
- package/dist/Plugins/code/langIcons/RazorIcon.js +65 -0
- package/dist/Plugins/code/langIcons/ReactIcon.js +63 -0
- package/dist/Plugins/code/langIcons/ReactTsIcon.js +66 -0
- package/dist/Plugins/code/langIcons/RubyIcon.js +66 -0
- package/dist/Plugins/code/langIcons/RustIcon.js +63 -0
- package/dist/Plugins/code/langIcons/SasIcon.js +59 -0
- package/dist/Plugins/code/langIcons/SassIcon.js +66 -0
- package/dist/Plugins/code/langIcons/ScalaIcon.js +58 -0
- package/dist/Plugins/code/langIcons/SchemeIcon.js +66 -0
- package/dist/Plugins/code/langIcons/ShaderlabIcon.js +63 -0
- package/dist/Plugins/code/langIcons/SolidityIcon.js +57 -0
- package/dist/Plugins/code/langIcons/SparqlIcon.js +73 -0
- package/dist/Plugins/code/langIcons/StataIcon.js +155 -0
- package/dist/Plugins/code/langIcons/StylusIcon.js +67 -0
- package/dist/Plugins/code/langIcons/SvelteIcon.js +66 -0
- package/dist/Plugins/code/langIcons/SwiftIcon.js +65 -0
- package/dist/Plugins/code/langIcons/SystemverilogIcon.js +137 -0
- package/dist/Plugins/code/langIcons/TclIcon.js +59 -0
- package/dist/Plugins/code/langIcons/TexIcon.js +76 -0
- package/dist/Plugins/code/langIcons/TomlIcon.js +84 -0
- package/dist/Plugins/code/langIcons/TwigIcon.js +63 -0
- package/dist/Plugins/code/langIcons/TypescriptIcon.js +67 -0
- package/dist/Plugins/code/langIcons/VerilogIcon.js +63 -0
- package/dist/Plugins/code/langIcons/VhdlIcon.js +73 -0
- package/dist/Plugins/code/langIcons/VimIcon.js +556 -0
- package/dist/Plugins/code/langIcons/VueIcon.js +72 -0
- package/dist/Plugins/code/langIcons/WebassemblyIcon.js +85 -0
- package/dist/Plugins/code/langIcons/WenyanIcon.js +144 -0
- package/dist/Plugins/code/langIcons/WgslIcon.js +102 -0
- package/dist/Plugins/code/langIcons/WolframlanguageIcon.js +79 -0
- package/dist/Plugins/code/langIcons/XmlIcon.js +59 -0
- package/dist/Plugins/code/langIcons/XslIcon.js +80 -0
- package/dist/Plugins/code/langIcons/YamlIcon.js +63 -0
- package/dist/Plugins/code/langIcons/ZigIcon.js +89 -0
- package/dist/Plugins/code/langIcons/index.js +259 -0
- package/dist/Plugins/code/utils/index.js +5 -0
- package/dist/Plugins/code/utils/langOptions.js +14 -0
- package/dist/Plugins/defaultPlugins.js +17 -0
- package/dist/Plugins/formatter/index.js +114 -0
- package/dist/Plugins/index.js +7 -0
- package/dist/Plugins/katex/InlineKatex.js +124 -0
- package/dist/Plugins/katex/Katex.js +74 -0
- package/dist/Plugins/katex/index.js +113 -0
- package/dist/Plugins/mermaid/Mermaid.js +102 -0
- package/dist/Plugins/mermaid/index.js +165 -0
- package/dist/Quote/style.js +1 -1
- package/dist/Schema/SchemaEditor/AceEditorWrapper.js +126 -0
- package/dist/Schema/SchemaEditor/index.js +291 -0
- package/dist/Schema/SchemaEditor/style.js +274 -0
- package/dist/Schema/SchemaForm/index.d.ts +61 -0
- package/dist/Schema/SchemaForm/index.js +285 -0
- package/dist/Schema/SchemaRenderer/index.d.ts +81 -0
- package/dist/Schema/SchemaRenderer/index.js +610 -0
- package/dist/Schema/SchemaRenderer/templateEngine.js +26 -0
- package/dist/Schema/index.js +15 -0
- package/dist/Schema/validator.js +42 -0
- package/dist/TaskList/index.d.ts +19 -56
- package/dist/TaskList/index.js +109 -86
- package/dist/TaskList/style.js +1 -1
- package/dist/ThoughtChainList/CostMillis.js +1 -1
- package/dist/ThoughtChainList/DeepThink.js +2 -2
- package/dist/ThoughtChainList/DotAni/style.js +1 -1
- package/dist/ThoughtChainList/MarkdownEditor.js +1 -1
- package/dist/ThoughtChainList/RagRetrievalInfo.js +1 -1
- package/dist/ThoughtChainList/TableSql.js +1 -1
- package/dist/ThoughtChainList/TitleInfo.js +1 -1
- package/dist/ThoughtChainList/ToolCall.js +1 -1
- package/dist/ThoughtChainList/WebSearch.js +2 -2
- package/dist/ThoughtChainList/index.js +3 -3
- package/dist/ThoughtChainList/style.js +1 -1
- package/dist/ToolUseBar/ToolUseBarThink.d.ts +19 -0
- package/dist/ToolUseBar/ToolUseBarThink.js +200 -278
- package/dist/ToolUseBar/style.js +1 -1
- package/dist/ToolUseBar/thinkStyle.js +1 -1
- package/dist/Utils/easings.js +13 -0
- package/dist/Utils/formatTime.js +19 -0
- package/dist/Utils/getScroll.js +45 -0
- package/dist/Utils/language.js +168 -0
- package/dist/Utils/proxySandbox/ProxySandbox.js +1061 -0
- package/dist/Utils/proxySandbox/SecurityContextManager.js +369 -0
- package/dist/Utils/proxySandbox/index.js +281 -0
- package/dist/Utils/proxySandbox/types.js +52 -0
- package/dist/Utils/scrollTo.js +63 -0
- package/dist/Utils/throttleByAnimationFrame.js +23 -0
- package/dist/Welcome/style.js +1 -1
- package/dist/Workspace/Browser/index.d.ts +9 -25
- package/dist/Workspace/Browser/index.js +12 -16
- package/dist/Workspace/Browser/style.js +1 -1
- package/dist/Workspace/File/DataSourceStrategy.d.ts +2 -2
- package/dist/Workspace/File/DataSourceStrategy.js +45 -43
- package/dist/Workspace/File/FileComponent.js +2 -2
- package/dist/Workspace/File/FileTypeProcessor.d.ts +1 -4
- package/dist/Workspace/File/FileTypeProcessor.js +10 -18
- package/dist/Workspace/File/PreviewComponent.d.ts +11 -16
- package/dist/Workspace/File/PreviewComponent.js +100 -112
- package/dist/Workspace/File/style.js +1 -1
- package/dist/Workspace/HtmlPreview/index.js +1 -1
- package/dist/Workspace/HtmlPreview/style.js +1 -1
- package/dist/Workspace/RealtimeFollow/index.d.ts +10 -4
- package/dist/Workspace/RealtimeFollow/index.js +175 -152
- package/dist/Workspace/RealtimeFollow/style.js +1 -1
- package/dist/Workspace/Task/style.js +1 -1
- package/dist/Workspace/index.js +1 -1
- package/dist/Workspace/style.js +1 -1
- package/dist/Workspace/utils/codeLanguageUtils.js +1 -1
- package/dist/index.d.ts +28 -28
- package/dist/index.js +27 -27
- package/package.json +11 -11
- package/dist/Bubble/MessagesContent/types.d.ts +0 -32
- package/dist/Bubble/before.d.ts +0 -66
- package/dist/Bubble/before.js +0 -75
- package/dist/components/ActionIconBox/index.js +0 -157
- package/dist/components/ActionIconBox/style.js +0 -117
- package/dist/components/ActionItemBox/ActionItemBox.js +0 -162
- package/dist/components/ActionItemBox/index.js +0 -7
- package/dist/components/ActionItemBox/style.js +0 -373
- package/dist/components/Button/IconButton/index.js +0 -46
- package/dist/components/Button/IconButton/style.js +0 -355
- package/dist/components/Button/SwitchButton/index.js +0 -99
- package/dist/components/Button/SwitchButton/style.js +0 -158
- package/dist/components/Button/ToggleButton/index.js +0 -63
- package/dist/components/Button/ToggleButton/style.js +0 -277
- package/dist/components/Button/index.js +0 -4
- package/dist/components/ImageList.js +0 -138
- package/dist/components/LayoutHeader/index.js +0 -94
- package/dist/components/LayoutHeader/style.js +0 -70
- package/dist/components/Loading/index.d.ts +0 -25
- package/dist/components/Loading/index.js +0 -184
- package/dist/components/Loading/style.js +0 -46
- package/dist/components/Robot/index.js +0 -66
- package/dist/components/Robot/lotties/DazingLottie/index.js +0 -52
- package/dist/components/Robot/lotties/ThinkingLottie/index.js +0 -52
- package/dist/components/Robot/lotties/index.js +0 -3
- package/dist/components/SuggestionList/index.js +0 -195
- package/dist/components/SuggestionList/style.js +0 -196
- package/dist/components/VisualList/index.js +0 -188
- package/dist/components/VisualList/style.js +0 -138
- package/dist/components/icons/LoadingSpinnerIcon.d.ts +0 -38
- package/dist/components/icons/LoadingSpinnerIcon.js +0 -83
- package/dist/components/lotties/DazingLottie/index.js +0 -52
- package/dist/components/lotties/ThinkingLottie/index.js +0 -52
- package/dist/components/lotties/index.js +0 -3
- package/dist/constants/colors.js +0 -98
- package/dist/hooks/useAutoScroll.js +0 -90
- package/dist/hooks/useClickAway.js +0 -23
- package/dist/hooks/useCopied.js +0 -22
- package/dist/hooks/useDebounceFn/index.js +0 -59
- package/dist/hooks/useLanguage.js +0 -29
- package/dist/hooks/useRefFunction/index.js +0 -13
- package/dist/hooks/useSpeechSynthesis.js +0 -108
- package/dist/hooks/useStyle/index.js +0 -64
- package/dist/hooks/useThrottleFn/index.js +0 -44
- package/dist/i18n/index.js +0 -122
- package/dist/i18n/locales.js +0 -705
- package/dist/icons/animated/VoicePlayLottie/index.js +0 -51
- package/dist/icons/animated/VoicingLottie/index.js +0 -52
- package/dist/plugins/chart/AreaChart/index.js +0 -410
- package/dist/plugins/chart/AreaChart/style.js +0 -89
- package/dist/plugins/chart/BarChart/index.js +0 -691
- package/dist/plugins/chart/BarChart/style.js +0 -89
- package/dist/plugins/chart/ChartAttrToolBar/ChartAttrToolBarStyle.js +0 -57
- package/dist/plugins/chart/ChartAttrToolBar/index.js +0 -87
- package/dist/plugins/chart/ChartMark/Area.js +0 -147
- package/dist/plugins/chart/ChartMark/Bar.js +0 -151
- package/dist/plugins/chart/ChartMark/Column.js +0 -150
- package/dist/plugins/chart/ChartMark/Container.js +0 -81
- package/dist/plugins/chart/ChartMark/Line.js +0 -150
- package/dist/plugins/chart/ChartMark/Pie.js +0 -61
- package/dist/plugins/chart/ChartMark/index.js +0 -13
- package/dist/plugins/chart/ChartRender.js +0 -611
- package/dist/plugins/chart/ChartStatistic/index.js +0 -70
- package/dist/plugins/chart/ChartStatistic/style.js +0 -153
- package/dist/plugins/chart/ChartStatistic/utils.js +0 -29
- package/dist/plugins/chart/DonutChart/Legend.js +0 -136
- package/dist/plugins/chart/DonutChart/constants.js +0 -25
- package/dist/plugins/chart/DonutChart/hooks.js +0 -121
- package/dist/plugins/chart/DonutChart/index.js +0 -501
- package/dist/plugins/chart/DonutChart/plugins.js +0 -45
- package/dist/plugins/chart/DonutChart/style.js +0 -176
- package/dist/plugins/chart/FunnelChart/index.js +0 -605
- package/dist/plugins/chart/FunnelChart/style.js +0 -66
- package/dist/plugins/chart/LineChart/index.js +0 -396
- package/dist/plugins/chart/LineChart/style.js +0 -89
- package/dist/plugins/chart/RadarChart/index.js +0 -627
- package/dist/plugins/chart/RadarChart/style.js +0 -111
- package/dist/plugins/chart/ScatterChart/index.js +0 -670
- package/dist/plugins/chart/ScatterChart/style.js +0 -93
- package/dist/plugins/chart/components/ChartContainer/ChartContainer.js +0 -87
- package/dist/plugins/chart/components/ChartContainer/ChartErrorBoundary.js +0 -46
- package/dist/plugins/chart/components/ChartContainer/ChartErrorBoundaryExample.js +0 -70
- package/dist/plugins/chart/components/ChartContainer/index.js +0 -7
- package/dist/plugins/chart/components/ChartContainer/style.js +0 -90
- package/dist/plugins/chart/components/ChartFilter/ChartFilter.js +0 -101
- package/dist/plugins/chart/components/ChartFilter/style.js +0 -166
- package/dist/plugins/chart/components/ChartToolBar/ChartToolBar.js +0 -68
- package/dist/plugins/chart/components/ChartToolBar/style.js +0 -129
- package/dist/plugins/chart/components/icons/TimeIcon.js +0 -32
- package/dist/plugins/chart/components/index.js +0 -36
- package/dist/plugins/chart/const.js +0 -26
- package/dist/plugins/chart/hooks/useChartStatistic.js +0 -16
- package/dist/plugins/chart/index.js +0 -375
- package/dist/plugins/chart/utils.js +0 -98
- package/dist/plugins/code/CodeUI/Katex/Katex.js +0 -75
- package/dist/plugins/code/components/AceEditor.js +0 -257
- package/dist/plugins/code/components/AceEditorContainer.js +0 -33
- package/dist/plugins/code/components/CodeContainer.js +0 -63
- package/dist/plugins/code/components/CodeRenderer.js +0 -163
- package/dist/plugins/code/components/CodeToolbar.js +0 -206
- package/dist/plugins/code/components/HtmlPreview.js +0 -23
- package/dist/plugins/code/components/LanguageSelector.js +0 -110
- package/dist/plugins/code/components/LoadImage.js +0 -49
- package/dist/plugins/code/components/ThinkBlock.js +0 -47
- package/dist/plugins/code/components/index.js +0 -23
- package/dist/plugins/code/hooks/index.js +0 -9
- package/dist/plugins/code/hooks/useCodeEditorState.js +0 -69
- package/dist/plugins/code/hooks/useRenderConditions.js +0 -24
- package/dist/plugins/code/hooks/useToolbarConfig.js +0 -47
- package/dist/plugins/code/index.js +0 -98
- package/dist/plugins/code/langIconMap.js +0 -181
- package/dist/plugins/code/langIcons/AbapIcon.js +0 -65
- package/dist/plugins/code/langIcons/ActionscriptIcon.js +0 -63
- package/dist/plugins/code/langIcons/AdaIcon.js +0 -59
- package/dist/plugins/code/langIcons/ApacheIcon.js +0 -379
- package/dist/plugins/code/langIcons/ApexIcon.js +0 -92
- package/dist/plugins/code/langIcons/AplIcon.js +0 -62
- package/dist/plugins/code/langIcons/ApplescriptIcon.js +0 -63
- package/dist/plugins/code/langIcons/AstroIcon.js +0 -69
- package/dist/plugins/code/langIcons/AwkIcon.js +0 -82
- package/dist/plugins/code/langIcons/BallerinaIcon.js +0 -68
- package/dist/plugins/code/langIcons/BatIcon.js +0 -330
- package/dist/plugins/code/langIcons/BicepIcon.js +0 -66
- package/dist/plugins/code/langIcons/BladeIcon.js +0 -66
- package/dist/plugins/code/langIcons/CIcon.js +0 -63
- package/dist/plugins/code/langIcons/CadenceIcon.js +0 -65
- package/dist/plugins/code/langIcons/ClojureIcon.js +0 -96
- package/dist/plugins/code/langIcons/CmakeIcon.js +0 -71
- package/dist/plugins/code/langIcons/CobolIcon.js +0 -83
- package/dist/plugins/code/langIcons/CodeqlIcon.js +0 -93
- package/dist/plugins/code/langIcons/CoffeeIcon.js +0 -63
- package/dist/plugins/code/langIcons/ConsoleIcon.js +0 -63
- package/dist/plugins/code/langIcons/CppIcon.js +0 -62
- package/dist/plugins/code/langIcons/CrystalIcon.js +0 -64
- package/dist/plugins/code/langIcons/CsharpIcon.js +0 -66
- package/dist/plugins/code/langIcons/CssIcon.js +0 -59
- package/dist/plugins/code/langIcons/DIcon.js +0 -60
- package/dist/plugins/code/langIcons/DartIcon.js +0 -84
- package/dist/plugins/code/langIcons/DatabaseIcon.js +0 -65
- package/dist/plugins/code/langIcons/DiffIcon.js +0 -65
- package/dist/plugins/code/langIcons/DockerIcon.js +0 -63
- package/dist/plugins/code/langIcons/DotenvIcon.js +0 -64
- package/dist/plugins/code/langIcons/ElixirIcon.js +0 -66
- package/dist/plugins/code/langIcons/ElmIcon.js +0 -65
- package/dist/plugins/code/langIcons/ErbIcon.js +0 -62
- package/dist/plugins/code/langIcons/ErlangIcon.js +0 -63
- package/dist/plugins/code/langIcons/FsharpIcon.js +0 -71
- package/dist/plugins/code/langIcons/GdscriptIcon.js +0 -107
- package/dist/plugins/code/langIcons/GlslIcon.js +0 -66
- package/dist/plugins/code/langIcons/GnuplotIcon.js +0 -97
- package/dist/plugins/code/langIcons/GoIcon.js +0 -102
- package/dist/plugins/code/langIcons/GraphqlIcon.js +0 -73
- package/dist/plugins/code/langIcons/GroovyIcon.js +0 -63
- package/dist/plugins/code/langIcons/HackIcon.js +0 -73
- package/dist/plugins/code/langIcons/HamlIcon.js +0 -63
- package/dist/plugins/code/langIcons/HandlebarsIcon.js +0 -64
- package/dist/plugins/code/langIcons/HaskellIcon.js +0 -75
- package/dist/plugins/code/langIcons/HclIcon.js +0 -100
- package/dist/plugins/code/langIcons/HclLightIcon.js +0 -104
- package/dist/plugins/code/langIcons/HjsonIcon.js +0 -73
- package/dist/plugins/code/langIcons/HlslIcon.js +0 -93
- package/dist/plugins/code/langIcons/HtmlIcon.js +0 -63
- package/dist/plugins/code/langIcons/HttpIcon.js +0 -63
- package/dist/plugins/code/langIcons/ImbaIcon.js +0 -73
- package/dist/plugins/code/langIcons/IniIcon.js +0 -62
- package/dist/plugins/code/langIcons/JavaIcon.js +0 -63
- package/dist/plugins/code/langIcons/JavascriptIcon.js +0 -63
- package/dist/plugins/code/langIcons/JinjaIcon.js +0 -82
- package/dist/plugins/code/langIcons/Json5Icon.js +0 -100
- package/dist/plugins/code/langIcons/JsonIcon.js +0 -63
- package/dist/plugins/code/langIcons/JsonnetIcon.js +0 -106
- package/dist/plugins/code/langIcons/JuliaIcon.js +0 -57
- package/dist/plugins/code/langIcons/KotlinIcon.js +0 -97
- package/dist/plugins/code/langIcons/KustoIcon.js +0 -64
- package/dist/plugins/code/langIcons/LessIcon.js +0 -66
- package/dist/plugins/code/langIcons/LiquidIcon.js +0 -66
- package/dist/plugins/code/langIcons/LispIcon.js +0 -63
- package/dist/plugins/code/langIcons/LuaIcon.js +0 -79
- package/dist/plugins/code/langIcons/MakefileIcon.js +0 -66
- package/dist/plugins/code/langIcons/MarkdownIcon.js +0 -63
- package/dist/plugins/code/langIcons/MarkojsIcon.js +0 -88
- package/dist/plugins/code/langIcons/MatlabIcon.js +0 -75
- package/dist/plugins/code/langIcons/MdxIcon.js +0 -62
- package/dist/plugins/code/langIcons/MermaidIcon.js +0 -73
- package/dist/plugins/code/langIcons/MojoIcon.js +0 -71
- package/dist/plugins/code/langIcons/NginxIcon.js +0 -68
- package/dist/plugins/code/langIcons/NimIcon.js +0 -62
- package/dist/plugins/code/langIcons/NixIcon.js +0 -65
- package/dist/plugins/code/langIcons/ObjectiveCIcon.js +0 -67
- package/dist/plugins/code/langIcons/ObjectiveCppIcon.js +0 -65
- package/dist/plugins/code/langIcons/OcamlIcon.js +0 -70
- package/dist/plugins/code/langIcons/PascalIcon.js +0 -60
- package/dist/plugins/code/langIcons/Perl6Icon.js +0 -401
- package/dist/plugins/code/langIcons/PerlIcon.js +0 -63
- package/dist/plugins/code/langIcons/PhpIcon.js +0 -59
- package/dist/plugins/code/langIcons/PostcssIcon.js +0 -121
- package/dist/plugins/code/langIcons/PowershellIcon.js +0 -66
- package/dist/plugins/code/langIcons/PrismaIcon.js +0 -75
- package/dist/plugins/code/langIcons/PrologIcon.js +0 -66
- package/dist/plugins/code/langIcons/ProtoIcon.js +0 -81
- package/dist/plugins/code/langIcons/PugIcon.js +0 -226
- package/dist/plugins/code/langIcons/PuppetIcon.js +0 -57
- package/dist/plugins/code/langIcons/PurescriptIcon.js +0 -72
- package/dist/plugins/code/langIcons/PythonIcon.js +0 -70
- package/dist/plugins/code/langIcons/RIcon.js +0 -59
- package/dist/plugins/code/langIcons/RazorIcon.js +0 -65
- package/dist/plugins/code/langIcons/ReactIcon.js +0 -63
- package/dist/plugins/code/langIcons/ReactTsIcon.js +0 -66
- package/dist/plugins/code/langIcons/RubyIcon.js +0 -66
- package/dist/plugins/code/langIcons/RustIcon.js +0 -63
- package/dist/plugins/code/langIcons/SasIcon.js +0 -59
- package/dist/plugins/code/langIcons/SassIcon.js +0 -66
- package/dist/plugins/code/langIcons/ScalaIcon.js +0 -58
- package/dist/plugins/code/langIcons/SchemeIcon.js +0 -66
- package/dist/plugins/code/langIcons/ShaderlabIcon.js +0 -63
- package/dist/plugins/code/langIcons/SolidityIcon.js +0 -57
- package/dist/plugins/code/langIcons/SparqlIcon.js +0 -73
- package/dist/plugins/code/langIcons/StataIcon.js +0 -155
- package/dist/plugins/code/langIcons/StylusIcon.js +0 -67
- package/dist/plugins/code/langIcons/SvelteIcon.js +0 -66
- package/dist/plugins/code/langIcons/SwiftIcon.js +0 -65
- package/dist/plugins/code/langIcons/SystemverilogIcon.js +0 -137
- package/dist/plugins/code/langIcons/TclIcon.js +0 -59
- package/dist/plugins/code/langIcons/TexIcon.js +0 -76
- package/dist/plugins/code/langIcons/TomlIcon.js +0 -84
- package/dist/plugins/code/langIcons/TwigIcon.js +0 -63
- package/dist/plugins/code/langIcons/TypescriptIcon.js +0 -67
- package/dist/plugins/code/langIcons/VerilogIcon.js +0 -63
- package/dist/plugins/code/langIcons/VhdlIcon.js +0 -73
- package/dist/plugins/code/langIcons/VimIcon.js +0 -556
- package/dist/plugins/code/langIcons/VueIcon.js +0 -72
- package/dist/plugins/code/langIcons/WebassemblyIcon.js +0 -85
- package/dist/plugins/code/langIcons/WenyanIcon.js +0 -144
- package/dist/plugins/code/langIcons/WgslIcon.js +0 -102
- package/dist/plugins/code/langIcons/WolframlanguageIcon.js +0 -79
- package/dist/plugins/code/langIcons/XmlIcon.js +0 -59
- package/dist/plugins/code/langIcons/XslIcon.js +0 -80
- package/dist/plugins/code/langIcons/YamlIcon.js +0 -63
- package/dist/plugins/code/langIcons/ZigIcon.js +0 -89
- package/dist/plugins/code/langIcons/index.js +0 -259
- package/dist/plugins/code/utils/index.js +0 -5
- package/dist/plugins/code/utils/langOptions.js +0 -14
- package/dist/plugins/defaultPlugins.js +0 -17
- package/dist/plugins/formatter/index.js +0 -114
- package/dist/plugins/index.js +0 -7
- package/dist/plugins/katex/InlineKatex.js +0 -124
- package/dist/plugins/katex/Katex.js +0 -74
- package/dist/plugins/katex/index.js +0 -113
- package/dist/plugins/mermaid/Mermaid.js +0 -102
- package/dist/plugins/mermaid/index.js +0 -165
- package/dist/schema/SchemaEditor/AceEditorWrapper.js +0 -126
- package/dist/schema/SchemaEditor/index.js +0 -291
- package/dist/schema/SchemaEditor/style.js +0 -274
- package/dist/schema/SchemaForm/index.d.ts +0 -61
- package/dist/schema/SchemaForm/index.js +0 -285
- package/dist/schema/SchemaRenderer/index.d.ts +0 -81
- package/dist/schema/SchemaRenderer/index.js +0 -610
- package/dist/schema/SchemaRenderer/templateEngine.js +0 -26
- package/dist/schema/index.js +0 -15
- package/dist/schema/types.js +0 -0
- package/dist/schema/validator.js +0 -42
- package/dist/utils/easings.js +0 -13
- package/dist/utils/formatTime.js +0 -19
- package/dist/utils/getScroll.js +0 -45
- package/dist/utils/language.js +0 -168
- package/dist/utils/proxySandbox/ProxySandbox.js +0 -1061
- package/dist/utils/proxySandbox/SecurityContextManager.js +0 -369
- package/dist/utils/proxySandbox/index.js +0 -281
- package/dist/utils/proxySandbox/types.js +0 -52
- package/dist/utils/scrollTo.js +0 -63
- package/dist/utils/throttleByAnimationFrame.js +0 -23
- /package/dist/{components → Components}/ActionIconBox/index.d.ts +0 -0
- /package/dist/{components → Components}/ActionIconBox/style.d.ts +0 -0
- /package/dist/{components → Components}/ActionItemBox/ActionItemBox.d.ts +0 -0
- /package/dist/{components → Components}/ActionItemBox/index.d.ts +0 -0
- /package/dist/{components → Components}/ActionItemBox/style.d.ts +0 -0
- /package/dist/{components → Components}/Button/IconButton/index.d.ts +0 -0
- /package/dist/{components → Components}/Button/IconButton/style.d.ts +0 -0
- /package/dist/{components → Components}/Button/SwitchButton/index.d.ts +0 -0
- /package/dist/{components → Components}/Button/SwitchButton/style.d.ts +0 -0
- /package/dist/{components → Components}/Button/ToggleButton/index.d.ts +0 -0
- /package/dist/{components → Components}/Button/ToggleButton/style.d.ts +0 -0
- /package/dist/{components → Components}/Button/index.d.ts +0 -0
- /package/dist/{components → Components}/ImageList.d.ts +0 -0
- /package/dist/{components → Components}/LayoutHeader/index.d.ts +0 -0
- /package/dist/{components → Components}/LayoutHeader/style.d.ts +0 -0
- /package/dist/{components → Components}/LayoutHeader/types.d.ts +0 -0
- /package/dist/{Bubble/MessagesContent → Components/LayoutHeader}/types.js +0 -0
- /package/dist/{components → Components}/Loading/style.d.ts +0 -0
- /package/dist/{components → Components}/Robot/index.d.ts +0 -0
- /package/dist/{components → Components}/Robot/lotties/DazingLottie/dazing.json +0 -0
- /package/dist/{components → Components}/Robot/lotties/DazingLottie/index.d.ts +0 -0
- /package/dist/{components → Components}/Robot/lotties/ThinkingLottie/index.d.ts +0 -0
- /package/dist/{components → Components}/Robot/lotties/ThinkingLottie/thinking.json +0 -0
- /package/dist/{components → Components}/Robot/lotties/index.d.ts +0 -0
- /package/dist/{components → Components}/SuggestionList/index.d.ts +0 -0
- /package/dist/{components → Components}/SuggestionList/style.d.ts +0 -0
- /package/dist/{components → Components}/VisualList/index.d.ts +0 -0
- /package/dist/{components → Components}/VisualList/style.d.ts +0 -0
- /package/dist/{components → Components}/lotties/DazingLottie/dazing.json +0 -0
- /package/dist/{components → Components}/lotties/DazingLottie/index.d.ts +0 -0
- /package/dist/{components → Components}/lotties/ThinkingLottie/index.d.ts +0 -0
- /package/dist/{components → Components}/lotties/ThinkingLottie/thinking.json +0 -0
- /package/dist/{components → Components}/lotties/index.d.ts +0 -0
- /package/dist/{constants → Constants}/colors.d.ts +0 -0
- /package/dist/{hooks → Hooks}/useAutoScroll.d.ts +0 -0
- /package/dist/{hooks → Hooks}/useClickAway.d.ts +0 -0
- /package/dist/{hooks → Hooks}/useCopied.d.ts +0 -0
- /package/dist/{hooks → Hooks}/useDebounceFn/index.d.ts +0 -0
- /package/dist/{hooks → Hooks}/useLanguage.d.ts +0 -0
- /package/dist/{hooks → Hooks}/useRefFunction/index.d.ts +0 -0
- /package/dist/{hooks → Hooks}/useSpeechSynthesis.d.ts +0 -0
- /package/dist/{hooks → Hooks}/useStyle/index.d.ts +0 -0
- /package/dist/{hooks → Hooks}/useThrottleFn/index.d.ts +0 -0
- /package/dist/{i18n → I18n}/index.d.ts +0 -0
- /package/dist/{i18n → I18n}/locales.d.ts +0 -0
- /package/dist/{icons → Icons}/animated/VoicePlayLottie/index.d.ts +0 -0
- /package/dist/{icons → Icons}/animated/VoicePlayLottie/voicePlay.json +0 -0
- /package/dist/{icons → Icons}/animated/VoicingLottie/index.d.ts +0 -0
- /package/dist/{icons → Icons}/animated/VoicingLottie/voicing.json +0 -0
- /package/dist/{plugins → Plugins}/chart/AreaChart/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/AreaChart/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/BarChart/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/BarChart/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartAttrToolBar/ChartAttrToolBarStyle.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartAttrToolBar/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartMark/Area.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartMark/Bar.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartMark/Column.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartMark/Container.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartMark/Line.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartMark/Pie.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartMark/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartMark/useChart.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartMark/useChart.js +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartRender.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartStatistic/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartStatistic/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ChartStatistic/utils.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/DonutChart/Legend.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/DonutChart/constants.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/DonutChart/hooks.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/DonutChart/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/DonutChart/plugins.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/DonutChart/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/DonutChart/types.d.ts +0 -0
- /package/dist/{components/LayoutHeader → Plugins/chart/DonutChart}/types.js +0 -0
- /package/dist/{plugins → Plugins}/chart/FunnelChart/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/FunnelChart/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/LineChart/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/LineChart/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/RadarChart/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/RadarChart/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ScatterChart/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/ScatterChart/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/ChartContainer/ChartContainer.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/ChartContainer/ChartErrorBoundary.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/ChartContainer/ChartErrorBoundaryExample.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/ChartContainer/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/ChartContainer/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/ChartFilter/ChartFilter.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/ChartFilter/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/ChartToolBar/ChartToolBar.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/ChartToolBar/style.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/icons/TimeIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/components/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/const.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/hooks/useChartStatistic.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/chart/utils.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/Katex.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-Bold.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-Italic.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Math-Italic.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Script-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/code/CodeUI/Katex/katex.min.css +0 -0
- /package/dist/{plugins → Plugins}/code/components/AceEditor.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/components/AceEditorContainer.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/components/CodeContainer.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/components/CodeRenderer.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/components/CodeToolbar.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/components/HtmlPreview.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/components/LanguageSelector.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/components/LoadImage.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/components/ThinkBlock.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/components/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/hooks/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/hooks/useCodeEditorState.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/hooks/useRenderConditions.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/hooks/useToolbarConfig.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIconMap.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/AbapIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ActionscriptIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/AdaIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ApacheIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ApexIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/AplIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ApplescriptIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/AstroIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/AwkIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/BallerinaIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/BatIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/BicepIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/BladeIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CadenceIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ClojureIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CmakeIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CobolIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CodeqlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CoffeeIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ConsoleIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CppIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CrystalIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CsharpIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/CssIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/DIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/DartIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/DatabaseIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/DiffIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/DockerIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/DotenvIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ElixirIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ElmIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ErbIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ErlangIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/FsharpIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/GdscriptIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/GlslIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/GnuplotIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/GoIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/GraphqlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/GroovyIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HackIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HamlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HandlebarsIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HaskellIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HclIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HclLightIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HjsonIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HlslIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HtmlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/HttpIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ImbaIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/IniIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/JavaIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/JavascriptIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/JinjaIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/Json5Icon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/JsonIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/JsonnetIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/JuliaIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/KotlinIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/KustoIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/LessIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/LiquidIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/LispIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/LuaIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/MakefileIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/MarkdownIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/MarkojsIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/MatlabIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/MdxIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/MermaidIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/MojoIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/NginxIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/NimIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/NixIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ObjectiveCIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ObjectiveCppIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/OcamlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PascalIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/Perl6Icon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PerlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PhpIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PostcssIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PowershellIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PrismaIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PrologIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ProtoIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PugIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PuppetIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PurescriptIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/PythonIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/RIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/RazorIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ReactIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ReactTsIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/RubyIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/RustIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/SasIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/SassIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ScalaIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/SchemeIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ShaderlabIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/SolidityIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/SparqlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/StataIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/StylusIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/SvelteIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/SwiftIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/SystemverilogIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/TclIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/TexIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/TomlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/TwigIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/TypescriptIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/VerilogIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/VhdlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/VimIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/VueIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/WebassemblyIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/WenyanIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/WgslIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/WolframlanguageIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/XmlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/XslIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/YamlIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/ZigIcon.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/langIcons/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/utils/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/code/utils/langOptions.d.ts +0 -0
- /package/dist/{plugins → Plugins}/defaultPlugins.d.ts +0 -0
- /package/dist/{plugins → Plugins}/formatter/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/katex/InlineKatex.d.ts +0 -0
- /package/dist/{plugins → Plugins}/katex/Katex.d.ts +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- /package/dist/{plugins → Plugins}/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- /package/dist/{plugins → Plugins}/katex/index.d.ts +0 -0
- /package/dist/{plugins → Plugins}/katex/katex.min.css +0 -0
- /package/dist/{plugins → Plugins}/mermaid/Mermaid.d.ts +0 -0
- /package/dist/{plugins → Plugins}/mermaid/index.d.ts +0 -0
- /package/dist/{schema → Schema}/SchemaEditor/AceEditorWrapper.d.ts +0 -0
- /package/dist/{schema → Schema}/SchemaEditor/index.d.ts +0 -0
- /package/dist/{schema → Schema}/SchemaEditor/style.d.ts +0 -0
- /package/dist/{schema → Schema}/SchemaForm/types.d.ts +0 -0
- /package/dist/{plugins/chart/DonutChart → Schema/SchemaForm}/types.js +0 -0
- /package/dist/{schema → Schema}/SchemaRenderer/templateEngine.d.ts +0 -0
- /package/dist/{schema → Schema}/index.d.ts +0 -0
- /package/dist/{schema → Schema}/schema.definition.json +0 -0
- /package/dist/{schema → Schema}/schema.json +0 -0
- /package/dist/{schema → Schema}/types.d.ts +0 -0
- /package/dist/{schema/SchemaForm → Schema}/types.js +0 -0
- /package/dist/{schema → Schema}/validator.d.ts +0 -0
- /package/dist/{types → Types}/slash2.d.ts +0 -0
- /package/dist/{utils → Utils}/easings.d.ts +0 -0
- /package/dist/{utils → Utils}/formatTime.d.ts +0 -0
- /package/dist/{utils → Utils}/getScroll.d.ts +0 -0
- /package/dist/{utils → Utils}/language.d.ts +0 -0
- /package/dist/{utils → Utils}/proxySandbox/ProxySandbox.d.ts +0 -0
- /package/dist/{utils → Utils}/proxySandbox/SecurityContextManager.d.ts +0 -0
- /package/dist/{utils → Utils}/proxySandbox/index.d.ts +0 -0
- /package/dist/{utils → Utils}/proxySandbox/types.d.ts +0 -0
- /package/dist/{utils → Utils}/reset-ant.css +0 -0
- /package/dist/{utils → Utils}/scrollTo.d.ts +0 -0
- /package/dist/{utils → Utils}/throttleByAnimationFrame.d.ts +0 -0
|
@@ -1,1061 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
var __async = (__this, __arguments, generator) => {
|
|
18
|
-
return new Promise((resolve, reject) => {
|
|
19
|
-
var fulfilled = (value) => {
|
|
20
|
-
try {
|
|
21
|
-
step(generator.next(value));
|
|
22
|
-
} catch (e) {
|
|
23
|
-
reject(e);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
var rejected = (value) => {
|
|
27
|
-
try {
|
|
28
|
-
step(generator.throw(value));
|
|
29
|
-
} catch (e) {
|
|
30
|
-
reject(e);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
34
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// src/utils/proxySandbox/ProxySandbox.ts
|
|
39
|
-
var DANGEROUS_GLOBALS = [
|
|
40
|
-
"eval",
|
|
41
|
-
"Function",
|
|
42
|
-
"constructor",
|
|
43
|
-
"__proto__",
|
|
44
|
-
"prototype",
|
|
45
|
-
"global",
|
|
46
|
-
"globalThis",
|
|
47
|
-
"self",
|
|
48
|
-
"parent",
|
|
49
|
-
"top",
|
|
50
|
-
"frames",
|
|
51
|
-
"location",
|
|
52
|
-
"history",
|
|
53
|
-
"navigator",
|
|
54
|
-
"screen",
|
|
55
|
-
"localStorage",
|
|
56
|
-
"sessionStorage",
|
|
57
|
-
"indexedDB",
|
|
58
|
-
"WebSocket",
|
|
59
|
-
"XMLHttpRequest",
|
|
60
|
-
"fetch",
|
|
61
|
-
"Request",
|
|
62
|
-
"Response",
|
|
63
|
-
"Headers",
|
|
64
|
-
"URL",
|
|
65
|
-
"URLSearchParams",
|
|
66
|
-
"Blob",
|
|
67
|
-
"File",
|
|
68
|
-
"FileReader",
|
|
69
|
-
"FormData",
|
|
70
|
-
"Worker",
|
|
71
|
-
"SharedWorker",
|
|
72
|
-
"ServiceWorker",
|
|
73
|
-
"MessageChannel",
|
|
74
|
-
"MessagePort",
|
|
75
|
-
"BroadcastChannel",
|
|
76
|
-
"WebRTC",
|
|
77
|
-
"MediaStream",
|
|
78
|
-
"process",
|
|
79
|
-
"require",
|
|
80
|
-
"module",
|
|
81
|
-
"exports",
|
|
82
|
-
"Buffer",
|
|
83
|
-
"global",
|
|
84
|
-
"setImmediate",
|
|
85
|
-
"clearImmediate",
|
|
86
|
-
"setInterval",
|
|
87
|
-
"clearInterval",
|
|
88
|
-
"setTimeout",
|
|
89
|
-
"clearTimeout",
|
|
90
|
-
"queueMicrotask",
|
|
91
|
-
"requestAnimationFrame",
|
|
92
|
-
"cancelAnimationFrame",
|
|
93
|
-
"requestIdleCallback",
|
|
94
|
-
"cancelIdleCallback",
|
|
95
|
-
"crypto",
|
|
96
|
-
"SubtleCrypto",
|
|
97
|
-
"performance",
|
|
98
|
-
"PerformanceObserver",
|
|
99
|
-
"IntersectionObserver",
|
|
100
|
-
"MutationObserver",
|
|
101
|
-
"ResizeObserver",
|
|
102
|
-
"AbortController",
|
|
103
|
-
"AbortSignal",
|
|
104
|
-
"EventSource",
|
|
105
|
-
"CloseEvent",
|
|
106
|
-
"CustomEvent",
|
|
107
|
-
"ErrorEvent",
|
|
108
|
-
"Event",
|
|
109
|
-
"EventTarget",
|
|
110
|
-
"MessageEvent",
|
|
111
|
-
"ProgressEvent",
|
|
112
|
-
"PromiseRejectionEvent",
|
|
113
|
-
"alert",
|
|
114
|
-
"confirm",
|
|
115
|
-
"prompt",
|
|
116
|
-
"open",
|
|
117
|
-
"close",
|
|
118
|
-
"print",
|
|
119
|
-
"focus",
|
|
120
|
-
"blur",
|
|
121
|
-
"getSelection",
|
|
122
|
-
"getComputedStyle",
|
|
123
|
-
"matchMedia",
|
|
124
|
-
"moveBy",
|
|
125
|
-
"moveTo",
|
|
126
|
-
"resizeBy",
|
|
127
|
-
"resizeTo",
|
|
128
|
-
"scroll",
|
|
129
|
-
"scrollBy",
|
|
130
|
-
"scrollTo",
|
|
131
|
-
"stop",
|
|
132
|
-
"Notification",
|
|
133
|
-
"webkitNotifications",
|
|
134
|
-
"external",
|
|
135
|
-
"chrome",
|
|
136
|
-
"safari",
|
|
137
|
-
"opera",
|
|
138
|
-
"moz"
|
|
139
|
-
];
|
|
140
|
-
var SAFE_GLOBALS = [
|
|
141
|
-
"console",
|
|
142
|
-
"setTimeout",
|
|
143
|
-
"setInterval",
|
|
144
|
-
"clearTimeout",
|
|
145
|
-
"clearInterval",
|
|
146
|
-
"Math",
|
|
147
|
-
"Date",
|
|
148
|
-
"JSON",
|
|
149
|
-
"parseInt",
|
|
150
|
-
"parseFloat",
|
|
151
|
-
"isNaN",
|
|
152
|
-
"isFinite",
|
|
153
|
-
"encodeURIComponent",
|
|
154
|
-
"decodeURIComponent",
|
|
155
|
-
"encodeURI",
|
|
156
|
-
"decodeURI",
|
|
157
|
-
"String",
|
|
158
|
-
"Number",
|
|
159
|
-
"Boolean",
|
|
160
|
-
"Array",
|
|
161
|
-
"Object",
|
|
162
|
-
"RegExp",
|
|
163
|
-
"Error",
|
|
164
|
-
"TypeError",
|
|
165
|
-
"ReferenceError",
|
|
166
|
-
"SyntaxError"
|
|
167
|
-
];
|
|
168
|
-
var ProxySandbox = class {
|
|
169
|
-
constructor(config = {}) {
|
|
170
|
-
this.isActive = false;
|
|
171
|
-
this.timeoutId = null;
|
|
172
|
-
this.startTime = 0;
|
|
173
|
-
var _a, _b, _c, _d;
|
|
174
|
-
this.config = {
|
|
175
|
-
allowedGlobals: config.allowedGlobals || SAFE_GLOBALS,
|
|
176
|
-
forbiddenGlobals: config.forbiddenGlobals || DANGEROUS_GLOBALS,
|
|
177
|
-
allowConsole: (_a = config.allowConsole) != null ? _a : true,
|
|
178
|
-
allowTimers: (_b = config.allowTimers) != null ? _b : true,
|
|
179
|
-
timeout: config.timeout || 5e3,
|
|
180
|
-
strictMode: (_c = config.strictMode) != null ? _c : true,
|
|
181
|
-
customGlobals: config.customGlobals || {},
|
|
182
|
-
allowDOM: (_d = config.allowDOM) != null ? _d : false,
|
|
183
|
-
maxMemoryUsage: config.maxMemoryUsage || 10 * 1024 * 1024
|
|
184
|
-
// 10MB
|
|
185
|
-
};
|
|
186
|
-
this.sandboxGlobal = this.createSandboxGlobal();
|
|
187
|
-
this.globalProxy = this.createGlobalProxy();
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* 创建安全的 document 代理对象
|
|
191
|
-
* 允许访问 document 但限制敏感操作
|
|
192
|
-
*/
|
|
193
|
-
createSafeDocument() {
|
|
194
|
-
const safeDocument = {};
|
|
195
|
-
safeDocument.title = "Sandbox Document";
|
|
196
|
-
safeDocument.readyState = "complete";
|
|
197
|
-
safeDocument.documentURI = "about:blank";
|
|
198
|
-
safeDocument.URL = "about:blank";
|
|
199
|
-
safeDocument.domain = "";
|
|
200
|
-
safeDocument.origin = "null";
|
|
201
|
-
safeDocument.doctype = null;
|
|
202
|
-
safeDocument.documentElement = null;
|
|
203
|
-
safeDocument.body = null;
|
|
204
|
-
safeDocument.head = null;
|
|
205
|
-
Object.defineProperty(safeDocument, "cookie", {
|
|
206
|
-
get: () => "",
|
|
207
|
-
set: () => {
|
|
208
|
-
},
|
|
209
|
-
// 静默忽略设置
|
|
210
|
-
enumerable: true,
|
|
211
|
-
configurable: false
|
|
212
|
-
});
|
|
213
|
-
safeDocument.getElementById = () => null;
|
|
214
|
-
safeDocument.getElementsByClassName = () => [];
|
|
215
|
-
safeDocument.getElementsByTagName = () => [];
|
|
216
|
-
safeDocument.getElementsByName = () => [];
|
|
217
|
-
safeDocument.querySelector = () => null;
|
|
218
|
-
safeDocument.querySelectorAll = () => [];
|
|
219
|
-
safeDocument.createElement = (tagName) => ({
|
|
220
|
-
tagName: tagName.toUpperCase(),
|
|
221
|
-
id: "",
|
|
222
|
-
className: "",
|
|
223
|
-
innerHTML: "",
|
|
224
|
-
textContent: "",
|
|
225
|
-
setAttribute: () => {
|
|
226
|
-
},
|
|
227
|
-
getAttribute: () => null,
|
|
228
|
-
removeAttribute: () => {
|
|
229
|
-
},
|
|
230
|
-
appendChild: () => {
|
|
231
|
-
},
|
|
232
|
-
removeChild: () => {
|
|
233
|
-
},
|
|
234
|
-
addEventListener: () => {
|
|
235
|
-
},
|
|
236
|
-
removeEventListener: () => {
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
safeDocument.createTextNode = (data) => ({
|
|
240
|
-
nodeType: 3,
|
|
241
|
-
textContent: data,
|
|
242
|
-
data
|
|
243
|
-
});
|
|
244
|
-
safeDocument.createDocumentFragment = () => ({
|
|
245
|
-
nodeType: 11,
|
|
246
|
-
appendChild: () => {
|
|
247
|
-
},
|
|
248
|
-
querySelector: () => null,
|
|
249
|
-
querySelectorAll: () => []
|
|
250
|
-
});
|
|
251
|
-
return new Proxy(safeDocument, {
|
|
252
|
-
get: (target, prop, receiver) => {
|
|
253
|
-
const propStr = String(prop);
|
|
254
|
-
const dangerousDocumentProps = [
|
|
255
|
-
"location",
|
|
256
|
-
"defaultView",
|
|
257
|
-
"parentWindow",
|
|
258
|
-
"implementation",
|
|
259
|
-
"documentURI",
|
|
260
|
-
"execCommand",
|
|
261
|
-
"write",
|
|
262
|
-
"writeln",
|
|
263
|
-
"open",
|
|
264
|
-
"close",
|
|
265
|
-
"evaluate",
|
|
266
|
-
"createRange",
|
|
267
|
-
"getSelection",
|
|
268
|
-
"elementsFromPoint",
|
|
269
|
-
"elementFromPoint",
|
|
270
|
-
"hasFocus",
|
|
271
|
-
"hidden",
|
|
272
|
-
"visibilityState"
|
|
273
|
-
];
|
|
274
|
-
if (dangerousDocumentProps.includes(propStr)) {
|
|
275
|
-
return void 0;
|
|
276
|
-
}
|
|
277
|
-
if (propStr in target) {
|
|
278
|
-
return Reflect.get(target, prop, receiver);
|
|
279
|
-
}
|
|
280
|
-
return void 0;
|
|
281
|
-
},
|
|
282
|
-
set: (target, prop, value, receiver) => {
|
|
283
|
-
const propStr = String(prop);
|
|
284
|
-
const readOnlyProps = [
|
|
285
|
-
"title",
|
|
286
|
-
"readyState",
|
|
287
|
-
"documentURI",
|
|
288
|
-
"URL",
|
|
289
|
-
"domain",
|
|
290
|
-
"origin"
|
|
291
|
-
];
|
|
292
|
-
if (readOnlyProps.includes(propStr)) {
|
|
293
|
-
return false;
|
|
294
|
-
}
|
|
295
|
-
return Reflect.set(target, prop, value, receiver);
|
|
296
|
-
},
|
|
297
|
-
has: (target, prop) => {
|
|
298
|
-
const propStr = String(prop);
|
|
299
|
-
const dangerousDocumentProps = [
|
|
300
|
-
"location",
|
|
301
|
-
"defaultView",
|
|
302
|
-
"parentWindow",
|
|
303
|
-
"implementation",
|
|
304
|
-
"execCommand",
|
|
305
|
-
"write",
|
|
306
|
-
"writeln",
|
|
307
|
-
"open",
|
|
308
|
-
"close"
|
|
309
|
-
];
|
|
310
|
-
if (dangerousDocumentProps.includes(propStr)) {
|
|
311
|
-
return false;
|
|
312
|
-
}
|
|
313
|
-
return Reflect.has(target, prop);
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* 创建安全的 window 代理对象
|
|
319
|
-
* 允许访问 window 但限制敏感信息
|
|
320
|
-
*/
|
|
321
|
-
createSafeWindow(safeDocument) {
|
|
322
|
-
const sensitiveProperties = [
|
|
323
|
-
"cookie",
|
|
324
|
-
"localStorage",
|
|
325
|
-
"sessionStorage",
|
|
326
|
-
"indexedDB",
|
|
327
|
-
"location",
|
|
328
|
-
"history",
|
|
329
|
-
"navigator",
|
|
330
|
-
"parent",
|
|
331
|
-
"top",
|
|
332
|
-
"frames",
|
|
333
|
-
"opener",
|
|
334
|
-
"external",
|
|
335
|
-
"chrome",
|
|
336
|
-
"safari",
|
|
337
|
-
"opera",
|
|
338
|
-
"moz"
|
|
339
|
-
];
|
|
340
|
-
const safeWindow = {};
|
|
341
|
-
if (typeof window !== "undefined") {
|
|
342
|
-
safeWindow.innerWidth = 1024;
|
|
343
|
-
safeWindow.innerHeight = 768;
|
|
344
|
-
safeWindow.outerWidth = 1024;
|
|
345
|
-
safeWindow.outerHeight = 768;
|
|
346
|
-
safeWindow.devicePixelRatio = 1;
|
|
347
|
-
safeWindow.screen = {
|
|
348
|
-
width: 1920,
|
|
349
|
-
height: 1080,
|
|
350
|
-
availWidth: 1920,
|
|
351
|
-
availHeight: 1040,
|
|
352
|
-
colorDepth: 24,
|
|
353
|
-
pixelDepth: 24
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
safeWindow.Array = Array;
|
|
357
|
-
safeWindow.Object = Object;
|
|
358
|
-
safeWindow.String = String;
|
|
359
|
-
safeWindow.Number = Number;
|
|
360
|
-
safeWindow.Boolean = Boolean;
|
|
361
|
-
safeWindow.Date = Date;
|
|
362
|
-
safeWindow.Math = Math;
|
|
363
|
-
safeWindow.JSON = JSON;
|
|
364
|
-
safeWindow.RegExp = RegExp;
|
|
365
|
-
safeWindow.Error = Error;
|
|
366
|
-
safeWindow.TypeError = TypeError;
|
|
367
|
-
safeWindow.ReferenceError = ReferenceError;
|
|
368
|
-
safeWindow.SyntaxError = SyntaxError;
|
|
369
|
-
safeWindow.parseInt = parseInt;
|
|
370
|
-
safeWindow.parseFloat = parseFloat;
|
|
371
|
-
safeWindow.isNaN = isNaN;
|
|
372
|
-
safeWindow.isFinite = isFinite;
|
|
373
|
-
safeWindow.encodeURIComponent = encodeURIComponent;
|
|
374
|
-
safeWindow.decodeURIComponent = decodeURIComponent;
|
|
375
|
-
safeWindow.encodeURI = encodeURI;
|
|
376
|
-
safeWindow.decodeURI = decodeURI;
|
|
377
|
-
safeWindow.document = safeDocument || this.createSafeDocument();
|
|
378
|
-
if (this.config.allowConsole) {
|
|
379
|
-
safeWindow.console = {
|
|
380
|
-
log: console.log.bind(console),
|
|
381
|
-
warn: console.warn.bind(console),
|
|
382
|
-
error: console.error.bind(console),
|
|
383
|
-
info: console.info.bind(console),
|
|
384
|
-
debug: console.debug.bind(console)
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
return new Proxy(safeWindow, {
|
|
388
|
-
get: (target, prop, receiver) => {
|
|
389
|
-
const propStr = String(prop);
|
|
390
|
-
if (sensitiveProperties.includes(propStr)) {
|
|
391
|
-
switch (propStr) {
|
|
392
|
-
case "cookie":
|
|
393
|
-
return "";
|
|
394
|
-
case "localStorage":
|
|
395
|
-
case "sessionStorage":
|
|
396
|
-
return {
|
|
397
|
-
length: 0,
|
|
398
|
-
getItem: () => null,
|
|
399
|
-
setItem: () => {
|
|
400
|
-
},
|
|
401
|
-
removeItem: () => {
|
|
402
|
-
},
|
|
403
|
-
clear: () => {
|
|
404
|
-
},
|
|
405
|
-
key: () => null
|
|
406
|
-
};
|
|
407
|
-
case "location":
|
|
408
|
-
return {
|
|
409
|
-
href: "about:blank",
|
|
410
|
-
origin: "null",
|
|
411
|
-
protocol: "about:",
|
|
412
|
-
host: "",
|
|
413
|
-
hostname: "",
|
|
414
|
-
port: "",
|
|
415
|
-
pathname: "blank",
|
|
416
|
-
search: "",
|
|
417
|
-
hash: ""
|
|
418
|
-
};
|
|
419
|
-
case "navigator":
|
|
420
|
-
return {
|
|
421
|
-
userAgent: "Sandbox/1.0",
|
|
422
|
-
language: "en-US",
|
|
423
|
-
languages: ["en-US"],
|
|
424
|
-
platform: "Sandbox",
|
|
425
|
-
cookieEnabled: false,
|
|
426
|
-
onLine: true
|
|
427
|
-
};
|
|
428
|
-
default:
|
|
429
|
-
return void 0;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
if (propStr in target) {
|
|
433
|
-
return Reflect.get(target, prop, receiver);
|
|
434
|
-
}
|
|
435
|
-
return void 0;
|
|
436
|
-
},
|
|
437
|
-
set: (target, prop, value, receiver) => {
|
|
438
|
-
const propStr = String(prop);
|
|
439
|
-
if (sensitiveProperties.includes(propStr)) {
|
|
440
|
-
return false;
|
|
441
|
-
}
|
|
442
|
-
return Reflect.set(target, prop, value, receiver);
|
|
443
|
-
},
|
|
444
|
-
has: (target, prop) => {
|
|
445
|
-
const propStr = String(prop);
|
|
446
|
-
if (sensitiveProperties.includes(propStr)) {
|
|
447
|
-
return false;
|
|
448
|
-
}
|
|
449
|
-
return Reflect.has(target, prop);
|
|
450
|
-
},
|
|
451
|
-
ownKeys: (target) => {
|
|
452
|
-
const allKeys = Reflect.ownKeys(target);
|
|
453
|
-
return allKeys.filter(
|
|
454
|
-
(key) => !sensitiveProperties.includes(String(key))
|
|
455
|
-
);
|
|
456
|
-
},
|
|
457
|
-
getOwnPropertyDescriptor: (target, prop) => {
|
|
458
|
-
const propStr = String(prop);
|
|
459
|
-
if (sensitiveProperties.includes(propStr)) {
|
|
460
|
-
return void 0;
|
|
461
|
-
}
|
|
462
|
-
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* 创建安全的沙箱全局对象
|
|
468
|
-
*/
|
|
469
|
-
createSandboxGlobal() {
|
|
470
|
-
const sandboxGlobal = {};
|
|
471
|
-
for (const globalName of this.config.allowedGlobals) {
|
|
472
|
-
if (globalName in globalThis) {
|
|
473
|
-
sandboxGlobal[globalName] = globalThis[globalName];
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
Object.assign(sandboxGlobal, this.config.customGlobals);
|
|
477
|
-
const safeDocument = this.createSafeDocument();
|
|
478
|
-
const safeWindow = this.createSafeWindow(safeDocument);
|
|
479
|
-
sandboxGlobal.window = safeWindow;
|
|
480
|
-
sandboxGlobal.document = safeDocument;
|
|
481
|
-
if (this.config.allowConsole) {
|
|
482
|
-
sandboxGlobal.console = this.createSafeConsole();
|
|
483
|
-
}
|
|
484
|
-
if (this.config.allowTimers) {
|
|
485
|
-
sandboxGlobal.setTimeout = this.createSafeTimeout();
|
|
486
|
-
sandboxGlobal.setInterval = this.createSafeInterval();
|
|
487
|
-
sandboxGlobal.clearTimeout = clearTimeout;
|
|
488
|
-
sandboxGlobal.clearInterval = clearInterval;
|
|
489
|
-
}
|
|
490
|
-
sandboxGlobal.__checkInstructions = () => {
|
|
491
|
-
};
|
|
492
|
-
return sandboxGlobal;
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* 创建安全的 console 对象
|
|
496
|
-
*/
|
|
497
|
-
createSafeConsole() {
|
|
498
|
-
return {
|
|
499
|
-
log: (...args) => console.log("[Sandbox]", ...args),
|
|
500
|
-
warn: (...args) => console.warn("[Sandbox]", ...args),
|
|
501
|
-
error: (...args) => console.error("[Sandbox]", ...args),
|
|
502
|
-
info: (...args) => console.info("[Sandbox]", ...args),
|
|
503
|
-
debug: (...args) => console.debug("[Sandbox]", ...args)
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* 创建安全的 setTimeout
|
|
508
|
-
*/
|
|
509
|
-
createSafeTimeout() {
|
|
510
|
-
return (callback, delay, ...args) => {
|
|
511
|
-
if (typeof callback !== "function") {
|
|
512
|
-
throw new TypeError("Callback must be a function");
|
|
513
|
-
}
|
|
514
|
-
const safeCallback = () => {
|
|
515
|
-
try {
|
|
516
|
-
callback.apply(null, args);
|
|
517
|
-
} catch (error) {
|
|
518
|
-
console.error("[Sandbox] Timer callback error:", error);
|
|
519
|
-
}
|
|
520
|
-
};
|
|
521
|
-
return setTimeout(safeCallback, Math.min(delay, 1e3));
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* 创建安全的 setInterval
|
|
526
|
-
*/
|
|
527
|
-
createSafeInterval() {
|
|
528
|
-
return (callback, delay, ...args) => {
|
|
529
|
-
if (typeof callback !== "function") {
|
|
530
|
-
throw new TypeError("Callback must be a function");
|
|
531
|
-
}
|
|
532
|
-
const safeCallback = () => {
|
|
533
|
-
try {
|
|
534
|
-
callback.apply(null, args);
|
|
535
|
-
} catch (error) {
|
|
536
|
-
console.error("[Sandbox] Interval callback error:", error);
|
|
537
|
-
}
|
|
538
|
-
};
|
|
539
|
-
return setInterval(safeCallback, Math.max(delay, 100));
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* 创建全局对象的 Proxy
|
|
544
|
-
*/
|
|
545
|
-
createGlobalProxy() {
|
|
546
|
-
return new Proxy(this.sandboxGlobal, {
|
|
547
|
-
get: (target, prop, receiver) => {
|
|
548
|
-
const propStr = String(prop);
|
|
549
|
-
if (this.config.forbiddenGlobals.includes(propStr)) {
|
|
550
|
-
throw new ReferenceError(
|
|
551
|
-
`Access to '${propStr}' is not allowed in sandbox`
|
|
552
|
-
);
|
|
553
|
-
}
|
|
554
|
-
if (propStr === "__checkInstructions") {
|
|
555
|
-
return Reflect.get(target, prop, receiver);
|
|
556
|
-
}
|
|
557
|
-
if (this.config.allowedGlobals.includes(propStr)) {
|
|
558
|
-
if (propStr in target) {
|
|
559
|
-
return Reflect.get(target, prop, receiver);
|
|
560
|
-
}
|
|
561
|
-
if (propStr === "window" || propStr === "global" || propStr === "globalThis") {
|
|
562
|
-
return receiver;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
if (propStr in this.config.customGlobals) {
|
|
566
|
-
return Reflect.get(target, prop, receiver);
|
|
567
|
-
}
|
|
568
|
-
return void 0;
|
|
569
|
-
},
|
|
570
|
-
set: (target, prop, value, receiver) => {
|
|
571
|
-
const propStr = String(prop);
|
|
572
|
-
if (this.config.forbiddenGlobals.includes(propStr)) {
|
|
573
|
-
throw new ReferenceError(
|
|
574
|
-
`Setting '${propStr}' is not allowed in sandbox`
|
|
575
|
-
);
|
|
576
|
-
}
|
|
577
|
-
return Reflect.set(target, prop, value, receiver);
|
|
578
|
-
},
|
|
579
|
-
has: (target, prop) => {
|
|
580
|
-
const propStr = String(prop);
|
|
581
|
-
if (this.config.forbiddenGlobals.includes(propStr)) {
|
|
582
|
-
return false;
|
|
583
|
-
}
|
|
584
|
-
return this.config.allowedGlobals.includes(propStr) || Reflect.has(target, prop);
|
|
585
|
-
},
|
|
586
|
-
ownKeys: (target) => {
|
|
587
|
-
const allKeys = Reflect.ownKeys(target);
|
|
588
|
-
return allKeys.filter(
|
|
589
|
-
(key) => !this.config.forbiddenGlobals.includes(String(key))
|
|
590
|
-
);
|
|
591
|
-
},
|
|
592
|
-
getOwnPropertyDescriptor: (target, prop) => {
|
|
593
|
-
const propStr = String(prop);
|
|
594
|
-
if (this.config.forbiddenGlobals.includes(propStr)) {
|
|
595
|
-
return void 0;
|
|
596
|
-
}
|
|
597
|
-
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
/**
|
|
602
|
-
* 在沙箱中执行代码
|
|
603
|
-
*/
|
|
604
|
-
execute(code, injectedParams) {
|
|
605
|
-
return __async(this, null, function* () {
|
|
606
|
-
this.startTime = performance.now();
|
|
607
|
-
this.isActive = true;
|
|
608
|
-
let result;
|
|
609
|
-
let error;
|
|
610
|
-
let success = false;
|
|
611
|
-
try {
|
|
612
|
-
if (typeof Worker !== "undefined" && typeof URL !== "undefined") {
|
|
613
|
-
result = yield this.executeWithWorker(code, injectedParams);
|
|
614
|
-
} else {
|
|
615
|
-
if (this.isObviousInfiniteLoop(code)) {
|
|
616
|
-
result = yield this.executeWithInstructionLimit(code, injectedParams);
|
|
617
|
-
} else {
|
|
618
|
-
result = yield this.executeWithTimeout(code, injectedParams);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
success = true;
|
|
622
|
-
} catch (err) {
|
|
623
|
-
error = err instanceof Error ? err : new Error(String(err));
|
|
624
|
-
success = false;
|
|
625
|
-
} finally {
|
|
626
|
-
this.cleanup();
|
|
627
|
-
}
|
|
628
|
-
const executionTime = performance.now() - this.startTime;
|
|
629
|
-
return {
|
|
630
|
-
result,
|
|
631
|
-
success,
|
|
632
|
-
error,
|
|
633
|
-
executionTime,
|
|
634
|
-
memoryUsage: this.getMemoryUsage()
|
|
635
|
-
};
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
/**
|
|
639
|
-
* 检查是否是明显的死循环
|
|
640
|
-
*/
|
|
641
|
-
isObviousInfiniteLoop(code) {
|
|
642
|
-
const infiniteLoopPatterns = [
|
|
643
|
-
/while\s*\(\s*true\s*\)/,
|
|
644
|
-
/for\s*\(\s*;\s*;\s*\)/,
|
|
645
|
-
/while\s*\(\s*1\s*\)/,
|
|
646
|
-
/while\s*\(\s*!false\s*\)/
|
|
647
|
-
];
|
|
648
|
-
return infiniteLoopPatterns.some((pattern) => pattern.test(code));
|
|
649
|
-
}
|
|
650
|
-
/**
|
|
651
|
-
* 带超时的普通执行
|
|
652
|
-
*/
|
|
653
|
-
executeWithTimeout(code, injectedParams) {
|
|
654
|
-
return __async(this, null, function* () {
|
|
655
|
-
return new Promise((resolve, reject) => {
|
|
656
|
-
const timeoutId = setTimeout(() => {
|
|
657
|
-
reject(
|
|
658
|
-
new Error(`Code execution timeout after ${this.config.timeout}ms`)
|
|
659
|
-
);
|
|
660
|
-
}, this.config.timeout);
|
|
661
|
-
try {
|
|
662
|
-
const result = this.executeCode(code, injectedParams);
|
|
663
|
-
clearTimeout(timeoutId);
|
|
664
|
-
resolve(result);
|
|
665
|
-
} catch (error) {
|
|
666
|
-
clearTimeout(timeoutId);
|
|
667
|
-
reject(error);
|
|
668
|
-
}
|
|
669
|
-
});
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
/**
|
|
673
|
-
* 使用指令计数限制执行时间
|
|
674
|
-
*/
|
|
675
|
-
executeWithInstructionLimit(code, injectedParams) {
|
|
676
|
-
return __async(this, null, function* () {
|
|
677
|
-
return new Promise((resolve, reject) => {
|
|
678
|
-
const maxInstructions = 1e6;
|
|
679
|
-
let instructionCount = 0;
|
|
680
|
-
const startTime = performance.now();
|
|
681
|
-
const instrumentedCode = this.instrumentCode(code);
|
|
682
|
-
const originalGlobal = this.sandboxGlobal.__checkInstructions;
|
|
683
|
-
this.sandboxGlobal.__checkInstructions = () => {
|
|
684
|
-
instructionCount++;
|
|
685
|
-
const elapsed = performance.now() - startTime;
|
|
686
|
-
if (elapsed > this.config.timeout) {
|
|
687
|
-
throw new Error(
|
|
688
|
-
`Code execution timeout after ${this.config.timeout}ms`
|
|
689
|
-
);
|
|
690
|
-
}
|
|
691
|
-
if (instructionCount > maxInstructions && elapsed < 10) {
|
|
692
|
-
throw new Error(`Code execution exceeded maximum instruction limit`);
|
|
693
|
-
}
|
|
694
|
-
};
|
|
695
|
-
try {
|
|
696
|
-
const result = this.executeCode(instrumentedCode, injectedParams);
|
|
697
|
-
resolve(result);
|
|
698
|
-
} catch (error) {
|
|
699
|
-
reject(error);
|
|
700
|
-
} finally {
|
|
701
|
-
if (originalGlobal) {
|
|
702
|
-
this.sandboxGlobal.__checkInstructions = originalGlobal;
|
|
703
|
-
} else {
|
|
704
|
-
delete this.sandboxGlobal.__checkInstructions;
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
});
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
/**
|
|
711
|
-
* 在代码中注入指令计数器
|
|
712
|
-
*/
|
|
713
|
-
instrumentCode(code) {
|
|
714
|
-
let instrumented = code;
|
|
715
|
-
instrumented = instrumented.replace(
|
|
716
|
-
/(\bfor\s*\([^)]*\)\s*\{)/g,
|
|
717
|
-
"$1\n __checkInstructions();"
|
|
718
|
-
);
|
|
719
|
-
instrumented = instrumented.replace(
|
|
720
|
-
/(\bwhile\s*\([^)]*\)\s*\{)/g,
|
|
721
|
-
"$1\n __checkInstructions();"
|
|
722
|
-
);
|
|
723
|
-
instrumented = instrumented.replace(
|
|
724
|
-
/(\bdo\s*\{)/g,
|
|
725
|
-
"$1\n __checkInstructions();"
|
|
726
|
-
);
|
|
727
|
-
return `__checkInstructions();
|
|
728
|
-
${instrumented}`;
|
|
729
|
-
}
|
|
730
|
-
/**
|
|
731
|
-
* 使用 Worker 执行代码以实现真正的超时控制
|
|
732
|
-
*/
|
|
733
|
-
executeWithWorker(code, injectedParams) {
|
|
734
|
-
return new Promise((resolve, reject) => {
|
|
735
|
-
let serializableParams = {};
|
|
736
|
-
if (injectedParams) {
|
|
737
|
-
try {
|
|
738
|
-
for (const [key, value] of Object.entries(injectedParams)) {
|
|
739
|
-
try {
|
|
740
|
-
JSON.stringify(value);
|
|
741
|
-
serializableParams[key] = value;
|
|
742
|
-
} catch (e) {
|
|
743
|
-
console.warn(`无法序列化注入参数 "${key}",回退到同步执行`);
|
|
744
|
-
this.executeCode(code, injectedParams).then(resolve).catch(reject);
|
|
745
|
-
return;
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
} catch (error) {
|
|
749
|
-
console.warn("注入参数序列化检查失败,回退到同步执行");
|
|
750
|
-
try {
|
|
751
|
-
const result = this.executeCode(code, injectedParams);
|
|
752
|
-
resolve(result);
|
|
753
|
-
} catch (syncError) {
|
|
754
|
-
reject(syncError);
|
|
755
|
-
}
|
|
756
|
-
return;
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
const workerCode = `
|
|
760
|
-
self.onmessage = function(e) {
|
|
761
|
-
const { code, config, injectedParams } = e.data;
|
|
762
|
-
|
|
763
|
-
try {
|
|
764
|
-
// 创建安全的执行环境
|
|
765
|
-
const safeGlobals = {
|
|
766
|
-
Math, Date, JSON, parseInt, parseFloat, isNaN, isFinite,
|
|
767
|
-
encodeURIComponent, decodeURIComponent, encodeURI, decodeURI,
|
|
768
|
-
String, Number, Boolean, Array, Object, RegExp,
|
|
769
|
-
Error, TypeError, ReferenceError, SyntaxError
|
|
770
|
-
};
|
|
771
|
-
|
|
772
|
-
// 添加自定义全局变量
|
|
773
|
-
Object.assign(safeGlobals, config.customGlobals || {});
|
|
774
|
-
|
|
775
|
-
// 添加注入的参数
|
|
776
|
-
Object.assign(safeGlobals, injectedParams || {});
|
|
777
|
-
|
|
778
|
-
// 添加 console(如果允许)
|
|
779
|
-
if (config.allowConsole) {
|
|
780
|
-
safeGlobals.console = {
|
|
781
|
-
log: (...args) => self.postMessage({ type: 'log', data: args }),
|
|
782
|
-
warn: (...args) => self.postMessage({ type: 'warn', data: args }),
|
|
783
|
-
error: (...args) => self.postMessage({ type: 'error', data: args }),
|
|
784
|
-
info: (...args) => self.postMessage({ type: 'info', data: args }),
|
|
785
|
-
debug: (...args) => self.postMessage({ type: 'debug', data: args })
|
|
786
|
-
};
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
// 创建执行函数
|
|
790
|
-
const wrappedCode = config.strictMode ? "'use strict';\\n" + code : code;
|
|
791
|
-
const func = new Function(...Object.keys(safeGlobals), 'return (function() { ' + wrappedCode + ' })()');
|
|
792
|
-
|
|
793
|
-
// 执行代码
|
|
794
|
-
const result = func(...Object.values(safeGlobals));
|
|
795
|
-
|
|
796
|
-
self.postMessage({ type: 'result', data: result });
|
|
797
|
-
} catch (error) {
|
|
798
|
-
self.postMessage({ type: 'error', data: { message: error.message, stack: error.stack } });
|
|
799
|
-
}
|
|
800
|
-
};
|
|
801
|
-
`;
|
|
802
|
-
const blob = new Blob([workerCode], { type: "application/javascript" });
|
|
803
|
-
const workerUrl = URL.createObjectURL(blob);
|
|
804
|
-
let worker;
|
|
805
|
-
let timeoutId;
|
|
806
|
-
try {
|
|
807
|
-
worker = new Worker(workerUrl);
|
|
808
|
-
timeoutId = window.setTimeout(() => {
|
|
809
|
-
if (worker) {
|
|
810
|
-
worker.terminate();
|
|
811
|
-
}
|
|
812
|
-
URL.revokeObjectURL(workerUrl);
|
|
813
|
-
reject(
|
|
814
|
-
new Error(`Code execution timeout after ${this.config.timeout}ms`)
|
|
815
|
-
);
|
|
816
|
-
}, this.config.timeout);
|
|
817
|
-
worker.onmessage = (e) => {
|
|
818
|
-
const { type, data } = e.data;
|
|
819
|
-
if (type === "result") {
|
|
820
|
-
if (timeoutId)
|
|
821
|
-
clearTimeout(timeoutId);
|
|
822
|
-
if (worker)
|
|
823
|
-
worker.terminate();
|
|
824
|
-
URL.revokeObjectURL(workerUrl);
|
|
825
|
-
resolve(data);
|
|
826
|
-
} else if (type === "error") {
|
|
827
|
-
if (timeoutId)
|
|
828
|
-
clearTimeout(timeoutId);
|
|
829
|
-
if (worker)
|
|
830
|
-
worker.terminate();
|
|
831
|
-
URL.revokeObjectURL(workerUrl);
|
|
832
|
-
reject(new Error(data.message));
|
|
833
|
-
} else if (type === "log" || type === "warn" || type === "error" || type === "info" || type === "debug") {
|
|
834
|
-
if (this.config.allowConsole) {
|
|
835
|
-
const consoleMethod = console[type];
|
|
836
|
-
if (typeof consoleMethod === "function") {
|
|
837
|
-
consoleMethod("[Sandbox]", ...data);
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
};
|
|
842
|
-
worker.onerror = (error) => {
|
|
843
|
-
if (timeoutId)
|
|
844
|
-
clearTimeout(timeoutId);
|
|
845
|
-
if (worker)
|
|
846
|
-
worker.terminate();
|
|
847
|
-
URL.revokeObjectURL(workerUrl);
|
|
848
|
-
reject(new Error(`Worker error: ${error.message}`));
|
|
849
|
-
};
|
|
850
|
-
worker.postMessage({
|
|
851
|
-
code,
|
|
852
|
-
config: this.config,
|
|
853
|
-
injectedParams: serializableParams
|
|
854
|
-
});
|
|
855
|
-
} catch (error) {
|
|
856
|
-
if (timeoutId)
|
|
857
|
-
clearTimeout(timeoutId);
|
|
858
|
-
if (worker)
|
|
859
|
-
worker.terminate();
|
|
860
|
-
URL.revokeObjectURL(workerUrl);
|
|
861
|
-
try {
|
|
862
|
-
const result = this.executeCode(code, injectedParams);
|
|
863
|
-
resolve(result);
|
|
864
|
-
} catch (syncError) {
|
|
865
|
-
reject(syncError);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
/**
|
|
871
|
-
* 执行代码的核心方法(同步版本)
|
|
872
|
-
*/
|
|
873
|
-
executeCode(code, injectedParams) {
|
|
874
|
-
const wrappedCode = this.config.strictMode ? `'use strict';
|
|
875
|
-
${code}` : code;
|
|
876
|
-
this.validateCode(wrappedCode);
|
|
877
|
-
const allGlobals = __spreadValues(__spreadValues(__spreadValues({}, this.sandboxGlobal), this.config.customGlobals), injectedParams || {});
|
|
878
|
-
const allowedKeys = Object.keys(allGlobals);
|
|
879
|
-
const allowedValues = allowedKeys.map((key) => allGlobals[key]);
|
|
880
|
-
const funcCode = `
|
|
881
|
-
return (function(${allowedKeys.join(", ")}) {
|
|
882
|
-
${wrappedCode}
|
|
883
|
-
})(${allowedKeys.map((_, index) => `arguments[${index}]`).join(", ")});
|
|
884
|
-
`;
|
|
885
|
-
try {
|
|
886
|
-
const func = new Function(funcCode);
|
|
887
|
-
return func.apply(null, allowedValues);
|
|
888
|
-
} catch (error) {
|
|
889
|
-
if (error instanceof ReferenceError) {
|
|
890
|
-
const match = error.message.match(/(\w+) is not defined/);
|
|
891
|
-
if (match) {
|
|
892
|
-
const varName = match[1];
|
|
893
|
-
if (this.config.forbiddenGlobals.includes(varName)) {
|
|
894
|
-
throw new ReferenceError(
|
|
895
|
-
`Access to '${varName}' is not allowed in sandbox`
|
|
896
|
-
);
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
throw error;
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
/**
|
|
904
|
-
* 验证代码安全性
|
|
905
|
-
*/
|
|
906
|
-
validateCode(code) {
|
|
907
|
-
const dangerousPatterns = [
|
|
908
|
-
/\beval\s*\(/,
|
|
909
|
-
/\bFunction\s*\(/,
|
|
910
|
-
/new\s+Function\s*\(/,
|
|
911
|
-
/\.constructor/,
|
|
912
|
-
// 直接检查 .constructor 访问
|
|
913
|
-
/\.__proto__/,
|
|
914
|
-
/\.prototype\./,
|
|
915
|
-
/\bglobal\s*[.[]/,
|
|
916
|
-
/\bself\s*[.[]/,
|
|
917
|
-
/\bprocess\s*[.[]/,
|
|
918
|
-
/\brequire\s*\(/,
|
|
919
|
-
/\bimport\s*\(/,
|
|
920
|
-
/\bimportScripts\s*\(/
|
|
921
|
-
];
|
|
922
|
-
const globalThisPatterns = [
|
|
923
|
-
/\bglobalThis\s*\.\s*[a-zA-Z_$]/,
|
|
924
|
-
// globalThis.someProperty
|
|
925
|
-
/\bglobalThis\s*\[/,
|
|
926
|
-
// globalThis[someIndex]
|
|
927
|
-
/=\s*globalThis\b/,
|
|
928
|
-
// = globalThis
|
|
929
|
-
/\breturn\s+globalThis\b/
|
|
930
|
-
// return globalThis
|
|
931
|
-
];
|
|
932
|
-
for (const pattern of globalThisPatterns) {
|
|
933
|
-
if (pattern.test(code)) {
|
|
934
|
-
throw new Error(
|
|
935
|
-
"Code contains dangerous pattern: globalThis property access"
|
|
936
|
-
);
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
for (const pattern of dangerousPatterns) {
|
|
940
|
-
if (pattern.test(code)) {
|
|
941
|
-
throw new Error(`Code contains dangerous pattern: ${pattern.source}`);
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
const criticalForbiddenGlobals = [
|
|
945
|
-
"eval",
|
|
946
|
-
"Function",
|
|
947
|
-
"constructor",
|
|
948
|
-
"__proto__",
|
|
949
|
-
"global",
|
|
950
|
-
"self",
|
|
951
|
-
"process",
|
|
952
|
-
"require",
|
|
953
|
-
"module",
|
|
954
|
-
"exports",
|
|
955
|
-
"Buffer",
|
|
956
|
-
"XMLHttpRequest",
|
|
957
|
-
"fetch",
|
|
958
|
-
"WebSocket",
|
|
959
|
-
"Worker",
|
|
960
|
-
"SharedArrayBuffer",
|
|
961
|
-
"Atomics",
|
|
962
|
-
"WebAssembly"
|
|
963
|
-
];
|
|
964
|
-
for (const forbiddenGlobal of criticalForbiddenGlobals) {
|
|
965
|
-
const patterns = [
|
|
966
|
-
new RegExp(`\\b${forbiddenGlobal}\\s*\\(`, "g"),
|
|
967
|
-
// 函数调用
|
|
968
|
-
new RegExp(`\\b${forbiddenGlobal}\\s*\\.`, "g"),
|
|
969
|
-
// 属性访问
|
|
970
|
-
new RegExp(`\\b${forbiddenGlobal}\\s*\\[`, "g"),
|
|
971
|
-
// 索引访问
|
|
972
|
-
new RegExp(`\\breturn\\s+${forbiddenGlobal}\\b`, "g"),
|
|
973
|
-
// 直接返回
|
|
974
|
-
new RegExp(`=\\s*${forbiddenGlobal}\\b`, "g")
|
|
975
|
-
// 赋值
|
|
976
|
-
];
|
|
977
|
-
for (const pattern of patterns) {
|
|
978
|
-
if (pattern.test(code)) {
|
|
979
|
-
throw new ReferenceError(
|
|
980
|
-
`Access to '${forbiddenGlobal}' is not allowed in sandbox`
|
|
981
|
-
);
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
/**
|
|
987
|
-
* 获取内存使用情况
|
|
988
|
-
*/
|
|
989
|
-
getMemoryUsage() {
|
|
990
|
-
if ("memory" in performance) {
|
|
991
|
-
return performance.memory.usedJSHeapSize;
|
|
992
|
-
}
|
|
993
|
-
return 0;
|
|
994
|
-
}
|
|
995
|
-
/**
|
|
996
|
-
* 清理资源
|
|
997
|
-
*/
|
|
998
|
-
cleanup() {
|
|
999
|
-
this.isActive = false;
|
|
1000
|
-
if (this.timeoutId !== null) {
|
|
1001
|
-
clearTimeout(this.timeoutId);
|
|
1002
|
-
this.timeoutId = null;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
/**
|
|
1006
|
-
* 销毁沙箱
|
|
1007
|
-
*/
|
|
1008
|
-
destroy() {
|
|
1009
|
-
this.cleanup();
|
|
1010
|
-
Object.keys(this.sandboxGlobal).forEach((key) => {
|
|
1011
|
-
delete this.sandboxGlobal[key];
|
|
1012
|
-
});
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* 检查沙箱是否处于活动状态
|
|
1016
|
-
*/
|
|
1017
|
-
isRunning() {
|
|
1018
|
-
return this.isActive;
|
|
1019
|
-
}
|
|
1020
|
-
/**
|
|
1021
|
-
* 添加自定义全局变量
|
|
1022
|
-
*/
|
|
1023
|
-
addGlobal(name, value) {
|
|
1024
|
-
if (this.config.forbiddenGlobals.includes(name)) {
|
|
1025
|
-
throw new Error(`Cannot add forbidden global: ${name}`);
|
|
1026
|
-
}
|
|
1027
|
-
this.sandboxGlobal[name] = value;
|
|
1028
|
-
this.config.customGlobals[name] = value;
|
|
1029
|
-
}
|
|
1030
|
-
/**
|
|
1031
|
-
* 移除自定义全局变量
|
|
1032
|
-
*/
|
|
1033
|
-
removeGlobal(name) {
|
|
1034
|
-
delete this.sandboxGlobal[name];
|
|
1035
|
-
delete this.config.customGlobals[name];
|
|
1036
|
-
}
|
|
1037
|
-
/**
|
|
1038
|
-
* 获取沙箱配置
|
|
1039
|
-
*/
|
|
1040
|
-
getConfig() {
|
|
1041
|
-
return __spreadValues({}, this.config);
|
|
1042
|
-
}
|
|
1043
|
-
};
|
|
1044
|
-
function createSandbox(config) {
|
|
1045
|
-
return new ProxySandbox(config);
|
|
1046
|
-
}
|
|
1047
|
-
function runInSandbox(code, config, injectedParams) {
|
|
1048
|
-
return __async(this, null, function* () {
|
|
1049
|
-
const sandbox = createSandbox(config);
|
|
1050
|
-
try {
|
|
1051
|
-
return yield sandbox.execute(code, injectedParams);
|
|
1052
|
-
} finally {
|
|
1053
|
-
sandbox.destroy();
|
|
1054
|
-
}
|
|
1055
|
-
});
|
|
1056
|
-
}
|
|
1057
|
-
export {
|
|
1058
|
-
ProxySandbox,
|
|
1059
|
-
createSandbox,
|
|
1060
|
-
runInSandbox
|
|
1061
|
-
};
|