@arach/arc 0.4.1 → 0.4.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/README.md CHANGED
@@ -1,8 +1,62 @@
1
+ <div align="center">
2
+
1
3
  # Arc
2
4
 
3
- A visual diagram editor for creating architecture diagrams. Design visually, export as code.
5
+ ### Design architecture diagrams visually. Ship them as code.
6
+
7
+ Arc is a React component **and** a visual editor for building clean, themeable
8
+ architecture diagrams — then exporting them as **TypeScript, JSON, SVG, PNG, or
9
+ crisp ASCII**. Design in the canvas, drop the component in your app, or render
10
+ straight to text for a README. Same diagram, everywhere.
11
+
12
+ [![npm version](https://img.shields.io/npm/v/@arach/arc.svg?color=6d5efc&label=%40arach%2Farc)](https://www.npmjs.com/package/@arach/arc)
13
+ [![license](https://img.shields.io/npm/l/@arach/arc.svg?color=41b883)](./LICENSE)
14
+ [![types](https://img.shields.io/npm/types/@arach/arc.svg?color=3b82f6)](./lib/index.d.ts)
15
+
16
+ ![A microservices architecture rendered by Arc's ArcDiagram component](public/hero.png)
17
+
18
+ <sub>Not a screenshot of a drawing tool — that's the config in <a href="#example-output">Example Output</a>, rendered live by <code>&lt;ArcDiagram /&gt;</code>.</sub>
19
+
20
+ </div>
21
+
22
+ ---
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npm install @arach/arc
28
+ # or: bun add @arach/arc · pnpm add @arach/arc · yarn add @arach/arc
29
+ ```
30
+
31
+ `react`, `react-dom`, and `lucide-react` are peer dependencies.
32
+
33
+ ## Quick Start
4
34
 
5
- ![Arc Editor](public/og-editor.png)
35
+ Render any diagram config as a polished, interactive component:
36
+
37
+ ```tsx
38
+ import { ArcDiagram } from '@arach/arc'
39
+ import type { ArcDiagramData } from '@arach/arc'
40
+
41
+ export function Architecture() {
42
+ return (
43
+ <ArcDiagram
44
+ data={diagram} // your ArcDiagramData (see below)
45
+ theme="default" // default · warm · cool · mono · ibm · palantir · anduril
46
+ mode="dark" // light · dark
47
+ defaultZoom="fit" // auto-fit to the container
48
+ />
49
+ )
50
+ }
51
+ ```
52
+
53
+ You get pan/zoom, hover highlighting, light/dark modes, and seven color themes
54
+ out of the box. Prefer to design visually? Clone the repo and open the editor:
55
+
56
+ ```bash
57
+ git clone https://github.com/arach/arc && cd arc
58
+ bun install && bun dev # → http://localhost:5188
59
+ ```
6
60
 
7
61
  ## Features
8
62
 
@@ -10,21 +64,15 @@ A visual diagram editor for creating architecture diagrams. Design visually, exp
10
64
  - **Multiple Node Sizes** - Large, medium, small
11
65
  - **Color Themes** - Violet, emerald, blue, amber, sky, zinc, rose, orange
12
66
  - **Connector Styles** - Solid/dashed lines, labels, curved paths
13
- - **Export Options** - TypeScript, JSON, SVG, PNG, shareable links
67
+ - **Export Options** - TypeScript, JSON, SVG, PNG, ASCII, shareable links
14
68
  - **Interactive Canvas** - Infinite pan/zoom, grid snapping
15
69
  - **Groups & Images** - Visual grouping, background images
16
70
  - **Templates** - Quick-start layouts
17
71
 
18
- ## Getting Started
19
-
20
- ```bash
21
- pnpm install
22
- pnpm dev
23
- ```
24
-
25
72
  ## Example Output
26
73
 
27
- Arc exports diagrams as clean TypeScript. Here's a microservices architecture:
74
+ Arc stores diagrams as plain, typed data the same config that renders the
75
+ diagram at the top of this README:
28
76
 
29
77
  ```typescript
30
78
  const diagram: ArcDiagramData = {