inline-style-editor 1.5.3 → 1.5.4

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.
@@ -5770,9 +5770,21 @@ function InlineStyleEditor$1($$anchor, $$props) {
5770
5770
  } else {
5771
5771
  _allCurrentPropDefs[key].displayed = getComputedPropValue(get(currentElement), key, "raw");
5772
5772
  _allCurrentPropDefs[key].value = getComputedPropValue(get(currentElement), key, retrieveType);
5773
+
5774
+ // Special handling for SVG fill with url() expressions (e.g., gradients)
5775
+ if (key === "fill") {
5776
+ const rawFill = get(currentElement).getAttribute?.("fill") || _allCurrentPropDefs[key].displayed;
5777
+
5778
+ if (rawFill && rawFill.includes("url(")) {
5779
+ _allCurrentPropDefs[key].originalUrl = rawFill;
5780
+ _allCurrentPropDefs[key].value = "#00000000";
5781
+ }
5782
+ }
5773
5783
  }
5774
5784
  });
5775
5785
 
5786
+ console.log(_allCurrentPropDefs);
5787
+
5776
5788
  const _propsByType = Object.entries(_allCurrentPropDefs).reduce(
5777
5789
  (byType, [propName, selectorDef]) => {
5778
5790
  const selectorType = selectorDef.type;
@@ -6099,6 +6111,19 @@ function InlineStyleEditor$1($$anchor, $$props) {
6099
6111
  propDef.value = defaultValue;
6100
6112
  propDef.displayed = defaultValue;
6101
6113
  onStyleChanged(get(currentElement), get(currentRule), propName, defaultValue);
6114
+ } else if (propName === "fill" && propDef?.originalUrl) {
6115
+ // Restore original url() expression for SVG fill
6116
+ const urlValue = propDef.originalUrl;
6117
+
6118
+ if (get(currentRule) === "inline") {
6119
+ get(currentElement).style.fill = urlValue;
6120
+ } else {
6121
+ get(currentRule).style.setProperty("fill", urlValue);
6122
+ }
6123
+
6124
+ propDef.value = "#00000000";
6125
+ propDef.displayed = urlValue;
6126
+ onStyleChanged(get(currentElement), get(currentRule), "fill", urlValue);
6102
6127
  } else {
6103
6128
  // Standard CSS property reset
6104
6129
  if (get(currentRule) === "inline") {