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
feat: add transform section under style-panel with ui controls (#3718)
Jaya Krishna Namburu5b46f791af9b
diff --git a/apps/builder/app/builder/features/style-panel/sections/sections.ts b/apps/builder/app/builder/features/style-panel/sections/sections.tsindex 04b1dfbc5e..ebfd18480d 100644--- a/apps/builder/app/builder/features/style-panel/sections/sections.ts+++ b/apps/builder/app/builder/features/style-panel/sections/sections.ts@@ -15,6 +15,7 @@ import * as outline from "./outline/outline";import * as advanced from "./advanced/advanced";import * as textShadows from "./text-shadows/text-shadows";import * as backdropFilter from "./backdrop-filter/backdrop-filter";+import * as transforms from "./transforms/transforms";import type { StyleProperty } from "@webstudio-is/css-engine";import type { SectionProps } from "./shared/section";@@ -39,6 +40,7 @@ export const sections = new Map<["filter", filter],["backdropFilters", backdropFilter],["transitions", transitions],+ ["transfrom", transforms],["outline", outline],["advanced", advanced],]);diff --git a/apps/builder/app/builder/features/style-panel/sections/transforms/transform-rotate.tsx b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-rotate.tsxnew file mode 100644index 0000000000..d62d94e016--- /dev/null+++ b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-rotate.tsx@@ -0,0 +1,135 @@+import { Flex, Grid, Label } from "@webstudio-is/design-system";+import {+ updateRotateOrSkewPropertyValue,+ type TransformPanelProps,+} from "./transform-utils";+import {+ XAxisRotateIcon,+ YAxisRotateIcon,+ ZAxisRotateIcon,+} from "@webstudio-is/icons";+import { CssValueInputContainer } from "../../shared/css-value-input";+import {+ toValue,+ UnitValue,+ type FunctionValue,+ type StyleValue,+} from "@webstudio-is/css-engine";+import type { StyleUpdateOptions } from "../../shared/use-style-data";+import { parseCssValue } from "@webstudio-is/css-data";+import { extractRotatePropertiesFromTransform } from "./transform-utils";++export const RotatePanelContent = (props: TransformPanelProps) => {+ const { propertyValue, setProperty, currentStyle } = props;+ const { rotateX, rotateY, rotateZ } =+ extractRotatePropertiesFromTransform(propertyValue);++ const handlePropertyUpdate = (+ index: number,+ prop: string,+ value: StyleValue,+ options?: StyleUpdateOptions+ ) => {+ let newValue: UnitValue = { type: "unit", value: 0, unit: "deg" };++ if (value.type === "unit") {+ newValue = value;+ }++ if (value.type === "tuple" && value.value[0].type === "unit") {+ newValue = value.value[0];+ }++ const newFunctionValue: FunctionValue = {+ type: "function",+ name: prop,+ args: { type: "layers", value: [newValue] },+ };++ const newPropertyValue = updateRotateOrSkewPropertyValue({+ panel: "rotate",+ index,+ currentStyle,+ value: newFunctionValue,+ propertyValue,+ });++ const rotate = parseCssValue("transform", toValue(newPropertyValue));+ if (rotate.type === "invalid") {+ return;+ }++ setProperty("transform")(rotate, options);+ };++ return (+ <Flex direction="column" gap={2}>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 1fr 1fr" }}+ >+ <XAxisRotateIcon />+ <Label> Rotate X</Label>+ <CssValueInputContainer+ key="rotateX"+ styleSource="local"+ property="rotate"+ value={+ rotateX?.type === "function" && rotateX.args.type === "layers"+ ? rotateX.args.value[0]+ : { type: "unit", value: 0, unit: "deg" }+ }+ keywords={[]}+ setValue={(value, options) => {+ handlePropertyUpdate(0, "rotateX", value, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 1fr 1fr" }}+ >+ <YAxisRotateIcon />+ <Label> Rotate Y</Label>+ <CssValueInputContainer+ key="rotateY"+ styleSource="local"+ property="rotate"+ value={+ rotateY?.type === "function" && rotateY.args.type === "layers"+ ? rotateY.args.value[0]+ : { type: "unit", value: 0, unit: "deg" }+ }+ keywords={[]}+ setValue={(value, options) => {+ handlePropertyUpdate(1, "rotateY", value, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 1fr 1fr" }}+ >+ <ZAxisRotateIcon />+ <Label> Rotate Z</Label>+ <CssValueInputContainer+ key="rotateZ"+ styleSource="local"+ property="rotate"+ value={+ rotateZ?.type === "function" && rotateZ.args.type === "layers"+ ? rotateZ.args.value[0]+ : { type: "unit", value: 0, unit: "deg" }+ }+ keywords={[]}+ setValue={(value, options) => {+ handlePropertyUpdate(2, "rotateZ", value, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ </Flex>+ );+};diff --git a/apps/builder/app/builder/features/style-panel/sections/transforms/transform-scale.tsx b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-scale.tsxnew file mode 100644index 0000000000..e85455f16f--- /dev/null+++ b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-scale.tsx@@ -0,0 +1,109 @@+import { Flex, Grid, Label } from "@webstudio-is/design-system";+import {+ StyleValue,+ toValue,+ type StyleProperty,+} from "@webstudio-is/css-engine";+import { CssValueInputContainer } from "../../shared/css-value-input";+import type { StyleUpdateOptions } from "../../shared/use-style-data";+import {+ updateTransformTuplePropertyValue,+ type TransformPanelProps,+} from "./transform-utils";+import { XAxisIcon, YAxisIcon, ZAxisIcon } from "@webstudio-is/icons";+import { parseCssValue } from "@webstudio-is/css-data";++// We use fakeProperty to pass for the CssValueInputContainer.+// As we know during parsing, the syntax for scale is wrong in the css-data package.+// https://github.com/mdn/data/pull/746+// https://developer.mozilla.org/en-US/docs/Web/CSS/opacity#syntax+// number | percentage+const fakeProperty = "opacity";+const property: StyleProperty = "scale";++export const ScalePanelContent = (props: TransformPanelProps) => {+ const { propertyValue, setProperty } = props;+ const [scaleX, scaleY, scaleZ] = propertyValue.value;++ const handlePropertyUpdate = (+ index: number,+ value: StyleValue,+ options?: StyleUpdateOptions+ ) => {+ if (value.type !== "unit") {+ return;+ }++ const newValue = updateTransformTuplePropertyValue(+ index,+ value,+ propertyValue+ );++ const scale = parseCssValue(property, toValue(newValue));+ if (scale.type === "invalid") {+ return;+ }++ setProperty(property)(scale, options);+ };++ return (+ <Flex direction="column" gap={2}>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 1fr 1fr" }}+ >+ <XAxisIcon />+ <Label> Scale X</Label>+ <CssValueInputContainer+ key="scaleX"+ styleSource="local"+ property={fakeProperty}+ value={scaleX}+ keywords={[]}+ setValue={(newValue, options) => {+ handlePropertyUpdate(0, newValue, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 1fr 1fr" }}+ >+ <YAxisIcon />+ <Label> Scale Y</Label>+ <CssValueInputContainer+ key="scaleY"+ styleSource="local"+ property={fakeProperty}+ value={scaleY}+ keywords={[]}+ setValue={(newValue, options) => {+ handlePropertyUpdate(1, newValue, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 1fr 1fr" }}+ >+ <ZAxisIcon />+ <Label> Scale Z</Label>+ <CssValueInputContainer+ key="scaleZ"+ styleSource="local"+ property={fakeProperty}+ value={scaleZ}+ keywords={[]}+ setValue={(newValue, options) => {+ handlePropertyUpdate(2, newValue, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ </Flex>+ );+};diff --git a/apps/builder/app/builder/features/style-panel/sections/transforms/transform-skew.tsx b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-skew.tsxnew file mode 100644index 0000000000..12366ad14c--- /dev/null+++ b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-skew.tsx@@ -0,0 +1,113 @@+import { Flex, Label, Grid } from "@webstudio-is/design-system";+import {+ updateRotateOrSkewPropertyValue,+ extractSkewPropertiesFromTransform,+ type TransformPanelProps,+} from "./transform-utils";+import { XAxisIcon, YAxisIcon } from "@webstudio-is/icons";+import { CssValueInputContainer } from "../../shared/css-value-input";+import type { StyleUpdateOptions } from "../../shared/use-style-data";+import {+ StyleValue,+ toValue,+ UnitValue,+ type FunctionValue,+} from "@webstudio-is/css-engine";+import { parseCssValue } from "@webstudio-is/css-data";++// We use fakeProperty to pass for the CssValueInputContainer.+// https://developer.mozilla.org/en-US/docs/Web/CSS/rotate#formal_syntax+// angle+const fakeProperty = "rotate";++export const SkewPanelContent = (props: TransformPanelProps) => {+ const { propertyValue, setProperty, currentStyle } = props;+ const { skewX, skewY } = extractSkewPropertiesFromTransform(propertyValue);++ const handlePropertyUpdate = (+ index: number,+ prop: string,+ value: StyleValue,+ options?: StyleUpdateOptions+ ) => {+ let newValue: UnitValue = { type: "unit", value: 0, unit: "deg" };++ if (value.type === "unit") {+ newValue = value;+ }++ if (value.type === "tuple" && value.value[0].type === "unit") {+ newValue = value.value[0];+ }++ const newFunctionValue: FunctionValue = {+ type: "function",+ name: prop,+ args: { type: "layers", value: [newValue] },+ };++ const newPropertyValue = updateRotateOrSkewPropertyValue({+ panel: "skew",+ index,+ currentStyle,+ value: newFunctionValue,+ propertyValue,+ });++ const skew = parseCssValue("transform", toValue(newPropertyValue));+ if (skew.type === "invalid") {+ return;+ }++ setProperty("transform")(skew, options);+ };++ return (+ <Flex direction="column" gap={2}>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 1fr 1fr" }}+ >+ <XAxisIcon />+ <Label> Skew X</Label>+ <CssValueInputContainer+ key="skewX"+ styleSource="local"+ property={fakeProperty}+ value={+ skewX?.type === "function" && skewX.args.type === "layers"+ ? skewX.args.value[0]+ : { type: "unit", value: 0, unit: "deg" }+ }+ keywords={[]}+ setValue={(value, options) => {+ handlePropertyUpdate(0, "skewX", value, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 1fr 1fr" }}+ >+ <YAxisIcon />+ <Label> Skew Y</Label>+ <CssValueInputContainer+ key="skewY"+ styleSource="local"+ property={fakeProperty}+ value={+ skewY?.type === "function" && skewY.args.type === "layers"+ ? skewY.args.value[0]+ : { type: "unit", value: 0, unit: "deg" }+ }+ keywords={[]}+ setValue={(value, options) => {+ handlePropertyUpdate(1, "skewY", value, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ </Flex>+ );+};diff --git a/apps/builder/app/builder/features/style-panel/sections/transforms/transform-translate.tsx b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-translate.tsxnew file mode 100644index 0000000000..6e0f9c50b7--- /dev/null+++ b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-translate.tsx@@ -0,0 +1,115 @@+import { Flex, Grid, Label } from "@webstudio-is/design-system";+import {+ StyleValue,+ toValue,+ UnitValue,+ type StyleProperty,+} from "@webstudio-is/css-engine";+import { CssValueInputContainer } from "../../shared/css-value-input";+import {+ updateTransformTuplePropertyValue,+ type TransformPanelProps,+} from "./transform-utils";+import type { StyleUpdateOptions } from "../../shared/use-style-data";+import { XAxisIcon, YAxisIcon, ZAxisIcon } from "@webstudio-is/icons";+import { parseCssValue } from "@webstudio-is/css-data";++const property: StyleProperty = "translate";++export const TranslatePanelContent = (props: TransformPanelProps) => {+ const { propertyValue, setProperty } = props;+ const [translateX, translateY, translateZ] = propertyValue.value;++ const handlePropertyUpdate = (+ index: number,+ newValue: StyleValue,+ options?: StyleUpdateOptions+ ) => {+ if (newValue === undefined) {+ return;+ }++ // For individual translate properties, we are passing the property as translate.+ // This is sending back either tuple or a unit value when manually edited and when scrub is used respectively.+ let value: UnitValue = { type: "unit", value: 0, unit: "px" };+ if (newValue.type === "unit") {+ value = newValue;+ }++ if (newValue.type === "tuple" && newValue.value[0].type === "unit") {+ value = newValue.value[0];+ }++ const translateValue = updateTransformTuplePropertyValue(+ index,+ value,+ propertyValue+ );++ const translate = parseCssValue(property, toValue(translateValue));+ if (translate.type === "invalid") {+ return;+ }++ setProperty(property)(translate, options);+ };++ return (+ <Flex direction="column" gap={2}>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 2fr 2fr" }}+ >+ <XAxisIcon />+ <Label> Translate X</Label>+ <CssValueInputContainer+ key="translateX"+ styleSource="local"+ property={property}+ value={translateX}+ keywords={[]}+ setValue={(newValue, options) => {+ handlePropertyUpdate(0, newValue, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 2fr 2fr" }}+ >+ <YAxisIcon />+ <Label> Translate Y</Label>+ <CssValueInputContainer+ key="translateX"+ styleSource="local"+ property={property}+ value={translateY}+ keywords={[]}+ setValue={(newValue, options) => {+ handlePropertyUpdate(1, newValue, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ <Grid+ gap={1}+ css={{ alignItems: "center", gridTemplateColumns: "auto 1fr 1fr" }}+ >+ <ZAxisIcon />+ <Label> Translate Z</Label>+ <CssValueInputContainer+ key="translateX"+ styleSource="local"+ property={property}+ value={translateZ}+ keywords={[]}+ setValue={(newValue, options) => {+ handlePropertyUpdate(2, newValue, options);+ }}+ deleteProperty={() => {}}+ />+ </Grid>+ </Flex>+ );+};diff --git a/apps/builder/app/builder/features/style-panel/sections/transforms/transform-utils.test.ts b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-utils.test.tsnew file mode 100644index 0000000000..d7dd8ece64--- /dev/null+++ b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-utils.test.ts@@ -0,0 +1,367 @@+import { describe, test, expect } from "@jest/globals";+import {+ addDefaultsForTransormSection,+ handleDeleteTransformProperty,+ handleHideTransformProperty,+ isTransformPanelPropertyUsed,+ updateRotateOrSkewPropertyValue,+ updateTransformTuplePropertyValue,+ extractRotatePropertiesFromTransform,+ extractSkewPropertiesFromTransform,+} from "./transform-utils";+import type { StyleInfo } from "../../shared/style-info";+import {+ FunctionValue,+ toValue,+ TupleValue,+ type StyleProperty,+ type StyleValue,+} from "@webstudio-is/css-engine";+import { parseCssValue } from "@webstudio-is/css-data";++const initializeStyleInfo = () => {+ const currentStyle: StyleInfo = {};+ const setProperty = (property: StyleProperty) => (value: StyleValue) => {+ currentStyle[property] = { value };+ };+ const deleteProperty = (property: StyleProperty) => {+ delete currentStyle[property];+ };++ return { currentStyle, setProperty, deleteProperty };+};++describe("Transform utils CRUD operations", () => {+ test("adds a default translate property", () => {+ const { currentStyle, setProperty } = initializeStyleInfo();++ addDefaultsForTransormSection({+ panel: "translate",+ currentStyle,+ setProperty,+ });+ const translate = currentStyle["translate"]?.value;+ expect(translate).toEqual({+ type: "tuple",+ value: [+ {+ type: "unit",+ unit: "px",+ value: 0,+ },+ {+ type: "unit",+ unit: "px",+ value: 0,+ },+ {+ type: "unit",+ unit: "px",+ value: 0,+ },+ ],+ });+ });++ test("adds a default scale property", () => {+ const { currentStyle, setProperty } = initializeStyleInfo();++ addDefaultsForTransormSection({+ panel: "scale",+ currentStyle,+ setProperty,+ });++ const scale = currentStyle["scale"]?.value;+ expect(scale).toEqual({+ type: "tuple",+ value: [+ {+ type: "unit",+ unit: "number",+ value: 1,+ },+ {+ type: "unit",+ unit: "number",+ value: 1,+ },+ {+ type: "unit",+ unit: "number",+ value: 1,+ },+ ],+ });+ });++ test("adds a default rotate and scale property", () => {+ const { currentStyle, setProperty } = initializeStyleInfo();++ addDefaultsForTransormSection({+ panel: "rotate",+ currentStyle,+ setProperty,+ });++ expect(toValue(currentStyle["transform"]?.value)).toBe(+ "rotateX(0deg) rotateY(0deg) rotateZ(0deg)"+ );++ addDefaultsForTransormSection({+ panel: "skew",+ currentStyle,+ setProperty,+ });+ expect(toValue(currentStyle["transform"]?.value)).toBe(+ "skewX(0deg) skewY(0deg) rotateX(0deg) rotateY(0deg) rotateZ(0deg)"+ );+ });++ test("checks if any of the transform property exist", () => {+ const { currentStyle, setProperty } = initializeStyleInfo();++ expect(+ isTransformPanelPropertyUsed({+ currentStyle,+ panel: "translate",+ })+ ).toBe(false);++ addDefaultsForTransormSection({+ panel: "rotate",+ currentStyle,+ setProperty,+ });++ expect(+ isTransformPanelPropertyUsed({ currentStyle, panel: "rotate" })+ ).toBe(true);+ });++ test("deletes rotate property values from the transform", () => {+ const { currentStyle, setProperty, deleteProperty } = initializeStyleInfo();+ setProperty("transform")(+ parseCssValue(+ "transform",+ "rotateX(50deg) rotateY(50deg) rotateZ(50deg) scale(1, 1) translate(10px, 10px)"+ )+ );++ handleDeleteTransformProperty({+ panel: "rotate",+ currentStyle,+ setProperty,+ deleteProperty,+ });++ expect(toValue(currentStyle["transform"]?.value)).toBe(+ "scale(1, 1) translate(10px, 10px)"+ );+ });++ test("delete skew property values from the transform", () => {+ const { currentStyle, setProperty, deleteProperty } = initializeStyleInfo();+ setProperty("transform")(+ parseCssValue(+ "transform",+ "rotateX(50deg) rotateY(50deg) rotateZ(50deg) skew(10deg) skewX(10deg) skewY(10deg)"+ )+ );+ handleDeleteTransformProperty({+ panel: "skew",+ currentStyle,+ setProperty,+ deleteProperty,+ });+ expect(toValue(currentStyle["transform"]?.value)).toBe(+ "rotateX(50deg) rotateY(50deg) rotateZ(50deg) skew(10deg)"+ );+ });++ test("hide translate and rotate properties", () => {+ const { currentStyle, setProperty } = initializeStyleInfo();+ addDefaultsForTransormSection({+ panel: "translate",+ currentStyle,+ setProperty,+ });+ addDefaultsForTransormSection({+ panel: "rotate",+ currentStyle,+ setProperty,+ });++ handleHideTransformProperty({+ panel: "translate",+ currentStyle,+ setProperty,+ });+ expect(currentStyle["translate"]?.value?.hidden).toBe(true);++ handleHideTransformProperty({+ panel: "rotate",+ currentStyle,+ setProperty,+ });+ const rotate = extractRotatePropertiesFromTransform(+ currentStyle["transform"]?.value as TupleValue+ );++ expect(rotate.rotateX?.hidden).toBe(true);+ expect(rotate.rotateY?.hidden).toBe(true);+ expect(rotate.rotateZ?.hidden).toBe(true);+ });++ test("update translate property value", () => {+ const translate = parseCssValue("translate", "0px 0px 0px");+ const newValue = updateTransformTuplePropertyValue(+ 1,+ { type: "unit", value: 50, unit: "px" },+ translate as TupleValue+ );++ expect(toValue(newValue)).toBe("0px 50px 0px");+ });++ test("update rotate values in transform property", () => {+ const { currentStyle, setProperty } = initializeStyleInfo();+ const transform = parseCssValue(+ "transform",+ "rotateX(10deg) rotateY(10deg) rotateZ(10deg) skewX(10deg) skewY(10deg)"+ );+ setProperty("transform")(transform);++ const updatedRotateYValue: FunctionValue = {+ type: "function",+ name: "rotateY",+ args: {+ type: "layers",+ value: [{ type: "unit", value: 50, unit: "deg" }],+ },+ };+ const { rotateX, rotateY, rotateZ } =+ extractRotatePropertiesFromTransform(transform);+ const newValue = updateRotateOrSkewPropertyValue({+ index: 1,+ panel: "rotate",+ currentStyle,+ value: updatedRotateYValue,+ propertyValue: {+ type: "tuple",+ value: [+ rotateX as FunctionValue,+ rotateY as FunctionValue,+ rotateZ as FunctionValue,+ ],+ },+ });++ const result = extractRotatePropertiesFromTransform(newValue);+ expect(result.rotateY).toEqual(updatedRotateYValue);+ expect(toValue(newValue)).toBe(+ "rotateX(10deg) rotateY(50deg) rotateZ(10deg) skewX(10deg) skewY(10deg)"+ );+ });+});++describe("extractRotatePropertiesFromTransform", () => {+ test("parses transform and returns undefined if no rotate values exists", () => {+ expect(+ extractRotatePropertiesFromTransform(+ parseCssValue("transform", "scale(1.5)")+ )+ ).toEqual({+ rotateX: undefined,+ rotateY: undefined,+ rotateZ: undefined,+ });+ });++ test("parses transform and returns rotate values", () => {+ expect(+ extractRotatePropertiesFromTransform(+ parseCssValue("transform", "rotateX(0deg) rotateY(10deg) scale(1.5)")+ )+ ).toEqual({+ rotateX: {+ type: "function",+ args: {+ type: "layers",+ value: [+ {+ type: "unit",+ unit: "deg",+ value: 0,+ },+ ],+ },+ name: "rotateX",+ },+ rotateY: {+ type: "function",+ args: {+ type: "layers",+ value: [+ {+ type: "unit",+ unit: "deg",+ value: 10,+ },+ ],+ },+ name: "rotateY",+ },+ });+ });+});++describe("extractSkewPropertiesFromTransform", () => {+ test("parses transform and returns undefined if no skew properties exists", () => {+ expect(+ extractSkewPropertiesFromTransform(+ parseCssValue("transform", "rotateX(0deg) rotateY(0deg) scale(1.5)")+ )+ ).toEqual({ skewX: undefined, skewY: undefined });+ });++ test("parses transform and extracts valid skew properties", () => {+ expect(+ extractSkewPropertiesFromTransform(+ parseCssValue(+ "transform",+ "skewX(10deg) skewY(20deg) rotate(30deg) scale(1.5)"+ )+ )+ ).toEqual({+ skewX: {+ type: "function",+ args: {+ type: "layers",+ value: [+ {+ type: "unit",+ unit: "deg",+ value: 10,+ },+ ],+ },+ name: "skewX",+ },+ skewY: {+ type: "function",+ args: {+ type: "layers",+ value: [+ {+ type: "unit",+ unit: "deg",+ value: 20,+ },+ ],+ },+ name: "skewY",+ },+ });+ });+});diff --git a/apps/builder/app/builder/features/style-panel/sections/transforms/transform-utils.ts b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-utils.tsnew file mode 100644index 0000000000..77475d267b--- /dev/null+++ b/apps/builder/app/builder/features/style-panel/sections/transforms/transform-utils.ts@@ -0,0 +1,390 @@+import { parseCssValue } from "@webstudio-is/css-data";+import {+ FunctionValue,+ StyleValue,+ toValue,+ type TupleValue,+ type TupleValueItem,+} from "@webstudio-is/css-engine";+import type { DeleteProperty, SetProperty } from "../../shared/use-style-data";+import type { StyleInfo } from "../../shared/style-info";+import type { TransformPanel } from "./transforms";++export type TransformPanelProps = {+ currentStyle: StyleInfo;+ propertyValue: TupleValue;+ setProperty: SetProperty;+};++const defaultTranslate = "0px 0px 0px";+const defaultScale = "1 1 1";+const defaultRotate = "rotateX(0deg) rotateY(0deg) rotateZ(0deg)";+const defaultSkew = "skewX(0deg) skewY(0deg)";++export const getHumanizedTextFromTransformLayer = (+ panel: TransformPanel,+ value: TupleValue+): { label: string; value: TupleValue } | undefined => {+ switch (panel) {+ case "translate":+ return {+ label: `Translate: ${toValue({ ...value, hidden: false })}`,+ value,+ };++ case "scale":+ return {+ label: `Scale: ${toValue({ ...value, hidden: false })}`,+ value,+ };++ case "rotate": {+ const rotate = extractRotatePropertiesFromTransform(value);+ const { rotateX, rotateY, rotateZ } = rotate;+ if (+ rotateX === undefined ||+ rotateY === undefined ||+ rotateZ === undefined+ ) {+ return;+ }++ return {+ label: `Rotate: ${toValue(rotateX.args)} ${toValue(rotateY.args)} ${toValue(rotateZ.args)}`,+ value: {+ type: "tuple",+ value: [rotateX, rotateY, rotateZ],+ hidden: rotateX.hidden || rotateY.hidden || rotateZ.hidden,+ },+ };+ }++ case "skew": {+ const skew = extractSkewPropertiesFromTransform(value);+ const { skewX, skewY } = skew;++ if (skewX === undefined || skewY === undefined) {+ return;+ }++ return {+ label: `Skew: ${toValue(skewX.args)} ${toValue(skewY.args)}`,+ value: {+ type: "tuple",+ value: [skewX, skewY],+ hidden: skewX.hidden || skewY.hidden,+ },+ };+ }+ }+};++export const addDefaultsForTransormSection = (props: {+ panel: TransformPanel;+ currentStyle: StyleInfo;+ setProperty: SetProperty;+}) => {+ const { setProperty, panel, currentStyle } = props;++ switch (panel) {+ case "translate": {+ const translate = parseCssValue("translate", defaultTranslate);+ return setProperty("translate")(translate);+ }++ case "scale": {+ const scale = parseCssValue("scale", defaultScale);+ return setProperty("scale")(scale);+ }++ case "skew":+ case "rotate": {+ const value = currentStyle["transform"]?.value;+ const parsedValue = parseCssValue(+ "transform",+ panel === "rotate" ? defaultRotate : defaultSkew+ );++ // rotate and skew are maintained using tuple+ // If the existing value is anything other than tuple.+ // We need to update the property to use tuples+ if (value?.type !== "tuple") {+ return setProperty("transform")(parsedValue);+ }++ if (parsedValue.type === "tuple" && value.type === "tuple") {+ const filteredValues = removeRotateOrSkewValues(panel, value);++ return setProperty("transform")({+ ...value,+ value: [...parsedValue.value, ...filteredValues],+ });+ }+ }+ }+};++export const isTransformPanelPropertyUsed = (params: {+ currentStyle: StyleInfo;+ panel: TransformPanel;+}): boolean => {+ const { currentStyle, panel } = params;+ switch (panel) {+ case "scale":+ case "translate":+ return currentStyle[panel]?.value.type === "tuple";++ case "rotate": {+ const rotate = currentStyle["transform"]?.value;+ return (+ rotate?.type === "tuple" &&+ extractRotatePropertiesFromTransform(rotate).rotateX !== undefined+ );+ }++ case "skew": {+ const skew = currentStyle["transform"]?.value;+ return (+ skew?.type === "tuple" &&+ extractSkewPropertiesFromTransform(skew).skewX !== undefined+ );+ }++ default:+ return false;+ }+};++export const removeRotateOrSkewValues = (+ panel: TransformPanel,+ value: TupleValue+) => {+ const propKeys =+ panel === "rotate" ? ["rotateX", "rotateY", "rotateZ"] : ["skewX", "skewY"];+ return value.value.filter(+ (item) => item.type === "function" && propKeys.includes(item.name) === false+ );+};++export const handleDeleteTransformProperty = (params: {+ currentStyle: StyleInfo;+ setProperty: SetProperty;+ deleteProperty: DeleteProperty;+ panel: TransformPanel;+}) => {+ const { deleteProperty, panel, currentStyle, setProperty } = params;+ switch (panel) {+ case "scale":+ case "translate":+ deleteProperty(panel);+ break;++ case "rotate": {+ const value = currentStyle["transform"]?.value;+ if (value?.type !== "tuple") {+ return;+ }+ const filteredValues = removeRotateOrSkewValues("rotate", value);+ if (filteredValues.length === 0) {+ deleteProperty("transform");+ return;+ }+ setProperty("transform")({+ ...value,+ value: filteredValues,+ });+ break;+ }++ case "skew": {+ const value = currentStyle["transform"]?.value;+ if (value?.type !== "tuple") {+ return;+ }+ const filteredValues = removeRotateOrSkewValues("skew", value);+ if (filteredValues.length === 0) {+ deleteProperty("transform");+ return;+ }+ setProperty("transform")({+ ...value,+ value: filteredValues,+ });+ }+ }+};++export const handleHideTransformProperty = (params: {+ setProperty: SetProperty;+ currentStyle: StyleInfo;+ panel: TransformPanel;+}) => {+ const { panel, setProperty, currentStyle } = params;+ switch (panel) {+ case "scale":+ case "translate": {+ const value = currentStyle[panel]?.value;+ if (value?.type !== "tuple") {+ return;+ }+ setProperty(panel)({+ ...value,+ hidden: value.hidden ? false : true,+ });+ break;+ }++ case "rotate": {+ const value = currentStyle["transform"]?.value;+ if (value?.type !== "tuple") {+ return;+ }+ const newValue: TupleValue = {+ ...value,+ value: [...removeRotateOrSkewValues("rotate", value)],+ };+ const rotate = extractRotatePropertiesFromTransform(value);+ const { rotateX, rotateY, rotateZ } = rotate;++ if (rotateX) {+ newValue.value.unshift({+ ...rotateX,+ hidden: rotateX.hidden ? false : true,+ });+ }++ if (rotateY) {+ newValue.value.unshift({+ ...rotateY,+ hidden: rotateY.hidden ? false : true,+ });+ }++ if (rotateZ) {+ newValue.value.unshift({+ ...rotateZ,+ hidden: rotateZ.hidden ? false : true,+ });+ }++ setProperty("transform")(newValue);+ break;+ }++ case "skew": {+ const value = currentStyle["transform"]?.value;+ if (value?.type !== "tuple") {+ return;+ }+ const newValue: TupleValue = {+ ...value,+ value: [...removeRotateOrSkewValues("skew", value)],+ };+ const skew = extractSkewPropertiesFromTransform(value);+ const { skewX, skewY } = skew;++ if (skewX) {+ newValue.value.push({+ ...skewX,+ hidden: skewX.hidden ? false : true,+ });+ }++ if (skewY) {+ newValue.value.push({+ ...skewY,+ hidden: skewY.hidden ? false : true,+ });+ }++ setProperty("transform")(newValue);+ break;+ }+ }+};++export const updateTransformTuplePropertyValue = (+ index: number,+ newValue: TupleValueItem,+ value: TupleValue+): TupleValue => {+ const newArray: TupleValueItem[] = [...value.value];+ newArray.splice(index, 1, newValue);+ return {+ ...value,+ value: newArray,+ };+};++export const updateRotateOrSkewPropertyValue = (props: {+ index: number;+ panel: "rotate" | "skew";+ currentStyle: StyleInfo;+ value: FunctionValue;+ propertyValue: TupleValue;+}): TupleValue => {+ const { index, value, propertyValue, panel } = props;+ const newPropertyValue = updateTransformTuplePropertyValue(+ index,+ value,+ propertyValue+ );++ const existingTransforms = props.currentStyle["transform"]?.value;+ if (existingTransforms?.type === "tuple") {+ const filteredValues = removeRotateOrSkewValues(panel, existingTransforms);+ return {+ ...existingTransforms,+ value: [...newPropertyValue.value, ...filteredValues],+ };+ }++ return newPropertyValue;+};++export const extractRotatePropertiesFromTransform = (transform: StyleValue) => {+ let rotateX: FunctionValue | undefined;+ let rotateY: FunctionValue | undefined;+ let rotateZ: FunctionValue | undefined;++ if (transform.type !== "tuple") {+ return { rotateX, rotateY, rotateZ };+ }++ for (const item of transform.value) {+ if (item.type === "function" && item.name === "rotateX") {+ rotateX = item;+ }++ if (item.type === "function" && item.name === "rotateY") {+ rotateY = item;+ }++ if (item.type === "function" && item.name === "rotateZ") {+ rotateZ = item;+ }+ }++ return { rotateX, rotateY, rotateZ };+};++export const extractSkewPropertiesFromTransform = (skew: StyleValue) => {+ let skewX: FunctionValue | undefined = undefined;+ let skewY: FunctionValue | undefined = undefined;++ if (skew.type !== "tuple") {+ return { skewX, skewY };+ }++ for (const item of skew.value) {+ if (item.type === "function" && item.name === "skewX") {+ skewX = item;+ }++ if (item.type === "function" && item.name === "skewY") {+ skewY = item;+ }+ }++ return { skewX, skewY };+};diff --git a/apps/builder/app/builder/features/style-panel/sections/transforms/transforms.tsx b/apps/builder/app/builder/features/style-panel/sections/transforms/transforms.tsxnew file mode 100644index 0000000000..8aaec74838--- /dev/null+++ b/apps/builder/app/builder/features/style-panel/sections/transforms/transforms.tsx@@ -0,0 +1,251 @@+import { CollapsibleSectionRoot } from "~/builder/shared/collapsible-section";+import type { SectionProps } from "../shared/section";+import type { StyleProperty } from "@webstudio-is/css-engine";+import { useMemo, useState } from "react";+import {+ CssValueListArrowFocus,+ CssValueListItem,+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuPortal,+ DropdownMenuTrigger,+ Flex,+ Label,+ SectionTitle,+ SectionTitleButton,+ SectionTitleLabel,+ SmallIconButton,+ SmallToggleButton,+ theme,+} from "@webstudio-is/design-system";+import {+ EyeconClosedIcon,+ PlusIcon,+ SubtractIcon,+ EyeconOpenIcon,+} from "@webstudio-is/icons";+import {+ addDefaultsForTransormSection,+ isTransformPanelPropertyUsed,+ handleDeleteTransformProperty,+ handleHideTransformProperty,+ getHumanizedTextFromTransformLayer,+ type TransformPanelProps,+} from "./transform-utils";+import { FloatingPanel } from "~/builder/shared/floating-panel";+import { TranslatePanelContent } from "./transform-translate";+import { ScalePanelContent } from "./transform-scale";+import { RotatePanelContent } from "./transform-rotate";+import { SkewPanelContent } from "./transform-skew";+import { humanizeString } from "~/shared/string-utils";+import { getStyleSource } from "../../shared/style-info";+import { PropertyName } from "../../shared/property-name";+import { getDots } from "../../shared/collapsible-section";++export const transformPanels = [+ "translate",+ "scale",+ "rotate",+ "skew",+] as const;++export type TransformPanel = (typeof transformPanels)[number];++const label = "Transforms";+export const properties = [+ "translate",+ "scale",+ "transform",+] satisfies Array<StyleProperty>;++export const Section = (props: SectionProps) => {+ const { currentStyle, createBatchUpdate } = props;+ const [isOpen, setIsOpen] = useState(true);+ const translateStyleSource = getStyleSource(currentStyle["translate"]);+ const scaleStyleSource = getStyleSource(currentStyle["scale"]);+ const rotateAndSkewStyleSrouce = getStyleSource(currentStyle["transform"]);++ const isAnyTransformPropertyAdded = transformPanels.some((panel) =>+ isTransformPanelPropertyUsed({+ currentStyle: props.currentStyle,+ panel,+ })+ );++ const handleResetForAllTransformProperties = () => {+ const batch = createBatchUpdate();+ batch.deleteProperty("translate");+ batch.deleteProperty("scale");+ batch.deleteProperty("transform");+ batch.publish();+ };++ return (+ <CollapsibleSectionRoot+ fullWidth+ label={label}+ isOpen={isOpen}+ onOpenChange={setIsOpen}+ trigger={+ <SectionTitle+ dots={getDots(currentStyle, properties)}+ suffix={+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <SectionTitleButton prefix={<PlusIcon />}></SectionTitleButton>+ </DropdownMenuTrigger>+ <DropdownMenuPortal>+ <DropdownMenuContent+ collisionPadding={16}+ css={{ width: theme.spacing[20] }}+ >+ {transformPanels.map((panel) => {+ return (+ <DropdownMenuItem+ disabled={+ isTransformPanelPropertyUsed({+ currentStyle: props.currentStyle,+ panel,+ }) === true+ }+ key={panel}+ onSelect={() => {+ addDefaultsForTransormSection({+ currentStyle: props.currentStyle,+ setProperty: props.setProperty,+ panel,+ });+ setIsOpen(true);+ }}+ >+ {humanizeString(panel)}+ </DropdownMenuItem>+ );+ })}+ </DropdownMenuContent>+ </DropdownMenuPortal>+ </DropdownMenu>+ }+ >+ <PropertyName+ title={label}+ style={currentStyle}+ properties={properties}+ label={+ <SectionTitleLabel+ color={+ translateStyleSource ||+ scaleStyleSource ||+ rotateAndSkewStyleSrouce+ }+ >+ {label}+ </SectionTitleLabel>+ }+ onReset={handleResetForAllTransformProperties}+ />+ </SectionTitle>+ }+ >+ {isAnyTransformPropertyAdded === true ? (+ <CssValueListArrowFocus>+ {transformPanels.map((panel, index) => (+ <TransformSection+ {...props}+ key={panel}+ index={index}+ panel={panel}+ />+ ))}+ </CssValueListArrowFocus>+ ) : undefined}+ </CollapsibleSectionRoot>+ );+};++const TransformSection = (+ props: SectionProps & { index: number; panel: TransformPanel }+) => {+ const { currentStyle, setProperty, deleteProperty, panel, index } = props;+ const properties = useMemo(() => {+ const property =+ panel === "rotate" || panel === "skew" ? "transform" : panel;+ const value = currentStyle[property]?.value;+ if (value === undefined || value.type !== "tuple") {+ return;+ }++ return getHumanizedTextFromTransformLayer(panel, value);+ }, [currentStyle, panel]);++ if (properties === undefined) {+ return;+ }++ const contentPanelProps: TransformPanelProps = {+ currentStyle,+ setProperty,+ propertyValue: properties.value,+ };++ return (+ <FloatingPanel+ title={humanizeString(panel)}+ content={+ <Flex direction="column" css={{ p: theme.spacing[9] }}>+ {panel === "translate" && (+ <TranslatePanelContent {...contentPanelProps} />+ )}+ {panel === "scale" && <ScalePanelContent {...contentPanelProps} />}+ {panel === "rotate" && <RotatePanelContent {...contentPanelProps} />}+ {panel === "skew" && <SkewPanelContent {...contentPanelProps} />}+ </Flex>+ }+ >+ <CssValueListItem+ id={panel}+ index={index}+ hidden={properties.value.hidden}+ label={<Label truncate>{properties.label}</Label>}+ buttons={+ <>+ <SmallToggleButton+ variant="normal"+ pressed={properties.value.hidden}+ tabIndex={-1}+ onPressedChange={() =>+ handleHideTransformProperty({+ currentStyle,+ setProperty,+ panel,+ })+ }+ icon={+ properties.value.hidden ? (+ <EyeconClosedIcon />+ ) : (+ <EyeconOpenIcon />+ )+ }+ />+ <SmallIconButton+ variant="destructive"+ tabIndex={-1}+ disabled={properties.value.hidden}+ icon={<SubtractIcon />}+ onClick={() =>+ handleDeleteTransformProperty({+ currentStyle,+ setProperty,+ deleteProperty,+ panel,+ })+ }+ />+ </>+ }+ ></CssValueListItem>+ </FloatingPanel>+ );+};diff --git a/packages/css-engine/src/core/to-value.ts b/packages/css-engine/src/core/to-value.tsindex fdb66bde30..684f581573 100644--- a/packages/css-engine/src/core/to-value.ts+++ b/packages/css-engine/src/core/to-value.ts@@ -103,6 +103,12 @@ export const toValue = (}if (value.type === "tuple") {+ // Properties ike translate and scale are handled as tuples directly.+ // When the layer is hidden, the value goes as none.+ if (value.hidden === true) {+ return "none";+ }+return value.value.filter((value) => value.hidden !== true).map((value) => toValue(value, transformValue))diff --git a/packages/icons/icons/x-axis-rotate.svg b/packages/icons/icons/x-axis-rotate.svgnew file mode 100644index 0000000000..6c29a8a09d--- /dev/null+++ b/packages/icons/icons/x-axis-rotate.svg@@ -0,0 +1,3 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M6.54973 5.51226C6.61194 5.24322 6.44427 4.97468 6.17523 4.91247C5.90619 4.85025 5.63765 5.01792 5.57544 5.28696L6.54973 5.51226ZM7.43517 1.60361C7.2352 1.79405 7.22749 2.11054 7.41793 2.31051C7.60838 2.51047 7.92487 2.51818 8.12483 2.32774L7.43517 1.60361ZM2.15819 7.51397C1.95665 7.70274 1.9463 8.01916 2.13508 8.2207C2.32386 8.42224 2.64027 8.43258 2.84181 8.2438L2.15819 7.51397ZM5.89226 4.70142L6.2592 4.36179C6.16878 4.26409 6.04312 4.20649 5.91008 4.20174C5.77704 4.197 5.64761 4.2455 5.55045 4.33651L5.89226 4.70142ZM8.69047 8.46075C8.87805 8.66341 9.19439 8.67563 9.39705 8.48806C9.59971 8.30048 9.61194 7.98414 9.42436 7.78148L8.69047 8.46075ZM5.57544 5.28696C5.38181 6.1243 5.27871 7.04566 5.27871 7.99288H6.27871C6.27871 7.11625 6.37432 6.27078 6.54973 5.51226L5.57544 5.28696ZM5.27871 7.99288C5.27871 9.96456 5.72636 11.7726 6.47467 13.1054C7.21398 14.4221 8.31338 15.375 9.63935 15.375V14.375C8.8363 14.375 8.00537 13.789 7.34662 12.6158C6.69686 11.4586 6.27871 9.82559 6.27871 7.99288H5.27871ZM9.63935 15.375C10.9653 15.375 12.0647 14.4221 12.804 13.1054C13.5523 11.7726 14 9.96456 14 7.99288H13C13 9.82559 12.5818 11.4586 11.9321 12.6158C11.2733 13.789 10.4424 14.375 9.63935 14.375V15.375ZM14 7.99288C14 6.02117 13.5523 4.21639 12.8037 2.88696C12.0639 1.57302 10.9643 0.625 9.63935 0.625V1.625C10.4434 1.625 11.2742 2.20871 11.9324 3.37761C12.5819 4.53102 13 6.16018 13 7.99288H14ZM9.63935 0.625C8.80879 0.625 8.05274 1.01543 7.43517 1.60361L8.12483 2.32774C8.61436 1.86151 9.13572 1.625 9.63935 1.625V0.625ZM2.84181 8.2438L6.23407 5.06634L5.55045 4.33651L2.15819 7.51397L2.84181 8.2438ZM5.52531 5.04106L8.69047 8.46075L9.42436 7.78148L6.2592 4.36179L5.52531 5.04106Z" fill="#231F20"/>+</svg>diff --git a/packages/icons/icons/x-axis.svg b/packages/icons/icons/x-axis.svgnew file mode 100644index 0000000000..43a4b65af1--- /dev/null+++ b/packages/icons/icons/x-axis.svg@@ -0,0 +1,3 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M15.3569 9.2956L12.4541 6.34308C12.2599 6.13661 11.9328 6.13661 11.7284 6.34308C11.5239 6.53923 11.5239 6.86958 11.7284 7.07605L13.7828 9.17171H5.57516V1.01617C5.57516 0.727116 5.35029 0.5 5.06409 0.5C4.7779 0.5 4.55303 0.727116 4.55303 1.01617V9.53304L0.607625 14.6741C0.433864 14.9012 0.474749 15.2213 0.699616 15.3968C0.791608 15.469 0.904042 15.5 1.01648 15.5C1.16979 15.5 1.32311 15.4277 1.42533 15.3039L5.35029 10.1937H13.7419L11.6875 12.2584C11.483 12.4649 11.483 12.7849 11.6875 12.9914C11.7897 13.0946 11.9226 13.1462 12.0452 13.1462C12.1679 13.1462 12.311 13.0946 12.403 12.9914L15.3467 10.0182C15.5511 9.82209 15.5511 9.49174 15.3467 9.28527L15.3569 9.2956Z" fill="#231F20"/>+</svg>diff --git a/packages/icons/icons/y-axis-rotate.svg b/packages/icons/icons/y-axis-rotate.svgnew file mode 100644index 0000000000..5b21815878--- /dev/null+++ b/packages/icons/icons/y-axis-rotate.svg@@ -0,0 +1,3 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M10.7039 10.3061C10.9729 10.2435 11.1402 9.97471 11.0776 9.70575C11.015 9.43679 10.7462 9.26949 10.4773 9.33208L10.7039 10.3061ZM13.6766 7.77288C13.4841 7.97095 13.4887 8.2875 13.6868 8.47991C13.8849 8.67232 14.2014 8.66773 14.3938 8.46966L13.6766 7.77288ZM7.16366 6.63293C6.93264 6.48166 6.62273 6.5463 6.47145 6.77733C6.32018 7.00835 6.38482 7.31826 6.61584 7.46953L7.16366 6.63293ZM10.7899 9.60506L11.2083 9.87877C11.3594 9.64776 11.2947 9.33798 11.0638 9.18676L10.7899 9.60506ZM7.82355 13.2263C7.67238 13.4574 7.73717 13.7673 7.96826 13.9184C8.19935 14.0696 8.50924 14.0048 8.6604 13.7737L7.82355 13.2263ZM10.4773 9.33208C9.71979 9.50833 8.87545 9.60441 8 9.60441V10.6044C8.94649 10.6044 9.86717 10.5008 10.7039 10.3061L10.4773 9.33208ZM8 9.60441C6.16774 9.60441 4.53543 9.19407 3.37898 8.55563C2.20514 7.90759 1.625 7.09257 1.625 6.30934H0.625C0.625 7.62338 1.58212 8.7059 2.89567 9.43108C4.2266 10.1658 6.03179 10.6044 8 10.6044V9.60441ZM1.625 6.30934C1.625 5.52544 2.20597 4.70687 3.37994 4.05538C4.53641 3.41361 6.16844 3 8 3V2C6.03109 2 4.22562 2.44242 2.89471 3.181C1.58129 3.90987 0.625 4.99596 0.625 6.30934H1.625ZM8 3C9.83226 3 11.4646 3.41034 12.621 4.04878C13.7949 4.69682 14.375 5.51184 14.375 6.29507H15.375C15.375 4.98102 14.4179 3.89851 13.1043 3.17333C11.7734 2.43856 9.96821 2 8 2V3ZM14.375 6.29507C14.375 6.78516 14.1413 7.29447 13.6766 7.77288L14.3938 8.46966C14.9824 7.86377 15.375 7.11757 15.375 6.29507H14.375ZM6.61584 7.46953L10.5159 10.0234L11.0638 9.18676L7.16366 6.63293L6.61584 7.46953ZM10.3714 9.33134L7.82355 13.2263L8.6604 13.7737L11.2083 9.87877L10.3714 9.33134Z" fill="#231F20"/>+</svg>diff --git a/packages/icons/icons/y-axis.svg b/packages/icons/icons/y-axis.svgnew file mode 100644index 0000000000..47420faf23--- /dev/null+++ b/packages/icons/icons/y-axis.svg@@ -0,0 +1,3 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M14.5038 9.16982H6.09892V2.26232L8.11407 4.28798C8.21533 4.38926 8.34698 4.43991 8.46849 4.43991C8.59001 4.43991 8.73178 4.38926 8.82292 4.28798C9.02544 4.08542 9.02544 3.77144 8.82292 3.56887L5.92678 0.651924C5.73438 0.449359 5.41033 0.449359 5.2078 0.651924L2.31166 3.52836C2.10914 3.7208 2.10914 4.0449 2.31166 4.24747C2.50406 4.45003 2.82811 4.45003 3.03064 4.24747L5.09641 2.20155V9.47367L1.10663 14.6897C0.934478 14.9126 0.974983 15.2265 1.19776 15.3987C1.2889 15.4696 1.40029 15.5 1.50155 15.5C1.65345 15.5 1.80535 15.4291 1.90661 15.2974L5.80526 10.1826H14.4937C14.7772 10.1826 15 9.95983 15 9.67623C15 9.39264 14.7772 9.16982 14.4937 9.16982H14.5038Z" fill="#231F20"/>+</svg>diff --git a/packages/icons/icons/z-axis-rotate.svg b/packages/icons/icons/z-axis-rotate.svgnew file mode 100644index 0000000000..f054b4fcde--- /dev/null+++ b/packages/icons/icons/z-axis-rotate.svg@@ -0,0 +1,3 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M14 9.5094C14 9.23325 13.7761 9.0094 13.5 9.0094C13.2239 9.0094 13 9.23325 13 9.5094H14ZM9.94081 4.89679C10.1949 5.00492 10.4885 4.88659 10.5967 4.63249C10.7048 4.3784 10.5865 4.08476 10.3324 3.97664L9.94081 4.89679ZM10.0091 0.748819C9.87555 0.507109 9.57136 0.419414 9.32965 0.552946C9.08794 0.686478 9.00024 0.990672 9.13377 1.23238L10.0091 0.748819ZM11.7494 4.93296L11.9912 5.37061C12.1072 5.30649 12.1931 5.19888 12.2298 5.07146C12.2665 4.94404 12.2512 4.80725 12.187 4.69117L11.7494 4.93296ZM7.56524 6.67325C7.32353 6.80678 7.23583 7.11097 7.36936 7.35268C7.50289 7.59439 7.80709 7.68209 8.0488 7.54856L7.56524 6.67325ZM13 9.5094C13 12.2658 10.7564 14.5094 8 14.5094V15.5094C11.3087 15.5094 14 12.8181 14 9.5094H13ZM8 14.5094C5.24356 14.5094 3 12.2658 3 9.5094H2C2 12.8181 4.69128 15.5094 8 15.5094V14.5094ZM3 9.5094C3 6.75296 5.24356 4.5094 8 4.5094V3.5094C4.69128 3.5094 2 6.20067 2 9.5094H3ZM8 4.5094C8.69217 4.5094 9.35605 4.64796 9.94081 4.89679L10.3324 3.97664C9.6214 3.6741 8.82412 3.5094 8 3.5094V4.5094ZM9.13377 1.23238L11.3117 5.17474L12.187 4.69117L10.0091 0.748819L9.13377 1.23238ZM11.5076 4.4953L7.56524 6.67325L8.0488 7.54856L11.9912 5.37061L11.5076 4.4953Z" fill="#231F20"/>+</svg>diff --git a/packages/icons/icons/z-axis.svg b/packages/icons/icons/z-axis.svgnew file mode 100644index 0000000000..267363e16b--- /dev/null+++ b/packages/icons/icons/z-axis.svg@@ -0,0 +1,3 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M14.583 9.09631H6.07891V1.0123C6.07891 0.72541 5.8535 0.5 5.56662 0.5C5.27973 0.5 5.05432 0.72541 5.05432 1.0123V9.55738L1.93957 13.7889V10.8074C1.93957 10.5205 1.71416 10.2951 1.42727 10.2951C1.14039 10.2951 0.914978 10.5205 0.914978 10.8074V14.9775C0.914978 15.2643 1.14039 15.4898 1.41703 15.4898H5.54613V15.5C5.83301 15.5 6.05842 15.2746 6.05842 14.9877C6.05842 14.7008 5.83301 14.4754 5.54613 14.4754H2.70801L5.90473 10.1209H14.5728C14.8596 10.1209 15.0851 9.89549 15.0851 9.60861C15.0851 9.32172 14.8596 9.09631 14.5728 9.09631H14.583Z" fill="#231F20"/>+</svg>diff --git a/packages/icons/src/__generated__/components.tsx b/packages/icons/src/__generated__/components.tsxindex da9f5309ad..718dc6ee4c 100644--- a/packages/icons/src/__generated__/components.tsx+++ b/packages/icons/src/__generated__/components.tsx@@ -4880,6 +4880,50 @@ export const WrapIcon = forwardRef<SVGSVGElement, IconProps>();WrapIcon.displayName = "WrapIcon";+export const XAxisRotateIcon = forwardRef<SVGSVGElement, IconProps>(+ ({ color = "currentColor", size = 16, ...props }, forwardedRef) => {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 16 16"+ width={size}+ height={size}+ fill={color}+ {...props}+ ref={forwardedRef}+ >+ <path+ fill="#231F20"+ d="M6.55 5.512a.5.5 0 0 0-.975-.225l.975.225Zm.885-3.908a.5.5 0 1 0 .69.724l-.69-.724Zm-5.277 5.91a.5.5 0 1 0 .684.73l-.684-.73Zm3.734-2.813.367-.34a.5.5 0 0 0-.709-.024l.342.364Zm2.798 3.76a.5.5 0 0 0 .734-.68l-.734.68ZM5.575 5.287a12.112 12.112 0 0 0-.296 2.706h1c0-.877.095-1.722.27-2.48l-.974-.226ZM5.28 7.993c0 1.972.447 3.78 1.196 5.112.739 1.317 1.838 2.27 3.164 2.27v-1c-.803 0-1.634-.586-2.292-1.76-.65-1.156-1.068-2.79-1.068-4.622h-1Zm4.36 7.382c1.326 0 2.426-.953 3.165-2.27C13.552 11.773 14 9.965 14 7.993h-1c0 1.833-.418 3.466-1.068 4.623-.659 1.173-1.49 1.759-2.293 1.759v1ZM14 7.993c0-1.972-.448-3.777-1.196-5.106-.74-1.314-1.84-2.262-3.165-2.262v1c.804 0 1.635.584 2.293 1.753C12.582 4.53 13 6.16 13 7.993h1ZM9.64.625c-.831 0-1.587.39-2.205.979l.69.724c.49-.466 1.01-.703 1.514-.703v-1ZM2.841 8.244l3.392-3.178-.684-.73-3.392 3.178.684.73ZM5.525 5.04l3.165 3.42.734-.68-3.165-3.42-.734.68Z"+ />+ </svg>+ );+ }+);+XAxisRotateIcon.displayName = "XAxisRotateIcon";++export const XAxisIcon = forwardRef<SVGSVGElement, IconProps>(+ ({ color = "currentColor", size = 16, ...props }, forwardedRef) => {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 16 16"+ width={size}+ height={size}+ fill={color}+ {...props}+ ref={forwardedRef}+ >+ <path+ fill="#231F20"+ d="m15.357 9.296-2.903-2.953a.503.503 0 0 0-.726 0 .515.515 0 0 0 0 .733l2.055 2.096H5.575V1.016A.509.509 0 0 0 5.065.5a.509.509 0 0 0-.512.516v8.517L.608 14.674a.516.516 0 0 0 .092.723.508.508 0 0 0 .316.103.538.538 0 0 0 .41-.196l3.924-5.11h8.392l-2.055 2.064a.515.515 0 0 0 0 .733.511.511 0 0 0 .358.155.494.494 0 0 0 .358-.155l2.944-2.973a.515.515 0 0 0 0-.733l.01.01Z"+ />+ </svg>+ );+ }+);+XAxisIcon.displayName = "XAxisIcon";+export const XIcon = forwardRef<SVGSVGElement, IconProps>(({ color = "currentColor", size = 16, ...props }, forwardedRef) => {return (@@ -4924,6 +4968,50 @@ export const XmlIcon = forwardRef<SVGSVGElement, IconProps>();XmlIcon.displayName = "XmlIcon";+export const YAxisRotateIcon = forwardRef<SVGSVGElement, IconProps>(+ ({ color = "currentColor", size = 16, ...props }, forwardedRef) => {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 16 16"+ width={size}+ height={size}+ fill={color}+ {...props}+ ref={forwardedRef}+ >+ <path+ fill="#231F20"+ d="M10.704 10.306a.5.5 0 0 0-.227-.974l.227.974Zm2.973-2.533a.5.5 0 1 0 .717.697l-.717-.697Zm-6.513-1.14a.5.5 0 0 0-.548.837l.548-.837Zm3.626 2.972.418.274a.5.5 0 0 0-.144-.692l-.274.418Zm-2.966 3.621a.5.5 0 1 0 .836.548l-.836-.548Zm2.653-3.894c-.757.176-1.602.272-2.477.272v1c.946 0 1.867-.103 2.704-.298l-.227-.974ZM8 9.604c-1.832 0-3.465-.41-4.621-1.048-1.174-.648-1.754-1.463-1.754-2.247h-1c0 1.314.957 2.397 2.27 3.122 1.332.735 3.137 1.173 5.105 1.173v-1ZM1.625 6.31c0-.784.581-1.602 1.755-2.254C4.536 3.414 6.168 3 8 3V2c-1.969 0-3.774.442-5.105 1.181C1.58 3.91.625 4.996.625 6.309h1ZM8 3c1.832 0 3.465.41 4.621 1.049 1.174.648 1.754 1.463 1.754 2.246h1c0-1.314-.957-2.396-2.27-3.122C11.772 2.44 9.967 2 8 2v1Zm6.375 3.295c0 .49-.234 1-.698 1.478l.717.697c.588-.606.981-1.352.981-2.175h-1ZM6.615 7.47l3.9 2.553.549-.836-3.9-2.554-.548.837Zm3.756 1.861-2.547 3.895.836.548 2.548-3.895-.837-.548Z"+ />+ </svg>+ );+ }+);+YAxisRotateIcon.displayName = "YAxisRotateIcon";++export const YAxisIcon = forwardRef<SVGSVGElement, IconProps>(+ ({ color = "currentColor", size = 16, ...props }, forwardedRef) => {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 16 16"+ width={size}+ height={size}+ fill={color}+ {...props}+ ref={forwardedRef}+ >+ <path+ fill="#231F20"+ d="M14.504 9.17H6.099V2.262l2.015 2.026a.491.491 0 0 0 .709 0 .502.502 0 0 0 0-.72L5.927.653a.501.501 0 0 0-.72 0L2.313 3.528a.501.501 0 0 0 0 .72.501.501 0 0 0 .719 0l2.065-2.046v7.272l-3.99 5.216a.502.502 0 1 0 .8.607l3.9-5.114h8.688A.501.501 0 0 0 15 9.676a.501.501 0 0 0-.506-.506h.01Z"+ />+ </svg>+ );+ }+);+YAxisIcon.displayName = "YAxisIcon";+export const Youtube1cIcon = forwardRef<SVGSVGElement, IconProps>(({ color = "currentColor", size = 16, ...props }, forwardedRef) => {return (@@ -4946,3 +5034,47 @@ export const Youtube1cIcon = forwardRef<SVGSVGElement, IconProps>(});Youtube1cIcon.displayName = "Youtube1cIcon";++export const ZAxisRotateIcon = forwardRef<SVGSVGElement, IconProps>(+ ({ color = "currentColor", size = 16, ...props }, forwardedRef) => {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 16 16"+ width={size}+ height={size}+ fill={color}+ {...props}+ ref={forwardedRef}+ >+ <path+ fill="#231F20"+ d="M14 9.51a.5.5 0 0 0-1 0h1ZM9.94 4.896a.5.5 0 0 0 .392-.92l-.391.92Zm.07-4.148a.5.5 0 0 0-.876.483l.875-.483Zm1.74 4.184.241.438a.5.5 0 0 0 .196-.68l-.438.242Zm-4.185 1.74a.5.5 0 1 0 .484.876l-.484-.876ZM13 9.51c0 2.757-2.244 5-5 5v1c3.309 0 6-2.69 6-6h-1Zm-5 5c-2.756 0-5-2.243-5-5H2c0 3.31 2.691 6 6 6v-1Zm-5-5c0-2.756 2.244-5 5-5v-1c-3.309 0-6 2.692-6 6h1Zm5-5c.692 0 1.356.139 1.94.388l.392-.92A5.973 5.973 0 0 0 8 3.509v1Zm1.134-3.277 2.178 3.943.875-.484L10.009.75l-.875.483Zm2.374 3.263L7.565 6.673l.484.876L11.99 5.37l-.483-.876Z"+ />+ </svg>+ );+ }+);+ZAxisRotateIcon.displayName = "ZAxisRotateIcon";++export const ZAxisIcon = forwardRef<SVGSVGElement, IconProps>(+ ({ color = "currentColor", size = 16, ...props }, forwardedRef) => {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 16 16"+ width={size}+ height={size}+ fill={color}+ {...props}+ ref={forwardedRef}+ >+ <path+ fill="#231F20"+ d="M14.583 9.096H6.079V1.012A.507.507 0 0 0 5.567.5a.507.507 0 0 0-.513.512v8.545L1.94 13.79v-2.982a.507.507 0 0 0-.513-.512.507.507 0 0 0-.512.512v4.17c0 .287.225.513.502.513h4.13v.01a.507.507 0 0 0 .511-.512.507.507 0 0 0-.512-.513H2.708l3.197-4.354h8.668a.507.507 0 0 0 .512-.512.507.507 0 0 0-.512-.513h.01Z"+ />+ </svg>+ );+ }+);+ZAxisIcon.displayName = "ZAxisIcon";diff --git a/packages/icons/src/__generated__/svg.ts b/packages/icons/src/__generated__/svg.tsindex e4379f7c75..8be103b378 100644--- a/packages/icons/src/__generated__/svg.ts+++ b/packages/icons/src/__generated__/svg.ts@@ -372,8 +372,20 @@ export const WebstudioIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="noneexport const WrapIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path d="M4.98 2.33A.98.98 0 0 0 4 1.35H2.66a.98.98 0 0 0-.98.98v4.01c0 .541.439.98.98.98H4a.98.98 0 0 0 .98-.98V2.33ZM9.65 2.33a.98.98 0 0 0-.98-.98H7.33a.98.98 0 0 0-.98.98v4.01c0 .541.439.98.98.98h1.34a.98.98 0 0 0 .98-.98V2.33ZM4.98 9.67A.98.98 0 0 0 4 8.69H2.66a.98.98 0 0 0-.98.98v4.01c0 .54.439.98.98.98H4a.98.98 0 0 0 .98-.98V9.67Z"/><path d="M11.687 3.902a.65.65 0 0 0-.407 1.234 3.022 3.022 0 0 1-.947 5.889H8.572L9.8 9.8a.65.65 0 0 0-.919-.92l-2.34 2.335a.65.65 0 0 0 0 .92l2.34 2.335a.65.65 0 1 0 .919-.92l-1.228-1.225h1.761a4.32 4.32 0 0 0 1.354-8.423Z"/></svg>`;+export const XAxisRotateIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#231F20" d="M6.55 5.512a.5.5 0 0 0-.975-.225l.975.225Zm.885-3.908a.5.5 0 1 0 .69.724l-.69-.724Zm-5.277 5.91a.5.5 0 1 0 .684.73l-.684-.73Zm3.734-2.813.367-.34a.5.5 0 0 0-.709-.024l.342.364Zm2.798 3.76a.5.5 0 0 0 .734-.68l-.734.68ZM5.575 5.287a12.112 12.112 0 0 0-.296 2.706h1c0-.877.095-1.722.27-2.48l-.974-.226ZM5.28 7.993c0 1.972.447 3.78 1.196 5.112.739 1.317 1.838 2.27 3.164 2.27v-1c-.803 0-1.634-.586-2.292-1.76-.65-1.156-1.068-2.79-1.068-4.622h-1Zm4.36 7.382c1.326 0 2.426-.953 3.165-2.27C13.552 11.773 14 9.965 14 7.993h-1c0 1.833-.418 3.466-1.068 4.623-.659 1.173-1.49 1.759-2.293 1.759v1ZM14 7.993c0-1.972-.448-3.777-1.196-5.106-.74-1.314-1.84-2.262-3.165-2.262v1c.804 0 1.635.584 2.293 1.753C12.582 4.53 13 6.16 13 7.993h1ZM9.64.625c-.831 0-1.587.39-2.205.979l.69.724c.49-.466 1.01-.703 1.514-.703v-1ZM2.841 8.244l3.392-3.178-.684-.73-3.392 3.178.684.73ZM5.525 5.04l3.165 3.42.734-.68-3.165-3.42-.734.68Z"/></svg>`;++export const XAxisIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#231F20" d="m15.357 9.296-2.903-2.953a.503.503 0 0 0-.726 0 .515.515 0 0 0 0 .733l2.055 2.096H5.575V1.016A.509.509 0 0 0 5.065.5a.509.509 0 0 0-.512.516v8.517L.608 14.674a.516.516 0 0 0 .092.723.508.508 0 0 0 .316.103.538.538 0 0 0 .41-.196l3.924-5.11h8.392l-2.055 2.064a.515.515 0 0 0 0 .733.511.511 0 0 0 .358.155.494.494 0 0 0 .358-.155l2.944-2.973a.515.515 0 0 0 0-.733l.01.01Z"/></svg>`;+export const XIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path d="M9.142 7.081 13.609 2H12.55L8.671 6.412 5.573 2H2l4.685 6.672L2 14h1.059l4.096-4.66L10.427 14H14L9.141 7.081Zm-1.45 1.65-.475-.665L3.44 2.78h1.626l3.048 4.266.475.664 3.962 5.546h-1.626L7.692 8.73Z"/></svg>`;export const XmlIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3" d="M2.667 8V3.333A1.333 1.333 0 0 1 4 2h4.667m0 0L12 5.333M8.667 2v2.667a.667.667 0 0 0 .666.666H12m0 0V8M2 10l2.667 4M2 14l2.667-4M12 10v4h2m-7.333 0v-4l1.666 2L10 10v4"/></svg>`;+export const YAxisRotateIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#231F20" d="M10.704 10.306a.5.5 0 0 0-.227-.974l.227.974Zm2.973-2.533a.5.5 0 1 0 .717.697l-.717-.697Zm-6.513-1.14a.5.5 0 0 0-.548.837l.548-.837Zm3.626 2.972.418.274a.5.5 0 0 0-.144-.692l-.274.418Zm-2.966 3.621a.5.5 0 1 0 .836.548l-.836-.548Zm2.653-3.894c-.757.176-1.602.272-2.477.272v1c.946 0 1.867-.103 2.704-.298l-.227-.974ZM8 9.604c-1.832 0-3.465-.41-4.621-1.048-1.174-.648-1.754-1.463-1.754-2.247h-1c0 1.314.957 2.397 2.27 3.122 1.332.735 3.137 1.173 5.105 1.173v-1ZM1.625 6.31c0-.784.581-1.602 1.755-2.254C4.536 3.414 6.168 3 8 3V2c-1.969 0-3.774.442-5.105 1.181C1.58 3.91.625 4.996.625 6.309h1ZM8 3c1.832 0 3.465.41 4.621 1.049 1.174.648 1.754 1.463 1.754 2.246h1c0-1.314-.957-2.396-2.27-3.122C11.772 2.44 9.967 2 8 2v1Zm6.375 3.295c0 .49-.234 1-.698 1.478l.717.697c.588-.606.981-1.352.981-2.175h-1ZM6.615 7.47l3.9 2.553.549-.836-3.9-2.554-.548.837Zm3.756 1.861-2.547 3.895.836.548 2.548-3.895-.837-.548Z"/></svg>`;++export const YAxisIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#231F20" d="M14.504 9.17H6.099V2.262l2.015 2.026a.491.491 0 0 0 .709 0 .502.502 0 0 0 0-.72L5.927.653a.501.501 0 0 0-.72 0L2.313 3.528a.501.501 0 0 0 0 .72.501.501 0 0 0 .719 0l2.065-2.046v7.272l-3.99 5.216a.502.502 0 1 0 .8.607l3.9-5.114h8.688A.501.501 0 0 0 15 9.676a.501.501 0 0 0-.506-.506h.01Z"/></svg>`;+export const Youtube1cIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M13.47 3.299a1.771 1.771 0 0 1 1.238 1.263C15 5.675 15 8 15 8s0 2.325-.293 3.438a1.771 1.771 0 0 1-1.238 1.263C12.38 13 8 13 8 13s-4.378 0-5.47-.299a1.771 1.771 0 0 1-1.237-1.263C1 10.325 1 8 1 8s0-2.325.293-3.438A1.771 1.771 0 0 1 2.53 3.299C3.622 3 8 3 8 3s4.378 0 5.47.299Zm-3.232 4.7L6.6 10.144V5.857L10.238 8Z" clip-rule="evenodd"/></svg>`;++export const ZAxisRotateIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#231F20" d="M14 9.51a.5.5 0 0 0-1 0h1ZM9.94 4.896a.5.5 0 0 0 .392-.92l-.391.92Zm.07-4.148a.5.5 0 0 0-.876.483l.875-.483Zm1.74 4.184.241.438a.5.5 0 0 0 .196-.68l-.438.242Zm-4.185 1.74a.5.5 0 1 0 .484.876l-.484-.876ZM13 9.51c0 2.757-2.244 5-5 5v1c3.309 0 6-2.69 6-6h-1Zm-5 5c-2.756 0-5-2.243-5-5H2c0 3.31 2.691 6 6 6v-1Zm-5-5c0-2.756 2.244-5 5-5v-1c-3.309 0-6 2.692-6 6h1Zm5-5c.692 0 1.356.139 1.94.388l.392-.92A5.973 5.973 0 0 0 8 3.509v1Zm1.134-3.277 2.178 3.943.875-.484L10.009.75l-.875.483Zm2.374 3.263L7.565 6.673l.484.876L11.99 5.37l-.483-.876Z"/></svg>`;++export const ZAxisIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#231F20" d="M14.583 9.096H6.079V1.012A.507.507 0 0 0 5.567.5a.507.507 0 0 0-.513.512v8.545L1.94 13.79v-2.982a.507.507 0 0 0-.513-.512.507.507 0 0 0-.512.512v4.17c0 .287.225.513.502.513h4.13v.01a.507.507 0 0 0 .511-.512.507.507 0 0 0-.512-.513H2.708l3.197-4.354h8.668a.507.507 0 0 0 .512-.512.507.507 0 0 0-.512-.513h.01Z"/></svg>`;