@aintela/chat 0.4.2 → 0.4.3
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/dist/{atMentions-BhAwZTm1.js → atMentions-DrCm42jN.js} +29 -29
- package/dist/{atMentions-BhAwZTm1.js.map → atMentions-DrCm42jN.js.map} +1 -1
- package/dist/components.js +2043 -2038
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.js +2 -2
- package/dist/src/components/v2/PromptV2.d.ts +7 -2
- package/dist/src/hooks/index.d.ts +1 -1
- package/dist/src/hooks/usePromptAssist.d.ts +11 -1
- package/dist/src/services/httpPromptAssistService.d.ts +6 -0
- package/dist/src/utils/atMentions.d.ts +14 -3
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/useContainerWidth-BfDPpus9.js +298 -0
- package/dist/useContainerWidth-BfDPpus9.js.map +1 -0
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/useContainerWidth-B40_i-NW.js +0 -295
- package/dist/useContainerWidth-B40_i-NW.js.map +0 -1
|
@@ -199,7 +199,7 @@ const L = /* @__PURE__ */ new Set(), v = class v {
|
|
|
199
199
|
o.querySelectorAll("td, th").forEach((r) => {
|
|
200
200
|
const l = r.textContent.trim().match(/^([\d,]+\.?\d*)[eE][+-]?(\d+)$/);
|
|
201
201
|
if (l) {
|
|
202
|
-
const c = parseFloat(l[1].replace(/,/g, "")),
|
|
202
|
+
const c = parseFloat(l[1].replace(/,/g, "")), u = parseInt(l[2]), p = c * Math.pow(10, u), h = this.formatNumber(p);
|
|
203
203
|
r.textContent = h;
|
|
204
204
|
}
|
|
205
205
|
});
|
|
@@ -293,8 +293,8 @@ const L = /* @__PURE__ */ new Set(), v = class v {
|
|
|
293
293
|
const l = this.extractValue(r), c = this.extractValue(a);
|
|
294
294
|
if (this.options.customSorters[e])
|
|
295
295
|
return this.options.customSorters[e](l, c, s);
|
|
296
|
-
const
|
|
297
|
-
return s === "asc" ?
|
|
296
|
+
const u = this.compareValues(l, c);
|
|
297
|
+
return s === "asc" ? u : -u;
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
@@ -311,8 +311,8 @@ const L = /* @__PURE__ */ new Set(), v = class v {
|
|
|
311
311
|
return parseFloat(i[1].replace(/,/g, ""));
|
|
312
312
|
const r = e.match(/^([\d,]+\.?\d*)[eE][+-]?(\d+)$/);
|
|
313
313
|
if (r) {
|
|
314
|
-
const
|
|
315
|
-
return
|
|
314
|
+
const u = parseFloat(r[1].replace(/,/g, "")), p = parseInt(r[2]);
|
|
315
|
+
return u * Math.pow(10, p);
|
|
316
316
|
}
|
|
317
317
|
if (e.match(/^[\d,]+\.?\d*[KMB]?$/))
|
|
318
318
|
return this.parseNumber(e);
|
|
@@ -369,12 +369,12 @@ const L = /* @__PURE__ */ new Set(), v = class v {
|
|
|
369
369
|
z-index: 10;
|
|
370
370
|
`, t.appendChild(i);
|
|
371
371
|
let r = !1, a = 0, l = 0;
|
|
372
|
-
i.addEventListener("mousedown", (
|
|
373
|
-
|
|
372
|
+
i.addEventListener("mousedown", (p) => {
|
|
373
|
+
p.preventDefault(), p.stopPropagation(), p.stopImmediatePropagation(), r = !0, a = p.clientX, l = t.offsetWidth, t.style.borderRight = "2px solid var(--primary-main, #2196F3)", t.style.background = "var(--background-active, rgba(255, 255, 255, 0.1))", document.addEventListener("mousemove", c), document.addEventListener("mouseup", u), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
374
374
|
});
|
|
375
|
-
const c = /* @__PURE__ */ d((
|
|
375
|
+
const c = /* @__PURE__ */ d((p) => {
|
|
376
376
|
if (!r) return;
|
|
377
|
-
const h = l + (
|
|
377
|
+
const h = l + (p.clientX - a);
|
|
378
378
|
if (h > 30) {
|
|
379
379
|
t.style.width = h + "px";
|
|
380
380
|
const g = Array.from(t.parentNode.children).indexOf(t), f = e.querySelector("tbody");
|
|
@@ -383,8 +383,8 @@ const L = /* @__PURE__ */ new Set(), v = class v {
|
|
|
383
383
|
b && (b.style.width = h + "px");
|
|
384
384
|
}), this.updateTableWidth(e);
|
|
385
385
|
}
|
|
386
|
-
}, "handleResize"),
|
|
387
|
-
r = !1, t.style.borderRight = "", t.style.background = "", document.removeEventListener("mousemove", c), document.removeEventListener("mouseup",
|
|
386
|
+
}, "handleResize"), u = /* @__PURE__ */ d(() => {
|
|
387
|
+
r = !1, t.style.borderRight = "", t.style.background = "", document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", u), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
388
388
|
}, "stopResize");
|
|
389
389
|
}
|
|
390
390
|
/**
|
|
@@ -514,14 +514,14 @@ const L = /* @__PURE__ */ new Set(), v = class v {
|
|
|
514
514
|
}
|
|
515
515
|
if (s === o)
|
|
516
516
|
return;
|
|
517
|
-
const c = a[s],
|
|
518
|
-
s < o ? i.insertBefore(c,
|
|
517
|
+
const c = a[s], u = a[o];
|
|
518
|
+
s < o ? i.insertBefore(c, u.nextSibling) : i.insertBefore(c, u), l.forEach((h, g) => {
|
|
519
519
|
const f = Array.from(h.children), m = f[s], y = f[o];
|
|
520
520
|
s < o ? h.insertBefore(m, y.nextSibling) : h.insertBefore(m, y);
|
|
521
521
|
});
|
|
522
|
-
const
|
|
523
|
-
if (
|
|
524
|
-
const h = [...
|
|
522
|
+
const p = this.originalColumnOrder.get(e);
|
|
523
|
+
if (p) {
|
|
524
|
+
const h = [...p], g = h[s];
|
|
525
525
|
h.splice(s, 1), h.splice(o, 0, g), this.originalColumnOrder.set(e, h);
|
|
526
526
|
}
|
|
527
527
|
this.applyTableStyles(t), this.refreshDragAndDropListeners(t, e);
|
|
@@ -561,7 +561,7 @@ const L = /* @__PURE__ */ new Set(), v = class v {
|
|
|
561
561
|
* Calculate intelligent table width based on header text length
|
|
562
562
|
*/
|
|
563
563
|
calculateTableWidth(t) {
|
|
564
|
-
var
|
|
564
|
+
var p;
|
|
565
565
|
const e = t.getAttribute("data-original-width"), s = e ? parseFloat(e) : 0, o = t.querySelectorAll("th");
|
|
566
566
|
let i = 0;
|
|
567
567
|
t.parentElement.clientWidth;
|
|
@@ -570,7 +570,7 @@ const L = /* @__PURE__ */ new Set(), v = class v {
|
|
|
570
570
|
let f = h.textContent.replace(/[📊🔍]/g, "").trim().length * this.charWidth + 15;
|
|
571
571
|
r.push(f), i += f;
|
|
572
572
|
});
|
|
573
|
-
const a = t.querySelectorAll("tr"), l = ((
|
|
573
|
+
const a = t.querySelectorAll("tr"), l = ((p = t.parentElement) == null ? void 0 : p.getBoundingClientRect().width) ?? i;
|
|
574
574
|
var c = 0;
|
|
575
575
|
for (const h of a)
|
|
576
576
|
h.querySelectorAll("td").forEach((f, m) => {
|
|
@@ -584,8 +584,8 @@ const L = /* @__PURE__ */ new Set(), v = class v {
|
|
|
584
584
|
} else
|
|
585
585
|
h.style.width = `${r[g]}px`;
|
|
586
586
|
});
|
|
587
|
-
let
|
|
588
|
-
return c > l ?
|
|
587
|
+
let u = 0;
|
|
588
|
+
return c > l ? u = "100%" : u = `${Math.max(c, s)}px`, u;
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
591
|
* Apply inline styles to ensure text clipping and horizontal scroll work
|
|
@@ -823,7 +823,7 @@ function G(n, t, e = t, s = 600) {
|
|
|
823
823
|
const o = n.value;
|
|
824
824
|
let i = !1;
|
|
825
825
|
const r = /* @__PURE__ */ d(() => {
|
|
826
|
-
i || (i = !0, document.removeEventListener("selectionchange", l), n.removeEventListener("keydown", r), n.removeEventListener("input", r), n.removeEventListener("pointerdown", r), window.clearTimeout(c), window.clearInterval(
|
|
826
|
+
i || (i = !0, document.removeEventListener("selectionchange", l), n.removeEventListener("keydown", r), n.removeEventListener("input", r), n.removeEventListener("pointerdown", r), window.clearTimeout(c), window.clearInterval(u));
|
|
827
827
|
}, "stop"), a = /* @__PURE__ */ d(() => {
|
|
828
828
|
if (n.value !== o) {
|
|
829
829
|
r();
|
|
@@ -834,7 +834,7 @@ function G(n, t, e = t, s = 600) {
|
|
|
834
834
|
document.activeElement === n && a();
|
|
835
835
|
}, "onSelectionChange");
|
|
836
836
|
a();
|
|
837
|
-
const c = window.setTimeout(r, s),
|
|
837
|
+
const c = window.setTimeout(r, s), u = window.setInterval(a, 50);
|
|
838
838
|
return document.addEventListener("selectionchange", l), n.addEventListener("keydown", r), n.addEventListener("input", r), n.addEventListener("pointerdown", r), r;
|
|
839
839
|
}
|
|
840
840
|
d(G, "placeCaret");
|
|
@@ -927,16 +927,16 @@ function Y(n, t, e) {
|
|
|
927
927
|
return { next: `${s}${a}${o}`, selectionStart: l, selectionEnd: l, reopenTrigger: !1 };
|
|
928
928
|
}
|
|
929
929
|
d(Y, "applyTriggerInsertion");
|
|
930
|
-
async function Q(n, { onAtQuery: t, onAtPersonQuery: e }, { personConfidence: s = 0, locationConfidence: o = 0, personFirstThreshold: i = 0.5 } = {}) {
|
|
931
|
-
const [
|
|
932
|
-
t ? t(n).catch(() => []) : Promise.resolve([]),
|
|
930
|
+
async function Q(n, { onAtQuery: t, onAtPersonQuery: e }, { personConfidence: s = 0, locationConfidence: o = 0, personFirstThreshold: i = 0.5, vertical: r = "air" } = {}) {
|
|
931
|
+
const [a, l] = await Promise.all([
|
|
932
|
+
t ? t(n, { vertical: r }).catch(() => []) : Promise.resolve([]),
|
|
933
933
|
e ? e(n).catch(() => []) : Promise.resolve([])
|
|
934
934
|
]);
|
|
935
935
|
if (t && e) {
|
|
936
|
-
const
|
|
937
|
-
return s >= i && s >= o ? [...
|
|
936
|
+
const c = l.map((h) => ({ ...h, group: "person" })), u = a.map((h) => ({ ...h, group: "location" }));
|
|
937
|
+
return s >= i && s >= o ? [...c, ...u] : [...u, ...c];
|
|
938
938
|
}
|
|
939
|
-
return [...
|
|
939
|
+
return [...l, ...a];
|
|
940
940
|
}
|
|
941
941
|
d(Q, "fetchAtMentions");
|
|
942
942
|
function tt(n, t) {
|
|
@@ -967,4 +967,4 @@ export {
|
|
|
967
967
|
z as s,
|
|
968
968
|
U as t
|
|
969
969
|
};
|
|
970
|
-
//# sourceMappingURL=atMentions-
|
|
970
|
+
//# sourceMappingURL=atMentions-DrCm42jN.js.map
|