ghostfill 0.1.2 → 0.1.3

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.js CHANGED
@@ -1012,6 +1012,13 @@ var CSS2 = `
1012
1012
  padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,0.04);
1013
1013
  }
1014
1014
  .gf-preset-item-name { font-size: 12px; color: rgba(255,255,255,0.7); }
1015
+ .gf-preset-actions { display: flex; align-items: center; gap: 2px; }
1016
+ .gf-preset-edit {
1017
+ background: none; border: none; color: rgba(255,255,255,0.25); cursor: pointer;
1018
+ font-size: 14px; padding: 0 2px; line-height: 1; transition: color 0.15s;
1019
+ display: flex; align-items: center;
1020
+ }
1021
+ .gf-preset-edit:hover { color: #6366f1; }
1015
1022
  .gf-preset-del {
1016
1023
  background: none; border: none; color: rgba(255,255,255,0.25); cursor: pointer;
1017
1024
  font-size: 14px; padding: 0 2px; line-height: 1; transition: color 0.15s;
@@ -1705,6 +1712,19 @@ function createOverlay2(options) {
1705
1712
  sPresetPrompt.value = p.prompt;
1706
1713
  sPresetName.focus();
1707
1714
  });
1715
+ const actions = document.createElement("div");
1716
+ actions.className = "gf-preset-actions";
1717
+ const edit = document.createElement("button");
1718
+ edit.className = "gf-preset-edit";
1719
+ edit.innerHTML = '<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.85 0 114 4L7.5 20.5 2 22l1.5-5.5z"/></svg>';
1720
+ edit.title = "Edit preset";
1721
+ edit.addEventListener("click", () => {
1722
+ editingPresetId = p.id;
1723
+ sPresetForm.style.display = "flex";
1724
+ sPresetName.value = p.name;
1725
+ sPresetPrompt.value = p.prompt;
1726
+ sPresetName.focus();
1727
+ });
1708
1728
  const del = document.createElement("button");
1709
1729
  del.className = "gf-preset-del";
1710
1730
  del.innerHTML = "&times;";
@@ -1714,7 +1734,8 @@ function createOverlay2(options) {
1714
1734
  renderPresetList();
1715
1735
  updateFillPresetUI();
1716
1736
  });
1717
- item.append(name, del);
1737
+ actions.append(edit, del);
1738
+ item.append(name, actions);
1718
1739
  sPresetList.appendChild(item);
1719
1740
  });
1720
1741
  }