Skip to content

Commit bbba5db

Browse files
author
jiangtao.yang
committed
feat: reinit repo
1 parent 78eb3fb commit bbba5db

63 files changed

Lines changed: 3081 additions & 770 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/dsv/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
"@ant-design/icons": "5.x",
1212
"@types/dotenv-webpack": "^7.0.8",
1313
"@visactor/vstory": "0.0.23",
14+
"@visactor/vchart": "1.13.9",
1415
"antd": "^5.24.9",
1516
"assert": "^2.1.0",
1617
"buffer": "^6.0.3",
1718
"data-structure": "workspace:*",
19+
"player": "workspace:*",
1820
"dotenv-webpack": "^8.1.0",
1921
"openai": "^4.97.0",
2022
"parser": "workspace:*",

apps/dsv/src/components/Chart.tsx

Lines changed: 0 additions & 98 deletions
This file was deleted.

apps/dsv/src/components/CodeEditor/CodeEditor.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ import { useDsv } from '../../model';
44
import { OpenAI } from 'openai';
55
import { Button, Input } from 'antd';
66
import { systemPrompt } from './constant';
7-
import { CodeContainer, Toolbar, CodeInput } from './style';
8-
9-
const S = {
10-
CodeContainer,
11-
Toolbar,
12-
CodeInput,
13-
};
7+
import * as S from './style';
148

159
export const CodeEditor = () => {
1610
const setSchema = useDsv((state) => state.setSchema);
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
import { Chart } from '../Chart';
1+
import { Player } from '../Player/Player';
22
import { CodeEditor } from '../CodeEditor/CodeEditor';
3-
import { ChartContainer, DSVEditorContainer } from './style';
3+
import { DSVEditorContainer } from './style';
44

55
export const Home = () => {
66
return (
77
<DSVEditorContainer>
88
<CodeEditor />
9-
<ChartContainer>
10-
<Chart />
11-
</ChartContainer>
9+
<Player />
1210
</DSVEditorContainer>
1311
);
1412
};

apps/dsv/src/components/Home/style.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,3 @@ export const DSVEditorContainer = styled.div`
1717
1818
margin: 12px;
1919
`;
20-
21-
export const ChartContainer = styled.div`
22-
flex: 0 0 960px;
23-
height: 100%;
24-
`;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { FC } from 'react';
2+
import { useDsv } from '../../model';
3+
import { Chart } from 'player';
4+
5+
import * as S from './style';
6+
import { executor } from 'data-structure';
7+
8+
export const Player: FC = () => {
9+
const schema = useDsv((state) => state.schema);
10+
debugger;
11+
const res = executor(schema);
12+
13+
return (
14+
<S.PlayerContainer>
15+
<Chart schema={schema} />
16+
</S.PlayerContainer>
17+
);
18+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import styled from 'styled-components';
2+
3+
export const PlayerContainer = styled.div`
4+
flex: 0 0 960px;
5+
height: 100%;
6+
`;

packages/data-structure/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Local
2+
.DS_Store
3+
*.local
4+
*.log*
5+
6+
# Dist
7+
node_modules
8+
dist/
9+
10+
# IDE
11+
.vscode/*
12+
!.vscode/extensions.json
13+
.idea

packages/data-structure/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Rslib project
2+
3+
## Setup
4+
5+
Install the dependencies:
6+
7+
```bash
8+
pnpm install
9+
```
10+
11+
## Get started
12+
13+
Build the library:
14+
15+
```bash
16+
pnpm build
17+
```
18+
19+
Build the library in watch mode:
20+
21+
```bash
22+
pnpm dev
23+
```
Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
11
{
22
"name": "data-structure",
33
"version": "0.0.0",
4-
"description": "",
5-
"main": "dist/index.js",
6-
"types": "dist/index.d.ts",
4+
"type": "module",
5+
"exports": {
6+
".": {
7+
"types": "./dist/index.d.ts",
8+
"import": "./dist/index.js",
9+
"require": "./dist/index.cjs"
10+
}
11+
},
12+
"main": "./dist/index.cjs",
13+
"types": "./dist/index.d.ts",
14+
"files": [
15+
"dist"
16+
],
717
"scripts": {
8-
"build": "tsc",
9-
"dev": "tsc --watch"
18+
"build": "rslib build",
19+
"dev": "rslib build --watch",
20+
"test": "vitest run"
1021
},
11-
"keywords": [],
12-
"author": "",
13-
"license": "ISC",
1422
"dependencies": {
15-
"@visactor/vstory": "0.0.23",
16-
"@babel/core": "^7.26.7",
17-
"@babel/types": "^7.26.7",
18-
"schema": "workspace:*",
19-
"lodash-es": "^4.17.21"
23+
"lodash-es": "^4.17.21",
24+
"schema": "workspace:*"
2025
},
2126
"devDependencies": {
22-
"typescript": "^5.0.0",
23-
"@types/babel__core": "^7.0.0",
24-
"@types/node": "^20.0.0",
25-
"@types/lodash-es": "^4.17.10"
27+
"@rslib/core": "^0.6.8",
28+
"@types/lodash-es": "^4.17.12",
29+
"@types/node": "^22.8.1",
30+
"typescript": "^5.8.3",
31+
"vitest": "^3.1.2"
2632
}
2733
}

0 commit comments

Comments
 (0)