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.cjs CHANGED
@@ -35237,7 +35237,9 @@ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }
35237
35237
  {
35238
35238
  className: cn(
35239
35239
  "relative flex flex-col items-center justify-center p-8 border-2 border-dashed rounded-3xl transition-all",
35240
- !hasPxVars && (isDragging ? "border-purple-500 bg-purple-50" : "border-purple-100 bg-white"),
35240
+ // Default styling matches the creator-discovery cards (gold-on-charcoal,
35241
+ // theme-stable). The `--px-*` styled path overrides this when provided.
35242
+ !hasPxVars && (isDragging ? "border-gold bg-grayPill" : "border-cardBorder bg-cardSurface"),
35241
35243
  className
35242
35244
  ),
35243
35245
  style: wrapperStyle,
@@ -35258,7 +35260,7 @@ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }
35258
35260
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
35259
35261
  "div",
35260
35262
  {
35261
- className: cn("w-12 h-12 rounded-2xl flex items-center justify-center mb-4", !hasPxVars && "bg-purple-100 text-purple-600"),
35263
+ className: cn("w-12 h-12 rounded-2xl flex items-center justify-center mb-4", !hasPxVars && "bg-gold/10 text-gold"),
35262
35264
  style: hasPxVars ? { backgroundColor: "var(--px-accent-color)", color: "var(--px-accent-fg, white)", opacity: 0.15 } : void 0,
35263
35265
  children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Upload, { className: "w-6 h-6", style: hasPxVars ? { color: "var(--px-accent-color)", opacity: 1 } : void 0 })
35264
35266
  }
@@ -35266,12 +35268,12 @@ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }
35266
35268
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
35267
35269
  "h4",
35268
35270
  {
35269
- className: cn("font-bold mb-1", !hasPxVars && "text-gray-900"),
35271
+ className: cn("font-bold mb-1", !hasPxVars && "text-gold"),
35270
35272
  style: hasPxVars ? { color: "var(--px-text-color, inherit)" } : void 0,
35271
35273
  children: title
35272
35274
  }
35273
35275
  ),
35274
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "text-sm text-muted-foreground mb-6", children: "Drag and drop or click to browse" }),
35276
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: cn("text-sm mb-6", !hasPxVars && "text-cardText"), children: "Drag and drop or click to browse" }),
35275
35277
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
35276
35278
  "input",
35277
35279
  {
@@ -35286,7 +35288,7 @@ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }
35286
35288
  Button,
35287
35289
  {
35288
35290
  variant: "outline",
35289
- className: cn("rounded-full", !hasPxVars && "border-purple-200 text-purple-700 hover:bg-purple-50"),
35291
+ className: cn("rounded-full", !hasPxVars && "border-cardBorder bg-transparent text-gold hover:bg-gold/10 hover:text-gold"),
35290
35292
  style: hasPxVars ? { borderColor: "var(--px-accent-color)", color: "var(--px-accent-color)" } : void 0,
35291
35293
  children: "Select Files"
35292
35294
  }
@@ -39672,6 +39674,19 @@ var DEFAULT_THEME = {
39672
39674
  secondary: "#a78bfa",
39673
39675
  accent: "#c4b5fd"
39674
39676
  };
39677
+ function readableOn(bg) {
39678
+ if (!bg || typeof bg !== "string") return "#ffffff";
39679
+ const hex = bg.replace("#", "");
39680
+ if (hex.length !== 6) return "#ffffff";
39681
+ const n = parseInt(hex, 16);
39682
+ if (Number.isNaN(n)) return "#ffffff";
39683
+ const ch = [n >> 16 & 255, n >> 8 & 255, n & 255].map((c) => {
39684
+ const x = c / 255;
39685
+ return x <= 0.03928 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
39686
+ });
39687
+ const lum = 0.2126 * ch[0] + 0.7152 * ch[1] + 0.0722 * ch[2];
39688
+ return lum > 0.5 ? "#1a1a1a" : "#ffffff";
39689
+ }
39675
39690
  var DownloadIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
39676
39691
  /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
39677
39692
  /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("polyline", { points: "7 10 12 15 17 10" }),
@@ -40094,8 +40109,8 @@ var ResearchReportJobCard = (props) => {
40094
40109
  {
40095
40110
  onClick: handleDownload,
40096
40111
  disabled: !hasHTML,
40097
- 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",
40098
- style: { backgroundColor: primaryColor },
40112
+ 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",
40113
+ style: { backgroundColor: primaryColor, color: readableOn(primaryColor) },
40099
40114
  onMouseEnter: (e) => e.currentTarget.style.filter = "brightness(1.15)",
40100
40115
  onMouseLeave: (e) => e.currentTarget.style.filter = "brightness(1)",
40101
40116
  children: [
@@ -43425,7 +43440,7 @@ function PlatformMetricsBanner({
43425
43440
  return /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(
43426
43441
  "div",
43427
43442
  {
43428
- 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 ",
43443
+ 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 ",
43429
43444
  style: { backgroundColor: bgColor },
43430
43445
  children: [
43431
43446
  /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)("div", { className: "flex flex-col items-center md:min-w-0", children: [