// Display label for a node when referenced from another panel (member list, // note parent link, edge endpoints, etc.). Branches get a "分岐ノード" prefix // so they're never confused with regular cards even when nameless. // regular → name OR "(無名)" // branch → name ? `分岐ノード(${name})` : '分岐ノード' function nodeDisplayLabel(n){ if (!n) return '?'; const name = (n.name || '').trim(); if (n.variant === 'branch'){ return name ? `分岐ノード(${name})` : '分岐ノード'; } return name || '(無名)'; } // Right-side inspector for either the selected node, edge, group or note function Inspector({ selection, setSelection, nodes, edges, groups, notes, customRelations, learnRelation, removeCustomRelation, updateNode, updateEdge, deleteNode, deleteEdge, duplicateNode, addNote, addNoteOnEdge, updateNote, deleteNote, addNode, clearAll, onLoadDemo, createGroupFromNode, updateGroup, deleteGroup, removeNodeFromGroup, composingGroupId, setComposingGroupId, }){ groups = groups || []; notes = notes || []; customRelations = customRelations || []; if (!selection){ return (

はじめかた

+カードでカードを置く
・アイコン右上のをドラッグして別カードにドロップ → アクション矢印が引ける
・矢印やカードをクリックで細かく編集(色・スタイル・太さなど)
● 分岐ノードで 矢印 もしくは ゾーン内 に小さな中継点を追加 → 枝分かれや合流ルート、ゾーン内の状態表現に
・カードに ✨ エフェクト(強化・ダメージ・回復 等)を付けて状態を可視化
何も選択されていないよ。
カードや矢印をクリックしてね。
); } if (selection.type === 'node'){ const node = nodes.find(n=>n.id===selection.id); if (!node) return null; const nodeGroups = groups.filter(g => (g.nodeIds || []).includes(node.id)); const nodeNotes = notes.filter(n => n.nodeId === node.id); return (
); } if (selection.type === 'note'){ const note = notes.find(n => n.id === selection.id); if (!note) return null; const parentNode = note.nodeId ? nodes.find(n => n.id === note.nodeId) : null; const parentEdge = note.targetEdgeId ? edges.find(e => e.id === note.targetEdgeId) : null; return (
); } if (selection.type === 'edge'){ const edge = edges.find(e=>e.id===selection.id); if (!edge) return null; const edgeNotes = notes.filter(n => n.targetEdgeId === edge.id); return (
); } if (selection.type === 'group'){ const group = groups.find(g=>g.id===selection.id); if (!group) return null; return (
); } return null; } function NodeInspector({node, updateNode, deleteNode, duplicateNode, nodeGroups, nodeNotes, addNote, updateNote, deleteNote, createGroupFromNode, updateGroup, deleteGroup, removeNodeFromGroup, setComposingGroupId, setSelection}){ nodeGroups = nodeGroups || []; nodeNotes = nodeNotes || []; const isBranch = node.variant === 'branch'; const isEdgeAttached = isBranch && !!node.attachedEdgeId; const fileRef = React.useRef(null); const onFile = async (e) => { const f = e.target.files?.[0]; if (!f) return; try { const dataUrl = await compressImage(f); updateNode(node.id, { image: dataUrl }); } catch(err) { console.error('Image compression failed', err); } e.target.value = ''; }; return ( <>

{isBranch ? '分岐ノード編集' : 'カード編集'}

updateNode(node.id,{name:e.target.value})} placeholder="カード名"/>
updateNode(node.id,{subtitle:e.target.value})} placeholder="例: 通常モンスター / 手札 / 場"/>

{isBranch ? '見た目' : 'カード画像'}

{!isBranch && (
{node.image && }
)}
{EMOJI_PRESETS.map(em=>( ))}
{NODE_COLORS.map(c=>(
{!isBranch && (
{[['square','カード型'],['circle','まる'],['bubble','吹き出し']].map(([v,l])=>( ))}
)} {/* Name/subtitle placement — default is below the card. Useful for dense layouts where the label would collide with another card or arrow. */}
{[['top','上'], ['left','左'], ['bottom','下'], ['right','右']].map(([v,l])=>( ))}
{/* Effect: rising particles that convey buff / damage / status on the card. Migrated from legacy node.aura (boolean) — if aura is true treat it as 'buff'. Hidden for branch nodes — the small avatar can't host visible particles. */} {!isBranch && (
{[ ['none', 'なし'], ['buff', '✨ 強化'], ['damage', '💥 ダメージ'], ['status', '🌀 状態異常'], ['heal', '💚 回復'], ['shield', '🛡 防御'], ].map(([v,l])=>{ const cur = node.effect || (node.aura ? 'buff' : 'none'); return ( ); })}
)}
{/* Annotations attached to this card. Multi-OK, each is independently draggable on the canvas and editable here. */}
💬 解説 {nodeNotes.length > 0 && `(${nodeNotes.length})`}
{nodeNotes.map(n => (