Skip to content

Commit

Permalink
1.6.17 release (#2149)
Browse files Browse the repository at this point in the history
Co-authored-by: filtered <[email protected]>
  • Loading branch information
huchenlei and webfiltered authored Jan 3, 2025
1 parent 77d45d8 commit a16061d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@comfyorg/comfyui-frontend",
"private": true,
"version": "1.6.16",
"version": "1.6.17",
"type": "module",
"repository": "https://github.com/Comfy-Org/ComfyUI_frontend",
"homepage": "https://comfy.org",
Expand Down
32 changes: 30 additions & 2 deletions src/extensions/core/noteNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ app.registerExtension({
if (!this.properties) {
this.properties = { text: '' }
}
ComfyWidgets.MARKDOWN(
ComfyWidgets.STRING(
// Should we extends LGraphNode? Yesss
this,
'',
['', { default: this.properties.text }],
['', { default: this.properties.text, multiline: true }],
app
)

Expand All @@ -50,5 +50,33 @@ app.registerExtension({
)

NoteNode.category = 'utils'

/** Markdown variant of NoteNode */
class MarkdownNoteNode extends LGraphNode {
static title = 'Markdown Note'

color = LGraphCanvas.node_colors.yellow.color
bgcolor = LGraphCanvas.node_colors.yellow.bgcolor
groupcolor = LGraphCanvas.node_colors.yellow.groupcolor

constructor(title?: string) {
super(title)
if (!this.properties) {
this.properties = { text: '' }
}
ComfyWidgets.MARKDOWN(
this,
'',
['', { default: this.properties.text }],
app
)

this.serialize_widgets = true
this.isVirtualNode = true
}
}

LiteGraph.registerNodeType('MarkdownNote', MarkdownNoteNode)
MarkdownNoteNode.category = 'utils'
}
})
13 changes: 13 additions & 0 deletions src/stores/nodeDefStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,19 @@ export const SYSTEM_NODE_DEFS: Record<string, ComfyNodeDef> = {
output_node: false,
python_module: 'nodes',
description: 'Node that add notes to your project'
},
MarkdownNote: {
name: 'MarkdownNote',
display_name: 'Markdown Note',
category: 'utils',
input: { required: {}, optional: {} },
output: [],
output_name: [],
output_is_list: [],
output_node: false,
python_module: 'nodes',
description:
'Node that add notes to your project. Reformats text as markdown.'
}
}

Expand Down

0 comments on commit a16061d

Please sign in to comment.