@vertekum/schema-atlassian 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/LICENSE +21 -0
- package/README.md +91 -0
- package/atlassian.json +5534 -0
- package/border.json +46 -0
- package/color.json +3929 -0
- package/elevation.json +179 -0
- package/font.json +251 -0
- package/motion.json +841 -0
- package/opacity.json +37 -0
- package/package.json +44 -0
- package/radius.json +85 -0
- package/space.json +214 -0
- package/src/vocabulary.json +581 -0
- package/utility.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Thomas Schemmer
|
|
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
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# @vertekum/schema-atlassian
|
|
2
|
+
|
|
3
|
+
The [Atlassian Design System](https://atlassian.design/foundations/tokens/design-tokens) token
|
|
4
|
+
path vocabulary, as JSON Schema files.
|
|
5
|
+
|
|
6
|
+
## What a vocabulary governs
|
|
7
|
+
|
|
8
|
+
**Names and order — nothing else.** These schemas enforce which names may appear, in what order,
|
|
9
|
+
and where the order ends. What a granted name *is* — a group, a `$value` token, a `$ref` token, a
|
|
10
|
+
group carrying a `$root` base value — is the token author's choice, validated by the DTCG format
|
|
11
|
+
schema running in parallel, never by this one. Every position passes `$`-prefixed keys through
|
|
12
|
+
unjudged for exactly that reason.
|
|
13
|
+
|
|
14
|
+
`src/vocabulary.json` records the source's own base-value placements (the `.$root` entries); the
|
|
15
|
+
schemas deliberately do not police them.
|
|
16
|
+
|
|
17
|
+
## What is in the box
|
|
18
|
+
|
|
19
|
+
Ten files, one variant each:
|
|
20
|
+
|
|
21
|
+
| file | names |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `color.json` | 430 |
|
|
24
|
+
| `motion.json` | 62 |
|
|
25
|
+
| `font.json` · `space.json` | 23 each |
|
|
26
|
+
| `elevation.json` | 18 |
|
|
27
|
+
| `radius.json` | 8 |
|
|
28
|
+
| `border.json` | 3 |
|
|
29
|
+
| `opacity.json` | 2 |
|
|
30
|
+
| `utility.json` | 1 |
|
|
31
|
+
| `atlassian.json` | all 570 |
|
|
32
|
+
|
|
33
|
+
**Aspects seal their branch and leave the root open**, so several can validate the same files
|
|
34
|
+
together without refusing each other's branches — the cost is that no aspect refuses an unknown
|
|
35
|
+
*top-level* branch. `atlassian.json` is the wholesale schema that seals the root, for adopting the
|
|
36
|
+
system entire.
|
|
37
|
+
|
|
38
|
+
Every file is self-contained: no `$refs`, nothing to resolve.
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
$ my-validator tokens.json --schema color.json
|
|
42
|
+
/color/text 'bland' is not permitted
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Extending
|
|
46
|
+
|
|
47
|
+
Take a copy and edit it — the files are plain JSON Schema, and a copy is ordinary source:
|
|
48
|
+
|
|
49
|
+
- to **grant a name**, add a position where it belongs:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
"marketing": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {},
|
|
55
|
+
"patternProperties": { "^\\$": true },
|
|
56
|
+
"unevaluatedProperties": false
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
(That is the one position shape used everywhere: granted names in `properties`, `$`-keys passed
|
|
61
|
+
through, everything else refused. Zero granted names means the path ends there.)
|
|
62
|
+
|
|
63
|
+
- to **remove a name**, delete its position.
|
|
64
|
+
|
|
65
|
+
An upstream update no longer flows into an edited copy — that is the trade of owning it: re-copy
|
|
66
|
+
and re-apply the edit.
|
|
67
|
+
|
|
68
|
+
## Derivation
|
|
69
|
+
|
|
70
|
+
The vocabulary is derived, not hand-written. `src/vocabulary.json` holds the sorted name list —
|
|
71
|
+
the reviewed artifact; the ten schemas are mechanical projections of it.
|
|
72
|
+
|
|
73
|
+
570 of Atlassian's 585 names ship. Omitted, with reasons recorded in `scripts/derive.ts`:
|
|
74
|
+
|
|
75
|
+
- `color.rovo.*`, `elevation.rovo.*` — Rovo is Atlassian's AI product surface, not a general vocabulary
|
|
76
|
+
- `utility.UNSAFE.*` — a declared escape hatch, and a vocabulary should not bless one
|
|
77
|
+
|
|
78
|
+
Also deliberately absent: `$type` per branch — a judgement the source artifact does not state.
|
|
79
|
+
|
|
80
|
+
## Upgrading
|
|
81
|
+
|
|
82
|
+
From this package's directory:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm run derive # re-derive from @atlaskit/tokens (a devDependency)
|
|
86
|
+
git diff src/vocabulary.json # the review artifact: added and removed names
|
|
87
|
+
npm test # the schemas must still enforce what they claim
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Read the diff before committing: removing a name starts refusing tokens a consuming project may
|
|
91
|
+
still define.
|