codemirror option for text widgets & danbooru tag autocomplete

This commit is contained in:
space-nuko
2023-05-24 11:47:08 -05:00
parent 6bbd18a261
commit 18c63c9f2e
15 changed files with 100697 additions and 25 deletions

View File

@@ -10,6 +10,7 @@ import { download } from "./utils";
* components they represent in the UI.
*/
export type ComfyBoxTemplate = {
version: 1,
nodes: LGraphNode[],
links: LLink[],
container?: DragItemEntry
@@ -20,6 +21,8 @@ export type ComfyBoxTemplate = {
* components they represent in the UI.
*/
export type SerializedComfyBoxTemplate = {
version: 1,
/*
* Serialized nodes
*/
@@ -270,6 +273,7 @@ export function serializeTemplate(canvas: ComfyGraphCanvas, template: ComfyBoxTe
[nodes, links] = pruneDetachedLinks(nodes, links);
let comfyBoxTemplate: SerializedComfyBoxTemplate = {
version: 1,
nodes: nodes,
links: links,
layout: layout
@@ -320,6 +324,7 @@ export function createTemplate(nodes: LGraphNode[]): ComfyBoxTemplateResult {
}
return {
version: 1,
nodes: nodes,
links: links,
container: container
@@ -328,6 +333,7 @@ export function createTemplate(nodes: LGraphNode[]): ComfyBoxTemplateResult {
else {
// No UI to serialize.
return {
version: 1,
nodes: nodes,
links: links,
}