Additional colors and types added

This commit is contained in:
barsdeveloper
2022-11-17 20:40:10 +01:00
parent 8e2f44bd0d
commit 66c0513262
18 changed files with 355 additions and 164 deletions

View File

@@ -308,6 +308,7 @@ ueb-link[data-dragging=true] .ueb-link-message {
ueb-node {
display: block;
position: absolute;
min-width: 130px;
border-radius: var(--ueb-node-radius);
box-shadow: 0 0 1px 0 black, 1px 4px 6px 0 rgba(0, 0, 0, 0.3);
font-weight: lighter;
@@ -365,9 +366,9 @@ ueb-node[data-selected=true] > .ueb-node-border {
.ueb-node-top {
padding: 0.2em 0.7em;
box-shadow: inset 5px 1px 5px -3px #7ba1b3, inset 0 1px 0 0 #111213, inset 0 2px 0 0 #7b9eb3;
box-shadow: inset 5px 1px 5px -3px rgba(255, 255, 255, 0.2509803922), inset 0 1px 2px 0 rgba(255, 255, 255, 0.2509803922);
border-radius: var(--ueb-node-radius) var(--ueb-node-radius) 0 0;
background: linear-gradient(170deg, #5ca1dd 0%, #466980 50%, transparent 100%);
background: linear-gradient(170deg, var(--ueb-node-color) 0%, var(--ueb-node-color) 50%, transparent 100%);
color: #c0c0c0;
font-weight: 900;
white-space: nowrap;
@@ -379,15 +380,11 @@ ueb-node[data-selected=true] > .ueb-node-border {
}
.ueb-zoom--2 ueb-node[data-pure-function=true] .ueb-node-top {
background: #5f815a;
}
ueb-node[data-pure-function=true] .ueb-node-top {
background: linear-gradient(170deg, #5f815a 0%, #5f815a 50%, transparent 100%);
background: var(--ueb-node-color);
}
.ueb-node-name {
background: radial-gradient(ellipse 100% 100% at 35% 50%, rgba(0, 0, 0, 0.35) 20%, transparent 50%);
background: radial-gradient(ellipse 100% 100% at 35% 50%, rgba(0, 0, 0, 0.5) 12%, transparent 50%);
margin: -0.1em -1.6em;
padding: 0.1em 1.6em;
}

View File

@@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-knot.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAEI;EA0BJ,iBAEI;EAQJ;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAEI;EAmDJ,iBAEI;EAWJ,qBAEI;EAOJ;;;AAGJ;EACI;;;AAIJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AC3UJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AChBJ;EACI;EACA;AACA;EACA;EACA;EACA;EACA;AACA;AAAA;AAAA;AAAA;EAIA;;;AAIJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;AAAA;EAEI;EACA;;;AAGJ;EACI;EACA;;;AAGJ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A;EACA;EACA;EACA;;AAEA;EAII;EACA;;;AAIR;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;EACA;EACA;;;ACzKR;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;;AAIR;AAAA;EAEI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;AAEA;EACI;;;AAIR;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAKA;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AC3FR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;AAAA;EAEI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA,YACI;;;AAWR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;AAAA;EAEI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AAIR;AAAA;EAEI;EACA;;;AAGJ;EACI;;;AAGJ;AAAA;EAEI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA","file":"ueb-style.css"}
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-knot.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAEI;EA0BJ,iBAEI;EAQJ;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;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;EACI;;;AAGJ;EACI;AAAA;AAAA;AAAA;AAAA;AAAA;EAMA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;EACA;;;AAIR;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAII;EACA;;;AAIR;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;EACA;EACA;;;ACzKR;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;;AAIR;AAAA;EAEI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;AAEA;EACI;;;AAIR;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAKA;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AC3FR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;AAAA;EAEI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA,YACI;;;AAWR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;AAAA;EAEI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AAIR;AAAA;EAEI;EACA;;;AAGJ;EACI;;;AAGJ;AAAA;EAEI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA","file":"ueb-style.css"}

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-knot.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA,WACI,qBACA,oBACA,IACI,kGAIR,WACI,qBACA,mBACA,IACI,sGAIR,WACI,qBACA,iBACA,IACI,gGAIR,cACI,eACA,6CACA,cACA,kBACA,8EACA,+BACA,WACA,iBAGJ,kBACI,iBAGJ,qBACI,aACA,kBACA,MACA,QACA,OACA,aACA,0BACA,UAGJ,mBACI,iBACA,iCACA,eAGJ,mBACI,kBACA,gCACA,gBACA,kBAGJ,oDACI,gBAGJ,UACI,kFACA,kBACA,eACA,gBACA,+DACA,gEACA,yBACA,iBAEI,s3BA0BJ,gBAEI,sZAQJ,sFACA,gEACA,oDACA,qBAC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ACA,oBAEA,qFAEI,WACA,cACA,kBACA,QACA,SACA,+BAGJ,2CACI,UACA,0BAGJ,0CACI,WACA,2BAIR,uCAEI,kBACA,yBACA,kBACA,mBAGJ,uBACI,kBACA,YAEA,6BACI,iBAIR,kCACI,iBAGJ,qCACI,cACA,kBACA,YACA,kBACA,mBAGJ,4BACI,kBACA,cACA,iBACA,UAKA,4BACI,WACA,qBACA,6BACA,oCACA,qCACA,sBAGJ,0BACI,eC3FR,WACI,cACA,kBACA,sBACA,MACA,OACA,sGACA,mBACA,6CACA,aAGJ,gBACI,aACA,mBACA,mBACA,gBACA,YACA,mBAGJ,oBACI,aACA,yBAGJ,iBACI,YACA,kBACA,kBAGJ,kBACI,YACA,YACA,WACA,eAGJ,+CAEI,qBACA,sBAGJ,uBACI,aACA,2DAGJ,wBACI,kBACA,iBACA,gBACA,mBACA,WACI,mLAWR,kBACI,cACA,kBACA,gBACA,iBACA,UACA,WACA,sBACA,kBAGJ,0CACI,8BACA,6BAGJ,qDAEI,aACA,oBACA,WAGJ,6BACI,iBACA,4EAGJ,wBACI,kBACA,4EAGJ,cACI,cAGJ,2CACI,yCAGJ,sCACI,yCAGJ,0BACI,kBACA,sBAEA,mEAEI,WACA,cACA,kBACA,oBACA,UACA,0BAGJ,iCACI,QAIR,4DAEI,YACA,YAGJ,8BACI,aAGJ,wDAEI,UAGJ,2BACI,aACA,gBACA,gBAGJ,oDACI,aACA,sBACA,8BACA,YACA,UAGJ,wDACI,aACA,mBACA,kBAEA,4DACI,YAIR,kDACI,YAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,2BACI,WAGJ,mBACI,oBAGJ,yBACI,iBACA,aAGJ,0CACI,UACA,iBACA,sBACA","file":"ueb-style.min.css"}
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-knot.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA,WACI,qBACA,oBACA,IACI,kGAIR,WACI,qBACA,mBACA,IACI,sGAIR,WACI,qBACA,iBACA,IACI,gGAIR,cACI,eACA,6CACA,cACA,kBACA,8EACA,+BACA,WACA,iBAGJ,kBACI,iBAGJ,qBACI,aACA,kBACA,MACA,QACA,OACA,aACA,0BACA,UAGJ,mBACI,iBACA,iCACA,eAGJ,mBACI,kBACA,gCACA,gBACA,kBAGJ,oDACI,gBAGJ,UACI,kFACA,kBACA,eACA,gBACA,+DACA,gEACA,yBACA,iBAEI,s3BA0BJ,gBAEI,sZAQJ,sFACA,gEACA,oDACA,qBACA,gBAGJ,6CACI,gBAGJ,8CACI,eAGJ,6BACI,eAGJ,6BACI,mBAGJ,6BACI,kBAGJ,6BACI,mBAGJ,6BACI,iBAGJ,6BACI,mBAGJ,6BACI,kBAGJ,8BACI,mBAGJ,8BACI,kBAGJ,8BACI,mBAGJ,8BACI,iBACA,uDAGJ,0BACI,gCAGJ,8BACI,mBACA,uDAGJ,8BACI,sBACA,uDAGJ,8BACI,iBACA,uDAGJ,8BACI,sBACA,uDAGJ,8BACI,sBACA,uDAGJ,+BACI,iBACA,uDAGJ,+BACI,sBACA,uDAGJ,+BACI,sBACA,uDAGJ,kBACI,kBACA,QACA,SACA,wGAGJ,sBACI,QACA,SAGJ,yEACI,kBAGJ,aACI,cACA,kBACA,kBACA,MACA,OACA,QACA,SACA,iBAEI,wlDAmDJ,gBAEI,gQAWJ,oBAEI,wJAOJ,4BAGJ,gDACI,mBAIJ,eACI,mBAGJ,0BACI,mBACA,uBACA,gBC3UJ,yDACI,gBAGJ,iEACI,aAGJ,uFACI,aAGJ,0EACI,iBACA,2BAGJ,8FACI,qCChBJ,SACI,iDACA,kEAEA,wEACA,cACA,6CACA,8CAKA,kBAIJ,aACI,oEACA,kBACA,WACA,YACA,eACA,+FAGJ,6BACI,mBACA,6BACA,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ACI,kBAGJ,uBACI,iBAGJ,eACI,qBACA,sBACA,gBACA,yBACA,kBACA,oBACA,cAEA,4FAII,yCACA,aAIR,yCACI,aAGJ,uCACI,gBACA,UACA,YACA,WACA,yBACA,2BAGJ,+CACI,6OAGJ,oEACI,UACA,WACA,YACA,qBACA,gBACA,yCAGJ,oCACI,cAGJ,qBACI,sBACA,gBACA,WAGJ,uBACI,cACA,aACA,YACA,UACA,eACA,gBACA,gBACA,4BACA,gBACA,cACA,YACA,cAEA,0CACI,WACA,YAGJ,gDACI,mBACA,mBACA,WCzKR,YACI,eACA,yBACA,iBACA,mBACA,kBACA,eAEA,kBACI,mBAIR,aACI,aACA,yBACA,SACA,gBAGJ,mCACI,kBACA,oBAEA,qFAEI,WACA,cACA,kBACA,QACA,SACA,+BAGJ,2CACI,UACA,0BAGJ,0CACI,WACA,2BAIR,uCAEI,kBACA,yBACA,kBACA,mBAGJ,uBACI,kBACA,YAEA,6BACI,iBAIR,kCACI,iBAGJ,qCACI,cACA,kBACA,YACA,kBACA,mBAGJ,4BACI,kBACA,cACA,iBACA,UAKA,4BACI,WACA,qBACA,6BACA,oCACA,qCACA,sBAGJ,0BACI,eC3FR,WACI,cACA,kBACA,sBACA,MACA,OACA,sGACA,mBACA,6CACA,aAGJ,gBACI,aACA,mBACA,mBACA,gBACA,YACA,mBAGJ,oBACI,aACA,yBAGJ,iBACI,YACA,kBACA,kBAGJ,kBACI,YACA,YACA,WACA,eAGJ,+CAEI,qBACA,sBAGJ,uBACI,aACA,2DAGJ,wBACI,kBACA,iBACA,gBACA,mBACA,WACI,mLAWR,kBACI,cACA,kBACA,gBACA,iBACA,UACA,WACA,sBACA,kBAGJ,0CACI,8BACA,6BAGJ,qDAEI,aACA,oBACA,WAGJ,6BACI,iBACA,4EAGJ,wBACI,kBACA,4EAGJ,cACI,cAGJ,2CACI,yCAGJ,sCACI,yCAGJ,0BACI,kBACA,sBAEA,mEAEI,WACA,cACA,kBACA,oBACA,UACA,0BAGJ,iCACI,QAIR,4DAEI,YACA,YAGJ,8BACI,aAGJ,wDAEI,UAGJ,2BACI,aACA,gBACA,gBAGJ,oDACI,aACA,sBACA,8BACA,YACA,UAGJ,wDACI,aACA,mBACA,kBAEA,4DACI,YAIR,kDACI,YAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,2BACI,WAGJ,mBACI,oBAGJ,yBACI,iBACA,aAGJ,0CACI,UACA,iBACA,sBACA","file":"ueb-style.min.css"}

236
dist/ueblueprint.js vendored
View File

@@ -24,7 +24,27 @@ var t$1;const i$2=globalThis.trustedTypes,s$1=i$2?i$2.createPolicy("lit-html",{c
* SPDX-License-Identifier: BSD-3-Clause
*/var l,o;class s extends a$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=T(i,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1);}render(){return b}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push("3.2.2");
/** @typedef {import("./element/PinElement").default} PinElement */
class Configuration {
static #pinColor = {
"/Script/CoreUObject.LinearColor": r$2`3, 76, 168`,
"/Script/CoreUObject.Rotator": r$2`152, 171, 241`,
"/Script/CoreUObject.Transform": r$2`241, 110, 1`,
"/Script/CoreUObject.Vector": r$2`215, 202, 11`,
"/Script/Engine.Actor": r$2`0, 168, 242`,
"/Script/Engine.Pawn": r$2`0, 168, 242`,
"bool": r$2`117, 0, 0`,
"byte": r$2`0, 110, 98`,
"class": r$2`88, 0, 186`,
"default": r$2`167, 167, 167`,
"exec": r$2`240, 240, 240`,
"int": r$2`32, 224, 173`,
"name": r$2`203, 129, 252`,
"real": r$2`50, 187, 0`,
"string": r$2`213, 0, 176`,
"wildcard": r$2`128, 120, 120`,
}
static alphaPattern = "repeating-conic-gradient(#7c8184 0% 25%, #c2c3c4 0% 50%) 50% / 10px 10px"
static colorDragEventName = "ueb-color-drag"
static colorPickEventName = "ueb-color-pick"
@@ -43,6 +63,26 @@ class Configuration {
end: "blueprint-unfocus",
}
static fontSize = r$2`12.5px`
/** @param {PinElement} pin */
static getPinColor(pin) {
if (!pin) {
return Configuration.#pinColor["default"]
}
if (Configuration.#pinColor[pin.pinType]) {
return Configuration.#pinColor[pin.pinType]
}
if (pin.entity.PinType.PinCategory == "struct" || pin.entity.PinType.PinCategory == "object") {
switch (pin.entity.PinType.PinSubCategoryObject.type) {
case "ScriptStruct":
return r$2`0, 88, 200`
default:
if (pin.entity.PinType.PinSubCategoryObject.getName().endsWith("Actor")) {
return Configuration.#pinColor["/Script/Engine.Actor"]
}
}
}
return Configuration.#pinColor["default"]
}
static gridAxisLineColor = r$2`black`
static gridExpandThreshold = 0.25 // remaining size factor threshold to cause an expansion event
static gridLineColor = r$2`#353535`
@@ -75,30 +115,21 @@ class Configuration {
static nodeRadius = 8 // in pixel
static nodeReflowEventName = "ueb-node-reflow"
static nodeType = {
forEachLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoopWithBreak",
forLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoop",
callFunction: "/Script/BlueprintGraph.K2Node_CallFunction",
doN: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:Do N",
dynamicCast: "/Script/BlueprintGraph.K2Node_DynamicCast",
forEachElementInEnum: "/Script/BlueprintGraph.K2Node_ForEachElementInEnum",
forEachLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoop",
forEachLoopWithBreak: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoopWithBreak",
forLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoop",
forLoopWithBreak: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoopWithBreak",
ifThenElse: "/Script/BlueprintGraph.K2Node_IfThenElse",
knot: "/Script/BlueprintGraph.K2Node_Knot",
macro: "/Script/BlueprintGraph.K2Node_MacroInstance",
pawn: "/Script/Engine.Pawn",
reverseForEachLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ReverseForEachLoop",
whileLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:WhileLoop",
}
static pinColor = {
"/Script/CoreUObject.LinearColor": r$2`3, 76, 168`,
"/Script/CoreUObject.Rotator": r$2`152, 171, 241`,
"/Script/CoreUObject.Transform": r$2`241, 110, 1`,
"/Script/CoreUObject.Vector": r$2`215, 202, 11`,
"/Script/Engine.Actor": r$2`0, 168, 240`,
"bool": r$2`117, 0, 0`,
"default": r$2`167, 167, 167`,
"exec": r$2`240, 240, 240`,
"int": r$2`32, 224, 173`,
"name": r$2`203, 129, 252`,
"real": r$2`50, 187, 0`,
"string": r$2`213, 0, 176`,
"wildcard": r$2`128, 120, 120`
}
static selectAllKeyboardKey = "(bCtrl=True,Key=A)"
static distanceThreshold = 5 // in pixel
static trackingMouseEventName = {
@@ -761,12 +792,23 @@ class Utility {
.replaceAll(/(\<!--.*?\-->)/g, "") // html comments
}
/** @param {String} value */
static capitalFirstLetter(value) {
if (value.length === 0) {
return value
}
return value.charAt(0).toLocaleUpperCase() + value.slice(1).toLocaleLowerCase()
}
/** @param {String} value */
static formatStringName(value) {
return value
.trim()
.replace(/^b/, "") // Remove leading b (for boolean values) or newlines
.replaceAll(/(?<=[a-z])(?=[A-Z])|_|\s+/g, " ") // Insert a space between a lowercase and uppercase letter, instead of an underscore or multiple spaces
.split(" ")
.map(v => Utility.capitalFirstLetter(v))
.join(" ")
}
/** @param {String} value */
@@ -774,7 +816,7 @@ class Utility {
return value
.replace(/(?:.+\.)?([^\.]+)$/, "$1")
.replaceAll(/(?<=[a-z\d])(?=[A-Z])|(?<=[a-zA-Z])(?=\d)|(?<=[A-Z]{2})(?=[A-Z][a-z])/g, "-")
.toLocaleLowerCase()
.toLowerCase()
}
/** @param {LinearColorEntity} value */
@@ -927,6 +969,10 @@ class ObjectReferenceEntity extends IEntity {
/** @type {String} */ this.type;
/** @type {String} */ this.path;
}
getName() {
return this.path.match(/[^\.\/]+$/)[0]
}
}
class FunctionReferenceEntity extends IEntity {
@@ -1295,11 +1341,7 @@ class LocalizedTextEntity extends IEntity {
}
toString() {
if (this.value.length === 0) {
return this.value
}
let result = this.value;
return result.charAt(0).toLocaleUpperCase() + result.slice(1).toLocaleLowerCase()
return Utility.capitalFirstLetter(this.value)
}
}
@@ -1608,6 +1650,7 @@ class ObjectEntity extends IEntity {
EventReference: new TypeInitialization(FunctionReferenceEntity, false, null,),
TargetType: new TypeInitialization(ObjectReferenceEntity, false, null),
MacroGraphReference: new TypeInitialization(MacroGraphReferenceEntity, false, null),
Enum: new TypeInitialization(ObjectReferenceEntity, false),
NodePosX: IntegerEntity,
NodePosY: IntegerEntity,
AdvancedPinDisplay: new TypeInitialization(IdentifierEntity, false, null),
@@ -1630,6 +1673,7 @@ class ObjectEntity extends IEntity {
/** @type {FunctionReferenceEntity?} */ this.EventReference;
/** @type {ObjectReferenceEntity?} */ this.TargetType;
/** @type {MacroGraphReferenceEntity?} */ this.MacroGraphReference;
/** @type {ObjectReferenceEntity?} */ this.Enum;
/** @type {IntegerEntity} */ this.NodePosX;
/** @type {IntegerEntity} */ this.NodePosY;
/** @type {IdentifierEntity?} */ this.AdvancedPinDisplay;
@@ -1677,29 +1721,24 @@ class ObjectEntity extends IEntity {
}
getDisplayName() {
let name = "";
switch (this.getType()) {
case Configuration.nodeType.callFunction:
name = this.FunctionReference.MemberName;
break
return Utility.formatStringName(this.FunctionReference.MemberName)
case Configuration.nodeType.dynamicCast:
return `Cast To ${this.TargetType.getName()}`
case Configuration.nodeType.ifThenElse:
name = "Branch";
break
case Configuration.nodeType.forEachLoop:
name = "For Each Loop with Break";
break
case Configuration.nodeType.reverseForEachLoop:
name = "Reverse for Each Loop";
break
return "Branch"
case Configuration.nodeType.forEachElementInEnum:
return `For Each ${this.Enum.getName()}`
case Configuration.nodeType.forEachLoopWithBreak:
return "For Each Loop with Break"
default:
if (this.getClass() === Configuration.nodeType.macro) {
name = this.MacroGraphReference.getMacroName();
return Utility.formatStringName(this.MacroGraphReference.getMacroName())
} else {
name = this.getNameAndCounter()[0];
return Utility.formatStringName(this.getNameAndCounter()[0])
}
break
}
return Utility.formatStringName(name)
}
getCounter() {
@@ -1798,6 +1837,24 @@ class Grammar {
}
}
/** @param {Grammar} r */
static ReferencePath = (r, referencePathGrammar) =>
P.alt(
referencePathGrammar,
P.seq(
P.string("/"),
referencePathGrammar
.map(v => v.toString())
.sepBy1(P.string("."))
.tieWith(".")
.sepBy1(P.string(":"))
.tieWith(":")
)
.tie()
.atLeast(2)
.tie()
)
/** @param {Grammar} r */
static createAttributeGrammar = (r, entityType, valueSeparator = P.string("=").trim(P.optWhitespace)) =>
r.AttributeName.skip(valueSeparator)
@@ -1878,21 +1935,6 @@ class Grammar {
String = r => P.regex(/(?:[^"\\]|\\.)*/).wrap(P.string('"'), P.string('"')).map(Utility.unescapeString)
.desc('string (with possibility to escape the quote using \")')
/** @param {Grammar} r */
ReferencePath = r => P.seq(
P.string("/"),
r.PathSymbol
.map(v => v.toString())
.sepBy1(P.string("."))
.tieWith(".")
.sepBy1(P.string(":"))
.tieWith(":")
)
.tie()
.atLeast(2)
.tie()
.desc('a path (words with possibly underscore, separated by ".", separated by "/")')
/** @param {Grammar} r */
AttributeName = r => r.Word.sepBy1(P.string(".")).tieWith(".").desc('words separated by ""')
@@ -1913,23 +1955,29 @@ class Grammar {
/** @param {Grammar} r */
PathSymbol = r => P.regex(/[0-9\w]+/).map(v => new PathSymbolEntity({ value: v }))
/** @param {Grammar} r */
PathSymbolOptSpaces = r => P.regex(/[0-9\w]+(?: [0-9\w]+)+|[0-9\w]+/).map(v => new PathSymbolEntity({ value: v }))
/** @param {Grammar} r */
ObjectReference = r => P.alt(
r.None,
...[r.ReferencePath.map(path => new ObjectReferenceEntity({ type: "", path: path }))]
.flatMap(referencePath => [
referencePath, // Version having just path
referencePath.trim(P.string('"')) // Version having path surround with double quotes
]),
...[
Grammar.ReferencePath(r, r.PathSymbolOptSpaces)
.map(path => new ObjectReferenceEntity({ type: "", path: path }))
].flatMap(referencePath => [
referencePath.wrap(P.string(`"`), P.string(`"`)),
referencePath.wrap(P.string(`'"`), P.string(`"'`)),
]),
P.seqMap(
r.Word, // Goes into referenceType
P.optWhitespace, // Goes into _1 (ignored)
P.alt(...[r.ReferencePath].flatMap(referencePath => [
P.alt(...[Grammar.ReferencePath(r, r.PathSymbolOptSpaces)].flatMap(referencePath => [
referencePath.wrap(P.string(`"`), P.string(`"`)),
referencePath.wrap(P.string(`'"`), P.string(`"'`))
])), // Goes into referencePath
(referenceType, _1, referencePath) => new ObjectReferenceEntity({ type: referenceType, path: referencePath })
),
Grammar.ReferencePath(r, r.PathSymbol).map(path => new ObjectReferenceEntity({ type: "", path: path })),
r.Word.map(type => new ObjectReferenceEntity({ type: type, path: "" })),
)
@@ -3759,6 +3807,17 @@ class SVGIcon {
</svg>
`
static cast = $`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 12L16 7.5L12 3V12Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 11L4 7.5L0 4V11Z" fill="white"/>
<rect opacity="0.5" x="5" y="6" width="1" height="3" fill="white"/>
<rect opacity="0.5" x="7" y="6" width="1" height="3" fill="white"/>
<rect opacity="0.5" x="9" y="6" width="1" height="3" fill="white"/>
<rect x="9" y="6" width="3" height="3" fill="white"/>
</svg>
`
static close = $`
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<line x1="2" y1="2" x2="30" y2="30" stroke="currentColor" stroke-width="4" />
@@ -3772,6 +3831,13 @@ class SVGIcon {
</svg>
`
static doN = $`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 12V8H9V4L16 10L9 16V12H1Z" fill="white"/>
<path d="M7 6L6 6L4 2.66667V6H3V1H4L6 4.33333V1H7V6Z" fill="white"/>
</svg>
`
static execPin = $`
<svg viewBox="-2 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path class="ueb-pin-tofill" stroke-width="1.25" stroke="white" fill="none"
@@ -3812,7 +3878,7 @@ class SVGIcon {
</svg>
`
static loopNode = $`
static loop = $`
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<defs>
<style>
@@ -3841,6 +3907,14 @@ class SVGIcon {
</svg>
`
static makeStruct = $`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 4L1 1.99995L2 1L4 3L5 1.99995L5 5L2 5L3 4Z" fill="white"/>
<path d="M4 13L1.99995 15L1 14L3 12L1.99995 11L5 11L5 14L4 13Z" fill="white"/>
<path d="M12.975 6H8.025C6.90662 6 6 6.90662 6 8.025V8.475C6 9.59338 6.90662 10.5 8.025 10.5H12.975C14.0934 10.5 15 9.59338 15 8.475V8.025C15 6.90662 14.0934 6 12.975 6Z" fill="white"/>
</svg>
`
static referencePin = $`
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<polygon class="ueb-pin-tofill" points="4 16 16 4 28 16 16 28" stroke="currentColor" stroke-width="5" />
@@ -4358,7 +4432,7 @@ class PinTemplate extends ITemplate {
/** @param {Map} changedProperties */
firstUpdated(changedProperties) {
super.firstUpdated(changedProperties);
this.element.style.setProperty("--ueb-pin-color-rgb", Configuration.pinColor[this.element.pinType]);
this.element.style.setProperty("--ueb-pin-color-rgb", Configuration.getPinColor(this.element));
this.#iconElement = this.element.querySelector(".ueb-pin-icon") ?? this.element;
}
@@ -4567,10 +4641,15 @@ class NodeTemplate extends ISelectableDraggableTemplate {
static #nodeIcon = {
[Configuration.nodeType.callFunction]: SVGIcon.functionSymbol,
[Configuration.nodeType.doN]: SVGIcon.doN,
[Configuration.nodeType.dynamicCast]: SVGIcon.cast,
[Configuration.nodeType.forEachElementInEnum]: SVGIcon.loop,
[Configuration.nodeType.forEachLoop]: SVGIcon.forEachLoop,
[Configuration.nodeType.forLoop]: SVGIcon.loopNode,
[Configuration.nodeType.forEachLoopWithBreak]: SVGIcon.forEachLoop,
[Configuration.nodeType.forLoop]: SVGIcon.loop,
[Configuration.nodeType.forLoopWithBreak]: SVGIcon.loop,
[Configuration.nodeType.ifThenElse]: SVGIcon.branchNode,
[Configuration.nodeType.whileLoop]: SVGIcon.loopNode,
[Configuration.nodeType.whileLoop]: SVGIcon.loop,
default: SVGIcon.functionSymbol
}
@@ -4579,9 +4658,28 @@ class NodeTemplate extends ISelectableDraggableTemplate {
this.element.addNextUpdatedCallbacks(() => this.element.dispatchReflowEvent(), true);
}
getColor() {
const functionColor = r$2`#557b9b`;
if (this.element.entity.getClass() === Configuration.nodeType.callFunction) {
if (this.element.entity.bIsPureFunc) {
return r$2`#5f815a`
} else {
return functionColor
}
}
if (this.element.entity.getClass() === Configuration.nodeType.macro) {
return r$2`#979797`
}
if (this.element.entity.getClass() === Configuration.nodeType.dynamicCast) {
return r$2`#2d686a`
}
return functionColor
}
/** @param {NodeElement} element */
constructed(element) {
super.constructed(element);
this.element.style.setProperty("--ueb-node-color", this.getColor().cssText);
}
render() {
@@ -4766,12 +4864,12 @@ class NodeElement extends ISelectableDraggableElement {
static properties = {
...ISelectableDraggableElement.properties,
nodeClass: {
typePath: {
type: String,
attribute: "data-type",
reflect: true,
},
name: {
nodeName: {
type: String,
attribute: "data-name",
reflect: true,
@@ -4827,8 +4925,8 @@ class NodeElement extends ISelectableDraggableElement {
constructor(entity, template = undefined) {
super(entity, template ?? new (NodeElement.getTypeTemplate(entity))());
this.#pins = this.template.createPinElements();
this.nodeClass = this.entity.getType();
this.name = this.entity.getObjectName();
this.typePath = this.entity.getType();
this.nodeName = this.entity.getObjectName();
this.advancedPinDisplay = this.entity.AdvancedPinDisplay?.toString();
this.enabledState = this.entity.EnabledState;
this.nodeDisplayName = this.entity.getDisplayName();
@@ -4836,7 +4934,7 @@ class NodeElement extends ISelectableDraggableElement {
this.dragLinkObjects = [];
super.setLocation([this.entity.NodePosX.value, this.entity.NodePosY.value]);
this.entity.subscribe("AdvancedPinDisplay", value => this.advancedPinDisplay = value);
this.entity.subscribe("Name", value => this.name = value);
this.entity.subscribe("Name", value => this.nodeName = value);
}
/**
@@ -6887,7 +6985,7 @@ class PinElement extends IElement {
}
getColor() {
return Configuration.pinColor[this.pinType] ?? Configuration.pinColor["default"]
return Configuration.getPinColor(this)
}
isInput() {

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,26 @@
import { css } from "lit"
/** @typedef {import("./element/PinElement").default} PinElement */
export default class Configuration {
static #pinColor = {
"/Script/CoreUObject.LinearColor": css`3, 76, 168`,
"/Script/CoreUObject.Rotator": css`152, 171, 241`,
"/Script/CoreUObject.Transform": css`241, 110, 1`,
"/Script/CoreUObject.Vector": css`215, 202, 11`,
"/Script/Engine.Actor": css`0, 168, 242`,
"/Script/Engine.Pawn": css`0, 168, 242`,
"bool": css`117, 0, 0`,
"byte": css`0, 110, 98`,
"class": css`88, 0, 186`,
"default": css`167, 167, 167`,
"exec": css`240, 240, 240`,
"int": css`32, 224, 173`,
"name": css`203, 129, 252`,
"real": css`50, 187, 0`,
"string": css`213, 0, 176`,
"wildcard": css`128, 120, 120`,
}
static alphaPattern = "repeating-conic-gradient(#7c8184 0% 25%, #c2c3c4 0% 50%) 50% / 10px 10px"
static colorDragEventName = "ueb-color-drag"
static colorPickEventName = "ueb-color-pick"
@@ -19,6 +39,26 @@ export default class Configuration {
end: "blueprint-unfocus",
}
static fontSize = css`12.5px`
/** @param {PinElement} pin */
static getPinColor(pin) {
if (!pin) {
return Configuration.#pinColor["default"]
}
if (Configuration.#pinColor[pin.pinType]) {
return Configuration.#pinColor[pin.pinType]
}
if (pin.entity.PinType.PinCategory == "struct" || pin.entity.PinType.PinCategory == "object") {
switch (pin.entity.PinType.PinSubCategoryObject.type) {
case "ScriptStruct":
return css`0, 88, 200`
default:
if (pin.entity.PinType.PinSubCategoryObject.getName().endsWith("Actor")) {
return Configuration.#pinColor["/Script/Engine.Actor"]
}
}
}
return Configuration.#pinColor["default"]
}
static gridAxisLineColor = css`black`
static gridExpandThreshold = 0.25 // remaining size factor threshold to cause an expansion event
static gridLineColor = css`#353535`
@@ -51,30 +91,21 @@ export default class Configuration {
static nodeRadius = 8 // in pixel
static nodeReflowEventName = "ueb-node-reflow"
static nodeType = {
forEachLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoopWithBreak",
forLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoop",
callFunction: "/Script/BlueprintGraph.K2Node_CallFunction",
doN: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:Do N",
dynamicCast: "/Script/BlueprintGraph.K2Node_DynamicCast",
forEachElementInEnum: "/Script/BlueprintGraph.K2Node_ForEachElementInEnum",
forEachLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoop",
forEachLoopWithBreak: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoopWithBreak",
forLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoop",
forLoopWithBreak: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoopWithBreak",
ifThenElse: "/Script/BlueprintGraph.K2Node_IfThenElse",
knot: "/Script/BlueprintGraph.K2Node_Knot",
macro: "/Script/BlueprintGraph.K2Node_MacroInstance",
pawn: "/Script/Engine.Pawn",
reverseForEachLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ReverseForEachLoop",
whileLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:WhileLoop",
}
static pinColor = {
"/Script/CoreUObject.LinearColor": css`3, 76, 168`,
"/Script/CoreUObject.Rotator": css`152, 171, 241`,
"/Script/CoreUObject.Transform": css`241, 110, 1`,
"/Script/CoreUObject.Vector": css`215, 202, 11`,
"/Script/Engine.Actor": css`0, 168, 240`,
"bool": css`117, 0, 0`,
"default": css`167, 167, 167`,
"exec": css`240, 240, 240`,
"int": css`32, 224, 173`,
"name": css`203, 129, 252`,
"real": css`50, 187, 0`,
"string": css`213, 0, 176`,
"wildcard": css`128, 120, 120`
}
static selectAllKeyboardKey = "(bCtrl=True,Key=A)"
static distanceThreshold = 5 // in pixel
static trackingMouseEventName = {

View File

@@ -11,6 +11,17 @@ export default class SVGIcon {
</svg>
`
static cast = html`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 12L16 7.5L12 3V12Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 11L4 7.5L0 4V11Z" fill="white"/>
<rect opacity="0.5" x="5" y="6" width="1" height="3" fill="white"/>
<rect opacity="0.5" x="7" y="6" width="1" height="3" fill="white"/>
<rect opacity="0.5" x="9" y="6" width="1" height="3" fill="white"/>
<rect x="9" y="6" width="3" height="3" fill="white"/>
</svg>
`
static close = html`
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<line x1="2" y1="2" x2="30" y2="30" stroke="currentColor" stroke-width="4" />
@@ -24,6 +35,13 @@ export default class SVGIcon {
</svg>
`
static doN = html`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 12V8H9V4L16 10L9 16V12H1Z" fill="white"/>
<path d="M7 6L6 6L4 2.66667V6H3V1H4L6 4.33333V1H7V6Z" fill="white"/>
</svg>
`
static execPin = html`
<svg viewBox="-2 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path class="ueb-pin-tofill" stroke-width="1.25" stroke="white" fill="none"
@@ -64,7 +82,7 @@ export default class SVGIcon {
</svg>
`
static loopNode = html`
static loop = html`
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<defs>
<style>
@@ -93,6 +111,14 @@ export default class SVGIcon {
</svg>
`
static makeStruct = html`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 4L1 1.99995L2 1L4 3L5 1.99995L5 5L2 5L3 4Z" fill="white"/>
<path d="M4 13L1.99995 15L1 14L3 12L1.99995 11L5 11L5 14L4 13Z" fill="white"/>
<path d="M12.975 6H8.025C6.90662 6 6 6.90662 6 8.025V8.475C6 9.59338 6.90662 10.5 8.025 10.5H12.975C14.0934 10.5 15 9.59338 15 8.475V8.025C15 6.90662 14.0934 6 12.975 6Z" fill="white"/>
</svg>
`
static referencePin = html`
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<polygon class="ueb-pin-tofill" points="4 16 16 4 28 16 16 28" stroke="currentColor" stroke-width="5" />

View File

@@ -241,12 +241,23 @@ export default class Utility {
.replaceAll(/(\<!--.*?\-->)/g, "") // html comments
}
/** @param {String} value */
static capitalFirstLetter(value) {
if (value.length === 0) {
return value
}
return value.charAt(0).toLocaleUpperCase() + value.slice(1).toLocaleLowerCase()
}
/** @param {String} value */
static formatStringName(value) {
return value
.trim()
.replace(/^b/, "") // Remove leading b (for boolean values) or newlines
.replaceAll(/(?<=[a-z])(?=[A-Z])|_|\s+/g, " ") // Insert a space between a lowercase and uppercase letter, instead of an underscore or multiple spaces
.split(" ")
.map(v => Utility.capitalFirstLetter(v))
.join(" ")
}
/** @param {String} value */
@@ -254,7 +265,7 @@ export default class Utility {
return value
.replace(/(?:.+\.)?([^\.]+)$/, "$1")
.replaceAll(/(?<=[a-z\d])(?=[A-Z])|(?<=[a-zA-Z])(?=\d)|(?<=[A-Z]{2})(?=[A-Z][a-z])/g, "-")
.toLocaleLowerCase()
.toLowerCase()
}
/** @param {LinearColorEntity} value */

View File

@@ -20,12 +20,12 @@ export default class NodeElement extends ISelectableDraggableElement {
static properties = {
...ISelectableDraggableElement.properties,
nodeClass: {
typePath: {
type: String,
attribute: "data-type",
reflect: true,
},
name: {
nodeName: {
type: String,
attribute: "data-name",
reflect: true,
@@ -81,8 +81,8 @@ export default class NodeElement extends ISelectableDraggableElement {
constructor(entity, template = undefined) {
super(entity, template ?? new (NodeElement.getTypeTemplate(entity))())
this.#pins = this.template.createPinElements()
this.nodeClass = this.entity.getType()
this.name = this.entity.getObjectName()
this.typePath = this.entity.getType()
this.nodeName = this.entity.getObjectName()
this.advancedPinDisplay = this.entity.AdvancedPinDisplay?.toString()
this.enabledState = this.entity.EnabledState
this.nodeDisplayName = this.entity.getDisplayName()
@@ -90,7 +90,7 @@ export default class NodeElement extends ISelectableDraggableElement {
this.dragLinkObjects = []
super.setLocation([this.entity.NodePosX.value, this.entity.NodePosY.value])
this.entity.subscribe("AdvancedPinDisplay", value => this.advancedPinDisplay = value)
this.entity.subscribe("Name", value => this.name = value)
this.entity.subscribe("Name", value => this.nodeName = value)
}
/**

View File

@@ -164,7 +164,7 @@ export default class PinElement extends IElement {
}
getColor() {
return Configuration.pinColor[this.pinType] ?? Configuration.pinColor["default"]
return Configuration.getPinColor(this)
}
isInput() {

View File

@@ -1,4 +1,5 @@
import IEntity from "./IEntity"
import Utility from "../Utility"
export default class LocalizedTextEntity extends IEntity {
@@ -17,10 +18,6 @@ export default class LocalizedTextEntity extends IEntity {
}
toString() {
if (this.value.length === 0) {
return this.value
}
let result = this.value
return result.charAt(0).toLocaleUpperCase() + result.slice(1).toLocaleLowerCase()
return Utility.capitalFirstLetter(this.value)
}
}

View File

@@ -22,6 +22,7 @@ export default class ObjectEntity extends IEntity {
EventReference: new TypeInitialization(FunctionReferenceEntity, false, null,),
TargetType: new TypeInitialization(ObjectReferenceEntity, false, null),
MacroGraphReference: new TypeInitialization(MacroGraphReferenceEntity, false, null),
Enum: new TypeInitialization(ObjectReferenceEntity, false),
NodePosX: IntegerEntity,
NodePosY: IntegerEntity,
AdvancedPinDisplay: new TypeInitialization(IdentifierEntity, false, null),
@@ -44,6 +45,7 @@ export default class ObjectEntity extends IEntity {
/** @type {FunctionReferenceEntity?} */ this.EventReference
/** @type {ObjectReferenceEntity?} */ this.TargetType
/** @type {MacroGraphReferenceEntity?} */ this.MacroGraphReference
/** @type {ObjectReferenceEntity?} */ this.Enum
/** @type {IntegerEntity} */ this.NodePosX
/** @type {IntegerEntity} */ this.NodePosY
/** @type {IdentifierEntity?} */ this.AdvancedPinDisplay
@@ -94,26 +96,22 @@ export default class ObjectEntity extends IEntity {
let name = ""
switch (this.getType()) {
case Configuration.nodeType.callFunction:
name = this.FunctionReference.MemberName
break
return Utility.formatStringName(this.FunctionReference.MemberName)
case Configuration.nodeType.dynamicCast:
return `Cast To ${this.TargetType.getName()}`
case Configuration.nodeType.ifThenElse:
name = "Branch"
break
case Configuration.nodeType.forEachLoop:
name = "For Each Loop with Break"
break
case Configuration.nodeType.reverseForEachLoop:
name = "Reverse for Each Loop"
break
return "Branch"
case Configuration.nodeType.forEachElementInEnum:
return `For Each ${this.Enum.getName()}`
case Configuration.nodeType.forEachLoopWithBreak:
return "For Each Loop with Break"
default:
if (this.getClass() === Configuration.nodeType.macro) {
name = this.MacroGraphReference.getMacroName()
return Utility.formatStringName(this.MacroGraphReference.getMacroName())
} else {
name = this.getNameAndCounter()[0]
return Utility.formatStringName(this.getNameAndCounter()[0])
}
break
}
return Utility.formatStringName(name)
}
getCounter() {

View File

@@ -17,4 +17,8 @@ export default class ObjectReferenceEntity extends IEntity {
/** @type {String} */ this.type
/** @type {String} */ this.path
}
getName() {
return this.path.match(/[^\.\/]+$/)[0]
}
}

View File

@@ -97,6 +97,24 @@ export default class Grammar {
}
}
/** @param {Grammar} r */
static ReferencePath = (r, referencePathGrammar) =>
P.alt(
referencePathGrammar,
P.seq(
P.string("/"),
referencePathGrammar
.map(v => v.toString())
.sepBy1(P.string("."))
.tieWith(".")
.sepBy1(P.string(":"))
.tieWith(":")
)
.tie()
.atLeast(2)
.tie()
)
/** @param {Grammar} r */
static createAttributeGrammar = (r, entityType, valueSeparator = P.string("=").trim(P.optWhitespace)) =>
r.AttributeName.skip(valueSeparator)
@@ -177,21 +195,6 @@ export default class Grammar {
String = r => P.regex(/(?:[^"\\]|\\.)*/).wrap(P.string('"'), P.string('"')).map(Utility.unescapeString)
.desc('string (with possibility to escape the quote using \")')
/** @param {Grammar} r */
ReferencePath = r => P.seq(
P.string("/"),
r.PathSymbol
.map(v => v.toString())
.sepBy1(P.string("."))
.tieWith(".")
.sepBy1(P.string(":"))
.tieWith(":")
)
.tie()
.atLeast(2)
.tie()
.desc('a path (words with possibly underscore, separated by ".", separated by "/")')
/** @param {Grammar} r */
AttributeName = r => r.Word.sepBy1(P.string(".")).tieWith(".").desc('words separated by ""')
@@ -212,23 +215,29 @@ export default class Grammar {
/** @param {Grammar} r */
PathSymbol = r => P.regex(/[0-9\w]+/).map(v => new PathSymbolEntity({ value: v }))
/** @param {Grammar} r */
PathSymbolOptSpaces = r => P.regex(/[0-9\w]+(?: [0-9\w]+)+|[0-9\w]+/).map(v => new PathSymbolEntity({ value: v }))
/** @param {Grammar} r */
ObjectReference = r => P.alt(
r.None,
...[r.ReferencePath.map(path => new ObjectReferenceEntity({ type: "", path: path }))]
.flatMap(referencePath => [
referencePath, // Version having just path
referencePath.trim(P.string('"')) // Version having path surround with double quotes
]),
...[
Grammar.ReferencePath(r, r.PathSymbolOptSpaces)
.map(path => new ObjectReferenceEntity({ type: "", path: path }))
].flatMap(referencePath => [
referencePath.wrap(P.string(`"`), P.string(`"`)),
referencePath.wrap(P.string(`'"`), P.string(`"'`)),
]),
P.seqMap(
r.Word, // Goes into referenceType
P.optWhitespace, // Goes into _1 (ignored)
P.alt(...[r.ReferencePath].flatMap(referencePath => [
P.alt(...[Grammar.ReferencePath(r, r.PathSymbolOptSpaces)].flatMap(referencePath => [
referencePath.wrap(P.string(`"`), P.string(`"`)),
referencePath.wrap(P.string(`'"`), P.string(`"'`))
])), // Goes into referencePath
(referenceType, _1, referencePath) => new ObjectReferenceEntity({ type: referenceType, path: referencePath })
),
Grammar.ReferencePath(r, r.PathSymbol).map(path => new ObjectReferenceEntity({ type: "", path: path })),
r.Word.map(type => new ObjectReferenceEntity({ type: type, path: "" })),
)

View File

@@ -1,4 +1,4 @@
import { html, nothing } from "lit"
import { css, html, nothing } from "lit"
import Configuration from "../Configuration"
import ElementFactory from "../element/ElementFactory"
import ISelectableDraggableTemplate from "./ISelectableDraggableTemplate"
@@ -14,10 +14,15 @@ export default class NodeTemplate extends ISelectableDraggableTemplate {
static #nodeIcon = {
[Configuration.nodeType.callFunction]: SVGIcon.functionSymbol,
[Configuration.nodeType.doN]: SVGIcon.doN,
[Configuration.nodeType.dynamicCast]: SVGIcon.cast,
[Configuration.nodeType.forEachElementInEnum]: SVGIcon.loop,
[Configuration.nodeType.forEachLoop]: SVGIcon.forEachLoop,
[Configuration.nodeType.forLoop]: SVGIcon.loopNode,
[Configuration.nodeType.forEachLoopWithBreak]: SVGIcon.forEachLoop,
[Configuration.nodeType.forLoop]: SVGIcon.loop,
[Configuration.nodeType.forLoopWithBreak]: SVGIcon.loop,
[Configuration.nodeType.ifThenElse]: SVGIcon.branchNode,
[Configuration.nodeType.whileLoop]: SVGIcon.loopNode,
[Configuration.nodeType.whileLoop]: SVGIcon.loop,
default: SVGIcon.functionSymbol
}
@@ -26,9 +31,28 @@ export default class NodeTemplate extends ISelectableDraggableTemplate {
this.element.addNextUpdatedCallbacks(() => this.element.dispatchReflowEvent(), true)
}
getColor() {
const functionColor = css`#557b9b`
if (this.element.entity.getClass() === Configuration.nodeType.callFunction) {
if (this.element.entity.bIsPureFunc) {
return css`#5f815a`
} else {
return functionColor
}
}
if (this.element.entity.getClass() === Configuration.nodeType.macro) {
return css`#979797`
}
if (this.element.entity.getClass() === Configuration.nodeType.dynamicCast) {
return css`#2d686a`
}
return functionColor
}
/** @param {NodeElement} element */
constructed(element) {
super.constructed(element)
this.element.style.setProperty("--ueb-node-color", this.getColor().cssText)
}
render() {

View File

@@ -80,7 +80,7 @@ export default class PinTemplate extends ITemplate {
/** @param {Map} changedProperties */
firstUpdated(changedProperties) {
super.firstUpdated(changedProperties)
this.element.style.setProperty("--ueb-pin-color-rgb", Configuration.pinColor[this.element.pinType])
this.element.style.setProperty("--ueb-pin-color-rgb", Configuration.getPinColor(this.element))
this.#iconElement = this.element.querySelector(".ueb-pin-icon") ?? this.element
}

View File

@@ -1,6 +1,7 @@
ueb-node {
display: block;
position: absolute;
min-width: 130px;
border-radius: var(--ueb-node-radius);
box-shadow: 0 0 1px 0 black, 1px 4px 6px 0 rgba(0, 0, 0, 0.3);
font-weight: lighter;
@@ -63,11 +64,10 @@ ueb-node[data-selected="true"]>.ueb-node-border {
.ueb-node-top {
padding: 0.2em 0.7em;
box-shadow:
inset 5px 1px 5px -3px #7ba1b3,
inset 0 1px 0 0 #111213,
inset 0 2px 0 0 #7b9eb3;
inset 5px 1px 5px -3px #ffffff40,
inset 0 1px 2px 0 #ffffff40;
border-radius: var(--ueb-node-radius) var(--ueb-node-radius) 0 0;
background: linear-gradient(170deg, #5ca1dd 0%, #466980 50%, transparent 100%);
background: linear-gradient(170deg, var(--ueb-node-color) 0%, var(--ueb-node-color) 50%, transparent 100%);
color: #c0c0c0;
font-weight: 900;
white-space: nowrap;
@@ -79,16 +79,12 @@ ueb-node[data-selected="true"]>.ueb-node-border {
}
.ueb-zoom--2 ueb-node[data-pure-function="true"] .ueb-node-top {
background: #5f815a;
}
ueb-node[data-pure-function="true"] .ueb-node-top {
background: linear-gradient(170deg, #5f815a 0%, #5f815a 50%, transparent 100%);
background: var(--ueb-node-color);
}
.ueb-node-name {
background: radial-gradient(ellipse 100% 100% at 35% 50%, rgba(0, 0, 0, 0.35) 20%, transparent 50%);
background: radial-gradient(ellipse 100% 100% at 35% 50%, rgba(0, 0, 0, 0.5) 12%, transparent 50%);
margin: -0.1em -1.6em;
padding: 0.1em 1.6em;
}