-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from meursyphus/dev
Deploy version 1.0.0
- Loading branch information
Showing
652 changed files
with
375,383 additions
and
12,206 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,10 @@ | ||
version = 1 | ||
|
||
[[analyzers]] | ||
name = "javascript" | ||
|
||
[analyzers.meta] | ||
environment = [ | ||
"nodejs", | ||
"browser" | ||
] |
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: Deploy to Chromatic | ||
|
||
on: | ||
push: | ||
paths: | ||
- packages/flitter/**/* | ||
- packages/story/**/* | ||
- .github/workflows/chromatic.yml | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
chromatic-deployment: | ||
runs-on: ubuntu-latest | ||
environment: CHROMATIC_PROJECT_TOKEN | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # 👈 Required to retrieve git history | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm ci | ||
- name: Build Storybook | ||
run: npm run story:build | ||
|
||
- name: Deploy to Chromatic | ||
run: cd packages/story && npx chromatic --project-token=${{ secrets.CHROMATIC_PROJECT_TOKEN }} --auto-accept-changes |
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,33 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
branches: [ main, master, dev ] | ||
paths: | ||
- 'packages/test/**' | ||
- 'packages/flitter/**' | ||
pull_request: | ||
branches: [ main, master, dev ] | ||
paths: | ||
- 'packages/test/**' | ||
- 'packages/flitter/**' | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: npm i | ||
- name: Install Playwright Browsers | ||
run: cd packages/test && npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npm run test:playwright | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: packages/test/playwright-report/ | ||
retention-days: 30 |
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 |
---|---|---|
@@ -1,3 +1,13 @@ | ||
/node_modules | ||
/dist | ||
/.env | ||
*storybook.log | ||
|
||
node_modules/ | ||
dist/ | ||
.env | ||
storybook-static/ | ||
package | ||
.svelte-kit | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ |
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 @@ | ||
npx 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
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
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,70 @@ | ||
# Flitter | ||
|
||
Flitter is a framework that deals with SVG. Like React, it uses VDOM to manage state and optimize rendering. Since the library directly calculates the layout, it is much easier to visualize data than using D3. This provides a high level of control and flexibility for data visualization. | ||
|
||
FlutterJs is a library inspired by Flutter, a cross-platform framework commonly used for mobile app development. | ||
|
||
For more details, visit [here](https://flitter.pages.dev). | ||
|
||
## Getting Started | ||
|
||
Getting started with Flitter is straightforward. Follow these steps to install and use Flitter in your React or Svelte projects. (Or you can implement widget component manually to support Flitter.) | ||
|
||
### React | ||
```bash | ||
npm i @meursyphus/flitter @meursyphus/flitter-react | ||
``` | ||
Example of using Flitter widgets in a React component: | ||
|
||
```javascript | ||
import { Container, Alignment, Text, TextStyle } from '@meursyphus/flitter'; | ||
import Widget from '@meursyphus/flitter-react'; | ||
|
||
const App = () => { | ||
return ( | ||
<Widget | ||
width="600px" | ||
height="300px" | ||
widget={Container({ | ||
alignment: Alignment.center, | ||
color: 'lightblue', | ||
child: Text("Hello, Flitter!", style: TextStyle({ fontSize: 30, weight: 'bold' })) | ||
})} | ||
/> | ||
); | ||
}; | ||
``` | ||
### Svelte | ||
|
||
```bash | ||
npm i @meursyphus/flitter @meursyphus/flitter-svelte | ||
``` | ||
|
||
```svelte | ||
<script> | ||
import { Container, Alignment, Text, TextStyle } from '@meursyphus/flitter'; | ||
import Widget from '@meursyphus/flitter-svelte'; | ||
</script> | ||
<Widget | ||
width="600px" | ||
height="300px" | ||
widget={Container({ | ||
alignment: Alignment.center, | ||
color: 'lightblue', | ||
child: Text("Hello, Flitter!", style: TextStyle({ fontSize: 30, weight: 'bold' })) | ||
})} | ||
/> | ||
``` | ||
|
||
## Features | ||
|
||
- Provides high-resolution, resolution-independent visualizations based on SVG | ||
- Simplifies SVG manipulation with a component-based approach | ||
- Allows for quick learning and development with a syntax similar to Flutter | ||
|
||
## License | ||
|
||
Flitter is open-source software freely available under the MIT license. | ||
|
||
For more information and documentation, refer to the [Flitter official documentation](https://flitter.pages.dev). |
Oops, something went wrong.