gradiente 2.0.0 → 2.0.1
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.
- package/README.md +94 -111
- package/package.json +9 -2
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,111 +1,94 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
<img src="https://raw.githubusercontent.com/Flowscape-UI/gradiente/fff32510afe7e3e1b7b2f73dbf7246843a06d859/assets/logo.svg" alt="gradiente logo" />
|
|
4
|
-
|
|
5
|
-
<h1>gradiente</h1>
|
|
6
|
-
|
|
7
|
-
<p>Minimalist & lightweight engine for sophisticated web gradients</p>
|
|
8
|
-
|
|
9
|
-
<img src="https://raw.githubusercontent.com/Flowscape-UI/gradiente/d8429051f700698f664d8d2392cfa58a604f8e83/assets/flowscape-badge.svg" alt="npm version" />
|
|
10
|
-
<br />
|
|
11
|
-
|
|
12
|
-
<a href="https://www.npmjs.com/package/gradiente">
|
|
13
|
-
<img src="https://img.shields.io/npm/v/gradiente.svg?style=flat-square&labelColor=d84f4c&color=black" alt="npm version">
|
|
14
|
-
</a>
|
|
15
|
-
<a href="https://bundlephobia.com/result?p=gradiente">
|
|
16
|
-
<img src="https://img.shields.io/bundlephobia/minzip/gradiente?style=flat-square&labelColor=d84f4c&color=black" alt="bundle size"/>
|
|
17
|
-
</a>
|
|
18
|
-
<a href="https://github.com/Flowscape-UI/gradiente/blob/main/LICENSE">
|
|
19
|
-
<img src="https://img.shields.io/github/license/Flowscape-UI/gradiente?style=flat-square&labelColor=d84f4c&color=black" alt="license"/>
|
|
20
|
-
</a>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# Gradiente
|
|
25
|
-
|
|
26
|
-
**Gradiente** is a lightweight gradient parser and transformer for modern rendering systems.
|
|
27
|
-
|
|
28
|
-
Parse CSS gradients → work with structured data → render anywhere.
|
|
29
|
-
|
|
30
|
-
> Gradients as data, not strings.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
* [x] linear gradients
|
|
97
|
-
* [x] radial gradients
|
|
98
|
-
* [x] conic gradients
|
|
99
|
-
* [x] canvas + css transformers
|
|
100
|
-
* [ ] docs
|
|
101
|
-
* [ ] playground
|
|
102
|
-
* [ ] more render targets
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Philosophy
|
|
107
|
-
|
|
108
|
-
Gradiente treats gradients as a graphics primitive.
|
|
109
|
-
|
|
110
|
-
Not a string to preserve -
|
|
111
|
-
but data you can transform and render anywhere.
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/Flowscape-UI/gradiente/fff32510afe7e3e1b7b2f73dbf7246843a06d859/assets/logo.svg" alt="gradiente logo" />
|
|
4
|
+
|
|
5
|
+
<h1>gradiente</h1>
|
|
6
|
+
|
|
7
|
+
<p>Minimalist & lightweight engine for sophisticated web gradients</p>
|
|
8
|
+
|
|
9
|
+
<img src="https://raw.githubusercontent.com/Flowscape-UI/gradiente/d8429051f700698f664d8d2392cfa58a604f8e83/assets/flowscape-badge.svg" alt="npm version" />
|
|
10
|
+
<br />
|
|
11
|
+
|
|
12
|
+
<a href="https://www.npmjs.com/package/gradiente">
|
|
13
|
+
<img src="https://img.shields.io/npm/v/gradiente.svg?style=flat-square&labelColor=d84f4c&color=black" alt="npm version">
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://bundlephobia.com/result?p=gradiente">
|
|
16
|
+
<img src="https://img.shields.io/bundlephobia/minzip/gradiente?style=flat-square&labelColor=d84f4c&color=black" alt="bundle size"/>
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://github.com/Flowscape-UI/gradiente/blob/main/LICENSE">
|
|
19
|
+
<img src="https://img.shields.io/github/license/Flowscape-UI/gradiente?style=flat-square&labelColor=d84f4c&color=black" alt="license"/>
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# Gradiente
|
|
25
|
+
|
|
26
|
+
**Gradiente** is a lightweight gradient parser and transformer for modern rendering systems.
|
|
27
|
+
|
|
28
|
+
Parse CSS gradients → work with structured data → render anywhere.
|
|
29
|
+
|
|
30
|
+
> Gradients as data, not strings.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install gradiente
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Example
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { parse, transformTo } from "gradiente";
|
|
44
|
+
|
|
45
|
+
const gradient = parse("linear-gradient(red, blue)");
|
|
46
|
+
|
|
47
|
+
const css = transformTo("css", gradient);
|
|
48
|
+
const canvas = transformTo("canvas", gradient);
|
|
49
|
+
|
|
50
|
+
canvas.draw(ctx, 300, 300);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The full documentation is published on [gradiente docs](https://flowscape-ui.github.io/gradiente/). Some quick entry points:
|
|
54
|
+
|
|
55
|
+
- [Getting started](https://flowscape-ui.github.io/gradiente/getting-started.html)
|
|
56
|
+
- [API References](https://flowscape-ui.github.io/gradiente/core-api/working-with-gradients.html)
|
|
57
|
+
- [Custom Gradients](https://flowscape-ui.github.io/gradiente/core-api/custom-gradients.html)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## What it does
|
|
61
|
+
|
|
62
|
+
- Parses gradients into structured objects
|
|
63
|
+
- Normalizes angles, positions, and stops
|
|
64
|
+
- Transforms gradients to different targets:
|
|
65
|
+
- CSS
|
|
66
|
+
- Canvas
|
|
67
|
+
- (more coming)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Built for
|
|
72
|
+
|
|
73
|
+
* design tools
|
|
74
|
+
* visual editors
|
|
75
|
+
* canvas engines
|
|
76
|
+
* WebGL / Pixi / Konva
|
|
77
|
+
* custom rendering pipelines
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Philosophy
|
|
82
|
+
|
|
83
|
+
Gradiente treats gradients as a graphics primitive.
|
|
84
|
+
|
|
85
|
+
Not a string to preserve -
|
|
86
|
+
but data you can transform and render anywhere.
|
|
87
|
+
|
|
88
|
+
## Contributing
|
|
89
|
+
|
|
90
|
+
Contributions of all kinds (feedback, ideas, bug fixes, documentation) are welcome.
|
|
91
|
+
|
|
92
|
+
Please open a GitHub issue/discussion before putting in any work that’s not straightforward.
|
|
93
|
+
|
|
94
|
+
More in [CONTRIBUTING.md](../../CONTRIBUTING.md).
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gradiente",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"description": "Lightweight gradient toolkit for modern rendering systems.",
|
|
6
6
|
"author": "Nice Arti <nikcrav@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"homepage": "https://github.
|
|
8
|
+
"homepage": "https://flowscape-ui.github.io/gradiente/",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"gradiente",
|
|
11
11
|
"gradient",
|
|
@@ -42,10 +42,17 @@
|
|
|
42
42
|
"docs:preview": "vitepress preview docs"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
+
"@codemirror/basic-setup": "^0.20.0",
|
|
46
|
+
"@codemirror/commands": "^6.10.3",
|
|
47
|
+
"@codemirror/language": "^6.12.3",
|
|
48
|
+
"@codemirror/state": "^6.6.0",
|
|
49
|
+
"@codemirror/view": "^6.41.1",
|
|
45
50
|
"@eslint/js": "^10.0.1",
|
|
46
51
|
"@types/culori": "^4.0.1",
|
|
47
52
|
"@types/node": "^25.5.0",
|
|
48
53
|
"@typescript/native-preview": "7.0.0-dev.20260418.1",
|
|
54
|
+
"@vue-flow/background": "^1.3.2",
|
|
55
|
+
"@vue-flow/core": "^1.48.2",
|
|
49
56
|
"bumpp": "^11.0.1",
|
|
50
57
|
"eslint": "^10.2.0",
|
|
51
58
|
"tsdown": "^0.21.7",
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Flowscape UI
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|