Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
refactor: upgrade mdn-data (#3578)
Bogdan Chadkindfc216723a03
diff --git a/apps/builder/app/builder/features/style-panel/sections/transitions/transition-property.tsx b/apps/builder/app/builder/features/style-panel/sections/transitions/transition-property.tsxindex da9e3cab22..1e2ba95ff6 100644--- a/apps/builder/app/builder/features/style-panel/sections/transitions/transition-property.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/transitions/transition-property.tsx@@ -22,15 +22,16 @@ import {} from "@webstudio-is/design-system";import type { KeywordValue } from "@webstudio-is/css-engine";import { matchSorter } from "match-sorter";+import { setUnion } from "~/shared/shim";type AnimatableProperties = (typeof animatableProperties)[number];-type NameAndLabel = { name: AnimatableProperties; label?: string };+type NameAndLabel = { name: string; label?: string };type TransitionPropertyProps = {property: KeywordValue;onPropertySelection: (params: { property: KeywordValue }) => void;};-const commonPropertiesSet = new Set<AnimatableProperties>([+const commonPropertiesSet = new Set<string>(["all","opacity","margin",@@ -42,8 +43,8 @@ const commonPropertiesSet = new Set<AnimatableProperties>(["background-color",]);-const filteredPropertiesSet = new Set<AnimatableProperties>(- animatableProperties.filter((item) => commonPropertiesSet.has(item) === false)+const properties = Array.from(+ setUnion(commonPropertiesSet, new Set(animatableProperties)));export const TransitionProperty = ({@@ -62,10 +63,7 @@ export const TransitionProperty = ({getMenuProps,getItemProps,} = useCombobox<NameAndLabel>({- items: [- ...Array.from(commonPropertiesSet),- ...Array.from(filteredPropertiesSet),- ].map((prop) => ({+ items: properties.map((prop) => ({name: prop,label: prop,})),diff --git a/apps/builder/app/builder/features/style-panel/shared/css-value-input/parse-intermediate-or-invalid-value.ts.test.ts b/apps/builder/app/builder/features/style-panel/shared/css-value-input/parse-intermediate-or-invalid-value.ts.test.tsindex 04fc6a8c12..b17ce7c0ad 100644--- a/apps/builder/app/builder/features/style-panel/shared/css-value-input/parse-intermediate-or-invalid-value.ts.test.ts+++ b/apps/builder/app/builder/features/style-panel/shared/css-value-input/parse-intermediate-or-invalid-value.ts.test.ts@@ -2,12 +2,11 @@ import { describe, test, expect } from "@jest/globals";import { parseIntermediateOrInvalidValue } from "./parse-intermediate-or-invalid-value";import { toKebabCase, toPascalCase } from "../keyword-utils";-const properties = ["width", "lineHeight", "backgroundPositionX"] as const;+const properties = ["width", "lineHeight"] as const;const propertiesAndKeywords = [["width", "auto" as string],["lineHeight", "normal" as string],- ["backgroundPositionX", "center" as string],] as const;describe("Parse intermediate or invalid value without math evaluation", () => {diff --git a/apps/builder/app/shared/shim.test.ts b/apps/builder/app/shared/shim.test.tsindex 793b15d878..3d0e729e1e 100644--- a/apps/builder/app/shared/shim.test.ts+++ b/apps/builder/app/shared/shim.test.ts@@ -1,5 +1,5 @@import { expect, test } from "@jest/globals";-import { mapGroupBy, setDifference } from "./shim";+import { mapGroupBy, setDifference, setUnion } from "./shim";test("Set.prototype.difference", () => {// this set is bigger than other@@ -12,6 +12,12 @@ test("Set.prototype.difference", () => {);});+test("Set.prototype.union", () => {+ expect(setUnion(new Set([2, 4, 6, 8]), new Set([1, 4, 9]))).toEqual(+ new Set([2, 4, 6, 8, 1, 9])+ );+});+test("Map.groupBy", () => {expect(mapGroupBy([1, 2, 3, 4, 5], (item) => item % 2)).toEqual(new Map([diff --git a/apps/builder/app/shared/shim.ts b/apps/builder/app/shared/shim.tsindex ec2165e151..e42fe0f538 100644--- a/apps/builder/app/shared/shim.ts+++ b/apps/builder/app/shared/shim.ts@@ -16,6 +16,14 @@ export const setDifference = <Item>(current: Set<Item>, other: Set<Item>) => {return result;};+export const setUnion = <Item>(current: Set<Item>, other: Set<Item>) => {+ const result = new Set<Item>(current);+ for (const item of other) {+ result.add(item);+ }+ return result;+};+export const mapGroupBy = <Item, Key>(array: Item[] | IterableIterator<Item>,getKey: (item: Item) => Keydiff --git a/packages/css-data/bin/mdn-data.ts b/packages/css-data/bin/mdn-data.tsindex ed7031f811..d77ae6d0ab 100755--- a/packages/css-data/bin/mdn-data.ts+++ b/packages/css-data/bin/mdn-data.ts@@ -224,10 +224,30 @@ const walkSyntax = (type FilteredProperties = { [property in Property]: Value };+const experimentalProperties = [+ "appearance",+ "aspect-ratio",+ // not standard and not implemented without prefix+ // @todo get rid once the issue with types in radix sdk is resolved+ "line-clamp",+ // used in normalize+ "text-size-adjust",+];++const unsupportedProperties = [+ "all",+ "-webkit-line-clamp",+ "--*",+ // @todo for now webstudio supports only white-space+ // need to figure out how to make it future proof+ "white-space-collapse",+ "text-wrap",+ "text-wrap-mode",+ "text-wrap-style",+];+const animatableProperties: string[] = [];const filteredProperties: FilteredProperties = (() => {- // A list of properties we don't want to show- const ignoreProperties = ["all", "-webkit-line-clamp", "--*"];let property: Property;const result = {} as FilteredProperties;@@ -250,35 +270,36 @@ const filteredProperties: FilteredProperties = (() => {*/const supportedComplexProperties: Record<string, string> = {+ // @todo remove support for transition shorthandtransition: "all 0s ease 0s",};for (property in properties) {const config = properties[property];- const isSupportedStatus =- config.status === "standard" || config.status === "experimental";if (property in supportedComplexProperties) {config.initial = supportedComplexProperties[property];}- if (- property.charAt(0) !== "-" &&+ const isSupportedProperty =+ // make sure the property standard and described in mdn+ (config.status === "standard" && "mdn_url" in config) ||+ experimentalProperties.includes(property);+ const isShorthandProperty = Array.isArray(config.initial);+ const isAnimatableProperty =+ property.startsWith("-") === false &&config.animationType !== "discrete" &&- config.animationType !== "notAnimatable"- ) {- animatableProperties.push(property);- }+ config.animationType !== "notAnimatable";- if (- isSupportedStatus === false ||- // Skipping the complex values, since we want to use the expanded once.- Array.isArray(config.initial) ||- ignoreProperties.includes(property) === true- ) {+ if (unsupportedProperties.includes(property) || isShorthandProperty) {continue;}- result[property as Property] = config;+ if (isSupportedProperty) {+ if (isAnimatableProperty) {+ animatableProperties.push(property);+ }+ result[property as Property] = config;+ }}return result;})();diff --git a/packages/css-data/package.json b/packages/css-data/package.jsonindex 32de3e9e55..55263df62d 100644--- a/packages/css-data/package.json+++ b/packages/css-data/package.json@@ -23,7 +23,7 @@"@webstudio-is/react-sdk": "workspace:*","@webstudio-is/tsconfig": "workspace:*","html-tags": "^3.3.1",- "mdn-data": "2.0.32",+ "mdn-data": "2.8.0","type-fest": "^4.3.1","typescript": "5.4.5","zod": "^3.22.4"diff --git a/packages/css-data/src/__generated__/animatable-properties.ts b/packages/css-data/src/__generated__/animatable-properties.tsindex fc6663ec2f..5f1aa82c9a 100644--- a/packages/css-data/src/__generated__/animatable-properties.ts+++ b/packages/css-data/src/__generated__/animatable-properties.ts@@ -1,175 +1,123 @@// This file was generated by pnpm mdn-dataexport const animatableProperties = ["accent-color",- "all","aspect-ratio","backdrop-filter",- "background","background-clip","background-color","background-origin","background-position",- "background-position-x",- "background-position-y","background-size","block-size",- "border",- "border-block","border-block-color","border-block-width",- "border-block-end","border-block-end-color","border-block-end-width",- "border-block-start","border-block-start-color","border-block-start-width",- "border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-width",- "border-color","border-end-end-radius","border-end-start-radius",- "border-image","border-image-outset","border-image-slice","border-image-width",- "border-inline",- "border-inline-end","border-inline-color","border-inline-width","border-inline-end-color","border-inline-end-width",- "border-inline-start","border-inline-start-color","border-inline-start-width",- "border-left","border-left-color","border-left-width",- "border-radius",- "border-right","border-right-color","border-right-width","border-start-end-radius","border-start-start-radius",- "border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-width",- "border-width","bottom","box-shadow",- "caret","caret-color",- "caret-shape","clip","clip-path","color","column-count","column-gap",- "column-rule","column-rule-color","column-rule-width","column-width",- "columns",- "contain-intrinsic-size","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-width",- "container","container-type",+ "content-visibility","counter-increment","counter-reset","counter-set",+ "display","filter",- "flex","flex-basis",- "flex-flow","flex-grow","flex-shrink",- "font","font-variation-settings","font-size","font-size-adjust","font-stretch","font-style","font-weight",- "gap",- "grid","grid-auto-columns","grid-auto-rows",- "grid-column-gap",- "grid-gap",- "grid-row-gap",- "grid-template","grid-template-columns","grid-template-rows","height","hyphenate-limit-chars",- "initial-letter","inline-size",- "input-security",- "inset",- "inset-block","inset-block-end","inset-block-start",- "inset-inline","inset-inline-end","inset-inline-start","left","letter-spacing","line-clamp","line-height",- "line-height-step",- "list-style",- "margin",- "margin-block","margin-block-end","margin-block-start","margin-bottom",- "margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top",- "mask",- "mask-border","mask-position","mask-size","max-block-size","max-height","max-inline-size",- "max-lines","max-width","min-block-size","min-height","min-inline-size","min-width","object-position",- "offset",- "offset-anchor","offset-distance","offset-path",- "offset-position","offset-rotate","opacity","order","orphans",- "outline","outline-color","outline-offset","outline-style","outline-width",- "padding",- "padding-block","padding-block-end","padding-block-start","padding-bottom",- "padding-inline","padding-inline-end","padding-inline-start","padding-left",@@ -180,44 +128,31 @@ export const animatableProperties = ["right","rotate","row-gap",- "ruby-align",- "ruby-merge","scale","scrollbar-color","scrollbar-width",- "scroll-margin",- "scroll-margin-block","scroll-margin-block-start","scroll-margin-block-end","scroll-margin-bottom",- "scroll-margin-inline","scroll-margin-inline-start","scroll-margin-inline-end","scroll-margin-left","scroll-margin-right","scroll-margin-top",- "scroll-padding",- "scroll-padding-block","scroll-padding-block-start","scroll-padding-block-end","scroll-padding-bottom",- "scroll-padding-inline","scroll-padding-inline-start","scroll-padding-inline-end","scroll-padding-left","scroll-padding-right","scroll-padding-top",- "scroll-snap-coordinate",- "scroll-snap-destination",- "scroll-timeline","shape-image-threshold","shape-margin","shape-outside","tab-size",- "text-decoration","text-decoration-color","text-decoration-thickness",- "text-emphasis","text-emphasis-color","text-indent","text-shadow",diff --git a/packages/css-data/src/__generated__/keyword-values.ts b/packages/css-data/src/__generated__/keyword-values.tsindex f763610df4..41a6591519 100644--- a/packages/css-data/src/__generated__/keyword-values.ts+++ b/packages/css-data/src/__generated__/keyword-values.ts@@ -230,27 +230,6 @@ export const keywordValues = {"inherit","unset",],- alignTracks: [- "normal",- "first",- "last",- "baseline",- "space-between",- "space-around",- "space-evenly",- "stretch",- "unsafe",- "safe",- "center",- "start",- "end",- "flex-start",- "flex-end",- "initial",- "inherit",- "unset",- ],- animationComposition: ["initial", "inherit", "unset"],animationDelay: ["initial", "inherit", "unset"],animationDirection: ["normal",@@ -286,7 +265,6 @@ export const keywordValues = {"inherit","unset",],- animationTimeline: ["auto", "none", "initial", "inherit", "unset"],appearance: ["none","auto",@@ -523,26 +501,6 @@ export const keywordValues = {"inherit","unset",],- backgroundPositionX: [- "center",- "left",- "right",- "x-start",- "x-end",- "initial",- "inherit",- "unset",- ],- backgroundPositionY: [- "center",- "top",- "bottom",- "y-start",- "y-end",- "initial",- "inherit",- "unset",- ],backgroundRepeat: ["repeat-x","repeat-y",@@ -555,7 +513,6 @@ export const keywordValues = {"unset",],backgroundSize: ["auto", "cover", "contain", "initial", "inherit", "unset"],- blockOverflow: ["clip", "ellipsis", "initial", "inherit", "unset"],blockSize: ["auto","min-content",@@ -2701,15 +2658,6 @@ export const keywordValues = {"inherit","unset",],- caretShape: [- "auto",- "bar",- "block",- "underscore",- "initial",- "inherit",- "unset",- ],clear: ["none","left",@@ -3088,10 +3036,10 @@ export const keywordValues = {"inherit","unset",],- containIntrinsicBlockSize: ["none", "auto", "initial", "inherit", "unset"],- containIntrinsicHeight: ["none", "auto", "initial", "inherit", "unset"],- containIntrinsicInlineSize: ["none", "auto", "initial", "inherit", "unset"],- containIntrinsicWidth: ["none", "auto", "initial", "inherit", "unset"],+ containIntrinsicBlockSize: ["auto", "none", "initial", "inherit", "unset"],+ containIntrinsicHeight: ["auto", "none", "initial", "inherit", "unset"],+ containIntrinsicInlineSize: ["auto", "none", "initial", "inherit", "unset"],+ containIntrinsicWidth: ["auto", "none", "initial", "inherit", "unset"],containerName: ["none", "initial", "inherit", "unset"],containerType: ["normal",@@ -3201,6 +3149,7 @@ export const keywordValues = {"unset",],emptyCells: ["show", "hide", "initial", "inherit", "unset"],+ fieldSizing: ["content", "fixed", "initial", "inherit", "unset"],filter: ["none", "initial", "inherit", "unset"],flexBasis: ["content",@@ -3248,7 +3197,6 @@ export const keywordValues = {fontKerning: ["auto", "normal", "none", "initial", "inherit", "unset"],fontLanguageOverride: ["normal", "initial", "inherit", "unset"],fontOpticalSizing: ["auto", "none", "initial", "inherit", "unset"],- fontPalette: ["normal", "light", "dark", "initial", "inherit", "unset"],fontVariationSettings: ["normal", "initial", "inherit", "unset"],fontSize: ["xx-small",@@ -3297,10 +3245,14 @@ export const keywordValues = {"weight","style","small-caps",+ "position","initial","inherit","unset",],+ fontSynthesisSmallCaps: ["auto", "none", "initial", "inherit", "unset"],+ fontSynthesisStyle: ["auto", "none", "initial", "inherit", "unset"],+ fontSynthesisWeight: ["auto", "none", "initial", "inherit", "unset"],fontVariant: ["normal","none",@@ -3374,15 +3326,6 @@ export const keywordValues = {"inherit","unset",],- fontVariantEmoji: [- "normal",- "text",- "emoji",- "unicode",- "initial",- "inherit",- "unset",- ],fontVariantLigatures: ["normal","none",@@ -3429,7 +3372,6 @@ export const keywordValues = {"inherit","unset",],- forcedColorAdjust: ["auto", "none", "initial", "inherit", "unset"],gridAutoColumns: ["min-content","max-content",@@ -3503,17 +3445,6 @@ export const keywordValues = {"inherit","unset",],- imageResolution: ["from-image", "snap", "initial", "inherit", "unset"],- initialLetter: ["normal", "initial", "inherit", "unset"],- initialLetterAlign: [- "auto",- "alphabetic",- "hanging",- "ideographic",- "initial",- "inherit",- "unset",- ],inlineSize: ["auto","min-content",@@ -3523,7 +3454,6 @@ export const keywordValues = {"inherit","unset",],- inputSecurity: ["auto", "none", "initial", "inherit", "unset"],insetBlockEnd: ["auto", "initial", "inherit", "unset"],insetBlockStart: ["auto", "initial", "inherit", "unset"],insetInlineEnd: ["auto", "initial", "inherit", "unset"],@@ -3592,25 +3522,6 @@ export const keywordValues = {"inherit","unset",],- justifyTracks: [- "normal",- "space-between",- "space-around",- "space-evenly",- "stretch",- "unsafe",- "safe",- "center",- "start",- "end",- "flex-start",- "flex-end",- "left",- "right",- "initial",- "inherit",- "unset",- ],left: ["auto", "initial", "inherit", "unset"],letterSpacing: ["normal", "initial", "inherit", "unset"],lineBreak: [@@ -3625,7 +3536,6 @@ export const keywordValues = {],lineClamp: ["none", "initial", "inherit", "unset"],lineHeight: ["normal", "initial", "inherit", "unset"],- lineHeightStep: ["initial", "inherit", "unset"],listStyleImage: ["none", "initial", "inherit", "unset"],listStylePosition: ["inside", "outside", "initial", "inherit", "unset"],marginBlockEnd: ["auto", "initial", "inherit", "unset"],@@ -3636,7 +3546,6 @@ export const keywordValues = {marginLeft: ["auto", "initial", "inherit", "unset"],marginRight: ["auto", "initial", "inherit", "unset"],marginTop: ["auto", "initial", "inherit", "unset"],- marginTrim: ["none", "in-flow", "all", "initial", "inherit", "unset"],maskBorderMode: ["luminance", "alpha", "initial", "inherit", "unset"],maskBorderOutset: ["initial", "inherit", "unset"],maskBorderRepeat: [@@ -3717,15 +3626,6 @@ export const keywordValues = {],maskSize: ["auto", "cover", "contain", "initial", "inherit", "unset"],maskType: ["luminance", "alpha", "initial", "inherit", "unset"],- masonryAutoFlow: [- "pack",- "next",- "definite-first",- "ordered",- "initial",- "inherit",- "unset",- ],mathDepth: ["auto-add", "initial", "inherit", "unset"],mathShift: ["normal", "compact", "initial", "inherit", "unset"],mathStyle: ["normal", "compact", "initial", "inherit", "unset"],@@ -3756,7 +3656,6 @@ export const keywordValues = {"inherit","unset",],- maxLines: ["none", "initial", "inherit", "unset"],maxWidth: ["none","min-content",@@ -3844,47 +3743,14 @@ export const keywordValues = {"inherit","unset",],- offsetAnchor: [- "auto",- "left",- "center",- "right",- "top",- "bottom",- "initial",- "inherit",- "unset",- ],offsetDistance: ["initial", "inherit", "unset"],- offsetPath: [- "none",- "border-box",- "padding-box",- "content-box",- "margin-box",- "fill-box",- "stroke-box",- "view-box",- "initial",- "inherit",- "unset",- ],- offsetPosition: [- "auto",- "left",- "center",- "right",- "top",- "bottom",- "initial",- "inherit",- "unset",- ],+ offsetPath: ["none", "initial", "inherit", "unset"],offsetRotate: ["auto", "reverse", "initial", "inherit", "unset"],opacity: ["initial", "inherit", "unset"],order: ["initial", "inherit", "unset"],orphans: ["initial", "inherit", "unset"],outlineColor: [+ "auto","transparent","aliceblue","antiquewhite",@@ -4035,7 +3901,6 @@ export const keywordValues = {"yellow","yellowgreen","currentColor",- "invert","initial","inherit","unset",@@ -4068,35 +3933,6 @@ export const keywordValues = {"inherit","unset",],- overflowAnchor: ["auto", "none", "initial", "inherit", "unset"],- overflowBlock: [- "visible",- "hidden",- "clip",- "scroll",- "auto",- "initial",- "inherit",- "unset",- ],- overflowClipMargin: [- "content-box",- "padding-box",- "border-box",- "initial",- "inherit",- "unset",- ],- overflowInline: [- "visible",- "hidden",- "clip",- "scroll",- "auto",- "initial",- "inherit",- "unset",- ],overflowWrap: ["normal","break-word",@@ -4260,25 +4096,6 @@ export const keywordValues = {right: ["auto", "initial", "inherit", "unset"],rotate: ["none", "x", "y", "z", "initial", "inherit", "unset"],rowGap: ["normal", "initial", "inherit", "unset"],- rubyAlign: [- "start",- "center",- "space-between",- "space-around",- "initial",- "inherit",- "unset",- ],- rubyMerge: ["separate", "collapse", "auto", "initial", "inherit", "unset"],- rubyPosition: [- "alternate",- "over",- "under",- "inter-character",- "initial",- "inherit",- "unset",- ],scale: ["none", "initial", "inherit", "unset"],scrollbarColor: ["auto",@@ -4485,16 +4302,6 @@ export const keywordValues = {"inherit","unset",],- scrollTimelineAxis: [- "block",- "inline",- "vertical",- "horizontal",- "initial",- "inherit",- "unset",- ],- scrollTimelineName: ["none", "initial", "inherit", "unset"],shapeImageThreshold: ["initial", "inherit", "unset"],shapeMargin: ["initial", "inherit", "unset"],shapeOutside: [@@ -4701,18 +4508,6 @@ export const keywordValues = {"inherit","unset",],- textDecorationSkip: [- "none",- "objects",- "spaces",- "leading-spaces",- "trailing-spaces",- "edges",- "box-decoration",- "initial",- "inherit",- "unset",- ],textDecorationSkipInk: ["auto", "all", "none", "initial", "inherit", "unset"],textDecorationStyle: ["solid",@@ -5157,6 +4952,8 @@ export const keywordValues = {"ease-in-out","step-start","step-end",+ "normal",+ "allow-discrete","initial","inherit","unset",@@ -5211,7 +5008,6 @@ export const keywordValues = {"inherit","unset",],- viewTransitionName: ["none", "initial", "inherit", "unset"],visibility: ["visible", "hidden", "collapse", "initial", "inherit", "unset"],whiteSpace: ["normal",@@ -5220,6 +5016,15 @@ export const keywordValues = {"pre-wrap","pre-line","break-spaces",+ "collapse",+ "discard",+ "preserve",+ "preserve-breaks",+ "preserve-spaces",+ "wrap",+ "balance",+ "stable",+ "pretty","initial","inherit","unset",@@ -5264,4 +5069,5 @@ export const keywordValues = {"unset",],zIndex: ["auto", "initial", "inherit", "unset"],+ zoom: ["normal", "reset", "initial", "inherit", "unset"],} as const;diff --git a/packages/css-data/src/__generated__/properties.ts b/packages/css-data/src/__generated__/properties.tsindex c276de881b..8deab9d632 100644--- a/packages/css-data/src/__generated__/properties.ts+++ b/packages/css-data/src/__generated__/properties.ts@@ -54,24 +54,6 @@ export const properties = {},types: [],},- alignTracks: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "normal",- },- types: [],- },- animationComposition: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "replace",- },- types: ["single-animation-composition"],- },animationDelay: {unitGroups: ["time"],inherited: false,@@ -147,15 +129,6 @@ export const properties = {},types: [],},- animationTimeline: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "auto",- },- types: ["custom-ident", "string"],- },appearance: {unitGroups: [],inherited: false,@@ -266,26 +239,6 @@ export const properties = {},types: ["length", "percentage"],},- backgroundPositionX: {- unitGroups: ["length", "percentage"],- inherited: false,- initial: {- type: "unit",- unit: "%",- value: 0,- },- types: ["length", "percentage"],- },- backgroundPositionY: {- unitGroups: ["length", "percentage"],- inherited: false,- initial: {- type: "unit",- unit: "%",- value: 0,- },- types: ["length", "percentage"],- },backgroundRepeat: {unitGroups: [],inherited: false,@@ -304,15 +257,6 @@ export const properties = {},types: ["length", "percentage"],},- blockOverflow: {- unitGroups: [],- inherited: true,- initial: {- type: "keyword",- value: "clip",- },- types: ["string"],- },blockSize: {unitGroups: ["length", "percentage"],inherited: false,@@ -820,15 +764,6 @@ export const properties = {},types: ["hex-color"],},- caretShape: {- unitGroups: [],- inherited: true,- initial: {- type: "keyword",- value: "auto",- },- types: [],- },clear: {unitGroups: [],inherited: false,@@ -1091,6 +1026,15 @@ export const properties = {},types: [],},+ fieldSizing: {+ unitGroups: [],+ inherited: false,+ initial: {+ type: "keyword",+ value: "fixed",+ },+ types: [],+ },filter: {unitGroups: [],inherited: false,@@ -1201,15 +1145,6 @@ export const properties = {},types: [],},- fontPalette: {- unitGroups: [],- inherited: true,- initial: {- type: "keyword",- value: "normal",- },- types: ["palette-identifier"],- },fontVariationSettings: {unitGroups: ["number"],inherited: true,@@ -1269,20 +1204,46 @@ export const properties = {type: "keyword",value: "style",},+ {+ type: "keyword",+ value: "small-caps",+ },+ {+ type: "keyword",+ value: "position",+ },],},types: [],},- fontVariant: {+ fontSynthesisSmallCaps: {unitGroups: [],inherited: true,initial: {type: "keyword",- value: "normal",+ value: "auto",},types: [],},- fontVariantAlternates: {+ fontSynthesisStyle: {+ unitGroups: [],+ inherited: true,+ initial: {+ type: "keyword",+ value: "auto",+ },+ types: [],+ },+ fontSynthesisWeight: {+ unitGroups: [],+ inherited: true,+ initial: {+ type: "keyword",+ value: "auto",+ },+ types: [],+ },+ fontVariant: {unitGroups: [],inherited: true,initial: {@@ -1291,7 +1252,7 @@ export const properties = {},types: [],},- fontVariantCaps: {+ fontVariantAlternates: {unitGroups: [],inherited: true,initial: {@@ -1300,7 +1261,7 @@ export const properties = {},types: [],},- fontVariantEastAsian: {+ fontVariantCaps: {unitGroups: [],inherited: true,initial: {@@ -1309,7 +1270,7 @@ export const properties = {},types: [],},- fontVariantEmoji: {+ fontVariantEastAsian: {unitGroups: [],inherited: true,initial: {@@ -1354,15 +1315,6 @@ export const properties = {},types: ["number"],},- forcedColorAdjust: {- unitGroups: [],- inherited: true,- initial: {- type: "keyword",- value: "auto",- },- types: [],- },gridAutoColumns: {unitGroups: ["length", "percentage", "flex"],inherited: false,@@ -1516,34 +1468,6 @@ export const properties = {},types: [],},- imageResolution: {- unitGroups: ["resolution"],- inherited: true,- initial: {- type: "unit",- unit: "dppx",- value: 1,- },- types: ["resolution"],- },- initialLetter: {- unitGroups: ["number"],- inherited: false,- initial: {- type: "keyword",- value: "normal",- },- types: ["number", "integer"],- },- initialLetterAlign: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "auto",- },- types: [],- },inlineSize: {unitGroups: ["length", "percentage"],inherited: false,@@ -1553,15 +1477,6 @@ export const properties = {},types: ["length", "percentage"],},- inputSecurity: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "auto",- },- types: [],- },insetBlockEnd: {unitGroups: ["length", "percentage"],inherited: false,@@ -1634,15 +1549,6 @@ export const properties = {},types: [],},- justifyTracks: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "normal",- },- types: [],- },left: {unitGroups: ["length", "percentage"],inherited: false,@@ -1688,16 +1594,6 @@ export const properties = {},types: ["number", "length", "percentage"],},- lineHeightStep: {- unitGroups: ["length"],- inherited: true,- initial: {- type: "unit",- unit: "px",- value: 0,- },- types: ["length"],- },listStyleImage: {unitGroups: [],inherited: true,@@ -1805,15 +1701,6 @@ export const properties = {},types: ["length", "percentage"],},- marginTrim: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "none",- },- types: [],- },maskBorderMode: {unitGroups: [],inherited: false,@@ -1919,8 +1806,19 @@ export const properties = {unitGroups: ["length", "percentage"],inherited: false,initial: {- type: "keyword",- value: "center",+ type: "tuple",+ value: [+ {+ type: "unit",+ unit: "%",+ value: 0,+ },+ {+ type: "unit",+ unit: "%",+ value: 0,+ },+ ],},types: ["length", "percentage"],},@@ -1951,15 +1849,6 @@ export const properties = {},types: [],},- masonryAutoFlow: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "pack",- },- types: [],- },mathDepth: {unitGroups: ["number"],inherited: true,@@ -2015,15 +1904,6 @@ export const properties = {},types: ["length", "percentage"],},- maxLines: {- unitGroups: ["number"],- inherited: false,- initial: {- type: "keyword",- value: "none",- },- types: ["integer"],- },maxWidth: {unitGroups: ["length", "percentage"],inherited: false,@@ -2109,15 +1989,6 @@ export const properties = {},types: ["length", "percentage"],},- offsetAnchor: {- unitGroups: ["length", "percentage"],- inherited: false,- initial: {- type: "keyword",- value: "auto",- },- types: ["length", "percentage"],- },offsetDistance: {unitGroups: ["length", "percentage"],inherited: false,@@ -2135,16 +2006,7 @@ export const properties = {type: "keyword",value: "none",},- types: ["url"],- },- offsetPosition: {- unitGroups: ["length", "percentage"],- inherited: false,- initial: {- type: "keyword",- value: "auto",- },- types: ["length", "percentage"],+ types: ["offset-path", "coord-box"],},offsetRotate: {unitGroups: ["angle"],@@ -2190,7 +2052,7 @@ export const properties = {inherited: false,initial: {type: "keyword",- value: "currentColor",+ value: "auto",},types: ["hex-color"],},@@ -2231,43 +2093,6 @@ export const properties = {},types: [],},- overflowAnchor: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "auto",- },- types: [],- },- overflowBlock: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "auto",- },- types: [],- },- overflowClipMargin: {- unitGroups: ["length"],- inherited: false,- initial: {- type: "unit",- unit: "px",- value: 0,- },- types: ["length"],- },- overflowInline: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "auto",- },- types: [],- },overflowWrap: {unitGroups: [],inherited: true,@@ -2567,33 +2392,6 @@ export const properties = {},types: ["length", "percentage"],},- rubyAlign: {- unitGroups: [],- inherited: true,- initial: {- type: "keyword",- value: "space-around",- },- types: [],- },- rubyMerge: {- unitGroups: [],- inherited: true,- initial: {- type: "keyword",- value: "separate",- },- types: [],- },- rubyPosition: {- unitGroups: [],- inherited: true,- initial: {- type: "keyword",- value: "alternate",- },- types: [],- },scale: {unitGroups: ["number"],inherited: false,@@ -2818,24 +2616,6 @@ export const properties = {},types: [],},- scrollTimelineAxis: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "block",- },- types: [],- },- scrollTimelineName: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "none",- },- types: ["custom-ident"],- },shapeImageThreshold: {unitGroups: ["number", "percentage"],inherited: false,@@ -2929,15 +2709,6 @@ export const properties = {},types: [],},- textDecorationSkip: {- unitGroups: [],- inherited: true,- initial: {- type: "keyword",- value: "objects",- },- types: [],- },textDecorationSkipInk: {unitGroups: [],inherited: true,@@ -2967,7 +2738,7 @@ export const properties = {},textEmphasisColor: {unitGroups: [],- inherited: false,+ inherited: true,initial: {type: "keyword",value: "currentColor",@@ -2976,7 +2747,7 @@ export const properties = {},textEmphasisPosition: {unitGroups: [],- inherited: false,+ inherited: true,initial: {type: "tuple",value: [@@ -2994,7 +2765,7 @@ export const properties = {},textEmphasisStyle: {unitGroups: [],- inherited: false,+ inherited: true,initial: {type: "keyword",value: "none",@@ -3264,15 +3035,6 @@ export const properties = {},types: ["percentage", "length"],},- viewTransitionName: {- unitGroups: [],- inherited: false,- initial: {- type: "keyword",- value: "none",- },- types: ["custom-ident"],- },visibility: {unitGroups: [],inherited: true,@@ -3364,4 +3126,13 @@ export const properties = {},types: ["integer"],},+ zoom: {+ unitGroups: ["number", "percentage"],+ inherited: false,+ initial: {+ type: "keyword",+ value: "normal",+ },+ types: ["number", "percentage"],+ },} as const;diff --git a/packages/css-data/src/custom-data.ts b/packages/css-data/src/custom-data.tsindex 1e9bbf851f..8f95a9f128 100644--- a/packages/css-data/src/custom-data.ts+++ b/packages/css-data/src/custom-data.ts@@ -18,9 +18,16 @@ export const valueTypes = ["url","string","custom-ident",+ "dashed-ident","single-animation-composition","palette-identifier","flex",+ "inset-area",+ "offset-path",+ "coord-box",+ "anchor-element",+ "try-tactic",+ "try-size",] as const;export type UnitGroup = (typeof numericTypes)[number];diff --git a/packages/css-engine/src/__generated__/types.ts b/packages/css-engine/src/__generated__/types.tsindex feceaba6b7..f8840e0c73 100644--- a/packages/css-engine/src/__generated__/types.ts+++ b/packages/css-engine/src/__generated__/types.ts@@ -5,8 +5,6 @@ export type Property =| "alignContent"| "alignItems"| "alignSelf"- | "alignTracks"- | "animationComposition"| "animationDelay"| "animationDirection"| "animationDuration"@@ -15,7 +13,6 @@ export type Property =| "animationName"| "animationPlayState"| "animationTimingFunction"- | "animationTimeline"| "appearance"| "aspectRatio"| "backdropFilter"@@ -27,11 +24,8 @@ export type Property =| "backgroundImage"| "backgroundOrigin"| "backgroundPosition"- | "backgroundPositionX"- | "backgroundPositionY"| "backgroundRepeat"| "backgroundSize"- | "blockOverflow"| "blockSize"| "borderBlockColor"| "borderBlockStyle"@@ -87,7 +81,6 @@ export type Property =| "breakInside"| "captionSide"| "caretColor"- | "caretShape"| "clear"| "clip"| "clipPath"@@ -117,6 +110,7 @@ export type Property =| "direction"| "display"| "emptyCells"+ | "fieldSizing"| "filter"| "flexBasis"| "flexDirection"@@ -129,23 +123,23 @@ export type Property =| "fontKerning"| "fontLanguageOverride"| "fontOpticalSizing"- | "fontPalette"| "fontVariationSettings"| "fontSize"| "fontSizeAdjust"| "fontStretch"| "fontStyle"| "fontSynthesis"+ | "fontSynthesisSmallCaps"+ | "fontSynthesisStyle"+ | "fontSynthesisWeight"| "fontVariant"| "fontVariantAlternates"| "fontVariantCaps"| "fontVariantEastAsian"- | "fontVariantEmoji"| "fontVariantLigatures"| "fontVariantNumeric"| "fontVariantPosition"| "fontWeight"- | "forcedColorAdjust"| "gridAutoColumns"| "gridAutoFlow"| "gridAutoRows"@@ -163,11 +157,7 @@ export type Property =| "hyphens"| "imageOrientation"| "imageRendering"- | "imageResolution"- | "initialLetter"- | "initialLetterAlign"| "inlineSize"- | "inputSecurity"| "insetBlockEnd"| "insetBlockStart"| "insetInlineEnd"@@ -176,13 +166,11 @@ export type Property =| "justifyContent"| "justifyItems"| "justifySelf"- | "justifyTracks"| "left"| "letterSpacing"| "lineBreak"| "lineClamp"| "lineHeight"- | "lineHeightStep"| "listStyleImage"| "listStylePosition"| "listStyleType"@@ -194,7 +182,6 @@ export type Property =| "marginLeft"| "marginRight"| "marginTop"- | "marginTrim"| "maskBorderMode"| "maskBorderOutset"| "maskBorderRepeat"@@ -210,14 +197,12 @@ export type Property =| "maskRepeat"| "maskSize"| "maskType"- | "masonryAutoFlow"| "mathDepth"| "mathShift"| "mathStyle"| "maxBlockSize"| "maxHeight"| "maxInlineSize"- | "maxLines"| "maxWidth"| "minBlockSize"| "minHeight"@@ -226,10 +211,8 @@ export type Property =| "mixBlendMode"| "objectFit"| "objectPosition"- | "offsetAnchor"| "offsetDistance"| "offsetPath"- | "offsetPosition"| "offsetRotate"| "opacity"| "order"@@ -239,10 +222,6 @@ export type Property =| "outlineStyle"| "outlineWidth"| "overflow"- | "overflowAnchor"- | "overflowBlock"- | "overflowClipMargin"- | "overflowInline"| "overflowWrap"| "overflowX"| "overflowY"@@ -274,9 +253,6 @@ export type Property =| "right"| "rotate"| "rowGap"- | "rubyAlign"- | "rubyMerge"- | "rubyPosition"| "scale"| "scrollbarColor"| "scrollbarGutter"@@ -301,8 +277,6 @@ export type Property =| "scrollSnapAlign"| "scrollSnapStop"| "scrollSnapType"- | "scrollTimelineAxis"- | "scrollTimelineName"| "shapeImageThreshold"| "shapeMargin"| "shapeOutside"@@ -313,7 +287,6 @@ export type Property =| "textCombineUpright"| "textDecorationColor"| "textDecorationLine"- | "textDecorationSkip"| "textDecorationSkipInk"| "textDecorationStyle"| "textDecorationThickness"@@ -345,7 +318,6 @@ export type Property =| "unicodeBidi"| "userSelect"| "verticalAlign"- | "viewTransitionName"| "visibility"| "whiteSpace"| "widows"@@ -355,7 +327,8 @@ export type Property =| "wordSpacing"| "wordWrap"| "writingMode"- | "zIndex";+ | "zIndex"+ | "zoom";export type Unit =| "%"diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex d240f72e2f..cf8904aa02 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -1111,8 +1111,8 @@ importers:specifier: ^3.3.1version: 3.3.1mdn-data:- specifier: 2.0.32- version: 2.0.32+ specifier: 2.8.0+ version: 2.8.0type-fest:specifier: ^4.3.1version: 4.3.1@@ -7830,8 +7830,8 @@ packages:resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}- resolution: {integrity: sha512-dGzrfhOPm47P8qlChU77TGlCEcFNOCDAhCbHP53LST3FR5jSB5JSHaPjyYW2uFd2CV6D6z4tzCGW09pTxSn0aA==}+ resolution: {integrity: sha512-sez0u7AGXSY0LU2NKoHoMn2F2YAbHgDEXb91Wk2zAfTYsDoOqA4aJS+ZVIlk7ZdODBuOL0vhJ4yF57gMojXVbw==}resolution: {integrity: sha512-1N4qp+jE0pL5Xv4uEcwVUhIkwdUO3S/9gML90nqKA7v7FcOS5vUtatfzok9S9U1EJU8dHWlcv95WLnKmmxZI9w==}@@ -17324,7 +17324,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies: