pxengine 0.1.99 → 0.1.101
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 +132 -132
- package/config/tailwind-preset.js +159 -159
- package/dist/index.cjs +66 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.mjs +66 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +121 -121
- package/dist/registry.json +0 -19331
package/dist/index.cjs
CHANGED
|
@@ -38649,12 +38649,36 @@ var confidenceClass = {
|
|
|
38649
38649
|
Medium: "text-amber-600 dark:text-amber-400",
|
|
38650
38650
|
Low: "text-rose-600 dark:text-rose-400"
|
|
38651
38651
|
};
|
|
38652
|
-
|
|
38653
|
-
|
|
38654
|
-
|
|
38655
|
-
|
|
38656
|
-
|
|
38657
|
-
|
|
38652
|
+
function normalizeConfidence(c) {
|
|
38653
|
+
if (!c) return void 0;
|
|
38654
|
+
const v = String(c).trim().toLowerCase();
|
|
38655
|
+
if (v.startsWith("h")) return "High";
|
|
38656
|
+
if (v.startsWith("m")) return "Medium";
|
|
38657
|
+
if (v.startsWith("l")) return "Low";
|
|
38658
|
+
return void 0;
|
|
38659
|
+
}
|
|
38660
|
+
function resolveItems(props) {
|
|
38661
|
+
const cardConfidence = props.confidence;
|
|
38662
|
+
if (Array.isArray(props.insights) && props.insights.length > 0) {
|
|
38663
|
+
return props.insights.map((it) => ({
|
|
38664
|
+
label: it?.label ?? "",
|
|
38665
|
+
value: it?.value ?? "",
|
|
38666
|
+
confidence: normalizeConfidence(it?.confidence ?? cardConfidence)
|
|
38667
|
+
}));
|
|
38668
|
+
}
|
|
38669
|
+
if (Array.isArray(props.key_findings) && props.key_findings.length > 0) {
|
|
38670
|
+
return props.key_findings.map((f) => ({
|
|
38671
|
+
label: f?.finding ?? f?.label ?? "",
|
|
38672
|
+
value: f?.data_point ?? f?.value ?? "",
|
|
38673
|
+
confidence: normalizeConfidence(f?.confidence ?? cardConfidence)
|
|
38674
|
+
}));
|
|
38675
|
+
}
|
|
38676
|
+
return [];
|
|
38677
|
+
}
|
|
38678
|
+
var InsightSummaryCard = (props) => {
|
|
38679
|
+
const { title, className } = props;
|
|
38680
|
+
const summary = props.summary ?? props.executive_summary;
|
|
38681
|
+
const items = resolveItems(props);
|
|
38658
38682
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
38659
38683
|
"div",
|
|
38660
38684
|
{
|
|
@@ -38665,20 +38689,29 @@ var InsightSummaryCard = ({
|
|
|
38665
38689
|
children: [
|
|
38666
38690
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38667
38691
|
summary ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "mt-2 text-sm text-muted-foreground leading-relaxed", children: summary }) : null,
|
|
38668
|
-
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "mt-4 space-y-2", children:
|
|
38692
|
+
items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "mt-4 space-y-2", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
38669
38693
|
"div",
|
|
38670
38694
|
{
|
|
38671
38695
|
className: "rounded-xl border border-border/70 bg-background/50 px-3 py-2",
|
|
38672
38696
|
children: [
|
|
38673
38697
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
38674
38698
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "text-sm font-medium text-foreground", children: item.label }),
|
|
38675
|
-
item.confidence ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
38699
|
+
item.confidence ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
38700
|
+
"span",
|
|
38701
|
+
{
|
|
38702
|
+
className: cn(
|
|
38703
|
+
"text-xs font-semibold shrink-0",
|
|
38704
|
+
confidenceClass[item.confidence]
|
|
38705
|
+
),
|
|
38706
|
+
children: item.confidence
|
|
38707
|
+
}
|
|
38708
|
+
) : null
|
|
38676
38709
|
] }),
|
|
38677
|
-
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: item.value })
|
|
38710
|
+
item.value ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: item.value }) : null
|
|
38678
38711
|
]
|
|
38679
38712
|
},
|
|
38680
38713
|
`${item.label}-${index}`
|
|
38681
|
-
)) })
|
|
38714
|
+
)) }) : null
|
|
38682
38715
|
]
|
|
38683
38716
|
}
|
|
38684
38717
|
);
|
|
@@ -43638,7 +43671,7 @@ function PlatformMetricsBanner({
|
|
|
43638
43671
|
return /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(
|
|
43639
43672
|
"div",
|
|
43640
43673
|
{
|
|
43641
|
-
className: "\
|
|
43674
|
+
className: "\n grid grid-cols-1 gap-3 rounded-xl py-4 px-4 shadow-sm\n md:flex md:overflow-x-auto md:gap-6 md:rounded-l-xl md:py-4 md:px-4 md:items-center md:gap-0 md:px-0 md:ml-8\n ",
|
|
43642
43675
|
style: { backgroundColor: bgColor },
|
|
43643
43676
|
children: [
|
|
43644
43677
|
/* @__PURE__ */ (0, import_jsx_runtime173.jsxs)("div", { className: "flex flex-col items-center md:min-w-0", children: [
|
|
@@ -45052,9 +45085,28 @@ var hcLoadPromise = null;
|
|
|
45052
45085
|
function loadHighcharts() {
|
|
45053
45086
|
if (hcSingleton) return Promise.resolve(hcSingleton);
|
|
45054
45087
|
if (hcLoadPromise) return hcLoadPromise;
|
|
45055
|
-
hcLoadPromise = import("highcharts").then((m) => {
|
|
45056
|
-
|
|
45057
|
-
|
|
45088
|
+
hcLoadPromise = import("highcharts").then(async (m) => {
|
|
45089
|
+
const HC = m.default ?? m;
|
|
45090
|
+
const moduleLoaders = [
|
|
45091
|
+
() => import("highcharts/highcharts-more"),
|
|
45092
|
+
() => import("highcharts/highcharts-3d"),
|
|
45093
|
+
() => import("highcharts/modules/funnel"),
|
|
45094
|
+
() => import("highcharts/modules/sankey"),
|
|
45095
|
+
() => import("highcharts/modules/networkgraph"),
|
|
45096
|
+
() => import("highcharts/modules/heatmap"),
|
|
45097
|
+
() => import("highcharts/modules/treemap"),
|
|
45098
|
+
() => import("highcharts/modules/solid-gauge")
|
|
45099
|
+
];
|
|
45100
|
+
for (const load of moduleLoaders) {
|
|
45101
|
+
try {
|
|
45102
|
+
const mod = await load();
|
|
45103
|
+
const init = mod?.default ?? mod;
|
|
45104
|
+
if (typeof init === "function") init(HC);
|
|
45105
|
+
} catch {
|
|
45106
|
+
}
|
|
45107
|
+
}
|
|
45108
|
+
hcSingleton = HC;
|
|
45109
|
+
return HC;
|
|
45058
45110
|
});
|
|
45059
45111
|
return hcLoadPromise;
|
|
45060
45112
|
}
|