comfy-ts 2.10.0 → 2.12.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/README.md +1 -0
- package/dist/{LogsSt-DFxzQfDc.js → LogsSt-U1H0mP1m.js} +35 -5
- package/dist/LogsSt-U1H0mP1m.js.map +1 -0
- package/dist/cli.js +4 -4
- package/dist/index.cjs +565 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +210 -31
- package/dist/index.d.ts +210 -31
- package/dist/index.js +561 -63
- package/dist/index.js.map +1 -1
- package/dist/{run-serve-_nrvJYyt.js → run-serve-BeAznay5.js} +549 -43
- package/dist/run-serve-BeAznay5.js.map +1 -0
- package/dist/{run-tui-Atvf9vb3.js → run-tui-BTGjvnKk.js} +75 -18
- package/dist/run-tui-BTGjvnKk.js.map +1 -0
- package/dist/{DefinedWorkflow-BatWaZO1.js → schemaDrift-Cg39vs53.js} +644 -60
- package/dist/schemaDrift-Cg39vs53.js.map +1 -0
- package/dist/serve-web.js +523 -133
- package/dist/{state-6RFDIQwJ.js → state-C7REnHan.js} +18 -3
- package/dist/{state-6RFDIQwJ.js.map → state-C7REnHan.js.map} +1 -1
- package/dist/web.d.ts +210 -31
- package/dist/web.js +561 -63
- package/dist/web.js.map +1 -1
- package/examples/comfy-cloud/capybara-i2v.cflow.ts +2 -0
- package/examples/comfy-cloud/wan22-5b-t2v.cflow.ts +2 -0
- package/examples/comfy-cloud/wan22-i2v.cflow.ts +2 -0
- package/examples/comfy-cloud/wan22-t2v.cflow.ts +2 -0
- package/examples/rvion/06-qwen-image-edit.cflow.ts +3 -2
- package/examples/rvion/07-local-llm-text-gen.cflow.ts +2 -2
- package/examples/rvion/10-anima-t2i.cflow.ts +229 -0
- package/extra/README.md +4 -0
- package/extra/comfyui-fresh-model-lists/README.md +25 -0
- package/extra/comfyui-fresh-model-lists/__init__.py +36 -0
- package/extra/comfyui-fresh-model-lists/test_fresh_model_lists.py +97 -0
- package/package.json +17 -7
- package/src/cli/draftMeta.ts +39 -0
- package/src/cli/serve/ServeApp.ts +242 -12
- package/src/cli/serve/applyVarPayload.ts +50 -22
- package/src/cli/serve/describeVar.ts +49 -6
- package/src/cli/serve/favicon.ts +3 -0
- package/src/cli/serve/llmConfigShape.ts +51 -0
- package/src/cli/serve/llmConfigs.ts +52 -0
- package/src/cli/serve/tagList.ts +92 -0
- package/src/cli/serve/tagSource.ts +69 -0
- package/src/cli/serve/web/api.ts +60 -0
- package/src/cli/serve/web/components/App.tsx +336 -44
- package/src/cli/serve/web/components/Gallery.tsx +105 -28
- package/src/cli/serve/web/components/HistoryPicker.tsx +149 -0
- package/src/cli/serve/web/components/Icon.tsx +18 -2
- package/src/cli/serve/web/components/MenuButton.tsx +53 -0
- package/src/cli/serve/web/components/Omnibox.tsx +85 -0
- package/src/cli/serve/web/components/PromptEnhancer.tsx +476 -180
- package/src/cli/serve/web/components/TooltipLayer.tsx +45 -0
- package/src/cli/serve/web/components/VarIcon.tsx +24 -0
- package/src/cli/serve/web/components/VarsForm.tsx +341 -177
- package/src/cli/serve/web/components/controls/BasicControls.tsx +57 -32
- package/src/cli/serve/web/components/controls/LorasControl.tsx +708 -285
- package/src/cli/serve/web/components/controls/PresetPicker.tsx +1 -1
- package/src/cli/serve/web/components/controls/PromptControl.tsx +279 -0
- package/src/cli/serve/web/components/controls/PromptEditor.tsx +113 -0
- package/src/cli/serve/web/components/controls/SeedControl.tsx +17 -10
- package/src/cli/serve/web/components/controls/SizeControl.tsx +111 -18
- package/src/cli/serve/web/components/modKey.ts +2 -0
- package/src/cli/serve/web/llm.ts +23 -12
- package/src/cli/serve/web/promptEditor/promptExtensions.ts +281 -0
- package/src/cli/serve/web/state/EnhancerSt.ts +415 -100
- package/src/cli/serve/web/state/FormSt.ts +193 -29
- package/src/cli/serve/web/state/OmniboxSt.ts +57 -0
- package/src/cli/serve/web/state/WebSt.ts +281 -57
- package/src/cli/serve/web/state/choiceButtons.ts +61 -0
- package/src/cli/serve/web/state/generateButton.ts +16 -0
- package/src/cli/serve/web/state/history.ts +54 -0
- package/src/cli/serve/web/state/host.ts +5 -2
- package/src/cli/serve/web/state/keptLines.ts +53 -0
- package/src/cli/serve/web/state/latentMode.ts +20 -0
- package/src/cli/serve/web/state/loraSort.ts +57 -0
- package/src/cli/serve/web/state/moduleTree.ts +2 -2
- package/src/cli/serve/web/state/omnibox.ts +69 -0
- package/src/cli/serve/web/state/payload.ts +38 -58
- package/src/cli/serve/web/state/shortcuts.ts +54 -0
- package/src/cli/serve/web/state/sizeStars.ts +31 -0
- package/src/cli/serve/web/state/stableSlots.ts +21 -0
- package/src/cli/serve/web/state/varGroups.ts +24 -0
- package/src/cli/serve/web/styles.ts +472 -118
- package/src/cli/serve/webBundle.ts +54 -10
- package/src/cli/tui/components/Header.tsx +2 -0
- package/src/cli/tui/components/PickerOverlays.tsx +9 -2
- package/src/cli/tui/imagePicker/ImagePickerSt.ts +1 -1
- package/src/cli/tui/state/DraftsSt.ts +18 -2
- package/src/cli/tui/state/EditorSt.ts +1 -1
- package/src/cli/tui/state/HostSt.ts +34 -0
- package/src/cli/tui/state/LorasSt.ts +1 -1
- package/src/cli/tui/state/PickerSt.ts +25 -7
- package/src/cli/tui/state/SettingsSt.ts +1 -1
- package/src/cli/tui/state/TuiSt.ts +10 -0
- package/src/coreExports.ts +20 -0
- package/src/host/ComfyHost.ts +15 -0
- package/src/host/loraInfoCache.ts +70 -0
- package/src/host/loraManagerApi.ts +27 -0
- package/src/host/schemaDrift.ts +87 -0
- package/src/state.ts +5 -0
- package/src/vars/ComfyVars.ts +337 -67
- package/src/vars/DefinedWorkflow.ts +40 -19
- package/src/vars/lanes.ts +238 -0
- package/src/vars/loraEntry.ts +101 -0
- package/src/vars/promptSyntax.ts +382 -0
- package/dist/DefinedWorkflow-BatWaZO1.js.map +0 -1
- package/dist/LogsSt-DFxzQfDc.js.map +0 -1
- package/dist/run-serve-_nrvJYyt.js.map +0 -1
- package/dist/run-tui-Atvf9vb3.js.map +0 -1
- package/src/cli/serve/web/components/Sidebar.tsx +0 -66
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// ONE tooltip for the whole panel: any element carrying `data-tip` gets it, so no component
|
|
2
|
+
// wires anything. floating-ui places it in a portal, flips and shifts it at the screen edges,
|
|
3
|
+
// and it never lives inside a scroll box, where a pseudo-element tooltip got clipped and even
|
|
4
|
+
// made the box scroll. Instant, like the css tooltips it replaces: a delay was never wanted
|
|
5
|
+
import { autoUpdate, flip, FloatingPortal, offset, shift, useFloating } from '@floating-ui/react'
|
|
6
|
+
import { useEffect, useState, type ReactNode } from 'react'
|
|
7
|
+
|
|
8
|
+
export function TooltipLayer(): ReactNode {
|
|
9
|
+
const [tip, setTip] = useState<{ el: Element; text: string } | null>(null)
|
|
10
|
+
const { refs, floatingStyles } = useFloating({
|
|
11
|
+
placement: 'bottom-start',
|
|
12
|
+
middleware: [offset(6), flip(), shift({ padding: 8 })],
|
|
13
|
+
whileElementsMounted: autoUpdate,
|
|
14
|
+
elements: { reference: tip?.el ?? null },
|
|
15
|
+
})
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const over = (e: PointerEvent): void => {
|
|
18
|
+
// a finger has no hover: a tip on touch would stay stuck over what you just tapped
|
|
19
|
+
if (e.pointerType === 'touch') return
|
|
20
|
+
const target = e.target
|
|
21
|
+
const el = target instanceof Element ? target.closest('[data-tip]') : null
|
|
22
|
+
const text = el?.getAttribute('data-tip') ?? ''
|
|
23
|
+
setTip((cur) => (el == null || text === '' ? null : cur?.el === el && cur.text === text ? cur : { el, text }))
|
|
24
|
+
}
|
|
25
|
+
const hide = (): void => setTip(null)
|
|
26
|
+
document.addEventListener('pointerover', over)
|
|
27
|
+
document.addEventListener('pointerdown', hide)
|
|
28
|
+
document.addEventListener('keydown', hide)
|
|
29
|
+
window.addEventListener('scroll', hide, true)
|
|
30
|
+
return () => {
|
|
31
|
+
document.removeEventListener('pointerover', over)
|
|
32
|
+
document.removeEventListener('pointerdown', hide)
|
|
33
|
+
document.removeEventListener('keydown', hide)
|
|
34
|
+
window.removeEventListener('scroll', hide, true)
|
|
35
|
+
}
|
|
36
|
+
}, [])
|
|
37
|
+
if (tip == null) return null
|
|
38
|
+
return (
|
|
39
|
+
<FloatingPortal>
|
|
40
|
+
<div ref={refs.setFloating} style={floatingStyles} className="tooltip" role="tooltip">
|
|
41
|
+
{tip.text}
|
|
42
|
+
</div>
|
|
43
|
+
</FloatingPortal>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// the icons a WORKFLOW gives its vars and their choices (VarUi.icon, VarUi.options[x].icon)
|
|
2
|
+
import type { ReactNode } from 'react'
|
|
3
|
+
|
|
4
|
+
/** a workflow's own icon for a var: a 24×24 path drawn in the icon color, or a whole svg. A
|
|
5
|
+
* whole svg goes through an <img> data url, so markup from a workflow never reaches the dom */
|
|
6
|
+
export function VarIcon(p: { icon: string; color: string | undefined }): ReactNode {
|
|
7
|
+
if (p.icon.trimStart().startsWith('<svg'))
|
|
8
|
+
return <img className="var-icon" alt="" src={`data:image/svg+xml;utf8,${encodeURIComponent(p.icon)}`} />
|
|
9
|
+
return (
|
|
10
|
+
<svg
|
|
11
|
+
className="var-icon"
|
|
12
|
+
viewBox="0 0 24 24"
|
|
13
|
+
fill="none"
|
|
14
|
+
stroke="currentColor"
|
|
15
|
+
strokeWidth={2}
|
|
16
|
+
strokeLinecap="round"
|
|
17
|
+
strokeLinejoin="round"
|
|
18
|
+
style={p.color == null ? undefined : { color: p.color }}
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
>
|
|
21
|
+
<path d={p.icon} />
|
|
22
|
+
</svg>
|
|
23
|
+
)
|
|
24
|
+
}
|