[{"data":1,"prerenderedAt":1188,"buildId":1189},["ShallowReactive",2],{"$f1xdtnhh2v4z8c":3,"-docs-composables-use-sigma-state-description":80,"component-example-useSigmaStateExample":93,"component-example-useSigmaStateExampletdCNQ6226iiZKNkds9W7nqV771lTw8VEX0JmHKG7zWU":97,"docs--docs-composables-use-sigma-state":646,"docs-navigation-zh-CN":940,"mdc--kyryde-key":1169,"surround--docs-composables-use-sigma-state":1185},{"attributes":4,"options":5,"nodes":9,"edges":51},{},{"type":6,"multi":7,"allowSelfLoops":8},"mixed",false,true,[10,17,25,32,38,44],{"key":11,"attributes":12},"a",{"label":13,"x":14,"y":14,"size":15,"color":16},"A",0,20,"#e22653",{"key":18,"attributes":19},"b",{"label":20,"x":21,"y":22,"size":23,"color":24},"B",100,-100,40,"#e28b53",{"key":26,"attributes":27},"c",{"label":28,"x":29,"y":30,"size":15,"color":31},"C",300,-200,"#9be225",{"key":33,"attributes":34},"d",{"label":35,"x":21,"y":36,"size":15,"color":37},"D",-300,"#53a4e2",{"key":39,"attributes":40},"e",{"label":41,"x":29,"y":42,"size":23,"color":43},"E",-400,"#7553e2",{"key":45,"attributes":46},"f",{"label":47,"x":48,"y":49,"size":15,"color":50},"F",400,-500,"#e253d5",[52,56,59,62,65,68,71,74,77],{"source":11,"target":18,"attributes":53},{"size":54,"label":55},10,"A-B",{"source":18,"target":26,"attributes":57},{"size":54,"label":58},"B-C",{"source":18,"target":33,"attributes":60},{"size":54,"label":61},"B-D",{"source":26,"target":18,"attributes":63},{"size":54,"label":64},"C-B",{"source":26,"target":39,"attributes":66},{"size":54,"label":67},"C-E",{"source":33,"target":26,"attributes":69},{"size":54,"label":70},"D-C",{"source":33,"target":39,"attributes":72},{"size":54,"label":73},"D-E",{"source":39,"target":33,"attributes":75},{"size":54,"label":76},"E-D",{"source":45,"target":39,"attributes":78},{"size":54,"label":79},"F-E",{"data":81,"body":82},{},{"type":83,"children":84},"root",[85],{"type":86,"tag":87,"props":88,"children":89},"element","p",{},[90],{"type":91,"value":92},"text","读写 sigma 的交互状态，把悬停、高亮、隐藏这些纯展示态存在实例内部而不污染图数据。",{"code":94,"filePath":95,"pascalName":96},"\u003Cscript setup lang=\"ts\">\nimport type { SigmaStyles } from '@movk\u002Fsigma'\n\nconst { data } = await useFetch('\u002Fapi\u002Fsmall.json')\n\nconst customNodeState = { isPinned: false }\n\nconst styles: SigmaStyles\u003Ctypeof customNodeState> = {\n  nodes: [\n    { whenState: 'isHighlighted', then: { labelVisibility: 'visible' } },\n    { whenState: 'isPinned', then: { color: '#0f172b', labelVisibility: 'visible' } }\n  ]\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSigmaGraph :data=\"data\" :styles=\"styles\" :custom-node-state=\"customNodeState\">\n    \u003CUseSigmaStatePanel \u002F>\n  \u003C\u002FSigmaGraph>\n\u003C\u002Ftemplate>\n","\u002Fopt\u002Fbuildhome\u002Frepo\u002Fdocs\u002Fapp\u002Fcomponents\u002Fcontent\u002Fexamples\u002FUseSigmaStateExample.vue","UseSigmaStateExample",{"data":98,"body":100,"toc":644},{"title":99,"description":99},"",{"type":83,"children":101},[102,638],{"type":86,"tag":103,"props":104,"children":108},"pre",{"className":105,"code":106,"language":107,"meta":99,"style":99},"language-vue shiki shiki-themes github-light github-light github-dark","\u003Cscript setup lang=\"ts\">\nimport type { SigmaStyles } from '@movk\u002Fsigma'\n\nconst { data } = await useFetch('\u002Fapi\u002Fsmall.json')\n\nconst customNodeState = { isPinned: false }\n\nconst styles: SigmaStyles\u003Ctypeof customNodeState> = {\n  nodes: [\n    { whenState: 'isHighlighted', then: { labelVisibility: 'visible' } },\n    { whenState: 'isPinned', then: { color: '#0f172b', labelVisibility: 'visible' } }\n  ]\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSigmaGraph :data=\"data\" :styles=\"styles\" :custom-node-state=\"customNodeState\">\n    \u003CUseSigmaStatePanel \u002F>\n  \u003C\u002FSigmaGraph>\n\u003C\u002Ftemplate>\n\n","vue",[109],{"type":86,"tag":110,"props":111,"children":112},"code",{"__ignoreMap":99},[113,158,188,197,251,259,292,300,346,355,383,432,441,450,467,475,492,587,606,623],{"type":86,"tag":114,"props":115,"children":118},"span",{"class":116,"line":117},"line",1,[119,125,131,137,142,147,153],{"type":86,"tag":114,"props":120,"children":122},{"style":121},"--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8",[123],{"type":91,"value":124},"\u003C",{"type":86,"tag":114,"props":126,"children":128},{"style":127},"--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D",[129],{"type":91,"value":130},"script",{"type":86,"tag":114,"props":132,"children":134},{"style":133},"--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0",[135],{"type":91,"value":136}," setup",{"type":86,"tag":114,"props":138,"children":139},{"style":133},[140],{"type":91,"value":141}," lang",{"type":86,"tag":114,"props":143,"children":144},{"style":121},[145],{"type":91,"value":146},"=",{"type":86,"tag":114,"props":148,"children":150},{"style":149},"--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF",[151],{"type":91,"value":152},"\"ts\"",{"type":86,"tag":114,"props":154,"children":155},{"style":121},[156],{"type":91,"value":157},">\n",{"type":86,"tag":114,"props":159,"children":161},{"class":116,"line":160},2,[162,168,173,178,183],{"type":86,"tag":114,"props":163,"children":165},{"style":164},"--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583",[166],{"type":91,"value":167},"import",{"type":86,"tag":114,"props":169,"children":170},{"style":164},[171],{"type":91,"value":172}," type",{"type":86,"tag":114,"props":174,"children":175},{"style":121},[176],{"type":91,"value":177}," { SigmaStyles } ",{"type":86,"tag":114,"props":179,"children":180},{"style":164},[181],{"type":91,"value":182},"from",{"type":86,"tag":114,"props":184,"children":185},{"style":149},[186],{"type":91,"value":187}," '@movk\u002Fsigma'\n",{"type":86,"tag":114,"props":189,"children":191},{"class":116,"line":190},3,[192],{"type":86,"tag":114,"props":193,"children":194},{"emptyLinePlaceholder":8},[195],{"type":91,"value":196},"\n",{"type":86,"tag":114,"props":198,"children":200},{"class":116,"line":199},4,[201,206,211,217,222,226,231,236,241,246],{"type":86,"tag":114,"props":202,"children":203},{"style":164},[204],{"type":91,"value":205},"const",{"type":86,"tag":114,"props":207,"children":208},{"style":121},[209],{"type":91,"value":210}," { ",{"type":86,"tag":114,"props":212,"children":214},{"style":213},"--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF",[215],{"type":91,"value":216},"data",{"type":86,"tag":114,"props":218,"children":219},{"style":121},[220],{"type":91,"value":221}," } ",{"type":86,"tag":114,"props":223,"children":224},{"style":164},[225],{"type":91,"value":146},{"type":86,"tag":114,"props":227,"children":228},{"style":164},[229],{"type":91,"value":230}," await",{"type":86,"tag":114,"props":232,"children":233},{"style":133},[234],{"type":91,"value":235}," useFetch",{"type":86,"tag":114,"props":237,"children":238},{"style":121},[239],{"type":91,"value":240},"(",{"type":86,"tag":114,"props":242,"children":243},{"style":149},[244],{"type":91,"value":245},"'\u002Fapi\u002Fsmall.json'",{"type":86,"tag":114,"props":247,"children":248},{"style":121},[249],{"type":91,"value":250},")\n",{"type":86,"tag":114,"props":252,"children":254},{"class":116,"line":253},5,[255],{"type":86,"tag":114,"props":256,"children":257},{"emptyLinePlaceholder":8},[258],{"type":91,"value":196},{"type":86,"tag":114,"props":260,"children":262},{"class":116,"line":261},6,[263,267,272,277,282,287],{"type":86,"tag":114,"props":264,"children":265},{"style":164},[266],{"type":91,"value":205},{"type":86,"tag":114,"props":268,"children":269},{"style":213},[270],{"type":91,"value":271}," customNodeState",{"type":86,"tag":114,"props":273,"children":274},{"style":164},[275],{"type":91,"value":276}," =",{"type":86,"tag":114,"props":278,"children":279},{"style":121},[280],{"type":91,"value":281}," { isPinned: ",{"type":86,"tag":114,"props":283,"children":284},{"style":213},[285],{"type":91,"value":286},"false",{"type":86,"tag":114,"props":288,"children":289},{"style":121},[290],{"type":91,"value":291}," }\n",{"type":86,"tag":114,"props":293,"children":295},{"class":116,"line":294},7,[296],{"type":86,"tag":114,"props":297,"children":298},{"emptyLinePlaceholder":8},[299],{"type":91,"value":196},{"type":86,"tag":114,"props":301,"children":303},{"class":116,"line":302},8,[304,308,313,318,323,327,332,337,341],{"type":86,"tag":114,"props":305,"children":306},{"style":164},[307],{"type":91,"value":205},{"type":86,"tag":114,"props":309,"children":310},{"style":213},[311],{"type":91,"value":312}," styles",{"type":86,"tag":114,"props":314,"children":315},{"style":164},[316],{"type":91,"value":317},":",{"type":86,"tag":114,"props":319,"children":320},{"style":133},[321],{"type":91,"value":322}," SigmaStyles",{"type":86,"tag":114,"props":324,"children":325},{"style":121},[326],{"type":91,"value":124},{"type":86,"tag":114,"props":328,"children":329},{"style":164},[330],{"type":91,"value":331},"typeof",{"type":86,"tag":114,"props":333,"children":334},{"style":121},[335],{"type":91,"value":336}," customNodeState> ",{"type":86,"tag":114,"props":338,"children":339},{"style":164},[340],{"type":91,"value":146},{"type":86,"tag":114,"props":342,"children":343},{"style":121},[344],{"type":91,"value":345}," {\n",{"type":86,"tag":114,"props":347,"children":349},{"class":116,"line":348},9,[350],{"type":86,"tag":114,"props":351,"children":352},{"style":121},[353],{"type":91,"value":354},"  nodes: [\n",{"type":86,"tag":114,"props":356,"children":357},{"class":116,"line":54},[358,363,368,373,378],{"type":86,"tag":114,"props":359,"children":360},{"style":121},[361],{"type":91,"value":362},"    { whenState: ",{"type":86,"tag":114,"props":364,"children":365},{"style":149},[366],{"type":91,"value":367},"'isHighlighted'",{"type":86,"tag":114,"props":369,"children":370},{"style":121},[371],{"type":91,"value":372},", then: { labelVisibility: ",{"type":86,"tag":114,"props":374,"children":375},{"style":149},[376],{"type":91,"value":377},"'visible'",{"type":86,"tag":114,"props":379,"children":380},{"style":121},[381],{"type":91,"value":382}," } },\n",{"type":86,"tag":114,"props":384,"children":386},{"class":116,"line":385},11,[387,391,396,401,406,414,418,423,427],{"type":86,"tag":114,"props":388,"children":389},{"style":121},[390],{"type":91,"value":362},{"type":86,"tag":114,"props":392,"children":393},{"style":149},[394],{"type":91,"value":395},"'isPinned'",{"type":86,"tag":114,"props":397,"children":398},{"style":121},[399],{"type":91,"value":400},", then: { color: ",{"type":86,"tag":114,"props":402,"children":403},{"style":149},[404],{"type":91,"value":405},"'",{"type":86,"tag":114,"props":407,"children":411},{"style":408,"class":409},"background-color:#0f172b;color:#ffffff;display:inline-block;padding:0 0.15em;margin:0 -0.15em;border-radius:0.2em",[410],"shiki-color-highlight",[412],{"type":91,"value":413},"#0f172b",{"type":86,"tag":114,"props":415,"children":416},{"style":149},[417],{"type":91,"value":405},{"type":86,"tag":114,"props":419,"children":420},{"style":121},[421],{"type":91,"value":422},", labelVisibility: ",{"type":86,"tag":114,"props":424,"children":425},{"style":149},[426],{"type":91,"value":377},{"type":86,"tag":114,"props":428,"children":429},{"style":121},[430],{"type":91,"value":431}," } }\n",{"type":86,"tag":114,"props":433,"children":435},{"class":116,"line":434},12,[436],{"type":86,"tag":114,"props":437,"children":438},{"style":121},[439],{"type":91,"value":440},"  ]\n",{"type":86,"tag":114,"props":442,"children":444},{"class":116,"line":443},13,[445],{"type":86,"tag":114,"props":446,"children":447},{"style":121},[448],{"type":91,"value":449},"}\n",{"type":86,"tag":114,"props":451,"children":453},{"class":116,"line":452},14,[454,459,463],{"type":86,"tag":114,"props":455,"children":456},{"style":121},[457],{"type":91,"value":458},"\u003C\u002F",{"type":86,"tag":114,"props":460,"children":461},{"style":127},[462],{"type":91,"value":130},{"type":86,"tag":114,"props":464,"children":465},{"style":121},[466],{"type":91,"value":157},{"type":86,"tag":114,"props":468,"children":470},{"class":116,"line":469},15,[471],{"type":86,"tag":114,"props":472,"children":473},{"emptyLinePlaceholder":8},[474],{"type":91,"value":196},{"type":86,"tag":114,"props":476,"children":478},{"class":116,"line":477},16,[479,483,488],{"type":86,"tag":114,"props":480,"children":481},{"style":121},[482],{"type":91,"value":124},{"type":86,"tag":114,"props":484,"children":485},{"style":127},[486],{"type":91,"value":487},"template",{"type":86,"tag":114,"props":489,"children":490},{"style":121},[491],{"type":91,"value":157},{"type":86,"tag":114,"props":493,"children":495},{"class":116,"line":494},17,[496,501,506,511,515,519,524,528,532,536,541,545,549,553,557,561,566,570,574,579,583],{"type":86,"tag":114,"props":497,"children":498},{"style":121},[499],{"type":91,"value":500},"  \u003C",{"type":86,"tag":114,"props":502,"children":503},{"style":127},[504],{"type":91,"value":505},"SigmaGraph",{"type":86,"tag":114,"props":507,"children":508},{"style":121},[509],{"type":91,"value":510}," :",{"type":86,"tag":114,"props":512,"children":513},{"style":133},[514],{"type":91,"value":216},{"type":86,"tag":114,"props":516,"children":517},{"style":121},[518],{"type":91,"value":146},{"type":86,"tag":114,"props":520,"children":521},{"style":149},[522],{"type":91,"value":523},"\"",{"type":86,"tag":114,"props":525,"children":526},{"style":121},[527],{"type":91,"value":216},{"type":86,"tag":114,"props":529,"children":530},{"style":149},[531],{"type":91,"value":523},{"type":86,"tag":114,"props":533,"children":534},{"style":121},[535],{"type":91,"value":510},{"type":86,"tag":114,"props":537,"children":538},{"style":133},[539],{"type":91,"value":540},"styles",{"type":86,"tag":114,"props":542,"children":543},{"style":121},[544],{"type":91,"value":146},{"type":86,"tag":114,"props":546,"children":547},{"style":149},[548],{"type":91,"value":523},{"type":86,"tag":114,"props":550,"children":551},{"style":121},[552],{"type":91,"value":540},{"type":86,"tag":114,"props":554,"children":555},{"style":149},[556],{"type":91,"value":523},{"type":86,"tag":114,"props":558,"children":559},{"style":121},[560],{"type":91,"value":510},{"type":86,"tag":114,"props":562,"children":563},{"style":133},[564],{"type":91,"value":565},"custom-node-state",{"type":86,"tag":114,"props":567,"children":568},{"style":121},[569],{"type":91,"value":146},{"type":86,"tag":114,"props":571,"children":572},{"style":149},[573],{"type":91,"value":523},{"type":86,"tag":114,"props":575,"children":576},{"style":121},[577],{"type":91,"value":578},"customNodeState",{"type":86,"tag":114,"props":580,"children":581},{"style":149},[582],{"type":91,"value":523},{"type":86,"tag":114,"props":584,"children":585},{"style":121},[586],{"type":91,"value":157},{"type":86,"tag":114,"props":588,"children":590},{"class":116,"line":589},18,[591,596,601],{"type":86,"tag":114,"props":592,"children":593},{"style":121},[594],{"type":91,"value":595},"    \u003C",{"type":86,"tag":114,"props":597,"children":598},{"style":127},[599],{"type":91,"value":600},"UseSigmaStatePanel",{"type":86,"tag":114,"props":602,"children":603},{"style":121},[604],{"type":91,"value":605}," \u002F>\n",{"type":86,"tag":114,"props":607,"children":609},{"class":116,"line":608},19,[610,615,619],{"type":86,"tag":114,"props":611,"children":612},{"style":121},[613],{"type":91,"value":614},"  \u003C\u002F",{"type":86,"tag":114,"props":616,"children":617},{"style":127},[618],{"type":91,"value":505},{"type":86,"tag":114,"props":620,"children":621},{"style":121},[622],{"type":91,"value":157},{"type":86,"tag":114,"props":624,"children":625},{"class":116,"line":15},[626,630,634],{"type":86,"tag":114,"props":627,"children":628},{"style":121},[629],{"type":91,"value":458},{"type":86,"tag":114,"props":631,"children":632},{"style":127},[633],{"type":91,"value":487},{"type":86,"tag":114,"props":635,"children":636},{"style":121},[637],{"type":91,"value":157},{"type":86,"tag":639,"props":640,"children":641},"style",{},[642],{"type":91,"value":643},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":99,"searchDepth":160,"depth":160,"links":645},[],{"id":647,"title":648,"body":649,"category":930,"description":92,"difficulty":931,"extension":932,"index":7,"keywords":931,"links":931,"meta":933,"navigation":931,"path":934,"requires":931,"seo":935,"sitemap":937,"stem":938,"__hash__":939},"docs\u002Fdocs\u002F3.composables\u002F06.use-sigma-state.md","useSigmaState",{"type":650,"value":651,"toc":924},"minimark",[652,656,677,680,766,774,778,783,829,844,849,893,903,921],[653,654,655],"h2",{"id":655},"用法",[87,657,658,659,662,663,662,666,662,669,672,673,676],{},"v4 把交互状态与图数据分开：",[110,660,661],{},"isHovered"," \u002F ",[110,664,665],{},"isHighlighted",[110,667,668],{},"isHidden",[110,670,671],{},"isDragged"," 这类纯展示态存在 sigma 内部，导出图数据时不会把 UI 状态一并带走。styles 里用 ",[110,674,675],{},"whenState"," 消费：",[678,679],"component-example",{"name":96},[103,681,685],{"className":682,"code":683,"language":684,"meta":99,"style":99},"language-ts shiki shiki-themes github-light github-light github-dark","const { setNodeState, setNodesState } = useSigmaState()\n\nsetNodeState('a', { isHighlighted: true })\nsetNodesState(['b', 'c'], { isHidden: true }) \u002F\u002F 批量比逐个调用少一次重绘\n","ts",[110,686,687,716,720,739],{"__ignoreMap":99},[114,688,689,692,695,699,702,705,707,709,713],{"class":116,"line":117},[114,690,205],{"class":691},"s8jYJ",[114,693,210],{"class":694},"sxrX7",[114,696,698],{"class":697},"sBjJW","setNodeState",[114,700,701],{"class":694},", ",[114,703,704],{"class":697},"setNodesState",[114,706,221],{"class":694},[114,708,146],{"class":691},[114,710,712],{"class":711},"snPdu"," useSigmaState",[114,714,715],{"class":694},"()\n",[114,717,718],{"class":116,"line":160},[114,719,196],{"emptyLinePlaceholder":8},[114,721,722,724,726,730,733,736],{"class":116,"line":190},[114,723,698],{"class":711},[114,725,240],{"class":694},[114,727,729],{"class":728},"sIIMD","'a'",[114,731,732],{"class":694},", { isHighlighted: ",[114,734,735],{"class":697},"true",[114,737,738],{"class":694}," })\n",[114,740,741,743,746,749,751,754,757,759,762],{"class":116,"line":199},[114,742,704],{"class":711},[114,744,745],{"class":694},"([",[114,747,748],{"class":728},"'b'",[114,750,701],{"class":694},[114,752,753],{"class":728},"'c'",[114,755,756],{"class":694},"], { isHidden: ",[114,758,735],{"class":697},[114,760,761],{"class":694}," }) ",[114,763,765],{"class":764},"sCsY4","\u002F\u002F 批量比逐个调用少一次重绘\n",[767,768,769,770,773],"note",{},"实例未就绪时写入静默跳过——服务端与挂载完成前都没有实例可写。读取则返回 ",[110,771,772],{},"undefined","。",[653,775,777],{"id":776},"api","API",[779,780,782],"h3",{"id":781},"usesigmastate","useSigmaState()",[87,784,785],{},[110,786,789,791,793,796,798,801,803,806,809,811,814,816,818,820,822,824,826],{"className":787,"language":788,"style":99},"language-ts-type shiki shiki-themes github-light github-light github-dark","ts-type",[114,790,648],{"class":711},[114,792,124],{"class":694},[114,794,795],{"class":711},"NS",[114,797,701],{"class":694},[114,799,800],{"class":711},"ES",[114,802,701],{"class":694},[114,804,805],{"class":711},"GS",[114,807,808],{"class":694},">()",[114,810,317],{"class":691},[114,812,813],{"class":711}," UseSigmaStateReturn",[114,815,124],{"class":694},[114,817,795],{"class":711},[114,819,701],{"class":694},[114,821,800],{"class":711},[114,823,701],{"class":694},[114,825,805],{"class":711},[114,827,828],{"class":694},">",[87,830,831,832,834,835,662,837,662,840,843],{},"三个泛型分别对应 ",[110,833,505],{}," 的 ",[110,836,578],{},[110,838,839],{},"customEdgeState",[110,841,842],{},"customGraphState","，缺省时只有内置状态。",[845,846,848],"h4",{"id":847},"returns","Returns",[850,851,852,857,861,866,871,876,883,888],"field-group",{},[853,854,856],"field",{"name":698,"type":855},"(key: string, state: Partial\u003CFullNodeState\u003CNS>>) => void","设置单个节点的状态。",[853,858,860],{"name":704,"type":859},"(keys: string[], state: Partial\u003CFullNodeState\u003CNS>>) => void","批量设置节点状态，比逐个调用少一次重绘。",[853,862,865],{"name":863,"type":864},"setEdgeState","(key: string, state: Partial\u003CFullEdgeState\u003CES>>) => void","设置单条边的状态。",[853,867,870],{"name":868,"type":869},"setEdgesState","(keys: string[], state: Partial\u003CFullEdgeState\u003CES>>) => void","批量设置边状态。",[853,872,875],{"name":873,"type":874},"setGraphState","(state: Partial\u003CFullGraphState\u003CGS>>) => void","设置图级状态。",[853,877,880,881,773],{"name":878,"type":879},"getNodeState","(key: string) => FullNodeState\u003CNS> | undefined","读取节点状态，实例未就绪时为 ",[110,882,772],{},[853,884,887],{"name":885,"type":886},"getEdgeState","(key: string) => FullEdgeState\u003CES> | undefined","读取边状态。",[853,889,892],{"name":890,"type":891},"getGraphState","() => FullGraphState\u003CGS> | undefined","读取图级状态。",[87,894,895,898,899,902],{},[110,896,897],{},"FullNodeState"," 等来自 ",[110,900,901],{},"sigma\u002Ftypes","。本库自己的类型从根出口取：",[103,904,906],{"className":682,"code":905,"language":684,"meta":99,"style":99},"import type { UseSigmaStateReturn } from '@movk\u002Fsigma'\n",[110,907,908],{"__ignoreMap":99},[114,909,910,912,914,917,919],{"class":116,"line":117},[114,911,167],{"class":691},[114,913,172],{"class":691},[114,915,916],{"class":694}," { UseSigmaStateReturn } ",[114,918,182],{"class":691},[114,920,187],{"class":728},[639,922,923],{},"html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":99,"searchDepth":160,"depth":160,"links":925},[926,927],{"id":655,"depth":160,"text":655},{"id":776,"depth":160,"text":777,"children":928},[929],{"id":781,"depth":190,"text":782},"base",null,"md",{},"\u002Fdocs\u002Fcomposables\u002Fuse-sigma-state",{"title":648,"description":936},"Read and write sigma interaction state so that hover, highlight and hidden flags never pollute the graph data.",{"loc":934},"docs\u002F3.composables\u002F06.use-sigma-state","hrAoY2iMtkBRHTitjWcrVBXd8EZqzazp2pRDPwWwem8",[941],{"title":942,"path":943,"stem":944,"children":945,"page":7},"Docs","\u002Fdocs","docs",[946,987,1049,1133],{"title":947,"path":948,"stem":949,"children":950,"category":931,"description":931,"icon":986},"开始","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started\u002F1.index",[951,954,959,964],{"title":952,"path":948,"stem":949,"category":931,"description":953},"简介","Movk Sigma 是基于 sigma v4 的知识图谱可视化 Nuxt 模块，为 Vue 3 \u002F Nuxt 4 提供声明式组件与 composables。",{"title":955,"path":956,"stem":957,"category":931,"description":958},"安装","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F1.getting-started\u002F2.installation","安装 Movk Sigma 与必需的 peer 依赖，按需补装布局、分析、渲染程序等可选包。",{"title":960,"path":961,"stem":962,"category":931,"description":963},"Vue + Vite","\u002Fdocs\u002Fgetting-started\u002Fvue","docs\u002F1.getting-started\u002F3.vue","在纯 Vue 3 + Vite 项目中经 @movk\u002Fsigma\u002Fvite、@movk\u002Fsigma\u002Fvue 与 vue-plugin 使用同一套组件与 composables。",{"title":965,"category":931,"description":931,"icon":966,"path":967,"stem":968,"children":969,"page":7},"AI 集成","i-lucide-bot","\u002Fdocs\u002Fgetting-started\u002Fai","docs\u002F1.getting-started\u002Fai",[970,976,981],{"title":971,"path":972,"stem":973,"category":974,"description":975},"MCP Server","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fmcp","docs\u002F1.getting-started\u002Fai\u002F1.mcp","ai","文档站内置 MCP Server，供 AI 智能体检索本库组件、composables、示例，并提供 styles 绑定与渲染原语等增强工具。",{"title":977,"path":978,"stem":979,"category":974,"description":980},"llms.txt","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fllms-txt","docs\u002F1.getting-started\u002Fai\u002F2.llms-txt","文档站自动生成 llms.txt 与 llms-full.txt，为大模型提供结构化的库能力与文档索引。",{"title":982,"path":983,"stem":984,"category":974,"description":985},"Agent Skills","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fskills","docs\u002F1.getting-started\u002Fai\u002F3.skills","文档站发布 movk-sigma Agent Skill，让 AI 工具一条命令即可学会用本库声明式地构建知识图谱。","i-lucide-square-play",{"title":988,"category":931,"description":931,"icon":989,"path":990,"stem":991,"children":992,"page":7},"组件","i-lucide-box","\u002Fdocs\u002Fcomponents","docs\u002F2.components",[993,998,1003,1008,1013,1018,1024,1029,1034,1039,1044],{"title":505,"path":994,"stem":995,"category":996,"description":997},"\u002Fdocs\u002Fcomponents\u002Fgraph","docs\u002F2.components\u002F01.graph","core","根组件。创建 Sigma 实例与 graphology 图，下发上下文，透传配置，转发全部 sigma 事件。",{"title":999,"path":1000,"stem":1001,"category":996,"description":1002},"SigmaOverlay","\u002Fdocs\u002Fcomponents\u002Foverlay","docs\u002F2.components\u002F02.overlay","跟随画布定位的 DOM 覆盖层，可锚定到节点或图坐标，缩放平移时自动同步位置。",{"title":1004,"path":1005,"stem":1006,"category":996,"description":1007},"SigmaTooltip","\u002Fdocs\u002Fcomponents\u002Ftooltip","docs\u002F2.components\u002F03.tooltip","悬浮或点击节点与边时弹出的提示层，默认展示 label，可用插槽完全接管内容。",{"title":1009,"path":1010,"stem":1011,"category":996,"description":1012},"SigmaPopover","\u002Fdocs\u002Fcomponents\u002Fpopover","docs\u002F2.components\u002F04.popover","锚定到节点的常驻浮层，内部可交互，开合状态由 v-model:open 控制。",{"title":1014,"path":1015,"stem":1016,"category":996,"description":1017},"SigmaContextMenu","\u002Fdocs\u002Fcomponents\u002Fcontext-menu","docs\u002F2.components\u002F05.context-menu","右键节点、边或空白处弹出的菜单，自动压掉浏览器原生菜单。",{"title":1019,"path":1020,"stem":1021,"category":1022,"description":1023},"SigmaControls","\u002Fdocs\u002Fcomponents\u002Fcontrols","docs\u002F2.components\u002F06.controls","controls","控件容器，负责八向停靠与排布方向，替使用方做掉绝对定位这件事。",{"title":1025,"path":1026,"stem":1027,"category":1022,"description":1028},"SigmaZoomControl","\u002Fdocs\u002Fcomponents\u002Fzoom-control","docs\u002F2.components\u002F07.zoom-control","放大、缩小、复位三个按钮，图标可经具名插槽替换，行为与无障碍结构由库提供。",{"title":1030,"path":1031,"stem":1032,"category":1022,"description":1033},"SigmaFullscreenControl","\u002Fdocs\u002Fcomponents\u002Ffullscreen-control","docs\u002F2.components\u002F08.fullscreen-control","全屏开关。整个 .sigma-root 一起进入全屏，覆盖层与其他控件都跟随。",{"title":1035,"path":1036,"stem":1037,"category":1022,"description":1038},"SigmaSearchControl","\u002Fdocs\u002Fcomponents\u002Fsearch-control","docs\u002F2.components\u002F09.search-control","带防抖、键盘导航与命中高亮的检索框，四个插槽可逐层接管外观，作用域连行为一起给。",{"title":1040,"path":1041,"stem":1042,"category":1022,"description":1043},"SigmaLegend","\u002Fdocs\u002Fcomponents\u002Flegend","docs\u002F2.components\u002F10.legend","按节点属性聚合的图例，点击条目切换该组显隐，插槽同时给出数据与切换行为。",{"title":1045,"path":1046,"stem":1047,"category":1022,"description":1048},"SigmaMiniMap","\u002Fdocs\u002Fcomponents\u002Fmini-map","docs\u002F2.components\u002F11.mini-map","缩略图与视口框，点击任意位置把相机平移过去。",{"title":1050,"category":931,"description":931,"icon":1051,"path":1052,"stem":1053,"children":1054,"page":7},"Composables","i-lucide-plug","\u002Fdocs\u002Fcomposables","docs\u002F3.composables",[1055,1060,1065,1070,1075,1080,1081,1087,1092,1097,1102,1107,1112,1117,1123,1128],{"title":1056,"path":1057,"stem":1058,"category":930,"description":1059},"useSigma","\u002Fdocs\u002Fcomposables\u002Fuse-sigma","docs\u002F3.composables\u002F01.use-sigma","注入当前 SigmaGraph 的上下文，拿到原生 Sigma 与 graphology 实例。",{"title":1061,"path":1062,"stem":1063,"category":930,"description":1064},"useSigmaById","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-by-id","docs\u002F3.composables\u002F02.use-sigma-by-id","按 id 取实例上下文，用于组件树之外或跨路由访问；useSigmaIds 列出全部已登记的 id。",{"title":1066,"path":1067,"stem":1068,"category":930,"description":1069},"useSigmaGraph","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-graph","docs\u002F3.composables\u002F03.use-sigma-graph","把 graphology 的变更桥接成 Vue 的响应式信号，提供 version、order、size 与变更回调。",{"title":1071,"path":1072,"stem":1073,"category":930,"description":1074},"useSigmaEvents","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-events","docs\u002F3.composables\u002F04.use-sigma-events","声明式绑定 sigma 事件，作用域销毁时自动解绑，接受根组件 emits 未覆盖的任意事件名。",{"title":1076,"path":1077,"stem":1078,"category":930,"description":1079},"useSigmaSettings","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-settings","docs\u002F3.composables\u002F05.use-sigma-settings","把响应式的配置同步到 sigma，源变化即调用 setSettings，整体透传不做键过滤。",{"title":648,"path":934,"stem":938,"category":930,"description":92},{"title":1082,"path":1083,"stem":1084,"category":1085,"description":1086},"useSigmaCamera","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-camera","docs\u002F3.composables\u002F07.use-sigma-camera","interaction","相机操作。缩放、复位、聚焦节点、避开浮层遮挡地容纳节点，以及图坐标到屏幕坐标的换算。",{"title":1088,"path":1089,"stem":1090,"category":1085,"description":1091},"useSigmaSelection","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-selection","docs\u002F3.composables\u002F08.use-sigma-selection","悬浮与选中的状态机，把焦点及其邻居写进 isHighlighted 状态，其余元素由库内规则淡出。",{"title":1093,"path":1094,"stem":1095,"category":1085,"description":1096},"useSigmaNeighborhood","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-neighborhood","docs\u002F3.composables\u002F09.use-sigma-neighborhood","以某节点为中心逐层扩散的 BFS 邻域计算，以及「点击展开」的远端增量合入。",{"title":1098,"path":1099,"stem":1100,"category":1085,"description":1101},"useSigmaDrag","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-drag","docs\u002F3.composables\u002F10.use-sigma-drag","把 sigma 的 enableNodeDrag 接进 Vue 的响应式，开关跟随 enabled，过程暴露为 dragged 与 isDragging。",{"title":1103,"path":1104,"stem":1105,"category":1085,"description":1106},"useSigmaSearch","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-search","docs\u002F3.composables\u002F11.use-sigma-search","按属性检索节点与边，结果随图变更自动重算，可把相机聚焦到命中项。",{"title":1108,"path":1109,"stem":1110,"category":1085,"description":1111},"useSigmaFilter","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-filter","docs\u002F3.composables\u002F12.use-sigma-filter","声明式过滤，落到 sigma 的 isHidden 状态上，不改动图数据本身。",{"title":1113,"path":1114,"stem":1115,"category":1085,"description":1116},"useSigmaLabelTiers","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-label-tiers","docs\u002F3.composables\u002F13.use-sigma-label-tiers","按相机比例分级显示标签，视野越广只留下越重要的那几档。",{"title":1118,"path":1119,"stem":1120,"category":1121,"description":1122},"useSigmaLayout","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-layout","docs\u002F3.composables\u002F14.use-sigma-layout","analysis","五种布局算法的统一入口，支持按连通分量分别布局，并托管 ForceAtlas2 与 Noverlap 的 worker 生命周期。",{"title":1124,"path":1125,"stem":1126,"category":1121,"description":1127},"useSigmaMetrics","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-metrics","docs\u002F3.composables\u002F15.use-sigma-metrics","图的度数、中心性与社区划分，按图版本缓存避免重复计算。",{"title":1129,"path":1130,"stem":1131,"category":1121,"description":1132},"useSigmaExport","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-export","docs\u002F3.composables\u002F16.use-sigma-export","把当前画面导出为 PNG，可取 Blob 自行处理，也可直接触发浏览器下载。",{"title":1134,"category":931,"description":931,"icon":1135,"path":1136,"stem":1137,"children":1138,"page":7},"工具函数","i-lucide-wrench","\u002Fdocs\u002Futils","docs\u002F4.utils",[1139,1144,1149,1154,1159,1164],{"title":1140,"path":1141,"stem":1142,"category":931,"description":1143},"applyGraphDiff","\u002Fdocs\u002Futils\u002Fapply-graph-diff","docs\u002F4.utils\u002F1.apply-graph-diff","把 SerializedGraph 增量同步到 graphology 实例，替代 clear() 加 import()，保留已有节点的布局坐标。",{"title":1145,"path":1146,"stem":1147,"category":931,"description":1148},"composeStyles","\u002Fdocs\u002Futils\u002Fcompose-styles","docs\u002F4.utils\u002F2.compose-styles","按序拼接多份 styles 声明，让用户规则与 DEFAULT_STYLES 共存而不是互相顶掉。",{"title":1150,"path":1151,"stem":1152,"category":931,"description":1153},"labelPlacements","\u002Fdocs\u002Futils\u002Flabel-placements","docs\u002F4.utils\u002F3.label-placements","给每个节点选一个背离邻居的标签方位，返回节点 key 到方位的映射表。",{"title":1155,"path":1156,"stem":1157,"category":931,"description":1158},"degreeToTier","\u002Fdocs\u002Futils\u002Fdegree-to-tier","docs\u002F4.utils\u002F4.degree-to-tier","按度数排名给节点分标签档位，返回节点 key 到档位的映射表，档位越小越重要。",{"title":1160,"path":1161,"stem":1162,"category":931,"description":1163},"sdfPolygon \u002F sdfStar","\u002Fdocs\u002Futils\u002Fsdf-shapes","docs\u002F4.utils\u002F5.sdf-shapes","把节点画成正多边形或星形的 SDF 形状声明，形状是与颜色正交的第二个编码维度。",{"title":1165,"path":1166,"stem":1167,"category":931,"description":1168},"defineSigmaPrimitives","\u002Fdocs\u002Futils\u002Fdefine-sigma-primitives","docs\u002F4.utils\u002F6.define-sigma-primitives","声明一份延迟加载的渲染原语，绕开 sigma 在模块顶层读取 WebGL 全局导致的 SSR 崩溃。",{"data":1170,"body":1171},{},{"type":83,"children":1172},[1173],{"type":86,"tag":87,"props":1174,"children":1175},{},[1176,1178],{"type":91,"value":1177},"Copyright © 2026 - 2026 YiXuan - ",{"type":86,"tag":114,"props":1179,"children":1182},{"className":1180},[1181],"text-highlighted",[1183],{"type":91,"value":1184},"MIT License",[1186,1187],{"title":1076,"path":1077,"stem":1078,"description":1079,"children":-1},{"title":1082,"path":1083,"stem":1084,"description":1086,"children":-1},1795515182008,"63cc32bb-ed0d-4a02-83fd-40ba6fe4b04e"]