Files
webstudio/packages/prisma-client
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
..
2023-01-27 12:34:28 +03:00
2022-07-21 18:03:38 +02:00
2022-07-21 18:07:16 +02:00
2022-12-16 13:09:33 +03:00

Webstudio Prisma client

Package conatining our API to interact with prisma