ghostfill 0.1.1 → 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.
Potentially problematic release.
This version of ghostfill might be problematic. Click here for more details.
- package/README.md +3 -3
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -985,6 +985,13 @@ var CSS2 = `
|
|
|
985
985
|
padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,0.04);
|
|
986
986
|
}
|
|
987
987
|
.gf-preset-item-name { font-size: 12px; color: rgba(255,255,255,0.7); }
|
|
988
|
+
.gf-preset-actions { display: flex; align-items: center; gap: 2px; }
|
|
989
|
+
.gf-preset-edit {
|
|
990
|
+
background: none; border: none; color: rgba(255,255,255,0.25); cursor: pointer;
|
|
991
|
+
font-size: 14px; padding: 0 2px; line-height: 1; transition: color 0.15s;
|
|
992
|
+
display: flex; align-items: center;
|
|
993
|
+
}
|
|
994
|
+
.gf-preset-edit:hover { color: #6366f1; }
|
|
988
995
|
.gf-preset-del {
|
|
989
996
|
background: none; border: none; color: rgba(255,255,255,0.25); cursor: pointer;
|
|
990
997
|
font-size: 14px; padding: 0 2px; line-height: 1; transition: color 0.15s;
|
|
@@ -1678,6 +1685,19 @@ function createOverlay2(options) {
|
|
|
1678
1685
|
sPresetPrompt.value = p.prompt;
|
|
1679
1686
|
sPresetName.focus();
|
|
1680
1687
|
});
|
|
1688
|
+
const actions = document.createElement("div");
|
|
1689
|
+
actions.className = "gf-preset-actions";
|
|
1690
|
+
const edit = document.createElement("button");
|
|
1691
|
+
edit.className = "gf-preset-edit";
|
|
1692
|
+
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>';
|
|
1693
|
+
edit.title = "Edit preset";
|
|
1694
|
+
edit.addEventListener("click", () => {
|
|
1695
|
+
editingPresetId = p.id;
|
|
1696
|
+
sPresetForm.style.display = "flex";
|
|
1697
|
+
sPresetName.value = p.name;
|
|
1698
|
+
sPresetPrompt.value = p.prompt;
|
|
1699
|
+
sPresetName.focus();
|
|
1700
|
+
});
|
|
1681
1701
|
const del = document.createElement("button");
|
|
1682
1702
|
del.className = "gf-preset-del";
|
|
1683
1703
|
del.innerHTML = "×";
|
|
@@ -1687,7 +1707,8 @@ function createOverlay2(options) {
|
|
|
1687
1707
|
renderPresetList();
|
|
1688
1708
|
updateFillPresetUI();
|
|
1689
1709
|
});
|
|
1690
|
-
|
|
1710
|
+
actions.append(edit, del);
|
|
1711
|
+
item.append(name, actions);
|
|
1691
1712
|
sPresetList.appendChild(item);
|
|
1692
1713
|
});
|
|
1693
1714
|
}
|