@elementor/editor-controls 4.1.0-736 → 4.1.0-738

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4006,7 +4006,7 @@ var AspectRatioControl = createControl(({ label }) => {
4006
4006
  import * as React71 from "react";
4007
4007
  import { useState as useState14 } from "react";
4008
4008
  import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
4009
- import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
4009
+ import { svgSrcPropTypeUtil, urlPropTypeUtil as urlPropTypeUtil3 } from "@elementor/editor-props";
4010
4010
  import { UploadIcon as UploadIcon2 } from "@elementor/icons";
4011
4011
  import { Button as Button4, Card as Card2, CardMedia as CardMedia2, CardOverlay as CardOverlay2, CircularProgress as CircularProgress3, Stack as Stack13, styled as styled7, ThemeProvider } from "@elementor/ui";
4012
4012
  import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWpMediaFrame2 } from "@elementor/wp-media";
@@ -4098,8 +4098,9 @@ var StyledCardMediaContainer = styled7(Stack13)`
4098
4098
  var MODE_BROWSE = { mode: "browse" };
4099
4099
  var MODE_UPLOAD = { mode: "upload" };
4100
4100
  var SvgMediaControl = createControl(() => {
4101
- const { value, setValue } = useBoundProp(imageSrcPropTypeUtil2);
4102
- const { id, url } = value ?? {};
4101
+ const { value, setValue } = useBoundProp(svgSrcPropTypeUtil);
4102
+ const id = value?.id;
4103
+ const url = value?.url;
4103
4104
  const { data: attachment, isFetching } = useWpMediaAttachment2(id?.value || null);
4104
4105
  const src = attachment?.url ?? url?.value ?? null;
4105
4106
  const { data: allowSvgUpload } = useUnfilteredFilesUpload();
@@ -4115,7 +4116,7 @@ var SvgMediaControl = createControl(() => {
4115
4116
  $$type: "image-attachment-id",
4116
4117
  value: selectedAttachment.id
4117
4118
  },
4118
- url: null
4119
+ url: urlPropTypeUtil3.create(selectedAttachment.url)
4119
4120
  });
4120
4121
  }
4121
4122
  });