@takagaki/cortex-decisions-viewer 0.4.40 → 0.4.42
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/dist/render.js +48 -20
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -572,30 +572,47 @@ a:hover { text-decoration: underline; }
|
|
|
572
572
|
.detail-back { display: inline-block; margin-bottom: 14px; font-size: 14px; }
|
|
573
573
|
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
|
|
574
574
|
.detail-head > div:first-child { flex: 1 1 auto; min-width: 0; }
|
|
575
|
+
/* 右側の操作は2段に分ける。1段目=つながり(読む導線)・2段目=AIで編集/GitHubで編集(書き換える導線)。
|
|
576
|
+
3つ横並びだとタイトルの幅を食うため */
|
|
577
|
+
.detail-actions { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
|
|
578
|
+
.detail-actions-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
|
|
575
579
|
.detail-title { font-size: 24px; font-weight: 700; margin: 0 0 10px; line-height: 1.4; }
|
|
576
580
|
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
|
|
581
|
+
/* GitHubへ飛ぶボタンだけ、ヘッダーの .gh-btn と同じダーク(GitHubカラー)+リキッドグラスで揃える */
|
|
577
582
|
.edit-btn {
|
|
583
|
+
-webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
|
|
584
|
+
flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
|
|
585
|
+
padding: 8px 14px; border-radius: var(--radius);
|
|
586
|
+
border: 1px solid rgba(255,255,255,0.35); background: rgba(28,32,40,0.82); color: #fff;
|
|
587
|
+
font-size: 13.5px; font-weight: 600; white-space: nowrap;
|
|
588
|
+
box-shadow: 0 2px 10px rgba(20,30,60,0.25), inset 0 1px 0 rgba(255,255,255,0.25);
|
|
589
|
+
}
|
|
590
|
+
.edit-btn:hover { background: rgba(0,0,0,0.88); text-decoration: none; }
|
|
591
|
+
/* つながり(グラフ探索)はGitHubでもAIでもないので、既定の淡いボタンのまま残す */
|
|
592
|
+
.trace-btn {
|
|
578
593
|
-webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
|
|
579
594
|
flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
|
|
580
595
|
padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius);
|
|
581
596
|
background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600;
|
|
582
597
|
box-shadow: var(--shadow); white-space: nowrap;
|
|
583
598
|
}
|
|
584
|
-
.
|
|
599
|
+
.trace-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
|
|
585
600
|
/* ---- AI導線ボタン(AIで編集・+AIで登録。claude.ai/code へのディープリンク・AIアクションはオレンジ系で統一) ---- */
|
|
601
|
+
/* AIアクション(AIで編集・+AIで登録・AIに聞く)はヘッダーの .ask-ai-btn と同じ塗りで統一する */
|
|
586
602
|
.ai-edit-btn {
|
|
587
|
-
-webkit-backdrop-filter: blur(
|
|
603
|
+
-webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
|
|
588
604
|
flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
|
|
589
|
-
padding: 8px 14px; border
|
|
590
|
-
background: rgba(217,119,87,0.
|
|
591
|
-
|
|
605
|
+
padding: 8px 14px; border-radius: var(--radius);
|
|
606
|
+
border: 1px solid rgba(255,255,255,0.55); background: rgba(217,119,87,0.82); color: #fff;
|
|
607
|
+
font-size: 13.5px; font-weight: 600; white-space: nowrap;
|
|
608
|
+
box-shadow: 0 2px 10px rgba(190,90,60,0.3), inset 0 1px 0 rgba(255,255,255,0.45);
|
|
592
609
|
}
|
|
593
|
-
.ai-edit-btn:hover { background: rgba(
|
|
610
|
+
.ai-edit-btn:hover { background: rgba(194,94,63,0.92); text-decoration: none; }
|
|
594
611
|
.ai-add-bar { margin-bottom: 16px; }
|
|
595
612
|
.ai-add-btn {
|
|
596
|
-
display: inline-flex; align-items: center; gap: 6px; padding: 8px
|
|
613
|
+
display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius);
|
|
597
614
|
border: 1px solid rgba(255,255,255,0.55); background: rgba(217,119,87,0.82); color: #fff;
|
|
598
|
-
font-size:
|
|
615
|
+
font-size: 13.5px; font-weight: 600; white-space: nowrap;
|
|
599
616
|
-webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
|
|
600
617
|
box-shadow: 0 2px 10px rgba(190,90,60,0.3), inset 0 1px 0 rgba(255,255,255,0.45);
|
|
601
618
|
}
|
|
@@ -1255,10 +1272,13 @@ const CLIENT_JS = `
|
|
|
1255
1272
|
var ai = h.fm ? adoptionInfo(h.fm.adoption) : null;
|
|
1256
1273
|
if (ai) titleWrap.appendChild(el("span", { class: "chip adoption-" + String(h.fm.adoption), text: ai.label }));
|
|
1257
1274
|
head.appendChild(titleWrap);
|
|
1258
|
-
|
|
1275
|
+
var homeEditRow = el("div", { class: "detail-actions-row" }, [
|
|
1276
|
+
el("a", { class: "ai-edit-btn", href: codeUrl(HOME_EDIT_PROMPT), target: "_blank", rel: "noopener", text: "AIで編集" }),
|
|
1277
|
+
]);
|
|
1259
1278
|
if (h.editUrl) {
|
|
1260
|
-
|
|
1279
|
+
homeEditRow.appendChild(el("a", { class: "edit-btn", href: h.editUrl, target: "_blank", rel: "noopener", text: "GitHubで編集" }));
|
|
1261
1280
|
}
|
|
1281
|
+
head.appendChild(el("div", { class: "detail-actions" }, [ homeEditRow ]));
|
|
1262
1282
|
app.appendChild(head);
|
|
1263
1283
|
var homeBody = el("div", { class: "body" });
|
|
1264
1284
|
app.appendChild(homeBody);
|
|
@@ -1828,14 +1848,18 @@ const CLIENT_JS = `
|
|
|
1828
1848
|
|
|
1829
1849
|
var head = el("div", { class: "detail-head" });
|
|
1830
1850
|
head.appendChild(el("div", {}, [ el("h1", { class: "detail-title", text: r.title }) ]));
|
|
1831
|
-
var traceBtn2 = el("a", { class: "
|
|
1851
|
+
var traceBtn2 = el("a", { class: "trace-btn", href: "?tab=graph", text: "🕸 つながり" });
|
|
1832
1852
|
traceBtn2.addEventListener("click", function (ev) { ev.preventDefault(); openExplorerFor(r); });
|
|
1833
|
-
|
|
1853
|
+
var editRowR = el("div", { class: "detail-actions-row" });
|
|
1854
|
+
var aiEditR = aiEditBtn(r, r._section, r.title);
|
|
1855
|
+
if (aiEditR) editRowR.appendChild(aiEditR);
|
|
1834
1856
|
if (r.editUrl) {
|
|
1835
|
-
|
|
1857
|
+
editRowR.appendChild(el("a", { class: "edit-btn", href: r.editUrl, target: "_blank", rel: "noopener", text: "GitHubで編集" }));
|
|
1836
1858
|
}
|
|
1837
|
-
|
|
1838
|
-
|
|
1859
|
+
head.appendChild(el("div", { class: "detail-actions" }, [
|
|
1860
|
+
el("div", { class: "detail-actions-row" }, [ traceBtn2 ]),
|
|
1861
|
+
editRowR.children.length ? editRowR : null,
|
|
1862
|
+
]));
|
|
1839
1863
|
app.appendChild(head);
|
|
1840
1864
|
|
|
1841
1865
|
app.appendChild(el("div", { class: "detail-meta" }, [
|
|
@@ -2481,14 +2505,18 @@ const CLIENT_JS = `
|
|
|
2481
2505
|
var head = el("div", { class: "detail-head" });
|
|
2482
2506
|
var headLeft = el("div", {}, [ el("h1", { class: "detail-title", text: d.title }) ]);
|
|
2483
2507
|
head.appendChild(headLeft);
|
|
2484
|
-
var traceBtn = el("a", { class: "
|
|
2508
|
+
var traceBtn = el("a", { class: "trace-btn", href: "?tab=graph", text: "🕸 つながり" });
|
|
2485
2509
|
traceBtn.addEventListener("click", function (ev) { ev.preventDefault(); openExplorerFor(d); });
|
|
2486
|
-
|
|
2510
|
+
var editRowD = el("div", { class: "detail-actions-row" });
|
|
2511
|
+
var aiEditD = aiEditBtn(d, "Decisions", d.title);
|
|
2512
|
+
if (aiEditD) editRowD.appendChild(aiEditD);
|
|
2487
2513
|
if (d.editUrl) {
|
|
2488
|
-
|
|
2514
|
+
editRowD.appendChild(el("a", { class: "edit-btn", href: d.editUrl, target: "_blank", rel: "noopener", text: "GitHubで編集" }));
|
|
2489
2515
|
}
|
|
2490
|
-
|
|
2491
|
-
|
|
2516
|
+
head.appendChild(el("div", { class: "detail-actions" }, [
|
|
2517
|
+
el("div", { class: "detail-actions-row" }, [ traceBtn ]),
|
|
2518
|
+
editRowD.children.length ? editRowD : null,
|
|
2519
|
+
]));
|
|
2492
2520
|
app.appendChild(head);
|
|
2493
2521
|
|
|
2494
2522
|
var meta = el("div", { class: "detail-meta" }, [
|
package/package.json
CHANGED