Add pricing badge when a subgraph contains partner nodes (#6354)

<img width="596" height="213" alt="image"
src="https://github.com/user-attachments/assets/174c5461-f638-42de-b3ad-0e108dee3983"
/>


![api-badge-subgraph_00003](https://github.com/user-attachments/assets/067d0398-47e9-4e97-9e1d-67fac2935e55)


┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6354-Add-pricing-badge-when-a-subgraph-contains-partner-nodes-29b6d73d365081c685bec3e9446970eb)
by [Unito](https://www.unito.io)
This commit is contained in:
AustinMroz
2025-10-29 20:41:04 -07:00
committed by GitHub
parent e606ff34ec
commit ca5729a8e7
7 changed files with 175 additions and 30 deletions

View File

@@ -1710,6 +1710,14 @@ export class LGraph
subgraphNode._setConcreteSlots()
subgraphNode.arrange()
this.canvasAction((c) =>
c.canvas.dispatchEvent(
new CustomEvent('subgraph-converted', {
bubbles: true,
detail: { subgraphNode: subgraphNode as SubgraphNode }
})
)
)
return { subgraph, node: subgraphNode as SubgraphNode }
}

View File

@@ -21,6 +21,11 @@ export interface LGraphCanvasEventMap {
fromNode: SubgraphNode
}
/** Dispatched after a group of items has been converted to a subgraph*/
'subgraph-converted': {
subgraphNode: SubgraphNode
}
'litegraph:canvas':
| { subType: 'before-change' | 'after-change' }
| {