├── .editorconfig ├── .eslintignore ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ ├── feaure_request.yml │ └── others.md ├── PULL_REQUEST_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE │ └── pr_cn.md ├── labeler.yml └── workflows │ ├── labeler.yml │ ├── pr-check.yml │ ├── pre-release.yml │ ├── release-changelog.yml │ ├── release.yml │ ├── stale.yml │ ├── sync-main-to-develop.yml │ └── unit-test.yml ├── .gitignore ├── .lintstagedrc ├── .prettierignore ├── .prettierrc.js ├── .vscode └── settings.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CONTRIBUTING.zh-CN.md ├── LICENSE ├── README-ja.md ├── README.md ├── common ├── autoinstallers │ ├── create │ │ ├── README.md │ │ ├── package.json │ │ ├── pnpm-lock.yaml │ │ ├── src │ │ │ ├── cli.ts │ │ │ ├── create.ts │ │ │ ├── global.d.ts │ │ │ ├── logger.ts │ │ │ └── template.ts │ │ ├── templates │ │ │ └── library │ │ │ │ ├── .eslintrc.js │ │ │ │ ├── README.md │ │ │ │ ├── bundler.config.js │ │ │ │ ├── package.json │ │ │ │ ├── src │ │ │ │ ├── global.d.ts │ │ │ │ └── index.ts │ │ │ │ ├── tsconfig.json │ │ │ │ └── vite │ │ │ │ ├── index.html │ │ │ │ ├── public │ │ │ │ └── vite.svg │ │ │ │ ├── src │ │ │ │ ├── App.css │ │ │ │ ├── App.tsx │ │ │ │ ├── assets │ │ │ │ │ └── react.svg │ │ │ │ ├── index.css │ │ │ │ ├── main.tsx │ │ │ │ └── vite-env.d.ts │ │ │ │ ├── tsconfig.json │ │ │ │ ├── tsconfig.node.json │ │ │ │ └── vite.config.ts │ │ └── tsconfig.json │ ├── lint │ │ ├── change-all.ts │ │ ├── commit-lint.js │ │ ├── commitlint.config.js │ │ ├── package.json │ │ ├── pnpm-lock.yaml │ │ ├── prettier.ts │ │ └── tsconfig.json │ └── run-script │ │ ├── package.json │ │ ├── pnpm-lock.yaml │ │ ├── run.ts │ │ └── tsconfig.json ├── config │ └── rush │ │ ├── .npmrc │ │ ├── .npmrc-publish │ │ ├── .pnpmfile.cjs │ │ ├── artifactory.json │ │ ├── build-cache.json │ │ ├── command-line.json │ │ ├── common-versions.json │ │ ├── experiments.json │ │ ├── pnpm-config.json │ │ ├── pnpm-lock.yaml │ │ ├── repo-state.json │ │ ├── rush-plugins.json │ │ └── version-policies.json ├── git-hooks │ ├── commit-msg │ ├── pre-commit │ └── pre-push ├── scripts │ ├── apply-prerelease-version.js │ ├── apply-release-version.js │ ├── get-package-json.js │ ├── hotfix-release.js │ ├── install-run-rush-pnpm.js │ ├── install-run-rush.js │ ├── install-run-rushx.js │ ├── install-run.js │ ├── parse-version.js │ ├── pre-release.js │ ├── release.js │ ├── set-json-file.js │ ├── set-prerelease-version.js │ ├── sort_deps.js │ └── version-policies.js └── template │ ├── chart.d.ts │ ├── chart.js │ ├── component.d.ts │ ├── component.js │ ├── core.d.ts │ ├── core.js │ ├── layout.d.ts │ ├── layout.js │ ├── mark.d.ts │ ├── mark.js │ ├── series.d.ts │ └── series.js ├── docs ├── assets │ ├── api │ │ ├── en │ │ │ ├── VMind_Instance.md │ │ │ ├── dataQuery.md │ │ │ ├── fillSpecWithData.md │ │ │ ├── generateChart.md │ │ │ ├── getFieldInfo.md │ │ │ ├── getInsights.md │ │ │ ├── parseCSVData.md │ │ │ └── text2Chart.md │ │ ├── menu.json │ │ └── zh │ │ │ ├── VMind_Instance.md │ │ │ ├── dataQuery.md │ │ │ ├── fillSpecWithData.md │ │ │ ├── generateChart.md │ │ │ ├── getFieldInfo.md │ │ │ ├── getInsights.md │ │ │ ├── parseCSVData.md │ │ │ └── text2Chart.md │ ├── changelog │ │ ├── en │ │ │ └── release.md │ │ └── zh │ │ │ └── release.md │ ├── guide │ │ ├── en │ │ │ ├── Basic_Tutorial │ │ │ │ ├── Chart_Advisor.md │ │ │ │ ├── Chart_Generation.md │ │ │ │ ├── Chart_Insight.md │ │ │ │ ├── Create_VMind_Instance.md │ │ │ │ ├── Data_Aggregation.md │ │ │ │ ├── Data_Extraction.md │ │ │ │ ├── Data_Process.md │ │ │ │ ├── How_to_Get_VMind.md │ │ │ │ └── How_to_Import_VMind.md │ │ │ ├── Contribution_Guide.md │ │ │ ├── Getting_Started │ │ │ │ ├── Getting_Started.md │ │ │ │ └── Quickly_Get_Started_with_VisActor_Using_Trae_Context_Doc.md │ │ │ ├── Intro_to_VMind.md │ │ │ └── VMind_Website_Guide.md │ │ ├── menu.json │ │ └── zh │ │ │ ├── Basic_Tutorial │ │ │ ├── Chart_Advisor.md │ │ │ ├── Chart_Generation.md │ │ │ ├── Chart_Insight.md │ │ │ ├── Create_VMind_Instance.md │ │ │ ├── Data_Aggregation.md │ │ │ ├── Data_Extraction.md │ │ │ ├── Data_Process.md │ │ │ ├── How_to_Get_VMind.md │ │ │ └── How_to_Import_VMind.md │ │ │ ├── Contribution_Guide.md │ │ │ ├── Getting_Started │ │ │ ├── Getting_Started.md │ │ │ └── Quickly_Get_Started_with_VisActor_Using_Trae_Context_Doc.md │ │ │ ├── Intro_to_VMind.md │ │ │ └── VMind_Website_Guide.md │ ├── openManus │ │ ├── Amazon_Fashion_Sales_Analysis_Report.md │ │ ├── Readme.md │ │ ├── amazon_sales_jan2025.csv │ │ ├── aov_trend.png │ │ ├── correlation_heatmap.png │ │ ├── daily_sales_trend.png │ │ ├── home │ │ │ └── ubuntu │ │ │ │ ├── analysis │ │ │ │ ├── data_exploration.txt │ │ │ │ ├── preprocessing_results.txt │ │ │ │ └── sales_analysis_results.txt │ │ │ │ └── todo.md │ │ ├── key_insights.md │ │ ├── orders_by_day.png │ │ ├── outlier_comparison.png │ │ ├── profit_margin_by_discount.png │ │ ├── sales_by_day.png │ │ ├── sales_growth_strategies.md │ │ ├── weekend_comparison.png │ │ └── weekly_sales.png │ └── scenario │ │ ├── en │ │ ├── Chart_Assistant.md │ │ ├── Data_Development.md │ │ ├── Data_Video.md │ │ ├── Document_Assistant.md │ │ ├── OpenManus_VMind.md │ │ ├── Open_API.md │ │ └── Wordcloud_Cube.md │ │ ├── menu.json │ │ └── zh │ │ ├── Chart_Assistant.md │ │ ├── Data_Development.md │ │ ├── Data_Video.md │ │ ├── Document_Assistant.md │ │ ├── OpenManus_VMind.md │ │ ├── Open_API.md │ │ └── Wordcloud_Cube.md ├── index.html ├── index.js ├── libs │ └── template-parse │ │ ├── build.js │ │ ├── etpl.js │ │ ├── md2json.js │ │ └── schemaHelper.js ├── menu.json ├── package.json ├── src │ ├── app.tsx │ ├── header.tsx │ ├── i18n.tsx │ ├── main.tsx │ ├── markdown.tsx │ ├── option.tsx │ └── option │ │ ├── description.tsx │ │ ├── index.css │ │ ├── index.tsx │ │ └── outline.tsx ├── style.css ├── tsconfig.json ├── tsconfig.node.json └── vite.config.js ├── option ├── packages ├── calculator │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── astParser │ │ │ ├── astPipes.ts │ │ │ ├── index.ts │ │ │ ├── parseSqlAST.ts │ │ │ ├── type.ts │ │ │ └── utils.ts │ │ ├── index.ts │ │ ├── join.test.ts │ │ ├── join.ts │ │ ├── mocks │ │ │ ├── index.ts │ │ │ └── table.ts │ │ ├── pipe.ts │ │ ├── pipes │ │ │ ├── aggregate │ │ │ │ ├── aggregate.ts │ │ │ │ ├── index.ts │ │ │ │ └── methods.ts │ │ │ ├── distinct.test.ts │ │ │ ├── distinct.ts │ │ │ ├── filter │ │ │ │ ├── filter.ts │ │ │ │ ├── having.test.ts │ │ │ │ ├── having.ts │ │ │ │ ├── index.ts │ │ │ │ ├── where.test.ts │ │ │ │ └── where.ts │ │ │ ├── group.test.ts │ │ │ ├── group.ts │ │ │ ├── index.ts │ │ │ ├── limit.ts │ │ │ ├── order.test.ts │ │ │ ├── order.ts │ │ │ ├── select.test.ts │ │ │ └── select.ts │ │ ├── query.test.ts │ │ ├── query.ts │ │ ├── types │ │ │ ├── aggregate.ts │ │ │ ├── data.ts │ │ │ ├── filter.ts │ │ │ ├── group.ts │ │ │ ├── index.ts │ │ │ ├── join.ts │ │ │ ├── query.ts │ │ │ └── select.ts │ │ └── utils │ │ │ ├── includes.ts │ │ │ ├── index.ts │ │ │ ├── ordered.ts │ │ │ └── typeCheck.ts │ ├── tsconfig.cjs.json │ ├── tsconfig.esm.json │ ├── tsconfig.json │ └── tsconfig.test.json ├── chart-advisor │ ├── .eslintrc.cjs │ ├── LICENSE │ ├── README.md │ ├── __tests__ │ │ ├── Q1.test.ts │ │ ├── base.test.ts │ │ ├── score.test.ts │ │ └── tsconfig.json │ ├── exampleChart.png │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── constant.ts │ │ ├── dataUtil.ts │ │ ├── fieldAssign.ts │ │ ├── fieldUtils.ts │ │ ├── index.ts │ │ ├── pivot.ts │ │ ├── score.ts │ │ └── type.ts │ ├── tsconfig.cjs.json │ ├── tsconfig.eslint.json │ ├── tsconfig.esm.json │ ├── tsconfig.json │ └── tsconfig.test.json └── vmind │ ├── .eslintrc.cjs │ ├── CHANGELOG.json │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ ├── browser │ │ ├── index.html │ │ ├── src │ │ │ ├── App.tsx │ │ │ ├── Layout.tsx │ │ │ ├── constants │ │ │ │ ├── capcutData.ts │ │ │ │ ├── chartGeneratorData.ts │ │ │ │ ├── mockData.ts │ │ │ │ └── mockResponse.ts │ │ │ ├── index.scss │ │ │ ├── index.tsx │ │ │ └── pages │ │ │ │ ├── ChartGeneration │ │ │ │ ├── ChartGeneration.tsx │ │ │ │ ├── ChartPreview.tsx │ │ │ │ └── DataInput.tsx │ │ │ │ ├── DataExtraction │ │ │ │ ├── DataExtractionPage.tsx │ │ │ │ ├── DataInput.tsx │ │ │ │ └── DataTable.tsx │ │ │ │ ├── Home.tsx │ │ │ │ ├── Insight │ │ │ │ ├── ChartPreview.tsx │ │ │ │ ├── DataInput.tsx │ │ │ │ ├── Insight.tsx │ │ │ │ └── data │ │ │ │ │ ├── index.ts │ │ │ │ │ └── insightData.ts │ │ │ │ ├── NewChartGeneration │ │ │ │ ├── ChartGeneration.tsx │ │ │ │ ├── ChartPreview.tsx │ │ │ │ └── DataInput.tsx │ │ │ │ ├── NewDataExtraction │ │ │ │ ├── DataInput.tsx │ │ │ │ ├── DataTable.tsx │ │ │ │ └── index.tsx │ │ │ │ ├── Text2Chart │ │ │ │ ├── ChartPreview.tsx │ │ │ │ ├── DataInput.tsx │ │ │ │ └── TextToChart.tsx │ │ │ │ ├── constants.tsx │ │ │ │ └── index.scss │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── experiment │ │ ├── index.html │ │ ├── src │ │ │ ├── App.tsx │ │ │ ├── Layout.tsx │ │ │ ├── data │ │ │ │ ├── capcutDataCn.ts │ │ │ │ ├── capcutDataEn.ts │ │ │ │ ├── capcutV2Data.ts │ │ │ │ ├── dataExtractionData.ts │ │ │ │ ├── editorData.ts │ │ │ │ ├── qaData.ts │ │ │ │ └── topKeyQA.ts │ │ │ ├── index.scss │ │ │ ├── index.tsx │ │ │ ├── pages │ │ │ │ ├── ChartDialogueQA │ │ │ │ │ ├── color.scss │ │ │ │ │ ├── const.ts │ │ │ │ │ ├── logo.tsx │ │ │ │ │ ├── qaPairRag.tsx │ │ │ │ │ ├── rag.scss │ │ │ │ │ ├── specEditor.tsx │ │ │ │ │ └── test.tsx │ │ │ │ ├── ChartGenerator │ │ │ │ │ ├── caseStudy.tsx │ │ │ │ │ ├── test.tsx │ │ │ │ │ └── type.tsx │ │ │ │ ├── DataExtraction │ │ │ │ │ ├── caseStudy.tsx │ │ │ │ │ ├── test.tsx │ │ │ │ │ ├── type.tsx │ │ │ │ │ └── verify.tsx │ │ │ │ ├── Home.tsx │ │ │ │ ├── constants.tsx │ │ │ │ └── page.scss │ │ │ └── utils.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── image-to-spec │ │ ├── spec │ │ │ ├── area-basis.ts │ │ │ ├── area-percent.ts │ │ │ ├── bar-basic.ts │ │ │ ├── bar-bi-direction.ts │ │ │ ├── bar-colorful.ts │ │ │ ├── bar-gradient.ts │ │ │ ├── bar-group.ts │ │ │ ├── bar-h-group.ts │ │ │ ├── bar-h-stack.ts │ │ │ ├── bar-horizontal.ts │ │ │ ├── bar-percent.ts │ │ │ ├── bar-stack.ts │ │ │ ├── bar-tgi.ts │ │ │ ├── bar-two-directions.ts │ │ │ ├── circle-packing-bubble.ts │ │ │ ├── circle-packing-simple.ts │ │ │ ├── circular-progress.ts │ │ │ ├── dual-axis.ts │ │ │ ├── funnel-basic.ts │ │ │ ├── funnel-comparative.ts │ │ │ ├── funnel-rect.ts │ │ │ ├── funnel-transform.ts │ │ │ ├── gauge-basic.ts │ │ │ ├── gauge-segment.ts │ │ │ ├── heatmap-basic.ts │ │ │ ├── histogram-basic.ts │ │ │ ├── histogram-different-bin.ts │ │ │ ├── index.ts │ │ │ ├── line-bar.ts │ │ │ ├── line-basic.ts │ │ │ ├── line-mark-area.ts │ │ │ ├── line-markline.ts │ │ │ ├── line-multi-markline.ts │ │ │ ├── line-stack.ts │ │ │ ├── linear-grogress-segment.ts │ │ │ ├── linear-progress.ts │ │ │ ├── liquid-basic.ts │ │ │ ├── liquid-star.ts │ │ │ ├── pie-basic.ts │ │ │ ├── pie-donut.ts │ │ │ ├── pie-nested.ts │ │ │ ├── radar-basic.ts │ │ │ ├── radar-group.ts │ │ │ ├── radar-innerradius.ts │ │ │ ├── radar-stack.ts │ │ │ ├── range-bar.ts │ │ │ ├── range-column.ts │ │ │ ├── rose-basis.ts │ │ │ ├── rose-group-stack.ts │ │ │ ├── rose-group.ts │ │ │ ├── rose-stack.ts │ │ │ ├── sankey-simple.ts │ │ │ ├── scatter-basic.ts │ │ │ ├── scatter-bubble.ts │ │ │ ├── scatter-markline.ts │ │ │ ├── sunburst-basic.ts │ │ │ ├── treemap.ts │ │ │ ├── venn-hollow.ts │ │ │ ├── venn-three.ts │ │ │ ├── waterfall-collect.ts │ │ │ ├── waterfall-h.ts │ │ │ ├── waterfall-stack.ts │ │ │ ├── waterfall.ts │ │ │ └── wordcloud-basic.ts │ │ └── testImage.ts │ ├── performance │ │ ├── output.json │ │ └── performance.test.ts │ ├── tsconfig.json │ └── unit │ │ ├── chartGenerator │ │ ├── chartTypeUtils.test.ts │ │ ├── checkChartTypeAndCell.test.ts │ │ └── simpleSpec.test.ts │ │ ├── index.test.ts │ │ ├── specInsights │ │ ├── dual-axis.test.ts │ │ ├── growth-markline.test.ts │ │ └── stacked-bar.test.ts │ │ ├── utils │ │ ├── date.test.ts │ │ ├── delete.test.ts │ │ └── set.test.ts │ │ └── vchartSpec │ │ ├── bar.test.ts │ │ ├── commonChart.test.ts │ │ ├── components │ │ └── markLine.test.ts │ │ ├── stack-bar.test.ts │ │ └── util.test.ts │ ├── bundler.config.js │ ├── jest.config.js │ ├── jest.performance.config.js │ ├── package.json │ ├── readme-zh.md │ ├── src │ ├── applications │ │ ├── chartGeneration │ │ │ └── index.ts │ │ ├── dataAggregation │ │ │ └── index.ts │ │ ├── dataExtraction │ │ │ └── index.ts │ │ ├── dataInsight │ │ │ └── index.ts │ │ ├── index.ts │ │ └── utils.ts │ ├── atom │ │ ├── VChartSpec │ │ │ ├── index.ts │ │ │ └── utils.ts │ │ ├── base.ts │ │ ├── chartCommand │ │ │ ├── index.ts │ │ │ ├── multiple.ts │ │ │ └── prompt.ts │ │ ├── chartGenerator │ │ │ ├── advisor │ │ │ │ └── index.ts │ │ │ ├── const.ts │ │ │ ├── index.ts │ │ │ ├── llmResultRevise.ts │ │ │ ├── prompt │ │ │ │ ├── examples.ts │ │ │ │ ├── index.ts │ │ │ │ └── knowledges.ts │ │ │ ├── rule │ │ │ │ └── index.ts │ │ │ ├── spec │ │ │ │ ├── chartTypeUtils.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ └── transformers │ │ │ │ │ ├── bar.ts │ │ │ │ │ ├── boxplot.ts │ │ │ │ │ ├── cartesian.ts │ │ │ │ │ ├── circlePacking.ts │ │ │ │ │ ├── circularProgress.ts │ │ │ │ │ ├── common.ts │ │ │ │ │ ├── dualAxis.ts │ │ │ │ │ ├── funnel.ts │ │ │ │ │ ├── gauge.ts │ │ │ │ │ ├── heatmap.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── line.ts │ │ │ │ │ ├── linearProgress.ts │ │ │ │ │ ├── liquid.ts │ │ │ │ │ ├── map.ts │ │ │ │ │ ├── pie.ts │ │ │ │ │ ├── polar.ts │ │ │ │ │ ├── radar.ts │ │ │ │ │ ├── rangeColumn.ts │ │ │ │ │ ├── rankingBar.ts │ │ │ │ │ ├── rose.ts │ │ │ │ │ ├── sankey.ts │ │ │ │ │ ├── scatter.ts │ │ │ │ │ ├── simpleSpec.ts │ │ │ │ │ ├── sunburst.ts │ │ │ │ │ ├── treemap.ts │ │ │ │ │ ├── venn.ts │ │ │ │ │ ├── waterfall.ts │ │ │ │ │ └── wordcloud.ts │ │ │ ├── type.ts │ │ │ └── utils.ts │ │ ├── chartQAExtraction │ │ │ ├── index.ts │ │ │ └── prompt.ts │ │ ├── customAtom │ │ │ └── index.ts │ │ ├── dataClean │ │ │ ├── dataClean.ts │ │ │ ├── index.ts │ │ │ ├── multiple.ts │ │ │ └── utils.ts │ │ ├── dataExtraction │ │ │ ├── index.ts │ │ │ └── prompt │ │ │ │ ├── capcutPrompt.ts │ │ │ │ ├── doubaoPrompt.ts │ │ │ │ ├── gptPrompt.ts │ │ │ │ └── prompt.ts │ │ ├── dataInsight │ │ │ ├── algorithms │ │ │ │ ├── abnormalTrend │ │ │ │ │ └── index.ts │ │ │ │ ├── base │ │ │ │ │ └── baseStatistics.ts │ │ │ │ ├── correlation │ │ │ │ │ ├── pearson.ts │ │ │ │ │ └── spearman.ts │ │ │ │ ├── drift │ │ │ │ │ ├── adwin.ts │ │ │ │ │ ├── bucket.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── pageHinkley.ts │ │ │ │ ├── extremeValue │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── majorityValue │ │ │ │ │ └── index.ts │ │ │ │ ├── outlier │ │ │ │ │ ├── dbscan.ts │ │ │ │ │ ├── difference.ts │ │ │ │ │ ├── lof.ts │ │ │ │ │ └── statistics.ts │ │ │ │ ├── overallTrending │ │ │ │ │ └── index.ts │ │ │ │ ├── revised.ts │ │ │ │ ├── statistics.ts │ │ │ │ ├── template.ts │ │ │ │ ├── turningPoint │ │ │ │ │ └── index.ts │ │ │ │ └── volatility │ │ │ │ │ └── index.ts │ │ │ ├── const.ts │ │ │ ├── dataProcess.ts │ │ │ ├── index.ts │ │ │ ├── prompt.ts │ │ │ ├── type.ts │ │ │ └── utils.ts │ │ ├── dataQuery │ │ │ ├── const.ts │ │ │ ├── executeQuery.ts │ │ │ ├── index.ts │ │ │ ├── prompt.ts │ │ │ └── utils.ts │ │ ├── imageReader │ │ │ ├── index.ts │ │ │ ├── interface.ts │ │ │ └── prompt.ts │ │ ├── index.ts │ │ └── specInsight │ │ │ └── index.ts │ ├── core │ │ ├── VMind.ts │ │ ├── factory.ts │ │ ├── llm.ts │ │ ├── memory.ts │ │ └── rag.ts │ ├── index.ts │ ├── schedule │ │ └── index.ts │ ├── types │ │ ├── atom.ts │ │ ├── base.ts │ │ ├── chart.ts │ │ ├── index.ts │ │ ├── llm.ts │ │ ├── rag.ts │ │ ├── schedule.ts │ │ └── utils.ts │ └── utils │ │ ├── cluster.ts │ │ ├── common.ts │ │ ├── dataTable.ts │ │ ├── field.ts │ │ ├── json.ts │ │ ├── llm.ts │ │ ├── set.ts │ │ ├── spec.ts │ │ ├── text.ts │ │ ├── unfold.ts │ │ └── video.ts │ ├── test-setup.js │ ├── tsconfig.eslint.json │ ├── tsconfig.json │ ├── tsconfig.test.json │ └── types │ └── jstat.d.ts ├── readme-zh.md ├── rush.json ├── share ├── eslint-config │ ├── package.json │ └── profile │ │ ├── common.js │ │ ├── lib.js │ │ └── react.js ├── jest-config │ ├── jest.base.js │ └── package.json └── ts-config │ ├── package.json │ └── tsconfig.base.json └── tools ├── bundler ├── .eslintrc.js ├── README.md ├── bin │ └── index.js ├── fixtures │ └── config │ │ ├── .gitignore │ │ ├── bundler.config.js │ │ ├── package.json │ │ ├── source │ │ ├── custom.css │ │ ├── foo │ │ │ ├── bar │ │ │ │ ├── index.ts │ │ │ │ └── web.png │ │ │ └── index.ts │ │ ├── global.d.ts │ │ ├── index.ts │ │ └── utils │ │ │ └── index.ts │ │ └── tsconfig.json ├── package.json ├── src │ ├── bootstrap.ts │ ├── global.d.ts │ ├── index.ts │ ├── logic │ │ ├── alias.ts │ │ ├── babel.config.ts │ │ ├── config.test.ts │ │ ├── config.ts │ │ ├── debug.ts │ │ ├── package.ts │ │ └── rollup.config.ts │ └── tasks │ │ ├── clean.ts │ │ ├── copy.ts │ │ ├── modules.ts │ │ ├── style.ts │ │ └── umd.ts ├── tsconfig.json └── vitest.config.ts └── typescript-json-schema ├── README.md ├── bin └── typescript-json-schema ├── package.json ├── tsconfig.json ├── typescript-json-schema-cli.ts ├── typescript-json-schema.ts └── vchart.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | tools/typescript-json-schema 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Don't allow people to merge changes to these generated files, because the result 2 | # may be invalid. You need to run "rush update" again. 3 | pnpm-lock.yaml merge=text 4 | shrinkwrap.yaml merge=binary 5 | npm-shrinkwrap.json merge=binary 6 | yarn.lock merge=binary 7 | 8 | # Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic 9 | # syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor 10 | # may also require a special configuration to allow comments in JSON. 11 | # 12 | # For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088 13 | # 14 | *.json linguist-language=JSON-with-Comments 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | # contact_links: 3 | # - name: @VisaActor/VChart 4 | # url: https://www.visactor.io/ 5 | # about: Please search question here before opening a new issue 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/others.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Others 3 | about: Describe this issue's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/pr_cn.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ### 🤔 这个分支是... 10 | 11 | - [ ] 新功能 12 | - [ ] Bug fix 13 | - [ ] Ts 类型更新 14 | - [ ] 打包优化 15 | - [ ] 性能优化 16 | - [ ] 功能增强 17 | - [ ] 重构 18 | - [ ] 依赖版本更新 19 | - [ ] 代码优化 20 | - [ ] 测试 case 更新 21 | - [ ] 分支合并 22 | - [ ] 发布 23 | - [ ] 网站/文档更新 24 | - [ ] demo 更新 25 | - [ ] Workflow 26 | - [ ] 其他 (具体是什么,请补充?) 27 | 28 | ### 🔗 相关 issue 链接 29 | 30 | 34 | 35 | ### 🔗 相关的 PR 链接 36 | 37 | 38 | 39 | ### 🐞 Bugserver 用例 id 40 | 41 | 42 | 43 | ### 💡 问题的背景&解决方案 44 | 45 | 50 | 51 | ### 📝 Changelog 52 | 53 | 56 | 57 | | Language | Changelog | 58 | | ---------- | --------- | 59 | | 🇺🇸 English | | 60 | | 🇨🇳 Chinese | | 61 | 62 | ### ☑️ 自测 63 | 64 | ⚠️ 在提交 PR 之前,请检查一下内容. ⚠️ 65 | 66 | - [ ] 文档提供了,或者更新,或者不需要 67 | - [ ] Demo 提供了,或者更新,或者不需要 68 | - [ ] Ts 类型定义提供了,或者更新,或者不需要 69 | - [ ] Changelog 提供了,或者不需要 70 | 71 | --- 72 | 73 | 77 | 78 | ### 🚀 Summary 79 | 80 | copilot:summary 81 | 82 | ### 🔍 Walkthrough 83 | 84 | copilot:walkthrough 85 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | # Add 'vmind' label to any change within the 'vmind' package 2 | vmind: 3 | - packages/vmind/** 4 | 5 | 6 | # Add 'calculator' label to any change within the 'calculator' package 7 | calculator: 8 | - packages/calculator/** 9 | 10 | 11 | # Add 'chart-advisor' label to any change within the 'calculator' package 12 | chart-advisor: 13 | - packages/chart-advisor/** 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | # This workflow will triage pull requests and apply a label based on the 2 | # paths that are modified in the pull request. 3 | # 4 | # To use this workflow, you will need to set up a .github/labeler.yml 5 | # file with configuration. For more information, see: 6 | # https://github.com/actions/labeler 7 | 8 | name: Labeler 9 | on: [pull_request_target] 10 | 11 | jobs: 12 | label: 13 | runs-on: ubuntu-latest 14 | permissions: 15 | contents: read 16 | pull-requests: write 17 | 18 | steps: 19 | - uses: actions/labeler@v4 20 | with: 21 | repo-token: '${{ secrets.GITHUB_TOKEN }}' 22 | -------------------------------------------------------------------------------- /.github/workflows/pr-check.yml: -------------------------------------------------------------------------------- 1 | name: Check of pull request 2 | 3 | # 这里业务方根据需求设置 4 | on: 5 | pull_request: 6 | branches: ['develop', 'dev/**'] 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | 11 | strategy: 12 | matrix: 13 | node-version: [20.x] 14 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 15 | 16 | steps: 17 | - uses: actions/checkout@v3 18 | - name: Use Node.js ${{ matrix.node-version }} 19 | uses: actions/setup-node@v3 20 | with: 21 | node-version: ${{ matrix.node-version }} 22 | cache: 'npm' 23 | cache-dependency-path: './common/config/rush/pnpm-lock.yaml' 24 | 25 | - uses: xile611/pr-type-check@main 26 | with: 27 | pull_request_body: | 28 | ${{ github.event.pull_request.body }} 29 | pull_request_head: ${{ github.event.pull_request.head.ref }} 30 | -------------------------------------------------------------------------------- /.github/workflows/unit-test.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs 3 | 4 | name: TEST CI 5 | 6 | on: 7 | push: 8 | branches: ['main', 'develop'] 9 | pull_request: 10 | branches: ['main', 'develop', 'dev/**'] 11 | 12 | jobs: 13 | build: 14 | runs-on: macOS-13 15 | 16 | strategy: 17 | matrix: 18 | node-version: [18.x] 19 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 20 | 21 | steps: 22 | - uses: actions/checkout@v3 23 | - name: Use Node.js ${{ matrix.node-version }} 24 | uses: actions/setup-node@v3 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | cache: 'npm' 28 | cache-dependency-path: './common/config/rush/pnpm-lock.yaml' 29 | 30 | # Install rush 31 | - name: Install rush 32 | run: node common/scripts/install-run-rush.js install --bypass-policy 33 | 34 | - name: Test 35 | run: node common/scripts/install-run-rush.js test --only tag:package 36 | -------------------------------------------------------------------------------- /.lintstagedrc: -------------------------------------------------------------------------------- 1 | { 2 | "{packages,tools}/**/*.{ts,tsx}": ["eslint --color --fix --quiet", "prettier --write --ignore-unknown"] 3 | } 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # https://prettier.io/docs/en/ignore.html 2 | #------------------------------------------------------------------------------------------------------------------- 3 | # Keep this section in sync with .gitignore 4 | #------------------------------------------------------------------------------------------------------------------- 5 | 6 | 👋 (copy + paste your .gitignore file contents here) 👋 7 | 8 | #------------------------------------------------------------------------------------------------------------------- 9 | # Prettier-specific overrides 10 | #------------------------------------------------------------------------------------------------------------------- 11 | 12 | # Rush files 13 | common/changes/ 14 | common/scripts/ 15 | common/config/ 16 | CHANGELOG.* 17 | 18 | # Package manager files 19 | pnpm-lock.yaml 20 | yarn.lock 21 | package-lock.json 22 | shrinkwrap.json 23 | 24 | # Build outputs 25 | dist 26 | lib 27 | **/*.min.js 28 | tools/typescript-json-schema 29 | 30 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | // Documentation for this file: https://prettier.io/en/configuration.html 2 | module.exports = { 3 | "printWidth": 120, 4 | "tabWidth": 2, 5 | "useTabs": false, 6 | "semi": true, 7 | "singleQuote": true, 8 | "quoteProps": "as-needed", 9 | "trailingComma": "none", 10 | "bracketSpacing": true, 11 | "arrowParens": "avoid", 12 | "proseWrap": "preserve", 13 | "htmlWhitespaceSensitivity": "css", 14 | "endOfLine": "lf", 15 | "printWidth": 120 16 | }; 17 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Bytedance, Inc. and its affiliates. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /common/autoinstallers/create/README.md: -------------------------------------------------------------------------------- 1 | # Create project 2 | 3 | ## Description 4 | 5 | Create a project 6 | 7 | ## Usage 8 | 9 | ```bash 10 | rush create [--name | -n] [packageName] 11 | ``` 12 | 13 | -------------------------------------------------------------------------------- /common/autoinstallers/create/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@microsoft/rush-lib": "5.94.1", 7 | "chalk": "4.1.2", 8 | "fast-glob": "3.2.11", 9 | "minimist": "1.2.6", 10 | "prettier": "2.7.1", 11 | "prompts": "2.4.2", 12 | "string.prototype.replaceall": "1.0.6", 13 | "ts-node": "^10.9.2", 14 | "zx": "4.2.0" 15 | }, 16 | "devDependencies": { 17 | "@types/minimist": "1.2.2", 18 | "@types/node": "*", 19 | "@types/prompts": "2.0.14", 20 | "typescript": "4.9.5" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /common/autoinstallers/create/src/global.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'string.prototype.replaceall' { 2 | type ReplaceAll = (source: string, sbuStr: RegExp | string, newSubStr: string) => string; 3 | 4 | const replaceAll: ReplaceAll = () => {} 5 | 6 | export default replaceAll 7 | } 8 | -------------------------------------------------------------------------------- /common/autoinstallers/create/src/logger.ts: -------------------------------------------------------------------------------- 1 | import chalk from 'chalk' 2 | 3 | export const logger = { 4 | info: (...messages: any[]) => console.info( 5 | chalk.greenBright.bold('[rush create]'), 6 | ...messages, 7 | ), 8 | 9 | error: (...messages: any[]) => { 10 | console.error( 11 | chalk.redBright.bold('[rush create][error]'), 12 | ...messages, 13 | ) 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/.eslintrc.js: -------------------------------------------------------------------------------- 1 | require('@rushstack/eslint-patch/modern-module-resolution'); 2 | 3 | module.exports = { 4 | extends: ['@internal/eslint-config/profile/lib'], 5 | parserOptions: { tsconfigRootDir: __dirname }, 6 | // ignorePatterns: [], 7 | }; 8 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/README.md: -------------------------------------------------------------------------------- 1 | # @{{scope}}/{{projectName}} 2 | 3 | ## Description 4 | 5 | {{description}} 6 | 7 | ## Usage 8 | 9 | ```typescript 10 | import { xxx } from '@{{scope}}/{{projectName}}'; 11 | ``` 12 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/bundler.config.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = { 3 | formats: ["cjs", "es", "umd"], 4 | }; 5 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@{{scope}}/{{projectName}}", 3 | "version": "0.0.1", 4 | "description": "{{description}}", 5 | "sideEffects": false, 6 | "main": "cjs/index.js", 7 | "module": "es/index.js", 8 | "types": "es/index.d.ts", 9 | "files": [ 10 | "cjs", 11 | "es", 12 | "dist" 13 | ], 14 | "scripts": { 15 | "compile": "tsc --noEmit", 16 | "eslint": "eslint --debug --fix src/", 17 | "build": "bundle", 18 | "dev": "bundle --clean -f es -w", 19 | "start": "vite ./vite", 20 | "prepublishOnly": "npm run build" 21 | }, 22 | "dependencies": {}, 23 | "devDependencies": { 24 | "@internal/bundler": "workspace:*", 25 | "@internal/eslint-config": "workspace:*", 26 | "@internal/ts-config": "workspace:*", 27 | "@rushstack/eslint-patch": "~1.1.4", 28 | "react": "^18.0.0", 29 | "react-dom": "^18.0.0", 30 | "@types/react": "^18.0.0", 31 | "@types/react-dom": "^18.0.0", 32 | "@vitejs/plugin-react": "3.1.0", 33 | "eslint": "~8.18.0", 34 | "vite": "3.2.6", 35 | "typescript": "4.9.5" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/src/global.d.ts: -------------------------------------------------------------------------------- 1 | declare const __VERSION__: string; 2 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/src/index.ts: -------------------------------------------------------------------------------- 1 | export const version = __VERSION__; 2 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@internal/ts-config/tsconfig.base.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "output" 6 | }, 7 | "include": [ 8 | "src" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } 7 | 8 | .logo { 9 | height: 6em; 10 | padding: 1.5em; 11 | will-change: filter; 12 | transition: filter 300ms; 13 | } 14 | .logo:hover { 15 | filter: drop-shadow(0 0 2em #646cffaa); 16 | } 17 | .logo.react:hover { 18 | filter: drop-shadow(0 0 2em #61dafbaa); 19 | } 20 | 21 | @keyframes logo-spin { 22 | from { 23 | transform: rotate(0deg); 24 | } 25 | to { 26 | transform: rotate(360deg); 27 | } 28 | } 29 | 30 | @media (prefers-reduced-motion: no-preference) { 31 | a:nth-of-type(2) .logo { 32 | animation: logo-spin infinite 20s linear; 33 | } 34 | } 35 | 36 | .card { 37 | padding: 2em; 38 | } 39 | 40 | .read-the-docs { 41 | color: #888; 42 | } 43 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/src/App.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import reactLogo from './assets/react.svg'; 3 | import viteLogo from '/vite.svg'; 4 | import './App.css'; 5 | 6 | function App() { 7 | const [count, setCount] = useState(0); 8 | 9 | return ( 10 | <> 11 |
12 | 13 | Vite logo 14 | 15 | 16 | React logo 17 | 18 |
19 |

Vite + React

20 |
21 | 22 |

23 | Edit src/App.tsx and save to test HMR 24 |

25 |
26 |

Click on the Vite and React logos to learn more

27 | 28 | ); 29 | } 30 | 31 | export default App; 32 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/src/index.css: -------------------------------------------------------------------------------- 1 | :root { 2 | font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; 3 | line-height: 1.5; 4 | font-weight: 400; 5 | 6 | color-scheme: light dark; 7 | color: rgba(255, 255, 255, 0.87); 8 | background-color: #242424; 9 | 10 | font-synthesis: none; 11 | text-rendering: optimizeLegibility; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | -webkit-text-size-adjust: 100%; 15 | } 16 | 17 | a { 18 | font-weight: 500; 19 | color: #646cff; 20 | text-decoration: inherit; 21 | } 22 | a:hover { 23 | color: #535bf2; 24 | } 25 | 26 | body { 27 | margin: 0; 28 | display: flex; 29 | place-items: center; 30 | min-width: 320px; 31 | min-height: 100vh; 32 | } 33 | 34 | h1 { 35 | font-size: 3.2em; 36 | line-height: 1.1; 37 | } 38 | 39 | button { 40 | border-radius: 8px; 41 | border: 1px solid transparent; 42 | padding: 0.6em 1.2em; 43 | font-size: 1em; 44 | font-weight: 500; 45 | font-family: inherit; 46 | background-color: #1a1a1a; 47 | cursor: pointer; 48 | transition: border-color 0.25s; 49 | } 50 | button:hover { 51 | border-color: #646cff; 52 | } 53 | button:focus, 54 | button:focus-visible { 55 | outline: 4px auto -webkit-focus-ring-color; 56 | } 57 | 58 | @media (prefers-color-scheme: light) { 59 | :root { 60 | color: #213547; 61 | background-color: #ffffff; 62 | } 63 | a:hover { 64 | color: #747bff; 65 | } 66 | button { 67 | background-color: #f9f9f9; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App.tsx'; 4 | import './index.css'; 5 | 6 | ReactDOM.render( 7 | 8 | 9 | , 10 | document.getElementById('root') as HTMLElement 11 | ); 12 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "lib": [ 5 | "DOM", 6 | "DOM.Iterable", 7 | "ESNext" 8 | ], 9 | "module": "ESNext", 10 | "skipLibCheck": true, 11 | /* Bundler mode */ 12 | "moduleResolution": "bundler", 13 | "allowImportingTsExtensions": true, 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react", 18 | /* Linting */ 19 | "strict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "noFallthroughCasesInSwitch": true 23 | }, 24 | "include": [ 25 | "src" 26 | ], 27 | "references": [ 28 | { 29 | "path": "./tsconfig.node.json" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /common/autoinstallers/create/templates/library/vite/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import react from '@vitejs/plugin-react'; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react({ jsxRuntime: 'classic' })] 7 | }); 8 | -------------------------------------------------------------------------------- /common/autoinstallers/lint/commit-lint.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const fs = require("fs"); 3 | const child_process = require("child_process"); 4 | 5 | const gitPath = path.resolve(__dirname, "../../../.git"); 6 | const configPath = path.resolve(__dirname, "./commitlint.config.js"); 7 | const commitlintBinPath = path.resolve(__dirname, "./node_modules/.bin/commitlint"); 8 | 9 | if (!fs.existsSync(gitPath)) { 10 | console.error("no valid .git path"); 11 | process.exit(1); 12 | } 13 | 14 | const result = child_process.spawnSync( 15 | "sh", 16 | ["-c", `${commitlintBinPath} --config ${configPath} --cwd ${path.dirname(gitPath)} --edit`], 17 | { 18 | stdio: "inherit", 19 | }, 20 | ); 21 | 22 | if (result.status !== 0) { 23 | process.exit(1); 24 | } 25 | -------------------------------------------------------------------------------- /common/autoinstallers/lint/commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'], 3 | rules: { 4 | 'not-allowed-chars': [2, 'always'], 5 | 'header-max-length': [0, 'always', 200], 6 | 'header-min-length': [2, 'always', 16], 7 | 'type-enum': [ 8 | 2, 9 | 'always', 10 | [ 11 | 'build', 12 | 'chore', 13 | 'ci', 14 | 'docs', 15 | 'feat', 16 | 'fix', 17 | 'perf', 18 | 'refactor', 19 | 'revert', 20 | 'style', 21 | 'test', 22 | 'wip', 23 | 'release', 24 | 'demo' 25 | ] 26 | ] 27 | }, 28 | plugins: [ 29 | { 30 | rules: { 31 | 'not-allowed-chars': params => { 32 | const { raw } = params; 33 | const reg = 34 | /^[a-zA-Z0-9\s`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]+$/im; 35 | 36 | return [ 37 | reg.exec(raw), 38 | 'Your commit message should only contain english characters, numbers, empty space, and special characters.' 39 | ]; 40 | } 41 | } 42 | } 43 | ] 44 | }; 45 | -------------------------------------------------------------------------------- /common/autoinstallers/lint/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lint", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": { 6 | "@commitlint/cli": "17.0.3", 7 | "@commitlint/config-conventional": "17.0.3", 8 | "@microsoft/rush-lib": "5.94.1", 9 | "commitizen": "4.2.5", 10 | "eslint": "~8.18.0", 11 | "lint-staged": "13.0.3", 12 | "minimist": "1.2.6", 13 | "prettier": "2.7.1", 14 | "ts-node": "^10.9.2", 15 | "chalk": "4.1.2" 16 | }, 17 | "devDependencies": { 18 | "@types/minimist": "1.2.2", 19 | "@types/node": "*", 20 | "typescript": "5.0.2" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /common/autoinstallers/lint/prettier.ts: -------------------------------------------------------------------------------- 1 | import minimist, { ParsedArgs } from "minimist"; 2 | import { spawnSync } from "child_process"; 3 | import { RushConfiguration } from "@microsoft/rush-lib"; 4 | 5 | interface PrettierScriptArgv extends ParsedArgs { 6 | dir?: string; 7 | ext?: string; 8 | } 9 | 10 | function run() { 11 | const cwd = process.cwd(); 12 | const rushConfiguration = RushConfiguration.loadFromDefaultLocation({ startingFolder: cwd }); 13 | 14 | const argv: PrettierScriptArgv = minimist(process.argv.slice(2)); 15 | const configFilePath = rushConfiguration.rushJsonFolder + "/.prettierrc.js"; 16 | const ignoreFilePath = rushConfiguration.rushJsonFolder + "/.prettierignore"; 17 | 18 | let ext = "{ts,tsx,less}"; 19 | if (argv.ext) { 20 | const length = argv.ext.split(",").length; 21 | ext = length === 1 ? `${argv.ext}` : `{${argv.ext}}`; 22 | } 23 | 24 | let patterns = `{apps,libs}/**/src/**/**/*.${ext}`; 25 | if (argv.dir) { 26 | patterns = `${argv.dir}/src/**/**/*.${ext}`; 27 | } 28 | 29 | console.log(patterns); 30 | 31 | spawnSync( 32 | "sh", 33 | [ 34 | "-c", 35 | `prettier --config ${configFilePath} --ignore-path ${ignoreFilePath} --write ${patterns}`, 36 | ], 37 | { 38 | shell: false, 39 | stdio: [0, 1, 2], 40 | }, 41 | ); 42 | } 43 | 44 | run(); 45 | -------------------------------------------------------------------------------- /common/autoinstallers/run-script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "run-script", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": { 6 | "@microsoft/rush-lib": "5.94.1", 7 | "minimist": "1.2.6", 8 | "ts-node": "^10.9.2" 9 | }, 10 | "devDependencies": { 11 | "@types/node": "*", 12 | "@types/minimist": "1.2.2", 13 | "typescript": "5.0.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /common/autoinstallers/run-script/run.ts: -------------------------------------------------------------------------------- 1 | import minimist, { ParsedArgs } from "minimist"; 2 | import { RushConfiguration } from "@microsoft/rush-lib"; 3 | import { spawnSync } from "child_process"; 4 | 5 | interface RunScriptArgv extends ParsedArgs { 6 | project?: string; 7 | script?: string; 8 | } 9 | 10 | function run() { 11 | const argv: RunScriptArgv = minimist(process.argv.slice(2)); 12 | const projects = RushConfiguration.loadFromDefaultLocation({ 13 | startingFolder: process.cwd(), 14 | }); 15 | 16 | const targetProject = projects.findProjectByShorthandName(argv.project!); 17 | 18 | if (targetProject) { 19 | const result = spawnSync("sh", ["-c", `rushx ${argv.script}`], { 20 | cwd: targetProject?.projectFolder, 21 | shell: false, 22 | stdio: [0, 1, 2], 23 | }); 24 | if (result.status !== 0) { 25 | process.exit(result.status); 26 | } 27 | } 28 | } 29 | 30 | run(); 31 | -------------------------------------------------------------------------------- /common/config/rush/.npmrc: -------------------------------------------------------------------------------- 1 | # Rush uses this file to configure the NPM package registry during installation. It is applicable 2 | # to PNPM, NPM, and Yarn package managers. It is used by operations such as "rush install", 3 | # "rush update", and the "install-run.js" scripts. 4 | # 5 | # NOTE: The "rush publish" command uses .npmrc-publish instead. 6 | # 7 | # Before invoking the package manager, Rush will copy this file to the folder where installation 8 | # is performed. The copied file will omit any config lines that reference environment variables 9 | # that are undefined in that session; this avoids problems that would otherwise result due to 10 | # a missing variable being replaced by an empty string. 11 | # 12 | # * * * SECURITY WARNING * * * 13 | # 14 | # It is NOT recommended to store authentication tokens in a text file on a lab machine, because 15 | # other unrelated processes may be able to read the file. Also, the file may persist indefinitely, 16 | # for example if the machine loses power. A safer practice is to pass the token via an 17 | # environment variable, which can be referenced from .npmrc using ${} expansion. For example: 18 | # 19 | # //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} 20 | # 21 | registry=https://registry.npmjs.org/ 22 | always-auth=false 23 | 24 | -------------------------------------------------------------------------------- /common/config/rush/.npmrc-publish: -------------------------------------------------------------------------------- 1 | # This config file is very similar to common/config/rush/.npmrc, except that .npmrc-publish 2 | # is used by the "rush publish" command, as publishing often involves different credentials 3 | # and registries than other operations. 4 | # 5 | # Before invoking the package manager, Rush will copy this file to "common/temp/publish-home/.npmrc" 6 | # and then temporarily map that folder as the "home directory" for the current user account. 7 | # This enables the same settings to apply for each project folder that gets published. The copied file 8 | # will omit any config lines that reference environment variables that are undefined in that session; 9 | # this avoids problems that would otherwise result due to a missing variable being replaced by 10 | # an empty string. 11 | # 12 | # * * * SECURITY WARNING * * * 13 | # 14 | # It is NOT recommended to store authentication tokens in a text file on a lab machine, because 15 | # other unrelated processes may be able to read the file. Also, the file may persist indefinitely, 16 | # for example if the machine loses power. A safer practice is to pass the token via an 17 | # environment variable, which can be referenced from .npmrc using ${} expansion. For example: 18 | # 19 | //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} 20 | # 21 | -------------------------------------------------------------------------------- /common/config/rush/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * When using the PNPM package manager, you can use pnpmfile.js to workaround 5 | * dependencies that have mistakes in their package.json file. (This feature is 6 | * functionally similar to Yarn's "resolutions".) 7 | * 8 | * For details, see the PNPM documentation: 9 | * https://pnpm.js.org/docs/en/hooks.html 10 | * 11 | * IMPORTANT: SINCE THIS FILE CONTAINS EXECUTABLE CODE, MODIFYING IT IS LIKELY TO INVALIDATE 12 | * ANY CACHED DEPENDENCY ANALYSIS. After any modification to pnpmfile.js, it's recommended to run 13 | * "rush update --full" so that PNPM will recalculate all version selections. 14 | */ 15 | module.exports = { 16 | hooks: { 17 | readPackage 18 | } 19 | }; 20 | 21 | /** 22 | * This hook is invoked during installation before a package's dependencies 23 | * are selected. 24 | * The `packageJson` parameter is the deserialized package.json 25 | * contents for the package that is about to be installed. 26 | * The `context` parameter provides a log() function. 27 | * The return value is the updated object. 28 | */ 29 | function readPackage(packageJson, context) { 30 | 31 | // // The karma types have a missing dependency on typings from the log4js package. 32 | // if (packageJson.name === '@types/karma') { 33 | // context.log('Fixed up dependencies for @types/karma'); 34 | // packageJson.dependencies['log4js'] = '0.6.38'; 35 | // } 36 | 37 | return packageJson; 38 | } 39 | -------------------------------------------------------------------------------- /common/config/rush/repo-state.json: -------------------------------------------------------------------------------- 1 | // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. 2 | { 3 | "preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f" 4 | } 5 | -------------------------------------------------------------------------------- /common/config/rush/rush-plugins.json: -------------------------------------------------------------------------------- 1 | /** 2 | * This configuration file manages Rush's plugin feature. 3 | */ 4 | { 5 | "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugins.schema.json", 6 | "plugins": [ 7 | /** 8 | * Each item configures a plugin to be loaded by Rush. 9 | */ 10 | // { 11 | // /** 12 | // * The name of the NPM package that provides the plugin. 13 | // */ 14 | // "packageName": "@scope/my-rush-plugin", 15 | // /** 16 | // * The name of the plugin. This can be found in the "pluginName" 17 | // * field of the "rush-plugin-manifest.json" file in the NPM package folder. 18 | // */ 19 | // "pluginName": "my-plugin-name", 20 | // /** 21 | // * The name of a Rush autoinstaller that will be used for installation, which 22 | // * can be created using "rush init-autoinstaller". Add the plugin's NPM package 23 | // * to the package.json "dependencies" of your autoinstaller, then run 24 | // * "rush update-autoinstaller". 25 | // */ 26 | // "autoinstallerName": "rush-plugins" 27 | // } 28 | ] 29 | } -------------------------------------------------------------------------------- /common/config/rush/version-policies.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "definitionName": "lockStepVersion", 4 | "policyName": "vmindMin", 5 | "version": "2.0.6", 6 | "mainProject": "@visactor/vmind", 7 | "nextBump": "patch" 8 | } 9 | ] 10 | -------------------------------------------------------------------------------- /common/git-hooks/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | node common/scripts/install-run-rush.js commitlint || exit $? #++ -------------------------------------------------------------------------------- /common/git-hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # log rush change to stdout 4 | STAGE_FILES=$(git diff --cached --name-only) 5 | 6 | if [[ $STAGE_FILES != "" ]] ; then 7 | changedFiles='' 8 | # 红色文本的 ANSI 转义序列 9 | RED='\033[0;31m' 10 | # 大字体的 ANSI 转义序列 11 | BIG_FONT='\033[1m' 12 | 13 | # 重置颜色的 ANSI 转义序列 14 | RESET='\033[0m' 15 | 16 | for fileName in $STAGE_FILES;do 17 | if [[ $fileName =~ ^packages/.*\/src/.* ]]; then 18 | changedFiles="${changedFiles} 19 | ${RED}${fileName}${RESET}" 20 | fi 21 | done; 22 | 23 | if [[ $changedFiles != "" ]] ; then 24 | 25 | echo " 26 | [Notice]: please check, do you need to run ${RED}${BIG_FONT}rush change-all${RESET} to generate changelog, 27 | you has modified some src files, include: 28 | ${changedFiles} 29 | " 30 | fi 31 | fi 32 | 33 | # lint-staged 34 | node common/scripts/install-run-rush.js lint-staged || exit $? #++ 35 | 36 | # local pre-commit 37 | if [ -f "common/scripts/pre-commit" ]; then 38 | common/scripts/pre-commit 39 | fi 40 | -------------------------------------------------------------------------------- /common/git-hooks/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | while read local_ref local_sha remote_ref remote_sha 4 | do 5 | # 检查是否是hotfix发布分支 6 | if [[ $local_ref = refs/heads/hotfix/* && $local_ref =~ ^refs/heads/hotfix/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 7 | echo "Hotfix branch, skipping local test" 8 | exit 0 9 | fi 10 | 11 | # 检查是否是release发布分支 12 | if [[ $local_ref = refs/heads/release/* && $local_ref =~ ^refs/heads/release/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 13 | echo "Release branch, skipping local test" 14 | exit 0 15 | fi 16 | 17 | # 检查是否是同步代码发布分支 18 | if [[ $local_ref = refs/heads/sync/main-* && $local_ref =~ ^refs/heads/sync/main-[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 19 | echo "Auto sync code branch, skipping local test" 20 | exit 0 21 | fi 22 | 23 | # 检查是否是changelog分支 24 | if [[ $local_ref = refs/heads/sync/docs/generate-changelog-* && $local_ref =~ ^refs/heads/docs/generate-changelog-[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 25 | echo "Auto changelog branch, skipping local test" 26 | exit 0 27 | fi 28 | 29 | # 检查是否是删除操作 30 | if [ "$local_sha" = "0000000000000000000000000000000000000000" ]; then 31 | echo "Ignoring push deletion. Skipping local test." 32 | exit 0 33 | fi 34 | 35 | # 其他推送逻辑... 36 | #node common/scripts/install-run-rush.js test --only tag:package 37 | done 38 | 39 | -------------------------------------------------------------------------------- /common/scripts/apply-prerelease-version.js: -------------------------------------------------------------------------------- 1 | const writePrereleaseVersion = require('./set-prerelease-version'); 2 | const checkAndUpdateNextBump = require('./version-policies'); 3 | const parseVersion = require('./parse-version'); 4 | 5 | 6 | function run() { 7 | const preReleaseName = process.argv.slice(2)[0]; 8 | const nextVersionOrNextBump = process.argv.slice(2)[1]; 9 | const buildName = process.argv.slice(2)[2]; 10 | const nextBump = checkAndUpdateNextBump(nextVersionOrNextBump); 11 | const parsedNextVersion = nextVersionOrNextBump ? parseVersion(nextVersionOrNextBump) : null; 12 | const nextVersion = parsedNextVersion ? `${parsedNextVersion.major}.${parsedNextVersion.minor}.${parsedNextVersion.patch}`: null; 13 | 14 | console.log('[apply prerelease version]: ', preReleaseName, nextBump, nextVersion); 15 | 16 | writePrereleaseVersion(nextBump, preReleaseName, nextVersion, buildName); 17 | } 18 | 19 | run() 20 | -------------------------------------------------------------------------------- /common/scripts/apply-release-version.js: -------------------------------------------------------------------------------- 1 | const writePrereleaseVersion = require('./set-prerelease-version'); 2 | const checkAndUpdateNextBump = require('./version-policies'); 3 | const parseVersion = require('./parse-version'); 4 | 5 | 6 | function run() { 7 | const preReleaseName = process.argv.slice(2)[0]; 8 | const nextVersionOrNextBump = process.argv.slice(2)[1]; 9 | const buildName = process.argv.slice(2)[2]; 10 | const nextBump = checkAndUpdateNextBump(nextVersionOrNextBump); 11 | const parsedNextVersion = nextVersionOrNextBump ? parseVersion(nextVersionOrNextBump) : null; 12 | const nextVersion = parsedNextVersion ? `${parsedNextVersion.major}.${parsedNextVersion.minor}.${parsedNextVersion.patch}`: null; 13 | 14 | console.log('[apply prerelease version]: ', preReleaseName, nextBump, nextVersion); 15 | 16 | writePrereleaseVersion(nextBump, preReleaseName, nextVersion, buildName); 17 | } 18 | 19 | run() 20 | -------------------------------------------------------------------------------- /common/scripts/get-package-json.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | 3 | function getPackageJson(pkgJsonPath) { 4 | const pkgJson = fs.readFileSync(pkgJsonPath, { encoding: 'utf-8' }) 5 | return JSON.parse(pkgJson); 6 | } 7 | 8 | module.exports = getPackageJson; -------------------------------------------------------------------------------- /common/scripts/install-run-rush-pnpm.js: -------------------------------------------------------------------------------- 1 | // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. 2 | // 3 | // This script is intended for usage in an automated build environment where the Rush command may not have 4 | // been preinstalled, or may have an unpredictable version. This script will automatically install the version of Rush 5 | // specified in the rush.json configuration file (if not already installed), and then pass a command-line to the 6 | // rush-pnpm command. 7 | // 8 | // An example usage would be: 9 | // 10 | // node common/scripts/install-run-rush-pnpm.js pnpm-command 11 | // 12 | // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ 13 | 14 | /******/ (() => { // webpackBootstrap 15 | /******/ "use strict"; 16 | var __webpack_exports__ = {}; 17 | /*!*****************************************************!*\ 18 | !*** ./lib-esnext/scripts/install-run-rush-pnpm.js ***! 19 | \*****************************************************/ 20 | 21 | // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. 22 | // See the @microsoft/rush package's LICENSE file for license information. 23 | require('./install-run-rush'); 24 | //# sourceMappingURL=install-run-rush-pnpm.js.map 25 | module.exports = __webpack_exports__; 26 | /******/ })() 27 | ; 28 | //# sourceMappingURL=install-run-rush-pnpm.js.map -------------------------------------------------------------------------------- /common/scripts/install-run-rushx.js: -------------------------------------------------------------------------------- 1 | // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. 2 | // 3 | // This script is intended for usage in an automated build environment where the Rush command may not have 4 | // been preinstalled, or may have an unpredictable version. This script will automatically install the version of Rush 5 | // specified in the rush.json configuration file (if not already installed), and then pass a command-line to the 6 | // rushx command. 7 | // 8 | // An example usage would be: 9 | // 10 | // node common/scripts/install-run-rushx.js custom-command 11 | // 12 | // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ 13 | 14 | /******/ (() => { // webpackBootstrap 15 | /******/ "use strict"; 16 | var __webpack_exports__ = {}; 17 | /*!*************************************************!*\ 18 | !*** ./lib-esnext/scripts/install-run-rushx.js ***! 19 | \*************************************************/ 20 | 21 | // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. 22 | // See the @microsoft/rush package's LICENSE file for license information. 23 | require('./install-run-rush'); 24 | //# sourceMappingURL=install-run-rushx.js.map 25 | module.exports = __webpack_exports__; 26 | /******/ })() 27 | ; 28 | //# sourceMappingURL=install-run-rushx.js.map -------------------------------------------------------------------------------- /common/scripts/parse-version.js: -------------------------------------------------------------------------------- 1 | // see more about the regex here: https://semver.org/lang/zh-CN/ 2 | // reg test: https://regex101.com/r/vkijKf/1/ 3 | 4 | function parseVersion(version) { 5 | const res = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/gm.exec(version); 6 | 7 | if (res) { 8 | return { 9 | major: +res[1], 10 | minor: +res[2], 11 | patch: +res[3], 12 | preReleaseName: res[4], 13 | preReleaseType: res[4] && res[4].includes('.') ? res[4].split('.')[0] : res[4], 14 | buildName: res[5], 15 | buildType: res[5] && res[5].includes('.') ? res[5].split('.')[0] : res[5], 16 | 17 | }; 18 | } 19 | 20 | return null; 21 | } 22 | 23 | module.exports = parseVersion -------------------------------------------------------------------------------- /common/scripts/set-json-file.js: -------------------------------------------------------------------------------- 1 | function setJsonFileByKey(file, json, keys, newValue) { 2 | const prevValue = keys.reduce((res, k) => { 3 | return res[k]; 4 | }, json); 5 | 6 | if (prevValue !== newValue) { 7 | let startIndex = 0; 8 | 9 | keys.forEach(k => { 10 | const keyStr = `"${k}"`; 11 | const index = file.indexOf(keyStr, startIndex); 12 | 13 | if (index >= 0) { 14 | startIndex = index + keyStr.length + 1; 15 | } 16 | }) 17 | 18 | const leftIndex = file.indexOf('"', startIndex); 19 | const rightIndex = leftIndex >= 0 ? file.indexOf('"', leftIndex +1) : -1; 20 | 21 | if (leftIndex >= 0 && rightIndex >= 0) { 22 | return `${file.slice(0, leftIndex)}"${newValue}"${file.slice(rightIndex + 1)}` 23 | } 24 | } 25 | 26 | return file; 27 | } 28 | 29 | module.exports = setJsonFileByKey; 30 | 31 | -------------------------------------------------------------------------------- /common/template/chart.d.ts: -------------------------------------------------------------------------------- 1 | export * from './esm/chart/index.d.ts'; 2 | -------------------------------------------------------------------------------- /common/template/chart.js: -------------------------------------------------------------------------------- 1 | export * from './esm/chart/index.js'; 2 | -------------------------------------------------------------------------------- /common/template/component.d.ts: -------------------------------------------------------------------------------- 1 | export * from './esm/component/index.d.ts'; 2 | -------------------------------------------------------------------------------- /common/template/component.js: -------------------------------------------------------------------------------- 1 | export * from './esm/component/index.js'; 2 | -------------------------------------------------------------------------------- /common/template/core.d.ts: -------------------------------------------------------------------------------- 1 | export * from './esm/core/index.d.ts'; 2 | -------------------------------------------------------------------------------- /common/template/core.js: -------------------------------------------------------------------------------- 1 | export * from './esm/core/index.js'; 2 | -------------------------------------------------------------------------------- /common/template/layout.d.ts: -------------------------------------------------------------------------------- 1 | export * from './esm/layout/index.d.ts'; 2 | -------------------------------------------------------------------------------- /common/template/layout.js: -------------------------------------------------------------------------------- 1 | export * from './esm/layout/index.js'; 2 | -------------------------------------------------------------------------------- /common/template/mark.d.ts: -------------------------------------------------------------------------------- 1 | export * from './esm/mark/index.d.ts'; 2 | -------------------------------------------------------------------------------- /common/template/mark.js: -------------------------------------------------------------------------------- 1 | export * from './esm/mark/index.js'; 2 | -------------------------------------------------------------------------------- /common/template/series.d.ts: -------------------------------------------------------------------------------- 1 | export * from './esm/series/index.d.ts'; 2 | -------------------------------------------------------------------------------- /common/template/series.js: -------------------------------------------------------------------------------- 1 | export * from './esm/series/index.js'; 2 | -------------------------------------------------------------------------------- /docs/assets/api/menu.json: -------------------------------------------------------------------------------- 1 | { 2 | "menu": "scripts", 3 | "children": [ 4 | { 5 | "path": "VMind_Instance", 6 | "title": { 7 | "zh": "VMind实例", 8 | "en": "VMind Instance" 9 | } 10 | }, 11 | { 12 | "path": "parseCSVData", 13 | "title": { 14 | "zh": "parseCSVData", 15 | "en": "parseCSVData" 16 | } 17 | }, 18 | { 19 | "path": "getFieldInfo", 20 | "title": { 21 | "zh": "getFieldInfo", 22 | "en": "getFieldInfo" 23 | } 24 | }, 25 | { 26 | "path": "fillSpecWithData", 27 | "title": { 28 | "zh": "fillSpecWithData", 29 | "en": "fillSpecWithData" 30 | } 31 | }, 32 | { 33 | "path": "dataQuery", 34 | "title": { 35 | "zh": "dataQuery", 36 | "en": "dataQuery" 37 | } 38 | }, 39 | { 40 | "path": "generateChart", 41 | "title": { 42 | "zh": "generateChart", 43 | "en": "generateChart" 44 | } 45 | }, 46 | { 47 | "path": "text2Chart", 48 | "title": { 49 | "zh": "text2Chart", 50 | "en": "text2Chart" 51 | } 52 | }, 53 | { 54 | "path": "getInsights", 55 | "title": { 56 | "zh": "getInsights", 57 | "en": "getInsights" 58 | } 59 | } 60 | ] 61 | } -------------------------------------------------------------------------------- /docs/assets/api/zh/parseCSVData.md: -------------------------------------------------------------------------------- 1 | # parseCSVData 2 | 3 | ## 接口描述 4 | 5 | parseCSVData接口用于将CSV字符串转换为VMind所需的数据集(dataset)和字段信息(fieldInfo)。 6 | 7 | ## 接口参数 8 | 9 | ```typescript 10 | parseCSVData(csv: string): { fieldInfo: FieldInfo[], dataset: any[] } 11 | ``` 12 | 13 | - csv: string类型,表示需要解析的CSV字符串。 14 | 15 | ## 返回值类型 16 | 17 | 返回一个对象,包含两个属性: 18 | 19 | - fieldInfo: FieldInfo[]类型,表示解析后的字段信息,每个元素是一个对象,包含以下属性: 20 | 21 | ```bash 22 | - fieldName: string类型,表示字段名称。 23 | - description: string类型,表示字段描述,可选。 24 | - type: DataType类型,表示字段类型,可为"string"、"int"、"float"、"date"。 25 | - role: ROLE类型,表示字段角色,可为"dimension"、"measure"。 26 | ``` 27 | 28 | 29 | - dataset: DataItem类型,表示解析后的数据集,每个元素是一个对象,键为字段名称,值为对应的数据: 30 | ```ts 31 | type DataItem = Record; 32 | ``` 33 | 34 | ## 使用示例 35 | 36 | ```typescript 37 | import VMind from '@visactor/vmind' 38 | const csv=`Product name,region,Sales 39 | Coke,south,2350 40 | Coke,east,1027 41 | Coke,west,1027 42 | Coke,north,1027 43 | Sprite,south,215 44 | Sprite,east,654 45 | Sprite,west,159 46 | Sprite,north,28 47 | Fanta,south,345 48 | Fanta,east,654 49 | Fanta,west,2100 50 | Fanta,north,1679 51 | Mirinda,south,1476 52 | Mirinda,east,830 53 | Mirinda,west,532 54 | Mirinda,north,498` 55 | const vmind = new VMind(options) 56 | const { fieldInfo, dataset } = vmind.parseCSVData(csv); 57 | ``` 58 | 59 | ## 相关教程 60 | [数据格式与数据处理](../guide/Basic_Tutorial/Chart_Generation) 61 | -------------------------------------------------------------------------------- /docs/assets/guide/en/Basic_Tutorial/How_to_Get_VMind.md: -------------------------------------------------------------------------------- 1 | # How to Get VMind 2 | 3 | There are several ways to get VMind: 4 | 5 | - Get from npm 6 | - Get from cdn 7 | - Get from GitHub repository 8 | 9 | ## Get from npm 10 | 11 | First, you need to install VMind in the root directory of the project using the following command 12 | 13 | ```bash 14 | # Install with npm 15 | npm install @visactor/vmind 16 | 17 | # Install with yarn 18 | yarn add @visactor/vmind 19 | ``` 20 | 21 | VMind needs to be used in conjunction with VChart. In order to draw charts, you also need to introduce VChart into the project. For specific tutorials, please refer to [VChart Quick Start](https://www.visactor.io/vchart/guide/tutorial_docs/Getting_Started) 22 | 23 | 24 | ## Get from cdn 25 | 26 | You can get VMind from the following free CDN: 27 | 28 | ```html 29 | 30 | 31 | 32 | 33 | 34 | ``` 35 | 36 | ## Get from GitHub 37 | 38 | On GitHub, you can directly get the source code of VMind: 39 | 40 | - You can directly clone the source code from GitHub. 41 | - You can also choose the corresponding version from the [release](https://github.com/VisActor/VMind/releases) page of VMind, click on Source code in Assets at the bottom of the page, download it to the local and unzip it for use. 42 | -------------------------------------------------------------------------------- /docs/assets/guide/en/Basic_Tutorial/How_to_Import_VMind.md: -------------------------------------------------------------------------------- 1 | # How to Reference VMind in Your Project 2 | 3 | In the [How to Get VMind](./How_to_Get_VMind) section, we introduced how to get VMind. This section will introduce how to reference VMind under these acquisition methods one by one. 4 | 5 | ## Using cdn 6 | 7 | After we get the VMind file from [cdn](./How_to_Get_VMind#cdn-获取), we can add it to the ` 24 | 25 | 35 | ``` 36 | 37 | ## Using npm 38 | 39 | After we install `@visactor/vmind` into the project through [npm](./How_to_Get_VMind#npm-获取), we can use it in the following way: 40 | 41 | ```ts 42 | import VMind, { Model } from '@visactor/vmind' 43 | 44 | const vmind = new VMind({ 45 | url, //default is https://api.openai.com/v1/chat/completions 46 | model: Model.GPT3_5, 47 | headers: { 48 | 'api-key': apiKey //Your LLM API Key 49 | } 50 | }) 51 | ``` 52 | -------------------------------------------------------------------------------- /docs/assets/guide/zh/Basic_Tutorial/How_to_Get_VMind.md: -------------------------------------------------------------------------------- 1 | # 如何获取 VMind 2 | 3 | 获取 VMind 的方式有以下几种: 4 | 5 | - 从 npm 获取 6 | - 从 cdn 获取 7 | - 从 GitHub 仓库获取 8 | 9 | ## npm 获取 10 | 11 | 首先,你需要在项目根目录下使用以下命令安装 VMind 12 | 13 | ```bash 14 | # 使用 npm 安装 15 | npm install @visactor/vmind 16 | 17 | # 使用 yarn 安装 18 | yarn add @visactor/vmind 19 | ``` 20 | 21 | VMind 需要配合 VChart 一起使用。为了进行图表绘制,你还需要在项目中引入 VChart,具体教程详见[VChart快速上手](https://www.visactor.io/vchart/guide/tutorial_docs/Getting_Started) 22 | 23 | 24 | ## cdn 获取 25 | 26 | 可以从以下免费的 CDN 中获取 VMind: 27 | 28 | ```html 29 | 30 | 31 | 32 | 33 | 34 | ``` 35 | 36 | ## GitHub 获取 37 | 38 | 从 GitHub 上你可以直接获取 VMind 的源码: 39 | 40 | - 你可以直接从 GitHub clone 源码。 41 | - 你也可以从 VMind 的  [release](https://github.com/VisActor/VMind/releases)  页面选择对应的版本,点击页面下方 Assets 中的 Source code,将其下载至本地解压后使用。 42 | -------------------------------------------------------------------------------- /docs/assets/guide/zh/Basic_Tutorial/How_to_Import_VMind.md: -------------------------------------------------------------------------------- 1 | # 如何在项目中引用 VMind 2 | 3 | 在[如何获取 VMind](./How_to_Get_VMind)章节中我们介绍了获取 VMind 的方式,本章节会一一介绍这些获取方式下如何引用 VMind 4 | 5 | ## cdn 使用 6 | 7 | 我们从 [cdn](./How_to_Get_VMind#cdn-获取) 获取到 VMind 文件后,就可以将其添加到 HTML 文件的 ` 24 | 25 | 35 | ``` 36 | 37 | ## npm 使用 38 | 39 | 我们通过 [npm](./How_to_Get_VMind#npm-获取) 的方式将 `@visactor/vmind` 安装到项目之后,就可以通过如下方式进行使用了: 40 | 41 | ```ts 42 | import VMind, { Model } from '@visactor/vmind' 43 | 44 | const vmind = new VMind({ 45 | url, //default is https://api.openai.com/v1/chat/completions 46 | model: Model.GPT3_5, 47 | headers: { 48 | 'api-key': apiKey //Your LLM API Key 49 | } 50 | }) 51 | ``` 52 | -------------------------------------------------------------------------------- /docs/assets/guide/zh/VMind_Website_Guide.md: -------------------------------------------------------------------------------- 1 | 2 | # VMind站点指南 3 | 4 | 本篇文章的目的是为了帮助你更有效地使用 VMind 网站,让你能更快地找到你需要的信息。 5 | 6 | ## 快速开始 7 | 8 | ### 快速上手 9 | 10 | 首先,你需要阅读 VMind 的[快速上手](./Getting_Started)章节。这个章节会教你如何配置和使用 VMind 所需的环境,以及如何使用 VMind 构建你的第一个智能可视化应用。 11 | 12 | ### 深入了解 VMind 13 | 14 | 在你完成[快速上手](./Getting_Started)后,你可以在[VMind简介](./Intro_to_VMind)了解 VMind 的功能定位和相关概念。 15 | [创建VMind对象](./Create_VMind_Object)章节将教你如何初始化一个 VMind 对象以进行后续操作。你还可以通过阅读[数据处理与输入](./Data_Input_and_Process)章节来了解 VMind 支持的数据类型。在[图表生成](./Chart_Generation)章节,你可以深入了解如何使用 VMind 进行图表智能生成。[数据聚合](./Data_Aggregation)章节将教你如何使用 VMind 对数据进行排序、筛选、聚合等操作。 16 | 17 | ## 文档 18 | 19 | VMind 的文档提供了详细的功能和 API 信息。根据你的需求,你可以查看以下几个部分: 20 | 21 | - [教程](./Basic_Tutorial/Create_VMind_Instance):介绍了 VMind 的基本概念和各种使用方法。 22 | 23 | - [API](../api/VMind_Instance):提供了 VMind 的所有可用接口的详细说明。 24 | 25 | 30 | 31 | ## 如何使用搜索功能 32 | 33 | 本站点提供了一个强大的搜索功能,让你可以快速找到相关的使用信息。点击站点顶部的搜索框,输入关键词后,你将在下拉列表中看到匹配的结果。选择合适的结果即可查看相关内容。 34 | 35 | ## 如何提问&建议 36 | 37 | 我们很高兴为你提供帮助! 如果你在使用 VMind 过程中遇到问题,可以通过以下方式提问: 38 | 39 | 1. 在 GitHub 仓库中提交一个 issue:访问 [VMind GitHub](https://github.com/VisActor/VMind/issues/new/choose),详细描述你遇到的问题,我们的团队将尽快回应并解决。 40 | 41 | 2. 在 GitHub 仓库提交一个 discussion:访问 [VMind Discussion](https://github.com/VisActor/VMind/discussions),非常欢迎你在这里提出你的想法和建议,我们的团队将尽快回应并解决。 42 | 43 | ## 如何纠错 44 | 45 | 如果你在文档示例中发现问题,或者认为某些部分可以改进,务必告诉我们。你可以通过以下方式为我们提纠错信息: 46 | 47 | 1. 在 GitHub 仓库中提交一个 pull request:纠正的内容并提交,会有团队成员审核并合并。 48 | 49 | 2. 提交一个 issue:指出文档中存在的问题,团队成员会尽快核实并修正。 50 | 51 | 感谢你的帮助!我们将不断完善文档,为所有 VMind 用户提供更好的学习体验。 52 | -------------------------------------------------------------------------------- /docs/assets/openManus/Readme.md: -------------------------------------------------------------------------------- 1 | # Case of Sales Analysis and Strategies for Amazon Store 2 | 3 | The current folder contains all execution artifacts of [the Sales Analysis and Strategies for Amazon Store case in manus](https://manus.im/share/c3onakN6Iajcm1Vt1xAVG7?replay=1) -------------------------------------------------------------------------------- /docs/assets/openManus/aov_trend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisActor/VMind/556f979b7b6537b43ee2b886863ca62f419629b7/docs/assets/openManus/aov_trend.png -------------------------------------------------------------------------------- /docs/assets/openManus/correlation_heatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisActor/VMind/556f979b7b6537b43ee2b886863ca62f419629b7/docs/assets/openManus/correlation_heatmap.png -------------------------------------------------------------------------------- /docs/assets/openManus/daily_sales_trend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisActor/VMind/556f979b7b6537b43ee2b886863ca62f419629b7/docs/assets/openManus/daily_sales_trend.png -------------------------------------------------------------------------------- /docs/assets/openManus/home/ubuntu/analysis/data_exploration.txt: -------------------------------------------------------------------------------- 1 | Amazon Fashion Sales Data Exploration - January 2025 2 | 3 | Dataset Overview: 4 | - 31 rows (daily sales for January 2025) 5 | - 10 columns including date, orders, customers, and financial metrics 6 | - No missing values in the dataset 7 | 8 | Columns: 9 | - Date: Date of sales (datetime64) 10 | - Orders: Number of orders per day (int64) 11 | - Unique Customers: Number of unique customers per day (int64) 12 | - Units Sold: Total units sold per day (int64) 13 | - Gross Sales: Total sales amount before deductions (float64) 14 | - Shipping Revenue: Revenue from shipping (float64) 15 | - Coupon Discounts: Discount amount from coupons (float64) 16 | - Amazon Fees: Fees paid to Amazon (float64) 17 | - Product Costs: Cost of products sold (float64) 18 | - Net Profit: Final profit after all deductions (float64) 19 | 20 | Basic Statistics: 21 | - Average daily orders: ~39 22 | - Average daily unique customers: ~39 23 | - Average daily units sold: ~101 24 | - Average daily gross sales: ~$5,348.56 25 | - Average daily net profit: ~$1,835.56 26 | - Highest daily orders: 79 27 | - Highest daily gross sales: $11,752.01 28 | - Highest daily net profit: $4,010.05 29 | 30 | Initial Observations: 31 | - Orders and unique customers are nearly identical, suggesting most customers place only one order 32 | - There appears to be significant daily variation in sales metrics 33 | - Further analysis needed to identify patterns by day of week and other factors 34 | -------------------------------------------------------------------------------- /docs/assets/openManus/home/ubuntu/todo.md: -------------------------------------------------------------------------------- 1 | # Amazon Fashion Sales Analysis Todo List 2 | 3 | ## Data Preparation and Analysis 4 | - [x] Load and explore the Amazon Fashion Sales data 5 | - [x] Clean and preprocess data (create derived metrics) 6 | - [x] Perform comprehensive sales analysis 7 | - [x] Create data visualizations 8 | - [x] Identify key insights and trends 9 | 10 | ## Strategy Development and Reporting 11 | - [x] Develop data-driven strategies to boost sales by 10% 12 | - [x] Prepare comprehensive analysis report 13 | - [x] Deliver final report with recommendations 14 | -------------------------------------------------------------------------------- /docs/assets/openManus/orders_by_day.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisActor/VMind/556f979b7b6537b43ee2b886863ca62f419629b7/docs/assets/openManus/orders_by_day.png -------------------------------------------------------------------------------- /docs/assets/openManus/outlier_comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisActor/VMind/556f979b7b6537b43ee2b886863ca62f419629b7/docs/assets/openManus/outlier_comparison.png -------------------------------------------------------------------------------- /docs/assets/openManus/profit_margin_by_discount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisActor/VMind/556f979b7b6537b43ee2b886863ca62f419629b7/docs/assets/openManus/profit_margin_by_discount.png -------------------------------------------------------------------------------- /docs/assets/openManus/sales_by_day.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisActor/VMind/556f979b7b6537b43ee2b886863ca62f419629b7/docs/assets/openManus/sales_by_day.png -------------------------------------------------------------------------------- /docs/assets/openManus/weekend_comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisActor/VMind/556f979b7b6537b43ee2b886863ca62f419629b7/docs/assets/openManus/weekend_comparison.png -------------------------------------------------------------------------------- /docs/assets/openManus/weekly_sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisActor/VMind/556f979b7b6537b43ee2b886863ca62f419629b7/docs/assets/openManus/weekly_sales.png -------------------------------------------------------------------------------- /docs/assets/scenario/en/Chart_Assistant.md: -------------------------------------------------------------------------------- 1 | # Chart Intelligence Assistant 2 | VMind can serve as a visual agent for large language models, responsible for tasks such as chart generation and chart editing, thereby creating a "Chart Intelligence Assistant". This assistant can serve as an independent robot, or it can be integrated into other products in the form of a Copilot. 3 | 4 | 5 | 6 | 7 | 8 | 9 | As a chart intelligence assistant, VMind can generate corresponding charts based on the natural language description entered by the user. It can also realize secondary filtering, aggregation, and sorting of data through the intelligent data aggregation module. 10 | 11 | Whether you need to display a time series line chart or a bar chart of different categories, VMind can quickly respond and help you select the chart type and generate the chart. With VMind, users can create both aesthetically pleasing and information-rich charts without in-depth chart design knowledge, greatly improving work efficiency. 12 | 13 | ## Experience address: 14 | - [Coze](https://www.coze.com/s/Zs8MNnSod/) 15 | - [Discord](https://discord.gg/sajqrVSP): Join the Discord channel and @VMind Chart Master bot experience in chat. 16 | -------------------------------------------------------------------------------- /docs/assets/scenario/en/Document_Assistant.md: -------------------------------------------------------------------------------- 1 | # Document Assistant 2 | When writing reports or documents, accurate and beautiful charts are indispensable. The Document Assistant built on VMind can help users quickly generate charts from selected data and insert them into documents. 3 | 4 | 5 | 6 | 7 | 8 | 9 | In addition, VMind will also introduce an intelligent insight feature, which can intelligently identify insights in chart data and automatically add annotations to them. These annotations can directly display specific data values, provide additional explanations and contextual information, and help readers better understand the charts. 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/assets/scenario/menu.json: -------------------------------------------------------------------------------- 1 | { 2 | "menu": "scripts", 3 | "children": [ 4 | { 5 | "path": "OpenManus_VMind", 6 | "title": { 7 | "zh": "OpenManus X VMind : 快速打造你的数据分析助手", 8 | "en": "OpenManus X VMind: Quickly Build Your Data Analysis Assistant" 9 | } 10 | }, 11 | { 12 | "path": "Chart_Assistant", 13 | "title": { 14 | "zh": "图表助手", 15 | "en": "Chart Assistant" 16 | } 17 | }, 18 | { 19 | "path": "Wordcloud_Cube", 20 | "title": { 21 | "zh": "可视化叙事-词云魔方", 22 | "en": "Visual Narration: Word Cloud Cube" 23 | } 24 | }, 25 | { 26 | "path": "Data_Video", 27 | "title": { 28 | "zh": "数据视频创作", 29 | "en": "Data video creation" 30 | } 31 | }, 32 | { 33 | "path": "Document_Assistant", 34 | "title": { 35 | "zh": "文档助手", 36 | "en": "Document Assistant" 37 | } 38 | }, 39 | { 40 | "path": "Data_Development", 41 | "title": { 42 | "zh": "数据开发", 43 | "en": "Data Development" 44 | } 45 | }, 46 | { 47 | "path": "Open_API", 48 | "title": { 49 | "zh": "VMind Open API", 50 | "en": "VMind Open API" 51 | } 52 | } 53 | ] 54 | } -------------------------------------------------------------------------------- /docs/assets/scenario/zh/Chart_Assistant.md: -------------------------------------------------------------------------------- 1 | # 图表智能助手 2 | VMind可以成为大语言模型的可视化代理(agent),负责处理图表生成、图表编辑等相关任务,从而打造出“图表智能助手”。这个助手既可以作为一个独立的机器人提供服务,也可以以Copilot形式接入其他产品。 3 | 4 | 5 | 6 | 7 | 8 | 9 | 作为图表智能助手,VMind可以根据用户输入的自然语言描述,自动生成相应的图表。还可通过智能数据聚合模块实现数据的二次筛选、聚合、排序。 10 | 11 | 无论你需要展示的是时间序列的折线图,还是不同类别的柱状图,VMind都能迅速响应并帮助你选择图表类型及生成图表。有了VMind,用户无需深厚的图表设计知识,就可以制作出既美观又信息丰富的图表,极大地提高了工作效率。 12 | 13 | ## 体验地址: 14 | - [Coze](https://www.coze.com/s/Zs8MNnSod/) 15 | - [Discord](https://discord.gg/sajqrVSP): 加入Discord频道,在聊天中 @VMind Chart Master 机器人即可体验 16 | -------------------------------------------------------------------------------- /docs/assets/scenario/zh/Data_Development.md: -------------------------------------------------------------------------------- 1 | # 数据开发 2 | 在数据开发等python Notebook场景中,适合在SQL查询结束后,调用VMind Open API进行图表生成,配合py-vchart渲染图表,在Notebook中集成智能可视化能力。 3 | 4 | 5 | 6 | 7 | 8 | ## 示例代码 9 | ```python 10 | ''' 11 | 在Notebook场景下,可在SQL查询后调用VMind Open API进行图表生成,并结合py-vchart进行图表渲染 12 | VMind支持基于大模型的图表生成和基于规则的图表生成 13 | 图表生成过程不会将明细数据传给大模型,尽可放心食用 14 | ''' 15 | 16 | import requests 17 | import pandas as pd 18 | from pyvchart import render_chart 19 | 20 | url = "" #VMind OPen API url 21 | 22 | # 查询出的数据集: 23 | print('sql查询结果:') 24 | display(sales_data_df) 25 | 26 | sales_data_json =sales_data_df.to_json(orient="records", force_ascii=False) 27 | 28 | userPrompt = "帮我展示不同区域各商品销售额" # 用户的展示意图 29 | 30 | print() 31 | print('输入展示意图:') 32 | print(userPrompt) 33 | print() 34 | 35 | body = { 36 | "data": sales_data_json, 37 | "userPrompt": userPrompt, 38 | "model": "doubao" # 使用豆包模型 39 | } 40 | 41 | # 调用VMind open api进行图表生成 42 | response = requests.post(url, headers=headers, json=body) 43 | 44 | chart = response.json().get('chart')[0] 45 | spec = chart.get('spec') 46 | chartType = chart.get('chartType') 47 | 48 | # print(spec) 49 | print('生成的图表类型: '+chartType) 50 | 51 | # 调用py-vchart渲染图表 52 | render_chart(spec) 53 | ``` 54 | 55 | ## 相关阅读 56 | - [VMind Open API](./Open_API) 57 | - [py-vchart](https://visactor.io/vchart/guide/tutorial_docs/Cross-terminal_and_Developer_Ecology/python) 58 | -------------------------------------------------------------------------------- /docs/assets/scenario/zh/Data_Video.md: -------------------------------------------------------------------------------- 1 | # 数据视频创作 2 | 数据视频是一种通过图表、动画、标注、旁白等方式展示和介绍数据内容的视频形式。它能将复杂的数据变得更加易懂,并引导观众获取有用的信息和见解。数据视频广泛应用于商业展示、新闻报道、教育培训等方面,是一种高效的数据展现方式,受到了各大短视频平台的喜爱。 3 | 4 | 传统的数据视频制作流程需要创作者在收集数据后,使用专业的可视化软件将数据绘制为图表;或使用各种图表库,通过编码绘制图表并导出为视频。在短视频时代,每个人都可能是视频的创作者。然而,非专业的视频创作者往往不具备将数据可视化为图表并导出为视频的能力,这大大提高了数据视频的制作门槛。 5 | 6 | 基于VMind 结合视频编辑工具,可以很容易制作丰富多彩的数据视频。使用VMind图表智能生成模块生成带动画的图表后,用户可以将其导出为视频或者GIF,导入到剪映、pr等专业的视频剪辑软件中,制作一个完整的数据视频。 7 | 8 | 9 | 10 | 11 | 12 | 将VMind集成到视频剪辑工具中,数据视频的创作也将形成完整的闭环。 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/assets/scenario/zh/Document_Assistant.md: -------------------------------------------------------------------------------- 1 | # 文档助手 2 | 在撰写报告或文档时,准确而美观的图表是必不可少的。基于VMind打造文档助手,能够帮助用户快速从选定的数据中生成图表,并插入到文档中。 3 | 4 | 5 | 6 | 7 | 8 | 9 | 此外,VMind还将推出智能洞察功能,这个功能能够智能地识别图表数据中的洞察,并自动为其添加标注。这些标注可以直接展示具体的数据数值,同时提供额外的解释和上下文信息,帮助读者更好地理解图表。 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/assets/scenario/zh/Wordcloud_Cube.md: -------------------------------------------------------------------------------- 1 | # 可视化叙事-词云魔方 2 | VisActor一直致力于探究数据可视化在叙事场景中的应用,VMind也将与VChart叙事模板相结合,推出智能叙事功能。 3 | 4 | 我们将VMind与Coze平台结合,推出了词云魔方机器人。用户只需要上传词云的标题和核心词,VMind便能智能地为用户生成各种主题的个性化词云。 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | VMind 本身具备根据数据自动推断图表类型,并智能生成spec 的能力,但是在词云魔方场景下,需要对结果进行约束。VMind node 服务对VMind 组件进行了一层封装,只允许VMind 在我们规定的词云模版中进行选择生成。 15 | 16 | 17 | 18 | 未来我们将添加各种各样的主题模板,如节日、生肖等,给用户的创作提供更多可能和灵感。同时,我们还将支持生成GIF动图,让词云展现出独特的动态效果,使其具有更强的视觉冲击力和表达力。 19 | 20 | 当然,我们也会突破词云的限制,将词云魔方升级成为“卡片魔方”,可以生成使用范围更广,效果更惊艳的作品。同时也借此,整体推动VMind的升级,使其更加智能化,在代码生成,图表配置,自动美化,故事编排等各个方面都能有质的提升,并通过开源服务更多的开发者。 21 | 22 | ## 体验地址: 23 | - [Coze](https://www.coze.cn/s/iY7WbPQ2/) 24 | 25 | ## 相关阅读 26 | - [一念生花,Coze 结合VisActor 文生图实战总结](https://juejin.cn/post/7340307383505436712) 27 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Documents Site 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/menu.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "menu": "guide", 4 | "type": "markdown" 5 | }, 6 | { 7 | "menu": "api", 8 | "type": "markdown" 9 | }, 10 | { 11 | "menu": "scenario", 12 | "type": "markdown" 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@internal/docs", 3 | "version": "0.0.1", 4 | "description": "site for all VChart", 5 | "private": true, 6 | "scripts": { 7 | "serve": "vite --host", 8 | "watch": "node ./libs/template-parse/build.js --env dev --watch", 9 | "start": "npm run serve", 10 | "_start": "npx concurrently --kill-others \"npm:watch\" \"npm:serve\"" 11 | }, 12 | "dependencies": { 13 | "@arco-design/web-react": "2.46.1", 14 | "markdown-it": "^13.0.0", 15 | "highlight.js": "^11.8.0", 16 | "axios": "^1.4.0", 17 | "react": "^18.0.0", 18 | "react-dom": "^18.0.0", 19 | "react-router-dom": "6.9.0", 20 | "lodash": "4.17.21", 21 | "@visactor/vutils": "~0.19.3" 22 | }, 23 | "devDependencies": { 24 | "@types/react": "^18.0.0", 25 | "@types/react-dom": "^18.0.0", 26 | "@types/markdown-it": "^13.0.0", 27 | "@types/highlightjs": "^9.12.0", 28 | "@vitejs/plugin-react": "3.1.0", 29 | "typescript": "4.9.5", 30 | "vite": "3.2.6", 31 | "marked": "^0.3.19", 32 | "chalk": "^3.0.0", 33 | "fs-extra": "10.1.0", 34 | "yargs": "^17.1.1", 35 | "htmlparser2": "^4.1.0", 36 | "globby": "11.1.0", 37 | "chokidar": "^3.5.0" 38 | } 39 | } -------------------------------------------------------------------------------- /docs/src/app.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | import { RouteObject, RouterProvider, createBrowserRouter, Navigate } from 'react-router-dom'; 3 | import { LanguageContext, LanguageEnum, getStoredLanguage, storeLanguage } from './i18n'; 4 | import menu from '../menu.json'; 5 | import { Markdown } from './markdown'; 6 | import { Option } from './option'; 7 | 8 | const menuRoutes: RouteObject[] = menu.map(menuItem => { 9 | if (menuItem.type === 'markdown-template') { 10 | return { 11 | path: `/vmind/${menuItem.menu}`, 12 | element: