@vertekum/ext-export-figma 0.3.15 → 0.5.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/CHANGELOG.md +18 -0
- package/README.md +10 -0
- package/package.json +3 -3
- package/src/model.schema.json +3 -3
- package/src/model.ts +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @vertekum/ext-export-figma
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`739344f`](https://github.com/moros-oxus/vertekum/commit/739344ffe4d80a9af1a6d503f2763714be62e8b8)]:
|
|
8
|
+
- @vertekum/core@0.5.0
|
|
9
|
+
|
|
10
|
+
## 0.4.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`2930833`](https://github.com/moros-oxus/vertekum/commit/29308335dafc9d2951722cba37b2c5bf264168ff) Thanks [@tschemmer](https://github.com/tschemmer)! - `figma.model.json` now carries a string contract version (`"version": "draft.01"`) instead of the integer `1`; readers pinned to `1` must accept `draft.01`.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies []:
|
|
19
|
+
- @vertekum/core@0.4.0
|
|
20
|
+
|
|
3
21
|
## 0.3.15
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -23,6 +23,16 @@ vocabulary:
|
|
|
23
23
|
`source` — a consumer of the model loses nothing to any importer's dialect.
|
|
24
24
|
- `scopes` and `codeSyntax` are reserved fields; nothing populates them yet.
|
|
25
25
|
|
|
26
|
+
### Versioning
|
|
27
|
+
|
|
28
|
+
The model's `version` names its **contract** — the shape `model.schema.json`
|
|
29
|
+
accepts — not a package release and not the tokens it holds. While the shape is
|
|
30
|
+
still settling, the version is a draft (`draft.01`, `draft.02`, …); once the shape
|
|
31
|
+
is declared stable, it takes a calendar version (`YYYY.MM`). The schema is closed,
|
|
32
|
+
so any change to the shape — an added optional field included — takes a new
|
|
33
|
+
version, and many package releases can share one. Readers should refuse a version
|
|
34
|
+
they don't know rather than guess at its shape.
|
|
35
|
+
|
|
26
36
|
## Configuration
|
|
27
37
|
|
|
28
38
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertekum/ext-export-figma",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Vertekum extension: export a resolved, Figma-shaped model (collections, modes, variables, styles) with pluggable dialect writers for Figma importers",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"./api": "./src/api.ts"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@vertekum/core": "0.
|
|
38
|
+
"@vertekum/core": "0.5.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"zod": "^3.25.76"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"ajv": "^8.20.0",
|
|
45
|
-
"@vertekum/core": "0.
|
|
45
|
+
"@vertekum/core": "0.5.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
package/src/model.schema.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "vertekum:figma-model",
|
|
3
|
+
"$id": "vertekum:figma-model/draft.01",
|
|
4
4
|
"title": "Figma-shaped model",
|
|
5
|
-
"description": "A resolved view of one composition in Figma's vocabulary: collections with modes, variables with per-mode values and alias edges, and styles. Version
|
|
5
|
+
"description": "A resolved view of one composition in Figma's vocabulary: collections with modes, variables with per-mode values and alias edges, and styles. Version draft.01 — the version names this contract shape, not the tokens a document holds.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["version", "source", "collections", "styles"],
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
|
-
"version": { "const":
|
|
10
|
+
"version": { "const": "draft.01" },
|
|
11
11
|
"source": {
|
|
12
12
|
"type": "object",
|
|
13
13
|
"required": ["generator", "notices"],
|
package/src/model.ts
CHANGED
|
@@ -13,7 +13,13 @@ import { dtcg, type ExporterInput, type Token } from '@vertekum/core';
|
|
|
13
13
|
* (a Figma plugin, an agent) gets the lossless half.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The contract version: names the model's SHAPE (what `model.schema.json` accepts), not a package
|
|
18
|
+
* release or token content. `draft.NN` while the shape is unstable; `YYYY.MM` once declared stable.
|
|
19
|
+
* The schema is closed, so ANY shape change — an added optional field included — takes a new
|
|
20
|
+
* version, spent when a package releases it.
|
|
21
|
+
*/
|
|
22
|
+
export const MODEL_VERSION = 'draft.01';
|
|
17
23
|
|
|
18
24
|
export type FigmaType = 'COLOR' | 'FLOAT' | 'STRING' | 'BOOLEAN';
|
|
19
25
|
|