@industry-theme/repository-composition-panels 0.7.39 → 0.7.41

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.
@@ -1,7 +1,7 @@
1
- import { e as extensions, A as AccessibilitySystem, C as Container, b as accessibilityTarget, E as EventSystem, c as FederatedContainer } from "./index-B_C6nP2H.js";
2
- import "./init-D4a2aDAJ.js";
1
+ import { e as extensions, A as AccessibilitySystem, C as Container, b as accessibilityTarget, E as EventSystem, c as FederatedContainer } from "./index-CcQcyw9s.js";
2
+ import "./init-B0wNaGcQ.js";
3
3
  extensions.add(AccessibilitySystem);
4
4
  extensions.mixin(Container, accessibilityTarget);
5
5
  extensions.add(EventSystem);
6
6
  extensions.mixin(Container, FederatedContainer);
7
- //# sourceMappingURL=browserAll-BEVDrdRp.js.map
7
+ //# sourceMappingURL=browserAll-UOQ6Uhl5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browserAll-BEVDrdRp.js","sources":["../node_modules/pixi.js/lib/accessibility/init.mjs","../node_modules/pixi.js/lib/events/init.mjs"],"sourcesContent":["import { extensions } from '../extensions/Extensions.mjs';\nimport { Container } from '../scene/container/Container.mjs';\nimport { AccessibilitySystem } from './AccessibilitySystem.mjs';\nimport { accessibilityTarget } from './accessibilityTarget.mjs';\n\n\"use strict\";\nextensions.add(AccessibilitySystem);\nextensions.mixin(Container, accessibilityTarget);\n//# sourceMappingURL=init.mjs.map\n","import { extensions } from '../extensions/Extensions.mjs';\nimport { Container } from '../scene/container/Container.mjs';\nimport { EventSystem } from './EventSystem.mjs';\nimport { FederatedContainer } from './FederatedEventTarget.mjs';\n\n\"use strict\";\nextensions.add(EventSystem);\nextensions.mixin(Container, FederatedContainer);\n//# sourceMappingURL=init.mjs.map\n"],"names":[],"mappings":";;AAMA,WAAW,IAAI,mBAAmB;AAClC,WAAW,MAAM,WAAW,mBAAmB;ACD/C,WAAW,IAAI,WAAW;AAC1B,WAAW,MAAM,WAAW,kBAAkB;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"browserAll-UOQ6Uhl5.js","sources":["../node_modules/pixi.js/lib/accessibility/init.mjs","../node_modules/pixi.js/lib/events/init.mjs"],"sourcesContent":["import { extensions } from '../extensions/Extensions.mjs';\nimport { Container } from '../scene/container/Container.mjs';\nimport { AccessibilitySystem } from './AccessibilitySystem.mjs';\nimport { accessibilityTarget } from './accessibilityTarget.mjs';\n\n\"use strict\";\nextensions.add(AccessibilitySystem);\nextensions.mixin(Container, accessibilityTarget);\n//# sourceMappingURL=init.mjs.map\n","import { extensions } from '../extensions/Extensions.mjs';\nimport { Container } from '../scene/container/Container.mjs';\nimport { EventSystem } from './EventSystem.mjs';\nimport { FederatedContainer } from './FederatedEventTarget.mjs';\n\n\"use strict\";\nextensions.add(EventSystem);\nextensions.mixin(Container, FederatedContainer);\n//# sourceMappingURL=init.mjs.map\n"],"names":[],"mappings":";;AAMA,WAAW,IAAI,mBAAmB;AAClC,WAAW,MAAM,WAAW,mBAAmB;ACD/C,WAAW,IAAI,WAAW;AAC1B,WAAW,MAAM,WAAW,kBAAkB;","x_google_ignoreList":[0,1]}
@@ -106214,7 +106214,7 @@ const browserExt = {
106214
106214
  },
106215
106215
  test: () => true,
106216
106216
  load: async () => {
106217
- await import("./browserAll-BEVDrdRp.js");
106217
+ await import("./browserAll-UOQ6Uhl5.js");
106218
106218
  }
106219
106219
  };
106220
106220
  const webworkerExt = {
@@ -106225,7 +106225,7 @@ const webworkerExt = {
106225
106225
  },
106226
106226
  test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
106227
106227
  load: async () => {
106228
- await import("./webworkerAll-RaJ1XtNz.js");
106228
+ await import("./webworkerAll-BMTgBliX.js");
106229
106229
  }
106230
106230
  };
106231
106231
  class ObservablePoint {
@@ -154049,6 +154049,47 @@ const getStarColor = (count2) => {
154049
154049
  if (count2 >= 5e3) return "#cd7f32";
154050
154050
  return "#f97316";
154051
154051
  };
154052
+ const getAgeBadgeColors = (isoDate) => {
154053
+ const date = new Date(isoDate);
154054
+ const now2 = /* @__PURE__ */ new Date();
154055
+ const diffYears = (now2.getTime() - date.getTime()) / (1e3 * 60 * 60 * 24 * 365);
154056
+ if (diffYears < 1) return { bg: "#22c55e", text: "#ffffff" };
154057
+ if (diffYears < 5) return { bg: "#cd7f32", text: "#ffffff" };
154058
+ if (diffYears < 10) return { bg: "#a8a9ad", text: "#1a1a1a" };
154059
+ return { bg: "#ffd700", text: "#1a1a1a" };
154060
+ };
154061
+ const formatCreatedDate = (isoDate) => {
154062
+ const date = new Date(isoDate);
154063
+ const now2 = /* @__PURE__ */ new Date();
154064
+ const diffMs = now2.getTime() - date.getTime();
154065
+ const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
154066
+ if (diffDays < 365) {
154067
+ if (diffDays < 7) {
154068
+ return `Est. ${diffDays}d ago`;
154069
+ } else if (diffDays < 30) {
154070
+ const weeks = Math.floor(diffDays / 7);
154071
+ return `Est. ${weeks}w ago`;
154072
+ } else {
154073
+ const months2 = Math.floor(diffDays / 30);
154074
+ return `Est. ${months2}mo ago`;
154075
+ }
154076
+ }
154077
+ const months = [
154078
+ "Jan",
154079
+ "Feb",
154080
+ "Mar",
154081
+ "Apr",
154082
+ "May",
154083
+ "Jun",
154084
+ "Jul",
154085
+ "Aug",
154086
+ "Sep",
154087
+ "Oct",
154088
+ "Nov",
154089
+ "Dec"
154090
+ ];
154091
+ return `Est. ${months[date.getMonth()]} ${date.getFullYear()}`;
154092
+ };
154052
154093
  const STARFIELD_BACKGROUND = `
154053
154094
  radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4) 50%, transparent 50%),
154054
154095
  radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.3) 50%, transparent 50%),
@@ -154144,6 +154185,7 @@ const CardLayout = ({
154144
154185
  license,
154145
154186
  packages,
154146
154187
  namePlateStyle = "beveled",
154188
+ createdAt,
154147
154189
  children: children2
154148
154190
  }) => {
154149
154191
  const { theme: theme2 } = useTheme();
@@ -154504,7 +154546,28 @@ const CardLayout = ({
154504
154546
  ]
154505
154547
  }
154506
154548
  ),
154507
- language2 && /* @__PURE__ */ jsx(
154549
+ createdAt ? (() => {
154550
+ const badgeColors = getAgeBadgeColors(createdAt);
154551
+ return /* @__PURE__ */ jsx(
154552
+ "div",
154553
+ {
154554
+ style: {
154555
+ position: "absolute",
154556
+ bottom: "0",
154557
+ left: "0",
154558
+ backgroundColor: badgeColors.bg,
154559
+ padding: "3px 10px",
154560
+ borderRadius: "0 10px 0 10px",
154561
+ fontFamily: theme2.fonts.body,
154562
+ fontSize: theme2.fontSizes[0],
154563
+ fontWeight: theme2.fontWeights.bold,
154564
+ color: badgeColors.text,
154565
+ textShadow: badgeColors.text === "#ffffff" ? "0 1px 1px rgba(0,0,0,0.3)" : "none"
154566
+ },
154567
+ children: formatCreatedDate(createdAt)
154568
+ }
154569
+ );
154570
+ })() : language2 ? /* @__PURE__ */ jsx(
154508
154571
  "div",
154509
154572
  {
154510
154573
  style: {
@@ -154519,7 +154582,7 @@ const CardLayout = ({
154519
154582
  },
154520
154583
  children: language2
154521
154584
  }
154522
- ),
154585
+ ) : null,
154523
154586
  license && /* @__PURE__ */ jsx(
154524
154587
  "div",
154525
154588
  {
@@ -155554,6 +155617,7 @@ const RepoSprite = ({
155554
155617
  label,
155555
155618
  owner,
155556
155619
  language: language2,
155620
+ createdAt,
155557
155621
  variant = "default",
155558
155622
  cardTheme = "blue",
155559
155623
  width = 200,
@@ -155754,6 +155818,7 @@ const RepoSprite = ({
155754
155818
  language: language2,
155755
155819
  license,
155756
155820
  packages,
155821
+ createdAt,
155757
155822
  children: /* @__PURE__ */ jsx(
155758
155823
  "div",
155759
155824
  {
@@ -155810,7 +155875,7 @@ const RepoCard = ({
155810
155875
  onPackageHover,
155811
155876
  onPackageHoverEnd
155812
155877
  }) => {
155813
- var _a, _b, _c, _d, _e2, _f;
155878
+ var _a, _b, _c, _d, _e2, _f, _g;
155814
155879
  const size = sizeOverride ?? calculateRepositorySize(repository.metrics);
155815
155880
  const color2 = colorOverride ?? getRepositoryColor(repository);
155816
155881
  const packages = transformPackages(repository.packages);
@@ -155825,6 +155890,7 @@ const RepoCard = ({
155825
155890
  label: repository.name,
155826
155891
  owner: (_e2 = repository.github) == null ? void 0 : _e2.owner,
155827
155892
  language: (_f = repository.github) == null ? void 0 : _f.primaryLanguage,
155893
+ createdAt: (_g = repository.github) == null ? void 0 : _g.createdAt,
155828
155894
  variant,
155829
155895
  cardTheme,
155830
155896
  width,
@@ -155846,7 +155912,7 @@ const RepoCardStatic = ({
155846
155912
  height = 280,
155847
155913
  spriteSize = 160
155848
155914
  }) => {
155849
- var _a, _b, _c, _d, _e2, _f;
155915
+ var _a, _b, _c, _d, _e2, _f, _g;
155850
155916
  const [spriteDataUrl, setSpriteDataUrl] = useState(null);
155851
155917
  const [isLoading, setIsLoading] = useState(true);
155852
155918
  const size = calculateRepositorySize(repository.metrics);
@@ -155930,6 +155996,7 @@ const RepoCardStatic = ({
155930
155996
  language: (_e2 = repository.github) == null ? void 0 : _e2.primaryLanguage,
155931
155997
  license: (_f = repository.github) == null ? void 0 : _f.license,
155932
155998
  packages,
155999
+ createdAt: (_g = repository.github) == null ? void 0 : _g.createdAt,
155933
156000
  children: spriteContent
155934
156001
  }
155935
156002
  ) });
@@ -156127,4 +156194,4 @@ export {
156127
156194
  RepoCardStatic as y,
156128
156195
  CardBack as z
156129
156196
  };
156130
- //# sourceMappingURL=index-B_C6nP2H.js.map
156197
+ //# sourceMappingURL=index-CcQcyw9s.js.map