@khanglvm/relay 0.9.0 → 0.9.1
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/package.json +1 -1
- package/src/ui/app.js +7 -1
- package/src/ui/blocks.js +1 -1
- package/src/ui/style.css +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanglvm/relay",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Browser-based question boards with rich blocks (markdown, charts, mermaid, tables, code, sandboxed HTML) and element-level annotations for AI coding agents (Claude Code, Codex, …): ask users structured questions, present interactive visuals, collect inline comments, wait for submit, read answers as JSON.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
package/src/ui/app.js
CHANGED
|
@@ -543,7 +543,13 @@
|
|
|
543
543
|
Annotate?.register(titleEl, { blockId: null, questionId: null, target: { kind: 'html-element', label: spec.title } });
|
|
544
544
|
}
|
|
545
545
|
if (spec.intro) {
|
|
546
|
-
|
|
546
|
+
// Render the intro as markdown (bold/italic/code/links/lists) — agents write
|
|
547
|
+
// markdown here by default. Falls back to plain text if blocks.js is absent.
|
|
548
|
+
// The .blk-markdown class scopes the shared markdown typography to it.
|
|
549
|
+
const md = typeof window.RelayBlocks !== 'undefined' && window.RelayBlocks.renderMarkdown;
|
|
550
|
+
const intro = md
|
|
551
|
+
? el('div', { class: 'intro blk-markdown' }, window.RelayBlocks.renderMarkdown(spec.intro))
|
|
552
|
+
: el('p', { class: 'intro' }, spec.intro);
|
|
547
553
|
app.append(intro);
|
|
548
554
|
Annotate?.enableTextSelection(intro, { blockId: null, questionId: null });
|
|
549
555
|
}
|
package/src/ui/blocks.js
CHANGED
package/src/ui/style.css
CHANGED
|
@@ -87,7 +87,12 @@ h1 {
|
|
|
87
87
|
line-height: 1.25;
|
|
88
88
|
text-wrap: balance;
|
|
89
89
|
}
|
|
90
|
-
.intro { color: var(--fg-2);
|
|
90
|
+
.intro { color: var(--fg-2); margin: 10px 0 18px; }
|
|
91
|
+
/* the intro renders markdown; keep it muted (out-specificity .blk-markdown .md)
|
|
92
|
+
and trim its block margins so it reads as a lead paragraph, not a content block */
|
|
93
|
+
.intro.blk-markdown .md { color: var(--fg-2); }
|
|
94
|
+
.intro.blk-markdown .md > :first-child { margin-top: 0; }
|
|
95
|
+
.intro.blk-markdown .md > :last-child { margin-bottom: 0; }
|
|
91
96
|
.theme-btn {
|
|
92
97
|
background: transparent; color: var(--fg-2);
|
|
93
98
|
border: 1px solid var(--border-strong); border-radius: 999px;
|