@templmf/temp-solf-lmf 0.0.104 → 0.0.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/examples.md +13222 -0
  2. package/package.json +1 -1
  3. package/skill.md +0 -1368
package/skill.md DELETED
@@ -1,1368 +0,0 @@
1
- # G6 v5 Expert Skill(Production Edition)
2
-
3
- ````md
4
- ---
5
- name: g6-v5-expert
6
- description: |
7
- Production-grade expert skill for AntV G6 v5.
8
-
9
- Purpose:
10
- Prevent LLMs from mixing G6 v3/v4/v5 APIs and enforce
11
- correct G6 v5 architecture, runtime APIs, extension APIs,
12
- layout usage, behaviors, data structures, rendering lifecycle,
13
- and performance patterns.
14
-
15
- MUST:
16
- - Generate ONLY G6 v5 code
17
- - Prefer @antv/g6 modern APIs
18
- - Use extension-driven architecture
19
- - Use async render()
20
- - Use updateNodeData/updateEdgeData
21
- - Use register + ExtensionCategory
22
- - Use behaviors instead of legacy modes
23
- - Use Graph options schema
24
-
25
- NEVER:
26
- - Generate v3/v4 legacy APIs
27
- - Use Net / TreeGraph constructors
28
- - Use Item APIs
29
- - Use graph.data(data)
30
- - Use graph.changeData(data)
31
- - Use graph.refresh()
32
- - Use graph.updateItem()
33
- - Use graph.findById()
34
- - Use graph.getNodes()
35
- - Use graph.getEdges()
36
- - Use graph.addItem()
37
- - Use graph.removeItem()
38
- - Use graph.setMode()
39
-
40
- This skill acts as:
41
- - API correctness layer
42
- - version guardrail
43
- - architecture guideline
44
- - runtime update handbook
45
- - layout decision engine
46
- - graph rendering best practice guide
47
-
48
- version: g6-v5-only
49
- framework: "@antv/g6"
50
- priority: critical
51
-
52
- triggers:
53
- - g6
54
- - antv
55
- - graph visualization
56
- - topology
57
- - relationship graph
58
- - knowledge graph
59
- - dag
60
- - tree graph
61
- - flow graph
62
- - combo
63
- - graph editor
64
- - node edge
65
- - layout
66
- - graph canvas
67
- ---
68
-
69
- # =========================================================
70
- # CORE VERSION RULES
71
- # =========================================================
72
-
73
- CRITICAL:
74
-
75
- This skill ONLY targets:
76
-
77
- - @antv/g6 v5+
78
-
79
- Never generate:
80
- - v3 APIs
81
- - v4 APIs
82
- - deprecated APIs
83
-
84
- Do NOT mix versions.
85
-
86
- If user code contains legacy APIs:
87
- - migrate them to v5 APIs
88
- - explain migration when necessary
89
-
90
- ---
91
-
92
- # =========================================================
93
- # G6 v5 ARCHITECTURE
94
- # =========================================================
95
-
96
- G6 v5 is:
97
-
98
- - extension-driven
99
- - declarative
100
- - runtime-update-oriented
101
- - async-render-based
102
-
103
- Everything is an Extension:
104
-
105
- - Node
106
- - Edge
107
- - Combo
108
- - Layout
109
- - Behavior
110
- - Plugin
111
- - Theme
112
- - Transform
113
- - Animation
114
-
115
- Modern G6 architecture revolves around:
116
-
117
- - Graph
118
- - extensions
119
- - behaviors
120
- - layouts
121
- - runtime updates
122
-
123
- NOT:
124
- - Items
125
- - Modes
126
- - ShapeFactory
127
- - imperative item manipulation
128
-
129
- ---
130
-
131
- # =========================================================
132
- # CORRECT IMPORTS
133
- # =========================================================
134
-
135
- ALWAYS:
136
-
137
- ```ts
138
- import { Graph } from '@antv/g6';
139
- ````
140
-
141
- OR:
142
-
143
- ```ts
144
- import {
145
- Graph,
146
- register,
147
- ExtensionCategory,
148
- } from '@antv/g6';
149
- ```
150
-
151
- NEVER:
152
-
153
- ```ts
154
- import G6 from '@antv/g6';
155
- ```
156
-
157
- NEVER:
158
-
159
- ```ts
160
- const net = new G6.Net();
161
- ```
162
-
163
- NEVER:
164
-
165
- ```ts
166
- new G6.TreeGraph()
167
- ```
168
-
169
- ---
170
-
171
- # =========================================================
172
-
173
- # GRAPH INITIALIZATION
174
-
175
- # =========================================================
176
-
177
- STANDARD:
178
-
179
- ```ts
180
- const graph = new Graph({
181
- container: 'container',
182
- width: 1200,
183
- height: 800,
184
-
185
- data,
186
-
187
- node: {},
188
- edge: {},
189
- combo: {},
190
-
191
- layout: {},
192
-
193
- behaviors: [],
194
-
195
- plugins: [],
196
- });
197
-
198
- await graph.render();
199
- ```
200
-
201
- MUST:
202
-
203
- * use async render()
204
- * pass data inside constructor or setData()
205
-
206
- PREFER:
207
-
208
- * declarative config
209
-
210
- ---
211
-
212
- # =========================================================
213
-
214
- # DATA STRUCTURE
215
-
216
- # =========================================================
217
-
218
- ONLY use:
219
-
220
- ```ts
221
- {
222
- nodes: [],
223
- edges: [],
224
- combos: [],
225
- }
226
- ```
227
-
228
- Example:
229
-
230
- ```ts
231
- const data = {
232
- nodes: [
233
- {
234
- id: 'node-1',
235
- type: 'circle',
236
- style: {
237
- labelText: 'Node A',
238
- },
239
- data: {
240
- category: 'service',
241
- },
242
- },
243
- ],
244
-
245
- edges: [
246
- {
247
- source: 'node-1',
248
- target: 'node-2',
249
- type: 'line',
250
- },
251
- ],
252
-
253
- combos: [],
254
- };
255
- ```
256
-
257
- MUST:
258
-
259
- * every node has unique id
260
- * edges use source + target
261
- * style goes into style field
262
- * business fields go into data field
263
-
264
- NEVER:
265
-
266
- * mix style fields at root level
267
- * omit ids
268
-
269
- ---
270
-
271
- # =========================================================
272
-
273
- # RENDERING LIFECYCLE
274
-
275
- # =========================================================
276
-
277
- INITIAL RENDER:
278
-
279
- ```ts
280
- await graph.render();
281
- ```
282
-
283
- INCREMENTAL UPDATE:
284
-
285
- ```ts
286
- graph.updateNodeData([...]);
287
- graph.updateEdgeData([...]);
288
-
289
- graph.draw();
290
- ```
291
-
292
- FULL DATA REPLACEMENT:
293
-
294
- ```ts
295
- graph.setData(data);
296
-
297
- await graph.render();
298
- ```
299
-
300
- NEVER:
301
-
302
- ```ts
303
- graph.refresh()
304
- ```
305
-
306
- NEVER:
307
-
308
- ```ts
309
- graph.changeData()
310
- ```
311
-
312
- NEVER:
313
-
314
- ```ts
315
- graph.paint()
316
- ```
317
-
318
- NEVER:
319
-
320
- ```ts
321
- graph.data(data)
322
- ```
323
-
324
- ---
325
-
326
- # =========================================================
327
-
328
- # NODE CONFIGURATION
329
-
330
- # =========================================================
331
-
332
- GLOBAL NODE CONFIG:
333
-
334
- ```ts
335
- node: {
336
- type: 'rect',
337
-
338
- style: {
339
- size: [120, 40],
340
- fill: '#1677ff',
341
- radius: 8,
342
- labelText: 'Node',
343
- },
344
- },
345
- ```
346
-
347
- PER NODE OVERRIDE:
348
-
349
- ```ts
350
- nodes: [
351
- {
352
- id: '1',
353
- type: 'circle',
354
-
355
- style: {
356
- fill: 'red',
357
- },
358
- },
359
- ]
360
- ```
361
-
362
- COMMON NODE TYPES:
363
-
364
- * circle
365
- * rect
366
- * ellipse
367
- * diamond
368
- * triangle
369
- * image
370
- * html
371
-
372
- PREFER:
373
-
374
- * rect for topology
375
- * circle for relationships
376
- * image for avatars
377
- * html only for complex UI nodes
378
-
379
- AVOID:
380
-
381
- * massive html nodes
382
-
383
- ---
384
-
385
- # =========================================================
386
-
387
- # EDGE CONFIGURATION
388
-
389
- # =========================================================
390
-
391
- COMMON EDGE TYPES:
392
-
393
- * line
394
- * polyline
395
- * quadratic
396
- * cubic
397
- * cubic-horizontal
398
- * cubic-vertical
399
-
400
- FLOWCHARTS:
401
-
402
- * polyline
403
-
404
- RELATIONSHIPS:
405
-
406
- * cubic
407
-
408
- Example:
409
-
410
- ```ts
411
- edge: {
412
- type: 'polyline',
413
-
414
- style: {
415
- endArrow: true,
416
- stroke: '#999',
417
- },
418
- },
419
- ```
420
-
421
- ---
422
-
423
- # =========================================================
424
-
425
- # COMBO SYSTEM
426
-
427
- # =========================================================
428
-
429
- Combos are grouping containers.
430
-
431
- Use combos for:
432
-
433
- * service domains
434
- * departments
435
- * clusters
436
- * grouping
437
- * bounded contexts
438
-
439
- Example:
440
-
441
- ```ts
442
- {
443
- id: 'node-1',
444
- combo: 'backend-group',
445
- }
446
- ```
447
-
448
- Combo definition:
449
-
450
- ```ts
451
- combos: [
452
- {
453
- id: 'backend-group',
454
- style: {
455
- labelText: 'Backend',
456
- },
457
- },
458
- ]
459
- ```
460
-
461
- ---
462
-
463
- # =========================================================
464
-
465
- # LAYOUT RULES
466
-
467
- # =========================================================
468
-
469
- # DAG / FLOWCHART
470
-
471
- USE:
472
-
473
- ```ts
474
- layout: {
475
- type: 'dagre',
476
- }
477
- ```
478
-
479
- Best for:
480
-
481
- * workflow
482
- * pipeline
483
- * dependency graph
484
- * architecture graph
485
-
486
- ---
487
-
488
- # RELATIONSHIP GRAPH
489
-
490
- USE:
491
-
492
- ```ts
493
- layout: {
494
- type: 'force',
495
- }
496
- ```
497
-
498
- Best for:
499
-
500
- * knowledge graph
501
- * social graph
502
- * entity relation
503
-
504
- ---
505
-
506
- # TREE GRAPH
507
-
508
- USE:
509
-
510
- * compact-box
511
- * indented
512
- * mindmap
513
-
514
- NEVER:
515
-
516
- * force layout for trees
517
-
518
- ---
519
-
520
- # RADIAL GRAPH
521
-
522
- USE:
523
-
524
- ```ts
525
- layout: {
526
- type: 'radial',
527
- }
528
- ```
529
-
530
- Best for:
531
-
532
- * center relationship graph
533
-
534
- ---
535
-
536
- # CLUSTER GRAPH
537
-
538
- USE:
539
-
540
- ```ts
541
- layout: {
542
- type: 'combo-combined',
543
- }
544
- ```
545
-
546
- ---
547
-
548
- # GRID GRAPH
549
-
550
- USE:
551
-
552
- ```ts
553
- layout: {
554
- type: 'grid',
555
- }
556
- ```
557
-
558
- ---
559
-
560
- # CONCENTRIC GRAPH
561
-
562
- USE:
563
-
564
- ```ts
565
- layout: {
566
- type: 'concentric',
567
- }
568
- ```
569
-
570
- ---
571
-
572
- # IMPORTANT LAYOUT RULE
573
-
574
- Do NOT rerun expensive layouts frequently.
575
-
576
- Prefer:
577
-
578
- * incremental updates
579
- * stable positioning
580
- * partial updates
581
-
582
- ---
583
-
584
- # =========================================================
585
-
586
- # BEHAVIORS
587
-
588
- # =========================================================
589
-
590
- G6 v5 uses:
591
-
592
- ```ts
593
- behaviors: []
594
- ```
595
-
596
- NOT:
597
-
598
- ```ts
599
- modes: {}
600
- ```
601
-
602
- DEFAULT RECOMMENDED:
603
-
604
- ```ts
605
- behaviors: [
606
- 'drag-canvas',
607
- 'zoom-canvas',
608
- 'drag-element',
609
- ]
610
- ```
611
-
612
- COMMON BEHAVIORS:
613
-
614
- * drag-canvas
615
- * zoom-canvas
616
- * drag-element
617
- * click-select
618
- * brush-select
619
- * hover-activate
620
- * focus-element
621
- * collapse-expand
622
-
623
- ---
624
-
625
- # INTERACTIVE GRAPH
626
-
627
- Recommended:
628
-
629
- ```ts
630
- behaviors: [
631
- 'drag-canvas',
632
- 'zoom-canvas',
633
- 'drag-element',
634
- 'hover-activate',
635
- 'click-select',
636
- ]
637
- ```
638
-
639
- ---
640
-
641
- # TREE GRAPH
642
-
643
- Recommended:
644
-
645
- ```ts
646
- behaviors: [
647
- 'collapse-expand',
648
- 'drag-canvas',
649
- 'zoom-canvas',
650
- ]
651
- ```
652
-
653
- ---
654
-
655
- # =========================================================
656
-
657
- # STATES
658
-
659
- # =========================================================
660
-
661
- Use state APIs.
662
-
663
- Example:
664
-
665
- ```ts
666
- graph.setElementState(
667
- 'node-1',
668
- ['selected'],
669
- );
670
- ```
671
-
672
- COMMON STATES:
673
-
674
- * selected
675
- * active
676
- * inactive
677
- * highlighted
678
- * disabled
679
-
680
- Example:
681
-
682
- ```ts
683
- node: {
684
- state: {
685
- selected: {
686
- stroke: '#ff4d4f',
687
- lineWidth: 3,
688
- },
689
- },
690
- },
691
- ```
692
-
693
- ---
694
-
695
- # =========================================================
696
-
697
- # CUSTOM EXTENSIONS
698
-
699
- # =========================================================
700
-
701
- Register custom extensions via:
702
-
703
- ```ts
704
- register(
705
- ExtensionCategory.NODE,
706
- 'server-node',
707
- ServerNode,
708
- );
709
- ```
710
-
711
- Categories:
712
-
713
- * NODE
714
- * EDGE
715
- * COMBO
716
- * BEHAVIOR
717
- * PLUGIN
718
- * TRANSFORM
719
-
720
- NEVER use:
721
-
722
- * old registerNode
723
- * old registerEdge
724
- * old registerBehavior
725
-
726
- ---
727
-
728
- # CUSTOM NODE
729
-
730
- # =========================================================
731
-
732
- Use custom node for:
733
-
734
- * topology card
735
- * service card
736
- * monitoring node
737
- * server card
738
- * status panel
739
- * React/Vue node
740
-
741
- Example:
742
-
743
- ```ts
744
- register(
745
- ExtensionCategory.NODE,
746
- 'service-node',
747
- ServiceNode,
748
- );
749
- ```
750
-
751
- Usage:
752
-
753
- ```ts
754
- node: {
755
- type: 'service-node',
756
- }
757
- ```
758
-
759
- ---
760
-
761
- # =========================================================
762
-
763
- # PLUGINS
764
-
765
- # =========================================================
766
-
767
- Plugins go into:
768
-
769
- ```ts
770
- plugins: []
771
- ```
772
-
773
- COMMON PLUGINS:
774
-
775
- * minimap
776
- * toolbar
777
- * contextmenu
778
- * tooltip
779
- * grid-line
780
- * fullscreen
781
-
782
- Example:
783
-
784
- ```ts
785
- plugins: [
786
- {
787
- type: 'minimap',
788
- },
789
- ]
790
- ```
791
-
792
- ---
793
-
794
- # =========================================================
795
-
796
- # TRANSFORMS
797
-
798
- # =========================================================
799
-
800
- Use transforms for:
801
-
802
- * filtering
803
- * clustering
804
- * simplifying large graphs
805
-
806
- Transforms are preferred over:
807
-
808
- * manual data mutation loops
809
-
810
- ---
811
-
812
- # =========================================================
813
-
814
- # EVENT SYSTEM
815
-
816
- # =========================================================
817
-
818
- Example:
819
-
820
- ```ts
821
- graph.on('node:click', (event) => {
822
- console.log(event);
823
- });
824
- ```
825
-
826
- COMMON EVENTS:
827
-
828
- * node:click
829
- * edge:click
830
- * canvas:click
831
- * node:mouseenter
832
- * node:mouseleave
833
-
834
- NEVER:
835
-
836
- * use legacy event APIs
837
-
838
- ---
839
-
840
- # =========================================================
841
-
842
- # VIEW CONTROL
843
-
844
- # =========================================================
845
-
846
- Fit view:
847
-
848
- ```ts
849
- graph.fitView();
850
- ```
851
-
852
- Center:
853
-
854
- ```ts
855
- graph.focusElement('node-1');
856
- ```
857
-
858
- Zoom:
859
-
860
- ```ts
861
- graph.zoomTo(1.5);
862
- ```
863
-
864
- Translate:
865
-
866
- ```ts
867
- graph.translateBy([100, 0]);
868
- ```
869
-
870
- ---
871
-
872
- # =========================================================
873
-
874
- # RUNTIME UPDATE PATTERNS
875
-
876
- # =========================================================
877
-
878
- PREFERRED:
879
-
880
- ```ts
881
- graph.updateNodeData([
882
- {
883
- id: 'node-1',
884
- style: {
885
- fill: 'red',
886
- },
887
- },
888
- ]);
889
-
890
- graph.draw();
891
- ```
892
-
893
- AVOID:
894
-
895
- ```ts
896
- graph.render();
897
- ```
898
-
899
- for minor updates.
900
-
901
- ---
902
-
903
- # ADDING DATA
904
-
905
- # =========================================================
906
-
907
- Preferred:
908
-
909
- ```ts
910
- const current = graph.getData();
911
-
912
- graph.setData({
913
- ...current,
914
- nodes: [...current.nodes, newNode],
915
- });
916
-
917
- await graph.render();
918
- ```
919
-
920
- NEVER:
921
-
922
- ```ts
923
- graph.addItem()
924
- ```
925
-
926
- ---
927
-
928
- # REMOVING DATA
929
-
930
- # =========================================================
931
-
932
- Preferred:
933
-
934
- ```ts
935
- const data = graph.getData();
936
-
937
- graph.setData({
938
- ...data,
939
- nodes: data.nodes.filter(...),
940
- });
941
-
942
- await graph.render();
943
- ```
944
-
945
- NEVER:
946
-
947
- ```ts
948
- graph.removeItem()
949
- ```
950
-
951
- ---
952
-
953
- # =========================================================
954
-
955
- # PERFORMANCE RULES
956
-
957
- # =========================================================
958
-
959
- For large graphs:
960
-
961
- MUST:
962
-
963
- * reduce labels
964
- * reduce animations
965
- * use transforms
966
- * use clustering
967
- * paginate
968
- * lazy load
969
- * virtualize when possible
970
-
971
- AVOID:
972
-
973
- * thousands of html nodes
974
- * repeated render()
975
- * repeated force layout
976
- * heavy shadows
977
- * massive animations
978
-
979
- PREFER:
980
-
981
- * updateNodeData
982
- * updateEdgeData
983
- * draw()
984
-
985
- ---
986
-
987
- # LARGE KNOWLEDGE GRAPH
988
-
989
- # =========================================================
990
-
991
- Recommended:
992
-
993
- * force layout
994
- * hover-activate
995
- * focus-element
996
- * clustering
997
- * lazy expansion
998
- * dynamic neighbor loading
999
-
1000
- Avoid:
1001
-
1002
- * rendering all relationships initially
1003
-
1004
- ---
1005
-
1006
- # TOPOLOGY GRAPH
1007
-
1008
- # =========================================================
1009
-
1010
- Recommended:
1011
-
1012
- * dagre
1013
- * rect nodes
1014
- * polyline edges
1015
- * combos
1016
- * minimap
1017
- * grid-line
1018
-
1019
- ---
1020
-
1021
- # TREE GRAPH
1022
-
1023
- # =========================================================
1024
-
1025
- Recommended layouts:
1026
-
1027
- * compact-box
1028
- * indented
1029
- * mindmap
1030
-
1031
- Recommended behaviors:
1032
-
1033
- * collapse-expand
1034
- * zoom-canvas
1035
- * drag-canvas
1036
-
1037
- ---
1038
-
1039
- # =========================================================
1040
-
1041
- # HTML NODE RULES
1042
-
1043
- # =========================================================
1044
-
1045
- HTML nodes are expensive.
1046
-
1047
- Use ONLY when:
1048
-
1049
- * embedded UI
1050
- * buttons
1051
- * forms
1052
- * Vue/React components
1053
-
1054
- Avoid for:
1055
-
1056
- * large graphs
1057
- * thousands of nodes
1058
-
1059
- Prefer:
1060
-
1061
- * canvas nodes
1062
-
1063
- ---
1064
-
1065
- # =========================================================
1066
-
1067
- # ANIMATION RULES
1068
-
1069
- # =========================================================
1070
-
1071
- Prefer:
1072
-
1073
- * fade
1074
- * translate
1075
- * lightweight animations
1076
-
1077
- Avoid:
1078
-
1079
- * massive path animations
1080
- * continuous animations
1081
- * expensive particle effects
1082
-
1083
- ---
1084
-
1085
- # =========================================================
1086
-
1087
- # REACT INTEGRATION
1088
-
1089
- # =========================================================
1090
-
1091
- Recommended:
1092
-
1093
- ```ts
1094
- useEffect(() => {
1095
- const graph = new Graph({...});
1096
-
1097
- graph.render();
1098
-
1099
- return () => {
1100
- graph.destroy();
1101
- };
1102
- }, []);
1103
- ```
1104
-
1105
- MUST:
1106
-
1107
- * destroy graph on unmount
1108
-
1109
- AVOID:
1110
-
1111
- * recreating graph repeatedly
1112
-
1113
- ---
1114
-
1115
- # =========================================================
1116
-
1117
- # VUE INTEGRATION
1118
-
1119
- # =========================================================
1120
-
1121
- Recommended:
1122
-
1123
- ```ts
1124
- onMounted(async () => {
1125
- graph = new Graph({...});
1126
-
1127
- await graph.render();
1128
- });
1129
-
1130
- onBeforeUnmount(() => {
1131
- graph.destroy();
1132
- });
1133
- ```
1134
-
1135
- ---
1136
-
1137
- # =========================================================
1138
-
1139
- # COMMON MIGRATIONS
1140
-
1141
- # =========================================================
1142
-
1143
- OLD:
1144
-
1145
- ```ts
1146
- graph.changeData(data)
1147
- ```
1148
-
1149
- NEW:
1150
-
1151
- ```ts
1152
- graph.setData(data);
1153
-
1154
- await graph.render();
1155
- ```
1156
-
1157
- ---
1158
-
1159
- OLD:
1160
-
1161
- ```ts
1162
- graph.refresh()
1163
- ```
1164
-
1165
- NEW:
1166
-
1167
- ```ts
1168
- graph.draw()
1169
- ```
1170
-
1171
- ---
1172
-
1173
- OLD:
1174
-
1175
- ```ts
1176
- graph.updateItem()
1177
- ```
1178
-
1179
- NEW:
1180
-
1181
- ```ts
1182
- graph.updateNodeData()
1183
- graph.updateEdgeData()
1184
- ```
1185
-
1186
- ---
1187
-
1188
- OLD:
1189
-
1190
- ```ts
1191
- modes: {
1192
- default: ['drag-node']
1193
- }
1194
- ```
1195
-
1196
- NEW:
1197
-
1198
- ```ts
1199
- behaviors: ['drag-element']
1200
- ```
1201
-
1202
- ---
1203
-
1204
- OLD:
1205
-
1206
- ```ts
1207
- G6.registerNode()
1208
- ```
1209
-
1210
- NEW:
1211
-
1212
- ```ts
1213
- register(
1214
- ExtensionCategory.NODE,
1215
- ...
1216
- )
1217
- ```
1218
-
1219
- ---
1220
-
1221
- # =========================================================
1222
-
1223
- # ABSOLUTE FORBIDDEN APIs
1224
-
1225
- # =========================================================
1226
-
1227
- NEVER GENERATE:
1228
-
1229
- ```ts
1230
- graph.changeData()
1231
- graph.refresh()
1232
- graph.paint()
1233
- graph.updateItem()
1234
- graph.findById()
1235
- graph.getNodes()
1236
- graph.getEdges()
1237
- graph.addItem()
1238
- graph.removeItem()
1239
- graph.setMode()
1240
- G6.registerNode()
1241
- G6.registerEdge()
1242
- G6.registerBehavior()
1243
- new G6.TreeGraph()
1244
- new G6.Net()
1245
- ```
1246
-
1247
- These are legacy APIs.
1248
-
1249
- ---
1250
-
1251
- # =========================================================
1252
-
1253
- # AI DECISION RULES
1254
-
1255
- # =========================================================
1256
-
1257
- IF:
1258
-
1259
- * workflow
1260
- * DAG
1261
- * architecture
1262
-
1263
- THEN:
1264
-
1265
- * dagre
1266
- * rect
1267
- * polyline
1268
-
1269
- ---
1270
-
1271
- IF:
1272
-
1273
- * knowledge graph
1274
- * relationship graph
1275
-
1276
- THEN:
1277
-
1278
- * force
1279
- * circle
1280
- * cubic
1281
-
1282
- ---
1283
-
1284
- IF:
1285
-
1286
- * org chart
1287
- * tree
1288
-
1289
- THEN:
1290
-
1291
- * compact-box
1292
- * collapse-expand
1293
-
1294
- ---
1295
-
1296
- IF:
1297
-
1298
- * large graph
1299
-
1300
- THEN:
1301
-
1302
- * clustering
1303
- * transforms
1304
- * lazy load
1305
- * avoid html nodes
1306
-
1307
- ---
1308
-
1309
- IF:
1310
-
1311
- * business grouping exists
1312
-
1313
- THEN:
1314
-
1315
- * combos
1316
-
1317
- ---
1318
-
1319
- # =========================================================
1320
-
1321
- # OUTPUT REQUIREMENTS
1322
-
1323
- # =========================================================
1324
-
1325
- Generated code MUST:
1326
-
1327
- * use TypeScript when possible
1328
- * use async render()
1329
- * use Graph from @antv/g6
1330
- * follow v5 APIs only
1331
- * avoid deprecated APIs
1332
- * prefer declarative configs
1333
- * support runtime updates
1334
-
1335
- Generated examples SHOULD:
1336
-
1337
- * include behaviors
1338
- * include layout
1339
- * include proper node styles
1340
- * include cleanup logic
1341
-
1342
- ---
1343
-
1344
- # =========================================================
1345
-
1346
- # OFFICIAL REFERENCES
1347
-
1348
- # =========================================================
1349
-
1350
- Official site:
1351
- [https://g6.antv.antgroup.com/](https://g6.antv.antgroup.com/)
1352
-
1353
- GitHub:
1354
- [https://github.com/antvis/G6](https://github.com/antvis/G6)
1355
-
1356
- API docs:
1357
- [https://github.com/antvis/G6/tree/v5/packages/site/docs/api](https://github.com/antvis/G6/tree/v5/packages/site/docs/api)
1358
-
1359
- Architecture:
1360
-
1361
- * Extension system
1362
- * Runtime graph updates
1363
- * Layout system
1364
- * Behavior system
1365
-
1366
- ---
1367
-
1368
- ```