mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 05:26:24 +09:00
Here refactored canvas styles with nesting rules which allow to update each declaration incrementally and closer to our data format. Things to test - initial rendering - updating values - ephemeral values - selecting state, rendered as separate stylesheet Added shim.ts to contain simplified polyfills for future methods like Set.prototype.difference which I use here to find added and deleted styles. Removed warning from parseCssValue which pollutes log with outdated messages. Additionally fixed old bugs - support ephemeral styles with selector state, for example hover was not updated on on canvas while updating ephemeral styles - remove ephemeral custom property from body (bug appeared when added support ephemeral styles in tokens)
8 lines
255 B
TypeScript
8 lines
255 B
TypeScript
import { atom } from "nanostores";
|
|
import type { StyleDecl } from "@webstudio-is/sdk";
|
|
import type { Params } from "@webstudio-is/react-sdk";
|
|
|
|
export const $ephemeralStyles = atom<Array<StyleDecl>>([]);
|
|
|
|
export const $params = atom<undefined | Params>();
|