dsh-plugin-inspiration-workbench 0.5.0 → 0.7.0
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/README.md +4 -4
- package/lib/client.js +69 -13
- package/lib/client.js.map +2 -2
- package/package.json +1 -1
- package/src/client/board.js +30 -5
- package/src/client/index.jsx +16 -2
- package/src/client/styles.css +25 -6
package/package.json
CHANGED
package/src/client/board.js
CHANGED
|
@@ -1665,12 +1665,15 @@ export function createBoard({ host, adapter, approvals, t, onOpenSession }) {
|
|
|
1665
1665
|
.replace('{title}', card.title || t('untitled'))
|
|
1666
1666
|
.replace('{time}', canvasStamp())
|
|
1667
1667
|
.replace('{text}', text);
|
|
1668
|
-
|
|
1668
|
+
// 'replace' keeps the note as a single latest block (a summary pane);
|
|
1669
|
+
// 'append' (default) grows a log of every delivery.
|
|
1670
|
+
const replace = target.write === 'replace';
|
|
1671
|
+
area.value = replace ? block : area.value.trim() ? area.value.replace(/\s*$/, '\n\n') + block : block;
|
|
1669
1672
|
area.dispatchEvent(new Event('input', { bubbles: true }));
|
|
1670
1673
|
targetCard.pipeDepth = depth;
|
|
1671
1674
|
card.pipedFingerprints[key] = fingerprint;
|
|
1672
1675
|
ensureVisible(targetCard);
|
|
1673
|
-
toast(t('pipe.noted').replace('{name}', targetCard.title || t('untitled')));
|
|
1676
|
+
toast(t(replace ? 'pipe.notedReplaced' : 'pipe.noted').replace('{name}', targetCard.title || t('untitled')));
|
|
1674
1677
|
continue;
|
|
1675
1678
|
}
|
|
1676
1679
|
|
|
@@ -1743,9 +1746,31 @@ export function createBoard({ host, adapter, approvals, t, onOpenSession }) {
|
|
|
1743
1746
|
pop.appendChild(row);
|
|
1744
1747
|
}
|
|
1745
1748
|
} else {
|
|
1746
|
-
const
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
+
const write = target.write === 'replace' ? 'replace' : 'append';
|
|
1750
|
+
const writes = [
|
|
1751
|
+
{ id: 'append', label: t('pipe.noteAppend'), hint: t('pipe.noteAppendHint') },
|
|
1752
|
+
{ id: 'replace', label: t('pipe.noteReplace'), hint: t('pipe.noteReplaceHint') },
|
|
1753
|
+
];
|
|
1754
|
+
for (const option of writes) {
|
|
1755
|
+
const row = el('button', 'iwb-model-row' + (write === option.id ? ' current' : ''));
|
|
1756
|
+
row.type = 'button';
|
|
1757
|
+
row.innerHTML = '<span class="iwb-model-main"><span class="iwb-model-name"></span><span class="iwb-model-desc"></span></span>' + (write === option.id ? '<span class="iwb-check">✓</span>' : '');
|
|
1758
|
+
row.querySelector('.iwb-model-name').textContent = option.label;
|
|
1759
|
+
row.querySelector('.iwb-model-desc').textContent = option.hint;
|
|
1760
|
+
row.addEventListener('click', (event) => {
|
|
1761
|
+
event.stopPropagation();
|
|
1762
|
+
const targets = pipeTargets(card).map((entry) =>
|
|
1763
|
+
entry.kind === target.kind && entry.id === target.id ? { ...entry, write: option.id } : entry
|
|
1764
|
+
);
|
|
1765
|
+
setPipeTargets(card, targets);
|
|
1766
|
+
renderPipeBadge(card);
|
|
1767
|
+
schedulePipelines();
|
|
1768
|
+
saveSoon();
|
|
1769
|
+
closePipeMenu();
|
|
1770
|
+
toast(option.id === 'replace' ? t('pipe.modeReplace') : t('pipe.modeAppend'));
|
|
1771
|
+
});
|
|
1772
|
+
pop.appendChild(row);
|
|
1773
|
+
}
|
|
1749
1774
|
}
|
|
1750
1775
|
|
|
1751
1776
|
const remove = el('button', 'iwb-model-row iwb-link-remove');
|
package/src/client/index.jsx
CHANGED
|
@@ -130,7 +130,14 @@ const zh = {
|
|
|
130
130
|
'pipe.noted': '结果已追加到便签「{name}」',
|
|
131
131
|
'pipe.noteBlock': '## 来自「{title}」 · {time}\n\n{text}',
|
|
132
132
|
'pipe.noteTarget': '流水线 → 便签',
|
|
133
|
-
'pipe.noteHint': '
|
|
133
|
+
'pipe.noteHint': '下游是便签:跑完把结果写进去,不发送',
|
|
134
|
+
'pipe.noteAppend': '追加到便签',
|
|
135
|
+
'pipe.noteAppendHint': '每轮都接在后面,像日志',
|
|
136
|
+
'pipe.noteReplace': '只保留最新一段',
|
|
137
|
+
'pipe.noteReplaceHint': '覆盖旧内容,当汇总栏用',
|
|
138
|
+
'pipe.modeAppend': '便签:追加模式',
|
|
139
|
+
'pipe.modeReplace': '便签:只保留最新一段',
|
|
140
|
+
'pipe.notedReplaced': '已覆盖便签「{name}」为最新结果',
|
|
134
141
|
'pipe.removeNote': '删除这条便签流水线',
|
|
135
142
|
'pipe.port': '拖这条线到另一张卡,建立流水线',
|
|
136
143
|
'pipe.created': '流水线已连到「{name}」',
|
|
@@ -423,7 +430,14 @@ const en = {
|
|
|
423
430
|
'pipe.noted': 'Result appended to note “{name}”',
|
|
424
431
|
'pipe.noteBlock': '## From “{title}” · {time}\n\n{text}',
|
|
425
432
|
'pipe.noteTarget': 'Pipeline → note',
|
|
426
|
-
'pipe.noteHint': 'Note downstream: the result is
|
|
433
|
+
'pipe.noteHint': 'Note downstream: the result is written into the note, never sent',
|
|
434
|
+
'pipe.noteAppend': 'Append to the note',
|
|
435
|
+
'pipe.noteAppendHint': 'Keep every run, like a log',
|
|
436
|
+
'pipe.noteReplace': 'Keep only the latest',
|
|
437
|
+
'pipe.noteReplaceHint': 'Overwrite, for a summary pane',
|
|
438
|
+
'pipe.modeAppend': 'Note: append mode',
|
|
439
|
+
'pipe.modeReplace': 'Note: keep only the latest',
|
|
440
|
+
'pipe.notedReplaced': 'Note “{name}” replaced with the latest result',
|
|
427
441
|
'pipe.removeNote': 'Remove this note pipeline',
|
|
428
442
|
'pipe.port': 'Drag this line onto another card to wire a pipeline',
|
|
429
443
|
'pipe.created': 'Pipeline wired to “{name}”',
|
package/src/client/styles.css
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
@keyframes iwb-sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
|
|
103
103
|
|
|
104
104
|
.iwb-head {
|
|
105
|
-
flex: 0 0 auto; height:
|
|
105
|
+
flex: 0 0 auto; height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px;
|
|
106
106
|
border-bottom: .5px solid var(--dsw-alias-border-l1); cursor: grab; user-select: none;
|
|
107
107
|
}
|
|
108
108
|
.iwb-dragging .iwb-head { cursor: grabbing; }
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
}
|
|
160
160
|
.iwb-dot.waiting { background: var(--dsw-alias-state-warn-primary); box-shadow: none; }
|
|
161
161
|
.iwb-card-workspace {
|
|
162
|
-
flex: 0
|
|
162
|
+
flex: 0 1 auto; max-width: 78px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
163
163
|
font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 5px;
|
|
164
164
|
color: var(--dsw-alias-label-tertiary); background: var(--dsw-alias-bg-layer-2);
|
|
165
165
|
border: .5px solid var(--dsw-alias-border-l2);
|
|
@@ -197,12 +197,15 @@
|
|
|
197
197
|
.iwb-model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
198
198
|
.iwb-model-desc { font-size: 10.5px; color: var(--dsw-alias-label-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
199
199
|
.iwb-check { flex: 0 0 auto; font-size: 11px; color: var(--dsw-alias-label-deep-diving); width: 12px; }
|
|
200
|
-
.iwb-elapsed { font-size: 10px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
|
|
200
|
+
.iwb-elapsed { font-size: 10px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; flex: 0 0 auto; opacity: .85; }
|
|
201
201
|
.iwb-stack-badge {
|
|
202
202
|
font-size: 10px; line-height: 15px; padding: 0 4px; flex: 0 0 auto; color: var(--dsw-alias-label-secondary);
|
|
203
203
|
background: var(--dsw-alias-bg-layer-2); border: .5px solid var(--dsw-alias-border-l2); border-radius: 5px;
|
|
204
204
|
}
|
|
205
|
-
.iwb-actions {
|
|
205
|
+
.iwb-actions {
|
|
206
|
+
display: flex; gap: 4px; flex: 0 0 auto; opacity: .92; transition: opacity .12s;
|
|
207
|
+
margin-left: 1px; padding-left: 6px; border-left: .5px solid var(--dsw-alias-border-l1);
|
|
208
|
+
}
|
|
206
209
|
.iwb-card:hover .iwb-actions,
|
|
207
210
|
.iwb-card:focus-within .iwb-actions,
|
|
208
211
|
.iwb-card.iwb-focus .iwb-actions { opacity: 1; }
|
|
@@ -216,6 +219,7 @@
|
|
|
216
219
|
color: var(--dsw-alias-label-secondary); background: none; border: 0; cursor: pointer;
|
|
217
220
|
}
|
|
218
221
|
.iwb-actions button:hover { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }
|
|
222
|
+
.iwb-actions svg { width: 15px; height: 15px; }
|
|
219
223
|
.iwb-actions button:focus-visible { outline: 2px solid var(--dsw-alias-label-deep-diving); outline-offset: -1px; }
|
|
220
224
|
|
|
221
225
|
.iwb-body {
|
|
@@ -468,7 +472,7 @@
|
|
|
468
472
|
.iwb-links path.iwb-link-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
|
|
469
473
|
.iwb-links path.iwb-link-temp { fill: none; stroke: var(--dsw-alias-label-deep-diving); stroke-width: 2; stroke-dasharray: 5 4; opacity: .9; }
|
|
470
474
|
.iwb-port {
|
|
471
|
-
position: absolute; right: -
|
|
475
|
+
position: absolute; right: -5px; top: 33px; width: 12px; height: 12px;
|
|
472
476
|
border-radius: 50%; border: 1.5px solid var(--dsw-alias-label-deep-diving);
|
|
473
477
|
background: var(--dsw-alias-bg-layer-1); cursor: crosshair;
|
|
474
478
|
opacity: .55; transition: opacity .12s, transform .12s; z-index: 3;
|
|
@@ -476,7 +480,7 @@
|
|
|
476
480
|
.iwb-card:hover .iwb-port, .iwb-card.iwb-focus .iwb-port, .iwb-port:hover { opacity: 1; }
|
|
477
481
|
.iwb-port::after {
|
|
478
482
|
content: "→"; position: absolute; inset: 0; display: grid; place-items: center;
|
|
479
|
-
font-size:
|
|
483
|
+
font-size: 8px; line-height: 1; color: var(--dsw-alias-label-deep-diving);
|
|
480
484
|
}
|
|
481
485
|
.iwb-card.iwb-link-target { outline: 2px dashed var(--dsw-alias-label-deep-diving); outline-offset: 3px; }
|
|
482
486
|
.iwb-card-note.iwb-link-target { outline-style: solid; }
|
|
@@ -528,6 +532,21 @@
|
|
|
528
532
|
.iwb-card.iwb-selected .iwb-head { border-bottom-color: color-mix(in srgb, var(--dsw-alias-label-deep-diving) 55%, transparent); }
|
|
529
533
|
.iwb-arrange { min-width: 190px; }
|
|
530
534
|
|
|
535
|
+
/* ── narrow cards: keep the header breathable ─────────────────────── */
|
|
536
|
+
.iwb-card { container-type: inline-size; }
|
|
537
|
+
@container (max-width: 430px) {
|
|
538
|
+
.iwb-head { gap: 6px; padding-right: 6px; }
|
|
539
|
+
.iwb-card-workspace { display: none; }
|
|
540
|
+
.iwb-meta { max-width: 96px; }
|
|
541
|
+
.iwb-pipe-badge { max-width: 68px; }
|
|
542
|
+
.iwb-actions { gap: 3px; padding-left: 4px; }
|
|
543
|
+
}
|
|
544
|
+
@container (max-width: 355px) {
|
|
545
|
+
.iwb-elapsed { display: none; }
|
|
546
|
+
.iwb-meta { max-width: 78px; }
|
|
547
|
+
.iwb-actions button { width: 21px; height: 21px; }
|
|
548
|
+
}
|
|
549
|
+
|
|
531
550
|
/* ── keyboard focus ───────────────────────────────────────────────── */
|
|
532
551
|
.iwb-card { outline: none; }
|
|
533
552
|
.iwb-card.iwb-focus,
|