From d100e67ff9be84c74df8bc8acc8fdcc20c7548e8 Mon Sep 17 00:00:00 2001 From: da730 Date: Tue, 6 Feb 2024 16:30:59 +0800 Subject: [PATCH 1/6] feat: use english figs --- docs/assets/guide/en/Intro_to_VMind.md | 8 ++++---- docs/assets/guide/zh/Intro_to_VMind.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/assets/guide/en/Intro_to_VMind.md b/docs/assets/guide/en/Intro_to_VMind.md index 809653e7..86246863 100644 --- a/docs/assets/guide/en/Intro_to_VMind.md +++ b/docs/assets/guide/en/Intro_to_VMind.md @@ -4,7 +4,7 @@ VisActor is a full-process visualization solution, which takes "visual storytelling" and "intelligence" as its core development direction. The components of VisActor that carry the ability of "visual storytelling" mainly include VChart, VTable, and VGrammar, all of which provide simple and easy-to-use interfaces. However, we hope that in some typical scenarios, users can generate charts and narrative works without writing code, thereby reducing the learning cost and complexity for users. The powerful generation ability of the large language model provides a natural language interaction interface for the VisActor visualization system, allowing us to directly call various functions of visualization components such as VChart and VTable through natural language, thereby completing visualization creation simply, quickly, and with high quality. -![VMind](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_intro.png) +![VMind](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_intro_eng.png) VMind is an intelligent visualization component built on the basic capabilities of visualization component libraries such as VChart and VTable. We hope that in some typical scenarios, users can generate charts and narrative works with just one sentence, thereby reducing the learning cost and complexity for users. @@ -13,7 +13,7 @@ VMind is an intelligent visualization component built on the basic capabilities Intelligence is the future core direction of VisActor. Only on this basis can we truly reduce the access and development costs of developers and allow them to focus on things outside of visualization. VMind is an intelligent visualization component in the VisActor system. It provides intelligent interfaces in various ways such as rule algorithms, artificial intelligence, machine learning, and large language models to minimize the mental burden of developers using visualization components. -![VMind Architecture Diagram](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_structure.png) +![VMind Architecture Diagram](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_structure_eng.png) In the VMind component, the bottom layer is the chart rendering, animation, annotation capabilities, VChart documentation provided by the VChart chart library, and the natural language understanding and code generation capabilities provided by the large model. Among them, the data processing and interaction layer is responsible for processing user input data and natural language, including data aggregation modules for field parsing, data conversion, aggregation, etc., and the interaction communication module is responsible for handling communication between users and VMind, VMind and the large model, including user intent recognition, Prompt management, model communication, result parsing. @@ -21,7 +21,7 @@ In the VMind component, the bottom layer is the chart rendering, animation, anno ## VMind Core Capabilities -![VMind Capability Diagram](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_abilities.png) +![VMind Capability Diagram](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_abilities_eng.png) The core capabilities of VMind include intelligent chart generation, intelligent chart editing, and intelligent color matching. @@ -34,7 +34,7 @@ Advanced capabilities are further applications of core capabilities, including c ## VMind Chart Creation Process -![VMind Capability Diagram](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_flow.png) +![VMind Capability Diagram](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_progress_eng.png) Based on VMind's intelligent chart generation, conversational editing, and intelligent color matching modules, we can summarize the full process of using VMind for chart creation: diff --git a/docs/assets/guide/zh/Intro_to_VMind.md b/docs/assets/guide/zh/Intro_to_VMind.md index 99ca24f4..1ca6bbd4 100644 --- a/docs/assets/guide/zh/Intro_to_VMind.md +++ b/docs/assets/guide/zh/Intro_to_VMind.md @@ -3,7 +3,7 @@ VisActor是一款全流程可视化解决方案,它以“可视化叙事”和“智能化”为核心发展方向。VisActor承载“可视化叙事” 能力的组件主要有VChart、VTable 和 VGrammar,它们都提供了简单易用的接口。然而,我们希望在一些典型场景中,用户能够无需编写代码就能生成图表和叙事作品,以此降低用户的学习成本和使用复杂度。大语言模型的强大生成能力为VisActor可视化体系提供了一个自然语言的交互接口,使我们能够通过自然语言直接调用VChart、VTable等可视化组件的各项功能,从而简单、快速、高质量地完成可视化创作。 -![VMind](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_intro.png) +![VMind](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_intro_ch.png) VMind是在VChart、VTable等可视化组件库的基础能力之上,构建的一个智能可视化组件。我们希望在一些典型场景中,用户能够只需一句话就能生成图表和叙事作品,以此降低用户的学习成本和使用复杂度。 @@ -12,7 +12,7 @@ VMind是在VChart、VTable等可视化组件库的基础能力之上,构建的 智能化是VisActor的未来核心方向,只有在此基础上,我们才能真正降低开发者的接入和研发成本,让他们能够将注意力集中在可视化之外。VMind是VisActor体系中的智能可视化组件,它基于规则算法、人工智能、机器学习、大语言模型等多种方式提供智能化接口,以最大限度降低开发者使用可视化组件的心智负担。 -![VMind架构图](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_structure.png) +![VMind架构图](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_structrure_ch.png) 在VMind组件中,最底层是由VChart图表库提供的图表渲染、动画、标注能力、VChart文档,以及大语言模型提供的自然语言理解、代码生成能力。其中,数据处理与交互层负责处理用户输入的数据和自然语言,包括数据聚合模块进行字段解析、数据转换、聚合等操作,交互通信模块负责处理用户与VMind、VMind与大语言模型之间的通信,包括用户意图识别、Prompt管理,模型通信,结果解析。 @@ -21,7 +21,7 @@ VMind是在VChart、VTable等可视化组件库的基础能力之上,构建的 ## VMind核心能力 -![VMind能力图](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_abilities.png) +![VMind能力图](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_abilities_ch.png) VMind的核心能力包括图表智能生成、图表智能编辑和智能配色。 @@ -35,7 +35,7 @@ VMind的核心能力包括图表智能生成、图表智能编辑和智能配色 ## VMind图表创作流程 -![VMind能力图](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_flow.png) +![VMind能力图](https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/vmind/tutorials/VMind_progress_ch.png) 基于VMind的图表智能生成、对话式编辑和智能配色模块,我们可以概括出使用VMind进行图表创作的全流程: From a090f4699153f659762cc29b4a238379db2339ce Mon Sep 17 00:00:00 2001 From: da730 Date: Tue, 6 Feb 2024 16:37:53 +0800 Subject: [PATCH 2/6] fix: doc link error --- docs/assets/guide/en/VMind_Website_Guide.md | 8 ++++---- docs/assets/guide/zh/VMind_Website_Guide.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/assets/guide/en/VMind_Website_Guide.md b/docs/assets/guide/en/VMind_Website_Guide.md index 5c1260f5..673453f3 100644 --- a/docs/assets/guide/en/VMind_Website_Guide.md +++ b/docs/assets/guide/en/VMind_Website_Guide.md @@ -17,15 +17,15 @@ After you complete [Getting Started](./Getting_Started), you can learn about the The VMind documentation provides detailed information on functions and APIs. Depending on your needs, you can view the following sections: -- [Tutorials](./todo): Introduces the basic concepts of VMind and various usage methods. +- [Tutorials](./Basic_Tutorial/Create_VMind_Instance): Introduces the basic concepts of VMind and various usage methods. -- [API](./todo): Provides detailed descriptions of all available interfaces of VMind. +- [API](../api/VMind_Instance): Provides detailed descriptions of all available interfaces of VMind. -- [Examples](./todo): Provides some functional examples of VMind. + ## How to Use the Search Function diff --git a/docs/assets/guide/zh/VMind_Website_Guide.md b/docs/assets/guide/zh/VMind_Website_Guide.md index 6ba84fb6..84dd99ef 100644 --- a/docs/assets/guide/zh/VMind_Website_Guide.md +++ b/docs/assets/guide/zh/VMind_Website_Guide.md @@ -18,15 +18,15 @@ VMind 的文档提供了详细的功能和 API 信息。根据你的需求,你可以查看以下几个部分: -- [教程](./todo):介绍了 VMind 的基本概念和各种使用方法。 +- [教程](./Basic_Tutorial/Create_VMind_Instance):介绍了 VMind 的基本概念和各种使用方法。 -- [API](./todo):提供了 VMind 的所有可用接口的详细说明。 +- [API](../api/VMind_Instance):提供了 VMind 的所有可用接口的详细说明。 -- [示例](./todo):提供了 VMind 的一些功能示例。 + ## 如何使用搜索功能 From 95a3741c07b6256624ac85cfa1db242f5bf64b71 Mon Sep 17 00:00:00 2001 From: da730 Date: Tue, 6 Feb 2024 21:46:16 +0800 Subject: [PATCH 3/6] feat: remove vrender dependence --- common/config/rush/pnpm-lock.yaml | 5 +++-- .../browser/src/pages/ChartPreview.tsx | 9 +++++++-- packages/vmind/package.json | 5 ++--- packages/vmind/src/chart-to-video/index.ts | 17 +++++++---------- packages/vmind/src/core/VMind.ts | 6 +++--- packages/vmind/src/typings/index.ts | 4 +++- 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 6d4f4fab..d702534f 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -104,7 +104,7 @@ importers: '@visactor/chart-advisor': 0.1.10 '@visactor/vchart': ^1.9.0 '@visactor/vdataset': ~0.17.4 - '@visactor/vrender-core': ^0.17.19 + '@visactor/vrender-core': ^0.17.23 '@visactor/vutils': ~0.17.4 '@vitejs/plugin-react': 3.1.0 axios: ^1.4.0 @@ -135,7 +135,6 @@ importers: '@visactor/calculator': link:../calculator '@visactor/chart-advisor': 0.1.10 '@visactor/vdataset': 0.17.4 - '@visactor/vrender-core': 0.17.23 '@visactor/vutils': 0.17.4 axios: 1.6.7 dayjs: 1.11.10 @@ -161,6 +160,7 @@ importers: '@typescript-eslint/eslint-plugin': 5.30.0_cow5zg7tx6c3eisi5a4ud5kwia '@typescript-eslint/parser': 5.30.0_vwud3sodsb5zxmzckoj7rdwdbq '@visactor/vchart': 1.9.2 + '@visactor/vrender-core': 0.17.23 '@vitejs/plugin-react': 3.1.0_vite@3.2.6 dotenv: 16.3.2 eslint: 8.18.0 @@ -3243,6 +3243,7 @@ packages: dependencies: '@visactor/vutils': 0.17.4 color-convert: 2.0.1 + dev: true /@visactor/vrender-kits/0.17.23: resolution: {integrity: sha512-3Mnr5y62ZTeZweaEGNLMM8Wf3vkf2K8aTiW4kinXkk0Am0k78v/0kdkwaYEnNM89uJ4zRVXPkkLG6h+/4KMo8Q==} diff --git a/packages/vmind/__tests__/browser/src/pages/ChartPreview.tsx b/packages/vmind/__tests__/browser/src/pages/ChartPreview.tsx index 1ac6900f..15c8245a 100644 --- a/packages/vmind/__tests__/browser/src/pages/ChartPreview.tsx +++ b/packages/vmind/__tests__/browser/src/pages/ChartPreview.tsx @@ -2,6 +2,7 @@ import React, { useState, useCallback, useEffect } from 'react'; import './index.scss'; import { Button, Input, Card, Space, Modal, Spin } from '@arco-design/web-react'; import VChart from '@visactor/vchart'; +import { ManualTicker, defaultTimeline } from '@visactor/vrender-core'; import VMind from '../../../../src'; import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg'; const TextArea = Input.TextArea; @@ -61,7 +62,9 @@ export function ChartPreview(props: IPropsType) { const src = await vmind.exportVideo(spec, time, { VChart, FFmpeg: ffmpeg, - fetchFile + fetchFile, + ManualTicker, + defaultTimeline } as any); setSrc(src); setOutType('video'); @@ -81,7 +84,9 @@ export function ChartPreview(props: IPropsType) { const src = await vmind.exportGIF(spec, time, { VChart, FFmpeg: ffmpeg, - fetchFile + fetchFile, + ManualTicker, + defaultTimeline } as any); setSrc(src); setOutType('gif'); diff --git a/packages/vmind/package.json b/packages/vmind/package.json index 9922e6ec..039b578e 100644 --- a/packages/vmind/package.json +++ b/packages/vmind/package.json @@ -79,16 +79,15 @@ "react-dom": "^18.0.0", "react-router-dom": "6.9.0", "@visactor/vchart": "^1.9.0", - "@visactor/vrender-core": "^0.17.19", "@rollup/plugin-dynamic-import-vars": "~2.1.0", "@types/lodash": "4.14.182", "@types/node": "*", "dotenv": "~16.3.1", - "@ffmpeg/ffmpeg": "^0.11.6" + "@ffmpeg/ffmpeg": "^0.11.6", + "@visactor/vrender-core": "^0.17.23" }, "dependencies": { "@visactor/chart-advisor": "0.1.10", - "@visactor/vrender-core": "^0.17.19", "@visactor/vdataset": "~0.17.4", "@visactor/vutils": "~0.17.4", "axios": "^1.4.0", diff --git a/packages/vmind/src/chart-to-video/index.ts b/packages/vmind/src/chart-to-video/index.ts index c1dc7466..00565903 100644 --- a/packages/vmind/src/chart-to-video/index.ts +++ b/packages/vmind/src/chart-to-video/index.ts @@ -1,18 +1,15 @@ -import { ManualTicker, defaultTimeline } from '@visactor/vrender-core'; -import type { FFmpeg } from '@ffmpeg/ffmpeg'; import { cloneDeep } from 'lodash'; -import { TimeType } from '../typings'; +import { OuterPackages, TimeType } from '../typings'; let idx = 0; export async function _chatToVideoWasm( - VChart: any, - ffmpeg: FFmpeg, - fetchFile: (data: string | Buffer | Blob | File) => Promise, fps: number, propsSpec: any, propsTime: TimeType, - outName = 'out' + outName = 'out', + outerPackages: OuterPackages ) { + const { ManualTicker, defaultTimeline, VChart, fetchFile, FFmpeg } = outerPackages; idx++; const defaultTicker = new ManualTicker(); const spec = cloneDeep(propsSpec); @@ -93,11 +90,11 @@ export async function _chatToVideoWasm( // defaultTicker.mode = 'raf' // const imageData = ctx.getImageData(0, 0, ctx.canvas.width, ctx.canvas.height); // console.log(new Uint8Array(imageData.data.buffer)) - ffmpeg.FS('writeFile', `vchart${idx}.${num}.png`, await fetchFile((blob as any).data)); + FFmpeg.FS('writeFile', `vchart${idx}.${num}.png`, await fetchFile((blob as any).data)); } vchart.release(); - await ffmpeg.run( + await FFmpeg.run( '-framerate', '30', '-pattern_type', @@ -112,7 +109,7 @@ export async function _chatToVideoWasm( ); for (let i = 0; i <= frame; i++) { const num = `0000${i}`.slice(-3); - ffmpeg.FS('unlink', `vchart${idx}.${num}.png`); + FFmpeg.FS('unlink', `vchart${idx}.${num}.png`); } // defaultTicker.mode = 'raf'; } diff --git a/packages/vmind/src/core/VMind.ts b/packages/vmind/src/core/VMind.ts index dcb8f11a..44a89e82 100644 --- a/packages/vmind/src/core/VMind.ts +++ b/packages/vmind/src/core/VMind.ts @@ -97,9 +97,9 @@ class VMind { } async exportVideo(spec: any, time: TimeType, outerPackages: OuterPackages) { - const { VChart, FFmpeg, fetchFile } = outerPackages; + const { VChart, FFmpeg, fetchFile, ManualTicker } = outerPackages; const outName = `out`; - await _chatToVideoWasm(VChart, FFmpeg, fetchFile, this._FPS, spec, time, outName); + await _chatToVideoWasm(this._FPS, spec, time, outName, outerPackages); const data = FFmpeg.FS('readFile', `${outName}.mp4`); const objUrl = URL.createObjectURL(new Blob([data.buffer], { type: 'video/mp4' })); return objUrl; @@ -108,7 +108,7 @@ class VMind { async exportGIF(spec: any, time: TimeType, outerPackages: OuterPackages) { const { VChart, FFmpeg, fetchFile } = outerPackages; const outName = `out`; - await _chatToVideoWasm(VChart, FFmpeg, fetchFile, this._FPS, spec, time, outName); + await _chatToVideoWasm(this._FPS, spec, time, outName, outerPackages); // 调色板 await FFmpeg.run('-i', `${outName}.mp4`, '-filter_complex', '[0:v] palettegen', 'palette.png'); await FFmpeg.run( diff --git a/packages/vmind/src/typings/index.ts b/packages/vmind/src/typings/index.ts index aa2e8b81..dfb4fee3 100644 --- a/packages/vmind/src/typings/index.ts +++ b/packages/vmind/src/typings/index.ts @@ -1,6 +1,6 @@ import type { FFmpeg } from '@ffmpeg/ffmpeg'; import type { VChart } from '@visactor/vchart'; - +import type { ManualTicker, DefaultTimeline } from '@visactor/vrender-core'; export interface ILLMOptions { url?: string; //URL of your LLM service. For gpt, default is openAI API. /** llm request header, which has higher priority */ @@ -87,6 +87,8 @@ export type OuterPackages = { VChart: VChart; FFmpeg: FFmpeg; fetchFile: (data: string | Buffer | Blob | File) => Promise; + ManualTicker: typeof ManualTicker; + defaultTimeline: DefaultTimeline; }; export enum DataType { From 53ea0dc0a6c4728d929bb9d8c1dc26483c97008b Mon Sep 17 00:00:00 2001 From: da730 Date: Tue, 6 Feb 2024 22:14:01 +0800 Subject: [PATCH 4/6] feat: use createCanvas from canvas --- common/config/rush/pnpm-lock.yaml | 288 ++++++++++++++++-- .../browser/src/pages/ChartPreview.tsx | 8 +- packages/vmind/package.json | 3 +- packages/vmind/src/chart-to-video/index.ts | 15 +- packages/vmind/src/typings/index.ts | 2 + 5 files changed, 279 insertions(+), 37 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index d702534f..c82e0cdd 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -108,6 +108,7 @@ importers: '@visactor/vutils': ~0.17.4 '@vitejs/plugin-react': 3.1.0 axios: ^1.4.0 + canvas: ^2.11.2 dayjs: ~1.11.10 dotenv: ~16.3.1 eslint: ~8.18.0 @@ -162,6 +163,7 @@ importers: '@visactor/vchart': 1.9.2 '@visactor/vrender-core': 0.17.23 '@vitejs/plugin-react': 3.1.0_vite@3.2.6 + canvas: 2.11.2 dotenv: 16.3.2 eslint: 8.18.0 eslint-config-prettier: 8.5.0_eslint@8.18.0 @@ -169,7 +171,7 @@ importers: eslint-plugin-jsx-a11y: 6.8.0_eslint@8.18.0 eslint-plugin-prettier: 4.2.1_ohknqdiadpdc4n44qqsbqlxxwa eslint-plugin-react: 7.30.1_eslint@8.18.0 - jest: 26.6.3 + jest: 26.6.3_canvas@2.11.2 jest-electron: 0.1.12_jest@26.6.3 less: 4.1.3 react: 18.2.0 @@ -1872,7 +1874,7 @@ packages: slash: 3.0.0 dev: true - /@jest/core/26.6.3: + /@jest/core/26.6.3_canvas@2.11.2: resolution: {integrity: sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==} engines: {node: '>= 10.14.2'} dependencies: @@ -1887,14 +1889,14 @@ packages: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 26.6.2 - jest-config: 26.6.3 + jest-config: 26.6.3_canvas@2.11.2 jest-haste-map: 26.6.2 jest-message-util: 26.6.2 jest-regex-util: 26.0.0 jest-resolve: 26.6.2 jest-resolve-dependencies: 26.6.3 - jest-runner: 26.6.3 - jest-runtime: 26.6.3 + jest-runner: 26.6.3_canvas@2.11.2 + jest-runtime: 26.6.3_canvas@2.11.2 jest-snapshot: 26.6.2 jest-util: 26.6.2 jest-validate: 26.6.2 @@ -2087,15 +2089,15 @@ packages: - supports-color dev: true - /@jest/test-sequencer/26.6.3: + /@jest/test-sequencer/26.6.3_canvas@2.11.2: resolution: {integrity: sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==} engines: {node: '>= 10.14.2'} dependencies: '@jest/test-result': 26.6.2 graceful-fs: 4.2.11 jest-haste-map: 26.6.2 - jest-runner: 26.6.3 - jest-runtime: 26.6.3 + jest-runner: 26.6.3_canvas@2.11.2 + jest-runtime: 26.6.3_canvas@2.11.2 transitivePeerDependencies: - bufferutil - canvas @@ -2225,6 +2227,24 @@ packages: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 + /@mapbox/node-pre-gyp/1.0.11: + resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} + hasBin: true + dependencies: + detect-libc: 2.0.2 + https-proxy-agent: 5.0.1 + make-dir: 3.1.0 + node-fetch: 2.7.0 + nopt: 5.0.0 + npmlog: 5.0.1 + rimraf: 3.0.2 + semver: 7.5.4 + tar: 6.2.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -3336,6 +3356,10 @@ packages: deprecated: Use your platform's native atob() and btoa() methods instead dev: true + /abbrev/1.1.1: + resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + dev: true + /abs-svg-path/0.1.1: resolution: {integrity: sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA==} @@ -3535,6 +3559,10 @@ packages: buffer-equal: 1.0.1 dev: false + /aproba/2.0.0: + resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} + dev: true + /archiver-utils/2.1.0: resolution: {integrity: sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==} engines: {node: '>= 6'} @@ -3584,6 +3612,14 @@ packages: resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} dev: false + /are-we-there-yet/2.0.0: + resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} + engines: {node: '>=10'} + dependencies: + delegates: 1.0.0 + readable-stream: 3.6.2 + dev: true + /arg/4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} @@ -4321,6 +4357,19 @@ packages: /caniuse-lite/1.0.30001584: resolution: {integrity: sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ==} + /canvas/2.11.2: + resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} + engines: {node: '>=6'} + requiresBuild: true + dependencies: + '@mapbox/node-pre-gyp': 1.0.11 + nan: 2.18.0 + simple-get: 3.1.1 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + /capture-exit/2.0.0: resolution: {integrity: sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==} engines: {node: 6.* || 8.* || >= 10.*} @@ -4419,6 +4468,11 @@ packages: fsevents: 2.3.3 dev: true + /chownr/2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + dev: true + /ci-info/2.0.0: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} dev: true @@ -4574,7 +4628,6 @@ packages: /color-support/1.1.3: resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} hasBin: true - dev: false /color/3.2.1: resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} @@ -4665,6 +4718,10 @@ packages: dev: true optional: true + /console-control-strings/1.1.0: + resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + dev: true + /convert-source-map/1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} @@ -4899,6 +4956,13 @@ packages: mimic-response: 1.0.1 dev: true + /decompress-response/4.2.1: + resolution: {integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==} + engines: {node: '>=8'} + dependencies: + mimic-response: 2.1.0 + dev: true + /deep-eql/4.1.3: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} @@ -4968,6 +5032,10 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + /delegates/1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + dev: true + /dequal/2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -4978,6 +5046,11 @@ packages: engines: {node: '>=0.10.0'} dev: false + /detect-libc/2.0.2: + resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} + engines: {node: '>=8'} + dev: true + /detect-newline/2.1.0: resolution: {integrity: sha512-CwffZFvlJffUg9zZA0uqrjQayUTC8ob94pnr5sFwaVv3IOmkfUHcWH+jXaQK3askE51Cqe8/9Ql/0uXNwqZ8Zg==} engines: {node: '>=0.10.0'} @@ -6280,6 +6353,13 @@ packages: universalify: 0.1.2 dev: true + /fs-minipass/2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: true + /fs-mkdirp-stream/1.0.0: resolution: {integrity: sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==} engines: {node: '>= 0.10'} @@ -6337,6 +6417,21 @@ packages: /functions-have-names/1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + /gauge/3.0.2: + resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} + engines: {node: '>=10'} + dependencies: + aproba: 2.0.0 + color-support: 1.1.3 + console-control-strings: 1.1.0 + has-unicode: 2.0.1 + object-assign: 4.1.1 + signal-exit: 3.0.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wide-align: 1.1.5 + dev: true + /gensync/1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -6780,6 +6875,10 @@ packages: dependencies: has-symbols: 1.0.3 + /has-unicode/2.0.1: + resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} + dev: true + /has-value/0.3.1: resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} engines: {node: '>=0.10.0'} @@ -7475,12 +7574,12 @@ packages: throat: 5.0.0 dev: true - /jest-cli/26.6.3: + /jest-cli/26.6.3_canvas@2.11.2: resolution: {integrity: sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==} engines: {node: '>= 10.14.2'} hasBin: true dependencies: - '@jest/core': 26.6.3 + '@jest/core': 26.6.3_canvas@2.11.2 '@jest/test-result': 26.6.2 '@jest/types': 26.6.2 chalk: 4.1.2 @@ -7488,7 +7587,7 @@ packages: graceful-fs: 4.2.11 import-local: 3.1.0 is-ci: 2.0.0 - jest-config: 26.6.3 + jest-config: 26.6.3_canvas@2.11.2 jest-util: 26.6.2 jest-validate: 26.6.2 prompts: 2.4.2 @@ -7552,7 +7651,7 @@ packages: - supports-color dev: true - /jest-config/26.6.3: + /jest-config/26.6.3_canvas@2.11.2: resolution: {integrity: sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==} engines: {node: '>= 10.14.2'} peerDependencies: @@ -7562,17 +7661,17 @@ packages: optional: true dependencies: '@babel/core': 7.20.12 - '@jest/test-sequencer': 26.6.3 + '@jest/test-sequencer': 26.6.3_canvas@2.11.2 '@jest/types': 26.6.2 babel-jest: 26.6.3_@babel+core@7.20.12 chalk: 4.1.2 deepmerge: 4.3.1 glob: 7.2.3 graceful-fs: 4.2.11 - jest-environment-jsdom: 26.6.2 + jest-environment-jsdom: 26.6.2_canvas@2.11.2 jest-environment-node: 26.6.2 jest-get-type: 26.3.0 - jest-jasmine2: 26.6.3 + jest-jasmine2: 26.6.3_canvas@2.11.2 jest-regex-util: 26.0.0 jest-resolve: 26.6.2 jest-util: 26.6.2 @@ -7683,7 +7782,7 @@ packages: jest: ^24.0.0 dependencies: electron: 11.5.0 - jest: 26.6.3 + jest: 26.6.3_canvas@2.11.2 jest-haste-map: 24.9.0 jest-message-util: 24.9.0 jest-mock: 24.9.0 @@ -7729,6 +7828,24 @@ packages: - utf-8-validate dev: true + /jest-environment-jsdom/26.6.2_canvas@2.11.2: + resolution: {integrity: sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==} + engines: {node: '>= 10.14.2'} + dependencies: + '@jest/environment': 26.6.2 + '@jest/fake-timers': 26.6.2 + '@jest/types': 26.6.2 + '@types/node': 20.11.16 + jest-mock: 26.6.2 + jest-util: 26.6.2 + jsdom: 16.7.0_canvas@2.11.2 + transitivePeerDependencies: + - bufferutil + - canvas + - supports-color + - utf-8-validate + dev: true + /jest-environment-node/24.9.0: resolution: {integrity: sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==} engines: {node: '>= 6'} @@ -7828,7 +7945,7 @@ packages: - supports-color dev: true - /jest-jasmine2/26.6.3: + /jest-jasmine2/26.6.3_canvas@2.11.2: resolution: {integrity: sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==} engines: {node: '>= 10.14.2'} dependencies: @@ -7845,7 +7962,7 @@ packages: jest-each: 26.6.2 jest-matcher-utils: 26.6.2 jest-message-util: 26.6.2 - jest-runtime: 26.6.3 + jest-runtime: 26.6.3_canvas@2.11.2 jest-snapshot: 26.6.2 jest-util: 26.6.2 pretty-format: 26.6.2 @@ -8063,7 +8180,7 @@ packages: - supports-color dev: true - /jest-runner/26.6.3: + /jest-runner/26.6.3_canvas@2.11.2: resolution: {integrity: sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==} engines: {node: '>= 10.14.2'} dependencies: @@ -8076,13 +8193,13 @@ packages: emittery: 0.7.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 26.6.3 + jest-config: 26.6.3_canvas@2.11.2 jest-docblock: 26.0.0 jest-haste-map: 26.6.2 jest-leak-detector: 26.6.2 jest-message-util: 26.6.2 jest-resolve: 26.6.2 - jest-runtime: 26.6.3 + jest-runtime: 26.6.3_canvas@2.11.2 jest-util: 26.6.2 jest-worker: 26.6.2 source-map-support: 0.5.21 @@ -8159,7 +8276,7 @@ packages: - supports-color dev: true - /jest-runtime/26.6.3: + /jest-runtime/26.6.3_canvas@2.11.2: resolution: {integrity: sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==} engines: {node: '>= 10.14.2'} hasBin: true @@ -8179,7 +8296,7 @@ packages: exit: 0.1.2 glob: 7.2.3 graceful-fs: 4.2.11 - jest-config: 26.6.3 + jest-config: 26.6.3_canvas@2.11.2 jest-haste-map: 26.6.2 jest-message-util: 26.6.2 jest-mock: 26.6.2 @@ -8377,14 +8494,14 @@ packages: supports-color: 7.2.0 dev: true - /jest/26.6.3: + /jest/26.6.3_canvas@2.11.2: resolution: {integrity: sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==} engines: {node: '>= 10.14.2'} hasBin: true dependencies: - '@jest/core': 26.6.3 + '@jest/core': 26.6.3_canvas@2.11.2 import-local: 3.1.0 - jest-cli: 26.6.3 + jest-cli: 26.6.3_canvas@2.11.2 transitivePeerDependencies: - bufferutil - canvas @@ -8508,6 +8625,49 @@ packages: - utf-8-validate dev: true + /jsdom/16.7.0_canvas@2.11.2: + resolution: {integrity: sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==} + engines: {node: '>=10'} + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + dependencies: + abab: 2.0.6 + acorn: 8.11.3 + acorn-globals: 6.0.0 + canvas: 2.11.2 + cssom: 0.4.4 + cssstyle: 2.3.0 + data-urls: 2.0.0 + decimal.js: 10.4.3 + domexception: 2.0.1 + escodegen: 2.1.0 + form-data: 3.0.1 + html-encoding-sniffer: 2.0.1 + http-proxy-agent: 4.0.1 + https-proxy-agent: 5.0.1 + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.7 + parse5: 6.0.1 + saxes: 5.0.1 + symbol-tree: 3.2.4 + tough-cookie: 4.1.3 + w3c-hr-time: 1.0.2 + w3c-xmlserializer: 2.0.0 + webidl-conversions: 6.1.0 + whatwg-encoding: 1.0.5 + whatwg-mimetype: 2.3.0 + whatwg-url: 8.7.0 + ws: 7.5.9 + xml-name-validator: 3.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + /jsesc/0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -8958,7 +9118,6 @@ packages: engines: {node: '>=8'} dependencies: semver: 6.3.1 - dev: false /make-dir/4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} @@ -9121,6 +9280,11 @@ packages: engines: {node: '>=4'} dev: true + /mimic-response/2.1.0: + resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==} + engines: {node: '>=8'} + dev: true + /minimatch/3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -9156,6 +9320,26 @@ packages: /minimist/1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + /minipass/3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + dependencies: + yallist: 4.0.0 + dev: true + + /minipass/5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + dev: true + + /minizlib/2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + dev: true + /mixin-deep/1.3.2: resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} engines: {node: '>=0.10.0'} @@ -9231,7 +9415,6 @@ packages: /nan/2.18.0: resolution: {integrity: sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==} - optional: true /nanoid/3.3.1: resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} @@ -9320,6 +9503,14 @@ packages: big-integer: 1.6.52 dev: false + /nopt/5.0.0: + resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} + engines: {node: '>=6'} + hasBin: true + dependencies: + abbrev: 1.1.1 + dev: true + /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -9394,6 +9585,15 @@ packages: path-key: 3.1.1 dev: true + /npmlog/5.0.1: + resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} + dependencies: + are-we-there-yet: 2.0.0 + console-control-strings: 1.1.0 + gauge: 3.0.2 + set-blocking: 2.0.0 + dev: true + /number-is-nan/1.0.1: resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} engines: {node: '>=0.10.0'} @@ -10851,6 +11051,18 @@ packages: /signal-exit/3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + /simple-concat/1.0.1: + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + dev: true + + /simple-get/3.1.1: + resolution: {integrity: sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==} + dependencies: + decompress-response: 4.2.1 + once: 1.4.0 + simple-concat: 1.0.1 + dev: true + /simple-statistics/7.8.3: resolution: {integrity: sha512-JFvMY00t6SBGtwMuJ+nqgsx9ylkMiJ5JlK9bkj8AdvniIe5615wWQYkKHXe84XtSuc40G/tlrPu0A5/NlJvv8A==} @@ -11290,6 +11502,18 @@ packages: readable-stream: 3.6.2 dev: false + /tar/6.2.0: + resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} + engines: {node: '>=10'} + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + dev: true + /terminal-link/2.1.1: resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} engines: {node: '>=8'} @@ -12397,6 +12621,12 @@ packages: stackback: 0.0.2 dev: true + /wide-align/1.1.5: + resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + dependencies: + string-width: 4.2.3 + dev: true + /word-wrap/1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} diff --git a/packages/vmind/__tests__/browser/src/pages/ChartPreview.tsx b/packages/vmind/__tests__/browser/src/pages/ChartPreview.tsx index 15c8245a..9e7a6432 100644 --- a/packages/vmind/__tests__/browser/src/pages/ChartPreview.tsx +++ b/packages/vmind/__tests__/browser/src/pages/ChartPreview.tsx @@ -5,6 +5,8 @@ import VChart from '@visactor/vchart'; import { ManualTicker, defaultTimeline } from '@visactor/vrender-core'; import VMind from '../../../../src'; import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg'; +import { createCanvas } from 'canvas'; + const TextArea = Input.TextArea; type IPropsType = { @@ -64,7 +66,8 @@ export function ChartPreview(props: IPropsType) { FFmpeg: ffmpeg, fetchFile, ManualTicker, - defaultTimeline + defaultTimeline, + createCanvas } as any); setSrc(src); setOutType('video'); @@ -86,7 +89,8 @@ export function ChartPreview(props: IPropsType) { FFmpeg: ffmpeg, fetchFile, ManualTicker, - defaultTimeline + defaultTimeline, + createCanvas } as any); setSrc(src); setOutType('gif'); diff --git a/packages/vmind/package.json b/packages/vmind/package.json index 039b578e..1153b4c3 100644 --- a/packages/vmind/package.json +++ b/packages/vmind/package.json @@ -84,7 +84,8 @@ "@types/node": "*", "dotenv": "~16.3.1", "@ffmpeg/ffmpeg": "^0.11.6", - "@visactor/vrender-core": "^0.17.23" + "@visactor/vrender-core": "^0.17.23", + "canvas": "^2.11.2" }, "dependencies": { "@visactor/chart-advisor": "0.1.10", diff --git a/packages/vmind/src/chart-to-video/index.ts b/packages/vmind/src/chart-to-video/index.ts index 00565903..b46a18da 100644 --- a/packages/vmind/src/chart-to-video/index.ts +++ b/packages/vmind/src/chart-to-video/index.ts @@ -9,21 +9,26 @@ export async function _chatToVideoWasm( outName = 'out', outerPackages: OuterPackages ) { - const { ManualTicker, defaultTimeline, VChart, fetchFile, FFmpeg } = outerPackages; + const { ManualTicker, defaultTimeline, VChart, fetchFile, FFmpeg, createCanvas } = outerPackages; + idx++; const defaultTicker = new ManualTicker(); const spec = cloneDeep(propsSpec); const time = cloneDeep(propsTime); const { totalTime, frameArr } = time; + + const width = spec.width ?? 720; + const height = spec.height ?? 480; + spec.width = width; + spec.height = height; + // 关闭player if (frameArr && frameArr.length) { spec.player && (spec.player.auto = false); } defaultTicker.mode = 'manual'; - spec.width = 720; - spec.height = 480; - const canvas = document.createElement('canvas'); - document.body.appendChild(canvas); + + const canvas = createCanvas(width, height); const vchart = new VChart(spec, { renderCanvas: canvas, mode: 'desktop-browser', diff --git a/packages/vmind/src/typings/index.ts b/packages/vmind/src/typings/index.ts index dfb4fee3..3443ce70 100644 --- a/packages/vmind/src/typings/index.ts +++ b/packages/vmind/src/typings/index.ts @@ -1,6 +1,7 @@ import type { FFmpeg } from '@ffmpeg/ffmpeg'; import type { VChart } from '@visactor/vchart'; import type { ManualTicker, DefaultTimeline } from '@visactor/vrender-core'; + export interface ILLMOptions { url?: string; //URL of your LLM service. For gpt, default is openAI API. /** llm request header, which has higher priority */ @@ -89,6 +90,7 @@ export type OuterPackages = { fetchFile: (data: string | Buffer | Blob | File) => Promise; ManualTicker: typeof ManualTicker; defaultTimeline: DefaultTimeline; + createCanvas: any; }; export enum DataType { From 8d7d8aa1f609a09f2f91a87f212c50f842b98f72 Mon Sep 17 00:00:00 2001 From: da730 Date: Tue, 6 Feb 2024 22:42:25 +0800 Subject: [PATCH 5/6] fix: add demo link --- .../en/Basic_Tutorial/Chart_Generation.md | 26 +++++++++---------- .../zh/Basic_Tutorial/Chart_Generation.md | 24 ++++++++--------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/assets/guide/en/Basic_Tutorial/Chart_Generation.md b/docs/assets/guide/en/Basic_Tutorial/Chart_Generation.md index ba84fbbb..9210ab06 100644 --- a/docs/assets/guide/en/Basic_Tutorial/Chart_Generation.md +++ b/docs/assets/guide/en/Basic_Tutorial/Chart_Generation.md @@ -253,19 +253,19 @@ This can reduce the process of calling the large model once, reduce token consum ## Chart Types Supported by VMind VMind currently supports 13 common chart types in VChart: -- Bar chart -- Line chart -- Pie chart -- Scatter plot -- Dual-axis chart -- Word cloud -- Rose chart -- Radar chart -- Box plot -- Funnel chart -- Sankey diagram -- Waterfall chart -- [Dynamic bar chart (ranking bar)](https://www.visactor.io/vchart/demo/storytelling/ranking-bar) +- [Bar Chart](https://www.visactor.io/vchart/demo/bar-chart/basic-column) +- [Line Chart](hhttps://www.visactor.io/vchart/demo/line-chart/basic-line) +- [Pie Chart](https://www.visactor.io/vchart/demo/pie-chart/basic-pie) +- [Scatter Chart](https://www.visactor.io/vchart/demo/scatter-chart/basic-scatter) +- [Dual Axis Chart](https://www.visactor.io/vchart/demo/combination/dual-axis) +- [Word Cloud](https://www.visactor.io/vchart/demo/word-cloud-chart/word-cloud-basic) +- [Rose Chart](https://www.visactor.io/vchart/demo/rose-chart/basic-rose) +- [Radar Chart](https://www.visactor.io/vchart/demo/radar-chart/basic-radar) +- [Box Plot](https://www.visactor.io/vchart/demo/box-plot/basic-box-plot) +- [Funnel Chart](https://www.visactor.io/vchart/demo/funnel-chart/basic-funnel) +- [Sankey Chart](https://www.visactor.io/vchart/demo/sankey-chart/basic-sankey) +- [Waterfall Chart](https://www.visactor.io/vchart/demo/waterfall/basic-waterfall) +- [Dynamic Bar Chart (ranking bar)](https://www.visactor.io/vchart/demo/storytelling/ranking-bar) Depending on the `userPrompt` and `fieldInfo`, these chart types may all be recommended by the large language model. diff --git a/docs/assets/guide/zh/Basic_Tutorial/Chart_Generation.md b/docs/assets/guide/zh/Basic_Tutorial/Chart_Generation.md index fde1715d..07eaa708 100644 --- a/docs/assets/guide/zh/Basic_Tutorial/Chart_Generation.md +++ b/docs/assets/guide/zh/Basic_Tutorial/Chart_Generation.md @@ -254,18 +254,18 @@ const { spec, time } = await vmind.generateChart(userPrompt, fieldInfo, dataset, ## VMind支持的图表类型 VMind目前支持VChart中常见的13种图表类型: -- 柱状图 -- 折线图 -- 饼图 -- 散点图 -- 双轴图 -- 词云 -- 玫瑰图 -- 雷达图 -- 箱型图 -- 漏斗图 -- 桑基图 -- 瀑布图 +- [柱状图](https://www.visactor.io/vchart/demo/bar-chart/basic-column) +- [折线图](hhttps://www.visactor.io/vchart/demo/line-chart/basic-line) +- [饼图](https://www.visactor.io/vchart/demo/pie-chart/basic-pie) +- [散点图](https://www.visactor.io/vchart/demo/scatter-chart/basic-scatter) +- [双轴图](https://www.visactor.io/vchart/demo/combination/dual-axis) +- [词云](https://www.visactor.io/vchart/demo/word-cloud-chart/word-cloud-basic) +- [玫瑰图](https://www.visactor.io/vchart/demo/rose-chart/basic-rose) +- [雷达图](https://www.visactor.io/vchart/demo/radar-chart/basic-radar) +- [箱型图](https://www.visactor.io/vchart/demo/box-plot/basic-box-plot) +- [漏斗图](https://www.visactor.io/vchart/demo/funnel-chart/basic-funnel) +- [桑基图](https://www.visactor.io/vchart/demo/sankey-chart/basic-sankey) +- [瀑布图](https://www.visactor.io/vchart/demo/waterfall/basic-waterfall) - [动态条形图(ranking bar)](https://www.visactor.io/vchart/demo/storytelling/ranking-bar) 根据`userPrompt`和`fieldInfo`的不同,这些图表类型都有可能被大语言模型推荐。 From 10acea39dbfa2d3451b363a5c6c29816258ec945 Mon Sep 17 00:00:00 2001 From: da730 Date: Tue, 6 Feb 2024 22:30:01 +0800 Subject: [PATCH 6/6] fix: build error --- packages/vmind/src/typings/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/vmind/src/typings/index.ts b/packages/vmind/src/typings/index.ts index 3443ce70..c40bfbd4 100644 --- a/packages/vmind/src/typings/index.ts +++ b/packages/vmind/src/typings/index.ts @@ -1,5 +1,4 @@ import type { FFmpeg } from '@ffmpeg/ffmpeg'; -import type { VChart } from '@visactor/vchart'; import type { ManualTicker, DefaultTimeline } from '@visactor/vrender-core'; export interface ILLMOptions { @@ -85,7 +84,7 @@ export type TimeType = { }; export type OuterPackages = { - VChart: VChart; + VChart: any; FFmpeg: FFmpeg; fetchFile: (data: string | Buffer | Blob | File) => Promise; ManualTicker: typeof ManualTicker;