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
fix: Use preset height auto for images instead of fit-content (#3052)
Ivan Starkov634bd894125d
diff --git a/apps/builder/app/builder/features/settings-panel/props-section/props-section.stories.tsx b/apps/builder/app/builder/features/settings-panel/props-section/props-section.stories.tsxindex 930e50eaf3..11835a1cf9 100644--- a/apps/builder/app/builder/features/settings-panel/props-section/props-section.stories.tsx+++ b/apps/builder/app/builder/features/settings-panel/props-section/props-section.stories.tsx@@ -405,7 +405,6 @@ export const Story = () => {propsLogic={logic}propValues={new Map()}component="Button"- setCssProperty={() => () => undefined}/></div><pre style={textVariants.mono}>diff --git a/apps/builder/app/builder/features/settings-panel/props-section/props-section.tsx b/apps/builder/app/builder/features/settings-panel/props-section/props-section.tsxindex 45d21f447a..9ebf082a00 100644--- a/apps/builder/app/builder/features/settings-panel/props-section/props-section.tsx+++ b/apps/builder/app/builder/features/settings-panel/props-section/props-section.tsx@@ -21,10 +21,6 @@ import {$selectedInstanceSelector,} from "~/shared/nano-states";import { CollapsibleSectionWithAddButton } from "~/builder/shared/collapsible-section";-import {- useStyleData,- type SetProperty as SetCssProperty,-} from "~/builder/features/style-panel/shared/use-style-data";import { renderControl } from "../controls/combined";import {usePropsLogic,@@ -112,13 +108,7 @@ const PropsCombobox = ({};const renderProperty = (- {- propsLogic: logic,- propValues,- setCssProperty,- component,- instanceId,- }: PropsSectionProps,+ { propsLogic: logic, propValues, component, instanceId }: PropsSectionProps,{ prop, propName, meta }: PropAndMeta,{ deletable, autoFocus }: { deletable?: boolean; autoFocus?: boolean } = {}) =>@@ -155,11 +145,6 @@ const renderProperty = (value: asset.meta.height,type: "number",});-- setCssProperty("height")({- type: "keyword",- value: "fit-content",- });}},});@@ -184,7 +169,6 @@ type PropsSectionProps = {propValues: Map<string, unknown>;component: Instance["component"];instanceId: string;- setCssProperty: SetCssProperty;};// A UI componet with minimum logic that can be demoed in Storybook etc.@@ -237,9 +221,6 @@ export const PropsSectionContainer = ({}: {selectedInstance: Instance;}) => {- const { setProperty: setCssProperty } = useStyleData({- selectedInstance: instance,- });const { propsByInstanceId } = useStore($propsIndex);const propValuesByInstanceSelector = useStore($propValuesByInstanceSelector);const instanceSelector = useStore($selectedInstanceSelector);@@ -286,7 +267,6 @@ export const PropsSectionContainer = ({propValues={propValues ?? new Map()}component={instance.component}instanceId={instance.id}- setCssProperty={setCssProperty}/>);};diff --git a/fixtures/webstudio-custom-template/.webstudio/data.json b/fixtures/webstudio-custom-template/.webstudio/data.jsonindex 2c915b9cef..856d733365 100644--- a/fixtures/webstudio-custom-template/.webstudio/data.json+++ b/fixtures/webstudio-custom-template/.webstudio/data.json@@ -1,10 +1,10 @@{"build": {- "id": "013a3982-43b2-4c80-90a6-fc306a5bdf2d",+ "id": "14cb2397-e340-43db-b50d-a8ce419eb632","projectId": "0d856812-61d8-4014-a20a-82e01c0eb8ee",- "version": 192,- "createdAt": "2024-03-26T14:06:11.500Z",- "updatedAt": "2024-03-26T14:06:11.500Z",+ "version": 218,+ "createdAt": "2024-03-26T18:34:56.154Z",+ "updatedAt": "2024-03-26T18:34:56.154Z","pages": {"meta": {"siteName": "Fixture Site",@@ -999,6 +999,170 @@"value": -35}}+ ],+ [+ "8DRXBfAN4aGdHBDAYAzO7:mIDIDBHsdlix3RVZAVmv7:display:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "8DRXBfAN4aGdHBDAYAzO7",+ "property": "display",+ "value": {+ "type": "keyword",+ "value": "flex"+ }+ }+ ],+ [+ "8DRXBfAN4aGdHBDAYAzO7:mIDIDBHsdlix3RVZAVmv7:flexDirection:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "8DRXBfAN4aGdHBDAYAzO7",+ "property": "flexDirection",+ "value": {+ "type": "keyword",+ "value": "row"+ }+ }+ ],+ [+ "8DRXBfAN4aGdHBDAYAzO7:mIDIDBHsdlix3RVZAVmv7:flexWrap:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "8DRXBfAN4aGdHBDAYAzO7",+ "property": "flexWrap",+ "value": {+ "type": "keyword",+ "value": "nowrap"+ }+ }+ ],+ [+ "8DRXBfAN4aGdHBDAYAzO7:mIDIDBHsdlix3RVZAVmv7:alignItems:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "8DRXBfAN4aGdHBDAYAzO7",+ "property": "alignItems",+ "value": {+ "type": "keyword",+ "value": "stretch"+ }+ }+ ],+ [+ "8DRXBfAN4aGdHBDAYAzO7:mIDIDBHsdlix3RVZAVmv7:justifyContent:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "8DRXBfAN4aGdHBDAYAzO7",+ "property": "justifyContent",+ "value": {+ "type": "keyword",+ "value": "space-between"+ }+ }+ ],+ [+ "C94MB7fijp2s_2QUOj3Q2:mIDIDBHsdlix3RVZAVmv7:flexGrow:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "C94MB7fijp2s_2QUOj3Q2",+ "property": "flexGrow",+ "value": {+ "type": "unit",+ "unit": "number",+ "value": 1+ }+ }+ ],+ [+ "C94MB7fijp2s_2QUOj3Q2:mIDIDBHsdlix3RVZAVmv7:flexShrink:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "C94MB7fijp2s_2QUOj3Q2",+ "property": "flexShrink",+ "value": {+ "type": "unit",+ "unit": "number",+ "value": 0+ }+ }+ ],+ [+ "jGTUoz0ux0EK-bikmqnw7:mIDIDBHsdlix3RVZAVmv7:flexGrow:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "jGTUoz0ux0EK-bikmqnw7",+ "property": "flexGrow",+ "value": {+ "type": "unit",+ "unit": "number",+ "value": 1+ }+ }+ ],+ [+ "jGTUoz0ux0EK-bikmqnw7:mIDIDBHsdlix3RVZAVmv7:flexShrink:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "jGTUoz0ux0EK-bikmqnw7",+ "property": "flexShrink",+ "value": {+ "type": "unit",+ "unit": "number",+ "value": 0+ }+ }+ ],+ [+ "jGTUoz0ux0EK-bikmqnw7:mIDIDBHsdlix3RVZAVmv7:minWidth:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "jGTUoz0ux0EK-bikmqnw7",+ "property": "minWidth",+ "value": {+ "type": "unit",+ "unit": "px",+ "value": 0+ }+ }+ ],+ [+ "C94MB7fijp2s_2QUOj3Q2:mIDIDBHsdlix3RVZAVmv7:minWidth:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "C94MB7fijp2s_2QUOj3Q2",+ "property": "minWidth",+ "value": {+ "type": "unit",+ "unit": "px",+ "value": 0+ }+ }+ ],+ [+ "jGTUoz0ux0EK-bikmqnw7:mIDIDBHsdlix3RVZAVmv7:flexBasis:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "jGTUoz0ux0EK-bikmqnw7",+ "property": "flexBasis",+ "value": {+ "type": "unit",+ "unit": "px",+ "value": 0+ }+ }+ ],+ [+ "C94MB7fijp2s_2QUOj3Q2:mIDIDBHsdlix3RVZAVmv7:flexBasis:",+ {+ "breakpointId": "mIDIDBHsdlix3RVZAVmv7",+ "styleSourceId": "C94MB7fijp2s_2QUOj3Q2",+ "property": "flexBasis",+ "value": {+ "type": "unit",+ "unit": "px",+ "value": 0+ }+ }]],"styleSources": [@@ -1057,6 +1221,27 @@"type": "local","id": "8v4JU2TDZLCT4lVpVhiUW"}+ ],+ [+ "8DRXBfAN4aGdHBDAYAzO7",+ {+ "type": "local",+ "id": "8DRXBfAN4aGdHBDAYAzO7"+ }+ ],+ [+ "C94MB7fijp2s_2QUOj3Q2",+ {+ "type": "local",+ "id": "C94MB7fijp2s_2QUOj3Q2"+ }+ ],+ [+ "jGTUoz0ux0EK-bikmqnw7",+ {+ "type": "local",+ "id": "jGTUoz0ux0EK-bikmqnw7"+ }]],"styleSourceSelections": [@@ -1115,6 +1300,27 @@"instanceId": "o8sAMUoaOraWYZClEfRgl","values": ["8v4JU2TDZLCT4lVpVhiUW"]}+ ],+ [+ "GMg3Wi9tJBFMtKcwbIK6z",+ {+ "instanceId": "GMg3Wi9tJBFMtKcwbIK6z",+ "values": ["8DRXBfAN4aGdHBDAYAzO7"]+ }+ ],+ [+ "Mfd_mI-VJtT4r7gICAvXi",+ {+ "instanceId": "Mfd_mI-VJtT4r7gICAvXi",+ "values": ["C94MB7fijp2s_2QUOj3Q2"]+ }+ ],+ [+ "COafOppxs73Ne4O0Geik0",+ {+ "instanceId": "COafOppxs73Ne4O0Geik0",+ "values": ["jGTUoz0ux0EK-bikmqnw7"]+ }]],"props": [@@ -1307,6 +1513,36 @@"type": "boolean","value": true}+ ],+ [+ "F2bI126ek5RVoDUJB_cBS",+ {+ "id": "F2bI126ek5RVoDUJB_cBS",+ "instanceId": "Mfd_mI-VJtT4r7gICAvXi",+ "name": "src",+ "type": "asset",+ "value": "ff546bd2-9bb1-4717-a180-1a1fc05565dd"+ }+ ],+ [+ "svEkyjh1QjPy1V-AC2QSO",+ {+ "id": "svEkyjh1QjPy1V-AC2QSO",+ "instanceId": "Mfd_mI-VJtT4r7gICAvXi",+ "name": "width",+ "type": "number",+ "value": 1024+ }+ ],+ [+ "ovmO9Tv4LzIYLYRsu_L2z",+ {+ "id": "ovmO9Tv4LzIYLYRsu_L2z",+ "instanceId": "Mfd_mI-VJtT4r7gICAvXi",+ "name": "height",+ "type": "number",+ "value": 1024+ }]],"dataSources": [@@ -1351,6 +1587,14 @@"type": "id","value": "7pwqBSgrfuuOfk1JblWcL"},+ {+ "type": "id",+ "value": "GMg3Wi9tJBFMtKcwbIK6z"+ },+ {+ "type": "id",+ "value": "jWb8SRMYG_XPWqCYvGZjo"+ },{"type": "id","value": "PI0W8MDhnG1glS5zDm8HQ"@@ -1614,6 +1858,56 @@"label": "CLient","children": []}+ ],+ [+ "GMg3Wi9tJBFMtKcwbIK6z",+ {+ "type": "instance",+ "id": "GMg3Wi9tJBFMtKcwbIK6z",+ "component": "Box",+ "children": [+ {+ "type": "id",+ "value": "Mfd_mI-VJtT4r7gICAvXi"+ },+ {+ "type": "id",+ "value": "COafOppxs73Ne4O0Geik0"+ }+ ]+ }+ ],+ [+ "Mfd_mI-VJtT4r7gICAvXi",+ {+ "type": "instance",+ "id": "Mfd_mI-VJtT4r7gICAvXi",+ "component": "Image",+ "children": []+ }+ ],+ [+ "COafOppxs73Ne4O0Geik0",+ {+ "type": "instance",+ "id": "COafOppxs73Ne4O0Geik0",+ "component": "Box",+ "children": []+ }+ ],+ [+ "jWb8SRMYG_XPWqCYvGZjo",+ {+ "type": "instance",+ "id": "jWb8SRMYG_XPWqCYvGZjo",+ "component": "Heading",+ "children": [+ {+ "type": "text",+ "value": "Below Image"+ }+ ]+ }]],"deployment": {@@ -1683,6 +1977,20 @@}],"assets": [+ {+ "id": "ff546bd2-9bb1-4717-a180-1a1fc05565dd",+ "name": "_937084ed-a798-49fe-8664-df93a2af605e_1JqSy_0Wy9fY5mXNZSLJ0.jpeg",+ "description": null,+ "projectId": "0d856812-61d8-4014-a20a-82e01c0eb8ee",+ "size": 210614,+ "type": "image",+ "format": "jpg",+ "createdAt": "2024-03-26T18:31:04.086Z",+ "meta": {+ "width": 1024,+ "height": 1024+ }+ },{"id": "a8fb692a-5970-4014-ad4d-45c6f1edea36","name": "CormorantGaramond-Medium_-nWJ-OtHncaW9xDHQ9hSA_CBl88Oo59QKH_z9pCWva2.woff2",diff --git a/fixtures/webstudio-custom-template/app/__generated__/[script-test]._index.server.tsx b/fixtures/webstudio-custom-template/app/__generated__/[script-test]._index.server.tsxindex f77003fa19..007c559a0e 100644--- a/fixtures/webstudio-custom-template/app/__generated__/[script-test]._index.server.tsx+++ b/fixtures/webstudio-custom-template/app/__generated__/[script-test]._index.server.tsx@@ -48,6 +48,17 @@ export const projectMeta: ProjectMeta = {};export const imageAssets: ImageAsset[] = [+ {+ id: "ff546bd2-9bb1-4717-a180-1a1fc05565dd",+ name: "_937084ed-a798-49fe-8664-df93a2af605e_1JqSy_0Wy9fY5mXNZSLJ0.jpeg",+ description: null,+ projectId: "0d856812-61d8-4014-a20a-82e01c0eb8ee",+ size: 210614,+ type: "image",+ format: "jpg",+ createdAt: "2024-03-26T18:31:04.086Z",+ meta: { width: 1024, height: 1024 },+ },{id: "cd1e9fad-8df1-45c6-800f-05fda2d2469f",name: "home_wsKvRSqvkajPPBeycZ-C8.svg",diff --git a/fixtures/webstudio-custom-template/app/__generated__/[sitemap.xml].ts b/fixtures/webstudio-custom-template/app/__generated__/[sitemap.xml].tsindex 7fa2ff3666..73d10d916e 100644--- a/fixtures/webstudio-custom-template/app/__generated__/[sitemap.xml].ts+++ b/fixtures/webstudio-custom-template/app/__generated__/[sitemap.xml].ts@@ -2,15 +2,15 @@ export const sitemap = {pages: [{path: "",- lastModified: "2024-03-26T14:06:11.500Z",+ lastModified: "2024-03-26T18:34:56.154Z",},{path: "/script-test",- lastModified: "2024-03-26T14:06:11.500Z",+ lastModified: "2024-03-26T18:34:56.154Z",},{path: "/world",- lastModified: "2024-03-26T14:06:11.500Z",+ lastModified: "2024-03-26T18:34:56.154Z",},],};diff --git a/fixtures/webstudio-custom-template/app/__generated__/[world]._index.server.tsx b/fixtures/webstudio-custom-template/app/__generated__/[world]._index.server.tsxindex ca34f175b3..8af585ae5f 100644--- a/fixtures/webstudio-custom-template/app/__generated__/[world]._index.server.tsx+++ b/fixtures/webstudio-custom-template/app/__generated__/[world]._index.server.tsx@@ -48,6 +48,17 @@ export const projectMeta: ProjectMeta = {};export const imageAssets: ImageAsset[] = [+ {+ id: "ff546bd2-9bb1-4717-a180-1a1fc05565dd",+ name: "_937084ed-a798-49fe-8664-df93a2af605e_1JqSy_0Wy9fY5mXNZSLJ0.jpeg",+ description: null,+ projectId: "0d856812-61d8-4014-a20a-82e01c0eb8ee",+ size: 210614,+ type: "image",+ format: "jpg",+ createdAt: "2024-03-26T18:31:04.086Z",+ meta: { width: 1024, height: 1024 },+ },{id: "cd1e9fad-8df1-45c6-800f-05fda2d2469f",name: "home_wsKvRSqvkajPPBeycZ-C8.svg",diff --git a/fixtures/webstudio-custom-template/app/__generated__/_index.server.tsx b/fixtures/webstudio-custom-template/app/__generated__/_index.server.tsxindex 9986179382..c6c672a680 100644--- a/fixtures/webstudio-custom-template/app/__generated__/_index.server.tsx+++ b/fixtures/webstudio-custom-template/app/__generated__/_index.server.tsx@@ -48,6 +48,17 @@ export const projectMeta: ProjectMeta = {};export const imageAssets: ImageAsset[] = [+ {+ id: "ff546bd2-9bb1-4717-a180-1a1fc05565dd",+ name: "_937084ed-a798-49fe-8664-df93a2af605e_1JqSy_0Wy9fY5mXNZSLJ0.jpeg",+ description: null,+ projectId: "0d856812-61d8-4014-a20a-82e01c0eb8ee",+ size: 210614,+ type: "image",+ format: "jpg",+ createdAt: "2024-03-26T18:31:04.086Z",+ meta: { width: 1024, height: 1024 },+ },{id: "cd1e9fad-8df1-45c6-800f-05fda2d2469f",name: "home_wsKvRSqvkajPPBeycZ-C8.svg",diff --git a/fixtures/webstudio-custom-template/app/__generated__/_index.tsx b/fixtures/webstudio-custom-template/app/__generated__/_index.tsxindex 64338d3593..ab54bcc283 100644--- a/fixtures/webstudio-custom-template/app/__generated__/_index.tsx+++ b/fixtures/webstudio-custom-template/app/__generated__/_index.tsx@@ -16,6 +16,7 @@ import {Box as Box,HtmlEmbed as HtmlEmbed,VimeoSpinner as VimeoSpinner,+ Image as Image,} from "@webstudio-is/sdk-components-react";export const favIconAsset: ImageAsset | undefined = {@@ -73,6 +74,30 @@ const Page = ({}: { system: any }) => {>{"DO NOT TOUCH THIS PROJECT, IT'S USED FOR FIXTURES"}</Heading>+ <Box+ data-ws-id="GMg3Wi9tJBFMtKcwbIK6z"+ data-ws-component="Box"+ className="c1b095zn c8n5d6n chg86bx c9inwkc csxkr3h"+ >+ <Image+ data-ws-id="Mfd_mI-VJtT4r7gICAvXi"+ data-ws-component="Image"+ src={+ "/custom-folder/_937084ed-a798-49fe-8664-df93a2af605e_1JqSy_0Wy9fY5mXNZSLJ0.jpeg"+ }+ width={1024}+ height={1024}+ className="cp47ozi c133k2ks c1dww8sp c15iig68"+ />+ <Box+ data-ws-id="COafOppxs73Ne4O0Geik0"+ data-ws-component="Box"+ className="cp47ozi c133k2ks c1dww8sp c15iig68"+ />+ </Box>+ <Heading data-ws-id="jWb8SRMYG_XPWqCYvGZjo" data-ws-component="Heading">+ {"Below Image"}+ </Heading><HtmlEmbeddata-ws-id="PI0W8MDhnG1glS5zDm8HQ"data-ws-component="HtmlEmbed"diff --git a/fixtures/webstudio-custom-template/app/__generated__/index.css b/fixtures/webstudio-custom-template/app/__generated__/index.cssindex 0d49bff5ea..7cfe3bd393 100644--- a/fixtures/webstudio-custom-template/app/__generated__/index.css+++ b/fixtures/webstudio-custom-template/app/__generated__/index.css@@ -103,6 +103,7 @@ html {outline-width: 1px;max-width: 100%;display: block;+ height: auto;}button:where([data-ws-component="VimeoPlayButton"]) {font-family: inherit;@@ -211,6 +212,17 @@ html {border-left-width: 1px;outline-width: 1px;}+ img:where([data-ws-component="Image"]) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ max-width: 100%;+ display: block;+ height: auto;+ }}@media all {.c11x2bo2 {@@ -374,4 +386,28 @@ html {.c1qg633k {margin-left: -35px;}+ .c8n5d6n {+ flex-direction: row;+ }+ .chg86bx {+ flex-wrap: nowrap;+ }+ .c9inwkc {+ align-items: stretch;+ }+ .csxkr3h {+ justify-content: space-between;+ }+ .cp47ozi {+ flex-grow: 1;+ }+ .c133k2ks {+ flex-shrink: 0;+ }+ .c1dww8sp {+ min-width: 0px;+ }+ .c15iig68 {+ flex-basis: 0px;+ }}diff --git a/fixtures/webstudio-custom-template/public/custom-folder/_937084ed-a798-49fe-8664-df93a2af605e_1JqSy_0Wy9fY5mXNZSLJ0.jpeg b/fixtures/webstudio-custom-template/public/custom-folder/_937084ed-a798-49fe-8664-df93a2af605e_1JqSy_0Wy9fY5mXNZSLJ0.jpegnew file mode 100644index 0000000000..1c8219b73bBinary files /dev/null and b/fixtures/webstudio-custom-template/public/custom-folder/_937084ed-a798-49fe-8664-df93a2af605e_1JqSy_0Wy9fY5mXNZSLJ0.jpeg differdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/index.css b/fixtures/webstudio-remix-vercel/app/__generated__/index.cssindex c92260cc4b..744ad4264e 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/index.css+++ b/fixtures/webstudio-remix-vercel/app/__generated__/index.css@@ -165,6 +165,7 @@ html {outline-width: 1px;max-width: 100%;display: block;+ height: auto;}a:where([data-ws-component="Link"]) {box-sizing: border-box;diff --git a/packages/sdk-components-react/src/html-embed.test.tsx b/packages/sdk-components-react/src/html-embed.test.tsxindex 288e56aa26..bb20c15074 100644--- a/packages/sdk-components-react/src/html-embed.test.tsx+++ b/packages/sdk-components-react/src/html-embed.test.tsx@@ -67,8 +67,8 @@ describe("Published site", () => {* - SSR: Renders script tags in HTML embeds directly, without modification, on the server side, on hydration and on refresh.* - Page Navigation: Executes scripts using additional processing described here https://ghinda.net/article/script-tags/.*/- test("clientOnly === false", async () => {- const ui = <App clientOnly={false} />;+ test.each([false, undefined])("clientOnly === false", async (clientOnly) => {+ const ui = <App clientOnly={clientOnly} />;const container = document.createElement("div");// Server renderingdocument.body.appendChild(container);diff --git a/packages/sdk-components-react/src/html-embed.tsx b/packages/sdk-components-react/src/html-embed.tsxindex 524eccfb95..235746b083 100644--- a/packages/sdk-components-react/src/html-embed.tsx+++ b/packages/sdk-components-react/src/html-embed.tsx@@ -183,7 +183,7 @@ export const HtmlEmbed = forwardRef<HTMLDivElement, HtmlEmbedProps>(if (ssrRendered) {// We are on published site, on server rendering or after hydration- if (clientOnly === false) {+ if (clientOnly !== true) {return <ServerEmbed innerRef={ref} code={code} {...rest} />;}diff --git a/packages/sdk-components-react/src/image.ws.ts b/packages/sdk-components-react/src/image.ws.tsindex 05a391aaf1..25aa41c7a7 100644--- a/packages/sdk-components-react/src/image.ws.ts+++ b/packages/sdk-components-react/src/image.ws.ts@@ -24,6 +24,13 @@ const presetStyle = {property: "display",value: { type: "keyword", value: "block" },},+ // Set image height to "auto" to reduce layout shift, improving compatibility across browsers like Safari.+ // Unlike "fit-content," "auto" preserves the aspect ratio when the width exceeds max-width. (in Safari)+ // See https://web.dev/articles/optimize-cls#best_practice_for_setting_image_dimensions+ {+ property: "height",+ value: { type: "keyword", value: "auto" },+ },],} satisfies PresetStyle<typeof defaultTag>;