-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
952 changed files
with
47,025 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
indent_size = 1 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
dist/ | ||
build/ | ||
examples/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
jest: true, | ||
}, | ||
extends: ['airbnb-base', 'prettier'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint', 'import'], | ||
rules: { | ||
semi: 'error', | ||
'no-unused-vars': 'off', | ||
'no-return-assign': 'off', | ||
'no-sequences': 'off', | ||
'no-plusplus': 'off', | ||
'no-redeclare': 'warn', | ||
'no-param-reassign': 'warn', | ||
'no-restricted-syntax': 'warn', | ||
'no-nested-ternary': 'warn', | ||
'max-classes-per-file': 'off', | ||
'import/extensions': 'off', | ||
'import/prefer-default-export': 'off', | ||
'object-curly-newline': 'off', | ||
'class-methods-use-this': 'off', | ||
'no-shadow': 'off', | ||
'no-console': 'off', | ||
'arrow-body-style': 'off', | ||
'import/no-unresolved': 'off', | ||
'no-useless-constructor': 'off', | ||
'no-unused-expressions': 'off', | ||
'no-dupe-class-members': 'off', | ||
'prefer-destructuring': 'off', | ||
'no-underscore-dangle': 'off', | ||
'no-compare-neg-zero': 'off', | ||
'@typescript-eslint/no-dupe-class-members': ['error'], | ||
'@typescript-eslint/no-unused-vars': ['warn'], | ||
'no-use-before-define': 'off', | ||
'no-bitwise': 'off', | ||
'no-lonely-if': 'off', | ||
}, | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
'import/resolver': { | ||
typescript: { | ||
alwaysTryTypes: true, | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '16' | ||
- name: Run ci | ||
run: | | ||
npm install | ||
npm run ci | ||
- name: Upload Snapshot | ||
if: ${{ failure() }} | ||
env: | ||
REF_NAME: ${{ github.ref_name }} | ||
GITHUB_WORKSPACE: ${{ github.workspace }} | ||
OSS_REGION: ${{ secrets.OSS_REGION }} | ||
OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }} | ||
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }} | ||
OSS_BUCKET: ${{ secrets.OSS_BUCKET }} | ||
run: | | ||
npm run upload | ||
- name: coverall | ||
if: ${{ success() }} | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# lock | ||
package-lock.json | ||
yarn.lock | ||
pnpm-lock.yaml | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
build | ||
dist | ||
temp | ||
.DS_Store | ||
.idea | ||
lib | ||
es | ||
esm | ||
|
||
*.sw* | ||
*.un~ | ||
|
||
# website | ||
.cache | ||
public | ||
|
||
# lh | ||
.lh | ||
|
||
# tests | ||
__tests__/integration/**/*-diff.png | ||
__tests__/integration/**/*-actual.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 修改仓库镜像(中国镜像) | ||
registry=https://registry.npmmirror.com | ||
# pnpm | ||
auto-install-peers=true | ||
git-checks=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__tests__/performance/reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"printWidth": 120, | ||
"arrowParens": "always" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"cSpell.words": [ | ||
"bbox", | ||
"Sparkline", | ||
"timebar" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2021 AntV | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<h1 align="center"> | ||
<b>GUI</b> | ||
</h1> | ||
|
||
<div align="center"> | ||
|
||
UI components for [G](https://github.com/antvis/g). | ||
|
||
[![Build Status](https://github.com/antvis/gui/workflows/CI/badge.svg?branch=master)](https://github.com/antvis/gui/actions) | ||
[![Coverage Status](https://coveralls.io/repos/github/antvis/GUI/badge.svg?branch=master)](https://coveralls.io/github/antvis/GUI?branch=master) | ||
[![npm Version](https://img.shields.io/npm/v/@antv/gui.svg)](https://www.npmjs.com/package/@antv/gui) | ||
[![npm Download](https://img.shields.io/npm/dm/@antv/gui.svg)](https://www.npmjs.com/package/@antv/gui) | ||
[![npm License](https://img.shields.io/npm/l/@antv/gui.svg)](https://www.npmjs.com/package/@antv/gui) | ||
|
||
</div> | ||
|
||
## ✨ Features | ||
|
||
## 📦 Installation | ||
|
||
```bash | ||
$ npm install @antv/gui | ||
``` | ||
|
||
## 🔨 Getting Started | ||
|
||
```ts | ||
import { Canvas } from '@antv/g'; | ||
import { Renderer } from '@antv/g-canvas'; | ||
import { Button } from '@antv/gui'; | ||
|
||
// create a canvas | ||
const canvas = new Canvas({ | ||
container: 'container', | ||
width: 600, | ||
height: 600, | ||
renderer: new Renderer(), | ||
}); | ||
|
||
// create a button | ||
const button = new Button({ | ||
/* ... */ | ||
}); | ||
|
||
canvas.appendChild(button); | ||
|
||
// render it | ||
canvas.render(); | ||
``` | ||
|
||
## 📎 Components | ||
|
||
- [API](./docs//api.md) | ||
- UI components | ||
- [Axis](https://github.com/antvis/GUI/blob/master/docs/api/ui/axis.zh.md) | ||
- [Legend](https://github.com/antvis/GUI/blob/master/docs/api/ui/legend.zh.md) | ||
- [Tooltip](https://github.com/antvis/GUI/blob/master/docs/api/ui/tooltip.zh.md) | ||
- [Slider](https://github.com/antvis/GUI/blob/master/docs/api/ui/slider.zh.md) | ||
- [Scrollbar](https://github.com/antvis/GUI/blob/master/docs/api/ui/scrollbar.zh.md) | ||
- [Button](https://github.com/antvis/GUI/blob/master/docs/api/ui/button.zh.md) | ||
- [Checkbox](https://github.com/antvis/GUI/blob/master/docs/api/ui/checkbox.zh.md) | ||
- [Navigator](https://github.com/antvis/GUI/blob/master/docs/api/ui/navigator.zh.md) | ||
- [Breadcrumb](https://github.com/antvis/GUI/blob/master/docs/api/ui/breadcrumb.zh.md) | ||
- [Sparkline](https://github.com/antvis/GUI/blob/master/docs/api/ui/sparkline.zh.md) | ||
|
||
## 📮 Contribution | ||
|
||
```bash | ||
$ git clone [email protected]:antvis/gui.git | ||
|
||
$ cd gui | ||
|
||
$ npm install | ||
|
||
$ npm run dev | ||
``` | ||
|
||
Then send a pull request after coding. | ||
|
||
## 📄 License | ||
|
||
MIT@[AntV](https://github.com/antvis). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe('issue-1', () => { | ||
test('#1', () => { | ||
expect(1).toBe(1); | ||
}); | ||
}); |
Oops, something went wrong.