pxengine 0.1.93 → 0.1.95

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.mjs CHANGED
@@ -34910,7 +34910,9 @@ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }
34910
34910
  {
34911
34911
  className: cn(
34912
34912
  "relative flex flex-col items-center justify-center p-8 border-2 border-dashed rounded-3xl transition-all",
34913
- !hasPxVars && (isDragging ? "border-purple-500 bg-purple-50" : "border-purple-100 bg-white"),
34913
+ // Default styling matches the creator-discovery cards (gold-on-charcoal,
34914
+ // theme-stable). The `--px-*` styled path overrides this when provided.
34915
+ !hasPxVars && (isDragging ? "border-gold bg-grayPill" : "border-cardBorder bg-cardSurface"),
34914
34916
  className
34915
34917
  ),
34916
34918
  style: wrapperStyle,
@@ -34931,7 +34933,7 @@ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }
34931
34933
  /* @__PURE__ */ jsx102(
34932
34934
  "div",
34933
34935
  {
34934
- className: cn("w-12 h-12 rounded-2xl flex items-center justify-center mb-4", !hasPxVars && "bg-purple-100 text-purple-600"),
34936
+ className: cn("w-12 h-12 rounded-2xl flex items-center justify-center mb-4", !hasPxVars && "bg-gold/10 text-gold"),
34935
34937
  style: hasPxVars ? { backgroundColor: "var(--px-accent-color)", color: "var(--px-accent-fg, white)", opacity: 0.15 } : void 0,
34936
34938
  children: /* @__PURE__ */ jsx102(Upload, { className: "w-6 h-6", style: hasPxVars ? { color: "var(--px-accent-color)", opacity: 1 } : void 0 })
34937
34939
  }
@@ -34939,12 +34941,12 @@ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }
34939
34941
  /* @__PURE__ */ jsx102(
34940
34942
  "h4",
34941
34943
  {
34942
- className: cn("font-bold mb-1", !hasPxVars && "text-gray-900"),
34944
+ className: cn("font-bold mb-1", !hasPxVars && "text-gold"),
34943
34945
  style: hasPxVars ? { color: "var(--px-text-color, inherit)" } : void 0,
34944
34946
  children: title
34945
34947
  }
34946
34948
  ),
34947
- /* @__PURE__ */ jsx102("p", { className: "text-sm text-muted-foreground mb-6", children: "Drag and drop or click to browse" }),
34949
+ /* @__PURE__ */ jsx102("p", { className: cn("text-sm mb-6", !hasPxVars && "text-cardText"), children: "Drag and drop or click to browse" }),
34948
34950
  /* @__PURE__ */ jsx102(
34949
34951
  "input",
34950
34952
  {
@@ -34959,7 +34961,7 @@ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }
34959
34961
  Button,
34960
34962
  {
34961
34963
  variant: "outline",
34962
- className: cn("rounded-full", !hasPxVars && "border-purple-200 text-purple-700 hover:bg-purple-50"),
34964
+ className: cn("rounded-full", !hasPxVars && "border-cardBorder bg-transparent text-gold hover:bg-gold/10 hover:text-gold"),
34963
34965
  style: hasPxVars ? { borderColor: "var(--px-accent-color)", color: "var(--px-accent-color)" } : void 0,
34964
34966
  children: "Select Files"
34965
34967
  }
@@ -39345,6 +39347,19 @@ var DEFAULT_THEME = {
39345
39347
  secondary: "#a78bfa",
39346
39348
  accent: "#c4b5fd"
39347
39349
  };
39350
+ function readableOn(bg) {
39351
+ if (!bg || typeof bg !== "string") return "#ffffff";
39352
+ const hex = bg.replace("#", "");
39353
+ if (hex.length !== 6) return "#ffffff";
39354
+ const n = parseInt(hex, 16);
39355
+ if (Number.isNaN(n)) return "#ffffff";
39356
+ const ch = [n >> 16 & 255, n >> 8 & 255, n & 255].map((c) => {
39357
+ const x = c / 255;
39358
+ return x <= 0.03928 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
39359
+ });
39360
+ const lum = 0.2126 * ch[0] + 0.7152 * ch[1] + 0.0722 * ch[2];
39361
+ return lum > 0.5 ? "#1a1a1a" : "#ffffff";
39362
+ }
39348
39363
  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
39364
  /* @__PURE__ */ jsx148("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
39350
39365
  /* @__PURE__ */ jsx148("polyline", { points: "7 10 12 15 17 10" }),
@@ -39767,8 +39782,8 @@ var ResearchReportJobCard = (props) => {
39767
39782
  {
39768
39783
  onClick: handleDownload,
39769
39784
  disabled: !hasHTML,
39770
- className: "flex items-center gap-1.5 px-2.5 h-7 text-white text-xs font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
39771
- style: { backgroundColor: primaryColor },
39785
+ 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",
39786
+ style: { backgroundColor: primaryColor, color: readableOn(primaryColor) },
39772
39787
  onMouseEnter: (e) => e.currentTarget.style.filter = "brightness(1.15)",
39773
39788
  onMouseLeave: (e) => e.currentTarget.style.filter = "brightness(1)",
39774
39789
  children: [
@@ -43098,7 +43113,7 @@ function PlatformMetricsBanner({
43098
43113
  return /* @__PURE__ */ jsxs132(
43099
43114
  "div",
43100
43115
  {
43101
- 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 ",
43116
+ className: "\r\n grid grid-cols-1 gap-3 rounded-xl py-4 px-4 shadow-sm\r\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\r\n ",
43102
43117
  style: { backgroundColor: bgColor },
43103
43118
  children: [
43104
43119
  /* @__PURE__ */ jsxs132("div", { className: "flex flex-col items-center md:min-w-0", children: [