Commit 0f9043f
authored
Add style sources schema (#850)
Ref #807
We are gonna consolidate design token styles and local styles. On build
(project) level there will be list of styles and list of style sources
which are basically a group of styles to be referenced.
These style sources can be local with mandatory tree id or token with
optional tree id to scope a token on specific page instead of whole
project.
Tree will get new list of references to style sources.
Here resulting types
```ts
// Stored as Build.styles
type StylesItem = {
// same as before but instead of instanceId style is referenced through style source
styleSourceId: string,
breakpointId,
property,
value
}
type StyleSourcesToken = {
type: token
id: string
treeId?: string
name: string
}
type StyleSourcesLocal = {
type: local
id: string
treeId: string
name: string
}
// Stored as Build.styleSources
type StyleSourcesItem = StyleSourcesToken | StyleSourcesLocal
// Stored as Tree.styleRefs
type StyleRefsItem = {
instanceId: string,
values: StyleSourcesItem['id']
}
```1 parent a9b2fdb commit 0f9043f
4 files changed
Lines changed: 55 additions & 6 deletions
File tree
- packages
- prisma-client/prisma
- migrations/20230127120101_style_sources
- project-build/src
- schema
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
0 commit comments