Files
webstudio/packages/css-data/src/index.ts
T
Bogdan Chadkin c7e88531d7 refactor: optimize html styles access (#3939)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Styles are accessed for specific fields and never iterated. Here output
html styles as single map with composite key tag:property.
2024-08-15 18:26:26 +02:00

28 lines
929 B
TypeScript

import type { WritableDeep } from "type-fest";
export { html } from "./__generated__/html";
export * from "./__generated__/keyword-values";
export * from "./__generated__/units";
export {
properties as propertyDescriptions,
declarations as declarationDescriptions,
} from "./__generated__/property-value-descriptions";
export * from "./__generated__/animatable-properties";
export * from "./__generated__/pseudo-elements";
// longhand property parsers
export * from "./property-parsers/index";
// shorthand property parsers
export * from "./parse-css-value";
export * from "./parse-css";
export * from "./shorthands";
export { parseTailwindToWebstudio } from "./tailwind-parser/parse";
import { properties as generatedProperties } from "./__generated__/properties";
// convert to writable to avoid conflicts with schema type
export const properties = generatedProperties as WritableDeep<
typeof generatedProperties
>;