@n8n/design-system 1.104.0 → 1.104.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @n8n/design-system@1.104.0 build /home/runner/work/n8n/n8n/packages/frontend/@n8n/design-system
2
+ > @n8n/design-system@1.104.1 build /home/runner/work/n8n/n8n/packages/frontend/@n8n/design-system
3
3
  > vite build
4
4
 
5
5
  rolldown-vite v7.1.16 building for production...
@@ -9,10 +9,10 @@ computing gzip size...
9
9
  dist/design-system.css  109.69 kB │ gzip: 17.41 kB
10
10
  dist/en-BIzD-hdW.js  0.08 kB │ gzip: 0.08 kB
11
11
  dist/en-DaqoBz3R.js  4.79 kB │ gzip: 1.71 kB
12
- dist/n8n-design-system.es.js 1,623.97 kB │ gzip: 410.53 kB
12
+ dist/n8n-design-system.es.js 1,624.27 kB │ gzip: 410.61 kB
13
13
  
14
14
  rendering chunks...
15
15
  computing gzip size...
16
16
  dist/design-system.css  109.69 kB │ gzip: 17.41 kB
17
- dist/n8n-design-system.umd.js 1,225.83 kB │ gzip: 363.00 kB
18
- ✓ built in 19.12s
17
+ dist/n8n-design-system.umd.js 1,226.05 kB │ gzip: 363.05 kB
18
+ ✓ built in 16.33s
@@ -28434,7 +28434,7 @@ var ScrollAreaScrollbarX_default = /* @__PURE__ */ defineComponent({
28434
28434
  modelValue: { default: "" },
28435
28435
  placeholder: { default: "" },
28436
28436
  maxLength: { default: 5e3 },
28437
- maxLinesBeforeScroll: { default: 6 },
28437
+ maxLinesBeforeScroll: { default: 10 },
28438
28438
  minLines: { default: 1 },
28439
28439
  streaming: {
28440
28440
  type: Boolean,
@@ -28464,95 +28464,100 @@ var ScrollAreaScrollbarX_default = /* @__PURE__ */ defineComponent({
28464
28464
  "upgrade-click"
28465
28465
  ],
28466
28466
  setup(e, { expose: n, emit: r }) {
28467
- let o = e, s = r, { t: l } = useI18n(), d = ref(), f = ref(), k = ref(!1), $ = ref(o.modelValue || ""), j7 = ref(o.minLines > 1 ? lineHeight * o.minLines : singleLineHeight), M7 = ref(o.minLines > 1), N7 = computed(() => o.maxLinesBeforeScroll * 18), { characterCount: P7, isOverLimit: F7, isAtLimit: I7 } = useCharacterLimit({
28468
- value: $,
28467
+ let o = e, s = r, { t: l } = useI18n(), d = ref(), f = ref(), k = ref(), $ = ref(!1), j7 = ref(o.modelValue || ""), M7 = ref(o.minLines > 1 ? lineHeight * o.minLines : singleLineHeight), N7 = ref(o.minLines > 1), P7 = computed(() => o.maxLinesBeforeScroll * 18), { characterCount: F7, isOverLimit: I7, isAtLimit: L7 } = useCharacterLimit({
28468
+ value: j7,
28469
28469
  maxLength: toRef(o, "maxLength")
28470
- }), L7 = computed(() => I7.value), R7 = computed(() => !$.value.trim() || o.streaming || o.disabled || F7.value || o.creditsRemaining === 0), z7 = computed(() => ({ minHeight: M7.value ? "80px" : "40px" })), B7 = computed(() => o.creditsQuota !== void 0 && o.creditsRemaining !== void 0 && o.creditsQuota !== INFINITE_CREDITS), V7 = computed(() => !B7.value || o.creditsRemaining === void 0 ? "" : l("promptInput.creditsInfo", {
28470
+ }), R7 = computed(() => L7.value), z7 = computed(() => !j7.value.trim() || o.streaming || o.disabled || I7.value || o.creditsRemaining === 0), B7 = computed(() => ({ minHeight: N7.value ? "80px" : "40px" })), V7 = computed(() => o.creditsQuota !== void 0 && o.creditsRemaining !== void 0 && o.creditsQuota !== INFINITE_CREDITS), H7 = computed(() => !V7.value || o.creditsRemaining === void 0 ? "" : l("promptInput.creditsInfo", {
28471
28471
  remaining: o.creditsRemaining,
28472
28472
  total: o.creditsQuota
28473
- })), H7 = () => {
28473
+ })), G7 = () => {
28474
28474
  let e = /* @__PURE__ */ new Date();
28475
28475
  return new Date(e.getFullYear(), e.getMonth() + 1, 1).toLocaleDateString("en-US", {
28476
28476
  month: "long",
28477
28477
  day: "numeric",
28478
28478
  year: "numeric"
28479
28479
  });
28480
- }, G7 = computed(() => {
28481
- if (!B7.value) return "";
28482
- let e = H7();
28480
+ }, q7 = computed(() => {
28481
+ if (!V7.value) return "";
28482
+ let e = G7();
28483
28483
  return [
28484
28484
  l("promptInput.remainingCredits", { count: o.creditsRemaining ?? 0 }),
28485
28485
  l("promptInput.monthlyCredits", { count: o.creditsQuota ?? 0 }),
28486
28486
  l("promptInput.creditsRenew", { date: e }),
28487
28487
  l("promptInput.creditsExpire", { date: e })
28488
28488
  ].join("<br />");
28489
- }), q7 = computed(() => B7.value && o.creditsRemaining === 0), J7 = computed(() => M7.value ? {
28490
- height: `${Math.min(j7.value, N7.value)}px`,
28489
+ }), J7 = computed(() => V7.value && o.creditsRemaining === 0), Y7 = computed(() => N7.value ? {
28490
+ height: `${M7.value}px`,
28491
28491
  overflowY: "hidden"
28492
28492
  } : {});
28493
- function Y7() {
28494
- let e = document.activeElement === d.value, n = M7.value, r = o.minLines > 1 ? lineHeight * o.minLines : singleLineHeight;
28495
- if (!$.value || $.value === "") {
28496
- o.minLines > 1 ? (M7.value = !0, j7.value = r, d.value && (d.value.style.height = `${r}px`)) : (M7.value = !1, j7.value = singleLineHeight, d.value && (d.value.style.height = `${singleLineHeight}px`));
28493
+ function Z7() {
28494
+ let e = document.activeElement === d.value, n = N7.value, r = o.minLines > 1 ? lineHeight * o.minLines : singleLineHeight;
28495
+ if (!j7.value || j7.value === "") {
28496
+ o.minLines > 1 ? (N7.value = !0, M7.value = r, d.value && (d.value.style.height = `${r}px`)) : (N7.value = !1, M7.value = singleLineHeight, d.value && (d.value.style.height = `${singleLineHeight}px`));
28497
28497
  return;
28498
28498
  }
28499
28499
  if (!d.value) return;
28500
- d.value.style.height = "0";
28501
- let i = d.value.scrollHeight, s = o.minLines > 1 || i > singleLineHeight || $.value.includes("\n");
28502
- j7.value = Math.max(i, r), M7.value = s, M7.value ? d.value.style.height = `${Math.max(i, r)}px` : d.value.style.height = `${singleLineHeight}px`, (n !== M7.value || e) && nextTick(() => {
28500
+ let i = null, s = 0;
28501
+ n && k.value && (i = k.value.$el?.querySelector("[data-reka-scroll-area-viewport]"), i && (s = i.scrollTop));
28502
+ let l = d.value.style.height;
28503
+ d.value.style.height = "auto";
28504
+ let f = d.value.scrollHeight;
28505
+ d.value.style.height = l;
28506
+ let p = o.minLines > 1 || f > singleLineHeight || j7.value.includes("\n"), _ = Math.max(f, r);
28507
+ M7.value = _, N7.value = p, N7.value ? (d.value.style.height = `${_}px`, i && n && s > 0 && (i.scrollTop = s)) : d.value.style.height = `${singleLineHeight}px`, (n !== N7.value || e) && nextTick(() => {
28503
28508
  d.value?.focus();
28504
28509
  });
28505
28510
  }
28506
28511
  watch(() => o.modelValue, async (e) => {
28507
- $.value = e || "", await nextTick(), await new Promise(requestAnimationFrame), Y7();
28508
- }), watch($, (e, n) => {
28509
- s("update:modelValue", e), e !== n && nextTick(() => Y7());
28512
+ j7.value = e || "", await nextTick(), await new Promise(requestAnimationFrame), Z7();
28513
+ }), watch(j7, (e, n) => {
28514
+ s("update:modelValue", e), e !== n && nextTick(() => Z7());
28510
28515
  });
28511
- async function Z7() {
28512
- await nextTick(), await new Promise(requestAnimationFrame), d.value?.focus();
28513
- }
28514
28516
  async function Q7() {
28515
- s("submit"), o.refocusAfterSend && await Z7();
28517
+ await nextTick(), await new Promise(requestAnimationFrame), d.value?.focus();
28516
28518
  }
28517
28519
  async function $7() {
28518
- s("stop"), o.refocusAfterSend && await Z7();
28520
+ s("submit"), o.refocusAfterSend && await Q7();
28521
+ }
28522
+ async function t9() {
28523
+ s("stop"), o.refocusAfterSend && await Q7();
28519
28524
  }
28520
- async function t9(e) {
28521
- let n = e.ctrlKey || e.metaKey, r = e.key.length === 1 && !n, i = e.key === "Backspace" || e.key === "Delete", s = P7.value >= o.maxLength, l = e.key === "Enter" && !e.shiftKey, f = e.key === "Enter" && e.shiftKey;
28525
+ async function n9(e) {
28526
+ let n = e.ctrlKey || e.metaKey, r = e.key.length === 1 && !n, i = e.key === "Backspace" || e.key === "Delete", s = F7.value >= o.maxLength, l = e.key === "Enter" && !e.shiftKey, f = e.key === "Enter" && e.shiftKey;
28522
28527
  if (s && r && !i) {
28523
28528
  e.preventDefault();
28524
28529
  return;
28525
28530
  }
28526
- if (l && (e.preventDefault(), R7.value || await Q7()), f) {
28531
+ if (l && (e.preventDefault(), z7.value || await $7()), f) {
28527
28532
  e.preventDefault();
28528
28533
  let n = e.target, r = n.selectionStart, i = n.selectionEnd;
28529
- $.value = $.value.substring(0, r) + "\n" + $.value.substring(i), await nextTick(), d.value && (d.value.selectionStart = d.value.selectionEnd = r + 1);
28534
+ j7.value = j7.value.substring(0, r) + "\n" + j7.value.substring(i), await nextTick(), d.value && (d.value.selectionStart = d.value.selectionEnd = r + 1);
28530
28535
  }
28531
28536
  }
28532
- function n9(e) {
28533
- k.value = !0, s("focus", e);
28534
- }
28535
28537
  function r9(e) {
28536
- k.value = !1, s("blur", e);
28538
+ $.value = !0, s("focus", e);
28539
+ }
28540
+ function i9(e) {
28541
+ $.value = !1, s("blur", e);
28537
28542
  }
28538
- function i9() {
28543
+ function a9() {
28539
28544
  d.value?.focus();
28540
28545
  }
28541
28546
  return onMounted(() => {
28542
- nextTick(() => Y7());
28543
- }), n({ focusInput: i9 }), (e, n) => {
28547
+ nextTick(() => Z7());
28548
+ }), n({ focusInput: a9 }), (e, n) => {
28544
28549
  let r = resolveDirective("n8n-html");
28545
28550
  return openBlock(), createElementBlock("div", { class: normalizeClass(e.$style.wrapper) }, [createElementVNode("div", {
28546
28551
  ref_key: "containerRef",
28547
28552
  ref: f,
28548
28553
  class: normalizeClass([e.$style.container, {
28549
- [e.$style.focused]: k.value,
28550
- [e.$style.multiline]: M7.value,
28551
- [e.$style.disabled]: e.disabled || q7.value,
28552
- [e.$style.withBottomBorder]: !!B7.value
28554
+ [e.$style.focused]: $.value,
28555
+ [e.$style.multiline]: N7.value,
28556
+ [e.$style.disabled]: e.disabled || J7.value,
28557
+ [e.$style.withBottomBorder]: !!V7.value
28553
28558
  }]),
28554
- style: normalizeStyle(z7.value)
28555
- }, [L7.value ? (openBlock(), createBlock(Callout_default, {
28559
+ style: normalizeStyle(B7.value)
28560
+ }, [R7.value ? (openBlock(), createBlock(Callout_default, {
28556
28561
  key: 0,
28557
28562
  slim: "",
28558
28563
  icon: "info",
@@ -28561,67 +28566,69 @@ var ScrollAreaScrollbarX_default = /* @__PURE__ */ defineComponent({
28561
28566
  }, {
28562
28567
  default: withCtx(() => [createTextVNode(toDisplayString(unref(l)("assistantChat.characterLimit", { limit: e.maxLength.toString() })), 1)]),
28563
28568
  _: 1
28564
- }, 8, ["class"])) : createCommentVNode("", !0), M7.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createVNode(N8nScrollArea_default$1, {
28569
+ }, 8, ["class"])) : createCommentVNode("", !0), N7.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createVNode(N8nScrollArea_default$1, {
28570
+ ref_key: "scrollAreaRef",
28571
+ ref: k,
28565
28572
  class: normalizeClass(e.$style.scrollAreaWrapper),
28566
- "max-height": `${N7.value}px`,
28573
+ "max-height": `${P7.value}px`,
28567
28574
  type: "auto"
28568
28575
  }, {
28569
28576
  default: withCtx(() => [withDirectives(createElementVNode("textarea", {
28570
28577
  ref_key: "textareaRef",
28571
28578
  ref: d,
28572
- "onUpdate:modelValue": n[1] ||= (e) => $.value = e,
28579
+ "onUpdate:modelValue": n[1] ||= (e) => j7.value = e,
28573
28580
  class: normalizeClass([
28574
28581
  e.$style.multilineTextarea,
28575
28582
  "ignore-key-press-node-creator",
28576
28583
  "ignore-key-press-canvas"
28577
28584
  ]),
28578
- style: normalizeStyle(J7.value),
28579
- placeholder: q7.value ? "" : e.placeholder,
28580
- disabled: e.disabled || q7.value,
28585
+ style: normalizeStyle(Y7.value),
28586
+ placeholder: J7.value ? "" : e.placeholder,
28587
+ disabled: e.disabled || J7.value,
28581
28588
  maxlength: e.maxLength,
28582
- onKeydown: t9,
28583
- onFocus: n9,
28584
- onBlur: r9,
28585
- onInput: Y7
28586
- }, null, 46, _hoisted_2$20), [[vModelText, $.value]])]),
28589
+ onKeydown: n9,
28590
+ onFocus: r9,
28591
+ onBlur: i9,
28592
+ onInput: Z7
28593
+ }, null, 46, _hoisted_2$20), [[vModelText, j7.value]])]),
28587
28594
  _: 1
28588
28595
  }, 8, ["class", "max-height"]), createElementVNode("div", { class: normalizeClass(e.$style.bottomActions) }, [createVNode(unref(N8nSendStopButton_default), {
28589
28596
  "data-test-id": "send-message-button",
28590
28597
  streaming: e.streaming,
28591
- disabled: R7.value,
28592
- onSend: Q7,
28593
- onStop: $7
28598
+ disabled: z7.value,
28599
+ onSend: $7,
28600
+ onStop: t9
28594
28601
  }, null, 8, ["streaming", "disabled"])], 2)], 64)) : (openBlock(), createElementBlock("div", {
28595
28602
  key: 1,
28596
28603
  class: normalizeClass(e.$style.singleLineWrapper)
28597
28604
  }, [withDirectives(createElementVNode("textarea", {
28598
28605
  ref_key: "textareaRef",
28599
28606
  ref: d,
28600
- "onUpdate:modelValue": n[0] ||= (e) => $.value = e,
28607
+ "onUpdate:modelValue": n[0] ||= (e) => j7.value = e,
28601
28608
  class: normalizeClass([
28602
28609
  e.$style.singleLineTextarea,
28603
28610
  "ignore-key-press-node-creator",
28604
28611
  "ignore-key-press-canvas"
28605
28612
  ]),
28606
- placeholder: q7.value ? "" : e.placeholder,
28607
- disabled: e.disabled || q7.value,
28613
+ placeholder: J7.value ? "" : e.placeholder,
28614
+ disabled: e.disabled || J7.value,
28608
28615
  maxlength: e.maxLength,
28609
28616
  rows: "1",
28610
- onKeydown: t9,
28611
- onFocus: n9,
28612
- onBlur: r9,
28613
- onInput: Y7
28614
- }, null, 42, _hoisted_1$32), [[vModelText, $.value]]), createElementVNode("div", { class: normalizeClass(e.$style.inlineActions) }, [createVNode(unref(N8nSendStopButton_default), {
28617
+ onKeydown: n9,
28618
+ onFocus: r9,
28619
+ onBlur: i9,
28620
+ onInput: Z7
28621
+ }, null, 42, _hoisted_1$32), [[vModelText, j7.value]]), createElementVNode("div", { class: normalizeClass(e.$style.inlineActions) }, [createVNode(unref(N8nSendStopButton_default), {
28615
28622
  "data-test-id": "send-message-button",
28616
28623
  streaming: e.streaming,
28617
- disabled: R7.value,
28618
- onSend: Q7,
28619
- onStop: $7
28620
- }, null, 8, ["streaming", "disabled"])], 2)], 2))], 6), B7.value ? (openBlock(), createElementBlock("div", {
28624
+ disabled: z7.value,
28625
+ onSend: $7,
28626
+ onStop: t9
28627
+ }, null, 8, ["streaming", "disabled"])], 2)], 2))], 6), V7.value ? (openBlock(), createElementBlock("div", {
28621
28628
  key: 0,
28622
28629
  class: normalizeClass(e.$style.creditsBar)
28623
- }, [createElementVNode("div", { class: normalizeClass(e.$style.creditsInfoWrapper) }, [withDirectives(createElementVNode("span", { class: normalizeClass({ [e.$style.noCredits]: q7.value }) }, null, 2), [[r, V7.value]]), createVNode(Tooltip_default, {
28624
- content: G7.value,
28630
+ }, [createElementVNode("div", { class: normalizeClass(e.$style.creditsInfoWrapper) }, [withDirectives(createElementVNode("span", { class: normalizeClass({ [e.$style.noCredits]: J7.value }) }, null, 2), [[r, H7.value]]), createVNode(Tooltip_default, {
28631
+ content: q7.value,
28625
28632
  "popper-class": e.$style.infoPopper,
28626
28633
  placement: "top"
28627
28634
  }, {