@khanglvm/relay 0.14.2 → 0.16.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 +18 -3
- package/docs/AGENT.md +66 -23
- package/package.json +1 -1
- package/skills/relay/SKILL.md +48 -12
- package/src/cli.js +42 -21
- package/src/mcp-ui/board.js +46 -8
- package/src/mcp.js +9 -3
- package/src/server.js +310 -95
- package/src/spec.js +5 -0
- package/src/store.js +15 -0
- package/src/ui/annotate.js +73 -26
- package/src/ui/app.js +100 -36
- package/src/ui/blocks.css +63 -11
- package/src/ui/blocks.js +353 -48
package/src/ui/blocks.css
CHANGED
|
@@ -498,6 +498,7 @@
|
|
|
498
498
|
position: relative;
|
|
499
499
|
width: 100%;
|
|
500
500
|
}
|
|
501
|
+
.blk-chart-stage { position: relative; width: 100%; height: 100%; min-width: 0; }
|
|
501
502
|
.blk-chart canvas { display: block; }
|
|
502
503
|
.blk-chart-badge {
|
|
503
504
|
position: absolute;
|
|
@@ -647,26 +648,35 @@
|
|
|
647
648
|
}
|
|
648
649
|
.blk-imagewrap .blk-img {
|
|
649
650
|
display: block;
|
|
650
|
-
|
|
651
|
+
width: 100%;
|
|
652
|
+
max-width: none;
|
|
651
653
|
height: auto;
|
|
652
654
|
border-radius: 6px;
|
|
653
655
|
object-fit: contain;
|
|
654
656
|
object-position: left top;
|
|
655
657
|
}
|
|
658
|
+
.blk-imgstage {
|
|
659
|
+
position: relative;
|
|
660
|
+
width: 100%;
|
|
661
|
+
max-width: 100%;
|
|
662
|
+
line-height: 0;
|
|
663
|
+
}
|
|
656
664
|
/* In full-screen a per-block height must never keep the image small — that
|
|
657
665
|
height only shapes the inline preview; the detail view needs every pixel.
|
|
658
666
|
(Belt-and-suspenders alongside the viewer's reapply() on full-screen toggle.) */
|
|
659
667
|
.blk-imagewrap.blk-full .blk-img { max-height: none !important; }
|
|
660
668
|
|
|
661
669
|
/* ---------- viewer controls (full-screen) ---------- */
|
|
662
|
-
/* The
|
|
663
|
-
|
|
664
|
-
the
|
|
665
|
-
.blk-viewer { position: relative;
|
|
670
|
+
/* The controls participate in layout above the visual and use native sticky
|
|
671
|
+
positioning. The previous JS counter-translation chased scrollTop one event
|
|
672
|
+
behind the compositor, which made the bar visibly trail trackpad scrolling. */
|
|
673
|
+
.blk-viewer { position: relative; }
|
|
666
674
|
.blk-tools {
|
|
667
|
-
position:
|
|
675
|
+
position: sticky; top: 0; left: 0; width: 100%; height: 34px;
|
|
668
676
|
display: flex; gap: 2px; align-items: center; justify-content: flex-end;
|
|
669
|
-
|
|
677
|
+
box-sizing: border-box; padding: 4px;
|
|
678
|
+
background: var(--bg-sunken); border-bottom: 1px solid var(--border);
|
|
679
|
+
z-index: 16;
|
|
670
680
|
}
|
|
671
681
|
.blk-tools button {
|
|
672
682
|
background: var(--card); border: 1px solid var(--border); color: var(--fg-2);
|
|
@@ -692,6 +702,7 @@ body.blk-full-open { overflow: hidden; }
|
|
|
692
702
|
/* detach the toolbar from the scrolling content and fix it to the viewport top */
|
|
693
703
|
.blk-full > .blk-tools {
|
|
694
704
|
position: fixed; top: 0; left: 0; right: 0; height: 44px;
|
|
705
|
+
width: auto;
|
|
695
706
|
margin: 0; padding: 0 12px;
|
|
696
707
|
background: var(--card); border-bottom: 1px solid var(--border);
|
|
697
708
|
z-index: 51;
|
|
@@ -726,6 +737,7 @@ body.blk-full-open { overflow: hidden; }
|
|
|
726
737
|
.blk-plantuml.blk-full > svg,
|
|
727
738
|
.blk-plantuml.blk-full > .blk-plantuml-img,
|
|
728
739
|
.blk-imagewrap.blk-full > .blk-img { margin: auto; }
|
|
740
|
+
.blk-imagewrap.blk-full > .blk-imgstage { margin: auto; max-width: none; }
|
|
729
741
|
|
|
730
742
|
/* Small frame on charts + mermaid so they read as a deliberate card, matching
|
|
731
743
|
the graphviz/plantuml/image blocks (already framed). Scoped to the inner
|
|
@@ -736,9 +748,10 @@ body.blk-full-open { overflow: hidden; }
|
|
|
736
748
|
border: 1px solid var(--border);
|
|
737
749
|
border-radius: 10px;
|
|
738
750
|
}
|
|
739
|
-
/*
|
|
740
|
-
|
|
741
|
-
|
|
751
|
+
/* Charts now use the same zoom/pan viewer as diagrams and images. Keep the
|
|
752
|
+
rounded frame while allowing the responsive chart stage to overflow once
|
|
753
|
+
the user zooms past fit. */
|
|
754
|
+
.blk-chart.blk-viewer:not(.blk-full) { overflow: auto; }
|
|
742
755
|
|
|
743
756
|
/* drag-to-pan affordance: grab when a visual overflows its box, grabbing while
|
|
744
757
|
dragging. During an active drag the inner svg/img/canvas ignore the pointer
|
|
@@ -896,7 +909,7 @@ body.blk-full-open { overflow: hidden; }
|
|
|
896
909
|
20% { box-shadow: 0 0 0 3px var(--accent); }
|
|
897
910
|
}
|
|
898
911
|
|
|
899
|
-
/* ---------- image
|
|
912
|
+
/* ---------- image point + area comments ---------- */
|
|
900
913
|
.blk-img-pinnable { cursor: crosshair; }
|
|
901
914
|
.blk-imgpins { position: absolute; inset: 0; pointer-events: none; }
|
|
902
915
|
.blk-imgpin {
|
|
@@ -910,3 +923,42 @@ body.blk-full-open { overflow: hidden; }
|
|
|
910
923
|
display: grid; place-items: center;
|
|
911
924
|
}
|
|
912
925
|
.blk-imgpin:hover { filter: brightness(1.08); }
|
|
926
|
+
.blk-region-layer { position: absolute; inset: 0; pointer-events: none; }
|
|
927
|
+
.blk-region-selection,
|
|
928
|
+
.blk-imgregion {
|
|
929
|
+
position: absolute;
|
|
930
|
+
border: 2px solid var(--accent);
|
|
931
|
+
background: color-mix(in srgb, var(--accent) 16%, transparent);
|
|
932
|
+
box-shadow: 0 0 0 1px rgba(255,255,255,0.75) inset;
|
|
933
|
+
border-radius: 5px;
|
|
934
|
+
}
|
|
935
|
+
.blk-region-selection { display: none; z-index: 7; }
|
|
936
|
+
.blk-imgregion {
|
|
937
|
+
z-index: 6;
|
|
938
|
+
pointer-events: auto;
|
|
939
|
+
cursor: pointer;
|
|
940
|
+
color: var(--accent-fg);
|
|
941
|
+
padding: 0;
|
|
942
|
+
min-width: 10px;
|
|
943
|
+
min-height: 10px;
|
|
944
|
+
}
|
|
945
|
+
.blk-imgregion::after {
|
|
946
|
+
content: attr(data-count);
|
|
947
|
+
position: absolute; top: -11px; right: -11px;
|
|
948
|
+
min-width: 20px; height: 20px; padding: 0 5px;
|
|
949
|
+
display: grid; place-items: center;
|
|
950
|
+
border: 2px solid #fff; border-radius: 999px;
|
|
951
|
+
background: var(--accent); color: #fff;
|
|
952
|
+
font: 600 0.68rem/1 var(--sans);
|
|
953
|
+
box-shadow: 0 1px 4px rgba(0,0,0,0.3);
|
|
954
|
+
}
|
|
955
|
+
.blk-region-arming { cursor: crosshair !important; }
|
|
956
|
+
.blk-region-selecting { cursor: crosshair !important; touch-action: none; }
|
|
957
|
+
.blk-region-status {
|
|
958
|
+
position: absolute; left: 50%; bottom: 12px; z-index: 9;
|
|
959
|
+
transform: translateX(-50%);
|
|
960
|
+
padding: 6px 10px; border-radius: 8px;
|
|
961
|
+
background: rgba(28,27,25,0.86); color: #fff;
|
|
962
|
+
font: 500 0.74rem/1.2 var(--sans);
|
|
963
|
+
pointer-events: none;
|
|
964
|
+
}
|