@meursyphus/flitter 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +70 -0
  2. package/package.json +4 -2
package/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # Flitter
2
+
3
+ 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.
4
+
5
+ FlutterJs is a library inspired by Flutter, a cross-platform framework commonly used for mobile app development.
6
+
7
+ For more details, visit [here](https://flitter.pages.dev).
8
+
9
+ ## Getting Started
10
+
11
+ 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.)
12
+
13
+ ### React
14
+ ```bash
15
+ npm i @meursyphus/flitter @meursyphus/flitter-react
16
+ ```
17
+ Example of using Flitter widgets in a React component:
18
+
19
+ ```javascript
20
+ import { Container, Alignment, Text, TextStyle } from '@meursyphus/flitter';
21
+ import Widget from '@meursyphus/flitter-react';
22
+
23
+ const App = () => {
24
+ return (
25
+ <Widget
26
+ width="600px"
27
+ height="300px"
28
+ widget={Container({
29
+ alignment: Alignment.center,
30
+ color: 'lightblue',
31
+ child: Text("Hello, Flitter!", style: TextStyle({ fontSize: 30, weight: 'bold' }))
32
+ })}
33
+ />
34
+ );
35
+ };
36
+ ```
37
+ ### Svelte
38
+
39
+ ```bash
40
+ npm i @meursyphus/flitter @meursyphus/flitter-svelte
41
+ ```
42
+
43
+ ```svelte
44
+ <script>
45
+ import { Container, Alignment, Text, TextStyle } from '@meursyphus/flitter';
46
+ import Widget from '@meursyphus/flitter-svelte';
47
+ </script>
48
+
49
+ <Widget
50
+ width="600px"
51
+ height="300px"
52
+ widget={Container({
53
+ alignment: Alignment.center,
54
+ color: 'lightblue',
55
+ child: Text("Hello, Flitter!", style: TextStyle({ fontSize: 30, weight: 'bold' }))
56
+ })}
57
+ />
58
+ ```
59
+
60
+ ## Features
61
+
62
+ - Provides high-resolution, resolution-independent visualizations based on SVG
63
+ - Simplifies SVG manipulation with a component-based approach
64
+ - Allows for quick learning and development with a syntax similar to Flutter
65
+
66
+ ## License
67
+
68
+ Flitter is open-source software freely available under the MIT license.
69
+
70
+ For more information and documentation, refer to the [Flitter official documentation](https://flitter.pages.dev).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meursyphus/flitter",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "A declarative, widget-based library built on SVG for simplifying data visualization with a Flutter-like syntax.",
5
5
  "keywords": [
6
6
  "flitter",
@@ -13,7 +13,9 @@
13
13
  "homepage": "https://flitter.pages.dev",
14
14
  "scripts": {
15
15
  "test": "echo \"Error: no test specified\" && exit 1",
16
- "build": "tsup && cp package.json dist/package.json && cd dist && npm run fix-package",
16
+ "build": "tsup && npm run copy-package && npm run copy-readme && cd dist && npm run fix-package",
17
+ "copy-package": "cp package.json dist/package.json",
18
+ "copy-readme": "cp README.md dist/README.md",
17
19
  "fix-package": "npm pkg set main=./index.cjs module=./index.js exports.default=./index.js exports.import=./index.js",
18
20
  "lint": "eslint src/**",
19
21
  "postbuild": "echo \"Build complete. Please run: \n\ncd dist\nnpm publish\n\""