vizcraft 0.2.0 → 0.2.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.
- package/CHANGELOG.md +12 -0
- package/README.md +32 -16
- package/dist/styles.d.ts +1 -1
- package/dist/styles.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# vizcraft
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7c9eb18`](https://github.com/ChipiKaf/vizcraft/commit/7c9eb185e727bde899b4779c4661d8b176db8549) Thanks [@ChipiKaf](https://github.com/ChipiKaf)! - update documentation
|
|
8
|
+
|
|
9
|
+
## 0.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`f8fd369`](https://github.com/ChipiKaf/vizcraft/commit/f8fd369ca32a4653059f8e6697a17dcea56edc8c) Thanks [@ChipiKaf](https://github.com/ChipiKaf)! - Update documentation
|
|
14
|
+
|
|
3
15
|
## 0.2.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# VizCraft
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/vizcraft)
|
|
4
|
+
[](https://www.npmjs.com/package/vizcraft)
|
|
5
|
+
[](https://github.com/ChipiKaf/vizcraft/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/ChipiKaf/vizcraft/actions/workflows/release.yml)
|
|
7
|
+
[](https://github.com/ChipiKaf/vizcraft/actions/workflows/snapshot.yml)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
📖 Full documentation: [docs here](https://vizcraft-docs.vercel.app/docs/intro)
|
|
11
|
+
|
|
3
12
|
**A declarative, builder-based library for creating animated SVG network visualizations and algorithm demos.**
|
|
4
13
|
|
|
5
14
|
VizCraft is designed to make creating beautiful, animated node-link diagrams and complex visualizations intuitive and powerful. Whether you are building an educational tool, explaining an algorithm, or just need a great looking graph, VizCraft provides the primitives you need.
|
|
@@ -32,7 +41,6 @@ import { viz } from 'vizcraft';
|
|
|
32
41
|
const builder = viz().view(800, 600);
|
|
33
42
|
|
|
34
43
|
builder
|
|
35
|
-
.view(500, 500)
|
|
36
44
|
.node('a')
|
|
37
45
|
.at(100, 100)
|
|
38
46
|
.circle(15)
|
|
@@ -48,17 +56,21 @@ const container = document.getElementById('viz-basic');
|
|
|
48
56
|
if (container) builder.mount(container);
|
|
49
57
|
```
|
|
50
58
|
|
|
59
|
+
More walkthroughs and examples: [docs here](https://vizcraft-docs.vercel.app/docs/examples).
|
|
60
|
+
|
|
51
61
|
## 📚 Documentation (Topics)
|
|
52
62
|
|
|
53
|
-
|
|
63
|
+
Full documentation site: [docs here](https://vizcraft-docs.vercel.app/docs/intro)
|
|
54
64
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- [
|
|
58
|
-
- [
|
|
59
|
-
|
|
60
|
-
- [
|
|
61
|
-
- [
|
|
65
|
+
Docs topics (same as the sidebar):
|
|
66
|
+
|
|
67
|
+
- [Introduction](https://vizcraft-docs.vercel.app/docs/intro)
|
|
68
|
+
- [Examples](https://vizcraft-docs.vercel.app/docs/examples)
|
|
69
|
+
- [Essentials](https://vizcraft-docs.vercel.app/docs/essentials)
|
|
70
|
+
- [Animations](https://vizcraft-docs.vercel.app/docs/animations)
|
|
71
|
+
- [Animation Builder API](https://vizcraft-docs.vercel.app/docs/animations/animation-builder-api)
|
|
72
|
+
- [Advanced](https://vizcraft-docs.vercel.app/docs/advanced)
|
|
73
|
+
- [Types](https://vizcraft-docs.vercel.app/docs/types)
|
|
62
74
|
|
|
63
75
|
Run the docs locally (monorepo):
|
|
64
76
|
|
|
@@ -109,6 +121,8 @@ b.edge('n1', 'n2')
|
|
|
109
121
|
|
|
110
122
|
### Animations
|
|
111
123
|
|
|
124
|
+
See the full Animations guide [docs here](https://vizcraft-docs.vercel.app/docs/animations).
|
|
125
|
+
|
|
112
126
|
VizCraft supports **two complementary animation approaches**:
|
|
113
127
|
|
|
114
128
|
1. **Registry/CSS animations** (simple, reusable effects)
|
|
@@ -138,7 +152,7 @@ b.node('a')
|
|
|
138
152
|
|
|
139
153
|
2. **Data-only timeline animations (`AnimationSpec`)** (sequenced tweens)
|
|
140
154
|
|
|
141
|
-
- Author with `builder.animate((
|
|
155
|
+
- Author with `builder.animate((aBuilder) => ...)`.
|
|
142
156
|
- VizCraft stores compiled specs on the scene as `scene.animationSpecs`.
|
|
143
157
|
- Play them with `builder.play()`.
|
|
144
158
|
|
|
@@ -159,8 +173,8 @@ b.node('a')
|
|
|
159
173
|
.arrow()
|
|
160
174
|
.done();
|
|
161
175
|
|
|
162
|
-
b.animate((
|
|
163
|
-
|
|
176
|
+
b.animate((aBuilder) =>
|
|
177
|
+
aBuilder
|
|
164
178
|
.node('a')
|
|
165
179
|
.to({ x: 200, opacity: 0.35 }, { duration: 600 })
|
|
166
180
|
.node('b')
|
|
@@ -191,8 +205,10 @@ b.node('a')
|
|
|
191
205
|
.edge('a', 'b', 'e1')
|
|
192
206
|
.done();
|
|
193
207
|
|
|
194
|
-
b.animate((
|
|
195
|
-
|
|
208
|
+
b.animate((aBuilder) =>
|
|
209
|
+
aBuilder
|
|
210
|
+
.edge('a', 'b', 'e1')
|
|
211
|
+
.to({ strokeDashoffset: -120 }, { duration: 900 })
|
|
196
212
|
);
|
|
197
213
|
```
|
|
198
214
|
|
|
@@ -201,8 +217,8 @@ b.animate((anim) =>
|
|
|
201
217
|
Specs can carry adapter extensions so you can animate your own numeric properties:
|
|
202
218
|
|
|
203
219
|
```ts
|
|
204
|
-
b.animate((
|
|
205
|
-
|
|
220
|
+
b.animate((aBuilder) =>
|
|
221
|
+
aBuilder
|
|
206
222
|
.extendAdapter((adapter) => {
|
|
207
223
|
adapter.register?.('node', 'r', {
|
|
208
224
|
get: (target) => adapter.get(target, 'r'),
|
package/dist/styles.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DEFAULT_VIZ_CSS = "\n.viz-canvas {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.viz-node-label,\n.viz-edge-label {\n dominant-baseline: middle;\n alignment-baseline: middle;\n transform: translateY(
|
|
1
|
+
export declare const DEFAULT_VIZ_CSS = "\n.viz-canvas {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.viz-node-label,\n.viz-edge-label {\n text-anchor: middle;\n dominant-baseline: middle;\n alignment-baseline: middle;\n transform: translateY(0);\n}\n\n.viz-canvas svg {\n width: 100%;\n height: 100%;\n overflow: visible;\n}\n\n/* Keyframes */\n@keyframes vizFlow {\n from {\n stroke-dashoffset: 20;\n }\n to {\n stroke-dashoffset: 0;\n }\n}\n\n/* Animation Classes */\n\n/* Flow Animation (Dashed line moving) */\n.viz-anim-flow .viz-edge {\n stroke-dasharray: 5, 5;\n animation: vizFlow var(--viz-anim-duration, 2s) linear infinite;\n}\n\n/* Node Transition */\n.viz-node-group {\n transition: transform 0.3s ease-out, opacity 0.3s ease-out;\n}\n\n/* Overlay Classes */\n.viz-grid-label {\n fill: #6B7280;\n font-size: 14px;\n font-weight: 600;\n opacity: 1;\n}\n\n.viz-signal {\n fill: #3B82F6;\n cursor: pointer;\n pointer-events: all; \n transition: transform 0.2s ease-out, fill 0.2s ease-out;\n}\n\n.viz-signal .viz-signal-shape {\n fill: inherit;\n}\n\n.viz-signal:hover {\n fill: #60A5FA;\n transform: scale(1.5);\n}\n\n.viz-data-point {\n fill: #F59E0B;\n transition: cx 0.3s ease-out, cy 0.3s ease-out;\n}\n";
|
package/dist/styles.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vizcraft",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "A fluent, type-safe SVG scene builder for composing nodes, edges, animations, and overlays with incremental DOM updates and no framework dependency.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visualization",
|