@retrivora-ai/rag-engine 1.4.0 → 1.4.2
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/index.js +31 -11
- package/dist/index.mjs +31 -11
- package/package.json +1 -1
- package/src/components/MessageBubble.tsx +19 -5
package/dist/index.js
CHANGED
|
@@ -543,45 +543,65 @@ function MessageBubble({
|
|
|
543
543
|
}, [cleanContent, message.content]);
|
|
544
544
|
const markdownComponents = import_react5.default.useMemo(
|
|
545
545
|
() => ({
|
|
546
|
+
// Wrap in not-prose so Tailwind Typography resets don't clobber our styles.
|
|
547
|
+
// prose applies display:block and padding:0 to table/th/td — not-prose opts out.
|
|
546
548
|
table: (_a) => {
|
|
547
549
|
var props = __objRest(_a, []);
|
|
548
|
-
return /* @__PURE__ */ import_react5.default.createElement("div", { className: "overflow-hidden my-
|
|
550
|
+
return /* @__PURE__ */ import_react5.default.createElement("div", { className: "not-prose overflow-hidden my-5 rounded-xl border border-slate-200 dark:border-white/10 shadow-sm bg-white dark:bg-slate-900/50" }, /* @__PURE__ */ import_react5.default.createElement("div", { className: "overflow-x-auto" }, /* @__PURE__ */ import_react5.default.createElement(
|
|
551
|
+
"table",
|
|
552
|
+
__spreadValues({
|
|
553
|
+
className: "!table w-full text-left border-collapse min-w-[400px] text-sm"
|
|
554
|
+
}, props)
|
|
555
|
+
)));
|
|
549
556
|
},
|
|
550
557
|
thead: (_b) => {
|
|
551
558
|
var props = __objRest(_b, []);
|
|
552
559
|
return /* @__PURE__ */ import_react5.default.createElement(
|
|
553
560
|
"thead",
|
|
554
561
|
__spreadValues({
|
|
555
|
-
className: "bg-slate-50
|
|
562
|
+
className: "!table-header-group bg-slate-50 dark:bg-white/5 border-b border-slate-200 dark:border-white/10"
|
|
563
|
+
}, props)
|
|
564
|
+
);
|
|
565
|
+
},
|
|
566
|
+
tbody: (_c) => {
|
|
567
|
+
var props = __objRest(_c, []);
|
|
568
|
+
return /* @__PURE__ */ import_react5.default.createElement("tbody", __spreadValues({ className: "!table-row-group divide-y divide-slate-100 dark:divide-white/5" }, props));
|
|
569
|
+
},
|
|
570
|
+
tr: (_d) => {
|
|
571
|
+
var props = __objRest(_d, []);
|
|
572
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
|
573
|
+
"tr",
|
|
574
|
+
__spreadValues({
|
|
575
|
+
className: "!table-row hover:bg-slate-50/70 dark:hover:bg-white/5 transition-colors"
|
|
556
576
|
}, props)
|
|
557
577
|
);
|
|
558
578
|
},
|
|
559
|
-
th: (
|
|
560
|
-
var
|
|
579
|
+
th: (_e) => {
|
|
580
|
+
var _f = _e, { children } = _f, props = __objRest(_f, ["children"]);
|
|
561
581
|
return /* @__PURE__ */ import_react5.default.createElement(
|
|
562
582
|
"th",
|
|
563
583
|
__spreadValues({
|
|
564
|
-
className: "px-4 py-3
|
|
584
|
+
className: "!table-cell px-4 py-3 font-bold text-slate-700 dark:text-white/90 whitespace-nowrap text-[11px] uppercase tracking-wider text-left"
|
|
565
585
|
}, props),
|
|
566
586
|
normaliseChild(children)
|
|
567
587
|
);
|
|
568
588
|
},
|
|
569
|
-
td: (
|
|
570
|
-
var
|
|
589
|
+
td: (_g) => {
|
|
590
|
+
var _h = _g, { children } = _h, props = __objRest(_h, ["children"]);
|
|
571
591
|
return /* @__PURE__ */ import_react5.default.createElement(
|
|
572
592
|
"td",
|
|
573
593
|
__spreadValues({
|
|
574
|
-
className: "px-4 py-3
|
|
594
|
+
className: "!table-cell px-4 py-3 text-slate-600 dark:text-white/70 whitespace-nowrap text-sm"
|
|
575
595
|
}, props),
|
|
576
596
|
normaliseChild(children)
|
|
577
597
|
);
|
|
578
598
|
},
|
|
579
|
-
code(
|
|
580
|
-
var
|
|
599
|
+
code(_i) {
|
|
600
|
+
var _j = _i, {
|
|
581
601
|
inline,
|
|
582
602
|
className,
|
|
583
603
|
children
|
|
584
|
-
} =
|
|
604
|
+
} = _j, props = __objRest(_j, [
|
|
585
605
|
"inline",
|
|
586
606
|
"className",
|
|
587
607
|
"children"
|
package/dist/index.mjs
CHANGED
|
@@ -506,45 +506,65 @@ function MessageBubble({
|
|
|
506
506
|
}, [cleanContent, message.content]);
|
|
507
507
|
const markdownComponents = React5.useMemo(
|
|
508
508
|
() => ({
|
|
509
|
+
// Wrap in not-prose so Tailwind Typography resets don't clobber our styles.
|
|
510
|
+
// prose applies display:block and padding:0 to table/th/td — not-prose opts out.
|
|
509
511
|
table: (_a) => {
|
|
510
512
|
var props = __objRest(_a, []);
|
|
511
|
-
return /* @__PURE__ */ React5.createElement("div", { className: "overflow-hidden my-
|
|
513
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "not-prose overflow-hidden my-5 rounded-xl border border-slate-200 dark:border-white/10 shadow-sm bg-white dark:bg-slate-900/50" }, /* @__PURE__ */ React5.createElement("div", { className: "overflow-x-auto" }, /* @__PURE__ */ React5.createElement(
|
|
514
|
+
"table",
|
|
515
|
+
__spreadValues({
|
|
516
|
+
className: "!table w-full text-left border-collapse min-w-[400px] text-sm"
|
|
517
|
+
}, props)
|
|
518
|
+
)));
|
|
512
519
|
},
|
|
513
520
|
thead: (_b) => {
|
|
514
521
|
var props = __objRest(_b, []);
|
|
515
522
|
return /* @__PURE__ */ React5.createElement(
|
|
516
523
|
"thead",
|
|
517
524
|
__spreadValues({
|
|
518
|
-
className: "bg-slate-50
|
|
525
|
+
className: "!table-header-group bg-slate-50 dark:bg-white/5 border-b border-slate-200 dark:border-white/10"
|
|
526
|
+
}, props)
|
|
527
|
+
);
|
|
528
|
+
},
|
|
529
|
+
tbody: (_c) => {
|
|
530
|
+
var props = __objRest(_c, []);
|
|
531
|
+
return /* @__PURE__ */ React5.createElement("tbody", __spreadValues({ className: "!table-row-group divide-y divide-slate-100 dark:divide-white/5" }, props));
|
|
532
|
+
},
|
|
533
|
+
tr: (_d) => {
|
|
534
|
+
var props = __objRest(_d, []);
|
|
535
|
+
return /* @__PURE__ */ React5.createElement(
|
|
536
|
+
"tr",
|
|
537
|
+
__spreadValues({
|
|
538
|
+
className: "!table-row hover:bg-slate-50/70 dark:hover:bg-white/5 transition-colors"
|
|
519
539
|
}, props)
|
|
520
540
|
);
|
|
521
541
|
},
|
|
522
|
-
th: (
|
|
523
|
-
var
|
|
542
|
+
th: (_e) => {
|
|
543
|
+
var _f = _e, { children } = _f, props = __objRest(_f, ["children"]);
|
|
524
544
|
return /* @__PURE__ */ React5.createElement(
|
|
525
545
|
"th",
|
|
526
546
|
__spreadValues({
|
|
527
|
-
className: "px-4 py-3
|
|
547
|
+
className: "!table-cell px-4 py-3 font-bold text-slate-700 dark:text-white/90 whitespace-nowrap text-[11px] uppercase tracking-wider text-left"
|
|
528
548
|
}, props),
|
|
529
549
|
normaliseChild(children)
|
|
530
550
|
);
|
|
531
551
|
},
|
|
532
|
-
td: (
|
|
533
|
-
var
|
|
552
|
+
td: (_g) => {
|
|
553
|
+
var _h = _g, { children } = _h, props = __objRest(_h, ["children"]);
|
|
534
554
|
return /* @__PURE__ */ React5.createElement(
|
|
535
555
|
"td",
|
|
536
556
|
__spreadValues({
|
|
537
|
-
className: "px-4 py-3
|
|
557
|
+
className: "!table-cell px-4 py-3 text-slate-600 dark:text-white/70 whitespace-nowrap text-sm"
|
|
538
558
|
}, props),
|
|
539
559
|
normaliseChild(children)
|
|
540
560
|
);
|
|
541
561
|
},
|
|
542
|
-
code(
|
|
543
|
-
var
|
|
562
|
+
code(_i) {
|
|
563
|
+
var _j = _i, {
|
|
544
564
|
inline,
|
|
545
565
|
className,
|
|
546
566
|
children
|
|
547
|
-
} =
|
|
567
|
+
} = _j, props = __objRest(_j, [
|
|
548
568
|
"inline",
|
|
549
569
|
"className",
|
|
550
570
|
"children"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retrivora-ai/rag-engine",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Retrivora AI is a plug-and-play AI engine for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.",
|
|
5
5
|
"author": "Abhinav Alkuchi",
|
|
6
6
|
"license": "MIT",
|
|
@@ -367,22 +367,36 @@ export function MessageBubble({
|
|
|
367
367
|
// ── Markdown component overrides ───────────────────────────────────────────
|
|
368
368
|
const markdownComponents = React.useMemo(
|
|
369
369
|
() => ({
|
|
370
|
+
// Wrap in not-prose so Tailwind Typography resets don't clobber our styles.
|
|
371
|
+
// prose applies display:block and padding:0 to table/th/td — not-prose opts out.
|
|
370
372
|
table: ({ ...props }: React.HTMLAttributes<HTMLTableElement>) => (
|
|
371
|
-
<div className="overflow-hidden my-
|
|
373
|
+
<div className="not-prose overflow-hidden my-5 rounded-xl border border-slate-200 dark:border-white/10 shadow-sm bg-white dark:bg-slate-900/50">
|
|
372
374
|
<div className="overflow-x-auto">
|
|
373
|
-
<table
|
|
375
|
+
<table
|
|
376
|
+
className="!table w-full text-left border-collapse min-w-[400px] text-sm"
|
|
377
|
+
{...props}
|
|
378
|
+
/>
|
|
374
379
|
</div>
|
|
375
380
|
</div>
|
|
376
381
|
),
|
|
377
382
|
thead: ({ ...props }: React.HTMLAttributes<HTMLTableSectionElement>) => (
|
|
378
383
|
<thead
|
|
379
|
-
className="bg-slate-50
|
|
384
|
+
className="!table-header-group bg-slate-50 dark:bg-white/5 border-b border-slate-200 dark:border-white/10"
|
|
385
|
+
{...props}
|
|
386
|
+
/>
|
|
387
|
+
),
|
|
388
|
+
tbody: ({ ...props }: React.HTMLAttributes<HTMLTableSectionElement>) => (
|
|
389
|
+
<tbody className="!table-row-group divide-y divide-slate-100 dark:divide-white/5" {...props} />
|
|
390
|
+
),
|
|
391
|
+
tr: ({ ...props }: React.HTMLAttributes<HTMLTableRowElement>) => (
|
|
392
|
+
<tr
|
|
393
|
+
className="!table-row hover:bg-slate-50/70 dark:hover:bg-white/5 transition-colors"
|
|
380
394
|
{...props}
|
|
381
395
|
/>
|
|
382
396
|
),
|
|
383
397
|
th: ({ children, ...props }: React.ThHTMLAttributes<HTMLTableCellElement>) => (
|
|
384
398
|
<th
|
|
385
|
-
className="px-4 py-3
|
|
399
|
+
className="!table-cell px-4 py-3 font-bold text-slate-700 dark:text-white/90 whitespace-nowrap text-[11px] uppercase tracking-wider text-left"
|
|
386
400
|
{...props}
|
|
387
401
|
>
|
|
388
402
|
{normaliseChild(children)}
|
|
@@ -390,7 +404,7 @@ export function MessageBubble({
|
|
|
390
404
|
),
|
|
391
405
|
td: ({ children, ...props }: React.TdHTMLAttributes<HTMLTableCellElement>) => (
|
|
392
406
|
<td
|
|
393
|
-
className="px-4 py-3
|
|
407
|
+
className="!table-cell px-4 py-3 text-slate-600 dark:text-white/70 whitespace-nowrap text-sm"
|
|
394
408
|
{...props}
|
|
395
409
|
>
|
|
396
410
|
{normaliseChild(children)}
|