@directededges/specs-from-figma 0.16.0 → 0.18.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 +10 -10
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# @directededges/
|
|
1
|
+
# @directededges/specs-from-figma
|
|
2
2
|
|
|
3
|
-
Core data transformation model for
|
|
3
|
+
Core data transformation model for Specs design specification tools. This package extracts the Model and Runtime layers from specs-plugin, enabling independent development and reusability across CLI, MCP, and plugin environments.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
`@directededges/
|
|
7
|
+
`@directededges/specs-from-figma` provides:
|
|
8
8
|
- **Component Processing**: Transform Figma design components into structured specifications
|
|
9
9
|
- **Runtime Abstractions**: Platform-agnostic data loading and node resolution
|
|
10
10
|
- **Cross-Platform Support**: Works in both Node.js (CLI/MCP) and Browser (Figma Plugin) environments
|
|
@@ -18,7 +18,7 @@ Core data transformation model for Anova design specification tools. This packag
|
|
|
18
18
|
npm config set @directededges:registry https://npm.pkg.github.com
|
|
19
19
|
|
|
20
20
|
# Install the package
|
|
21
|
-
npm install @directededges/
|
|
21
|
+
npm install @directededges/specs-from-figma
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
**Authentication Required**: You must configure a GitHub Personal Access Token with `read:packages` scope:
|
|
@@ -33,7 +33,7 @@ npm install @directededges/anova-transformer
|
|
|
33
33
|
### Plugin environment
|
|
34
34
|
|
|
35
35
|
```typescript
|
|
36
|
-
import { Component } from '@directededges/
|
|
36
|
+
import { Component } from '@directededges/specs-from-figma';
|
|
37
37
|
|
|
38
38
|
const component = await Component.fromPlugin(figmaNode, config);
|
|
39
39
|
console.log(component.yaml());
|
|
@@ -44,8 +44,8 @@ An optional `coordinator` and `author` can be passed as a third argument.
|
|
|
44
44
|
### CLI / REST API environment
|
|
45
45
|
|
|
46
46
|
```typescript
|
|
47
|
-
import { Component } from '@directededges/
|
|
48
|
-
import type { StylesMap, VariablesMap, CollectionsMap } from '@directededges/
|
|
47
|
+
import { Component } from '@directededges/specs-from-figma';
|
|
48
|
+
import type { StylesMap, VariablesMap, CollectionsMap } from '@directededges/specs-from-figma';
|
|
49
49
|
|
|
50
50
|
const component = await Component.fromRestApi(
|
|
51
51
|
libraryJson, // raw REST API JSON
|
|
@@ -81,7 +81,7 @@ Used as the `options` payload for `fromRestApi`:
|
|
|
81
81
|
- `VariablesMap` — map of variable IDs to variable data
|
|
82
82
|
- `CollectionsMap` — map of collection IDs to collection data
|
|
83
83
|
|
|
84
|
-
Output schema types (e.g. `Component` from `@directededges/
|
|
84
|
+
Output schema types (e.g. `Component` from `@directededges/specs-schema`) are provided by the `specs-schema` package.
|
|
85
85
|
|
|
86
86
|
## Development
|
|
87
87
|
|
|
@@ -126,7 +126,7 @@ See [ARCHITECTURE.md](ARCHITECTURE.md) for a system diagram, component hierarchy
|
|
|
126
126
|
|
|
127
127
|
## Version & Compatibility
|
|
128
128
|
|
|
129
|
-
- **Version**: 0.
|
|
129
|
+
- **Version**: 0.17.0 (Pre-1.0 — breaking changes may occur in minor versions)
|
|
130
130
|
- **Node.js**: 20+ required
|
|
131
131
|
- **Target**: ES2020
|
|
132
132
|
- **Module Format**: ESM only
|
|
@@ -137,4 +137,4 @@ See [ARCHITECTURE.md](ARCHITECTURE.md) for a system diagram, component hierarchy
|
|
|
137
137
|
|
|
138
138
|
## Repository
|
|
139
139
|
|
|
140
|
-
https://github.com/
|
|
140
|
+
https://github.com/DirectedEdges/specs-from-figma
|