@apteva/apteva-kit 0.1.108 → 0.1.110
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 +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -612,7 +612,7 @@ function parseWidgetsFromText(text) {
|
|
|
612
612
|
let hasPendingWidget = false;
|
|
613
613
|
let currentIndex = 0;
|
|
614
614
|
let pendingWidgetType = null;
|
|
615
|
-
let processText = text;
|
|
615
|
+
let processText = text.replace(/<\/?ui\s*\/?>/gi, "");
|
|
616
616
|
const lastWidgetStart = text.lastIndexOf("@ui:");
|
|
617
617
|
if (lastWidgetStart !== -1) {
|
|
618
618
|
const afterStart = text.slice(lastWidgetStart);
|
|
@@ -1561,14 +1561,14 @@ function Form({ widget, onAction }) {
|
|
|
1561
1561
|
{
|
|
1562
1562
|
type: "button",
|
|
1563
1563
|
onClick: () => _optionalChain([fileInputRefs, 'access', _23 => _23.current, 'access', _24 => _24[field.name], 'optionalAccess', _25 => _25.click, 'call', _26 => _26()]),
|
|
1564
|
-
className: "w-full px-3 py-3 rounded-lg border-2 border-dashed transition-colors cursor-pointer border-neutral-300 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-500 dark:!text-neutral-400 hover:border-blue-400 hover:!text-blue-500 !text-sm",
|
|
1564
|
+
className: "apteva-file-drop w-full px-3 py-3 rounded-lg border-2 border-dashed transition-colors cursor-pointer border-neutral-300 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-500 dark:!text-neutral-400 hover:border-blue-400 hover:!text-blue-500 !text-sm",
|
|
1565
1565
|
children: field.placeholder || "Click to add files"
|
|
1566
1566
|
}
|
|
1567
1567
|
),
|
|
1568
1568
|
files.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "space-y-1", children: files.map((file, idx) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1569
1569
|
"li",
|
|
1570
1570
|
{
|
|
1571
|
-
className: "flex items-center justify-between px-2 py-1.5 rounded-lg bg-neutral-50 dark:bg-neutral-800 !text-sm",
|
|
1571
|
+
className: "apteva-file-item-row flex items-center justify-between px-2 py-1.5 rounded-lg bg-neutral-50 dark:bg-neutral-800 !text-sm",
|
|
1572
1572
|
children: [
|
|
1573
1573
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "!text-neutral-700 dark:!text-neutral-300 truncate mr-2", children: [
|
|
1574
1574
|
file.name,
|
|
@@ -1583,7 +1583,7 @@ function Form({ widget, onAction }) {
|
|
|
1583
1583
|
{
|
|
1584
1584
|
type: "button",
|
|
1585
1585
|
onClick: () => handleChange(field.name, files.filter((_, i) => i !== idx)),
|
|
1586
|
-
className: "!text-neutral-400 hover:!text-red-500 transition-colors flex-shrink-0",
|
|
1586
|
+
className: "apteva-file-remove-btn !text-neutral-400 hover:!text-red-500 transition-colors flex-shrink-0",
|
|
1587
1587
|
children: "\u2715"
|
|
1588
1588
|
}
|
|
1589
1589
|
)
|
|
@@ -1860,7 +1860,7 @@ function Kpi({ widget, onAction }) {
|
|
|
1860
1860
|
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "!text-base font-semibold !text-neutral-900 dark:!text-white mb-3", children: title }),
|
|
1861
1861
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "!text-sm font-medium !text-neutral-500 dark:!text-neutral-400 mb-1", children: label }),
|
|
1862
1862
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-end gap-2", children: [
|
|
1863
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "!text-2xl font-bold !text-neutral-900 dark:!text-white", children: value }),
|
|
1863
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-kpi-value !text-2xl font-bold !text-neutral-900 dark:!text-white", children: value }),
|
|
1864
1864
|
change && trendInfo && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex items-center gap-0.5 !text-sm font-medium ${trendInfo.color} mb-0.5`, children: [
|
|
1865
1865
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: trendInfo.symbol }),
|
|
1866
1866
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: change })
|
|
@@ -2421,7 +2421,8 @@ function parseMarkdown(content) {
|
|
|
2421
2421
|
return result;
|
|
2422
2422
|
}
|
|
2423
2423
|
function MarkdownContent({ content, className = "" }) {
|
|
2424
|
-
|
|
2424
|
+
const cleaned = content.replace(/<\/?ui\s*\/?>/gi, "");
|
|
2425
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `apteva-md ${className}`, children: parseMarkdown(cleaned) });
|
|
2425
2426
|
}
|
|
2426
2427
|
|
|
2427
2428
|
// src/components/Chat/ToolCall.tsx
|