pxengine 0.1.93 → 0.1.94
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.cjs +15 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +15 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -39345,6 +39345,19 @@ var DEFAULT_THEME = {
|
|
|
39345
39345
|
secondary: "#a78bfa",
|
|
39346
39346
|
accent: "#c4b5fd"
|
|
39347
39347
|
};
|
|
39348
|
+
function readableOn(bg) {
|
|
39349
|
+
if (!bg || typeof bg !== "string") return "#ffffff";
|
|
39350
|
+
const hex = bg.replace("#", "");
|
|
39351
|
+
if (hex.length !== 6) return "#ffffff";
|
|
39352
|
+
const n = parseInt(hex, 16);
|
|
39353
|
+
if (Number.isNaN(n)) return "#ffffff";
|
|
39354
|
+
const ch = [n >> 16 & 255, n >> 8 & 255, n & 255].map((c) => {
|
|
39355
|
+
const x = c / 255;
|
|
39356
|
+
return x <= 0.03928 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
39357
|
+
});
|
|
39358
|
+
const lum = 0.2126 * ch[0] + 0.7152 * ch[1] + 0.0722 * ch[2];
|
|
39359
|
+
return lum > 0.5 ? "#1a1a1a" : "#ffffff";
|
|
39360
|
+
}
|
|
39348
39361
|
var DownloadIcon2 = () => /* @__PURE__ */ jsxs109("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39349
39362
|
/* @__PURE__ */ jsx148("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
39350
39363
|
/* @__PURE__ */ jsx148("polyline", { points: "7 10 12 15 17 10" }),
|
|
@@ -39767,8 +39780,8 @@ var ResearchReportJobCard = (props) => {
|
|
|
39767
39780
|
{
|
|
39768
39781
|
onClick: handleDownload,
|
|
39769
39782
|
disabled: !hasHTML,
|
|
39770
|
-
className: "flex items-center gap-1.5 px-2.5 h-7 text-
|
|
39771
|
-
style: { backgroundColor: primaryColor },
|
|
39783
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 text-xs font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
39784
|
+
style: { backgroundColor: primaryColor, color: readableOn(primaryColor) },
|
|
39772
39785
|
onMouseEnter: (e) => e.currentTarget.style.filter = "brightness(1.15)",
|
|
39773
39786
|
onMouseLeave: (e) => e.currentTarget.style.filter = "brightness(1)",
|
|
39774
39787
|
children: [
|