@n8n/chat 1.5.0 → 1.5.1
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 +6 -0
- package/dist/chat.bundle.es.js +24 -13
- package/dist/chat.bundle.umd.js +5 -5
- package/dist/chat.es.js +24 -13
- package/dist/chat.umd.js +2 -2
- package/dist/components/Button.vue.d.ts +2 -0
- package/dist/style.css +2 -2
- package/package.json +1 -1
package/dist/chat.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Package version @n8n/chat@1.5.
|
|
1
|
+
/*! Package version @n8n/chat@1.5.1 */
|
|
2
2
|
import * as Vue from "vue";
|
|
3
3
|
import { Comment, Fragment, Teleport, Text, Transition, cloneVNode, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, h, inject, isRef, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeMount, onBeforeUnmount, onDeactivated, onMounted, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, reactive, readonly, ref, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, toRef, toRefs, triggerRef, unref, useAttrs, useCssModule, useSlots, vModelText, vShow, warn, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
4
4
|
var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp$1 = Object.prototype.hasOwnProperty, __esmMin = (e, t) => () => (e && (t = e(e = 0)), t), __commonJSMin = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), __export = (e, t) => {
|
|
@@ -20,17 +20,22 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
|
|
|
20
20
|
value: e,
|
|
21
21
|
enumerable: !0
|
|
22
22
|
}) : n, e)), __toCommonJS = (e) => __hasOwnProp$1.call(e, "module.exports") ? e["module.exports"] : __copyProps(__defProp$1({}, "__esModule", { value: !0 }), e), Button_default$1 = /* @__PURE__ */ defineComponent({
|
|
23
|
+
inheritAttrs: !1,
|
|
23
24
|
__name: "Button",
|
|
24
25
|
props: {
|
|
25
26
|
type: { default: "primary" },
|
|
26
|
-
element: { default: "button" }
|
|
27
|
+
element: { default: "button" },
|
|
28
|
+
disabled: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
}
|
|
27
32
|
},
|
|
28
33
|
setup(e) {
|
|
29
|
-
let t = e, n = computed(() => `chat-button-${t.type}`);
|
|
30
|
-
return (
|
|
31
|
-
default: withCtx(() => [renderSlot(
|
|
34
|
+
let t = e, n = computed(() => `chat-button-${t.type}${t.disabled ? "-disabled" : ""}`);
|
|
35
|
+
return (r, i) => (openBlock(), createElementBlock("span", { class: normalizeClass({ "chat-button-wrapper-disabled": t.disabled }) }, [(openBlock(), createBlock(resolveDynamicComponent(e.element), mergeProps({ class: ["chat-button", n.value] }, r.$attrs), {
|
|
36
|
+
default: withCtx(() => [renderSlot(r.$slots, "default")]),
|
|
32
37
|
_: 3
|
|
33
|
-
},
|
|
38
|
+
}, 16, ["class"]))], 2));
|
|
34
39
|
}
|
|
35
40
|
}), core_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
36
41
|
function n(e) {
|
|
@@ -8550,17 +8555,23 @@ var require_markdown_it_link_attributes = /* @__PURE__ */ __commonJSMin(((e, t)
|
|
|
8550
8555
|
buttons: {}
|
|
8551
8556
|
},
|
|
8552
8557
|
setup(e) {
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8558
|
+
let t = ref(null), r = async (e, n) => {
|
|
8559
|
+
t.value === null && (await fetch(e)).ok && (t.value = n);
|
|
8560
|
+
};
|
|
8561
|
+
return (i, o) => (openBlock(), createElementBlock("div", null, [createVNode(MarkdownRenderer_default, { text: e.text }, null, 8, ["text"]), createElementVNode("div", { class: normalizeClass(i.$style.buttons) }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.buttons, (e, i) => (openBlock(), createElementBlock(Fragment, { key: e.text }, [t.value === null || i === t.value ? (openBlock(), createBlock(Button_default$1, {
|
|
8562
|
+
key: 0,
|
|
8563
|
+
element: "button",
|
|
8557
8564
|
type: e.type,
|
|
8558
|
-
|
|
8559
|
-
|
|
8565
|
+
disabled: i === t.value,
|
|
8566
|
+
onClick: (t) => r(e.link, i)
|
|
8560
8567
|
}, {
|
|
8561
8568
|
default: withCtx(() => [createTextVNode(toDisplayString(e.text), 1)]),
|
|
8562
8569
|
_: 2
|
|
8563
|
-
}, 1032, [
|
|
8570
|
+
}, 1032, [
|
|
8571
|
+
"type",
|
|
8572
|
+
"disabled",
|
|
8573
|
+
"onClick"
|
|
8574
|
+
])) : createCommentVNode("", !0)], 64))), 128))], 2)]));
|
|
8564
8575
|
}
|
|
8565
8576
|
}), MessageWithButtons_vue_vue_type_style_index_0_lang_module_default = { buttons: "_buttons_omuwb_1" }, __plugin_vue_export_helper_default = (e, t) => {
|
|
8566
8577
|
let n = e.__vccOpts || e;
|