shumoku 0.1.0

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 ADDED
@@ -0,0 +1,80 @@
1
+ # Shumoku
2
+
3
+ Modern network topology visualization library for TypeScript/JavaScript.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install shumoku
9
+ ```
10
+
11
+ For vendor icons (Yamaha, Aruba, AWS, Juniper):
12
+
13
+ ```bash
14
+ npm install shumoku @shumoku/icons
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```typescript
20
+ import { YamlParser, HierarchicalLayoutEngine, SvgRenderer } from 'shumoku'
21
+
22
+ const yaml = `
23
+ name: "Simple Network"
24
+
25
+ nodes:
26
+ - id: router
27
+ label: "Core Router"
28
+ type: router
29
+
30
+ - id: switch
31
+ label: "Main Switch"
32
+ type: l2-switch
33
+
34
+ links:
35
+ - from: { node: router }
36
+ to: { node: switch }
37
+ bandwidth: 10G
38
+ `
39
+
40
+ // Parse YAML to network graph
41
+ const parser = new YamlParser()
42
+ const graph = parser.parse(yaml)
43
+
44
+ // Layout the graph
45
+ const engine = new HierarchicalLayoutEngine()
46
+ const layout = await engine.layout(graph)
47
+
48
+ // Render to SVG
49
+ const renderer = new SvgRenderer()
50
+ const svg = renderer.render(layout)
51
+ ```
52
+
53
+ ## Features
54
+
55
+ - **YAML-based definitions** - Simple, readable network topology definitions
56
+ - **Automatic layout** - Hierarchical layout powered by ELK.js
57
+ - **Vendor icons** - Built-in icons for Yamaha, Aruba, AWS, Juniper (500+ icons)
58
+ - **SVG export** - High-quality vector output
59
+ - **TypeScript** - Full type safety
60
+
61
+ ## Packages
62
+
63
+ This package bundles:
64
+
65
+ - [`@shumoku/core`](https://www.npmjs.com/package/@shumoku/core) - Core library (models, layout, renderer)
66
+ - [`@shumoku/parser-yaml`](https://www.npmjs.com/package/@shumoku/parser-yaml) - YAML parser
67
+
68
+ Optional:
69
+
70
+ - [`@shumoku/icons`](https://www.npmjs.com/package/@shumoku/icons) - Vendor-specific icons
71
+
72
+ ## Documentation
73
+
74
+ - [Playground](https://shumoku.packof.me/) - Interactive demo
75
+ - [YAML Reference](https://shumoku.packof.me/docs/yaml-reference) - Full syntax reference
76
+ - [GitHub](https://github.com/konoe-akitoshi/shumoku)
77
+
78
+ ## License
79
+
80
+ MIT
@@ -0,0 +1,3 @@
1
+ export * from '@shumoku/core';
2
+ export * from '@shumoku/parser-yaml';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAA;AAG7B,cAAc,sBAAsB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ // Re-export everything from core
2
+ export * from '@shumoku/core';
3
+ // Re-export parser
4
+ export * from '@shumoku/parser-yaml';
5
+ // Optional: Try to load and register vendor icons if available
6
+ try {
7
+ const icons = await import('@shumoku/icons');
8
+ icons.registerAllIcons();
9
+ }
10
+ catch {
11
+ // @shumoku/icons is optional, ignore if not installed
12
+ }
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,cAAc,eAAe,CAAA;AAE7B,mBAAmB;AACnB,cAAc,sBAAsB,CAAA;AAEpC,+DAA+D;AAC/D,IAAI,CAAC;IACH,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAA;IAC5C,KAAK,CAAC,gBAAgB,EAAE,CAAA;AAC1B,CAAC;AAAC,MAAM,CAAC;IACP,sDAAsD;AACxD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "shumoku",
3
+ "version": "0.1.0",
4
+ "description": "Modern network topology visualization library for TypeScript/JavaScript",
5
+ "license": "MIT",
6
+ "author": "konoe-akitoshi",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/konoe-akitoshi/shumoku.git",
10
+ "directory": "packages/shumoku"
11
+ },
12
+ "homepage": "https://shumoku.packof.me/",
13
+ "bugs": {
14
+ "url": "https://github.com/konoe-akitoshi/shumoku/issues"
15
+ },
16
+ "keywords": [
17
+ "network",
18
+ "topology",
19
+ "diagram",
20
+ "visualization",
21
+ "svg",
22
+ "yaml"
23
+ ],
24
+ "type": "module",
25
+ "main": "./dist/index.js",
26
+ "module": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "scripts": {
38
+ "build": "tsc",
39
+ "dev": "tsc --watch",
40
+ "typecheck": "tsc --noEmit"
41
+ },
42
+ "dependencies": {
43
+ "@shumoku/core": "^0.1.1",
44
+ "@shumoku/parser-yaml": "^0.1.1"
45
+ },
46
+ "optionalDependencies": {
47
+ "@shumoku/icons": "^0.1.1"
48
+ }
49
+ }