[{"data":1,"prerenderedAt":2670,"buildId":2671},["ShallowReactive",2],{"$f1bh7yb6ciyf0c":3,"$fz9ebohjo5q4p":67,"-docs-utils-define-sigma-primitives-description":98,"component-example-edgeTypeExample":111,"component-example-edgeTypeExampletdCNQ6226iiZKNkds9W7nqV771lTw8VEX0JmHKG7zWU":115,"component-example-graphPrimitivesExample":1088,"component-example-graphPrimitivesExampletdCNQ6226iiZKNkds9W7nqV771lTw8VEX0JmHKG7zWU":1092,"docs--docs-utils-define-sigma-primitives":1979,"docs-navigation-zh-CN":2423,"mdc--kyryde-key":2652,"surround--docs-utils-define-sigma-primitives":2668},{"attributes":4,"options":5,"nodes":8,"edges":40},{},{"type":6,"multi":7,"allowSelfLoops":7},"directed",true,[9,16,23,29,35],{"key":10,"attributes":11},"a",{"label":12,"x":13,"y":14,"category":15},"节点 A",0,-180,"核心",{"key":17,"attributes":18},"b",{"label":19,"x":20,"y":21,"category":22},"节点 B",170,-60,"次要",{"key":24,"attributes":25},"c",{"label":26,"x":27,"y":28,"category":22},"节点 C",105,145,{"key":30,"attributes":31},"d",{"label":32,"x":33,"y":28,"category":34},"节点 D",-105,"边缘",{"key":36,"attributes":37},"e",{"label":38,"x":39,"y":21,"category":34},"节点 E",-170,[41,45,48,51,54,58,62,64],{"source":10,"target":17,"attributes":42},{"kind":43,"label":44},"flow","关系一",{"source":10,"target":17,"attributes":46},{"kind":43,"label":47},"关系二",{"source":10,"target":17,"attributes":49},{"kind":43,"label":50},"关系三",{"source":17,"target":24,"attributes":52},{"kind":43,"label":53},"流向",{"source":24,"target":30,"attributes":55},{"kind":56,"label":57},"dependency","依赖",{"source":30,"target":36,"attributes":59},{"kind":60,"label":61},"assoc","关联",{"source":36,"target":10,"attributes":63},{"kind":60,"label":61},{"source":24,"target":24,"attributes":65},{"kind":43,"label":66},"自环",{"attributes":68,"options":69,"nodes":70,"edges":81},{},{"type":6,"multi":7,"allowSelfLoops":7},[71,73,75,77,79],{"key":10,"attributes":72},{"label":12,"x":13,"y":14,"category":15},{"key":17,"attributes":74},{"label":19,"x":20,"y":21,"category":22},{"key":24,"attributes":76},{"label":26,"x":27,"y":28,"category":22},{"key":30,"attributes":78},{"label":32,"x":33,"y":28,"category":34},{"key":36,"attributes":80},{"label":38,"x":39,"y":21,"category":34},[82,84,86,88,90,92,94,96],{"source":10,"target":17,"attributes":83},{"kind":43,"label":44},{"source":10,"target":17,"attributes":85},{"kind":43,"label":47},{"source":10,"target":17,"attributes":87},{"kind":43,"label":50},{"source":17,"target":24,"attributes":89},{"kind":43,"label":53},{"source":24,"target":30,"attributes":91},{"kind":56,"label":57},{"source":30,"target":36,"attributes":93},{"kind":60,"label":61},{"source":36,"target":10,"attributes":95},{"kind":60,"label":61},{"source":24,"target":24,"attributes":97},{"kind":43,"label":66},{"data":99,"body":100},{},{"type":101,"children":102},"root",[103],{"type":104,"tag":105,"props":106,"children":107},"element","p",{},[108],{"type":109,"value":110},"text","声明一份延迟加载的渲染原语，绕开 sigma 在模块顶层读取 WebGL 全局导致的 SSR 崩溃。",{"code":112,"filePath":113,"pascalName":114},"\u003Cscript setup lang=\"ts\">\nimport type { StylesDeclaration } from 'sigma\u002Ftypes'\n\nconst { data } = await useFetch('\u002Fapi\u002Frelations.json')\n\n\u002F**\n * path\u002Fhead 与节点的 shape 走同一套 attribute-dict 绑定：primitives 注册可用的\n * path\u002Fextremity 名字，styles 按边的 kind 属性选取，数据决定每条边用哪种线型\n *\u002F\nconst primitives = defineSigmaPrimitives(async () => {\n  const { pathLine, pathCurved, pathStep, pathLoop, extremityArrow, extremityCircle } = await import('sigma\u002Frendering')\n\n  return {\n    edges: {\n      paths: [pathLine(), pathCurved(), pathStep(), pathLoop()],\n      extremities: [extremityArrow(), extremityCircle()]\n    }\n  }\n})\n\nconst styles: StylesDeclaration = {\n  nodes: {\n    color: '#64748b',\n    size: 14\n  },\n  edges: {\n    path: { attribute: 'kind', dict: { assoc: 'line', flow: 'curved', dependency: 'step' }, defaultValue: 'line' },\n    head: { attribute: 'kind', dict: { flow: 'arrow', dependency: 'circle' }, defaultValue: 'none' },\n    \u002F\u002F 平行边与自环由这三个字段接管，其余边才轮到 path 按 kind 选取\n    parallelPath: 'curved',\n    parallelSpread: 3,\n    selfLoopPath: 'loop'\n  }\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSigmaGraph\n    :data=\"data\"\n    :primitives=\"primitives\"\n    :styles=\"styles\"\n    :settings=\"{ renderEdgeLabels: true }\"\n  \u002F>\n\u003C\u002Ftemplate>\n","\u002Fopt\u002Fbuildhome\u002Frepo\u002Fdocs\u002Fapp\u002Fcomponents\u002Fcontent\u002Fexamples\u002FEdgeTypeExample.vue","EdgeTypeExample",{"data":116,"body":118,"toc":1086},{"title":117,"description":117},"",{"type":101,"children":119},[120,1080],{"type":104,"tag":121,"props":122,"children":126},"pre",{"className":123,"code":124,"language":125,"meta":117,"style":117},"language-vue shiki shiki-themes github-light github-light github-dark","\u003Cscript setup lang=\"ts\">\nimport type { StylesDeclaration } from 'sigma\u002Ftypes'\n\nconst { data } = await useFetch('\u002Fapi\u002Frelations.json')\n\n\u002F**\n * path\u002Fhead 与节点的 shape 走同一套 attribute-dict 绑定：primitives 注册可用的\n * path\u002Fextremity 名字，styles 按边的 kind 属性选取，数据决定每条边用哪种线型\n *\u002F\nconst primitives = defineSigmaPrimitives(async () => {\n  const { pathLine, pathCurved, pathStep, pathLoop, extremityArrow, extremityCircle } = await import('sigma\u002Frendering')\n\n  return {\n    edges: {\n      paths: [pathLine(), pathCurved(), pathStep(), pathLoop()],\n      extremities: [extremityArrow(), extremityCircle()]\n    }\n  }\n})\n\nconst styles: StylesDeclaration = {\n  nodes: {\n    color: '#64748b',\n    size: 14\n  },\n  edges: {\n    path: { attribute: 'kind', dict: { assoc: 'line', flow: 'curved', dependency: 'step' }, defaultValue: 'line' },\n    head: { attribute: 'kind', dict: { flow: 'arrow', dependency: 'circle' }, defaultValue: 'none' },\n    \u002F\u002F 平行边与自环由这三个字段接管，其余边才轮到 path 按 kind 选取\n    parallelPath: 'curved',\n    parallelSpread: 3,\n    selfLoopPath: 'loop'\n  }\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSigmaGraph\n    :data=\"data\"\n    :primitives=\"primitives\"\n    :styles=\"styles\"\n    :settings=\"{ renderEdgeLabels: true }\"\n  \u002F>\n\u003C\u002Ftemplate>\n\n","vue",[127],{"type":104,"tag":128,"props":129,"children":130},"code",{"__ignoreMap":117},[131,176,206,215,269,277,287,296,305,314,361,455,463,476,485,528,554,563,572,581,589,620,629,660,674,683,692,750,795,804,821,839,853,861,870,887,895,912,926,957,986,1015,1055,1064],{"type":104,"tag":132,"props":133,"children":136},"span",{"class":134,"line":135},"line",1,[137,143,149,155,160,165,171],{"type":104,"tag":132,"props":138,"children":140},{"style":139},"--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8",[141],{"type":109,"value":142},"\u003C",{"type":104,"tag":132,"props":144,"children":146},{"style":145},"--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D",[147],{"type":109,"value":148},"script",{"type":104,"tag":132,"props":150,"children":152},{"style":151},"--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0",[153],{"type":109,"value":154}," setup",{"type":104,"tag":132,"props":156,"children":157},{"style":151},[158],{"type":109,"value":159}," lang",{"type":104,"tag":132,"props":161,"children":162},{"style":139},[163],{"type":109,"value":164},"=",{"type":104,"tag":132,"props":166,"children":168},{"style":167},"--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF",[169],{"type":109,"value":170},"\"ts\"",{"type":104,"tag":132,"props":172,"children":173},{"style":139},[174],{"type":109,"value":175},">\n",{"type":104,"tag":132,"props":177,"children":179},{"class":134,"line":178},2,[180,186,191,196,201],{"type":104,"tag":132,"props":181,"children":183},{"style":182},"--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583",[184],{"type":109,"value":185},"import",{"type":104,"tag":132,"props":187,"children":188},{"style":182},[189],{"type":109,"value":190}," type",{"type":104,"tag":132,"props":192,"children":193},{"style":139},[194],{"type":109,"value":195}," { StylesDeclaration } ",{"type":104,"tag":132,"props":197,"children":198},{"style":182},[199],{"type":109,"value":200},"from",{"type":104,"tag":132,"props":202,"children":203},{"style":167},[204],{"type":109,"value":205}," 'sigma\u002Ftypes'\n",{"type":104,"tag":132,"props":207,"children":209},{"class":134,"line":208},3,[210],{"type":104,"tag":132,"props":211,"children":212},{"emptyLinePlaceholder":7},[213],{"type":109,"value":214},"\n",{"type":104,"tag":132,"props":216,"children":218},{"class":134,"line":217},4,[219,224,229,235,240,244,249,254,259,264],{"type":104,"tag":132,"props":220,"children":221},{"style":182},[222],{"type":109,"value":223},"const",{"type":104,"tag":132,"props":225,"children":226},{"style":139},[227],{"type":109,"value":228}," { ",{"type":104,"tag":132,"props":230,"children":232},{"style":231},"--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF",[233],{"type":109,"value":234},"data",{"type":104,"tag":132,"props":236,"children":237},{"style":139},[238],{"type":109,"value":239}," } ",{"type":104,"tag":132,"props":241,"children":242},{"style":182},[243],{"type":109,"value":164},{"type":104,"tag":132,"props":245,"children":246},{"style":182},[247],{"type":109,"value":248}," await",{"type":104,"tag":132,"props":250,"children":251},{"style":151},[252],{"type":109,"value":253}," useFetch",{"type":104,"tag":132,"props":255,"children":256},{"style":139},[257],{"type":109,"value":258},"(",{"type":104,"tag":132,"props":260,"children":261},{"style":167},[262],{"type":109,"value":263},"'\u002Fapi\u002Frelations.json'",{"type":104,"tag":132,"props":265,"children":266},{"style":139},[267],{"type":109,"value":268},")\n",{"type":104,"tag":132,"props":270,"children":272},{"class":134,"line":271},5,[273],{"type":104,"tag":132,"props":274,"children":275},{"emptyLinePlaceholder":7},[276],{"type":109,"value":214},{"type":104,"tag":132,"props":278,"children":280},{"class":134,"line":279},6,[281],{"type":104,"tag":132,"props":282,"children":284},{"style":283},"--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D",[285],{"type":109,"value":286},"\u002F**\n",{"type":104,"tag":132,"props":288,"children":290},{"class":134,"line":289},7,[291],{"type":104,"tag":132,"props":292,"children":293},{"style":283},[294],{"type":109,"value":295}," * path\u002Fhead 与节点的 shape 走同一套 attribute-dict 绑定：primitives 注册可用的\n",{"type":104,"tag":132,"props":297,"children":299},{"class":134,"line":298},8,[300],{"type":104,"tag":132,"props":301,"children":302},{"style":283},[303],{"type":109,"value":304}," * path\u002Fextremity 名字，styles 按边的 kind 属性选取，数据决定每条边用哪种线型\n",{"type":104,"tag":132,"props":306,"children":308},{"class":134,"line":307},9,[309],{"type":104,"tag":132,"props":310,"children":311},{"style":283},[312],{"type":109,"value":313}," *\u002F\n",{"type":104,"tag":132,"props":315,"children":317},{"class":134,"line":316},10,[318,322,327,332,337,341,346,351,356],{"type":104,"tag":132,"props":319,"children":320},{"style":182},[321],{"type":109,"value":223},{"type":104,"tag":132,"props":323,"children":324},{"style":231},[325],{"type":109,"value":326}," primitives",{"type":104,"tag":132,"props":328,"children":329},{"style":182},[330],{"type":109,"value":331}," =",{"type":104,"tag":132,"props":333,"children":334},{"style":151},[335],{"type":109,"value":336}," defineSigmaPrimitives",{"type":104,"tag":132,"props":338,"children":339},{"style":139},[340],{"type":109,"value":258},{"type":104,"tag":132,"props":342,"children":343},{"style":182},[344],{"type":109,"value":345},"async",{"type":104,"tag":132,"props":347,"children":348},{"style":139},[349],{"type":109,"value":350}," () ",{"type":104,"tag":132,"props":352,"children":353},{"style":182},[354],{"type":109,"value":355},"=>",{"type":104,"tag":132,"props":357,"children":358},{"style":139},[359],{"type":109,"value":360}," {\n",{"type":104,"tag":132,"props":362,"children":364},{"class":134,"line":363},11,[365,370,374,379,384,389,393,398,402,407,411,416,420,425,429,433,437,442,446,451],{"type":104,"tag":132,"props":366,"children":367},{"style":182},[368],{"type":109,"value":369},"  const",{"type":104,"tag":132,"props":371,"children":372},{"style":139},[373],{"type":109,"value":228},{"type":104,"tag":132,"props":375,"children":376},{"style":231},[377],{"type":109,"value":378},"pathLine",{"type":104,"tag":132,"props":380,"children":381},{"style":139},[382],{"type":109,"value":383},", ",{"type":104,"tag":132,"props":385,"children":386},{"style":231},[387],{"type":109,"value":388},"pathCurved",{"type":104,"tag":132,"props":390,"children":391},{"style":139},[392],{"type":109,"value":383},{"type":104,"tag":132,"props":394,"children":395},{"style":231},[396],{"type":109,"value":397},"pathStep",{"type":104,"tag":132,"props":399,"children":400},{"style":139},[401],{"type":109,"value":383},{"type":104,"tag":132,"props":403,"children":404},{"style":231},[405],{"type":109,"value":406},"pathLoop",{"type":104,"tag":132,"props":408,"children":409},{"style":139},[410],{"type":109,"value":383},{"type":104,"tag":132,"props":412,"children":413},{"style":231},[414],{"type":109,"value":415},"extremityArrow",{"type":104,"tag":132,"props":417,"children":418},{"style":139},[419],{"type":109,"value":383},{"type":104,"tag":132,"props":421,"children":422},{"style":231},[423],{"type":109,"value":424},"extremityCircle",{"type":104,"tag":132,"props":426,"children":427},{"style":139},[428],{"type":109,"value":239},{"type":104,"tag":132,"props":430,"children":431},{"style":182},[432],{"type":109,"value":164},{"type":104,"tag":132,"props":434,"children":435},{"style":182},[436],{"type":109,"value":248},{"type":104,"tag":132,"props":438,"children":439},{"style":182},[440],{"type":109,"value":441}," import",{"type":104,"tag":132,"props":443,"children":444},{"style":139},[445],{"type":109,"value":258},{"type":104,"tag":132,"props":447,"children":448},{"style":167},[449],{"type":109,"value":450},"'sigma\u002Frendering'",{"type":104,"tag":132,"props":452,"children":453},{"style":139},[454],{"type":109,"value":268},{"type":104,"tag":132,"props":456,"children":458},{"class":134,"line":457},12,[459],{"type":104,"tag":132,"props":460,"children":461},{"emptyLinePlaceholder":7},[462],{"type":109,"value":214},{"type":104,"tag":132,"props":464,"children":466},{"class":134,"line":465},13,[467,472],{"type":104,"tag":132,"props":468,"children":469},{"style":182},[470],{"type":109,"value":471},"  return",{"type":104,"tag":132,"props":473,"children":474},{"style":139},[475],{"type":109,"value":360},{"type":104,"tag":132,"props":477,"children":479},{"class":134,"line":478},14,[480],{"type":104,"tag":132,"props":481,"children":482},{"style":139},[483],{"type":109,"value":484},"    edges: {\n",{"type":104,"tag":132,"props":486,"children":488},{"class":134,"line":487},15,[489,494,498,503,507,511,515,519,523],{"type":104,"tag":132,"props":490,"children":491},{"style":139},[492],{"type":109,"value":493},"      paths: [",{"type":104,"tag":132,"props":495,"children":496},{"style":151},[497],{"type":109,"value":378},{"type":104,"tag":132,"props":499,"children":500},{"style":139},[501],{"type":109,"value":502},"(), ",{"type":104,"tag":132,"props":504,"children":505},{"style":151},[506],{"type":109,"value":388},{"type":104,"tag":132,"props":508,"children":509},{"style":139},[510],{"type":109,"value":502},{"type":104,"tag":132,"props":512,"children":513},{"style":151},[514],{"type":109,"value":397},{"type":104,"tag":132,"props":516,"children":517},{"style":139},[518],{"type":109,"value":502},{"type":104,"tag":132,"props":520,"children":521},{"style":151},[522],{"type":109,"value":406},{"type":104,"tag":132,"props":524,"children":525},{"style":139},[526],{"type":109,"value":527},"()],\n",{"type":104,"tag":132,"props":529,"children":531},{"class":134,"line":530},16,[532,537,541,545,549],{"type":104,"tag":132,"props":533,"children":534},{"style":139},[535],{"type":109,"value":536},"      extremities: [",{"type":104,"tag":132,"props":538,"children":539},{"style":151},[540],{"type":109,"value":415},{"type":104,"tag":132,"props":542,"children":543},{"style":139},[544],{"type":109,"value":502},{"type":104,"tag":132,"props":546,"children":547},{"style":151},[548],{"type":109,"value":424},{"type":104,"tag":132,"props":550,"children":551},{"style":139},[552],{"type":109,"value":553},"()]\n",{"type":104,"tag":132,"props":555,"children":557},{"class":134,"line":556},17,[558],{"type":104,"tag":132,"props":559,"children":560},{"style":139},[561],{"type":109,"value":562},"    }\n",{"type":104,"tag":132,"props":564,"children":566},{"class":134,"line":565},18,[567],{"type":104,"tag":132,"props":568,"children":569},{"style":139},[570],{"type":109,"value":571},"  }\n",{"type":104,"tag":132,"props":573,"children":575},{"class":134,"line":574},19,[576],{"type":104,"tag":132,"props":577,"children":578},{"style":139},[579],{"type":109,"value":580},"})\n",{"type":104,"tag":132,"props":582,"children":584},{"class":134,"line":583},20,[585],{"type":104,"tag":132,"props":586,"children":587},{"emptyLinePlaceholder":7},[588],{"type":109,"value":214},{"type":104,"tag":132,"props":590,"children":592},{"class":134,"line":591},21,[593,597,602,607,612,616],{"type":104,"tag":132,"props":594,"children":595},{"style":182},[596],{"type":109,"value":223},{"type":104,"tag":132,"props":598,"children":599},{"style":231},[600],{"type":109,"value":601}," styles",{"type":104,"tag":132,"props":603,"children":604},{"style":182},[605],{"type":109,"value":606},":",{"type":104,"tag":132,"props":608,"children":609},{"style":151},[610],{"type":109,"value":611}," StylesDeclaration",{"type":104,"tag":132,"props":613,"children":614},{"style":182},[615],{"type":109,"value":331},{"type":104,"tag":132,"props":617,"children":618},{"style":139},[619],{"type":109,"value":360},{"type":104,"tag":132,"props":621,"children":623},{"class":134,"line":622},22,[624],{"type":104,"tag":132,"props":625,"children":626},{"style":139},[627],{"type":109,"value":628},"  nodes: {\n",{"type":104,"tag":132,"props":630,"children":632},{"class":134,"line":631},23,[633,638,643,651,655],{"type":104,"tag":132,"props":634,"children":635},{"style":139},[636],{"type":109,"value":637},"    color: ",{"type":104,"tag":132,"props":639,"children":640},{"style":167},[641],{"type":109,"value":642},"'",{"type":104,"tag":132,"props":644,"children":648},{"style":645,"class":646},"background-color:#64748b;color:#000000;display:inline-block;padding:0 0.15em;margin:0 -0.15em;border-radius:0.2em",[647],"shiki-color-highlight",[649],{"type":109,"value":650},"#64748b",{"type":104,"tag":132,"props":652,"children":653},{"style":167},[654],{"type":109,"value":642},{"type":104,"tag":132,"props":656,"children":657},{"style":139},[658],{"type":109,"value":659},",\n",{"type":104,"tag":132,"props":661,"children":663},{"class":134,"line":662},24,[664,669],{"type":104,"tag":132,"props":665,"children":666},{"style":139},[667],{"type":109,"value":668},"    size: ",{"type":104,"tag":132,"props":670,"children":671},{"style":231},[672],{"type":109,"value":673},"14\n",{"type":104,"tag":132,"props":675,"children":677},{"class":134,"line":676},25,[678],{"type":104,"tag":132,"props":679,"children":680},{"style":139},[681],{"type":109,"value":682},"  },\n",{"type":104,"tag":132,"props":684,"children":686},{"class":134,"line":685},26,[687],{"type":104,"tag":132,"props":688,"children":689},{"style":139},[690],{"type":109,"value":691},"  edges: {\n",{"type":104,"tag":132,"props":693,"children":695},{"class":134,"line":694},27,[696,701,706,711,716,721,726,731,736,741,745],{"type":104,"tag":132,"props":697,"children":698},{"style":139},[699],{"type":109,"value":700},"    path: { attribute: ",{"type":104,"tag":132,"props":702,"children":703},{"style":167},[704],{"type":109,"value":705},"'kind'",{"type":104,"tag":132,"props":707,"children":708},{"style":139},[709],{"type":109,"value":710},", dict: { assoc: ",{"type":104,"tag":132,"props":712,"children":713},{"style":167},[714],{"type":109,"value":715},"'line'",{"type":104,"tag":132,"props":717,"children":718},{"style":139},[719],{"type":109,"value":720},", flow: ",{"type":104,"tag":132,"props":722,"children":723},{"style":167},[724],{"type":109,"value":725},"'curved'",{"type":104,"tag":132,"props":727,"children":728},{"style":139},[729],{"type":109,"value":730},", dependency: ",{"type":104,"tag":132,"props":732,"children":733},{"style":167},[734],{"type":109,"value":735},"'step'",{"type":104,"tag":132,"props":737,"children":738},{"style":139},[739],{"type":109,"value":740}," }, defaultValue: ",{"type":104,"tag":132,"props":742,"children":743},{"style":167},[744],{"type":109,"value":715},{"type":104,"tag":132,"props":746,"children":747},{"style":139},[748],{"type":109,"value":749}," },\n",{"type":104,"tag":132,"props":751,"children":753},{"class":134,"line":752},28,[754,759,763,768,773,777,782,786,791],{"type":104,"tag":132,"props":755,"children":756},{"style":139},[757],{"type":109,"value":758},"    head: { attribute: ",{"type":104,"tag":132,"props":760,"children":761},{"style":167},[762],{"type":109,"value":705},{"type":104,"tag":132,"props":764,"children":765},{"style":139},[766],{"type":109,"value":767},", dict: { flow: ",{"type":104,"tag":132,"props":769,"children":770},{"style":167},[771],{"type":109,"value":772},"'arrow'",{"type":104,"tag":132,"props":774,"children":775},{"style":139},[776],{"type":109,"value":730},{"type":104,"tag":132,"props":778,"children":779},{"style":167},[780],{"type":109,"value":781},"'circle'",{"type":104,"tag":132,"props":783,"children":784},{"style":139},[785],{"type":109,"value":740},{"type":104,"tag":132,"props":787,"children":788},{"style":167},[789],{"type":109,"value":790},"'none'",{"type":104,"tag":132,"props":792,"children":793},{"style":139},[794],{"type":109,"value":749},{"type":104,"tag":132,"props":796,"children":798},{"class":134,"line":797},29,[799],{"type":104,"tag":132,"props":800,"children":801},{"style":283},[802],{"type":109,"value":803},"    \u002F\u002F 平行边与自环由这三个字段接管，其余边才轮到 path 按 kind 选取\n",{"type":104,"tag":132,"props":805,"children":807},{"class":134,"line":806},30,[808,813,817],{"type":104,"tag":132,"props":809,"children":810},{"style":139},[811],{"type":109,"value":812},"    parallelPath: ",{"type":104,"tag":132,"props":814,"children":815},{"style":167},[816],{"type":109,"value":725},{"type":104,"tag":132,"props":818,"children":819},{"style":139},[820],{"type":109,"value":659},{"type":104,"tag":132,"props":822,"children":824},{"class":134,"line":823},31,[825,830,835],{"type":104,"tag":132,"props":826,"children":827},{"style":139},[828],{"type":109,"value":829},"    parallelSpread: ",{"type":104,"tag":132,"props":831,"children":832},{"style":231},[833],{"type":109,"value":834},"3",{"type":104,"tag":132,"props":836,"children":837},{"style":139},[838],{"type":109,"value":659},{"type":104,"tag":132,"props":840,"children":842},{"class":134,"line":841},32,[843,848],{"type":104,"tag":132,"props":844,"children":845},{"style":139},[846],{"type":109,"value":847},"    selfLoopPath: ",{"type":104,"tag":132,"props":849,"children":850},{"style":167},[851],{"type":109,"value":852},"'loop'\n",{"type":104,"tag":132,"props":854,"children":856},{"class":134,"line":855},33,[857],{"type":104,"tag":132,"props":858,"children":859},{"style":139},[860],{"type":109,"value":571},{"type":104,"tag":132,"props":862,"children":864},{"class":134,"line":863},34,[865],{"type":104,"tag":132,"props":866,"children":867},{"style":139},[868],{"type":109,"value":869},"}\n",{"type":104,"tag":132,"props":871,"children":873},{"class":134,"line":872},35,[874,879,883],{"type":104,"tag":132,"props":875,"children":876},{"style":139},[877],{"type":109,"value":878},"\u003C\u002F",{"type":104,"tag":132,"props":880,"children":881},{"style":145},[882],{"type":109,"value":148},{"type":104,"tag":132,"props":884,"children":885},{"style":139},[886],{"type":109,"value":175},{"type":104,"tag":132,"props":888,"children":890},{"class":134,"line":889},36,[891],{"type":104,"tag":132,"props":892,"children":893},{"emptyLinePlaceholder":7},[894],{"type":109,"value":214},{"type":104,"tag":132,"props":896,"children":898},{"class":134,"line":897},37,[899,903,908],{"type":104,"tag":132,"props":900,"children":901},{"style":139},[902],{"type":109,"value":142},{"type":104,"tag":132,"props":904,"children":905},{"style":145},[906],{"type":109,"value":907},"template",{"type":104,"tag":132,"props":909,"children":910},{"style":139},[911],{"type":109,"value":175},{"type":104,"tag":132,"props":913,"children":915},{"class":134,"line":914},38,[916,921],{"type":104,"tag":132,"props":917,"children":918},{"style":139},[919],{"type":109,"value":920},"  \u003C",{"type":104,"tag":132,"props":922,"children":923},{"style":145},[924],{"type":109,"value":925},"SigmaGraph\n",{"type":104,"tag":132,"props":927,"children":929},{"class":134,"line":928},39,[930,935,939,943,948,952],{"type":104,"tag":132,"props":931,"children":932},{"style":139},[933],{"type":109,"value":934},"    :",{"type":104,"tag":132,"props":936,"children":937},{"style":151},[938],{"type":109,"value":234},{"type":104,"tag":132,"props":940,"children":941},{"style":139},[942],{"type":109,"value":164},{"type":104,"tag":132,"props":944,"children":945},{"style":167},[946],{"type":109,"value":947},"\"",{"type":104,"tag":132,"props":949,"children":950},{"style":139},[951],{"type":109,"value":234},{"type":104,"tag":132,"props":953,"children":954},{"style":167},[955],{"type":109,"value":956},"\"\n",{"type":104,"tag":132,"props":958,"children":960},{"class":134,"line":959},40,[961,965,970,974,978,982],{"type":104,"tag":132,"props":962,"children":963},{"style":139},[964],{"type":109,"value":934},{"type":104,"tag":132,"props":966,"children":967},{"style":151},[968],{"type":109,"value":969},"primitives",{"type":104,"tag":132,"props":971,"children":972},{"style":139},[973],{"type":109,"value":164},{"type":104,"tag":132,"props":975,"children":976},{"style":167},[977],{"type":109,"value":947},{"type":104,"tag":132,"props":979,"children":980},{"style":139},[981],{"type":109,"value":969},{"type":104,"tag":132,"props":983,"children":984},{"style":167},[985],{"type":109,"value":956},{"type":104,"tag":132,"props":987,"children":989},{"class":134,"line":988},41,[990,994,999,1003,1007,1011],{"type":104,"tag":132,"props":991,"children":992},{"style":139},[993],{"type":109,"value":934},{"type":104,"tag":132,"props":995,"children":996},{"style":151},[997],{"type":109,"value":998},"styles",{"type":104,"tag":132,"props":1000,"children":1001},{"style":139},[1002],{"type":109,"value":164},{"type":104,"tag":132,"props":1004,"children":1005},{"style":167},[1006],{"type":109,"value":947},{"type":104,"tag":132,"props":1008,"children":1009},{"style":139},[1010],{"type":109,"value":998},{"type":104,"tag":132,"props":1012,"children":1013},{"style":167},[1014],{"type":109,"value":956},{"type":104,"tag":132,"props":1016,"children":1018},{"class":134,"line":1017},42,[1019,1023,1028,1032,1036,1041,1046,1051],{"type":104,"tag":132,"props":1020,"children":1021},{"style":139},[1022],{"type":109,"value":934},{"type":104,"tag":132,"props":1024,"children":1025},{"style":151},[1026],{"type":109,"value":1027},"settings",{"type":104,"tag":132,"props":1029,"children":1030},{"style":139},[1031],{"type":109,"value":164},{"type":104,"tag":132,"props":1033,"children":1034},{"style":167},[1035],{"type":109,"value":947},{"type":104,"tag":132,"props":1037,"children":1038},{"style":139},[1039],{"type":109,"value":1040},"{ renderEdgeLabels: ",{"type":104,"tag":132,"props":1042,"children":1043},{"style":231},[1044],{"type":109,"value":1045},"true",{"type":104,"tag":132,"props":1047,"children":1048},{"style":139},[1049],{"type":109,"value":1050}," }",{"type":104,"tag":132,"props":1052,"children":1053},{"style":167},[1054],{"type":109,"value":956},{"type":104,"tag":132,"props":1056,"children":1058},{"class":134,"line":1057},43,[1059],{"type":104,"tag":132,"props":1060,"children":1061},{"style":139},[1062],{"type":109,"value":1063},"  \u002F>\n",{"type":104,"tag":132,"props":1065,"children":1067},{"class":134,"line":1066},44,[1068,1072,1076],{"type":104,"tag":132,"props":1069,"children":1070},{"style":139},[1071],{"type":109,"value":878},{"type":104,"tag":132,"props":1073,"children":1074},{"style":145},[1075],{"type":109,"value":907},{"type":104,"tag":132,"props":1077,"children":1078},{"style":139},[1079],{"type":109,"value":175},{"type":104,"tag":1081,"props":1082,"children":1083},"style",{},[1084],{"type":109,"value":1085},"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":117,"searchDepth":178,"depth":178,"links":1087},[],{"code":1089,"filePath":1090,"pascalName":1091},"\u003Cscript setup lang=\"ts\">\nimport type { StylesDeclaration } from 'sigma\u002Ftypes'\n\nconst { data } = await useFetch('\u002Fapi\u002Frelations.json')\n\nconst primitives = defineSigmaPrimitives(async () => {\n  const { sdfCircle, layerFill, pathLine, pathCurved, pathLoop, extremityArrow } = await import('sigma\u002Frendering')\n\n  return {\n    nodes: {\n      shapes: [sdfCircle(), sdfPolygon({ name: 'hexagon', sides: 6 })],\n      layers: [layerFill()]\n    },\n    edges: {\n      paths: [pathLine(), pathCurved(), pathLoop()],\n      extremities: [extremityArrow()]\n    }\n  }\n})\n\nconst styles: StylesDeclaration = {\n  nodes: {\n    shape: { attribute: 'category', dict: { 核心: 'hexagon', 次要: 'hexagon' }, defaultValue: 'circle' },\n    color: { attribute: 'category', dict: { 核心: '#f43f5e', 次要: '#3b82f6', 边缘: '#22c55e' }, defaultValue: '#64748b' },\n    size: { attribute: 'category', dict: { 核心: 16, 次要: 14, 边缘: 12 }, defaultValue: 12 }\n  },\n  edges: {\n    parallelPath: 'curved',\n    parallelSpread: 3,\n    selfLoopPath: 'loop',\n    head: 'arrow'\n  }\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSigmaGraph\n    :data=\"data\"\n    :primitives=\"primitives\"\n    :styles=\"styles\"\n  \u002F>\n\u003C\u002Ftemplate>\n","\u002Fopt\u002Fbuildhome\u002Frepo\u002Fdocs\u002Fapp\u002Fcomponents\u002Fcontent\u002Fexamples\u002FGraphPrimitivesExample.vue","GraphPrimitivesExample",{"data":1093,"body":1094,"toc":1977},{"title":117,"description":117},{"type":101,"children":1095},[1096,1973],{"type":104,"tag":121,"props":1097,"children":1099},{"className":123,"code":1098,"language":125,"meta":117,"style":117},"\u003Cscript setup lang=\"ts\">\nimport type { StylesDeclaration } from 'sigma\u002Ftypes'\n\nconst { data } = await useFetch('\u002Fapi\u002Frelations.json')\n\nconst primitives = defineSigmaPrimitives(async () => {\n  const { sdfCircle, layerFill, pathLine, pathCurved, pathLoop, extremityArrow } = await import('sigma\u002Frendering')\n\n  return {\n    nodes: {\n      shapes: [sdfCircle(), sdfPolygon({ name: 'hexagon', sides: 6 })],\n      layers: [layerFill()]\n    },\n    edges: {\n      paths: [pathLine(), pathCurved(), pathLoop()],\n      extremities: [extremityArrow()]\n    }\n  }\n})\n\nconst styles: StylesDeclaration = {\n  nodes: {\n    shape: { attribute: 'category', dict: { 核心: 'hexagon', 次要: 'hexagon' }, defaultValue: 'circle' },\n    color: { attribute: 'category', dict: { 核心: '#f43f5e', 次要: '#3b82f6', 边缘: '#22c55e' }, defaultValue: '#64748b' },\n    size: { attribute: 'category', dict: { 核心: 16, 次要: 14, 边缘: 12 }, defaultValue: 12 }\n  },\n  edges: {\n    parallelPath: 'curved',\n    parallelSpread: 3,\n    selfLoopPath: 'loop',\n    head: 'arrow'\n  }\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSigmaGraph\n    :data=\"data\"\n    :primitives=\"primitives\"\n    :styles=\"styles\"\n  \u002F>\n\u003C\u002Ftemplate>\n\n",[1100],{"type":104,"tag":128,"props":1101,"children":1102},{"__ignoreMap":117},[1103,1134,1157,1164,1207,1214,1253,1338,1345,1356,1364,1410,1426,1434,1441,1472,1487,1494,1501,1508,1515,1542,1549,1592,1683,1735,1742,1749,1764,1779,1795,1808,1815,1822,1837,1844,1859,1870,1897,1924,1951,1958],{"type":104,"tag":132,"props":1104,"children":1105},{"class":134,"line":135},[1106,1110,1114,1118,1122,1126,1130],{"type":104,"tag":132,"props":1107,"children":1108},{"style":139},[1109],{"type":109,"value":142},{"type":104,"tag":132,"props":1111,"children":1112},{"style":145},[1113],{"type":109,"value":148},{"type":104,"tag":132,"props":1115,"children":1116},{"style":151},[1117],{"type":109,"value":154},{"type":104,"tag":132,"props":1119,"children":1120},{"style":151},[1121],{"type":109,"value":159},{"type":104,"tag":132,"props":1123,"children":1124},{"style":139},[1125],{"type":109,"value":164},{"type":104,"tag":132,"props":1127,"children":1128},{"style":167},[1129],{"type":109,"value":170},{"type":104,"tag":132,"props":1131,"children":1132},{"style":139},[1133],{"type":109,"value":175},{"type":104,"tag":132,"props":1135,"children":1136},{"class":134,"line":178},[1137,1141,1145,1149,1153],{"type":104,"tag":132,"props":1138,"children":1139},{"style":182},[1140],{"type":109,"value":185},{"type":104,"tag":132,"props":1142,"children":1143},{"style":182},[1144],{"type":109,"value":190},{"type":104,"tag":132,"props":1146,"children":1147},{"style":139},[1148],{"type":109,"value":195},{"type":104,"tag":132,"props":1150,"children":1151},{"style":182},[1152],{"type":109,"value":200},{"type":104,"tag":132,"props":1154,"children":1155},{"style":167},[1156],{"type":109,"value":205},{"type":104,"tag":132,"props":1158,"children":1159},{"class":134,"line":208},[1160],{"type":104,"tag":132,"props":1161,"children":1162},{"emptyLinePlaceholder":7},[1163],{"type":109,"value":214},{"type":104,"tag":132,"props":1165,"children":1166},{"class":134,"line":217},[1167,1171,1175,1179,1183,1187,1191,1195,1199,1203],{"type":104,"tag":132,"props":1168,"children":1169},{"style":182},[1170],{"type":109,"value":223},{"type":104,"tag":132,"props":1172,"children":1173},{"style":139},[1174],{"type":109,"value":228},{"type":104,"tag":132,"props":1176,"children":1177},{"style":231},[1178],{"type":109,"value":234},{"type":104,"tag":132,"props":1180,"children":1181},{"style":139},[1182],{"type":109,"value":239},{"type":104,"tag":132,"props":1184,"children":1185},{"style":182},[1186],{"type":109,"value":164},{"type":104,"tag":132,"props":1188,"children":1189},{"style":182},[1190],{"type":109,"value":248},{"type":104,"tag":132,"props":1192,"children":1193},{"style":151},[1194],{"type":109,"value":253},{"type":104,"tag":132,"props":1196,"children":1197},{"style":139},[1198],{"type":109,"value":258},{"type":104,"tag":132,"props":1200,"children":1201},{"style":167},[1202],{"type":109,"value":263},{"type":104,"tag":132,"props":1204,"children":1205},{"style":139},[1206],{"type":109,"value":268},{"type":104,"tag":132,"props":1208,"children":1209},{"class":134,"line":271},[1210],{"type":104,"tag":132,"props":1211,"children":1212},{"emptyLinePlaceholder":7},[1213],{"type":109,"value":214},{"type":104,"tag":132,"props":1215,"children":1216},{"class":134,"line":279},[1217,1221,1225,1229,1233,1237,1241,1245,1249],{"type":104,"tag":132,"props":1218,"children":1219},{"style":182},[1220],{"type":109,"value":223},{"type":104,"tag":132,"props":1222,"children":1223},{"style":231},[1224],{"type":109,"value":326},{"type":104,"tag":132,"props":1226,"children":1227},{"style":182},[1228],{"type":109,"value":331},{"type":104,"tag":132,"props":1230,"children":1231},{"style":151},[1232],{"type":109,"value":336},{"type":104,"tag":132,"props":1234,"children":1235},{"style":139},[1236],{"type":109,"value":258},{"type":104,"tag":132,"props":1238,"children":1239},{"style":182},[1240],{"type":109,"value":345},{"type":104,"tag":132,"props":1242,"children":1243},{"style":139},[1244],{"type":109,"value":350},{"type":104,"tag":132,"props":1246,"children":1247},{"style":182},[1248],{"type":109,"value":355},{"type":104,"tag":132,"props":1250,"children":1251},{"style":139},[1252],{"type":109,"value":360},{"type":104,"tag":132,"props":1254,"children":1255},{"class":134,"line":289},[1256,1260,1264,1269,1273,1278,1282,1286,1290,1294,1298,1302,1306,1310,1314,1318,1322,1326,1330,1334],{"type":104,"tag":132,"props":1257,"children":1258},{"style":182},[1259],{"type":109,"value":369},{"type":104,"tag":132,"props":1261,"children":1262},{"style":139},[1263],{"type":109,"value":228},{"type":104,"tag":132,"props":1265,"children":1266},{"style":231},[1267],{"type":109,"value":1268},"sdfCircle",{"type":104,"tag":132,"props":1270,"children":1271},{"style":139},[1272],{"type":109,"value":383},{"type":104,"tag":132,"props":1274,"children":1275},{"style":231},[1276],{"type":109,"value":1277},"layerFill",{"type":104,"tag":132,"props":1279,"children":1280},{"style":139},[1281],{"type":109,"value":383},{"type":104,"tag":132,"props":1283,"children":1284},{"style":231},[1285],{"type":109,"value":378},{"type":104,"tag":132,"props":1287,"children":1288},{"style":139},[1289],{"type":109,"value":383},{"type":104,"tag":132,"props":1291,"children":1292},{"style":231},[1293],{"type":109,"value":388},{"type":104,"tag":132,"props":1295,"children":1296},{"style":139},[1297],{"type":109,"value":383},{"type":104,"tag":132,"props":1299,"children":1300},{"style":231},[1301],{"type":109,"value":406},{"type":104,"tag":132,"props":1303,"children":1304},{"style":139},[1305],{"type":109,"value":383},{"type":104,"tag":132,"props":1307,"children":1308},{"style":231},[1309],{"type":109,"value":415},{"type":104,"tag":132,"props":1311,"children":1312},{"style":139},[1313],{"type":109,"value":239},{"type":104,"tag":132,"props":1315,"children":1316},{"style":182},[1317],{"type":109,"value":164},{"type":104,"tag":132,"props":1319,"children":1320},{"style":182},[1321],{"type":109,"value":248},{"type":104,"tag":132,"props":1323,"children":1324},{"style":182},[1325],{"type":109,"value":441},{"type":104,"tag":132,"props":1327,"children":1328},{"style":139},[1329],{"type":109,"value":258},{"type":104,"tag":132,"props":1331,"children":1332},{"style":167},[1333],{"type":109,"value":450},{"type":104,"tag":132,"props":1335,"children":1336},{"style":139},[1337],{"type":109,"value":268},{"type":104,"tag":132,"props":1339,"children":1340},{"class":134,"line":298},[1341],{"type":104,"tag":132,"props":1342,"children":1343},{"emptyLinePlaceholder":7},[1344],{"type":109,"value":214},{"type":104,"tag":132,"props":1346,"children":1347},{"class":134,"line":307},[1348,1352],{"type":104,"tag":132,"props":1349,"children":1350},{"style":182},[1351],{"type":109,"value":471},{"type":104,"tag":132,"props":1353,"children":1354},{"style":139},[1355],{"type":109,"value":360},{"type":104,"tag":132,"props":1357,"children":1358},{"class":134,"line":316},[1359],{"type":104,"tag":132,"props":1360,"children":1361},{"style":139},[1362],{"type":109,"value":1363},"    nodes: {\n",{"type":104,"tag":132,"props":1365,"children":1366},{"class":134,"line":363},[1367,1372,1376,1380,1385,1390,1395,1400,1405],{"type":104,"tag":132,"props":1368,"children":1369},{"style":139},[1370],{"type":109,"value":1371},"      shapes: [",{"type":104,"tag":132,"props":1373,"children":1374},{"style":151},[1375],{"type":109,"value":1268},{"type":104,"tag":132,"props":1377,"children":1378},{"style":139},[1379],{"type":109,"value":502},{"type":104,"tag":132,"props":1381,"children":1382},{"style":151},[1383],{"type":109,"value":1384},"sdfPolygon",{"type":104,"tag":132,"props":1386,"children":1387},{"style":139},[1388],{"type":109,"value":1389},"({ name: ",{"type":104,"tag":132,"props":1391,"children":1392},{"style":167},[1393],{"type":109,"value":1394},"'hexagon'",{"type":104,"tag":132,"props":1396,"children":1397},{"style":139},[1398],{"type":109,"value":1399},", sides: ",{"type":104,"tag":132,"props":1401,"children":1402},{"style":231},[1403],{"type":109,"value":1404},"6",{"type":104,"tag":132,"props":1406,"children":1407},{"style":139},[1408],{"type":109,"value":1409}," })],\n",{"type":104,"tag":132,"props":1411,"children":1412},{"class":134,"line":457},[1413,1418,1422],{"type":104,"tag":132,"props":1414,"children":1415},{"style":139},[1416],{"type":109,"value":1417},"      layers: [",{"type":104,"tag":132,"props":1419,"children":1420},{"style":151},[1421],{"type":109,"value":1277},{"type":104,"tag":132,"props":1423,"children":1424},{"style":139},[1425],{"type":109,"value":553},{"type":104,"tag":132,"props":1427,"children":1428},{"class":134,"line":465},[1429],{"type":104,"tag":132,"props":1430,"children":1431},{"style":139},[1432],{"type":109,"value":1433},"    },\n",{"type":104,"tag":132,"props":1435,"children":1436},{"class":134,"line":478},[1437],{"type":104,"tag":132,"props":1438,"children":1439},{"style":139},[1440],{"type":109,"value":484},{"type":104,"tag":132,"props":1442,"children":1443},{"class":134,"line":487},[1444,1448,1452,1456,1460,1464,1468],{"type":104,"tag":132,"props":1445,"children":1446},{"style":139},[1447],{"type":109,"value":493},{"type":104,"tag":132,"props":1449,"children":1450},{"style":151},[1451],{"type":109,"value":378},{"type":104,"tag":132,"props":1453,"children":1454},{"style":139},[1455],{"type":109,"value":502},{"type":104,"tag":132,"props":1457,"children":1458},{"style":151},[1459],{"type":109,"value":388},{"type":104,"tag":132,"props":1461,"children":1462},{"style":139},[1463],{"type":109,"value":502},{"type":104,"tag":132,"props":1465,"children":1466},{"style":151},[1467],{"type":109,"value":406},{"type":104,"tag":132,"props":1469,"children":1470},{"style":139},[1471],{"type":109,"value":527},{"type":104,"tag":132,"props":1473,"children":1474},{"class":134,"line":530},[1475,1479,1483],{"type":104,"tag":132,"props":1476,"children":1477},{"style":139},[1478],{"type":109,"value":536},{"type":104,"tag":132,"props":1480,"children":1481},{"style":151},[1482],{"type":109,"value":415},{"type":104,"tag":132,"props":1484,"children":1485},{"style":139},[1486],{"type":109,"value":553},{"type":104,"tag":132,"props":1488,"children":1489},{"class":134,"line":556},[1490],{"type":104,"tag":132,"props":1491,"children":1492},{"style":139},[1493],{"type":109,"value":562},{"type":104,"tag":132,"props":1495,"children":1496},{"class":134,"line":565},[1497],{"type":104,"tag":132,"props":1498,"children":1499},{"style":139},[1500],{"type":109,"value":571},{"type":104,"tag":132,"props":1502,"children":1503},{"class":134,"line":574},[1504],{"type":104,"tag":132,"props":1505,"children":1506},{"style":139},[1507],{"type":109,"value":580},{"type":104,"tag":132,"props":1509,"children":1510},{"class":134,"line":583},[1511],{"type":104,"tag":132,"props":1512,"children":1513},{"emptyLinePlaceholder":7},[1514],{"type":109,"value":214},{"type":104,"tag":132,"props":1516,"children":1517},{"class":134,"line":591},[1518,1522,1526,1530,1534,1538],{"type":104,"tag":132,"props":1519,"children":1520},{"style":182},[1521],{"type":109,"value":223},{"type":104,"tag":132,"props":1523,"children":1524},{"style":231},[1525],{"type":109,"value":601},{"type":104,"tag":132,"props":1527,"children":1528},{"style":182},[1529],{"type":109,"value":606},{"type":104,"tag":132,"props":1531,"children":1532},{"style":151},[1533],{"type":109,"value":611},{"type":104,"tag":132,"props":1535,"children":1536},{"style":182},[1537],{"type":109,"value":331},{"type":104,"tag":132,"props":1539,"children":1540},{"style":139},[1541],{"type":109,"value":360},{"type":104,"tag":132,"props":1543,"children":1544},{"class":134,"line":622},[1545],{"type":104,"tag":132,"props":1546,"children":1547},{"style":139},[1548],{"type":109,"value":628},{"type":104,"tag":132,"props":1550,"children":1551},{"class":134,"line":631},[1552,1557,1562,1567,1571,1576,1580,1584,1588],{"type":104,"tag":132,"props":1553,"children":1554},{"style":139},[1555],{"type":109,"value":1556},"    shape: { attribute: ",{"type":104,"tag":132,"props":1558,"children":1559},{"style":167},[1560],{"type":109,"value":1561},"'category'",{"type":104,"tag":132,"props":1563,"children":1564},{"style":139},[1565],{"type":109,"value":1566},", dict: { 核心: ",{"type":104,"tag":132,"props":1568,"children":1569},{"style":167},[1570],{"type":109,"value":1394},{"type":104,"tag":132,"props":1572,"children":1573},{"style":139},[1574],{"type":109,"value":1575},", 次要: ",{"type":104,"tag":132,"props":1577,"children":1578},{"style":167},[1579],{"type":109,"value":1394},{"type":104,"tag":132,"props":1581,"children":1582},{"style":139},[1583],{"type":109,"value":740},{"type":104,"tag":132,"props":1585,"children":1586},{"style":167},[1587],{"type":109,"value":781},{"type":104,"tag":132,"props":1589,"children":1590},{"style":139},[1591],{"type":109,"value":749},{"type":104,"tag":132,"props":1593,"children":1594},{"class":134,"line":662},[1595,1600,1604,1608,1612,1619,1623,1627,1631,1638,1642,1647,1651,1658,1662,1666,1670,1675,1679],{"type":104,"tag":132,"props":1596,"children":1597},{"style":139},[1598],{"type":109,"value":1599},"    color: { attribute: ",{"type":104,"tag":132,"props":1601,"children":1602},{"style":167},[1603],{"type":109,"value":1561},{"type":104,"tag":132,"props":1605,"children":1606},{"style":139},[1607],{"type":109,"value":1566},{"type":104,"tag":132,"props":1609,"children":1610},{"style":167},[1611],{"type":109,"value":642},{"type":104,"tag":132,"props":1613,"children":1616},{"style":1614,"class":1615},"background-color:#f43f5e;color:#000000;display:inline-block;padding:0 0.15em;margin:0 -0.15em;border-radius:0.2em",[647],[1617],{"type":109,"value":1618},"#f43f5e",{"type":104,"tag":132,"props":1620,"children":1621},{"style":167},[1622],{"type":109,"value":642},{"type":104,"tag":132,"props":1624,"children":1625},{"style":139},[1626],{"type":109,"value":1575},{"type":104,"tag":132,"props":1628,"children":1629},{"style":167},[1630],{"type":109,"value":642},{"type":104,"tag":132,"props":1632,"children":1635},{"style":1633,"class":1634},"background-color:#3b82f6;color:#ffffff;display:inline-block;padding:0 0.15em;margin:0 -0.15em;border-radius:0.2em",[647],[1636],{"type":109,"value":1637},"#3b82f6",{"type":104,"tag":132,"props":1639,"children":1640},{"style":167},[1641],{"type":109,"value":642},{"type":104,"tag":132,"props":1643,"children":1644},{"style":139},[1645],{"type":109,"value":1646},", 边缘: ",{"type":104,"tag":132,"props":1648,"children":1649},{"style":167},[1650],{"type":109,"value":642},{"type":104,"tag":132,"props":1652,"children":1655},{"style":1653,"class":1654},"background-color:#22c55e;color:#ffffff;display:inline-block;padding:0 0.15em;margin:0 -0.15em;border-radius:0.2em",[647],[1656],{"type":109,"value":1657},"#22c55e",{"type":104,"tag":132,"props":1659,"children":1660},{"style":167},[1661],{"type":109,"value":642},{"type":104,"tag":132,"props":1663,"children":1664},{"style":139},[1665],{"type":109,"value":740},{"type":104,"tag":132,"props":1667,"children":1668},{"style":167},[1669],{"type":109,"value":642},{"type":104,"tag":132,"props":1671,"children":1673},{"style":645,"class":1672},[647],[1674],{"type":109,"value":650},{"type":104,"tag":132,"props":1676,"children":1677},{"style":167},[1678],{"type":109,"value":642},{"type":104,"tag":132,"props":1680,"children":1681},{"style":139},[1682],{"type":109,"value":749},{"type":104,"tag":132,"props":1684,"children":1685},{"class":134,"line":676},[1686,1691,1695,1699,1704,1708,1713,1717,1722,1726,1730],{"type":104,"tag":132,"props":1687,"children":1688},{"style":139},[1689],{"type":109,"value":1690},"    size: { attribute: ",{"type":104,"tag":132,"props":1692,"children":1693},{"style":167},[1694],{"type":109,"value":1561},{"type":104,"tag":132,"props":1696,"children":1697},{"style":139},[1698],{"type":109,"value":1566},{"type":104,"tag":132,"props":1700,"children":1701},{"style":231},[1702],{"type":109,"value":1703},"16",{"type":104,"tag":132,"props":1705,"children":1706},{"style":139},[1707],{"type":109,"value":1575},{"type":104,"tag":132,"props":1709,"children":1710},{"style":231},[1711],{"type":109,"value":1712},"14",{"type":104,"tag":132,"props":1714,"children":1715},{"style":139},[1716],{"type":109,"value":1646},{"type":104,"tag":132,"props":1718,"children":1719},{"style":231},[1720],{"type":109,"value":1721},"12",{"type":104,"tag":132,"props":1723,"children":1724},{"style":139},[1725],{"type":109,"value":740},{"type":104,"tag":132,"props":1727,"children":1728},{"style":231},[1729],{"type":109,"value":1721},{"type":104,"tag":132,"props":1731,"children":1732},{"style":139},[1733],{"type":109,"value":1734}," }\n",{"type":104,"tag":132,"props":1736,"children":1737},{"class":134,"line":685},[1738],{"type":104,"tag":132,"props":1739,"children":1740},{"style":139},[1741],{"type":109,"value":682},{"type":104,"tag":132,"props":1743,"children":1744},{"class":134,"line":694},[1745],{"type":104,"tag":132,"props":1746,"children":1747},{"style":139},[1748],{"type":109,"value":691},{"type":104,"tag":132,"props":1750,"children":1751},{"class":134,"line":752},[1752,1756,1760],{"type":104,"tag":132,"props":1753,"children":1754},{"style":139},[1755],{"type":109,"value":812},{"type":104,"tag":132,"props":1757,"children":1758},{"style":167},[1759],{"type":109,"value":725},{"type":104,"tag":132,"props":1761,"children":1762},{"style":139},[1763],{"type":109,"value":659},{"type":104,"tag":132,"props":1765,"children":1766},{"class":134,"line":797},[1767,1771,1775],{"type":104,"tag":132,"props":1768,"children":1769},{"style":139},[1770],{"type":109,"value":829},{"type":104,"tag":132,"props":1772,"children":1773},{"style":231},[1774],{"type":109,"value":834},{"type":104,"tag":132,"props":1776,"children":1777},{"style":139},[1778],{"type":109,"value":659},{"type":104,"tag":132,"props":1780,"children":1781},{"class":134,"line":806},[1782,1786,1791],{"type":104,"tag":132,"props":1783,"children":1784},{"style":139},[1785],{"type":109,"value":847},{"type":104,"tag":132,"props":1787,"children":1788},{"style":167},[1789],{"type":109,"value":1790},"'loop'",{"type":104,"tag":132,"props":1792,"children":1793},{"style":139},[1794],{"type":109,"value":659},{"type":104,"tag":132,"props":1796,"children":1797},{"class":134,"line":823},[1798,1803],{"type":104,"tag":132,"props":1799,"children":1800},{"style":139},[1801],{"type":109,"value":1802},"    head: ",{"type":104,"tag":132,"props":1804,"children":1805},{"style":167},[1806],{"type":109,"value":1807},"'arrow'\n",{"type":104,"tag":132,"props":1809,"children":1810},{"class":134,"line":841},[1811],{"type":104,"tag":132,"props":1812,"children":1813},{"style":139},[1814],{"type":109,"value":571},{"type":104,"tag":132,"props":1816,"children":1817},{"class":134,"line":855},[1818],{"type":104,"tag":132,"props":1819,"children":1820},{"style":139},[1821],{"type":109,"value":869},{"type":104,"tag":132,"props":1823,"children":1824},{"class":134,"line":863},[1825,1829,1833],{"type":104,"tag":132,"props":1826,"children":1827},{"style":139},[1828],{"type":109,"value":878},{"type":104,"tag":132,"props":1830,"children":1831},{"style":145},[1832],{"type":109,"value":148},{"type":104,"tag":132,"props":1834,"children":1835},{"style":139},[1836],{"type":109,"value":175},{"type":104,"tag":132,"props":1838,"children":1839},{"class":134,"line":872},[1840],{"type":104,"tag":132,"props":1841,"children":1842},{"emptyLinePlaceholder":7},[1843],{"type":109,"value":214},{"type":104,"tag":132,"props":1845,"children":1846},{"class":134,"line":889},[1847,1851,1855],{"type":104,"tag":132,"props":1848,"children":1849},{"style":139},[1850],{"type":109,"value":142},{"type":104,"tag":132,"props":1852,"children":1853},{"style":145},[1854],{"type":109,"value":907},{"type":104,"tag":132,"props":1856,"children":1857},{"style":139},[1858],{"type":109,"value":175},{"type":104,"tag":132,"props":1860,"children":1861},{"class":134,"line":897},[1862,1866],{"type":104,"tag":132,"props":1863,"children":1864},{"style":139},[1865],{"type":109,"value":920},{"type":104,"tag":132,"props":1867,"children":1868},{"style":145},[1869],{"type":109,"value":925},{"type":104,"tag":132,"props":1871,"children":1872},{"class":134,"line":914},[1873,1877,1881,1885,1889,1893],{"type":104,"tag":132,"props":1874,"children":1875},{"style":139},[1876],{"type":109,"value":934},{"type":104,"tag":132,"props":1878,"children":1879},{"style":151},[1880],{"type":109,"value":234},{"type":104,"tag":132,"props":1882,"children":1883},{"style":139},[1884],{"type":109,"value":164},{"type":104,"tag":132,"props":1886,"children":1887},{"style":167},[1888],{"type":109,"value":947},{"type":104,"tag":132,"props":1890,"children":1891},{"style":139},[1892],{"type":109,"value":234},{"type":104,"tag":132,"props":1894,"children":1895},{"style":167},[1896],{"type":109,"value":956},{"type":104,"tag":132,"props":1898,"children":1899},{"class":134,"line":928},[1900,1904,1908,1912,1916,1920],{"type":104,"tag":132,"props":1901,"children":1902},{"style":139},[1903],{"type":109,"value":934},{"type":104,"tag":132,"props":1905,"children":1906},{"style":151},[1907],{"type":109,"value":969},{"type":104,"tag":132,"props":1909,"children":1910},{"style":139},[1911],{"type":109,"value":164},{"type":104,"tag":132,"props":1913,"children":1914},{"style":167},[1915],{"type":109,"value":947},{"type":104,"tag":132,"props":1917,"children":1918},{"style":139},[1919],{"type":109,"value":969},{"type":104,"tag":132,"props":1921,"children":1922},{"style":167},[1923],{"type":109,"value":956},{"type":104,"tag":132,"props":1925,"children":1926},{"class":134,"line":959},[1927,1931,1935,1939,1943,1947],{"type":104,"tag":132,"props":1928,"children":1929},{"style":139},[1930],{"type":109,"value":934},{"type":104,"tag":132,"props":1932,"children":1933},{"style":151},[1934],{"type":109,"value":998},{"type":104,"tag":132,"props":1936,"children":1937},{"style":139},[1938],{"type":109,"value":164},{"type":104,"tag":132,"props":1940,"children":1941},{"style":167},[1942],{"type":109,"value":947},{"type":104,"tag":132,"props":1944,"children":1945},{"style":139},[1946],{"type":109,"value":998},{"type":104,"tag":132,"props":1948,"children":1949},{"style":167},[1950],{"type":109,"value":956},{"type":104,"tag":132,"props":1952,"children":1953},{"class":134,"line":988},[1954],{"type":104,"tag":132,"props":1955,"children":1956},{"style":139},[1957],{"type":109,"value":1063},{"type":104,"tag":132,"props":1959,"children":1960},{"class":134,"line":1017},[1961,1965,1969],{"type":104,"tag":132,"props":1962,"children":1963},{"style":139},[1964],{"type":109,"value":878},{"type":104,"tag":132,"props":1966,"children":1967},{"style":145},[1968],{"type":109,"value":907},{"type":104,"tag":132,"props":1970,"children":1971},{"style":139},[1972],{"type":109,"value":175},{"type":104,"tag":1081,"props":1974,"children":1975},{},[1976],{"type":109,"value":1085},{"title":117,"searchDepth":178,"depth":178,"links":1978},[],{"id":1980,"title":1981,"body":1982,"category":2413,"description":110,"difficulty":2413,"extension":2414,"index":2415,"keywords":2413,"links":2413,"meta":2416,"navigation":2413,"path":2417,"requires":2413,"seo":2418,"sitemap":2420,"stem":2421,"__hash__":2422},"docs\u002Fdocs\u002F4.utils\u002F6.define-sigma-primitives.md","defineSigmaPrimitives",{"type":1983,"value":1984,"toc":2404},"minimark",[1985,1989,2019,2022,2148,2163,2168,2194,2198,2209,2211,2282,2296,2300,2304,2344,2349,2360,2364,2379,2382,2401],[1986,1987,1988],"h2",{"id":1988},"用法",[105,1990,1991,1992,1996,1997,2000,2001,2004,2005,2004,2008,2004,2011,2014,2015,2018],{},"sigma v4 的",[1993,1994,1995],"strong",{},"每个","子路径在模块顶层就读 ",[128,1998,1999],{},"WebGL2RenderingContext","——",[128,2002,2003],{},"sigma","、",[128,2006,2007],{},"sigma\u002Frendering",[128,2009,2010],{},"sigma\u002Fprimitives",[128,2012,2013],{},"sigma\u002Ftypes"," 无一例外。服务端没有这个全局，静态 import 会让 SSR 直接 ReferenceError。这个函数把原语声明包成一个加载函数，",[128,2016,2017],{},"SigmaGraph"," 在客户端建实例前才解析它：",[2020,2021],"component-example",{"name":1091},[121,2023,2027],{"className":2024,"code":2025,"language":2026,"meta":117,"style":117},"language-ts shiki shiki-themes github-light github-light github-dark","const primitives = defineSigmaPrimitives(async () => {\n  const { sdfCircle, layerFill, pathCurved, extremityArrow } = await import('sigma\u002Frendering')\n\n  return {\n    nodes: { shapes: [sdfCircle(), sdfPolygon({ name: 'hexagon', sides: 6 })], layers: [layerFill()] },\n    edges: { paths: [pathCurved()], extremities: [extremityArrow()] }\n  }\n})\n","ts",[128,2028,2029,2053,2088,2092,2098,2125,2140,2144],{"__ignoreMap":117},[132,2030,2031,2034,2037,2039,2042,2045,2047,2049,2051],{"class":134,"line":135},[132,2032,223],{"class":2033},"s8jYJ",[132,2035,326],{"class":2036},"sBjJW",[132,2038,331],{"class":2033},[132,2040,336],{"class":2041},"snPdu",[132,2043,258],{"class":2044},"sxrX7",[132,2046,345],{"class":2033},[132,2048,350],{"class":2044},[132,2050,355],{"class":2033},[132,2052,360],{"class":2044},[132,2054,2055,2057,2059,2061,2063,2065,2067,2069,2071,2073,2075,2077,2079,2081,2083,2086],{"class":134,"line":178},[132,2056,369],{"class":2033},[132,2058,228],{"class":2044},[132,2060,1268],{"class":2036},[132,2062,383],{"class":2044},[132,2064,1277],{"class":2036},[132,2066,383],{"class":2044},[132,2068,388],{"class":2036},[132,2070,383],{"class":2044},[132,2072,415],{"class":2036},[132,2074,239],{"class":2044},[132,2076,164],{"class":2033},[132,2078,248],{"class":2033},[132,2080,441],{"class":2033},[132,2082,258],{"class":2044},[132,2084,450],{"class":2085},"sIIMD",[132,2087,268],{"class":2044},[132,2089,2090],{"class":134,"line":208},[132,2091,214],{"emptyLinePlaceholder":7},[132,2093,2094,2096],{"class":134,"line":217},[132,2095,471],{"class":2033},[132,2097,360],{"class":2044},[132,2099,2100,2103,2105,2107,2109,2111,2113,2115,2117,2120,2122],{"class":134,"line":271},[132,2101,2102],{"class":2044},"    nodes: { shapes: [",[132,2104,1268],{"class":2041},[132,2106,502],{"class":2044},[132,2108,1384],{"class":2041},[132,2110,1389],{"class":2044},[132,2112,1394],{"class":2085},[132,2114,1399],{"class":2044},[132,2116,1404],{"class":2036},[132,2118,2119],{"class":2044}," })], layers: [",[132,2121,1277],{"class":2041},[132,2123,2124],{"class":2044},"()] },\n",[132,2126,2127,2130,2132,2135,2137],{"class":134,"line":279},[132,2128,2129],{"class":2044},"    edges: { paths: [",[132,2131,388],{"class":2041},[132,2133,2134],{"class":2044},"()], extremities: [",[132,2136,415],{"class":2041},[132,2138,2139],{"class":2044},"()] }\n",[132,2141,2142],{"class":134,"line":289},[132,2143,571],{"class":2044},[132,2145,2146],{"class":134,"line":298},[132,2147,580],{"class":2044},[2149,2150,2151,2152,2162],"note",{},"本库的 ",[10,2153,2155,2158,2159],{"href":2154},"\u002Fdocs\u002Futils\u002Fsdf-shapes",[128,2156,2157],{},"sdfPolygon()"," 与 ",[128,2160,2161],{},"sdfStar()"," 返回纯数据、不引用 sigma 的任何值，可以直接写在外层。只有内置工厂函数需要延迟。",[2164,2165,2167],"h3",{"id":2166},"必须是函数不能是-promise","必须是函数，不能是 Promise",[105,2169,2170,2171,2174,2175,2178,2179,2182,2183,2186,2187,2189,2190,2193],{},"模块级的 ",[128,2172,2173],{},"import()"," 表达式在服务端同样会被求值，写成 ",[128,2176,2177],{},"import('sigma\u002Frendering').then(...)"," 一样崩。必须是一个",[1993,2180,2181],{},"函数","，组件在客户端才调用它。类型则不受影响——",[128,2184,2185],{},"import type"," 编译期擦除，从 ",[128,2188,2010],{}," 取 ",[128,2191,2192],{},"PrimitivesDeclaration"," 是安全的。",[2164,2195,2197],{"id":2196},"边的-path-head-也能按属性绑定切换","边的 path \u002F head 也能按属性绑定切换",[105,2199,2200,2201,2204,2205,2208],{},"primitives 里注册的每个 path \u002F extremity 只是一个名字，",[128,2202,2203],{},"styles.edges"," 用与节点 ",[128,2206,2207],{},"shape"," 相同的 attribute-dict 绑定机制，按边的数据选取：",[2020,2210],{"name":114},[121,2212,2214],{"className":2024,"code":2213,"language":2026,"meta":117,"style":117},"const styles = {\n  edges: {\n    path: { attribute: 'kind', dict: { assoc: 'line', flow: 'curved', dependency: 'step' }, defaultValue: 'line' },\n    head: { attribute: 'kind', dict: { flow: 'arrow', dependency: 'circle' }, defaultValue: 'none' }\n  }\n}\n",[128,2215,2216,2226,2230,2254,2274,2278],{"__ignoreMap":117},[132,2217,2218,2220,2222,2224],{"class":134,"line":135},[132,2219,223],{"class":2033},[132,2221,601],{"class":2036},[132,2223,331],{"class":2033},[132,2225,360],{"class":2044},[132,2227,2228],{"class":134,"line":178},[132,2229,691],{"class":2044},[132,2231,2232,2234,2236,2238,2240,2242,2244,2246,2248,2250,2252],{"class":134,"line":208},[132,2233,700],{"class":2044},[132,2235,705],{"class":2085},[132,2237,710],{"class":2044},[132,2239,715],{"class":2085},[132,2241,720],{"class":2044},[132,2243,725],{"class":2085},[132,2245,730],{"class":2044},[132,2247,735],{"class":2085},[132,2249,740],{"class":2044},[132,2251,715],{"class":2085},[132,2253,749],{"class":2044},[132,2255,2256,2258,2260,2262,2264,2266,2268,2270,2272],{"class":134,"line":217},[132,2257,758],{"class":2044},[132,2259,705],{"class":2085},[132,2261,767],{"class":2044},[132,2263,772],{"class":2085},[132,2265,730],{"class":2044},[132,2267,781],{"class":2085},[132,2269,740],{"class":2044},[132,2271,790],{"class":2085},[132,2273,1734],{"class":2044},[132,2275,2276],{"class":134,"line":271},[132,2277,571],{"class":2044},[132,2279,2280],{"class":134,"line":279},[132,2281,869],{"class":2044},[105,2283,2284,2285,2158,2288,2291,2292,2295],{},"sigma 默认只注册 ",[128,2286,2287],{},"pathLine()",[128,2289,2290],{},"pathLoop()","，且不带端点。曲线、阶梯线、箭头、圆点端点都要在 ",[128,2293,2294],{},"primitives.edges"," 里显式注册才能被 styles 引用。",[1986,2297,2299],{"id":2298},"api","API",[2164,2301,2303],{"id":2302},"definesigmaprimitives","defineSigmaPrimitives()",[105,2305,2306],{},[128,2307,2310,2312,2314,2317,2319,2321,2323,2326,2329,2332,2334,2336,2339,2341],{"className":2308,"language":2309,"style":117},"language-ts-type shiki shiki-themes github-light github-light github-dark","ts-type",[132,2311,1981],{"class":2041},[132,2313,258],{"class":2044},[132,2315,2316],{"class":2041},"loader",[132,2318,606],{"class":2033},[132,2320,350],{"class":2044},[132,2322,355],{"class":2033},[132,2324,2325],{"class":2041}," PrimitivesDeclaration",[132,2327,2328],{"class":2033}," |",[132,2330,2331],{"class":2041}," Promise",[132,2333,142],{"class":2044},[132,2335,2192],{"class":2041},[132,2337,2338],{"class":2044},">)",[132,2340,606],{"class":2033},[132,2342,2343],{"class":2041}," SigmaLazyPrimitives",[2345,2346,2348],"h4",{"id":2347},"parameters","Parameters",[2350,2351,2352],"field-group",{},[2353,2354,2356,2357,2359],"field",{":required":1045,"name":2316,"type":2355},"() => PrimitivesDeclaration | Promise\u003CPrimitivesDeclaration>","返回原语声明的函数，可同步可异步。",[128,2358,2017],{}," 在创建实例前调用一次。",[2345,2361,2363],{"id":2362},"returns","Returns",[105,2365,2366,2369,2370,2372,2373,2375,2376,2378],{},[128,2367,2368],{},"SigmaLazyPrimitives","，直接传给 ",[128,2371,2017],{}," 的 ",[128,2374,969],{},"。该 prop 同时接受已解析的 ",[128,2377,2192],{},"。",[105,2380,2381],{},"类型从根出口取：",[121,2383,2385],{"className":2024,"code":2384,"language":2026,"meta":117,"style":117},"import type { SigmaLazyPrimitives, SigmaPrimitivesSource } from '@movk\u002Fsigma'\n",[128,2386,2387],{"__ignoreMap":117},[132,2388,2389,2391,2393,2396,2398],{"class":134,"line":135},[132,2390,185],{"class":2033},[132,2392,190],{"class":2033},[132,2394,2395],{"class":2044}," { SigmaLazyPrimitives, SigmaPrimitivesSource } ",[132,2397,200],{"class":2033},[132,2399,2400],{"class":2085}," '@movk\u002Fsigma'\n",[1081,2402,2403],{},"html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}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 .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}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":117,"searchDepth":178,"depth":178,"links":2405},[2406,2410],{"id":1988,"depth":178,"text":1988,"children":2407},[2408,2409],{"id":2166,"depth":208,"text":2167},{"id":2196,"depth":208,"text":2197},{"id":2298,"depth":178,"text":2299,"children":2411},[2412],{"id":2302,"depth":208,"text":2303},null,"md",false,{},"\u002Fdocs\u002Futils\u002Fdefine-sigma-primitives",{"title":1981,"description":2419},"Declare lazily loaded sigma render primitives so that server-side rendering never touches WebGL globals.",{"loc":2417},"docs\u002F4.utils\u002F6.define-sigma-primitives","n2KC2cjW6vztaVEVuP1-nDUkyXDXMf2ZVdaBlqDG5bw",[2424],{"title":2425,"path":2426,"stem":2427,"children":2428,"page":2415},"Docs","\u002Fdocs","docs",[2429,2470,2532,2621],{"title":2430,"path":2431,"stem":2432,"children":2433,"category":2413,"description":2413,"icon":2469},"开始","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started\u002F1.index",[2434,2437,2442,2447],{"title":2435,"path":2431,"stem":2432,"category":2413,"description":2436},"简介","Movk Sigma 是基于 sigma v4 的知识图谱可视化 Nuxt 模块，为 Vue 3 \u002F Nuxt 4 提供声明式组件与 composables。",{"title":2438,"path":2439,"stem":2440,"category":2413,"description":2441},"安装","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F1.getting-started\u002F2.installation","安装 Movk Sigma 与必需的 peer 依赖，按需补装布局、分析、渲染程序等可选包。",{"title":2443,"path":2444,"stem":2445,"category":2413,"description":2446},"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":2448,"category":2413,"description":2413,"icon":2449,"path":2450,"stem":2451,"children":2452,"page":2415},"AI 集成","i-lucide-bot","\u002Fdocs\u002Fgetting-started\u002Fai","docs\u002F1.getting-started\u002Fai",[2453,2459,2464],{"title":2454,"path":2455,"stem":2456,"category":2457,"description":2458},"MCP Server","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fmcp","docs\u002F1.getting-started\u002Fai\u002F1.mcp","ai","文档站内置 MCP Server，供 AI 智能体检索本库组件、composables、示例，并提供 styles 绑定与渲染原语等增强工具。",{"title":2460,"path":2461,"stem":2462,"category":2457,"description":2463},"llms.txt","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fllms-txt","docs\u002F1.getting-started\u002Fai\u002F2.llms-txt","文档站自动生成 llms.txt 与 llms-full.txt，为大模型提供结构化的库能力与文档索引。",{"title":2465,"path":2466,"stem":2467,"category":2457,"description":2468},"Agent Skills","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fskills","docs\u002F1.getting-started\u002Fai\u002F3.skills","文档站发布 movk-sigma Agent Skill，让 AI 工具一条命令即可学会用本库声明式地构建知识图谱。","i-lucide-square-play",{"title":2471,"category":2413,"description":2413,"icon":2472,"path":2473,"stem":2474,"children":2475,"page":2415},"组件","i-lucide-box","\u002Fdocs\u002Fcomponents","docs\u002F2.components",[2476,2481,2486,2491,2496,2501,2507,2512,2517,2522,2527],{"title":2017,"path":2477,"stem":2478,"category":2479,"description":2480},"\u002Fdocs\u002Fcomponents\u002Fgraph","docs\u002F2.components\u002F01.graph","core","根组件。创建 Sigma 实例与 graphology 图，下发上下文，透传配置，转发全部 sigma 事件。",{"title":2482,"path":2483,"stem":2484,"category":2479,"description":2485},"SigmaOverlay","\u002Fdocs\u002Fcomponents\u002Foverlay","docs\u002F2.components\u002F02.overlay","跟随画布定位的 DOM 覆盖层，可锚定到节点或图坐标，缩放平移时自动同步位置。",{"title":2487,"path":2488,"stem":2489,"category":2479,"description":2490},"SigmaTooltip","\u002Fdocs\u002Fcomponents\u002Ftooltip","docs\u002F2.components\u002F03.tooltip","悬浮或点击节点与边时弹出的提示层，默认展示 label，可用插槽完全接管内容。",{"title":2492,"path":2493,"stem":2494,"category":2479,"description":2495},"SigmaPopover","\u002Fdocs\u002Fcomponents\u002Fpopover","docs\u002F2.components\u002F04.popover","锚定到节点的常驻浮层，内部可交互，开合状态由 v-model:open 控制。",{"title":2497,"path":2498,"stem":2499,"category":2479,"description":2500},"SigmaContextMenu","\u002Fdocs\u002Fcomponents\u002Fcontext-menu","docs\u002F2.components\u002F05.context-menu","右键节点、边或空白处弹出的菜单，自动压掉浏览器原生菜单。",{"title":2502,"path":2503,"stem":2504,"category":2505,"description":2506},"SigmaControls","\u002Fdocs\u002Fcomponents\u002Fcontrols","docs\u002F2.components\u002F06.controls","controls","控件容器，负责八向停靠与排布方向，替使用方做掉绝对定位这件事。",{"title":2508,"path":2509,"stem":2510,"category":2505,"description":2511},"SigmaZoomControl","\u002Fdocs\u002Fcomponents\u002Fzoom-control","docs\u002F2.components\u002F07.zoom-control","放大、缩小、复位三个按钮，图标可经具名插槽替换，行为与无障碍结构由库提供。",{"title":2513,"path":2514,"stem":2515,"category":2505,"description":2516},"SigmaFullscreenControl","\u002Fdocs\u002Fcomponents\u002Ffullscreen-control","docs\u002F2.components\u002F08.fullscreen-control","全屏开关。整个 .sigma-root 一起进入全屏，覆盖层与其他控件都跟随。",{"title":2518,"path":2519,"stem":2520,"category":2505,"description":2521},"SigmaSearchControl","\u002Fdocs\u002Fcomponents\u002Fsearch-control","docs\u002F2.components\u002F09.search-control","带防抖、键盘导航与命中高亮的检索框，四个插槽可逐层接管外观，作用域连行为一起给。",{"title":2523,"path":2524,"stem":2525,"category":2505,"description":2526},"SigmaLegend","\u002Fdocs\u002Fcomponents\u002Flegend","docs\u002F2.components\u002F10.legend","按节点属性聚合的图例，点击条目切换该组显隐，插槽同时给出数据与切换行为。",{"title":2528,"path":2529,"stem":2530,"category":2505,"description":2531},"SigmaMiniMap","\u002Fdocs\u002Fcomponents\u002Fmini-map","docs\u002F2.components\u002F11.mini-map","缩略图与视口框，点击任意位置把相机平移过去。",{"title":2533,"category":2413,"description":2413,"icon":2534,"path":2535,"stem":2536,"children":2537,"page":2415},"Composables","i-lucide-plug","\u002Fdocs\u002Fcomposables","docs\u002F3.composables",[2538,2544,2549,2554,2559,2564,2569,2575,2580,2585,2590,2595,2600,2605,2611,2616],{"title":2539,"path":2540,"stem":2541,"category":2542,"description":2543},"useSigma","\u002Fdocs\u002Fcomposables\u002Fuse-sigma","docs\u002F3.composables\u002F01.use-sigma","base","注入当前 SigmaGraph 的上下文，拿到原生 Sigma 与 graphology 实例。",{"title":2545,"path":2546,"stem":2547,"category":2542,"description":2548},"useSigmaById","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-by-id","docs\u002F3.composables\u002F02.use-sigma-by-id","按 id 取实例上下文，用于组件树之外或跨路由访问；useSigmaIds 列出全部已登记的 id。",{"title":2550,"path":2551,"stem":2552,"category":2542,"description":2553},"useSigmaGraph","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-graph","docs\u002F3.composables\u002F03.use-sigma-graph","把 graphology 的变更桥接成 Vue 的响应式信号，提供 version、order、size 与变更回调。",{"title":2555,"path":2556,"stem":2557,"category":2542,"description":2558},"useSigmaEvents","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-events","docs\u002F3.composables\u002F04.use-sigma-events","声明式绑定 sigma 事件，作用域销毁时自动解绑，接受根组件 emits 未覆盖的任意事件名。",{"title":2560,"path":2561,"stem":2562,"category":2542,"description":2563},"useSigmaSettings","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-settings","docs\u002F3.composables\u002F05.use-sigma-settings","把响应式的配置同步到 sigma，源变化即调用 setSettings，整体透传不做键过滤。",{"title":2565,"path":2566,"stem":2567,"category":2542,"description":2568},"useSigmaState","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-state","docs\u002F3.composables\u002F06.use-sigma-state","读写 sigma 的交互状态，把悬停、高亮、隐藏这些纯展示态存在实例内部而不污染图数据。",{"title":2570,"path":2571,"stem":2572,"category":2573,"description":2574},"useSigmaCamera","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-camera","docs\u002F3.composables\u002F07.use-sigma-camera","interaction","相机操作。缩放、复位、聚焦节点、避开浮层遮挡地容纳节点，以及图坐标到屏幕坐标的换算。",{"title":2576,"path":2577,"stem":2578,"category":2573,"description":2579},"useSigmaSelection","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-selection","docs\u002F3.composables\u002F08.use-sigma-selection","悬浮与选中的状态机，把焦点及其邻居写进 isHighlighted 状态，其余元素由库内规则淡出。",{"title":2581,"path":2582,"stem":2583,"category":2573,"description":2584},"useSigmaNeighborhood","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-neighborhood","docs\u002F3.composables\u002F09.use-sigma-neighborhood","以某节点为中心逐层扩散的 BFS 邻域计算，以及「点击展开」的远端增量合入。",{"title":2586,"path":2587,"stem":2588,"category":2573,"description":2589},"useSigmaDrag","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-drag","docs\u002F3.composables\u002F10.use-sigma-drag","把 sigma 的 enableNodeDrag 接进 Vue 的响应式，开关跟随 enabled，过程暴露为 dragged 与 isDragging。",{"title":2591,"path":2592,"stem":2593,"category":2573,"description":2594},"useSigmaSearch","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-search","docs\u002F3.composables\u002F11.use-sigma-search","按属性检索节点与边，结果随图变更自动重算，可把相机聚焦到命中项。",{"title":2596,"path":2597,"stem":2598,"category":2573,"description":2599},"useSigmaFilter","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-filter","docs\u002F3.composables\u002F12.use-sigma-filter","声明式过滤，落到 sigma 的 isHidden 状态上，不改动图数据本身。",{"title":2601,"path":2602,"stem":2603,"category":2573,"description":2604},"useSigmaLabelTiers","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-label-tiers","docs\u002F3.composables\u002F13.use-sigma-label-tiers","按相机比例分级显示标签，视野越广只留下越重要的那几档。",{"title":2606,"path":2607,"stem":2608,"category":2609,"description":2610},"useSigmaLayout","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-layout","docs\u002F3.composables\u002F14.use-sigma-layout","analysis","五种布局算法的统一入口，支持按连通分量分别布局，并托管 ForceAtlas2 与 Noverlap 的 worker 生命周期。",{"title":2612,"path":2613,"stem":2614,"category":2609,"description":2615},"useSigmaMetrics","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-metrics","docs\u002F3.composables\u002F15.use-sigma-metrics","图的度数、中心性与社区划分，按图版本缓存避免重复计算。",{"title":2617,"path":2618,"stem":2619,"category":2609,"description":2620},"useSigmaExport","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-export","docs\u002F3.composables\u002F16.use-sigma-export","把当前画面导出为 PNG，可取 Blob 自行处理，也可直接触发浏览器下载。",{"title":2622,"category":2413,"description":2413,"icon":2623,"path":2624,"stem":2625,"children":2626,"page":2415},"工具函数","i-lucide-wrench","\u002Fdocs\u002Futils","docs\u002F4.utils",[2627,2632,2637,2642,2647,2651],{"title":2628,"path":2629,"stem":2630,"category":2413,"description":2631},"applyGraphDiff","\u002Fdocs\u002Futils\u002Fapply-graph-diff","docs\u002F4.utils\u002F1.apply-graph-diff","把 SerializedGraph 增量同步到 graphology 实例，替代 clear() 加 import()，保留已有节点的布局坐标。",{"title":2633,"path":2634,"stem":2635,"category":2413,"description":2636},"composeStyles","\u002Fdocs\u002Futils\u002Fcompose-styles","docs\u002F4.utils\u002F2.compose-styles","按序拼接多份 styles 声明，让用户规则与 DEFAULT_STYLES 共存而不是互相顶掉。",{"title":2638,"path":2639,"stem":2640,"category":2413,"description":2641},"labelPlacements","\u002Fdocs\u002Futils\u002Flabel-placements","docs\u002F4.utils\u002F3.label-placements","给每个节点选一个背离邻居的标签方位，返回节点 key 到方位的映射表。",{"title":2643,"path":2644,"stem":2645,"category":2413,"description":2646},"degreeToTier","\u002Fdocs\u002Futils\u002Fdegree-to-tier","docs\u002F4.utils\u002F4.degree-to-tier","按度数排名给节点分标签档位，返回节点 key 到档位的映射表，档位越小越重要。",{"title":2648,"path":2154,"stem":2649,"category":2413,"description":2650},"sdfPolygon \u002F sdfStar","docs\u002F4.utils\u002F5.sdf-shapes","把节点画成正多边形或星形的 SDF 形状声明，形状是与颜色正交的第二个编码维度。",{"title":1981,"path":2417,"stem":2421,"category":2413,"description":110},{"data":2653,"body":2654},{},{"type":101,"children":2655},[2656],{"type":104,"tag":105,"props":2657,"children":2658},{},[2659,2661],{"type":109,"value":2660},"Copyright © 2026 - 2026 YiXuan - ",{"type":104,"tag":132,"props":2662,"children":2665},{"className":2663},[2664],"text-highlighted",[2666],{"type":109,"value":2667},"MIT License",[2669,2413],{"title":2648,"path":2154,"stem":2649,"description":2650,"children":-1},1795515181260,"63cc32bb-ed0d-4a02-83fd-40ba6fe4b04e"]