chore(ui): rebuild vue-widgets bundle

Rebuilt from the preceding three commits' sources:

- active-filters chip and its dead settings-toggled broadcast removed
  (the built bundle also no longer embeds the scripts/app.js test shim
  that the chip's settings.js import used to pull in)
- scrollbar inset re-measured on programmatic value changes
- app/api bindings canonicalized to "../../../scripts/*" externals and
  settings.js no longer inlined (bound at runtime via "../settings.js"
  to the vanilla module instance), per the new build guard
This commit is contained in:
Will Miao
2026-09-04 19:02:36 +08:00
parent 7afed1a14b
commit 93fc28b499
2 changed files with 72 additions and 235 deletions
+71 -234
View File
@@ -2118,14 +2118,14 @@ to { transform: rotate(360deg);
padding: 20px 0;
}
.autocomplete-text-widget[data-v-22743258] {
.autocomplete-text-widget[data-v-793d67d2] {
background: transparent;
height: 100%;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.input-wrapper[data-v-22743258] {
.input-wrapper[data-v-793d67d2] {
position: relative;
flex: 1;
display: flex;
@@ -2133,7 +2133,7 @@ to { transform: rotate(360deg);
}
/* Canvas mode styles (default) - matches built-in comfy-multiline-input */
.text-input[data-v-22743258] {
.text-input[data-v-793d67d2] {
flex: 1;
width: 100%;
background-color: var(--comfy-input-bg, #222);
@@ -2152,7 +2152,7 @@ to { transform: rotate(360deg);
}
/* Vue DOM mode styles - matches built-in p-textarea in Vue DOM mode */
.text-input.vue-dom-mode[data-v-22743258] {
.text-input.vue-dom-mode[data-v-793d67d2] {
background-color: var(--color-charcoal-400, #313235);
color: #fff;
padding: 8px 12px 30px 12px; /* Reserve bottom space for clear button */
@@ -2161,12 +2161,12 @@ to { transform: rotate(360deg);
font-size: 12px;
font-family: inherit;
}
.text-input[data-v-22743258]:focus {
.text-input[data-v-793d67d2]:focus {
outline: none;
}
/* Clear button styles */
.clear-button[data-v-22743258] {
.clear-button[data-v-793d67d2] {
position: absolute;
right: calc(6px + var(--lm-vscrollbar-width, 0px));
bottom: 6px; /* Changed from top to bottom */
@@ -2189,79 +2189,31 @@ to { transform: rotate(360deg);
}
/* Show clear button when hovering over input wrapper */
.input-wrapper:hover .clear-button[data-v-22743258] {
.input-wrapper:hover .clear-button[data-v-793d67d2] {
opacity: 0.7;
pointer-events: auto;
}
.clear-button[data-v-22743258]:hover {
.clear-button[data-v-793d67d2]:hover {
opacity: 1;
background: rgba(255, 100, 100, 0.8);
}
.clear-button svg[data-v-22743258] {
.clear-button svg[data-v-793d67d2] {
width: 12px;
height: 12px;
}
/* Active-filters search indicator (loras nodes only) */
.active-filters-toggle[data-v-22743258] {
position: absolute;
top: 3px;
right: calc(3px + var(--lm-vscrollbar-width, 0px));
width: 16px;
height: 16px;
padding: 2px;
margin: 0;
border: none;
border-radius: 4px;
background: rgba(128, 128, 128, 0.25);
color: rgba(255, 255, 255, 0.5);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.7;
transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
z-index: 10;
}
.active-filters-toggle[data-v-22743258]:hover {
opacity: 1;
background: rgba(128, 128, 128, 0.45);
color: rgba(255, 255, 255, 0.85);
}
.active-filters-toggle.is-active[data-v-22743258] {
background: rgba(59, 130, 246, 0.35);
color: #7db8ff;
opacity: 1;
}
.active-filters-toggle svg[data-v-22743258] {
width: 11px;
height: 11px;
}
/* Vue DOM mode adjustments for the indicator */
.text-input.vue-dom-mode ~ .active-filters-toggle[data-v-22743258] {
top: 8px;
right: calc(8px + var(--lm-vscrollbar-width, 0px));
width: 20px;
height: 20px;
}
.text-input.vue-dom-mode ~ .active-filters-toggle svg[data-v-22743258] {
width: 13px;
height: 13px;
}
/* Vue DOM mode adjustments for clear button */
.text-input.vue-dom-mode ~ .clear-button[data-v-22743258] {
.text-input.vue-dom-mode ~ .clear-button[data-v-793d67d2] {
right: calc(8px + var(--lm-vscrollbar-width, 0px));
bottom: 10px; /* Changed from top to bottom, adjusted for Vue DOM padding */
width: 20px;
height: 20px;
background: rgba(107, 114, 128, 0.6);
}
.text-input.vue-dom-mode ~ .clear-button[data-v-22743258]:hover {
.text-input.vue-dom-mode ~ .clear-button[data-v-793d67d2]:hover {
background: oklch(62% 0.18 25);
}
.text-input.vue-dom-mode ~ .clear-button svg[data-v-22743258] {
.text-input.vue-dom-mode ~ .clear-button svg[data-v-793d67d2] {
width: 14px;
height: 14px;
}
@@ -2529,8 +2481,9 @@ to { transform: rotate(360deg);
}
})();
var _a;
import { app as app$1 } from "../../../scripts/app.js";
import { api as api$1 } from "../../../scripts/api.js";
import { app } from "../../../scripts/app.js";
import { api } from "../../../scripts/api.js";
import "../settings.js";
/**
* @vue/shared v3.5.26
* (c) 2018-present Yuxi (Evan) You and Vue contributors
@@ -11100,7 +11053,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
const EditButton = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-8da8aa4b"]]);
const _hoisted_1$k = { class: "section" };
const _hoisted_2$j = { class: "section__header" };
const _hoisted_3$h = { class: "section__content" };
const _hoisted_3$g = { class: "section__content" };
const _hoisted_4$f = {
key: 0,
class: "section__placeholder"
@@ -11130,7 +11083,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
})
]),
createBaseVNode("div", _hoisted_3$h, [
createBaseVNode("div", _hoisted_3$g, [
__props.selected.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4$f, " All models ")) : (openBlock(), createElementBlock("div", _hoisted_5$d, [
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.selected, (name) => {
return openBlock(), createBlock(FilterChip, {
@@ -11149,7 +11102,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
const BaseModelSection = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-12f059e2"]]);
const _hoisted_1$j = { class: "section" };
const _hoisted_2$i = { class: "section__columns" };
const _hoisted_3$g = { class: "section__column" };
const _hoisted_3$f = { class: "section__column" };
const _hoisted_4$e = { class: "section__column-header" };
const _hoisted_5$c = { class: "section__column-content" };
const _hoisted_6$c = {
@@ -11185,7 +11138,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
createBaseVNode("span", { class: "section__title" }, "TAGS")
], -1)),
createBaseVNode("div", _hoisted_2$i, [
createBaseVNode("div", _hoisted_3$g, [
createBaseVNode("div", _hoisted_3$f, [
createBaseVNode("div", _hoisted_4$e, [
_cache[2] || (_cache[2] = createBaseVNode("span", { class: "section__column-title section__column-title--include" }, "INCLUDE", -1)),
createVNode(EditButton, {
@@ -11231,7 +11184,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
const TagsSection = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-b869b780"]]);
const _hoisted_1$i = { class: "section" };
const _hoisted_2$h = { class: "section__columns" };
const _hoisted_3$f = { class: "section__column" };
const _hoisted_3$e = { class: "section__column" };
const _hoisted_4$d = { class: "section__column-header" };
const _hoisted_5$b = { class: "section__content" };
const _hoisted_6$b = {
@@ -11279,7 +11232,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
createBaseVNode("span", { class: "section__title" }, "FOLDERS")
], -1)),
createBaseVNode("div", _hoisted_2$h, [
createBaseVNode("div", _hoisted_3$f, [
createBaseVNode("div", _hoisted_3$e, [
createBaseVNode("div", _hoisted_4$d, [
_cache[3] || (_cache[3] = createBaseVNode("span", { class: "section__column-title section__column-title--include" }, "INCLUDE", -1)),
createBaseVNode("button", {
@@ -11347,7 +11300,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
const FoldersSection = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-af9caf84"]]);
const _hoisted_1$h = { class: "section" };
const _hoisted_2$g = { class: "section__header" };
const _hoisted_3$e = { class: "section__toggle" };
const _hoisted_3$d = { class: "section__toggle" };
const _hoisted_4$c = ["checked"];
const _hoisted_5$a = { class: "section__columns" };
const _hoisted_6$a = { class: "section__column" };
@@ -11403,7 +11356,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
return openBlock(), createElementBlock("div", _hoisted_1$h, [
createBaseVNode("div", _hoisted_2$g, [
_cache[4] || (_cache[4] = createBaseVNode("span", { class: "section__title" }, "NAME PATTERNS", -1)),
createBaseVNode("label", _hoisted_3$e, [
createBaseVNode("label", _hoisted_3$d, [
createBaseVNode("input", {
type: "checkbox",
checked: __props.useRegex,
@@ -11487,7 +11440,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
const NamePatternsSection = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-9995b5ed"]]);
const _hoisted_1$g = { class: "section" };
const _hoisted_2$f = { class: "section__toggles" };
const _hoisted_3$d = { class: "toggle-item" };
const _hoisted_3$c = { class: "toggle-item" };
const _hoisted_4$b = ["aria-checked"];
const _hoisted_5$9 = { class: "toggle-item" };
const _hoisted_6$9 = ["aria-checked"];
@@ -11505,7 +11458,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
createBaseVNode("span", { class: "section__title" }, "LICENSE")
], -1)),
createBaseVNode("div", _hoisted_2$f, [
createBaseVNode("label", _hoisted_3$d, [
createBaseVNode("label", _hoisted_3$c, [
_cache[3] || (_cache[3] = createBaseVNode("span", {
class: "toggle-item__label",
title: "Use the model without crediting the creator"
@@ -11545,7 +11498,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
const LicenseSection = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-07ddd3df"]]);
const _hoisted_1$f = { class: "preview" };
const _hoisted_2$e = { class: "preview__title" };
const _hoisted_3$c = ["disabled"];
const _hoisted_3$b = ["disabled"];
const _hoisted_4$a = {
key: 0,
class: "preview__tooltip"
@@ -11604,7 +11557,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
d: "M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"
})
], -1)
])], 10, _hoisted_3$c)
])], 10, _hoisted_3$b)
], 32),
createVNode(Transition, { name: "tooltip" }, {
default: withCtx(() => [
@@ -11716,7 +11669,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
const LoraPoolSummaryView = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-83235a00"]]);
const _hoisted_1$d = { class: "lora-pool-modal__header" };
const _hoisted_2$c = { class: "lora-pool-modal__title-container" };
const _hoisted_3$b = { class: "lora-pool-modal__title" };
const _hoisted_3$a = { class: "lora-pool-modal__title" };
const _hoisted_4$9 = {
key: 0,
class: "lora-pool-modal__subtitle"
@@ -11776,7 +11729,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
}, [
createBaseVNode("div", _hoisted_1$d, [
createBaseVNode("div", _hoisted_2$c, [
createBaseVNode("h3", _hoisted_3$b, toDisplayString(__props.title), 1),
createBaseVNode("h3", _hoisted_3$a, toDisplayString(__props.title), 1),
__props.subtitle ? (openBlock(), createElementBlock("p", _hoisted_4$9, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true)
]),
createBaseVNode("button", {
@@ -11804,7 +11757,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
const ModalWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-7b4de03d"]]);
const _hoisted_1$c = { class: "search-container" };
const _hoisted_2$b = { class: "model-list" };
const _hoisted_3$a = ["checked", "onChange"];
const _hoisted_3$9 = ["checked", "onChange"];
const _hoisted_4$8 = { class: "model-checkbox-visual" };
const _hoisted_5$6 = {
key: 0,
@@ -11914,7 +11867,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
checked: isSelected(model.name),
onChange: ($event) => toggleModel(model.name),
class: "model-checkbox"
}, null, 40, _hoisted_3$a),
}, null, 40, _hoisted_3$9),
createBaseVNode("span", _hoisted_4$8, [
isSelected(model.name) ? (openBlock(), createElementBlock("svg", _hoisted_5$6, [..._cache[4] || (_cache[4] = [
createBaseVNode("path", { d: "M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" }, null, -1)
@@ -11935,7 +11888,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
const BaseModelModal = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-e02ca44a"]]);
const _hoisted_1$b = { class: "search-container" };
const _hoisted_2$a = ["onClick"];
const _hoisted_3$9 = {
const _hoisted_3$8 = {
key: 0,
class: "no-results"
};
@@ -12079,7 +12032,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
onClick: ($event) => toggleTag(tag.tag)
}, toDisplayString(tag.tag), 11, _hoisted_2$a);
}), 128)),
visibleTags.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_3$9, " No tags found ")) : createCommentVNode("", true),
visibleTags.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_3$8, " No tags found ")) : createCommentVNode("", true),
hasMoreTags.value ? (openBlock(), createElementBlock("div", _hoisted_4$7, " Scroll to load more... ")) : createCommentVNode("", true)
], 544)
]),
@@ -12094,7 +12047,7 @@ const _hoisted_2$9 = {
key: 1,
class: "tree-node__toggle-spacer"
};
const _hoisted_3$8 = { class: "tree-node__checkbox-label" };
const _hoisted_3$7 = { class: "tree-node__checkbox-label" };
const _hoisted_4$6 = ["checked"];
const _hoisted_5$5 = {
key: 0,
@@ -12155,7 +12108,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
createBaseVNode("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" }, null, -1)
])], 2))
])) : (openBlock(), createElementBlock("span", _hoisted_2$9)),
createBaseVNode("label", _hoisted_3$8, [
createBaseVNode("label", _hoisted_3$7, [
createBaseVNode("input", {
type: "checkbox",
class: "tree-node__checkbox",
@@ -12201,7 +12154,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
const FolderTreeNode = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-90187dd4"]]);
const _hoisted_1$9 = { class: "search-container" };
const _hoisted_2$8 = { class: "folder-tree" };
const _hoisted_3$7 = {
const _hoisted_3$6 = {
key: 1,
class: "no-results"
};
@@ -12300,7 +12253,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
onToggleExpand: toggleExpand,
onToggleSelect: toggleSelect
}, null, 8, ["node", "selected", "expanded", "variant"]);
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_3$7, " No folders found "))
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_3$6, " No folders found "))
])
]),
_: 1
@@ -12706,7 +12659,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
const LoraPoolWidget = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-ed73eab5"]]);
const _hoisted_1$8 = { class: "last-used-preview" };
const _hoisted_2$7 = { class: "last-used-preview__content" };
const _hoisted_3$6 = ["src", "onError"];
const _hoisted_3$5 = ["src", "onError"];
const _hoisted_4$5 = {
key: 1,
class: "last-used-preview__thumb last-used-preview__thumb--placeholder"
@@ -12758,7 +12711,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
src: previewUrls.value[lora.name],
class: "last-used-preview__thumb",
onError: ($event) => onImageError(lora.name)
}, null, 40, _hoisted_3$6)) : (openBlock(), createElementBlock("div", _hoisted_4$5, [..._cache[0] || (_cache[0] = [
}, null, 40, _hoisted_3$5)) : (openBlock(), createElementBlock("div", _hoisted_4$5, [..._cache[0] || (_cache[0] = [
createBaseVNode("svg", {
viewBox: "0 0 16 16",
fill: "currentColor"
@@ -13199,7 +13152,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
const DualRangeSlider = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-e0c8dc9f"]]);
const _hoisted_1$5 = { class: "randomizer-settings" };
const _hoisted_2$5 = { class: "setting-section" };
const _hoisted_3$5 = { class: "count-mode-tabs" };
const _hoisted_3$4 = { class: "count-mode-tabs" };
const _hoisted_4$4 = ["checked"];
const _hoisted_5$3 = ["checked"];
const _hoisted_6$3 = { class: "slider-container" };
@@ -13264,7 +13217,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
], -1)),
createBaseVNode("div", _hoisted_2$5, [
_cache[20] || (_cache[20] = createBaseVNode("label", { class: "setting-label" }, "LoRA Count", -1)),
createBaseVNode("div", _hoisted_3$5, [
createBaseVNode("div", _hoisted_3$4, [
createBaseVNode("label", {
class: normalizeClass(["count-mode-tab", { active: __props.countMode === "fixed" }])
}, [
@@ -13895,7 +13848,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
const LoraRandomizerWidget = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-ca6e8cec"]]);
const _hoisted_1$4 = { class: "cycler-settings" };
const _hoisted_2$4 = { class: "setting-section progress-section" };
const _hoisted_3$4 = { class: "progress-label" };
const _hoisted_3$3 = { class: "progress-label" };
const _hoisted_4$3 = ["title"];
const _hoisted_5$2 = { class: "progress-counter" };
const _hoisted_6$2 = { class: "progress-index" };
@@ -14020,7 +13973,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
class: normalizeClass(["progress-info", { disabled: __props.isPauseDisabled }]),
onClick: handleOpenSelector
}, [
createBaseVNode("span", _hoisted_3$4, toDisplayString(__props.isWorkflowExecuting ? "Using LoRA:" : "Next LoRA:"), 1),
createBaseVNode("span", _hoisted_3$3, toDisplayString(__props.isWorkflowExecuting ? "Using LoRA:" : "Next LoRA:"), 1),
createBaseVNode("span", {
class: normalizeClass(["progress-name clickable", { disabled: __props.isPauseDisabled, "no-lora": __props.isNoLora }]),
title: __props.currentLoraFilename
@@ -14220,7 +14173,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
const LoraCyclerSettingsView = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-f0663be4"]]);
const _hoisted_1$3 = { class: "search-container" };
const _hoisted_2$3 = { class: "lora-list" };
const _hoisted_3$3 = ["onMouseenter", "onClick"];
const _hoisted_3$2 = ["onMouseenter", "onClick"];
const _hoisted_4$2 = { class: "lora-index" };
const _hoisted_5$1 = ["title"];
const _hoisted_6$1 = {
@@ -14401,7 +14354,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
title: item.lora.file_name
}, toDisplayString(item.lora.file_name), 9, _hoisted_5$1),
__props.currentIndex === item.index ? (openBlock(), createElementBlock("span", _hoisted_6$1, "Current")) : createCommentVNode("", true)
], 42, _hoisted_3$3);
], 42, _hoisted_3$2);
}), 128)),
filteredList.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_7$1, " No LoRAs found ")) : createCommentVNode("", true)
])
@@ -15017,7 +14970,7 @@ const _hoisted_2$2 = {
class: "json-content",
ref: "contentRef"
};
const _hoisted_3$2 = ["innerHTML"];
const _hoisted_3$1 = ["innerHTML"];
const _hoisted_4$1 = {
key: 1,
class: "placeholder"
@@ -15112,7 +15065,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
hasMetadata.value ? (openBlock(), createElementBlock("pre", {
key: 0,
innerHTML: highlightedJson.value
}, null, 8, _hoisted_3$2)) : (openBlock(), createElementBlock("div", _hoisted_4$1, "No metadata available"))
}, null, 8, _hoisted_3$1)) : (openBlock(), createElementBlock("div", _hoisted_4$1, "No metadata available"))
], 512)
]);
};
@@ -15184,71 +15137,8 @@ function useAutocomplete(textareaRef, modelType = "loras", options = {}) {
refreshCaretHelper
};
}
const settingsStore = /* @__PURE__ */ new Map();
const app = {
extensionManager: {
setting: {
get: (id) => settingsStore.has(id) ? settingsStore.get(id) : void 0,
set: async (id, value) => {
settingsStore.set(id, value);
}
}
}
};
const LORA_ACTIVE_FILTERS_AUTOCOMPLETE_SETTING_ID = "loramanager.lora_active_filters_autocomplete";
const LORA_ACTIVE_FILTERS_AUTOCOMPLETE_DEFAULT = false;
const SETTING_TOGGLED_EVENT_NAME = "lora-manager:setting-toggled";
const setLoraManagerSettingValue = async (settingId, value) => {
var _a2, _b, _c, _d;
const settingManager = (_a2 = app == null ? void 0 : app.extensionManager) == null ? void 0 : _a2.setting;
if (settingManager && typeof settingManager.set === "function") {
await settingManager.set(settingId, value);
_notifySettingToggled(settingId, value);
return true;
}
const setting = (_d = (_c = (_b = app == null ? void 0 : app.ui) == null ? void 0 : _b.settings) == null ? void 0 : _c.settingsById) == null ? void 0 : _d[settingId];
if (setting) {
app.ui.settings.setSettingValue(settingId, value);
_notifySettingToggled(settingId, value);
return true;
}
return false;
};
const _notifySettingToggled = (settingId, value) => {
try {
window.dispatchEvent(new CustomEvent(SETTING_TOGGLED_EVENT_NAME, {
detail: { settingId, value }
}));
} catch (error) {
}
};
const getLoraActiveFiltersAutocompletePreference = /* @__PURE__ */ (() => {
let settingsUnavailableLogged = false;
return () => {
var _a2;
const settingManager = (_a2 = app == null ? void 0 : app.extensionManager) == null ? void 0 : _a2.setting;
if (!settingManager || typeof settingManager.get !== "function") {
if (!settingsUnavailableLogged) {
console.warn("LoRA Manager: settings API unavailable, using default lora active filters autocomplete setting.");
settingsUnavailableLogged = true;
}
return LORA_ACTIVE_FILTERS_AUTOCOMPLETE_DEFAULT;
}
try {
const value = settingManager.get(LORA_ACTIVE_FILTERS_AUTOCOMPLETE_SETTING_ID);
return value ?? LORA_ACTIVE_FILTERS_AUTOCOMPLETE_DEFAULT;
} catch (error) {
if (!settingsUnavailableLogged) {
console.warn("LoRA Manager: unable to read lora active filters autocomplete setting, using default.", error);
settingsUnavailableLogged = true;
}
return LORA_ACTIVE_FILTERS_AUTOCOMPLETE_DEFAULT;
}
};
})();
const _hoisted_1$1 = { class: "autocomplete-text-widget" };
const _hoisted_2$1 = ["placeholder", "spellcheck"];
const _hoisted_3$1 = ["title"];
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
__name: "AutocompleteTextWidget",
props: {
@@ -15297,37 +15187,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
};
const hasText = ref(false);
const showClearButton = computed(() => hasText.value);
const isLorasMode = (props.modelType ?? "loras") === "loras";
const activeFiltersEnabled = ref(false);
const refreshActiveFiltersState = () => {
if (isLorasMode) {
activeFiltersEnabled.value = getLoraActiveFiltersAutocompletePreference();
}
};
const onSettingToggled = (event) => {
const detail = event.detail;
if ((detail == null ? void 0 : detail.settingId) === LORA_ACTIVE_FILTERS_AUTOCOMPLETE_SETTING_ID) {
activeFiltersEnabled.value = detail.value === true;
}
};
const activeFiltersToggleTitle = computed(
() => activeFiltersEnabled.value ? "Active Filters Search is ON: suggestions respect the LoRA Manager page filters. Click to disable, or type /noactivefilters." : "Active Filters Search is OFF: suggestions search the full library. Click to enable, or type /activefilters."
);
const toggleActiveFiltersSearch = async () => {
const newValue = !activeFiltersEnabled.value;
try {
const success = await setLoraManagerSettingValue(
LORA_ACTIVE_FILTERS_AUTOCOMPLETE_SETTING_ID,
newValue
);
if (!success) {
throw new Error("settings API unavailable");
}
activeFiltersEnabled.value = newValue;
} catch (error) {
console.error("[Lora Manager] Failed to toggle active filters search:", error);
}
};
useAutocomplete(
textareaRef,
props.modelType ?? "loras",
@@ -15380,12 +15239,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
}
};
const onExternalValueChange = () => {
updateVScrollbarWidth();
updateHasTextState();
};
const setupWidgetOnSetValue = () => {
if (props.widget) {
props.widget.onSetValue = (value) => {
hasText.value = value.length > 0;
updateVScrollbarWidth();
};
}
};
@@ -15435,8 +15296,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
props.widget.callback(textareaRef.value.value);
}
setupWidgetOnSetValue();
refreshActiveFiltersState();
window.addEventListener(SETTING_TOGGLED_EVENT_NAME, onSettingToggled);
updateVScrollbarWidth();
observeScrollbarWidth();
document.addEventListener("lora-manager:vue-mode-change", onModeChange);
@@ -15456,7 +15315,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
props.widget.onSetValue = void 0;
}
document.removeEventListener("lora-manager:vue-mode-change", onModeChange);
window.removeEventListener(SETTING_TOGGLED_EVENT_NAME, onSettingToggled);
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", _hoisted_1$1, [
@@ -15503,29 +15361,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
y2: "18"
})
], -1)
])])) : createCommentVNode("", true),
isLorasMode ? (openBlock(), createElementBlock("button", {
key: 1,
type: "button",
class: normalizeClass(["active-filters-toggle", { "is-active": activeFiltersEnabled.value }]),
title: activeFiltersToggleTitle.value,
onClick: toggleActiveFiltersSearch
}, [..._cache[1] || (_cache[1] = [
createBaseVNode("svg", {
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
"stroke-width": "2"
}, [
createBaseVNode("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" })
], -1)
])], 10, _hoisted_3$1)) : createCommentVNode("", true)
])])) : createCommentVNode("", true)
], 4)
]);
};
}
});
const AutocompleteTextWidget = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-22743258"]]);
const AutocompleteTextWidget = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-793d67d2"]]);
const _hoisted_1 = { class: "lora-info-tabs" };
const _hoisted_2 = { class: "tab-content notes-tab" };
const _hoisted_3 = { class: "info-field" };
@@ -15942,11 +15784,6 @@ function createModeChangeCallback(node, updateDownstreamLoaders2, nodeSpecificCa
updateDownstreamLoaders2(node);
};
}
const api = {
fetchApi: (...args) => fetch(...args),
addEventListener: (eventName, handler) => document.addEventListener(eventName, handler),
removeEventListener: (eventName, handler) => document.removeEventListener(eventName, handler)
};
let _loraSyntaxFormatCache = null;
let _loraSyntaxFormatRefreshPromise = null;
async function _fetchLoraSyntaxFormat() {
@@ -16303,8 +16140,8 @@ const AUTOCOMPLETE_TEXT_MIN_WIDTH_DEFAULT = 400;
const AUTOCOMPLETE_TEXT_MIN_HEIGHT_DEFAULT = 300;
const AUTOCOMPLETE_METADATA_VERSION = 1;
const LORA_MANAGER_WIDGET_IDS_PROPERTY = "__lm_widget_ids";
const originalGraphToPrompt = app$1.graphToPrompt.bind(app$1);
app$1.graphToPrompt = async (...args) => {
const originalGraphToPrompt = app.graphToPrompt.bind(app);
app.graphToPrompt = async (...args) => {
const result = await originalGraphToPrompt(...args);
stripAutocompleteMetadataFromPromptResult(result);
return result;
@@ -16313,7 +16150,7 @@ function forwardMiddleMouseToCanvas(container) {
if (!container) return;
container.addEventListener("pointerdown", (event) => {
if (event.button === 1) {
const canvas = app$1.canvas;
const canvas = app.canvas;
if (canvas && typeof canvas.processMouseDown === "function") {
canvas.processMouseDown(event);
}
@@ -16321,7 +16158,7 @@ function forwardMiddleMouseToCanvas(container) {
});
container.addEventListener("pointermove", (event) => {
if ((event.buttons & 4) === 4) {
const canvas = app$1.canvas;
const canvas = app.canvas;
if (canvas && typeof canvas.processMouseMove === "function") {
canvas.processMouseMove(event);
}
@@ -16329,7 +16166,7 @@ function forwardMiddleMouseToCanvas(container) {
});
container.addEventListener("pointerup", (event) => {
if (event.button === 1) {
const canvas = app$1.canvas;
const canvas = app.canvas;
if (canvas && typeof canvas.processMouseUp === "function") {
canvas.processMouseUp(event);
}
@@ -16447,7 +16284,7 @@ function createLoraRandomizerWidget(node) {
const vueApp = createApp(LoraRandomizerWidget, {
widget,
node,
api: api$1
api
});
vueApp.use(PrimeVue, {
unstyled: true,
@@ -16522,7 +16359,7 @@ function createLoraCyclerWidget(node) {
const vueApp = createApp(LoraCyclerWidget, {
widget,
node,
api: api$1
api
});
vueApp.use(PrimeVue, {
unstyled: true,
@@ -16710,13 +16547,13 @@ function applyAutocompleteTextLayoutFix(widget, _container, isVueMode) {
}
const initVueDomModeListener = () => {
var _a2, _b;
if ((_b = (_a2 = app$1.ui) == null ? void 0 : _a2.settings) == null ? void 0 : _b.addEventListener) {
app$1.ui.settings.addEventListener("Comfy.VueNodes.Enabled.change", () => {
if ((_b = (_a2 = app.ui) == null ? void 0 : _a2.settings) == null ? void 0 : _b.addEventListener) {
app.ui.settings.addEventListener("Comfy.VueNodes.Enabled.change", () => {
requestAnimationFrame(() => {
var _a3, _b2, _c, _d, _e2, _f;
const isVueDomMode = ((_c = (_b2 = (_a3 = app$1.ui) == null ? void 0 : _a3.settings) == null ? void 0 : _b2.getSettingValue) == null ? void 0 : _c.call(_b2, "Comfy.VueNodes.Enabled")) ?? false;
if ((_d = app$1.graph) == null ? void 0 : _d.nodes) {
for (const node of app$1.graph.nodes) {
const isVueDomMode = ((_c = (_b2 = (_a3 = app.ui) == null ? void 0 : _a3.settings) == null ? void 0 : _b2.getSettingValue) == null ? void 0 : _c.call(_b2, "Comfy.VueNodes.Enabled")) ?? false;
if ((_d = app.graph) == null ? void 0 : _d.nodes) {
for (const node of app.graph.nodes) {
const textWidget = (_e2 = node.widgets) == null ? void 0 : _e2.find(
(w2) => w2.type === "AUTOCOMPLETE_TEXT_LORAS"
);
@@ -16731,7 +16568,7 @@ const initVueDomModeListener = () => {
const grid = nodeEl.querySelector('[data-testid="node-widgets"]');
if (!grid) continue;
const nodeId = nodeEl.getAttribute("data-node-id");
const node = (_a4 = app$1.graph) == null ? void 0 : _a4.getNodeById(nodeId);
const node = (_a4 = app.graph) == null ? void 0 : _a4.getNodeById(nodeId);
if (!node) continue;
const rows = [];
let needsFix = false;
@@ -16752,7 +16589,7 @@ const initVueDomModeListener = () => {
}
}
});
(_f = app$1.canvas) == null ? void 0 : _f.setDirty(true, true);
(_f = app.canvas) == null ? void 0 : _f.setDirty(true, true);
document.dispatchEvent(new CustomEvent("lora-manager:vue-mode-change", {
detail: { isVueDomMode }
}));
@@ -16760,12 +16597,12 @@ const initVueDomModeListener = () => {
});
}
};
if ((_a = app$1.ui) == null ? void 0 : _a.settings) {
if ((_a = app.ui) == null ? void 0 : _a.settings) {
initVueDomModeListener();
} else {
const checkAppReady = setInterval(() => {
var _a2;
if ((_a2 = app$1.ui) == null ? void 0 : _a2.settings) {
if ((_a2 = app.ui) == null ? void 0 : _a2.settings) {
initVueDomModeListener();
clearInterval(checkAppReady);
}
@@ -16804,8 +16641,8 @@ function createLoraInfoWidget(node) {
const vueApp = createApp(LoraInfoWidget, {
widget,
node,
api: api$1,
app: app$1,
api,
app,
isVueMode: typeof LiteGraph !== "undefined" && LiteGraph.vueNodesMode
});
vueApp.use(PrimeVue, {
@@ -16900,7 +16737,7 @@ function createAutocompleteTextWidgetFactory(node, widgetName, modelType, inputO
}
);
widget.metadataWidget = metadataWidget;
const spellcheck = ((_c = (_b = (_a2 = app$1.ui) == null ? void 0 : _a2.settings) == null ? void 0 : _b.getSettingValue) == null ? void 0 : _c.call(_b, "Comfy.TextareaWidget.Spellcheck")) ?? false;
const spellcheck = ((_c = (_b = (_a2 = app.ui) == null ? void 0 : _a2.settings) == null ? void 0 : _b.getSettingValue) == null ? void 0 : _c.call(_b, "Comfy.TextareaWidget.Spellcheck")) ?? false;
const maxHeight = modelType === "loras" ? AUTOCOMPLETE_TEXT_WIDGET_MAX_HEIGHT : void 0;
const vueApp = createApp(AutocompleteTextWidget, {
widget,
@@ -16938,7 +16775,7 @@ function createAutocompleteTextWidgetFactory(node, widgetName, modelType, inputO
const minHeight = modelType === "loras" ? void 0 : AUTOCOMPLETE_TEXT_MIN_HEIGHT_DEFAULT;
return { widget, minWidth, minHeight };
}
app$1.registerExtension({
app.registerExtension({
name: "LoraManager.VueWidgets",
getCustomWidgets() {
return {
File diff suppressed because one or more lines are too long