@industry-theme/repository-composition-panels 0.7.26 → 0.7.28

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.
@@ -106207,7 +106207,7 @@ const browserExt = {
106207
106207
  },
106208
106208
  test: () => true,
106209
106209
  load: async () => {
106210
- await import("./browserAll-CIuBn_fB.js");
106210
+ await import("./browserAll-B5ulNvRV.js");
106211
106211
  }
106212
106212
  };
106213
106213
  const webworkerExt = {
@@ -106218,7 +106218,7 @@ const webworkerExt = {
106218
106218
  },
106219
106219
  test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
106220
106220
  load: async () => {
106221
- await import("./webworkerAll-CLYFrCAq.js");
106221
+ await import("./webworkerAll-1U-w2f78.js");
106222
106222
  }
106223
106223
  };
106224
106224
  class ObservablePoint {
@@ -153929,6 +153929,89 @@ const TelemetryCoveragePanel = ({ context: context2, events }) => {
153929
153929
  }
153930
153930
  );
153931
153931
  };
153932
+ const languageColors = {
153933
+ TypeScript: 3242182,
153934
+ JavaScript: 16244510,
153935
+ Python: 16766011,
153936
+ Rust: 14591364,
153937
+ Go: 44504,
153938
+ Java: 11563545,
153939
+ "C++": 15944573,
153940
+ C: 5592405,
153941
+ "C#": 1541632,
153942
+ Ruby: 13382701,
153943
+ PHP: 5201301,
153944
+ Swift: 15749432,
153945
+ Kotlin: 11107327,
153946
+ Scala: 12725568,
153947
+ Elixir: 7228030,
153948
+ Haskell: 6180998,
153949
+ Clojure: 14374997,
153950
+ Shell: 9035857,
153951
+ HTML: 14896166,
153952
+ CSS: 5651836,
153953
+ Vue: 4307075,
153954
+ Svelte: 16727552
153955
+ };
153956
+ function darkenColor(color2, percent) {
153957
+ const r2 = Math.max(0, (color2 >> 16 & 255) * (1 - percent));
153958
+ const g2 = Math.max(0, (color2 >> 8 & 255) * (1 - percent));
153959
+ const b2 = Math.max(0, (color2 & 255) * (1 - percent));
153960
+ return `#${Math.round(r2).toString(16).padStart(2, "0")}${Math.round(g2).toString(16).padStart(2, "0")}${Math.round(b2).toString(16).padStart(2, "0")}`;
153961
+ }
153962
+ function hslToHex(h2, s2, l2) {
153963
+ s2 /= 100;
153964
+ l2 /= 100;
153965
+ const a2 = s2 * Math.min(l2, 1 - l2);
153966
+ const f2 = (n2) => {
153967
+ const k2 = (n2 + h2 / 30) % 12;
153968
+ const color2 = l2 - a2 * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1);
153969
+ return Math.round(255 * color2);
153970
+ };
153971
+ return (f2(0) << 16) + (f2(8) << 8) + f2(4);
153972
+ }
153973
+ function hashStringToColor(str2) {
153974
+ let hash = 0;
153975
+ for (let i2 = 0; i2 < str2.length; i2++) {
153976
+ hash = str2.charCodeAt(i2) + ((hash << 5) - hash);
153977
+ }
153978
+ const h2 = Math.abs(hash % 360);
153979
+ const s2 = 30 + Math.abs((hash >> 8) % 30);
153980
+ const l2 = 35 + Math.abs((hash >> 16) % 20);
153981
+ return hslToHex(h2, s2, l2);
153982
+ }
153983
+ function parseColor$1(color2) {
153984
+ if (typeof color2 === "number") return color2;
153985
+ if (color2.startsWith("#")) return parseInt(color2.slice(1), 16);
153986
+ return hashStringToColor(color2);
153987
+ }
153988
+ function generateCardColors(baseColor) {
153989
+ return {
153990
+ cardBg: darkenColor(baseColor, 0.6),
153991
+ cardBorder: darkenColor(baseColor, 0.7),
153992
+ cardHighlight: darkenColor(baseColor, 0.4),
153993
+ windowGradient: [
153994
+ darkenColor(baseColor, 0.85),
153995
+ darkenColor(baseColor, 0.8)
153996
+ ],
153997
+ panelGradient: [
153998
+ darkenColor(baseColor, 0.4),
153999
+ darkenColor(baseColor, 0.6)
154000
+ ],
154001
+ panelBorder: darkenColor(baseColor, 0.3)
154002
+ };
154003
+ }
154004
+ function getRepositoryColor(repository) {
154005
+ var _a;
154006
+ if (repository.bookColor) {
154007
+ return parseColor$1(repository.bookColor);
154008
+ }
154009
+ const language2 = (_a = repository.github) == null ? void 0 : _a.primaryLanguage;
154010
+ if (language2 && languageColors[language2]) {
154011
+ return languageColors[language2];
154012
+ }
154013
+ return hashStringToColor(repository.name);
154014
+ }
153932
154015
  const licenseBorderColors = {
153933
154016
  MIT: "#228b22",
153934
154017
  // Forest green - open/welcoming
@@ -153953,34 +154036,362 @@ function formatCount(count2) {
153953
154036
  if (count2 < 1e6) return `${(count2 / 1e3).toFixed(1)}k`;
153954
154037
  return `${(count2 / 1e6).toFixed(1)}M`;
153955
154038
  }
154039
+ const STARFIELD_BACKGROUND = `
154040
+ radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4) 50%, transparent 50%),
154041
+ radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.3) 50%, transparent 50%),
154042
+ radial-gradient(1px 1px at 40% 10%, rgba(255,255,255,0.35) 50%, transparent 50%),
154043
+ radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.25) 50%, transparent 50%),
154044
+ radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,0.4) 50%, transparent 50%),
154045
+ radial-gradient(1px 1px at 85% 40%, rgba(255,255,255,0.3) 50%, transparent 50%),
154046
+ radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,0.35) 50%, transparent 50%),
154047
+ radial-gradient(1px 1px at 35% 70%, rgba(255,255,255,0.25) 50%, transparent 50%),
154048
+ radial-gradient(1px 1px at 50% 85%, rgba(255,255,255,0.4) 50%, transparent 50%),
154049
+ radial-gradient(1px 1px at 65% 60%, rgba(255,255,255,0.3) 50%, transparent 50%),
154050
+ radial-gradient(1px 1px at 80% 75%, rgba(255,255,255,0.35) 50%, transparent 50%),
154051
+ radial-gradient(1px 1px at 95% 90%, rgba(255,255,255,0.25) 50%, transparent 50%),
154052
+ radial-gradient(1.5px 1.5px at 20% 25%, rgba(255,255,255,0.5) 50%, transparent 50%),
154053
+ radial-gradient(1.5px 1.5px at 60% 30%, rgba(200,220,255,0.45) 50%, transparent 50%),
154054
+ radial-gradient(1.5px 1.5px at 45% 65%, rgba(255,255,255,0.5) 50%, transparent 50%),
154055
+ radial-gradient(1.5px 1.5px at 75% 80%, rgba(220,200,255,0.45) 50%, transparent 50%),
154056
+ radial-gradient(2px 2px at 30% 50%, rgba(255,255,255,0.6) 50%, transparent 50%),
154057
+ radial-gradient(2px 2px at 70% 55%, rgba(200,220,255,0.55) 50%, transparent 50%),
154058
+ radial-gradient(2px 2px at 90% 15%, rgba(255,255,255,0.6) 50%, transparent 50%)
154059
+ `;
154060
+ const CardLayout = ({
154061
+ color: color2,
154062
+ owner,
154063
+ stars,
154064
+ label,
154065
+ description,
154066
+ files,
154067
+ language: language2,
154068
+ license,
154069
+ packages,
154070
+ children: children2
154071
+ }) => {
154072
+ const { theme: theme2 } = useTheme();
154073
+ const baseColor = parseColor$1(color2);
154074
+ const colors = generateCardColors(baseColor);
154075
+ const licenseBorder = license ? licenseBorderColors[license] : null;
154076
+ const showHeader = owner || stars !== void 0 && stars > 0;
154077
+ return /* @__PURE__ */ jsxs(
154078
+ "div",
154079
+ {
154080
+ style: {
154081
+ position: "relative",
154082
+ display: "flex",
154083
+ flexDirection: "column",
154084
+ backgroundColor: colors.cardBg,
154085
+ padding: "8px 12px 28px 12px",
154086
+ border: `${licenseBorder ? "5px" : "3px"} solid ${licenseBorder || colors.cardBorder}`,
154087
+ width: "100%",
154088
+ height: "100%",
154089
+ boxSizing: "border-box",
154090
+ overflow: "hidden",
154091
+ boxShadow: licenseBorder ? `inset 0 0 0 2px ${licenseBorder}40, 0 0 8px ${licenseBorder}60` : `inset 0 0 0 2px ${colors.cardHighlight}`
154092
+ },
154093
+ children: [
154094
+ showHeader && /* @__PURE__ */ jsxs(
154095
+ "div",
154096
+ {
154097
+ style: {
154098
+ display: "flex",
154099
+ justifyContent: "space-between",
154100
+ alignItems: "center",
154101
+ marginBottom: "8px",
154102
+ marginLeft: "-4px",
154103
+ marginRight: "-4px",
154104
+ minHeight: "40px",
154105
+ flexShrink: 0
154106
+ },
154107
+ children: [
154108
+ owner ? /* @__PURE__ */ jsxs(
154109
+ "div",
154110
+ {
154111
+ style: {
154112
+ display: "flex",
154113
+ alignItems: "center",
154114
+ gap: "6px",
154115
+ minWidth: 0,
154116
+ flex: 1
154117
+ },
154118
+ children: [
154119
+ /* @__PURE__ */ jsx(
154120
+ "img",
154121
+ {
154122
+ src: `https://github.com/${owner}.png?size=40`,
154123
+ alt: owner,
154124
+ style: {
154125
+ width: "28px",
154126
+ height: "28px",
154127
+ borderRadius: "6px",
154128
+ border: "1px solid rgba(255,255,255,0.3)",
154129
+ flexShrink: 0
154130
+ }
154131
+ }
154132
+ ),
154133
+ /* @__PURE__ */ jsx(
154134
+ "span",
154135
+ {
154136
+ style: {
154137
+ fontSize: theme2.fontSizes[1],
154138
+ fontWeight: theme2.fontWeights.medium,
154139
+ color: "#e0e0e0",
154140
+ textShadow: "0 1px 2px rgba(0,0,0,0.5)",
154141
+ fontFamily: theme2.fonts.body,
154142
+ overflow: "hidden",
154143
+ textOverflow: "ellipsis",
154144
+ whiteSpace: "nowrap"
154145
+ },
154146
+ children: owner
154147
+ }
154148
+ )
154149
+ ]
154150
+ }
154151
+ ) : /* @__PURE__ */ jsx("div", {}),
154152
+ stars !== void 0 && stars > 0 && /* @__PURE__ */ jsxs(
154153
+ "div",
154154
+ {
154155
+ style: {
154156
+ display: "flex",
154157
+ alignItems: "center",
154158
+ gap: "4px",
154159
+ flexShrink: 0
154160
+ },
154161
+ children: [
154162
+ /* @__PURE__ */ jsx(
154163
+ "span",
154164
+ {
154165
+ style: {
154166
+ fontSize: theme2.fontSizes[1],
154167
+ fontWeight: theme2.fontWeights.bold,
154168
+ color: "#ffffff",
154169
+ textShadow: "0 1px 2px rgba(0,0,0,0.5)",
154170
+ fontFamily: theme2.fonts.body
154171
+ },
154172
+ children: formatCount(stars)
154173
+ }
154174
+ ),
154175
+ /* @__PURE__ */ jsx(
154176
+ "span",
154177
+ {
154178
+ style: {
154179
+ fontSize: theme2.fontSizes[1],
154180
+ fontWeight: theme2.fontWeights.bold,
154181
+ color: "#fbbf24",
154182
+ textShadow: "0 1px 2px rgba(0,0,0,0.5)"
154183
+ },
154184
+ children: "★"
154185
+ }
154186
+ )
154187
+ ]
154188
+ }
154189
+ )
154190
+ ]
154191
+ }
154192
+ ),
154193
+ /* @__PURE__ */ jsxs(
154194
+ "div",
154195
+ {
154196
+ style: {
154197
+ flex: 1,
154198
+ minHeight: 0,
154199
+ position: "relative",
154200
+ background: `linear-gradient(180deg, ${colors.windowGradient[0]} 0%, ${colors.windowGradient[1]} 100%)`,
154201
+ border: `2px solid ${colors.cardHighlight}`,
154202
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.3)",
154203
+ overflow: "hidden",
154204
+ display: "flex",
154205
+ alignItems: "center",
154206
+ justifyContent: "center"
154207
+ },
154208
+ children: [
154209
+ /* @__PURE__ */ jsx(
154210
+ "div",
154211
+ {
154212
+ style: {
154213
+ position: "absolute",
154214
+ inset: 0,
154215
+ pointerEvents: "none",
154216
+ backgroundImage: STARFIELD_BACKGROUND,
154217
+ backgroundSize: "100% 100%"
154218
+ }
154219
+ }
154220
+ ),
154221
+ children2,
154222
+ label && /* @__PURE__ */ jsx(
154223
+ "div",
154224
+ {
154225
+ style: {
154226
+ position: "absolute",
154227
+ bottom: 0,
154228
+ left: 0,
154229
+ right: 0,
154230
+ padding: "6px 8px",
154231
+ background: "linear-gradient(transparent, rgba(0,0,0,0.7))",
154232
+ fontSize: theme2.fontSizes[2],
154233
+ fontWeight: theme2.fontWeights.bold,
154234
+ color: "#ffffff",
154235
+ fontFamily: theme2.fonts.body,
154236
+ whiteSpace: "nowrap",
154237
+ overflow: "hidden",
154238
+ textOverflow: "ellipsis",
154239
+ textShadow: "0 1px 2px rgba(0,0,0,0.5)",
154240
+ textAlign: "center"
154241
+ },
154242
+ title: label,
154243
+ children: label
154244
+ }
154245
+ )
154246
+ ]
154247
+ }
154248
+ ),
154249
+ /* @__PURE__ */ jsxs(
154250
+ "div",
154251
+ {
154252
+ style: {
154253
+ marginTop: "12px",
154254
+ padding: "8px",
154255
+ background: `linear-gradient(180deg, ${colors.panelGradient[0]} 0%, ${colors.panelGradient[1]} 100%)`,
154256
+ border: `1px solid ${colors.panelBorder}`,
154257
+ flexShrink: 0
154258
+ },
154259
+ children: [
154260
+ description && /* @__PURE__ */ jsx(
154261
+ "div",
154262
+ {
154263
+ style: {
154264
+ fontSize: theme2.fontSizes[1],
154265
+ color: "#e0e0e0",
154266
+ marginBottom: "6px",
154267
+ fontFamily: theme2.fonts.body,
154268
+ overflow: "hidden",
154269
+ textOverflow: "ellipsis",
154270
+ display: "-webkit-box",
154271
+ WebkitLineClamp: 2,
154272
+ WebkitBoxOrient: "vertical",
154273
+ textShadow: "0 1px 2px rgba(0,0,0,0.3)",
154274
+ lineHeight: 1.4
154275
+ },
154276
+ title: description,
154277
+ children: description
154278
+ }
154279
+ ),
154280
+ /* @__PURE__ */ jsx(
154281
+ "div",
154282
+ {
154283
+ style: {
154284
+ display: "flex",
154285
+ justifyContent: "center",
154286
+ flexWrap: "wrap",
154287
+ gap: "10px",
154288
+ fontSize: theme2.fontSizes[1],
154289
+ color: "#e0e0e0",
154290
+ fontFamily: theme2.fonts.body
154291
+ },
154292
+ children: files !== void 0 && files > 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
154293
+ /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "#94a3b8", children: /* @__PURE__ */ jsx(
154294
+ "path",
154295
+ {
154296
+ d: "M3 1h7l3 3v11H3V1zm7 0v3h3M5 8h6M5 11h6",
154297
+ stroke: "#94a3b8",
154298
+ strokeWidth: "1",
154299
+ fill: "none"
154300
+ }
154301
+ ) }),
154302
+ formatCount(files)
154303
+ ] })
154304
+ }
154305
+ ),
154306
+ packages && packages.length > 1 && /* @__PURE__ */ jsxs(
154307
+ "div",
154308
+ {
154309
+ style: {
154310
+ marginTop: "6px",
154311
+ display: "flex",
154312
+ flexWrap: "wrap",
154313
+ justifyContent: "center",
154314
+ gap: "4px"
154315
+ },
154316
+ children: [
154317
+ packages.slice(0, 6).map((pkg, i2) => /* @__PURE__ */ jsx(
154318
+ "span",
154319
+ {
154320
+ style: {
154321
+ fontSize: theme2.fontSizes[0],
154322
+ color: "#e0e0e0",
154323
+ backgroundColor: "rgba(0,0,0,0.2)",
154324
+ padding: "2px 6px",
154325
+ borderRadius: "3px",
154326
+ fontFamily: theme2.fonts.body,
154327
+ borderLeft: `2px solid ${typeof pkg.color === "string" ? pkg.color : `#${(pkg.color || 8947848).toString(16).padStart(6, "0")}`}`
154328
+ },
154329
+ children: pkg.name
154330
+ },
154331
+ i2
154332
+ )),
154333
+ packages.length > 6 && /* @__PURE__ */ jsxs(
154334
+ "span",
154335
+ {
154336
+ style: {
154337
+ fontSize: theme2.fontSizes[0],
154338
+ color: "#a0a0a0",
154339
+ fontFamily: theme2.fonts.body
154340
+ },
154341
+ children: [
154342
+ "+",
154343
+ packages.length - 6,
154344
+ " more"
154345
+ ]
154346
+ }
154347
+ )
154348
+ ]
154349
+ }
154350
+ )
154351
+ ]
154352
+ }
154353
+ ),
154354
+ language2 && /* @__PURE__ */ jsx(
154355
+ "div",
154356
+ {
154357
+ style: {
154358
+ position: "absolute",
154359
+ bottom: "4px",
154360
+ left: "8px",
154361
+ fontSize: theme2.fontSizes[0],
154362
+ fontWeight: theme2.fontWeights.medium,
154363
+ color: "#e0e0e0",
154364
+ textShadow: "0 1px 1px rgba(0,0,0,0.3)",
154365
+ fontFamily: theme2.fonts.body
154366
+ },
154367
+ children: language2
154368
+ }
154369
+ ),
154370
+ license && /* @__PURE__ */ jsx(
154371
+ "div",
154372
+ {
154373
+ style: {
154374
+ position: "absolute",
154375
+ bottom: "-3px",
154376
+ right: "-3px",
154377
+ backgroundColor: licenseBorder || colors.cardHighlight,
154378
+ padding: "3px 10px",
154379
+ borderRadius: 0,
154380
+ fontFamily: theme2.fonts.body,
154381
+ fontSize: theme2.fontSizes[0],
154382
+ fontWeight: theme2.fontWeights.bold,
154383
+ color: "#ffffff",
154384
+ textShadow: "0 1px 1px rgba(0,0,0,0.3)"
154385
+ },
154386
+ children: license
154387
+ }
154388
+ )
154389
+ ]
154390
+ }
154391
+ );
154392
+ };
153956
154393
  const ISO_TILE_WIDTH$1 = 64;
153957
154394
  const ISO_TILE_HEIGHT$1 = 32;
153958
- function darkenColor$1(color2, percent) {
153959
- const r2 = Math.max(0, (color2 >> 16 & 255) * (1 - percent));
153960
- const g2 = Math.max(0, (color2 >> 8 & 255) * (1 - percent));
153961
- const b2 = Math.max(0, (color2 & 255) * (1 - percent));
153962
- return `#${Math.round(r2).toString(16).padStart(2, "0")}${Math.round(g2).toString(16).padStart(2, "0")}${Math.round(b2).toString(16).padStart(2, "0")}`;
153963
- }
153964
- function generateCardColors$1(baseColor) {
153965
- return {
153966
- cardBg: darkenColor$1(baseColor, 0.6),
153967
- cardBorder: darkenColor$1(baseColor, 0.7),
153968
- cardHighlight: darkenColor$1(baseColor, 0.4),
153969
- windowGradient: [
153970
- darkenColor$1(baseColor, 0.85),
153971
- darkenColor$1(baseColor, 0.8)
153972
- ],
153973
- panelGradient: [
153974
- darkenColor$1(baseColor, 0.4),
153975
- darkenColor$1(baseColor, 0.6)
153976
- ],
153977
- panelBorder: darkenColor$1(baseColor, 0.3)
153978
- };
153979
- }
153980
- function parseColor$1(color2) {
153981
- if (typeof color2 === "number") return color2;
153982
- return parseInt(color2.replace("#", ""), 16);
153983
- }
153984
154395
  function getPackagePositions$1(count2, footprintWidth, footprintHeight) {
153985
154396
  const positions = [];
153986
154397
  const spacing = 0.18;
@@ -154224,321 +154635,30 @@ const RepoSprite = ({
154224
154635
  onPackageHoverEnd
154225
154636
  ]);
154226
154637
  if (variant === "card") {
154227
- const baseColor = parseColor$1(color2);
154228
- const colors = generateCardColors$1(baseColor);
154229
- const licenseBorder = license ? licenseBorderColors[license] : null;
154230
- return /* @__PURE__ */ jsxs(
154231
- "div",
154638
+ return /* @__PURE__ */ jsx(
154639
+ CardLayout,
154232
154640
  {
154233
- style: {
154234
- position: "relative",
154235
- display: "flex",
154236
- flexDirection: "column",
154237
- backgroundColor: colors.cardBg,
154238
- padding: "36px 12px 20px 12px",
154239
- border: `${licenseBorder ? "5px" : "3px"} solid ${licenseBorder || colors.cardBorder}`,
154240
- width: "100%",
154241
- height: "100%",
154242
- boxSizing: "border-box",
154243
- overflow: "hidden",
154244
- boxShadow: licenseBorder ? `inset 0 0 0 2px ${licenseBorder}40, 0 0 8px ${licenseBorder}60` : `inset 0 0 0 2px ${colors.cardHighlight}`
154245
- },
154246
- children: [
154247
- owner && /* @__PURE__ */ jsxs(
154248
- "div",
154249
- {
154250
- style: {
154251
- position: "absolute",
154252
- top: "10px",
154253
- left: "10px",
154254
- display: "flex",
154255
- alignItems: "center",
154256
- gap: "6px",
154257
- zIndex: 10
154258
- },
154259
- children: [
154260
- /* @__PURE__ */ jsx(
154261
- "img",
154262
- {
154263
- src: `https://github.com/${owner}.png?size=40`,
154264
- alt: owner,
154265
- style: {
154266
- width: "18px",
154267
- height: "18px",
154268
- borderRadius: "50%",
154269
- border: "1px solid rgba(255,255,255,0.3)"
154270
- }
154271
- }
154272
- ),
154273
- /* @__PURE__ */ jsx(
154274
- "span",
154275
- {
154276
- style: {
154277
- fontSize: "12px",
154278
- fontWeight: theme2.fontWeights.medium,
154279
- color: "#e0e0e0",
154280
- textShadow: "0 1px 2px rgba(0,0,0,0.5)",
154281
- fontFamily: theme2.fonts.body,
154282
- maxWidth: "80px",
154283
- overflow: "hidden",
154284
- textOverflow: "ellipsis",
154285
- whiteSpace: "nowrap"
154286
- },
154287
- children: owner
154288
- }
154289
- )
154290
- ]
154291
- }
154292
- ),
154293
- stars !== void 0 && stars > 0 && /* @__PURE__ */ jsxs(
154294
- "div",
154295
- {
154296
- style: {
154297
- position: "absolute",
154298
- top: "10px",
154299
- right: "10px",
154300
- display: "flex",
154301
- alignItems: "center",
154302
- gap: "4px",
154303
- zIndex: 10
154304
- },
154305
- children: [
154306
- /* @__PURE__ */ jsx(
154307
- "span",
154308
- {
154309
- style: {
154310
- fontSize: "10px",
154311
- fontWeight: theme2.fontWeights.bold,
154312
- color: "#fbbf24",
154313
- textShadow: "0 1px 2px rgba(0,0,0,0.5)"
154314
- },
154315
- children: "★"
154316
- }
154317
- ),
154318
- /* @__PURE__ */ jsx(
154319
- "span",
154320
- {
154321
- style: {
154322
- fontSize: "16px",
154323
- fontWeight: theme2.fontWeights.bold,
154324
- color: "#ffffff",
154325
- textShadow: "0 1px 2px rgba(0,0,0,0.5)",
154326
- fontFamily: theme2.fonts.body
154327
- },
154328
- children: formatCount(stars)
154329
- }
154330
- )
154331
- ]
154332
- }
154333
- ),
154334
- /* @__PURE__ */ jsxs(
154335
- "div",
154336
- {
154337
- style: {
154338
- flex: 1,
154339
- minHeight: 0,
154340
- position: "relative",
154341
- background: `linear-gradient(180deg, ${colors.windowGradient[0]} 0%, ${colors.windowGradient[1]} 100%)`,
154342
- border: `2px solid ${colors.cardHighlight}`,
154343
- boxShadow: "inset 0 2px 4px rgba(0,0,0,0.3)",
154344
- overflow: "hidden",
154345
- display: "flex",
154346
- alignItems: "center",
154347
- justifyContent: "center"
154348
- },
154349
- children: [
154350
- /* @__PURE__ */ jsx(
154351
- "div",
154352
- {
154353
- style: {
154354
- position: "absolute",
154355
- inset: 0,
154356
- pointerEvents: "none",
154357
- backgroundImage: `
154358
- radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4) 50%, transparent 50%),
154359
- radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.3) 50%, transparent 50%),
154360
- radial-gradient(1px 1px at 40% 10%, rgba(255,255,255,0.35) 50%, transparent 50%),
154361
- radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.25) 50%, transparent 50%),
154362
- radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,0.4) 50%, transparent 50%),
154363
- radial-gradient(1px 1px at 85% 40%, rgba(255,255,255,0.3) 50%, transparent 50%),
154364
- radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,0.35) 50%, transparent 50%),
154365
- radial-gradient(1px 1px at 35% 70%, rgba(255,255,255,0.25) 50%, transparent 50%),
154366
- radial-gradient(1px 1px at 50% 85%, rgba(255,255,255,0.4) 50%, transparent 50%),
154367
- radial-gradient(1px 1px at 65% 60%, rgba(255,255,255,0.3) 50%, transparent 50%),
154368
- radial-gradient(1px 1px at 80% 75%, rgba(255,255,255,0.35) 50%, transparent 50%),
154369
- radial-gradient(1px 1px at 95% 90%, rgba(255,255,255,0.25) 50%, transparent 50%),
154370
- radial-gradient(1.5px 1.5px at 20% 25%, rgba(255,255,255,0.5) 50%, transparent 50%),
154371
- radial-gradient(1.5px 1.5px at 60% 30%, rgba(200,220,255,0.45) 50%, transparent 50%),
154372
- radial-gradient(1.5px 1.5px at 45% 65%, rgba(255,255,255,0.5) 50%, transparent 50%),
154373
- radial-gradient(1.5px 1.5px at 75% 80%, rgba(220,200,255,0.45) 50%, transparent 50%),
154374
- radial-gradient(2px 2px at 30% 50%, rgba(255,255,255,0.6) 50%, transparent 50%),
154375
- radial-gradient(2px 2px at 70% 55%, rgba(200,220,255,0.55) 50%, transparent 50%),
154376
- radial-gradient(2px 2px at 90% 15%, rgba(255,255,255,0.6) 50%, transparent 50%)
154377
- `,
154378
- backgroundSize: "100% 100%"
154379
- }
154380
- }
154381
- ),
154382
- /* @__PURE__ */ jsx(
154383
- "div",
154384
- {
154385
- ref: containerRef,
154386
- style: {
154387
- width: "100%",
154388
- height: "100%",
154389
- display: "flex",
154390
- alignItems: "center",
154391
- justifyContent: "center"
154392
- }
154393
- }
154394
- )
154395
- ]
154396
- }
154397
- ),
154398
- /* @__PURE__ */ jsxs(
154399
- "div",
154400
- {
154401
- style: {
154402
- marginTop: "12px",
154403
- padding: "8px",
154404
- background: `linear-gradient(180deg, ${colors.panelGradient[0]} 0%, ${colors.panelGradient[1]} 100%)`,
154405
- border: `1px solid ${colors.panelBorder}`,
154406
- flexShrink: 0
154407
- },
154408
- children: [
154409
- label && /* @__PURE__ */ jsx(
154410
- "div",
154411
- {
154412
- style: {
154413
- fontSize: theme2.fontSizes[2],
154414
- fontWeight: theme2.fontWeights.bold,
154415
- color: "#ffffff",
154416
- marginBottom: "6px",
154417
- fontFamily: theme2.fonts.body,
154418
- whiteSpace: "nowrap",
154419
- overflow: "hidden",
154420
- textOverflow: "ellipsis",
154421
- textShadow: "0 1px 2px rgba(0,0,0,0.3)",
154422
- textAlign: "center"
154423
- },
154424
- children: label
154425
- }
154426
- ),
154427
- /* @__PURE__ */ jsx(
154428
- "div",
154429
- {
154430
- style: {
154431
- display: "flex",
154432
- justifyContent: "center",
154433
- flexWrap: "wrap",
154434
- gap: "10px",
154435
- fontSize: theme2.fontSizes[1],
154436
- color: "#e0e0e0",
154437
- fontFamily: theme2.fonts.body
154438
- },
154439
- children: files !== void 0 && files > 0 && /* @__PURE__ */ jsxs(
154440
- "span",
154441
- {
154442
- style: { display: "flex", alignItems: "center", gap: "4px" },
154443
- children: [
154444
- /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "#94a3b8", children: /* @__PURE__ */ jsx(
154445
- "path",
154446
- {
154447
- d: "M3 1h7l3 3v11H3V1zm7 0v3h3M5 8h6M5 11h6",
154448
- stroke: "#94a3b8",
154449
- strokeWidth: "1",
154450
- fill: "none"
154451
- }
154452
- ) }),
154453
- formatCount(files)
154454
- ]
154455
- }
154456
- )
154457
- }
154458
- ),
154459
- packages && packages.length > 1 && /* @__PURE__ */ jsxs(
154460
- "div",
154461
- {
154462
- style: {
154463
- marginTop: "6px",
154464
- display: "flex",
154465
- flexWrap: "wrap",
154466
- justifyContent: "center",
154467
- gap: "4px"
154468
- },
154469
- children: [
154470
- packages.slice(0, 6).map((pkg, i2) => /* @__PURE__ */ jsx(
154471
- "span",
154472
- {
154473
- style: {
154474
- fontSize: theme2.fontSizes[0],
154475
- color: "#e0e0e0",
154476
- backgroundColor: "rgba(0,0,0,0.2)",
154477
- padding: "2px 6px",
154478
- borderRadius: "3px",
154479
- fontFamily: theme2.fonts.body,
154480
- borderLeft: `2px solid ${typeof pkg.color === "string" ? pkg.color : `#${(pkg.color || 8947848).toString(16).padStart(6, "0")}`}`
154481
- },
154482
- children: pkg.name
154483
- },
154484
- i2
154485
- )),
154486
- packages.length > 6 && /* @__PURE__ */ jsxs(
154487
- "span",
154488
- {
154489
- style: {
154490
- fontSize: theme2.fontSizes[0],
154491
- color: "#a0a0a0",
154492
- fontFamily: theme2.fonts.body
154493
- },
154494
- children: [
154495
- "+",
154496
- packages.length - 6,
154497
- " more"
154498
- ]
154499
- }
154500
- )
154501
- ]
154502
- }
154503
- )
154504
- ]
154505
- }
154506
- ),
154507
- language2 && /* @__PURE__ */ jsx(
154508
- "div",
154509
- {
154510
- style: {
154511
- position: "absolute",
154512
- bottom: "4px",
154513
- left: "8px",
154514
- fontSize: theme2.fontSizes[0],
154515
- fontWeight: theme2.fontWeights.medium,
154516
- color: "#e0e0e0",
154517
- textShadow: "0 1px 1px rgba(0,0,0,0.3)",
154518
- fontFamily: theme2.fonts.body
154519
- },
154520
- children: language2
154521
- }
154522
- ),
154523
- license && /* @__PURE__ */ jsx(
154524
- "div",
154525
- {
154526
- style: {
154527
- position: "absolute",
154528
- bottom: "-3px",
154529
- right: "-3px",
154530
- backgroundColor: licenseBorder || colors.cardHighlight,
154531
- padding: "3px 10px",
154532
- borderRadius: "3px 0 0 0",
154533
- fontSize: theme2.fontSizes[0],
154534
- fontWeight: theme2.fontWeights.bold,
154535
- color: "#ffffff",
154536
- textShadow: "0 1px 1px rgba(0,0,0,0.3)"
154537
- },
154538
- children: license
154641
+ color: color2,
154642
+ owner,
154643
+ stars,
154644
+ label,
154645
+ files,
154646
+ language: language2,
154647
+ license,
154648
+ packages,
154649
+ children: /* @__PURE__ */ jsx(
154650
+ "div",
154651
+ {
154652
+ ref: containerRef,
154653
+ style: {
154654
+ width: "100%",
154655
+ height: "100%",
154656
+ display: "flex",
154657
+ alignItems: "center",
154658
+ justifyContent: "center"
154539
154659
  }
154540
- )
154541
- ]
154660
+ }
154661
+ )
154542
154662
  }
154543
154663
  );
154544
154664
  }
@@ -154554,65 +154674,6 @@ const RepoSprite = ({
154554
154674
  }
154555
154675
  );
154556
154676
  };
154557
- const languageColors$1 = {
154558
- TypeScript: 3242182,
154559
- JavaScript: 16244510,
154560
- Python: 3634859,
154561
- Rust: 14591364,
154562
- Go: 44504,
154563
- Java: 11563545,
154564
- "C++": 15944573,
154565
- C: 5592405,
154566
- "C#": 1541632,
154567
- Ruby: 13382701,
154568
- PHP: 5201301,
154569
- Swift: 15749432,
154570
- Kotlin: 11107327,
154571
- Scala: 12725568,
154572
- Elixir: 7228030,
154573
- Haskell: 6180998,
154574
- Clojure: 14374997,
154575
- Shell: 9035857,
154576
- HTML: 14896166,
154577
- CSS: 5651836,
154578
- Vue: 4307075,
154579
- Svelte: 16727552
154580
- };
154581
- function hashStringToColor$1(str2) {
154582
- let hash = 0;
154583
- for (let i2 = 0; i2 < str2.length; i2++) {
154584
- hash = str2.charCodeAt(i2) + ((hash << 5) - hash);
154585
- }
154586
- const h2 = Math.abs(hash % 360);
154587
- const s2 = 30 + Math.abs((hash >> 8) % 30);
154588
- const l2 = 35 + Math.abs((hash >> 16) % 20);
154589
- return hslToHex(h2, s2, l2);
154590
- }
154591
- function hslToHex(h2, s2, l2) {
154592
- s2 /= 100;
154593
- l2 /= 100;
154594
- const a2 = s2 * Math.min(l2, 1 - l2);
154595
- const f2 = (n2) => {
154596
- const k2 = (n2 + h2 / 30) % 12;
154597
- const color2 = l2 - a2 * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1);
154598
- return Math.round(255 * color2);
154599
- };
154600
- return (f2(0) << 16) + (f2(8) << 8) + f2(4);
154601
- }
154602
- function getRepositoryColor$1(repository) {
154603
- var _a;
154604
- if (repository.bookColor) {
154605
- if (repository.bookColor.startsWith("#")) {
154606
- return parseInt(repository.bookColor.slice(1), 16);
154607
- }
154608
- return hashStringToColor$1(repository.bookColor);
154609
- }
154610
- const language2 = (_a = repository.github) == null ? void 0 : _a.primaryLanguage;
154611
- if (language2 && languageColors$1[language2]) {
154612
- return languageColors$1[language2];
154613
- }
154614
- return hashStringToColor$1(repository.name);
154615
- }
154616
154677
  function transformPackages(packages) {
154617
154678
  if (!packages || packages.length === 0) {
154618
154679
  return void 0;
@@ -154643,7 +154704,7 @@ const RepoCard = ({
154643
154704
  }) => {
154644
154705
  var _a, _b, _c, _d, _e2, _f;
154645
154706
  const size = sizeOverride ?? calculateRepositorySize(repository.metrics);
154646
- const color2 = colorOverride ?? getRepositoryColor$1(repository);
154707
+ const color2 = colorOverride ?? getRepositoryColor(repository);
154647
154708
  const packages = transformPackages(repository.packages);
154648
154709
  const spriteProps = {
154649
154710
  size,
@@ -154949,80 +155010,6 @@ function destroySharedApp() {
154949
155010
  isAppDestroyed = true;
154950
155011
  }
154951
155012
  }
154952
- const languageColors = {
154953
- TypeScript: 3242182,
154954
- JavaScript: 16244510,
154955
- Python: 3634859,
154956
- Rust: 14591364,
154957
- Go: 44504,
154958
- Java: 11563545,
154959
- "C++": 15944573,
154960
- C: 5592405,
154961
- "C#": 1541632,
154962
- Ruby: 13382701,
154963
- PHP: 5201301,
154964
- Swift: 15749432,
154965
- Kotlin: 11107327,
154966
- Shell: 9035857,
154967
- HTML: 14896166,
154968
- CSS: 5651836,
154969
- Vue: 4307075,
154970
- Svelte: 16727552
154971
- };
154972
- function hashStringToColor(str2) {
154973
- let hash = 0;
154974
- for (let i2 = 0; i2 < str2.length; i2++) {
154975
- hash = str2.charCodeAt(i2) + ((hash << 5) - hash);
154976
- }
154977
- const h2 = Math.abs(hash % 360);
154978
- const s2 = 30 + Math.abs((hash >> 8) % 30);
154979
- const l2 = 35 + Math.abs((hash >> 16) % 20);
154980
- const sNorm = s2 / 100;
154981
- const lNorm = l2 / 100;
154982
- const a2 = sNorm * Math.min(lNorm, 1 - lNorm);
154983
- const f2 = (n2) => {
154984
- const k2 = (n2 + h2 / 30) % 12;
154985
- const color2 = lNorm - a2 * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1);
154986
- return Math.round(255 * color2);
154987
- };
154988
- return (f2(0) << 16) + (f2(8) << 8) + f2(4);
154989
- }
154990
- function darkenColor(color2, percent) {
154991
- const r2 = Math.max(0, (color2 >> 16 & 255) * (1 - percent));
154992
- const g2 = Math.max(0, (color2 >> 8 & 255) * (1 - percent));
154993
- const b2 = Math.max(0, (color2 & 255) * (1 - percent));
154994
- return `#${Math.round(r2).toString(16).padStart(2, "0")}${Math.round(g2).toString(16).padStart(2, "0")}${Math.round(b2).toString(16).padStart(2, "0")}`;
154995
- }
154996
- function generateCardColors(baseColor) {
154997
- return {
154998
- cardBg: darkenColor(baseColor, 0.6),
154999
- cardBorder: darkenColor(baseColor, 0.7),
155000
- cardHighlight: darkenColor(baseColor, 0.4),
155001
- windowGradient: [
155002
- darkenColor(baseColor, 0.85),
155003
- darkenColor(baseColor, 0.8)
155004
- ],
155005
- panelGradient: [
155006
- darkenColor(baseColor, 0.4),
155007
- darkenColor(baseColor, 0.6)
155008
- ],
155009
- panelBorder: darkenColor(baseColor, 0.3)
155010
- };
155011
- }
155012
- function getRepositoryColor(repository) {
155013
- var _a;
155014
- if (repository.bookColor) {
155015
- if (repository.bookColor.startsWith("#")) {
155016
- return parseInt(repository.bookColor.slice(1), 16);
155017
- }
155018
- return hashStringToColor(repository.bookColor);
155019
- }
155020
- const language2 = (_a = repository.github) == null ? void 0 : _a.primaryLanguage;
155021
- if (language2 && languageColors[language2]) {
155022
- return languageColors[language2];
155023
- }
155024
- return hashStringToColor(repository.name);
155025
- }
155026
155013
  const RepoCardStatic = ({
155027
155014
  repository,
155028
155015
  packages,
@@ -155032,13 +155019,8 @@ const RepoCardStatic = ({
155032
155019
  spriteSize = 160
155033
155020
  }) => {
155034
155021
  var _a, _b, _c, _d, _e2;
155035
- const { theme: theme2 } = useTheme();
155036
155022
  const [spriteDataUrl, setSpriteDataUrl] = useState(null);
155037
155023
  const [isLoading, setIsLoading] = useState(true);
155038
- const license = (_a = repository.github) == null ? void 0 : _a.license;
155039
- const licenseBorder = license ? licenseBorderColors[license] : null;
155040
- const stars = (_b = repository.github) == null ? void 0 : _b.stars;
155041
- const files = (_c = repository.metrics) == null ? void 0 : _c.fileCount;
155042
155024
  const size = calculateRepositorySize(repository.metrics);
155043
155025
  const color2 = getRepositoryColor(repository);
155044
155026
  const colors = generateCardColors(color2);
@@ -155074,336 +155056,54 @@ const RepoCardStatic = ({
155074
155056
  mounted = false;
155075
155057
  };
155076
155058
  }, [size, color2, packages, repository, spriteSize]);
155077
- return /* @__PURE__ */ jsxs(
155059
+ const spriteContent = isLoading ? /* @__PURE__ */ jsx(
155078
155060
  "div",
155079
155061
  {
155080
155062
  style: {
155081
- position: "relative",
155082
- display: "flex",
155083
- flexDirection: "column",
155084
- backgroundColor: colors.cardBg,
155085
- padding: "36px 12px 20px 12px",
155086
- border: `${licenseBorder ? "5px" : "3px"} solid ${licenseBorder || colors.cardBorder}`,
155087
- width,
155088
- height,
155089
- boxSizing: "border-box",
155090
- overflow: "hidden",
155091
- boxShadow: licenseBorder ? `inset 0 0 0 2px ${licenseBorder}40, 0 0 8px ${licenseBorder}60` : `inset 0 0 0 2px ${colors.cardHighlight}`
155092
- },
155093
- children: [
155094
- ((_d = repository.github) == null ? void 0 : _d.owner) && /* @__PURE__ */ jsxs(
155095
- "div",
155096
- {
155097
- style: {
155098
- position: "absolute",
155099
- top: "10px",
155100
- left: "10px",
155101
- display: "flex",
155102
- alignItems: "center",
155103
- gap: "6px",
155104
- zIndex: 10
155105
- },
155106
- children: [
155107
- /* @__PURE__ */ jsx(
155108
- "img",
155109
- {
155110
- src: `https://github.com/${repository.github.owner}.png?size=40`,
155111
- alt: repository.github.owner,
155112
- style: {
155113
- width: "18px",
155114
- height: "18px",
155115
- borderRadius: "50%",
155116
- border: "1px solid rgba(255,255,255,0.3)"
155117
- }
155118
- }
155119
- ),
155120
- /* @__PURE__ */ jsx(
155121
- "span",
155122
- {
155123
- style: {
155124
- fontSize: "12px",
155125
- fontWeight: theme2.fontWeights.medium,
155126
- color: "#e0e0e0",
155127
- textShadow: "0 1px 2px rgba(0,0,0,0.5)",
155128
- fontFamily: theme2.fonts.body,
155129
- maxWidth: "80px",
155130
- overflow: "hidden",
155131
- textOverflow: "ellipsis",
155132
- whiteSpace: "nowrap"
155133
- },
155134
- children: repository.github.owner
155135
- }
155136
- )
155137
- ]
155138
- }
155139
- ),
155140
- stars !== void 0 && stars > 0 && /* @__PURE__ */ jsxs(
155141
- "div",
155142
- {
155143
- style: {
155144
- position: "absolute",
155145
- top: "10px",
155146
- right: "10px",
155147
- display: "flex",
155148
- alignItems: "center",
155149
- gap: "4px",
155150
- zIndex: 10
155151
- },
155152
- children: [
155153
- /* @__PURE__ */ jsx(
155154
- "span",
155155
- {
155156
- style: {
155157
- fontSize: "10px",
155158
- fontWeight: theme2.fontWeights.bold,
155159
- color: "#fbbf24",
155160
- textShadow: "0 1px 2px rgba(0,0,0,0.5)"
155161
- },
155162
- children: "★"
155163
- }
155164
- ),
155165
- /* @__PURE__ */ jsx(
155166
- "span",
155167
- {
155168
- style: {
155169
- fontSize: "16px",
155170
- fontWeight: theme2.fontWeights.bold,
155171
- color: "#ffffff",
155172
- textShadow: "0 1px 2px rgba(0,0,0,0.5)",
155173
- fontFamily: theme2.fonts.body
155174
- },
155175
- children: formatCount(stars)
155176
- }
155177
- )
155178
- ]
155179
- }
155180
- ),
155181
- /* @__PURE__ */ jsxs(
155182
- "div",
155183
- {
155184
- style: {
155185
- flex: 1,
155186
- minHeight: 0,
155187
- position: "relative",
155188
- background: `linear-gradient(180deg, ${colors.windowGradient[0]} 0%, ${colors.windowGradient[1]} 100%)`,
155189
- border: `2px solid ${colors.cardHighlight}`,
155190
- boxShadow: "inset 0 2px 4px rgba(0,0,0,0.3)",
155191
- overflow: "hidden",
155192
- display: "flex",
155193
- alignItems: "center",
155194
- justifyContent: "center"
155195
- },
155196
- children: [
155197
- /* @__PURE__ */ jsx(
155198
- "div",
155199
- {
155200
- style: {
155201
- position: "absolute",
155202
- inset: 0,
155203
- pointerEvents: "none",
155204
- backgroundImage: `
155205
- radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4) 50%, transparent 50%),
155206
- radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.3) 50%, transparent 50%),
155207
- radial-gradient(1px 1px at 40% 10%, rgba(255,255,255,0.35) 50%, transparent 50%),
155208
- radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.25) 50%, transparent 50%),
155209
- radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,0.4) 50%, transparent 50%),
155210
- radial-gradient(1px 1px at 85% 40%, rgba(255,255,255,0.3) 50%, transparent 50%),
155211
- radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,0.35) 50%, transparent 50%),
155212
- radial-gradient(1px 1px at 35% 70%, rgba(255,255,255,0.25) 50%, transparent 50%),
155213
- radial-gradient(1px 1px at 50% 85%, rgba(255,255,255,0.4) 50%, transparent 50%),
155214
- radial-gradient(1px 1px at 65% 60%, rgba(255,255,255,0.3) 50%, transparent 50%),
155215
- radial-gradient(1px 1px at 80% 75%, rgba(255,255,255,0.35) 50%, transparent 50%),
155216
- radial-gradient(1px 1px at 95% 90%, rgba(255,255,255,0.25) 50%, transparent 50%),
155217
- radial-gradient(1.5px 1.5px at 20% 25%, rgba(255,255,255,0.5) 50%, transparent 50%),
155218
- radial-gradient(1.5px 1.5px at 60% 30%, rgba(200,220,255,0.45) 50%, transparent 50%),
155219
- radial-gradient(1.5px 1.5px at 45% 65%, rgba(255,255,255,0.5) 50%, transparent 50%),
155220
- radial-gradient(1.5px 1.5px at 75% 80%, rgba(220,200,255,0.45) 50%, transparent 50%),
155221
- radial-gradient(2px 2px at 30% 50%, rgba(255,255,255,0.6) 50%, transparent 50%),
155222
- radial-gradient(2px 2px at 70% 55%, rgba(200,220,255,0.55) 50%, transparent 50%),
155223
- radial-gradient(2px 2px at 90% 15%, rgba(255,255,255,0.6) 50%, transparent 50%)
155224
- `,
155225
- backgroundSize: "100% 100%"
155226
- }
155227
- }
155228
- ),
155229
- isLoading ? /* @__PURE__ */ jsx(
155230
- "div",
155231
- {
155232
- style: {
155233
- width: spriteSize * 0.5,
155234
- height: spriteSize * 0.5,
155235
- backgroundColor: `${colors.cardHighlight}40`,
155236
- borderRadius: "8px",
155237
- animation: "pulse 1.5s ease-in-out infinite"
155238
- }
155239
- }
155240
- ) : spriteDataUrl ? /* @__PURE__ */ jsx(
155241
- "img",
155242
- {
155243
- src: spriteDataUrl,
155244
- alt: repository.name,
155245
- style: {
155246
- maxWidth: "100%",
155247
- maxHeight: "100%",
155248
- objectFit: "contain"
155249
- }
155250
- }
155251
- ) : /* @__PURE__ */ jsx(
155252
- "div",
155253
- {
155254
- style: {
155255
- width: spriteSize * 0.5,
155256
- height: spriteSize * 0.5,
155257
- backgroundColor: `#${color2.toString(16).padStart(6, "0")}`,
155258
- borderRadius: "8px",
155259
- opacity: 0.5
155260
- }
155261
- }
155262
- )
155263
- ]
155264
- }
155265
- ),
155266
- /* @__PURE__ */ jsxs(
155267
- "div",
155268
- {
155269
- style: {
155270
- marginTop: "12px",
155271
- padding: "8px",
155272
- background: `linear-gradient(180deg, ${colors.panelGradient[0]} 0%, ${colors.panelGradient[1]} 100%)`,
155273
- border: `1px solid ${colors.panelBorder}`,
155274
- flexShrink: 0
155275
- },
155276
- children: [
155277
- /* @__PURE__ */ jsx(
155278
- "div",
155279
- {
155280
- style: {
155281
- fontSize: theme2.fontSizes[2],
155282
- fontWeight: theme2.fontWeights.bold,
155283
- color: "#ffffff",
155284
- marginBottom: "6px",
155285
- fontFamily: theme2.fonts.body,
155286
- whiteSpace: "nowrap",
155287
- overflow: "hidden",
155288
- textOverflow: "ellipsis",
155289
- textShadow: "0 1px 2px rgba(0,0,0,0.3)",
155290
- textAlign: "center"
155291
- },
155292
- title: repository.name,
155293
- children: repository.name
155294
- }
155295
- ),
155296
- /* @__PURE__ */ jsx(
155297
- "div",
155298
- {
155299
- style: {
155300
- display: "flex",
155301
- justifyContent: "center",
155302
- flexWrap: "wrap",
155303
- gap: "10px",
155304
- fontSize: theme2.fontSizes[1],
155305
- color: "#e0e0e0",
155306
- fontFamily: theme2.fonts.body
155307
- },
155308
- children: files !== void 0 && files > 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
155309
- /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "#94a3b8", children: /* @__PURE__ */ jsx(
155310
- "path",
155311
- {
155312
- d: "M3 1h7l3 3v11H3V1zm7 0v3h3M5 8h6M5 11h6",
155313
- stroke: "#94a3b8",
155314
- strokeWidth: "1",
155315
- fill: "none"
155316
- }
155317
- ) }),
155318
- formatCount(files)
155319
- ] })
155320
- }
155321
- ),
155322
- packages && packages.length > 1 && /* @__PURE__ */ jsxs(
155323
- "div",
155324
- {
155325
- style: {
155326
- marginTop: "6px",
155327
- display: "flex",
155328
- flexWrap: "wrap",
155329
- justifyContent: "center",
155330
- gap: "4px"
155331
- },
155332
- children: [
155333
- packages.slice(0, 6).map((pkg, i2) => /* @__PURE__ */ jsx(
155334
- "span",
155335
- {
155336
- style: {
155337
- fontSize: theme2.fontSizes[0],
155338
- color: "#e0e0e0",
155339
- backgroundColor: "rgba(0,0,0,0.2)",
155340
- padding: "2px 6px",
155341
- borderRadius: "3px",
155342
- fontFamily: theme2.fonts.body,
155343
- borderLeft: `2px solid ${typeof pkg.color === "string" ? pkg.color : `#${(pkg.color || 8947848).toString(16).padStart(6, "0")}`}`
155344
- },
155345
- children: pkg.name
155346
- },
155347
- i2
155348
- )),
155349
- packages.length > 6 && /* @__PURE__ */ jsxs(
155350
- "span",
155351
- {
155352
- style: {
155353
- fontSize: theme2.fontSizes[0],
155354
- color: "#a0a0a0",
155355
- fontFamily: theme2.fonts.body
155356
- },
155357
- children: [
155358
- "+",
155359
- packages.length - 6,
155360
- " more"
155361
- ]
155362
- }
155363
- )
155364
- ]
155365
- }
155366
- )
155367
- ]
155368
- }
155369
- ),
155370
- ((_e2 = repository.github) == null ? void 0 : _e2.primaryLanguage) && /* @__PURE__ */ jsx(
155371
- "div",
155372
- {
155373
- style: {
155374
- position: "absolute",
155375
- bottom: "4px",
155376
- left: "8px",
155377
- fontSize: theme2.fontSizes[0],
155378
- fontWeight: theme2.fontWeights.medium,
155379
- color: "#e0e0e0",
155380
- textShadow: "0 1px 1px rgba(0,0,0,0.3)",
155381
- fontFamily: theme2.fonts.body
155382
- },
155383
- children: repository.github.primaryLanguage
155384
- }
155385
- ),
155386
- license && /* @__PURE__ */ jsx(
155387
- "div",
155388
- {
155389
- style: {
155390
- position: "absolute",
155391
- bottom: "-3px",
155392
- right: "-3px",
155393
- backgroundColor: licenseBorder || colors.cardHighlight,
155394
- padding: "3px 10px",
155395
- borderRadius: "3px 0 0 0",
155396
- fontSize: theme2.fontSizes[0],
155397
- fontWeight: theme2.fontWeights.bold,
155398
- color: "#ffffff",
155399
- textShadow: "0 1px 1px rgba(0,0,0,0.3)"
155400
- },
155401
- children: license
155402
- }
155403
- )
155404
- ]
155063
+ width: spriteSize * 0.5,
155064
+ height: spriteSize * 0.5,
155065
+ backgroundColor: `${colors.cardHighlight}40`,
155066
+ borderRadius: "8px",
155067
+ animation: "pulse 1.5s ease-in-out infinite"
155068
+ }
155069
+ }
155070
+ ) : spriteDataUrl ? /* @__PURE__ */ jsx(
155071
+ "img",
155072
+ {
155073
+ src: spriteDataUrl,
155074
+ alt: repository.name,
155075
+ style: {
155076
+ maxWidth: "100%",
155077
+ maxHeight: "100%",
155078
+ objectFit: "contain"
155079
+ }
155080
+ }
155081
+ ) : /* @__PURE__ */ jsx(
155082
+ "div",
155083
+ {
155084
+ style: {
155085
+ width: spriteSize * 0.5,
155086
+ height: spriteSize * 0.5,
155087
+ backgroundColor: `#${color2.toString(16).padStart(6, "0")}`,
155088
+ borderRadius: "8px",
155089
+ opacity: 0.5
155090
+ }
155405
155091
  }
155406
155092
  );
155093
+ return /* @__PURE__ */ jsx("div", { style: { width, height }, children: /* @__PURE__ */ jsx(
155094
+ CardLayout,
155095
+ {
155096
+ color: color2,
155097
+ owner: (_a = repository.github) == null ? void 0 : _a.owner,
155098
+ stars: (_b = repository.github) == null ? void 0 : _b.stars,
155099
+ label: repository.name,
155100
+ files: (_c = repository.metrics) == null ? void 0 : _c.fileCount,
155101
+ language: (_d = repository.github) == null ? void 0 : _d.primaryLanguage,
155102
+ license: (_e2 = repository.github) == null ? void 0 : _e2.license,
155103
+ packages,
155104
+ children: spriteContent
155105
+ }
155106
+ ) });
155407
155107
  };
155408
155108
  const panels = [
155409
155109
  {
@@ -155575,4 +155275,4 @@ export {
155575
155275
  RepoCardStatic as y,
155576
155276
  renderSpriteToDataUrl as z
155577
155277
  };
155578
- //# sourceMappingURL=index-BinFidNv.js.map
155278
+ //# sourceMappingURL=index-BGEfrxLy.js.map