dsh-plugin-inspiration-workbench 0.8.0 → 0.9.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 +3 -3
- package/lib/client.js +66 -24
- package/lib/client.js.map +2 -2
- package/package.json +1 -1
- package/src/client/board.js +16 -2
- package/src/client/styles.css +52 -22
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
|
|---|---|
|
package/lib/client.js
CHANGED
|
@@ -505,32 +505,62 @@ var styles_default = `/* Inspiration workbench \u2014 scoped to .iwb-root; colou
|
|
|
505
505
|
overflow: visible; pointer-events: none; z-index: 1;
|
|
506
506
|
}
|
|
507
507
|
.iwb-links path.iwb-link {
|
|
508
|
-
fill: none; stroke: var(--dsw-alias-label-deep-diving); stroke-width: 1.
|
|
509
|
-
opacity: .
|
|
508
|
+
fill: none; stroke: var(--dsw-alias-label-deep-diving); stroke-width: 1.5;
|
|
509
|
+
stroke-linecap: round; opacity: .5; pointer-events: stroke; cursor: pointer;
|
|
510
|
+
transition: opacity .15s ease, stroke-width .15s ease;
|
|
510
511
|
}
|
|
511
|
-
.iwb-links path.iwb-link:hover { opacity: .95; stroke-width: 2; }
|
|
512
|
+
.iwb-links path.iwb-link:hover { opacity: .95; stroke-width: 2.2; }
|
|
512
513
|
.iwb-links path.iwb-link-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
|
|
513
|
-
.iwb-links path.iwb-link-temp {
|
|
514
|
-
|
|
514
|
+
.iwb-links path.iwb-link-temp {
|
|
515
|
+
fill: none; stroke: var(--dsw-alias-label-deep-diving); stroke-width: 1.8;
|
|
516
|
+
stroke-dasharray: 3 5; stroke-linecap: round; opacity: .75;
|
|
517
|
+
animation: iwb-flow 1s linear infinite;
|
|
518
|
+
}
|
|
519
|
+
.iwb-links path.iwb-link-arrow {
|
|
520
|
+
fill: var(--dsw-alias-label-deep-diving); opacity: .45; pointer-events: none;
|
|
521
|
+
}
|
|
522
|
+
.iwb-links path.iwb-link.iwb-link-active {
|
|
523
|
+
stroke-width: 2; opacity: .8;
|
|
524
|
+
stroke-dasharray: 7 7; animation: iwb-flow 1.1s linear infinite;
|
|
525
|
+
}
|
|
526
|
+
@keyframes iwb-flow { to { stroke-dashoffset: -28; } }
|
|
527
|
+
/* Connection handles: a whisper by default, a crisp ring on card hover. */
|
|
515
528
|
.iwb-port {
|
|
516
|
-
position: absolute; width:
|
|
517
|
-
border:
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
}
|
|
522
|
-
.iwb-card:hover .iwb-port,
|
|
523
|
-
.iwb-
|
|
529
|
+
position: absolute; width: 10px; height: 10px; border-radius: 50%;
|
|
530
|
+
border: 0; background: var(--dsw-alias-label-deep-diving);
|
|
531
|
+
opacity: .38; transform: scale(.9); cursor: crosshair; z-index: 3;
|
|
532
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--dsw-alias-bg-layer-1) 55%, transparent);
|
|
533
|
+
transition: opacity .18s ease, transform .18s cubic-bezier(.2, .8, .3, 1.2), box-shadow .18s ease, background .18s ease;
|
|
534
|
+
}
|
|
535
|
+
.iwb-card:hover .iwb-port,
|
|
536
|
+
.iwb-card.iwb-focus .iwb-port {
|
|
537
|
+
width: 12px; height: 12px; opacity: .95; transform: scale(1);
|
|
538
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsw-alias-label-deep-diving) 16%, transparent);
|
|
539
|
+
}
|
|
540
|
+
.iwb-port:hover {
|
|
541
|
+
background: var(--dsw-alias-label-deep-diving);
|
|
542
|
+
transform: scale(1.25);
|
|
543
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--dsw-alias-label-deep-diving) 20%, transparent);
|
|
544
|
+
}
|
|
524
545
|
.iwb-port::after {
|
|
525
|
-
content: "
|
|
526
|
-
|
|
527
|
-
}
|
|
528
|
-
.iwb-port[data-side="right"] { right: -
|
|
529
|
-
.iwb-port[data-side="left"] { left: -
|
|
530
|
-
.iwb-port[data-side="top"] { top: -
|
|
531
|
-
.iwb-port[data-side="bottom"] { bottom: -
|
|
532
|
-
.iwb-card.iwb-
|
|
533
|
-
.iwb-card
|
|
546
|
+
content: ""; position: absolute; inset: 0; border-radius: 50%;
|
|
547
|
+
box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--dsw-alias-bg-layer-1) 65%, transparent);
|
|
548
|
+
}
|
|
549
|
+
.iwb-port[data-side="right"] { right: -5px; top: calc(50% - 5px); }
|
|
550
|
+
.iwb-port[data-side="left"] { left: -5px; top: calc(50% - 5px); }
|
|
551
|
+
.iwb-port[data-side="top"] { top: -5px; left: calc(50% - 5px); }
|
|
552
|
+
.iwb-port[data-side="bottom"] { bottom: -5px; left: calc(50% - 5px); }
|
|
553
|
+
.iwb-card:hover .iwb-port[data-side="right"] { right: -6px; top: calc(50% - 6px); }
|
|
554
|
+
.iwb-card:hover .iwb-port[data-side="left"] { left: -6px; top: calc(50% - 6px); }
|
|
555
|
+
.iwb-card:hover .iwb-port[data-side="top"] { top: -6px; left: calc(50% - 6px); }
|
|
556
|
+
.iwb-card:hover .iwb-port[data-side="bottom"] { bottom: -6px; left: calc(50% - 6px); }
|
|
557
|
+
|
|
558
|
+
.iwb-card.iwb-link-target {
|
|
559
|
+
outline: 1.5px solid color-mix(in srgb, var(--dsw-alias-label-deep-diving) 60%, transparent);
|
|
560
|
+
outline-offset: 4px;
|
|
561
|
+
box-shadow: 0 0 0 8px color-mix(in srgb, var(--dsw-alias-label-deep-diving) 7%, transparent);
|
|
562
|
+
}
|
|
563
|
+
.iwb-card-note.iwb-link-target { outline-color: color-mix(in srgb, var(--dsw-alias-label-deep-diving) 55%, transparent); }
|
|
534
564
|
.iwb-link-menu { min-width: 230px; }
|
|
535
565
|
.iwb-link-remove .iwb-model-name { color: var(--dsw-alias-state-error-primary); }
|
|
536
566
|
|
|
@@ -3828,6 +3858,15 @@ function createBoard({ host, adapter, approvals, t: t2, onOpenSession }) {
|
|
|
3828
3858
|
if (Math.abs(dx) >= Math.abs(dy)) return dx > 0 ? "left" : "right";
|
|
3829
3859
|
return dy > 0 ? "top" : "bottom";
|
|
3830
3860
|
}
|
|
3861
|
+
function arrowPath(point, side) {
|
|
3862
|
+
const normal = EDGE_NORMAL[side] || EDGE_NORMAL.left;
|
|
3863
|
+
const perp = { x: -normal.y, y: normal.x };
|
|
3864
|
+
const tip = { x: point.x - normal.x * 1, y: point.y - normal.y * 1 };
|
|
3865
|
+
const base = { x: point.x + normal.x * 7, y: point.y + normal.y * 7 };
|
|
3866
|
+
const left = { x: base.x + perp.x * 3.2, y: base.y + perp.y * 3.2 };
|
|
3867
|
+
const right = { x: base.x - perp.x * 3.2, y: base.y - perp.y * 3.2 };
|
|
3868
|
+
return "M " + tip.x + " " + tip.y + " L " + left.x + " " + left.y + " L " + right.x + " " + right.y + " Z";
|
|
3869
|
+
}
|
|
3831
3870
|
function linkPath(from, to, fromSide, toSide) {
|
|
3832
3871
|
const distance = Math.hypot(to.x - from.x, to.y - from.y);
|
|
3833
3872
|
const bend = Math.max(36, Math.min(140, distance * 0.42));
|
|
@@ -3856,9 +3895,12 @@ function createBoard({ host, adapter, approvals, t: t2, onOpenSession }) {
|
|
|
3856
3895
|
});
|
|
3857
3896
|
const path = document.createElementNS(SVG_NS, "path");
|
|
3858
3897
|
path.setAttribute("d", d);
|
|
3859
|
-
path.setAttribute("class", "iwb-link");
|
|
3898
|
+
path.setAttribute("class", "iwb-link" + (card.running ? " iwb-link-active" : ""));
|
|
3860
3899
|
if (target.mode === "draft") path.setAttribute("stroke-dasharray", "4 4");
|
|
3861
|
-
|
|
3900
|
+
const arrow = document.createElementNS(SVG_NS, "path");
|
|
3901
|
+
arrow.setAttribute("d", arrowPath(edgeAnchor(targetCard, toSide), toSide));
|
|
3902
|
+
arrow.setAttribute("class", "iwb-link-arrow");
|
|
3903
|
+
linkLayer.append(hit, path, arrow);
|
|
3862
3904
|
}
|
|
3863
3905
|
}
|
|
3864
3906
|
}
|