@mx-sose-front/mx-sose-graph 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +343 -0
- package/dist/index.d.ts +3937 -0
- package/dist/index.esm.js +74367 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.umd.js +38 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/style.css +1 -0
- package/package.json +70 -0
- package/src/components/ContextMenu.vue +475 -0
- package/src/components/Diagram/StrategicTaxonomyDiagram.vue +141 -0
- package/src/components/Edge/Edge.vue +366 -0
- package/src/components/InteractionLayer.vue +2033 -0
- package/src/components/Label.vue +0 -0
- package/src/components/LineStyle/ConnectionLine.vue +126 -0
- package/src/components/LineStyle/LineStyleMarker.vue +87 -0
- package/src/components/Pin/Pin.vue +220 -0
- package/src/components/Pin/Port.vue +172 -0
- package/src/components/Shape/Action.vue +121 -0
- package/src/components/Shape/ActivityAction.vue +155 -0
- package/src/components/Shape/Block.vue +306 -0
- package/src/components/Shape/ConceptualRole.vue +266 -0
- package/src/components/Shape/Diagram.vue +220 -0
- package/src/components/Shape/DividingLine.vue +594 -0
- package/src/components/Shape/DogEar.vue +224 -0
- package/src/components/Shape/Package.vue +340 -0
- package/src/constants/edgeShapeKeys.ts +81 -0
- package/src/constants/index.ts +440 -0
- package/src/index.ts +28 -0
- package/src/render/shape-registry.ts +17 -0
- package/src/render/shape-renderer.ts +103 -0
- package/src/statics/icons/childIcons/relations@3x.png +0 -0
- package/src/statics/icons/childIcons/role@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/344/277/241/345/217/267@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/344/277/241/346/201/257@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/344/277/241/346/201/257/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/217/202/346/225/260@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/257/271/350/261/241/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/211/247/350/241/214/350/200/205@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/216/245/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/216/247/345/210/266/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250/344/270/216/350/203/275/345/212/233/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/253/257/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/272/246/346/235/237@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/272/246/346/235/237/345/256/232/344/271/211/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/272/246/346/235/237/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/273/223/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/207/252/347/224/261/345/210/206/347/261/273/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/351/253/230/347/272/247/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/347/272/246/346/235/237/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/273/267/345/200/274/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//344/273/273/346/204/217/345/205/263/347/263/273@3x.png +0 -0
- package/src/statics/icons/childIcons//344/273/273/346/204/217/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/274/201/344/270/232/344/275/277/345/221/275@3x.png +0 -0
- package/src/statics/icons/childIcons//344/274/201/344/270/232/345/205/250/347/224/237/345/221/275/345/221/250/346/234/237@3x.png +0 -0
- package/src/statics/icons/childIcons//344/274/201/344/270/232/346/204/277/346/231/257@3x.png +0 -0
- package/src/statics/icons/childIcons//344/274/201/344/270/232/347/233/256/346/240/207@3x.png +0 -0
- package/src/statics/icons/childIcons//344/275/215/347/275/256@3x.png +0 -0
- package/src/statics/icons/childIcons//344/275/223/347/263/273/346/236/266/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//344/276/235/350/265/226@3x.png +0 -0
- package/src/statics/icons/childIcons//344/277/235/346/212/244@3x.png +0 -0
- package/src/statics/icons/childIcons//344/277/241/346/201/257/346/250/241/345/236/213@3x.png +0 -0
- package/src/statics/icons/childIcons//345/210/233/351/200/240@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275/344/270/216/344/270/232/345/212/241/346/264/273/345/212/250/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275/345/257/271/350/261/241/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275/346/216/247/345/210/266/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//345/217/214/345/220/221/345/205/263/350/201/224@3x.png +0 -0
- package/src/statics/icons/childIcons//345/217/227/345/210/260/345/275/261/345/223/215@3x.png +0 -0
- package/src/statics/icons/childIcons//345/234/260/347/220/206/346/224/277/346/262/273/350/214/203/345/233/264/347/261/273/345/236/213@3x.png +0 -0
- package/src/statics/icons/childIcons//345/241/253/345/206/231/350/201/214/344/275/215/347/224/263/350/257/267@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/216/247/345/210/266@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/265/201/347/250/213@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/265/201/347/250/213/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/347/272/246/346/235/237@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/347/272/246/346/235/237/345/256/232/344/271/211/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/351/232/224/347/246/273@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/351/243/216/351/231/251@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/232/345/220/221/345/205/263/347/263/273@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/232/345/220/221/345/205/263/350/201/224@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/232/345/220/221/347/273/204/346/210/220@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/232/345/220/221/350/201/232/345/220/210@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/344/272/272/345/221/230@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/344/274/201/344/270/232/351/230/266/346/256/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/344/275/215/347/275/256@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/345/261/236/346/200/247/350/256/276/347/275/256@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/346/210/230/347/225/245/351/230/266/346/256/265/347/224/230/347/211/271/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/346/214/201/347/273/255/344/273/273/345/212/241@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/346/234/215/345/212/241@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/346/235/241/344/273/266@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/347/216/257/345/242/203@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/347/273/204/347/273/207@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/201/214/344/275/215@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/201/214/350/264/243@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/264/243/344/273/273@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/344/270/216/345/256/236/351/231/205/351/241/271/347/233/256/345/257/271/345/272/224/345/205/263/347/263/273/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/346/246/202/345/277/265/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/241/271/347/233/256@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/241/271/347/233/256/344/270/216/350/203/275/345/212/233/347/232/204/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/241/271/347/233/256/351/207/214/347/250/213/347/242/221@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/241/271/347/233/256/351/207/214/347/250/213/347/242/221/346/261/207/346/200/273/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/243/216/351/231/251@3x.png +0 -0
- package/src/statics/icons/childIcons//345/261/225/347/244/272@3x.png +0 -0
- package/src/statics/icons/childIcons//345/267/262/347/237/245/350/265/204/346/272/220@3x.png +0 -0
- package/src/statics/icons/childIcons//345/274/200/345/261/225/345/267/245/344/275/234/350/203/275/345/212/233@3x.png +0 -0
- package/src/statics/icons/childIcons//345/274/225/347/224/250/345/261/236/346/200/247@3x.png +0 -0
- package/src/statics/icons/childIcons//345/275/261/345/223/215@3x-2.png +0 -0
- package/src/statics/icons/childIcons//345/275/261/345/223/215@3x.png +0 -0
- package/src/statics/icons/childIcons//346/204/277/346/231/257/345/256/243/350/250/200@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/344/277/241/346/201/257@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/344/277/241/346/201/257/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/344/277/241/346/201/257/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/345/256/236/351/231/205/346/210/230/347/225/245/351/230/266/346/256/265/345/210/206/347/261/273/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/345/256/236/351/231/205/351/203/250/347/275/262/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/346/265/201/347/250/213/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/272/246/346/235/237@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/272/246/346/235/237/345/256/232/344/271/211/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/350/277/236/351/200/232/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/350/277/236/351/200/232/347/237/251/351/230/265@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/350/277/236/351/200/232/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/351/230/266/346/256/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/347/273/223/346/236/204/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/277/346/213/205/351/243/216/351/231/251@3x.png +0 -0
- package/src/statics/icons/childIcons//346/212/200/346/234/257@3x.png +0 -0
- package/src/statics/icons/childIcons//346/213/245/346/234/211/346/265/201/347/250/213@3x.png +0 -0
- package/src/statics/icons/childIcons//346/217/220/344/276/233/346/235/203/351/231/220@3x.png +0 -0
- package/src/statics/icons/childIcons//346/227/266/346/234/272@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/344/270/216/344/270/232/345/212/241/346/264/273/345/212/250/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/344/270/216/346/234/215/345/212/241/345/220/210/345/220/214/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/344/270/216/350/203/275/345/212/233/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/344/277/241/345/217/267@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/212/237/350/203/275@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/212/237/350/203/275/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/217/202/346/225/260@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/257/271/350/261/241/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/216/245/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/216/247/345/210/266/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/253/257/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/272/246/346/235/237/345/256/232/344/271/211/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/273/223/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/267/257/347/272/277/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/351/200/232/350/241/250@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/235/203/351/231/220@3x.png +0 -0
- package/src/statics/icons/childIcons//346/235/241/344/273/266@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/344/270/232/345/212/241/346/264/273/345/212/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/350/267/257/347/272/277/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/350/277/275/346/272/257/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/246/202/345/277/265/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//346/263/233/345/214/226@3x.png +0 -0
- package/src/statics/icons/childIcons//347/212/266/345/206/265@3x.png +0 -0
- package/src/statics/icons/childIcons//347/216/257/345/242/203@3x.png +0 -0
- package/src/statics/icons/childIcons//347/233/270/346/257/224@3x (1).png +0 -0
- package/src/statics/icons/childIcons//347/263/273/347/273/237@3x.png +0 -0
- package/src/statics/icons/childIcons//347/273/204/346/210/220@3x.png +0 -0
- package/src/statics/icons/childIcons//347/273/204/347/273/207@3x.png +0 -0
- package/src/statics/icons/childIcons//347/273/204/347/273/207/351/230/266/346/256/265@3x.png +0 -0
- package/src/statics/icons/childIcons//347/273/221/345/256/232/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//347/274/223/350/247/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/201/214/344/275/215@3x.png +0 -0
- package/src/statics/icons/childIcons//350/201/232/345/220/210@3x.png +0 -0
- package/src/statics/icons/childIcons//350/203/275/345/212/233@3x.png +0 -0
- package/src/statics/icons/childIcons//350/203/275/345/212/233/350/201/214/350/264/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/203/275/345/212/233/351/205/215/347/275/256@3x.png +0 -0
- package/src/statics/icons/childIcons//350/203/275/345/244/237/350/203/234/344/273/273@3x.png +0 -0
- package/src/statics/icons/childIcons//350/207/252/347/204/266/350/265/204/346/272/220@3x.png +0 -0
- package/src/statics/icons/childIcons//350/246/201/346/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//350/256/276/347/275/256/347/261/273/345/236/213.png +0 -0
- package/src/statics/icons/childIcons//350/264/237/350/264/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/264/243/344/273/273@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/344/272/247/351/243/216/351/231/251/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/270/216/344/270/232/345/212/241/346/264/273/345/212/250/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/270/216/350/203/275/345/212/233/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/277/241/345/217/267@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/277/241/346/201/257@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/277/241/346/201/257/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/217/202/346/225/260@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/267/245/344/273/266@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/216/245/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/234/215/345/212/241@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/236/266/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/264/273/345/212/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/264/273/345/212/250/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/253/257/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/272/246/346/235/237@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/273/223/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/274/223/350/247/243/346/216/252/346/226/275@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//350/275/257/344/273/266@3x.png +0 -0
- package/src/statics/icons/childIcons//350/276/223/345/205/245/346/240/223@3x.png +0 -0
- package/src/statics/icons/childIcons//350/276/223/345/207/272/346/240/223@3x.png +0 -0
- package/src/statics/icons/childIcons//350/276/276/345/210/260@3x.png +0 -0
- package/src/statics/icons/childIcons//350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//350/277/236/347/272/277@3x.png +0 -0
- package/src/statics/icons/childIcons//351/207/214/347/250/213/347/242/221/344/276/235/350/265/226@3x.png +0 -0
- package/src/statics/icons/childIcons//351/230/266/346/256/265@3x.png +0 -0
- package/src/statics/icons/childIcons//351/234/200/346/261/202/346/235/203/351/231/220@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/266/347/272/247/344/270/232/345/212/241/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/344/270/273/351/242/230@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/264/273/345/212/250@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/264/273/345/212/250/344/270/216/350/203/275/345/212/233/347/232/204/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/264/273/345/212/250/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/350/267/257/347/272/277/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/351/207/214/347/250/213/347/242/221@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/351/207/214/347/250/213/347/242/221/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/272/345/272/217@3x-2.png +0 -0
- package/src/statics/icons/childIcons//351/241/272/345/272/217@3x.png +0 -0
- package/src/statics/icons/childIcons//351/243/216/351/231/251@3x.png +0 -0
- package/src/statics/icons/childIcons//351/243/216/351/231/251/344/270/216/345/256/211/345/205/250/346/216/247/345/210/266/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//351/253/230/347/272/247/344/270/232/345/212/241/346/246/202/345/277/265@3x.png +0 -0
- package/src/statics/icons/createMenu/config.png +0 -0
- package/src/statics/icons/createMenu/contact.png +0 -0
- package/src/statics/icons/createMenu/copy.png +0 -0
- package/src/statics/icons/createMenu/delete.png +0 -0
- package/src/statics/icons/createMenu/diagram.png +0 -0
- package/src/statics/icons/createMenu/element.png +0 -0
- package/src/statics/icons/createMenu/locateChart.png +0 -0
- package/src/statics/icons/createMenu/paste.png +0 -0
- package/src/statics/icons/createMenu/rename.png +0 -0
- package/src/statics/icons/createMenu/scissors.png +0 -0
- package/src/store/eventBus.ts +38 -0
- package/src/store/graphStore.ts +782 -0
- package/src/store/index.ts +8 -0
- package/src/style/index.css +1 -0
- package/src/style/tailwind.css +33 -0
- package/src/types/index.ts +200 -0
- package/src/utils/autoExpandParent.ts +94 -0
- package/src/utils/colorUtils.ts +137 -0
- package/src/utils/compartment.ts +534 -0
- package/src/utils/containers.ts +910 -0
- package/src/utils/diagram.ts +403 -0
- package/src/utils/dom.ts +21 -0
- package/src/utils/drag.ts +224 -0
- package/src/utils/edgeUtils.ts +787 -0
- package/src/utils/geom.ts +177 -0
- package/src/utils/graphDragService.ts +329 -0
- package/src/utils/highlightUtils.ts +162 -0
- package/src/utils/hittest.ts +135 -0
- package/src/utils/iconLoader.ts +105 -0
- package/src/utils/index.ts +20 -0
- package/src/utils/packgeMap.ts +1 -0
- package/src/utils/pinUtils.ts +484 -0
- package/src/utils/policy.ts +212 -0
- package/src/utils/zorder.ts +39 -0
- package/src/view/graph.vue +419 -0
- package/src/vite-env.d.ts +33 -0
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.context-menu[data-v-3f0901d5]{background-color:#fff;border:1px solid #ebeef5;border-radius:6px;box-shadow:0 2px 12px #0000001a;padding:6px 0;overflow-y:auto;box-sizing:border-box;transition:opacity .2s ease,transform .2s ease;transform-origin:top left}.context-menu[style*="display: block"][data-v-3f0901d5]{animation:fadeIn-3f0901d5 .2s ease forwards}@keyframes fadeIn-3f0901d5{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.context-menu[data-v-3f0901d5]::-webkit-scrollbar{width:6px}.context-menu[data-v-3f0901d5]::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:3px}.context-menu[data-v-3f0901d5]::-webkit-scrollbar-track{background-color:#f5f5f5}.menu-item[data-v-3f0901d5]{padding:0 15px;cursor:pointer;font-size:14px;color:#606266;border-radius:4px;height:36px;line-height:36px;box-sizing:border-box}.menu-item[data-v-3f0901d5]:hover{background-color:#f5f7fa;color:#303133}.menu-disabled[data-v-3f0901d5]{color:#c0c4cc!important;cursor:not-allowed!important;pointer-events:none}.menu-disabled[data-v-3f0901d5]:hover{background-color:transparent!important}.menu-disabled img[data-v-3f0901d5]{opacity:.5}.context-menu[style*="--edge-hint: left"][data-v-3f0901d5]{border-top-left-radius:0}.context-menu[style*="--edge-hint: right"][data-v-3f0901d5]{border-top-right-radius:0}.context-menu[style*="--edge-hint: top"][data-v-3f0901d5]{border-top-left-radius:0;border-top-right-radius:0}.context-menu[style*="--edge-hint: bottom"][data-v-3f0901d5]{border-bottom-left-radius:0;border-bottom-right-radius:0}.connection-line[data-v-c4c3e8c0]{position:absolute;pointer-events:none;z-index:10}.interaction-layer[data-v-914902a3]{position:absolute;top:0;left:0;width:100%;height:100%;transform-origin:0 0;transform:scale(var(--672c44c5));pointer-events:all;z-index:999}.selection-box[data-v-914902a3]{pointer-events:none;background:transparent}.resize-handles[data-v-914902a3]{position:relative;width:100%;height:100%}.hover-container-outline[data-v-914902a3]{position:absolute;pointer-events:none;padding:6px;top:6px}.hover-container-outline.is-valid[data-v-914902a3]{border:2px solid #0000ff}.hover-container-outline.is-invalid[data-v-914902a3]{border:2px solid #f1eded;background:rgba(240,237,237,.842)}.resize-handle[data-v-914902a3]{position:absolute;width:10px;height:10px;background-color:#007bff;border:2px solid #fff;border-radius:50%;pointer-events:all;transition:all .2s ease;box-shadow:0 2px 4px #0000004d;z-index:999}.resize-handle.is-disabled[data-v-914902a3]{cursor:default!important}.resize-handle[data-v-914902a3]:hover{background-color:#0056b3;transform:scale(1.2)}.action-buttons[data-v-914902a3]{display:flex;flex-direction:column;gap:4px;pointer-events:all;background:rgba(255,255,255,.95);padding:6px;border-radius:4px;box-shadow:0 2px 8px #00000026;border:1px solid #e0e0e0;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.action-btn[data-v-914902a3]{width:28px;height:28px;border:1px solid #d0d0d0;border-radius:3px;background:linear-gradient(to bottom,#f8f9fa,#e9ecef);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;font-family:Arial,sans-serif;color:#495057;transition:all .2s ease;box-shadow:0 1px 2px #0000000d}.action-btn[data-v-914902a3]:hover{background:linear-gradient(to bottom,#e3f2fd,#bbdefb);border-color:#90caf9;transform:translateY(-1px);box-shadow:0 2px 4px #2196f34d;color:#1976d2}.edit-btn[data-v-914902a3]:hover{background:#e3f2fd}.delete-btn[data-v-914902a3]:hover{background:#ffebee;border-color:#f44336}.name-editor-container[data-v-914902a3]{pointer-events:all}.name-input[data-v-914902a3]{width:calc(100% - 20px);padding:2px 4px;border:2px solid #007bff;border-radius:6px;font-size:12px;font-weight:600;background:#fff;box-shadow:0 4px 12px #00000026;outline:none;text-align:center}.name-input[data-v-914902a3]:focus{border-color:#0056b3;box-shadow:0 0 0 3px #007bff40}.name-text-box-container[data-v-914902a3]{pointer-events:all}.name-text-box[data-v-914902a3]{border:1px dashed #007bff;background:rgba(255,255,255,.2);cursor:pointer;pointer-events:all;transition:all .2s ease;border-radius:4px;box-shadow:0 0 0 1px #007bff1a;height:100%;display:flex;align-items:center;justify-content:center}.name-text-box[data-v-914902a3]:hover{border-color:#0056b3;background:rgba(0,123,255,.05);box-shadow:0 0 0 2px #007bff33;transform:scale(1.02)}.resize-ghost[data-v-914902a3]{position:absolute;border:2px solid #8a6d3b;background:transparent;box-shadow:0 0 0 2px #8a6d3b26 inset;pointer-events:none;z-index:9999}.connect-layer[data-v-914902a3]{position:absolute;pointer-events:none;z-index:1000}.connect-dot-direct[data-v-914902a3],.connect-dot-target[data-v-914902a3]{width:8px;height:8px;background-color:#000;border-radius:50%;border:1px solid #fff;box-shadow:0 0 4px #0000004d}.connection-line[data-v-914902a3]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1000}.border-btn[data-v-914902a3]{padding-bottom:4px;border-bottom:1px solid #e0e0e0}.diagram-shape[data-v-1f4cb409]{background:#e5ecf0;border-radius:10px;box-shadow:0 2px 8px #0000001a;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;margin:0;padding:0;border:var(--bw) var(--bs) var(--bc)}.hit-edge[data-v-1f4cb409]{position:absolute;background:transparent;z-index:999;pointer-events:auto}.hit-top[data-v-1f4cb409]{left:0;right:0;top:0;height:var(--bw)}.hit-right[data-v-1f4cb409]{top:0;right:0;bottom:0;width:var(--bw)}.hit-bottom[data-v-1f4cb409]{left:0;right:0;bottom:0;height:var(--bw)}.hit-left[data-v-1f4cb409]{top:0;left:0;bottom:0;width:var(--bw)}.diagram-header[data-v-1f4cb409]{background:rgba(255,255,255,.5);padding:3px 16px 3px 5px;display:inline-flex;align-items:center;position:relative;white-space:nowrap;align-self:flex-start}.diagram-header[data-v-1f4cb409]:after{content:"";position:absolute;bottom:-12px;right:-12px;width:20px;height:20px;background-color:var(--5113555a);transform:rotate(45deg);z-index:0}.diagram-title[data-v-1f4cb409]{font-family:var(--name-ff);font-size:var(--name-fs);font-weight:400;line-height:normal;letter-spacing:0em;font-variation-settings:"opsz" auto;font-feature-settings:"kern" on;color:var(--name-color);position:relative;z-index:2}.diagram-shape[data-v-05edf0d1]{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;pointer-events:auto;touch-action:none;-webkit-touch-action:none;-ms-touch-action:none;zoom:1;transform:none!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important}.diagram-svg[data-v-05edf0d1]{width:100%;height:100%;transform:none!important;-webkit-transform:none!important}.capability-shape[data-v-66d2551a]{display:flex;align-items:center;justify-content:center;overflow:hidden}.capability-svg[data-v-66d2551a]{display:block}.capability-shape[data-v-8e8054b6]{display:flex;align-items:center;justify-content:center;overflow:hidden}.capability-svg[data-v-8e8054b6]{display:block}.capability-shape[data-v-27d34586]{display:flex;align-items:center;justify-content:center;overflow:hidden}.capability-svg[data-v-27d34586]{display:block}.capability-shape[data-v-5f0b14f5]{display:flex;align-items:center;justify-content:center;overflow:hidden}.capability-svg[data-v-5f0b14f5]{display:block}.capability-shape[data-v-4f0bb734]{display:inline-block;position:relative;overflow:visible;box-sizing:content-box}[data-v-4f0bb734] .name-text-svg{text-align:left}[data-v-4f0bb734] .shape-name-svg{text-align:center}[data-v-4f0bb734] .content-text-svg{font-size:13px;line-height:1.4;color:#000;font-family:Arial,sans-serif;min-height:20px;overflow:visible;width:100%;box-sizing:border-box}[data-v-4f0bb734] .content-item{margin-bottom:4px;word-break:break-word;white-space:normal;overflow:visible;width:100%;box-sizing:border-box}[data-v-4f0bb734] .content-item:last-child{margin-bottom:0}.edge-component[data-v-aa953435]{position:absolute;pointer-events:all;cursor:pointer}.edge-svg[data-v-aa953435]{width:100%;height:100%;overflow:visible}.edge-svg polyline[data-v-aa953435]{pointer-events:all;stroke-linecap:round;stroke-linejoin:round}.edge-svg circle[data-v-aa953435]{pointer-events:none}.diagram-shape[data-v-daf180ad]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.diagram-svg[data-v-daf180ad]{width:100%;height:100%}.capability-shape[data-v-ec8f07ea]{display:flex;align-items:center;justify-content:center;overflow:hidden}.capability-svg[data-v-ec8f07ea]{display:block}.output-pin-shape[data-v-2081b7c7]{display:flex;align-items:center;justify-content:center;overflow:visible}.output-pin-svg[data-v-2081b7c7]{display:block;overflow:visible}.port-shape[data-v-4aa98dd6]{display:flex;align-items:center;justify-content:center;overflow:visible}.port-svg[data-v-4aa98dd6]{display:block;overflow:visible}.graph-view[data-v-73d6d56b]{width:100%;height:100%;background-color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none}.diagram-content[data-v-73d6d56b]{position:absolute;top:10px;left:10px;right:0;bottom:0;overflow:auto;touch-action:none}.shapes-container[data-v-73d6d56b]{position:relative;width:100%;height:100%;min-height:600px;transform-origin:0 0;transform:scale(var(--1fac33f2))}.shapes-container[data-v-73d6d56b]>*{position:absolute}
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mx-sose-front/mx-sose-graph",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A Vue3 graph visualization plugin library",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"src"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "vite",
|
|
14
|
+
"build": "vue-tsc && vite build",
|
|
15
|
+
"build:lib": "vue-tsc && vite build --config vite.lib.config.ts",
|
|
16
|
+
"preview": "vite preview",
|
|
17
|
+
"test": "vitest",
|
|
18
|
+
"test:ui": "vitest --ui",
|
|
19
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
20
|
+
"type-check": "vue-tsc --noEmit",
|
|
21
|
+
"clean": "rimraf dist",
|
|
22
|
+
"prepublishOnly": "npm run clean && npm run build:lib",
|
|
23
|
+
"build:prod": "node scripts/build.js"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"vue3",
|
|
27
|
+
"graph",
|
|
28
|
+
"visualization",
|
|
29
|
+
"plugin",
|
|
30
|
+
"component"
|
|
31
|
+
],
|
|
32
|
+
"author": "Your Name",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "http://47.96.106.104:9090/mx-sose/mx-sose-graph.git"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"vue": "^3.0.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
43
|
+
"@types/lodash": "^4.17.20",
|
|
44
|
+
"@types/node": "^20.0.0",
|
|
45
|
+
"@vitejs/plugin-vue": "^4.0.0",
|
|
46
|
+
"@vue/eslint-config-typescript": "^11.0.0",
|
|
47
|
+
"@vue/tsconfig": "^0.4.0",
|
|
48
|
+
"autoprefixer": "^10.4.21",
|
|
49
|
+
"eslint": "^8.0.0",
|
|
50
|
+
"eslint-plugin-vue": "^9.0.0",
|
|
51
|
+
"postcss": "^8.5.6",
|
|
52
|
+
"rimraf": "^5.0.0",
|
|
53
|
+
"sass": "^1.96.0",
|
|
54
|
+
"tailwindcss": "^4.1.12",
|
|
55
|
+
"terser": "^5.44.1",
|
|
56
|
+
"typescript": "~5.0.0",
|
|
57
|
+
"vite": "^4.0.0",
|
|
58
|
+
"vite-plugin-dts": "^3.0.0",
|
|
59
|
+
"vitest": "^0.34.0",
|
|
60
|
+
"vue-tsc": "^1.0.0"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=16.0.0"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"element-plus": "^2.11.5",
|
|
67
|
+
"lodash": "^4.17.21",
|
|
68
|
+
"pinia": "^3.0.3"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<teleport to="body">
|
|
3
|
+
<div
|
|
4
|
+
v-if="visible"
|
|
5
|
+
class="context-menu px-[6px]!"
|
|
6
|
+
:style="dynamicMenuStyle"
|
|
7
|
+
@contextmenu.prevent
|
|
8
|
+
@click.stop
|
|
9
|
+
ref="menuRef"
|
|
10
|
+
>
|
|
11
|
+
<!-- 属性配置菜单项 -->
|
|
12
|
+
<div class="menu-item" @click="handleShowPropertyPanel">
|
|
13
|
+
<div
|
|
14
|
+
class="flex items-center box-border border-b-[1px] border-solid border-[#DCDFE6]"
|
|
15
|
+
>
|
|
16
|
+
<img
|
|
17
|
+
:src="getIcon('createMenu', 'config')"
|
|
18
|
+
class="w-[18px] h-[18px] mr-[10px] ml-[2px]"
|
|
19
|
+
alt="属性配置"
|
|
20
|
+
/>
|
|
21
|
+
<span>属性配置</span>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="menu-item" @click="handleHighlight">
|
|
26
|
+
<div class="flex items-center">
|
|
27
|
+
<img
|
|
28
|
+
:src="getIcon('createMenu', 'delete')"
|
|
29
|
+
class="w-[18px] h-[18px] mr-[10px] ml-[2px]"
|
|
30
|
+
alt="树上高亮"
|
|
31
|
+
/>
|
|
32
|
+
<span>树上高亮</span>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="menu-item" @click="handleLocateChart" :class="{ 'menu-disabled': true }">
|
|
37
|
+
<div
|
|
38
|
+
class="flex items-center box-border border-b-[1px] border-solid border-[#DCDFE6]"
|
|
39
|
+
>
|
|
40
|
+
<img
|
|
41
|
+
:src="getIcon('createMenu', 'locateChart')"
|
|
42
|
+
class="w-[18px] h-[18px] mr-[10px] ml-[2px]"
|
|
43
|
+
alt="所在图表"
|
|
44
|
+
/>
|
|
45
|
+
<span>所在图表</span>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="menu-item" :class="{ 'menu-disabled': true }">
|
|
50
|
+
<div
|
|
51
|
+
class="flex items-center box-border border-b-[1px] border-solid border-[#DCDFE6]"
|
|
52
|
+
>
|
|
53
|
+
<img
|
|
54
|
+
:src="getIcon('createMenu', 'diagram')"
|
|
55
|
+
class="w-[18px] h-[18px] mr-[10px] ml-[2px]"
|
|
56
|
+
alt="新建图表"
|
|
57
|
+
/>
|
|
58
|
+
<span>新建图表</span>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div class="menu-item" @click="handleCopy" :class="{ 'menu-disabled': true }">
|
|
63
|
+
<div class="flex items-center">
|
|
64
|
+
<img
|
|
65
|
+
:src="getIcon('createMenu', 'copy')"
|
|
66
|
+
class="w-[18px] h-[18px] mr-[10px] ml-[2px]"
|
|
67
|
+
alt="复制"
|
|
68
|
+
/>
|
|
69
|
+
<span>复制</span>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div class="menu-item" @click="handlePaste" :class="{ 'menu-disabled': true }">
|
|
74
|
+
<div class="flex items-center">
|
|
75
|
+
<img
|
|
76
|
+
:src="getIcon('createMenu', 'paste')"
|
|
77
|
+
class="w-[18px] h-[18px] mr-[10px] ml-[2px]"
|
|
78
|
+
alt="粘贴"
|
|
79
|
+
/>
|
|
80
|
+
<span>粘贴</span>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div class="menu-item" @click="handleCut" :class="{ 'menu-disabled': true }">
|
|
85
|
+
<div class="flex items-center">
|
|
86
|
+
<img
|
|
87
|
+
:src="getIcon('createMenu', 'scissors')"
|
|
88
|
+
class="w-[18px] h-[18px] mr-[10px] ml-[2px]"
|
|
89
|
+
alt="剪切"
|
|
90
|
+
/>
|
|
91
|
+
<span>剪切</span>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<!-- 删除菜单项 -->
|
|
96
|
+
<div class="menu-item" @click="handleDelete">
|
|
97
|
+
<div class="flex items-center">
|
|
98
|
+
<img
|
|
99
|
+
:src="getIcon('createMenu', 'delete')"
|
|
100
|
+
class="w-[18px] h-[18px] mr-[10px] ml-[2px]"
|
|
101
|
+
alt="删除"
|
|
102
|
+
/>
|
|
103
|
+
<span>删除</span>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</teleport>
|
|
108
|
+
|
|
109
|
+
<!-- 新建图表菜单 -->
|
|
110
|
+
<!-- <Diagram
|
|
111
|
+
:menu-visible="showAddChartDialog"
|
|
112
|
+
:menu-x="position.x"
|
|
113
|
+
:menu-y="position.y"
|
|
114
|
+
:domain-data="chartData"
|
|
115
|
+
@select-chart="handleSelectChart"
|
|
116
|
+
/> -->
|
|
117
|
+
</template>
|
|
118
|
+
|
|
119
|
+
<script setup lang="ts">
|
|
120
|
+
import {
|
|
121
|
+
computed,
|
|
122
|
+
onMounted,
|
|
123
|
+
onUnmounted,
|
|
124
|
+
ref,
|
|
125
|
+
watch,
|
|
126
|
+
type CSSProperties,
|
|
127
|
+
} from "vue";
|
|
128
|
+
import { getIcon } from "../utils/iconLoader";
|
|
129
|
+
import { eventBus } from "../store";
|
|
130
|
+
// import Diagram from "@/components/common/diagram/diagram.vue";
|
|
131
|
+
// import { getModelDataApi } from "@/services/modelTree";
|
|
132
|
+
|
|
133
|
+
// 定义组件props
|
|
134
|
+
const props = defineProps({
|
|
135
|
+
visible: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
required: true,
|
|
138
|
+
},
|
|
139
|
+
position: {
|
|
140
|
+
type: Object,
|
|
141
|
+
required: true,
|
|
142
|
+
validator: (value: any) => {
|
|
143
|
+
return typeof value.x === "number" && typeof value.y === "number";
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
selectedShape: {
|
|
147
|
+
type: Object,
|
|
148
|
+
required: true,
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// 定义组件事件
|
|
153
|
+
const emit = defineEmits([
|
|
154
|
+
"update:visible",
|
|
155
|
+
"rename",
|
|
156
|
+
"delete",
|
|
157
|
+
"show-property-panel",
|
|
158
|
+
"highlight",
|
|
159
|
+
"locate-chart",
|
|
160
|
+
"new-chart",
|
|
161
|
+
"copy",
|
|
162
|
+
"paste",
|
|
163
|
+
"cut",
|
|
164
|
+
]);
|
|
165
|
+
|
|
166
|
+
// 新建图表弹窗状态
|
|
167
|
+
const showAddChartDialog = ref(false);
|
|
168
|
+
// 图表数据
|
|
169
|
+
const chartData = ref([]);
|
|
170
|
+
|
|
171
|
+
const menuRef = ref<HTMLElement | null>(null);
|
|
172
|
+
|
|
173
|
+
// 菜单尺寸常量
|
|
174
|
+
const MENU_WIDTH = 180; // 与CSS中的min-width一致
|
|
175
|
+
const MENU_ITEM_HEIGHT = 36; // 每个菜单项高度
|
|
176
|
+
const MENU_PADDING = 6; // 菜单内边距
|
|
177
|
+
const MAX_VISIBLE_ITEMS = 8; // 最大可见菜单项数量
|
|
178
|
+
const SAFE_MARGIN = 10; // 安全边距
|
|
179
|
+
|
|
180
|
+
// 使用ref来存储动态样式
|
|
181
|
+
const dynamicMenuStyle = ref<CSSProperties>({
|
|
182
|
+
left: "0px",
|
|
183
|
+
top: "0px",
|
|
184
|
+
display: "none",
|
|
185
|
+
position: "fixed",
|
|
186
|
+
zIndex: "9999",
|
|
187
|
+
minWidth: `${MENU_WIDTH}px`,
|
|
188
|
+
maxHeight: "70vh",
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// 计算并更新菜单位置
|
|
192
|
+
const updateMenuPosition = () => {
|
|
193
|
+
if (!props.visible) {
|
|
194
|
+
dynamicMenuStyle.value = { ...dynamicMenuStyle.value, display: "none" };
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// 获取视口尺寸
|
|
199
|
+
const viewportWidth = window.innerWidth;
|
|
200
|
+
const viewportHeight = window.innerHeight;
|
|
201
|
+
|
|
202
|
+
// 计算菜单高度(基于实际菜单项数量)
|
|
203
|
+
const menuItems = document.querySelectorAll(".menu-item");
|
|
204
|
+
const menuHeight = Math.min(
|
|
205
|
+
menuItems.length * MENU_ITEM_HEIGHT + MENU_PADDING * 2,
|
|
206
|
+
MAX_VISIBLE_ITEMS * MENU_ITEM_HEIGHT + MENU_PADDING * 2
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
// 初始位置
|
|
210
|
+
let left = props.position.x;
|
|
211
|
+
let top = props.position.y;
|
|
212
|
+
|
|
213
|
+
// 水平方向调整 - 确保不超出右侧边界
|
|
214
|
+
if (left + MENU_WIDTH > viewportWidth) {
|
|
215
|
+
left = viewportWidth - MENU_WIDTH - SAFE_MARGIN;
|
|
216
|
+
}
|
|
217
|
+
// 确保不小于左侧边界
|
|
218
|
+
left = Math.max(SAFE_MARGIN, left);
|
|
219
|
+
|
|
220
|
+
// 垂直方向调整 - 确保不超出底部边界
|
|
221
|
+
if (top + menuHeight > viewportHeight) {
|
|
222
|
+
top = viewportHeight - menuHeight - SAFE_MARGIN;
|
|
223
|
+
}
|
|
224
|
+
// 确保不小于顶部边界
|
|
225
|
+
top = Math.max(SAFE_MARGIN, top);
|
|
226
|
+
|
|
227
|
+
dynamicMenuStyle.value = {
|
|
228
|
+
left: `${left}px`,
|
|
229
|
+
top: `${top}px`,
|
|
230
|
+
display: "block",
|
|
231
|
+
position: "fixed",
|
|
232
|
+
"z-index": "9999",
|
|
233
|
+
"min-width": `${MENU_WIDTH}px`,
|
|
234
|
+
"max-height": "70vh",
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
// 使用watch来响应props变化
|
|
239
|
+
watch(
|
|
240
|
+
() => [props.visible, props.position],
|
|
241
|
+
() => {
|
|
242
|
+
updateMenuPosition();
|
|
243
|
+
},
|
|
244
|
+
{ immediate: true }
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
// 处理点击外部关闭菜单
|
|
248
|
+
const handleClickOutside = (event: MouseEvent) => {
|
|
249
|
+
if (!props.visible || !menuRef.value) return;
|
|
250
|
+
|
|
251
|
+
if (!menuRef.value.contains(event.target as Node)) {
|
|
252
|
+
closeMenu();
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// 关闭菜单
|
|
257
|
+
const closeMenu = () => {
|
|
258
|
+
emit("update:visible", false);
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// 打印当前选中图元
|
|
262
|
+
const logSelectedShape = () => {
|
|
263
|
+
console.log("当前选中的图元:", props.selectedShape);
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
// 处理删除菜单项点击
|
|
267
|
+
const handleDelete = () => {
|
|
268
|
+
logSelectedShape();
|
|
269
|
+
// emit("delete", props.selectedShape);
|
|
270
|
+
eventBus.emit("shapes-delete", props.selectedShape);
|
|
271
|
+
closeMenu();
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
// 处理属性配置菜单项点击
|
|
275
|
+
const handleShowPropertyPanel = () => {
|
|
276
|
+
logSelectedShape();
|
|
277
|
+
emit("show-property-panel", props.selectedShape);
|
|
278
|
+
closeMenu();
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
// 处理树上高亮菜单项点击
|
|
282
|
+
const handleHighlight = () => {
|
|
283
|
+
logSelectedShape();
|
|
284
|
+
eventBus.emit("highlight-shape", props.selectedShape);
|
|
285
|
+
closeMenu();
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
// 处理所在图表菜单项点击
|
|
289
|
+
const handleLocateChart = () => {
|
|
290
|
+
logSelectedShape();
|
|
291
|
+
emit("locate-chart", props.selectedShape);
|
|
292
|
+
closeMenu();
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
// 处理新建图表菜单项点击
|
|
296
|
+
// const handleNewChart = async () => {
|
|
297
|
+
// logSelectedShape();
|
|
298
|
+
|
|
299
|
+
// try {
|
|
300
|
+
// // 先调用事件,保持原有逻辑兼容
|
|
301
|
+
// emit("new-chart", props.selectedShape);
|
|
302
|
+
|
|
303
|
+
// // 获取当前右键点击的节点
|
|
304
|
+
// const parentNode = props.selectedShape;
|
|
305
|
+
// if (!parentNode) {
|
|
306
|
+
// console.warn("没有选中的节点");
|
|
307
|
+
// return;
|
|
308
|
+
// }
|
|
309
|
+
|
|
310
|
+
// // 处理父节点类型(ROOT_PACKAGE特殊处理)
|
|
311
|
+
// const parentNodeType = parentNode.shapeKey;
|
|
312
|
+
// const requestCode =
|
|
313
|
+
// !parentNodeType || parentNodeType === "ROOT_PACKAGE"
|
|
314
|
+
// ? "ArchitecturalDescription"
|
|
315
|
+
// : parentNodeType;
|
|
316
|
+
|
|
317
|
+
// // 调用接口获取图表数据
|
|
318
|
+
// const res = await getModelDataApi({
|
|
319
|
+
// code: requestCode,
|
|
320
|
+
// type: "1",
|
|
321
|
+
// });
|
|
322
|
+
|
|
323
|
+
// if (res.code == 200) {
|
|
324
|
+
// chartData.value = res.data || [];
|
|
325
|
+
// // 显示新建图表弹窗
|
|
326
|
+
// showAddChartDialog.value = true;
|
|
327
|
+
// } else {
|
|
328
|
+
// console.error("获取图表数据失败", res.msg);
|
|
329
|
+
// }
|
|
330
|
+
// } catch (error) {
|
|
331
|
+
// console.error("处理新建图表时出错", error);
|
|
332
|
+
// } finally {
|
|
333
|
+
// closeMenu();
|
|
334
|
+
// }
|
|
335
|
+
// };
|
|
336
|
+
|
|
337
|
+
// 处理选择图表
|
|
338
|
+
const handleSelectChart = (payload: { value: any; isChart: boolean }) => {
|
|
339
|
+
// 转发选择图表事件给父组件
|
|
340
|
+
|
|
341
|
+
emit("new-chart", {
|
|
342
|
+
...props.selectedShape,
|
|
343
|
+
chartInfo: payload.value,
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
// 处理复制菜单项点击
|
|
348
|
+
const handleCopy = () => {
|
|
349
|
+
logSelectedShape();
|
|
350
|
+
emit("copy", props.selectedShape);
|
|
351
|
+
closeMenu();
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
// 处理粘贴菜单项点击
|
|
355
|
+
const handlePaste = () => {
|
|
356
|
+
logSelectedShape();
|
|
357
|
+
emit("paste", props.selectedShape);
|
|
358
|
+
closeMenu();
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
// 处理剪切菜单项点击
|
|
362
|
+
const handleCut = () => {
|
|
363
|
+
logSelectedShape();
|
|
364
|
+
emit("cut", props.selectedShape);
|
|
365
|
+
closeMenu();
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
// 处理窗口大小变化
|
|
369
|
+
const handleWindowResize = () => {
|
|
370
|
+
if (props.visible) {
|
|
371
|
+
updateMenuPosition();
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
// 组件挂载时添加事件监听
|
|
376
|
+
onMounted(() => {
|
|
377
|
+
document.addEventListener("click", handleClickOutside);
|
|
378
|
+
window.addEventListener("resize", handleWindowResize);
|
|
379
|
+
updateMenuPosition(); // 初始位置计算
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
// 组件卸载时移除事件监听
|
|
383
|
+
onUnmounted(() => {
|
|
384
|
+
document.removeEventListener("click", handleClickOutside);
|
|
385
|
+
window.removeEventListener("resize", handleWindowResize);
|
|
386
|
+
});
|
|
387
|
+
</script>
|
|
388
|
+
|
|
389
|
+
<style scoped lang="scss">
|
|
390
|
+
.context-menu {
|
|
391
|
+
background-color: #fff;
|
|
392
|
+
border: 1px solid #ebeef5;
|
|
393
|
+
border-radius: 6px;
|
|
394
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
395
|
+
padding: 6px 0;
|
|
396
|
+
overflow-y: auto;
|
|
397
|
+
box-sizing: border-box;
|
|
398
|
+
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
399
|
+
transform-origin: top left;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.context-menu[style*="display: block"] {
|
|
403
|
+
animation: fadeIn 0.2s ease forwards;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
@keyframes fadeIn {
|
|
407
|
+
from {
|
|
408
|
+
opacity: 0;
|
|
409
|
+
transform: scale(0.95);
|
|
410
|
+
}
|
|
411
|
+
to {
|
|
412
|
+
opacity: 1;
|
|
413
|
+
transform: scale(1);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/* 滚动条优化 */
|
|
418
|
+
.context-menu::-webkit-scrollbar {
|
|
419
|
+
width: 6px;
|
|
420
|
+
}
|
|
421
|
+
.context-menu::-webkit-scrollbar-thumb {
|
|
422
|
+
background-color: #ddd;
|
|
423
|
+
border-radius: 3px;
|
|
424
|
+
}
|
|
425
|
+
.context-menu::-webkit-scrollbar-track {
|
|
426
|
+
background-color: #f5f5f5;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.menu-item {
|
|
430
|
+
padding: 0 15px;
|
|
431
|
+
cursor: pointer;
|
|
432
|
+
font-size: 14px;
|
|
433
|
+
color: #606266;
|
|
434
|
+
border-radius: 4px;
|
|
435
|
+
height: 36px;
|
|
436
|
+
line-height: 36px;
|
|
437
|
+
box-sizing: border-box;
|
|
438
|
+
|
|
439
|
+
&:hover {
|
|
440
|
+
background-color: #f5f7fa;
|
|
441
|
+
color: #303133;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* 置灰样式 */
|
|
446
|
+
.menu-disabled {
|
|
447
|
+
color: #c0c4cc !important;
|
|
448
|
+
cursor: not-allowed !important;
|
|
449
|
+
pointer-events: none;
|
|
450
|
+
|
|
451
|
+
&:hover {
|
|
452
|
+
background-color: transparent !important;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
img {
|
|
456
|
+
opacity: 0.5;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/* 边界提示样式 */
|
|
461
|
+
.context-menu[style*="--edge-hint: left"] {
|
|
462
|
+
border-top-left-radius: 0;
|
|
463
|
+
}
|
|
464
|
+
.context-menu[style*="--edge-hint: right"] {
|
|
465
|
+
border-top-right-radius: 0;
|
|
466
|
+
}
|
|
467
|
+
.context-menu[style*="--edge-hint: top"] {
|
|
468
|
+
border-top-left-radius: 0;
|
|
469
|
+
border-top-right-radius: 0;
|
|
470
|
+
}
|
|
471
|
+
.context-menu[style*="--edge-hint: bottom"] {
|
|
472
|
+
border-bottom-left-radius: 0;
|
|
473
|
+
border-bottom-right-radius: 0;
|
|
474
|
+
}
|
|
475
|
+
</style>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="diagram-shape" :style="diagramStyle" @click="handleClick">
|
|
3
|
+
<div class="diagram-header">
|
|
4
|
+
<span class="diagram-title">{{ shape.name }}</span>
|
|
5
|
+
</div>
|
|
6
|
+
<!-- 负责命中的透明边框 -->
|
|
7
|
+
<div class="hit-edge hit-top" @click.prevent="handleClick" />
|
|
8
|
+
<div class="hit-edge hit-right" @click.prevent="handleClick" />
|
|
9
|
+
<div class="hit-edge hit-bottom" @click.prevent="handleClick" />
|
|
10
|
+
<div class="hit-edge hit-left" @click.prevent="handleClick" />
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { computed } from "vue";
|
|
16
|
+
import type { Shape } from "../../types";
|
|
17
|
+
|
|
18
|
+
// Props
|
|
19
|
+
interface Props {
|
|
20
|
+
shape: Shape;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const props = defineProps<Props>();
|
|
24
|
+
|
|
25
|
+
// 事件定义
|
|
26
|
+
const emit = defineEmits<{
|
|
27
|
+
(e: "shape-click", shape: Shape, event: MouseEvent): void;
|
|
28
|
+
}>();
|
|
29
|
+
// 交互层在拖拽/缩放时会给 shape.meta.isGhost = true
|
|
30
|
+
const isGhost = computed(() => (props.shape as any).meta?.isGhost)
|
|
31
|
+
// 根据 shape 的 bounds 和 style 生成样式
|
|
32
|
+
const diagramStyle = computed(() => {
|
|
33
|
+
const { bounds, style } = props.shape;
|
|
34
|
+
return {
|
|
35
|
+
width: `${bounds?.width || 200}px`,
|
|
36
|
+
height: `${bounds?.height || 150}px`,
|
|
37
|
+
backgroundColor: isGhost.value
|
|
38
|
+
? 'transparent' // 预览态(拖拽/缩放)透明
|
|
39
|
+
: (style?.backgroundColor ?? '#e5ecf0'),
|
|
40
|
+
'--bc': style?.canvasBorderColor || '#7b8fa1',//画布边框颜色
|
|
41
|
+
'--bw': `${style?.canvasBorderWidth || 2}px`, //画布边框粗细
|
|
42
|
+
'--bs': style?.canvasBorderStyle || 'solid', //画布边框线型
|
|
43
|
+
'--name-fs': `${style?.canvasNameFontSize || 10}px`,//画布名称字体大小
|
|
44
|
+
'--name-ff':
|
|
45
|
+
style?.canvasNameFontFamily ||
|
|
46
|
+
`Source Han Sans SC, "Microsoft YaHei", "PingFang SC", Arial, sans-serif`,//画布名称字体
|
|
47
|
+
'--name-color': style?.canvasNameFontColor || "#303133",//画布名称字体颜色
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// 点击事件处理
|
|
52
|
+
const handleClick = (event: MouseEvent) => {
|
|
53
|
+
event.stopPropagation();
|
|
54
|
+
emit("shape-click", props.shape, event);
|
|
55
|
+
};
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<style scoped>
|
|
59
|
+
.diagram-shape {
|
|
60
|
+
background: #e5ecf0;
|
|
61
|
+
border-radius: 10px;
|
|
62
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
margin: 0;
|
|
68
|
+
padding: 0;
|
|
69
|
+
border: var(--bw) var(--bs) var(--bc);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.hit-edge {
|
|
73
|
+
position: absolute;
|
|
74
|
+
background: transparent;
|
|
75
|
+
z-index: 999;
|
|
76
|
+
pointer-events: auto;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.hit-top {
|
|
80
|
+
left: 0;
|
|
81
|
+
right: 0;
|
|
82
|
+
top: 0;
|
|
83
|
+
height: var(--bw);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.hit-right {
|
|
87
|
+
top: 0;
|
|
88
|
+
right: 0;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
width: var(--bw);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.hit-bottom {
|
|
94
|
+
left: 0;
|
|
95
|
+
right: 0;
|
|
96
|
+
bottom: 0;
|
|
97
|
+
height: var(--bw);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.hit-left {
|
|
101
|
+
top: 0;
|
|
102
|
+
left: 0;
|
|
103
|
+
bottom: 0;
|
|
104
|
+
width: var(--bw);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.diagram-header {
|
|
108
|
+
background: rgba(255, 255, 255, 0.5);
|
|
109
|
+
padding: 3px 16px 3px 5px;
|
|
110
|
+
display: inline-flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
position: relative;
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
align-self: flex-start;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.diagram-header::after {
|
|
118
|
+
content: "";
|
|
119
|
+
position: absolute;
|
|
120
|
+
bottom: -12px;
|
|
121
|
+
right: -12px;
|
|
122
|
+
width: 20px;
|
|
123
|
+
height: 20px;
|
|
124
|
+
background-color: v-bind('diagramStyle.backgroundColor');
|
|
125
|
+
transform: rotate(45deg);
|
|
126
|
+
z-index: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.diagram-title {
|
|
130
|
+
font-family: var(--name-ff);
|
|
131
|
+
font-size: var(--name-fs);
|
|
132
|
+
font-weight: normal;
|
|
133
|
+
line-height: normal;
|
|
134
|
+
letter-spacing: 0em;
|
|
135
|
+
font-variation-settings: "opsz" auto;
|
|
136
|
+
font-feature-settings: "kern" on;
|
|
137
|
+
color: var(--name-color);
|
|
138
|
+
position: relative;
|
|
139
|
+
z-index: 2;
|
|
140
|
+
}
|
|
141
|
+
</style>
|