@takagaki/cortex-decisions-viewer 0.4.41 → 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 +41 -18
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -572,35 +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; }
|
|
577
|
-
/* GitHub
|
|
581
|
+
/* GitHubへ飛ぶボタンだけ、ヘッダーの .gh-btn と同じダーク(GitHubカラー)+リキッドグラスで揃える */
|
|
578
582
|
.edit-btn {
|
|
579
583
|
-webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
|
|
580
584
|
flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
|
|
581
|
-
padding: 8px
|
|
585
|
+
padding: 8px 14px; border-radius: var(--radius);
|
|
582
586
|
border: 1px solid rgba(255,255,255,0.35); background: rgba(28,32,40,0.82); color: #fff;
|
|
583
|
-
font-size:
|
|
587
|
+
font-size: 13.5px; font-weight: 600; white-space: nowrap;
|
|
584
588
|
box-shadow: 0 2px 10px rgba(20,30,60,0.25), inset 0 1px 0 rgba(255,255,255,0.25);
|
|
585
589
|
}
|
|
586
590
|
.edit-btn:hover { background: rgba(0,0,0,0.88); text-decoration: none; }
|
|
587
|
-
|
|
591
|
+
/* つながり(グラフ探索)はGitHubでもAIでもないので、既定の淡いボタンのまま残す */
|
|
592
|
+
.trace-btn {
|
|
593
|
+
-webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
|
|
594
|
+
flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
|
|
595
|
+
padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius);
|
|
596
|
+
background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600;
|
|
597
|
+
box-shadow: var(--shadow); white-space: nowrap;
|
|
598
|
+
}
|
|
599
|
+
.trace-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
|
|
588
600
|
/* ---- AI導線ボタン(AIで編集・+AIで登録。claude.ai/code へのディープリンク・AIアクションはオレンジ系で統一) ---- */
|
|
589
601
|
/* AIアクション(AIで編集・+AIで登録・AIに聞く)はヘッダーの .ask-ai-btn と同じ塗りで統一する */
|
|
590
602
|
.ai-edit-btn {
|
|
591
603
|
-webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
|
|
592
604
|
flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
|
|
593
|
-
padding: 8px
|
|
605
|
+
padding: 8px 14px; border-radius: var(--radius);
|
|
594
606
|
border: 1px solid rgba(255,255,255,0.55); background: rgba(217,119,87,0.82); color: #fff;
|
|
595
|
-
font-size:
|
|
607
|
+
font-size: 13.5px; font-weight: 600; white-space: nowrap;
|
|
596
608
|
box-shadow: 0 2px 10px rgba(190,90,60,0.3), inset 0 1px 0 rgba(255,255,255,0.45);
|
|
597
609
|
}
|
|
598
610
|
.ai-edit-btn:hover { background: rgba(194,94,63,0.92); text-decoration: none; }
|
|
599
611
|
.ai-add-bar { margin-bottom: 16px; }
|
|
600
612
|
.ai-add-btn {
|
|
601
|
-
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);
|
|
602
614
|
border: 1px solid rgba(255,255,255,0.55); background: rgba(217,119,87,0.82); color: #fff;
|
|
603
|
-
font-size:
|
|
615
|
+
font-size: 13.5px; font-weight: 600; white-space: nowrap;
|
|
604
616
|
-webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
|
|
605
617
|
box-shadow: 0 2px 10px rgba(190,90,60,0.3), inset 0 1px 0 rgba(255,255,255,0.45);
|
|
606
618
|
}
|
|
@@ -1260,10 +1272,13 @@ const CLIENT_JS = `
|
|
|
1260
1272
|
var ai = h.fm ? adoptionInfo(h.fm.adoption) : null;
|
|
1261
1273
|
if (ai) titleWrap.appendChild(el("span", { class: "chip adoption-" + String(h.fm.adoption), text: ai.label }));
|
|
1262
1274
|
head.appendChild(titleWrap);
|
|
1263
|
-
|
|
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
|
+
]);
|
|
1264
1278
|
if (h.editUrl) {
|
|
1265
|
-
|
|
1279
|
+
homeEditRow.appendChild(el("a", { class: "edit-btn", href: h.editUrl, target: "_blank", rel: "noopener", text: "GitHubで編集" }));
|
|
1266
1280
|
}
|
|
1281
|
+
head.appendChild(el("div", { class: "detail-actions" }, [ homeEditRow ]));
|
|
1267
1282
|
app.appendChild(head);
|
|
1268
1283
|
var homeBody = el("div", { class: "body" });
|
|
1269
1284
|
app.appendChild(homeBody);
|
|
@@ -1833,14 +1848,18 @@ const CLIENT_JS = `
|
|
|
1833
1848
|
|
|
1834
1849
|
var head = el("div", { class: "detail-head" });
|
|
1835
1850
|
head.appendChild(el("div", {}, [ el("h1", { class: "detail-title", text: r.title }) ]));
|
|
1836
|
-
var traceBtn2 = el("a", { class: "
|
|
1851
|
+
var traceBtn2 = el("a", { class: "trace-btn", href: "?tab=graph", text: "🕸 つながり" });
|
|
1837
1852
|
traceBtn2.addEventListener("click", function (ev) { ev.preventDefault(); openExplorerFor(r); });
|
|
1838
|
-
|
|
1853
|
+
var editRowR = el("div", { class: "detail-actions-row" });
|
|
1839
1854
|
var aiEditR = aiEditBtn(r, r._section, r.title);
|
|
1840
|
-
if (aiEditR)
|
|
1855
|
+
if (aiEditR) editRowR.appendChild(aiEditR);
|
|
1841
1856
|
if (r.editUrl) {
|
|
1842
|
-
|
|
1857
|
+
editRowR.appendChild(el("a", { class: "edit-btn", href: r.editUrl, target: "_blank", rel: "noopener", text: "GitHubで編集" }));
|
|
1843
1858
|
}
|
|
1859
|
+
head.appendChild(el("div", { class: "detail-actions" }, [
|
|
1860
|
+
el("div", { class: "detail-actions-row" }, [ traceBtn2 ]),
|
|
1861
|
+
editRowR.children.length ? editRowR : null,
|
|
1862
|
+
]));
|
|
1844
1863
|
app.appendChild(head);
|
|
1845
1864
|
|
|
1846
1865
|
app.appendChild(el("div", { class: "detail-meta" }, [
|
|
@@ -2486,14 +2505,18 @@ const CLIENT_JS = `
|
|
|
2486
2505
|
var head = el("div", { class: "detail-head" });
|
|
2487
2506
|
var headLeft = el("div", {}, [ el("h1", { class: "detail-title", text: d.title }) ]);
|
|
2488
2507
|
head.appendChild(headLeft);
|
|
2489
|
-
var traceBtn = el("a", { class: "
|
|
2508
|
+
var traceBtn = el("a", { class: "trace-btn", href: "?tab=graph", text: "🕸 つながり" });
|
|
2490
2509
|
traceBtn.addEventListener("click", function (ev) { ev.preventDefault(); openExplorerFor(d); });
|
|
2491
|
-
|
|
2510
|
+
var editRowD = el("div", { class: "detail-actions-row" });
|
|
2492
2511
|
var aiEditD = aiEditBtn(d, "Decisions", d.title);
|
|
2493
|
-
if (aiEditD)
|
|
2512
|
+
if (aiEditD) editRowD.appendChild(aiEditD);
|
|
2494
2513
|
if (d.editUrl) {
|
|
2495
|
-
|
|
2514
|
+
editRowD.appendChild(el("a", { class: "edit-btn", href: d.editUrl, target: "_blank", rel: "noopener", text: "GitHubで編集" }));
|
|
2496
2515
|
}
|
|
2516
|
+
head.appendChild(el("div", { class: "detail-actions" }, [
|
|
2517
|
+
el("div", { class: "detail-actions-row" }, [ traceBtn ]),
|
|
2518
|
+
editRowD.children.length ? editRowD : null,
|
|
2519
|
+
]));
|
|
2497
2520
|
app.appendChild(head);
|
|
2498
2521
|
|
|
2499
2522
|
var meta = el("div", { class: "detail-meta" }, [
|
package/package.json
CHANGED