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/README.md
CHANGED
|
@@ -38,9 +38,9 @@ DSH 一次只能打开一个会话:想同时看三条线的进展,只能来
|
|
|
38
38
|
|---|---|
|
|
39
39
|
|  |  |
|
|
40
40
|
|
|
41
|
-
| 便签投递带标题和时间戳 |
|
|
42
|
-
|
|
43
|
-
|  |
|
|
41
|
+
| 便签投递带标题和时间戳 | 便签可设为「只保留最新」 |
|
|
42
|
+
|---|---|
|
|
43
|
+
|  |  |
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
@@ -50,7 +50,7 @@ DSH 一次只能打开一个会话:想同时看三条线的进展,只能来
|
|
|
50
50
|
- 侧栏会话行的 `+` 把会话加成卡片;侧栏点击行为不变
|
|
51
51
|
- 拖动 / 缩放 / 叠成一摞 / 双击居中 / 点空白平移 / ⌘+滚轮缩放
|
|
52
52
|
- **命名画布**:保存当前这面墙、切换回之前保存的画布、覆盖 / 删除;数据存 Host,刷新不丢
|
|
53
|
-
- **流水线**:从卡片右侧端口拖一条线到另一张卡即建立;**一条卡可连多个下游**(扇出),下游可以是会话卡,也可以是**便签卡**(结果按 `## 来自「卡片名」 · 时间`
|
|
53
|
+
- **流水线**:从卡片右侧端口拖一条线到另一张卡即建立;**一条卡可连多个下游**(扇出),下游可以是会话卡,也可以是**便签卡**(结果按 `## 来自「卡片名」 · 时间` 分块写入;便签可选「追加」或「只保留最新一段」);点连线切换「自动发送 / 只填草稿」或删除
|
|
54
54
|
- 卡片头部操作常驻显示(流水线 / 大纲 / 搜索 / ⋯ / 关闭),次要操作用「⋯」收纳,窄卡片也不挤
|
|
55
55
|
- 便签卡(随手记)、钉住位置、未读圆点、复制为 Markdown、在原生会话打开
|
|
56
56
|
|
package/lib/client.js
CHANGED
|
@@ -142,7 +142,7 @@ var styles_default = `/* Inspiration workbench \u2014 scoped to .iwb-root; colou
|
|
|
142
142
|
@keyframes iwb-sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
|
|
143
143
|
|
|
144
144
|
.iwb-head {
|
|
145
|
-
flex: 0 0 auto; height:
|
|
145
|
+
flex: 0 0 auto; height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px;
|
|
146
146
|
border-bottom: .5px solid var(--dsw-alias-border-l1); cursor: grab; user-select: none;
|
|
147
147
|
}
|
|
148
148
|
.iwb-dragging .iwb-head { cursor: grabbing; }
|
|
@@ -199,7 +199,7 @@ var styles_default = `/* Inspiration workbench \u2014 scoped to .iwb-root; colou
|
|
|
199
199
|
}
|
|
200
200
|
.iwb-dot.waiting { background: var(--dsw-alias-state-warn-primary); box-shadow: none; }
|
|
201
201
|
.iwb-card-workspace {
|
|
202
|
-
flex: 0
|
|
202
|
+
flex: 0 1 auto; max-width: 78px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
203
203
|
font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 5px;
|
|
204
204
|
color: var(--dsw-alias-label-tertiary); background: var(--dsw-alias-bg-layer-2);
|
|
205
205
|
border: .5px solid var(--dsw-alias-border-l2);
|
|
@@ -237,12 +237,15 @@ var styles_default = `/* Inspiration workbench \u2014 scoped to .iwb-root; colou
|
|
|
237
237
|
.iwb-model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
238
238
|
.iwb-model-desc { font-size: 10.5px; color: var(--dsw-alias-label-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
239
239
|
.iwb-check { flex: 0 0 auto; font-size: 11px; color: var(--dsw-alias-label-deep-diving); width: 12px; }
|
|
240
|
-
.iwb-elapsed { font-size: 10px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
|
|
240
|
+
.iwb-elapsed { font-size: 10px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; flex: 0 0 auto; opacity: .85; }
|
|
241
241
|
.iwb-stack-badge {
|
|
242
242
|
font-size: 10px; line-height: 15px; padding: 0 4px; flex: 0 0 auto; color: var(--dsw-alias-label-secondary);
|
|
243
243
|
background: var(--dsw-alias-bg-layer-2); border: .5px solid var(--dsw-alias-border-l2); border-radius: 5px;
|
|
244
244
|
}
|
|
245
|
-
.iwb-actions {
|
|
245
|
+
.iwb-actions {
|
|
246
|
+
display: flex; gap: 4px; flex: 0 0 auto; opacity: .92; transition: opacity .12s;
|
|
247
|
+
margin-left: 1px; padding-left: 6px; border-left: .5px solid var(--dsw-alias-border-l1);
|
|
248
|
+
}
|
|
246
249
|
.iwb-card:hover .iwb-actions,
|
|
247
250
|
.iwb-card:focus-within .iwb-actions,
|
|
248
251
|
.iwb-card.iwb-focus .iwb-actions { opacity: 1; }
|
|
@@ -256,6 +259,7 @@ var styles_default = `/* Inspiration workbench \u2014 scoped to .iwb-root; colou
|
|
|
256
259
|
color: var(--dsw-alias-label-secondary); background: none; border: 0; cursor: pointer;
|
|
257
260
|
}
|
|
258
261
|
.iwb-actions button:hover { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }
|
|
262
|
+
.iwb-actions svg { width: 15px; height: 15px; }
|
|
259
263
|
.iwb-actions button:focus-visible { outline: 2px solid var(--dsw-alias-label-deep-diving); outline-offset: -1px; }
|
|
260
264
|
|
|
261
265
|
.iwb-body {
|
|
@@ -508,7 +512,7 @@ var styles_default = `/* Inspiration workbench \u2014 scoped to .iwb-root; colou
|
|
|
508
512
|
.iwb-links path.iwb-link-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
|
|
509
513
|
.iwb-links path.iwb-link-temp { fill: none; stroke: var(--dsw-alias-label-deep-diving); stroke-width: 2; stroke-dasharray: 5 4; opacity: .9; }
|
|
510
514
|
.iwb-port {
|
|
511
|
-
position: absolute; right: -
|
|
515
|
+
position: absolute; right: -5px; top: 33px; width: 12px; height: 12px;
|
|
512
516
|
border-radius: 50%; border: 1.5px solid var(--dsw-alias-label-deep-diving);
|
|
513
517
|
background: var(--dsw-alias-bg-layer-1); cursor: crosshair;
|
|
514
518
|
opacity: .55; transition: opacity .12s, transform .12s; z-index: 3;
|
|
@@ -516,7 +520,7 @@ var styles_default = `/* Inspiration workbench \u2014 scoped to .iwb-root; colou
|
|
|
516
520
|
.iwb-card:hover .iwb-port, .iwb-card.iwb-focus .iwb-port, .iwb-port:hover { opacity: 1; }
|
|
517
521
|
.iwb-port::after {
|
|
518
522
|
content: "\u2192"; position: absolute; inset: 0; display: grid; place-items: center;
|
|
519
|
-
font-size:
|
|
523
|
+
font-size: 8px; line-height: 1; color: var(--dsw-alias-label-deep-diving);
|
|
520
524
|
}
|
|
521
525
|
.iwb-card.iwb-link-target { outline: 2px dashed var(--dsw-alias-label-deep-diving); outline-offset: 3px; }
|
|
522
526
|
.iwb-card-note.iwb-link-target { outline-style: solid; }
|
|
@@ -568,6 +572,21 @@ var styles_default = `/* Inspiration workbench \u2014 scoped to .iwb-root; colou
|
|
|
568
572
|
.iwb-card.iwb-selected .iwb-head { border-bottom-color: color-mix(in srgb, var(--dsw-alias-label-deep-diving) 55%, transparent); }
|
|
569
573
|
.iwb-arrange { min-width: 190px; }
|
|
570
574
|
|
|
575
|
+
/* \u2500\u2500 narrow cards: keep the header breathable \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
576
|
+
.iwb-card { container-type: inline-size; }
|
|
577
|
+
@container (max-width: 430px) {
|
|
578
|
+
.iwb-head { gap: 6px; padding-right: 6px; }
|
|
579
|
+
.iwb-card-workspace { display: none; }
|
|
580
|
+
.iwb-meta { max-width: 96px; }
|
|
581
|
+
.iwb-pipe-badge { max-width: 68px; }
|
|
582
|
+
.iwb-actions { gap: 3px; padding-left: 4px; }
|
|
583
|
+
}
|
|
584
|
+
@container (max-width: 355px) {
|
|
585
|
+
.iwb-elapsed { display: none; }
|
|
586
|
+
.iwb-meta { max-width: 78px; }
|
|
587
|
+
.iwb-actions button { width: 21px; height: 21px; }
|
|
588
|
+
}
|
|
589
|
+
|
|
571
590
|
/* \u2500\u2500 keyboard focus \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
572
591
|
.iwb-card { outline: none; }
|
|
573
592
|
.iwb-card.iwb-focus,
|
|
@@ -3968,12 +3987,13 @@ function createBoard({ host, adapter, approvals, t: t2, onOpenSession }) {
|
|
|
3968
3987
|
const area = targetCard.el?.querySelector(".iwb-note-input");
|
|
3969
3988
|
if (!area) continue;
|
|
3970
3989
|
const block = t2("pipe.noteBlock").replace("{title}", card.title || t2("untitled")).replace("{time}", canvasStamp()).replace("{text}", text);
|
|
3971
|
-
|
|
3990
|
+
const replace = target.write === "replace";
|
|
3991
|
+
area.value = replace ? block : area.value.trim() ? area.value.replace(/\s*$/, "\n\n") + block : block;
|
|
3972
3992
|
area.dispatchEvent(new Event("input", { bubbles: true }));
|
|
3973
3993
|
targetCard.pipeDepth = depth;
|
|
3974
3994
|
card.pipedFingerprints[key] = fingerprint;
|
|
3975
3995
|
ensureVisible(targetCard);
|
|
3976
|
-
toast(t2("pipe.noted").replace("{name}", targetCard.title || t2("untitled")));
|
|
3996
|
+
toast(t2(replace ? "pipe.notedReplaced" : "pipe.noted").replace("{name}", targetCard.title || t2("untitled")));
|
|
3977
3997
|
continue;
|
|
3978
3998
|
}
|
|
3979
3999
|
if (target.mode === "draft") {
|
|
@@ -4041,9 +4061,31 @@ function createBoard({ host, adapter, approvals, t: t2, onOpenSession }) {
|
|
|
4041
4061
|
pop.appendChild(row);
|
|
4042
4062
|
}
|
|
4043
4063
|
} else {
|
|
4044
|
-
const
|
|
4045
|
-
|
|
4046
|
-
|
|
4064
|
+
const write = target.write === "replace" ? "replace" : "append";
|
|
4065
|
+
const writes = [
|
|
4066
|
+
{ id: "append", label: t2("pipe.noteAppend"), hint: t2("pipe.noteAppendHint") },
|
|
4067
|
+
{ id: "replace", label: t2("pipe.noteReplace"), hint: t2("pipe.noteReplaceHint") }
|
|
4068
|
+
];
|
|
4069
|
+
for (const option of writes) {
|
|
4070
|
+
const row = el("button", "iwb-model-row" + (write === option.id ? " current" : ""));
|
|
4071
|
+
row.type = "button";
|
|
4072
|
+
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">\u2713</span>' : "");
|
|
4073
|
+
row.querySelector(".iwb-model-name").textContent = option.label;
|
|
4074
|
+
row.querySelector(".iwb-model-desc").textContent = option.hint;
|
|
4075
|
+
row.addEventListener("click", (event) => {
|
|
4076
|
+
event.stopPropagation();
|
|
4077
|
+
const targets = pipeTargets(card).map(
|
|
4078
|
+
(entry) => entry.kind === target.kind && entry.id === target.id ? { ...entry, write: option.id } : entry
|
|
4079
|
+
);
|
|
4080
|
+
setPipeTargets(card, targets);
|
|
4081
|
+
renderPipeBadge(card);
|
|
4082
|
+
schedulePipelines();
|
|
4083
|
+
saveSoon();
|
|
4084
|
+
closePipeMenu();
|
|
4085
|
+
toast(option.id === "replace" ? t2("pipe.modeReplace") : t2("pipe.modeAppend"));
|
|
4086
|
+
});
|
|
4087
|
+
pop.appendChild(row);
|
|
4088
|
+
}
|
|
4047
4089
|
}
|
|
4048
4090
|
const remove = el("button", "iwb-model-row iwb-link-remove");
|
|
4049
4091
|
remove.type = "button";
|
|
@@ -6222,7 +6264,14 @@ var zh = {
|
|
|
6222
6264
|
"pipe.noted": "\u7ED3\u679C\u5DF2\u8FFD\u52A0\u5230\u4FBF\u7B7E\u300C{name}\u300D",
|
|
6223
6265
|
"pipe.noteBlock": "## \u6765\u81EA\u300C{title}\u300D \xB7 {time}\n\n{text}",
|
|
6224
6266
|
"pipe.noteTarget": "\u6D41\u6C34\u7EBF \u2192 \u4FBF\u7B7E",
|
|
6225
|
-
"pipe.noteHint": "\u4E0B\u6E38\u662F\u4FBF\u7B7E\uFF1A\u8DD1\u5B8C\u628A\u7ED3\u679C\
|
|
6267
|
+
"pipe.noteHint": "\u4E0B\u6E38\u662F\u4FBF\u7B7E\uFF1A\u8DD1\u5B8C\u628A\u7ED3\u679C\u5199\u8FDB\u53BB\uFF0C\u4E0D\u53D1\u9001",
|
|
6268
|
+
"pipe.noteAppend": "\u8FFD\u52A0\u5230\u4FBF\u7B7E",
|
|
6269
|
+
"pipe.noteAppendHint": "\u6BCF\u8F6E\u90FD\u63A5\u5728\u540E\u9762\uFF0C\u50CF\u65E5\u5FD7",
|
|
6270
|
+
"pipe.noteReplace": "\u53EA\u4FDD\u7559\u6700\u65B0\u4E00\u6BB5",
|
|
6271
|
+
"pipe.noteReplaceHint": "\u8986\u76D6\u65E7\u5185\u5BB9\uFF0C\u5F53\u6C47\u603B\u680F\u7528",
|
|
6272
|
+
"pipe.modeAppend": "\u4FBF\u7B7E\uFF1A\u8FFD\u52A0\u6A21\u5F0F",
|
|
6273
|
+
"pipe.modeReplace": "\u4FBF\u7B7E\uFF1A\u53EA\u4FDD\u7559\u6700\u65B0\u4E00\u6BB5",
|
|
6274
|
+
"pipe.notedReplaced": "\u5DF2\u8986\u76D6\u4FBF\u7B7E\u300C{name}\u300D\u4E3A\u6700\u65B0\u7ED3\u679C",
|
|
6226
6275
|
"pipe.removeNote": "\u5220\u9664\u8FD9\u6761\u4FBF\u7B7E\u6D41\u6C34\u7EBF",
|
|
6227
6276
|
"pipe.port": "\u62D6\u8FD9\u6761\u7EBF\u5230\u53E6\u4E00\u5F20\u5361\uFF0C\u5EFA\u7ACB\u6D41\u6C34\u7EBF",
|
|
6228
6277
|
"pipe.created": "\u6D41\u6C34\u7EBF\u5DF2\u8FDE\u5230\u300C{name}\u300D",
|
|
@@ -6514,7 +6563,14 @@ var en = {
|
|
|
6514
6563
|
"pipe.noted": "Result appended to note \u201C{name}\u201D",
|
|
6515
6564
|
"pipe.noteBlock": "## From \u201C{title}\u201D \xB7 {time}\n\n{text}",
|
|
6516
6565
|
"pipe.noteTarget": "Pipeline \u2192 note",
|
|
6517
|
-
"pipe.noteHint": "Note downstream: the result is
|
|
6566
|
+
"pipe.noteHint": "Note downstream: the result is written into the note, never sent",
|
|
6567
|
+
"pipe.noteAppend": "Append to the note",
|
|
6568
|
+
"pipe.noteAppendHint": "Keep every run, like a log",
|
|
6569
|
+
"pipe.noteReplace": "Keep only the latest",
|
|
6570
|
+
"pipe.noteReplaceHint": "Overwrite, for a summary pane",
|
|
6571
|
+
"pipe.modeAppend": "Note: append mode",
|
|
6572
|
+
"pipe.modeReplace": "Note: keep only the latest",
|
|
6573
|
+
"pipe.notedReplaced": "Note \u201C{name}\u201D replaced with the latest result",
|
|
6518
6574
|
"pipe.removeNote": "Remove this note pipeline",
|
|
6519
6575
|
"pipe.port": "Drag this line onto another card to wire a pipeline",
|
|
6520
6576
|
"pipe.created": "Pipeline wired to \u201C{name}\u201D",
|