chore(plugins): promptlib 1.7.2 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 50s

This commit is contained in:
qiqi committed 2026-11-22 23:08:34 +08:00
1 parent dd58e4a7b5
commit 0e80c55adf
4 files changed
+37 -9

No files matched your search

+3 -3
View File
@@ -44,10 +44,10 @@
"dir": "promptlib",
"main": "main.js",
"style": "styles.css",
"version": "1.7.1",
"version": "1.7.2",
"files": {
"main.js": "2451ffb4d5097332e6478f30161c7a60f00e6f65ed9a0134cabc80db3d7a9f2c",
"styles.css": "152ea047caf7ea4cbbf7157cacd94a5e24c40f0c07e27bf8f73b33e369aec15a"
"main.js": "e9e9e63d55068c306030d278721d8d88f2f2c8e65ec64641242ddb8acc37b813",
"styles.css": "e88a2ff725cf1f8ca8abaa7cca35ffb3ffb5a4bbad946e457e5ed7853e4c61e5"
}
},
{
+21 -3
View File
@@ -1466,11 +1466,29 @@
left.appendChild(el('label', { class: 'iwb-plp-lrow' }, el('span', { text: '分组' }), groupIn))
left.appendChild(el('label', { class: 'iwb-plp-lrow' }, el('span', { text: '标签' }), tagsIn))
var textIn = el('textarea', { class: 'iwb-input iwb-plp-etext', placeholder: '提示词正文' })
var hl = el('div', { class: 'iwb-plp-hl' })
var textWrap = el('div', { class: 'iwb-plp-ewrap' })
textWrap.appendChild(hl); textWrap.appendChild(textIn)
function paintHl () {
var v = textIn.value || ''
hl.textContent = ''
var re = /[{]([^{}]{1,24})[}]/g, last = 0, m
while ((m = re.exec(v))) {
if (m.index > last) hl.appendChild(document.createTextNode(v.slice(last, m.index)))
hl.appendChild(el('span', { class: 'iwb-plp-hlvar', text: m[0] }))
last = m.index + m[0].length
}
if (last < v.length) hl.appendChild(document.createTextNode(v.slice(last)))
hl.appendChild(document.createTextNode('\n'))
}
textIn.addEventListener('scroll', function () { hl.scrollTop = textIn.scrollTop })
textIn.value = draft.text || ''
var varEd = makeVarsEditor(draft.text || '', draft.vars || [], function (nt) { textIn.value = nt; dirty = true })
paintHl()
var varEd = makeVarsEditor(draft.text || '', draft.vars || [], function (nt) { textIn.value = nt; dirty = true; paintHl() })
var syncTimer = 0
textIn.addEventListener('input', function () {
dirty = true
paintHl()
if (syncTimer) clearTimeout(syncTimer)
syncTimer = setTimeout(function () { varEd.sync(textIn.value) }, 200)
})
@@ -1492,7 +1510,7 @@
})
var mid = el('div', { class: 'iwb-plp-emid' })
mid.appendChild(el('div', { class: 'iwb-plp-etool' }, insVarBtn, el('span', { class: 'iwb-hint', text: '在光标处插入 {变量},并自动聚焦变量名' })))
mid.appendChild(textIn)
mid.appendChild(textWrap)
var split = el('div', { class: 'iwb-plp-esplit', title: '拖动调整变量列宽度' })
var right = el('div', { class: 'iwb-plp-eright' })
right.appendChild(varEd.node)
@@ -1684,7 +1702,7 @@
global.IWBPluginHost.register({
id: 'promptlib',
name: '提示词库',
version: '1.7.1',
version: '1.7.2',
apiVersion: 1,
capabilities: ['panels', 'promptlib', 'nodeTypes', 'canvas', 'canvasWrite'],
data: { schemaVersion: 3, maxBytes: 4 * 1024 * 1024 },
+3 -3
View File
@@ -1,7 +1,7 @@
{
"id": "promptlib",
"name": "提示词库",
"version": "1.7.1",
"version": "1.7.2",
"apiVersion": 1,
"main": "main.js",
"style": "styles.css",
@@ -13,7 +13,7 @@
"提示词"
],
"files": {
"main.js": "2451ffb4d5097332e6478f30161c7a60f00e6f65ed9a0134cabc80db3d7a9f2c",
"styles.css": "152ea047caf7ea4cbbf7157cacd94a5e24c40f0c07e27bf8f73b33e369aec15a"
"main.js": "e9e9e63d55068c306030d278721d8d88f2f2c8e65ec64641242ddb8acc37b813",
"styles.css": "e88a2ff725cf1f8ca8abaa7cca35ffb3ffb5a4bbad946e457e5ed7853e4c61e5"
}
}
+10
View File
@@ -434,3 +434,13 @@ body.iwb-plp-dragging, body.iwb-plp-dragging *{user-select:none!important;-webki
.iwb-plp-dialog .iwb-plp-lrow span{color:#8a919c;font-size:11.5px}
.iwb-plp-dialog .iwb-plp-lrow .iwb-input{background:#fbfcfd;border:1px solid #eceef2;border-radius:8px;height:32px}
.iwb-plp-dialog .iwb-plp-lrow .iwb-input:focus{background:#fff;border-color:#cfc3ff}
/* v1.7.2:正文变量高亮(黑粗)+ 说明灰按钮 + 说明背景回归面板底 */
.iwb-plp-ewrap{position:relative;flex:1 1 auto;min-height:0;display:flex;border-radius:9px;background:#fbfcfd;border:1px solid #eef0f3}
.iwb-plp-ewrap:focus-within{background:#fff;border-color:#cfc3ff;box-shadow:0 0 0 3px rgba(107,77,255,.08)}
.iwb-plp-ewrap .iwb-plp-etext{flex:1 1 auto;min-height:0;border:0;background:transparent;box-shadow:none;color:transparent;caret-color:#1d2129;position:relative;z-index:1;resize:none}
.iwb-plp-ewrap .iwb-plp-etext:focus{background:transparent;border:0;box-shadow:none}
.iwb-plp-hl{position:absolute;inset:0;padding:10px 12px;overflow:hidden;white-space:pre-wrap;word-wrap:break-word;font-size:13px;line-height:1.9;color:#5b6472;pointer-events:none;z-index:0}
.iwb-plp-hlvar{color:#1d2129;font-weight:600}
.iwb-plp-dialog .iwb-plp-vi.is-open{background:#eef0f3;color:#5b6472}
.iwb-plp-dialog .iwb-plp-vdesc{background:transparent;border:1px dashed #dfe3e9}
.iwb-plp-dvar{background:transparent;color:#1d2129;font-weight:600;padding:0}