xcode-graph 0.1.0 → 0.1.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/LICENSE +21 -0
- package/README.md +131 -30
- package/custom-elements.json +486 -71
- package/dist/xcode-graph.js +17150 -0
- package/dist/xcode-graph.service.js +4906 -0
- package/dist/xcodegraph.js +1 -22164
- package/package.json +20 -2
- package/vscode.html-custom-data.json +359 -69
- package/web-types.json +924 -185
- package/dist/assets/micro-layout.worker-CSeqAKhL.js +0 -1726
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Andy Kolean
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,18 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/public/xcode-graph-icon-readme.png" alt="XcodeGraph" width="180" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">xcode-graph</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Interactive dependency graph visualization for Xcode projects</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
A self-contained Lit web component that renders zoomable, filterable dependency graphs on canvas — designed for embedding in any web app or Swift server.
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://www.npmjs.com/package/xcode-graph"><img src="https://img.shields.io/npm/v/xcode-graph?color=7c3aed&label=npm" alt="npm version" /></a>
|
|
17
|
+
<a href="https://github.com/ajkolean/xcode-graph/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" /></a>
|
|
18
|
+
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/types-TypeScript-3178C6" alt="TypeScript" /></a>
|
|
19
|
+
<a href="https://lit.dev"><img src="https://img.shields.io/badge/built%20with-Lit-324FFF" alt="Built with Lit" /></a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="https://ajkolean.github.io/xcode-graph/">Docs</a> •
|
|
24
|
+
<a href="https://ajkolean.github.io/xcode-graph/demo">Live Demo</a> •
|
|
25
|
+
<a href="https://ajkolean.github.io/xcode-graph/api/">API Reference</a>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Features
|
|
31
|
+
|
|
32
|
+
- **Interactive Canvas** — Zoom, pan, and click through dependency graphs with hardware-accelerated rendering
|
|
33
|
+
- **Cluster Layouts** — Nodes grouped by project into visual clusters using a two-phase hierarchical layout (ELK + D3-force)
|
|
34
|
+
- **Search & Filter** — Filter by type, origin, platform, or project; instant search with highlighting
|
|
35
|
+
- **Transitive Dependencies** — Highlight the full dependency chain for any node
|
|
36
|
+
- **Circular Dependency Detection** — Identifies and warns about cycles in the graph
|
|
37
|
+
- **File Upload** — Drag-and-drop or file picker for loading XcodeGraph JSON
|
|
38
|
+
- **Theming** — 20+ CSS custom properties for complete visual customization
|
|
39
|
+
- **Dark & Light Mode** — Automatic adaptation to system preference
|
|
40
|
+
- **TypeScript** — Full type definitions included
|
|
41
|
+
- **Zero Config** — Single `<xcode-graph>` element, works in any framework or vanilla HTML
|
|
4
42
|
|
|
5
43
|
## Installation
|
|
6
44
|
|
|
7
45
|
```bash
|
|
46
|
+
# pnpm
|
|
8
47
|
pnpm add xcode-graph
|
|
48
|
+
|
|
49
|
+
# npm
|
|
50
|
+
npm install xcode-graph
|
|
51
|
+
|
|
52
|
+
# yarn
|
|
53
|
+
yarn add xcode-graph
|
|
9
54
|
```
|
|
10
55
|
|
|
11
|
-
|
|
56
|
+
Or load directly from a CDN:
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/xcode-graph/dist/xcodegraph.js"></script>
|
|
60
|
+
```
|
|
12
61
|
|
|
13
|
-
|
|
62
|
+
## Quick Start
|
|
14
63
|
|
|
15
|
-
|
|
64
|
+
### With data properties
|
|
16
65
|
|
|
17
66
|
```html
|
|
18
67
|
<script type="module">
|
|
@@ -25,50 +74,102 @@ Import the component and pass `GraphNode[]` / `GraphEdge[]` arrays as properties
|
|
|
25
74
|
></xcode-graph>
|
|
26
75
|
```
|
|
27
76
|
|
|
28
|
-
###
|
|
29
|
-
|
|
30
|
-
If you have the raw JSON output from XcodeGraph, use the convenience method:
|
|
77
|
+
### With raw XcodeGraph JSON
|
|
31
78
|
|
|
32
79
|
```js
|
|
33
80
|
const app = document.querySelector('xcode-graph');
|
|
34
81
|
app.loadRawGraph(xcodeGraphJson);
|
|
35
82
|
```
|
|
36
83
|
|
|
37
|
-
`loadRawGraph` validates and transforms the
|
|
84
|
+
`loadRawGraph` validates and transforms the raw JSON into the internal `GraphNode` / `GraphEdge` format automatically.
|
|
85
|
+
|
|
86
|
+
### From a CDN (no bundler)
|
|
87
|
+
|
|
88
|
+
```html
|
|
89
|
+
<!DOCTYPE html>
|
|
90
|
+
<html>
|
|
91
|
+
<body>
|
|
92
|
+
<xcode-graph id="graph" style="width: 100%; height: 100vh;"></xcode-graph>
|
|
93
|
+
<script type="module">
|
|
94
|
+
import 'https://cdn.jsdelivr.net/npm/xcode-graph/dist/xcodegraph.js';
|
|
95
|
+
|
|
96
|
+
const res = await fetch('/graph.json');
|
|
97
|
+
const data = await res.json();
|
|
98
|
+
document.getElementById('graph').loadRawGraph(data);
|
|
99
|
+
</script>
|
|
100
|
+
</body>
|
|
101
|
+
</html>
|
|
102
|
+
```
|
|
38
103
|
|
|
39
104
|
## Data Shape
|
|
40
105
|
|
|
41
|
-
|
|
106
|
+
<details>
|
|
107
|
+
<summary><strong>GraphNode</strong></summary>
|
|
108
|
+
|
|
109
|
+
| Field | Type | Description |
|
|
110
|
+
|---------------------|-----------------------------|----------------------------------------------------------|
|
|
111
|
+
| `id` | `string` | Unique identifier |
|
|
112
|
+
| `name` | `string` | Display name |
|
|
113
|
+
| `type` | `NodeType` | `app`, `framework`, `library`, `package`, `test-unit`, `test-ui`, `cli` |
|
|
114
|
+
| `platform` | `Platform` | `iOS`, `macOS`, `visionOS`, `tvOS`, `watchOS` |
|
|
115
|
+
| `origin` | `Origin` | `local` or `external` |
|
|
116
|
+
| `project` | `string?` | Owning project name |
|
|
117
|
+
| `deploymentTargets` | `Record<Platform, string>?` | Multi-platform deployment targets |
|
|
42
118
|
|
|
43
|
-
|
|
44
|
-
|---------------------|---------------------------|------------------------------------------|
|
|
45
|
-
| `id` | `string` | Unique identifier |
|
|
46
|
-
| `name` | `string` | Display name |
|
|
47
|
-
| `type` | `NodeType` | Category (`app`, `framework`, `library`, `package`, …) |
|
|
48
|
-
| `platform` | `Platform` | Target platform (`iOS`, `macOS`, …) |
|
|
49
|
-
| `origin` | `Origin` | `local` or `external` |
|
|
50
|
-
| `project` | `string?` | Owning project name |
|
|
51
|
-
| `deploymentTargets` | `Record<Platform, string>?` | Multi-platform deployment targets |
|
|
119
|
+
</details>
|
|
52
120
|
|
|
53
|
-
|
|
121
|
+
<details>
|
|
122
|
+
<summary><strong>GraphEdge</strong></summary>
|
|
54
123
|
|
|
55
124
|
| Field | Type | Description |
|
|
56
125
|
|----------------------|-------------------|--------------------------------------------|
|
|
57
126
|
| `source` | `string` | ID of the source node (depends on target) |
|
|
58
127
|
| `target` | `string` | ID of the target node (dependency) |
|
|
59
|
-
| `kind` | `DependencyKind?` |
|
|
128
|
+
| `kind` | `DependencyKind?` | `target`, `project`, `sdk`, `xcframework` |
|
|
60
129
|
| `platformConditions` | `Platform[]?` | Platform conditions for this edge |
|
|
61
130
|
|
|
62
|
-
|
|
131
|
+
</details>
|
|
132
|
+
|
|
133
|
+
These are the core fields. See the full type definitions in the [API Reference](https://ajkolean.github.io/xcode-graph/api/).
|
|
134
|
+
|
|
135
|
+
## Theming
|
|
136
|
+
|
|
137
|
+
Customize the look with CSS custom properties:
|
|
138
|
+
|
|
139
|
+
```css
|
|
140
|
+
xcode-graph {
|
|
141
|
+
--graph-bg: #1a1a2e;
|
|
142
|
+
--graph-accent: #7c3aed;
|
|
143
|
+
--graph-text: #e2e8f0;
|
|
144
|
+
--graph-node-app: #f59e0b;
|
|
145
|
+
--graph-node-framework: #0ea5e9;
|
|
146
|
+
--graph-node-package: #10b981;
|
|
147
|
+
--graph-radius: 8px;
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
See the [Component API reference](https://ajkolean.github.io/xcode-graph/reference/component-api) for all available properties.
|
|
152
|
+
|
|
153
|
+
## Swift Integration
|
|
154
|
+
|
|
155
|
+
xcode-graph is designed to work with Swift servers. A reference SwiftNIO implementation serves the component from CDN with zero bundled assets:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
GET / → HTML page loading <xcode-graph> from jsdelivr
|
|
159
|
+
GET /graph.json → Raw XcodeGraph JSON data
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
See the [Swift Integration guide](https://ajkolean.github.io/xcode-graph/guide/swift-integration) for details.
|
|
63
163
|
|
|
64
164
|
## Documentation
|
|
65
165
|
|
|
66
|
-
Full
|
|
166
|
+
Full docs at **[ajkolean.github.io/xcode-graph](https://ajkolean.github.io/xcode-graph/)**
|
|
67
167
|
|
|
68
|
-
- [Getting Started](https://ajkolean.github.io/
|
|
69
|
-
- [Swift Integration](https://ajkolean.github.io/
|
|
70
|
-
- [
|
|
71
|
-
- [
|
|
168
|
+
- [Getting Started](https://ajkolean.github.io/xcode-graph/guide/) — Installation, usage, and data shape
|
|
169
|
+
- [Swift Integration](https://ajkolean.github.io/xcode-graph/guide/swift-integration) — Embedding in a Swift server
|
|
170
|
+
- [Component API](https://ajkolean.github.io/xcode-graph/reference/component-api) — Properties, methods, events, CSS custom properties
|
|
171
|
+
- [Layout Configuration](https://ajkolean.github.io/xcode-graph/reference/layout-configuration) — ELK & D3-force parameters
|
|
172
|
+
- [API Reference](https://ajkolean.github.io/xcode-graph/api/) — Full TypeDoc reference
|
|
72
173
|
|
|
73
174
|
## Development
|
|
74
175
|
|
|
@@ -78,10 +179,10 @@ pnpm dev # Start dev server
|
|
|
78
179
|
pnpm test:run # Run tests
|
|
79
180
|
pnpm check # Lint + format (Biome)
|
|
80
181
|
pnpm docs:dev # Start docs dev server
|
|
81
|
-
pnpm docs:api # Generate TypeDoc
|
|
182
|
+
pnpm docs:api # Generate TypeDoc API reference
|
|
82
183
|
pnpm analyze # Regenerate Custom Elements Manifest
|
|
83
184
|
```
|
|
84
185
|
|
|
85
186
|
## License
|
|
86
187
|
|
|
87
|
-
|
|
188
|
+
[MIT](LICENSE) © Andy Kolean
|