Bogdan Chadkin 0f9043fc54 Add style sources schema (#850)
Ref https://github.com/webstudio-is/webstudio-designer/issues/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']
}
```
2023-01-27 12:34:28 +03:00
2022-07-04 19:59:42 +02:00
2022-12-08 12:07:05 +04:00
2023-01-27 12:34:28 +03:00
2022-07-22 19:18:21 +00:00
2022-06-22 15:00:00 +02:00
2022-03-13 04:22:21 +00:00
2022-04-13 12:14:56 +01:00
2022-12-22 17:06:27 +03:00

Webstudio Designer

Webstudio Designer is a NoCode Visual Tool inspired by Webflow. It is the place where you can build your site or app visually.

Contributing

Don't hesitate to reach out of you have questions around contributing to the project.

Contributing guide

Community

Twitter

Discussions

Discord

Languages
TypeScript 98.9%
PLpgSQL 0.5%
CSS 0.3%
Shell 0.2%
JavaScript 0.1%