diff --git a/plugins/index.json b/plugins/index.json index ffca98a..31768ce 100644 --- a/plugins/index.json +++ b/plugins/index.json @@ -44,10 +44,10 @@ "dir": "promptlib", "main": "main.js", "style": "styles.css", - "version": "1.7.2", + "version": "1.7.3", "files": { - "main.js": "e9e9e63d55068c306030d278721d8d88f2f2c8e65ec64641242ddb8acc37b813", - "styles.css": "e88a2ff725cf1f8ca8abaa7cca35ffb3ffb5a4bbad946e457e5ed7853e4c61e5" + "main.js": "ef57d0b4e274cba0a0869557abdd353508d90e200859b4bcd3d336323b433acf", + "styles.css": "99b48ad82e538f72e0f0c547a30ce2888ef3dbfaea8b5a8c181e42c2f40a754c" } }, { diff --git a/plugins/promptlib/main.js b/plugins/promptlib/main.js index 61f2f10..9f7f1b9 100644 --- a/plugins/promptlib/main.js +++ b/plugins/promptlib/main.js @@ -919,7 +919,18 @@ var bodyEl = el('div', { class: 'iwb-plp-dbody' }) var footEl = el('div', { class: 'iwb-plp-dfooter' }) var grip2 = el('div', { class: 'iwb-plp-resize', title: '拖动调整大小' }) - card.appendChild(head); card.appendChild(bodyEl); card.appendChild(footEl); card.appendChild(grip2) + var hres = el('div', { class: 'iwb-plp-hres', title: '拖动调整弹窗高度' }) + hres.addEventListener('pointerdown', function (e) { + e.preventDefault(); e.stopPropagation() + var sy = e.clientY, oh = live.h + function mv (ev) { + live.h = Math.max(420, Math.min((global.innerHeight || 900) - 40, oh + ev.clientY - sy)) + apply() + } + function up () { global.removeEventListener('pointermove', mv); global.removeEventListener('pointerup', up); saveDlg(key, live) } + global.addEventListener('pointermove', mv); global.addEventListener('pointerup', up) + }) + card.appendChild(head); card.appendChild(hres); card.appendChild(bodyEl); card.appendChild(footEl); card.appendChild(grip2) mask.appendChild(card) document.body.appendChild(mask) var live = { x: box.x, y: box.y, w: box.w, h: box.h } @@ -1702,7 +1713,7 @@ global.IWBPluginHost.register({ id: 'promptlib', name: '提示词库', - version: '1.7.2', + version: '1.7.3', apiVersion: 1, capabilities: ['panels', 'promptlib', 'nodeTypes', 'canvas', 'canvasWrite'], data: { schemaVersion: 3, maxBytes: 4 * 1024 * 1024 }, diff --git a/plugins/promptlib/manifest.json b/plugins/promptlib/manifest.json index 426f522..9a10616 100644 --- a/plugins/promptlib/manifest.json +++ b/plugins/promptlib/manifest.json @@ -1,7 +1,7 @@ { "id": "promptlib", "name": "提示词库", - "version": "1.7.2", + "version": "1.7.3", "apiVersion": 1, "main": "main.js", "style": "styles.css", @@ -13,7 +13,7 @@ "提示词" ], "files": { - "main.js": "e9e9e63d55068c306030d278721d8d88f2f2c8e65ec64641242ddb8acc37b813", - "styles.css": "e88a2ff725cf1f8ca8abaa7cca35ffb3ffb5a4bbad946e457e5ed7853e4c61e5" + "main.js": "ef57d0b4e274cba0a0869557abdd353508d90e200859b4bcd3d336323b433acf", + "styles.css": "99b48ad82e538f72e0f0c547a30ce2888ef3dbfaea8b5a8c181e42c2f40a754c" } } diff --git a/plugins/promptlib/styles.css b/plugins/promptlib/styles.css index 9970a6d..0b77275 100644 --- a/plugins/promptlib/styles.css +++ b/plugins/promptlib/styles.css @@ -444,3 +444,9 @@ body.iwb-plp-dragging, body.iwb-plp-dragging *{user-select:none!important;-webki .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} +.iwb-plp-hres{height:6px;margin:-3px 0 0;cursor:ns-resize;flex:0 0 auto;border-radius:3px} +.iwb-plp-hres:hover{background:#e7e9ee} +/* 正文可见性:textarea 透明,显示下方高亮层 */ +.iwb-plp-dialog .iwb-plp-emid .iwb-plp-ewrap{flex:1 1 auto;min-height:0;position:relative;display:flex;background:#fbfcfd;border:1px solid #eef0f3;border-radius:9px} +.iwb-plp-dialog .iwb-plp-emid .iwb-plp-ewrap .iwb-plp-etext{background:transparent!important;color:transparent!important;border:0!important;box-shadow:none!important;padding:10px 12px} +.iwb-plp-dialog .iwb-plp-hl{padding:10px 12px;font-size:13px;line-height:1.9}