@industry-theme/repository-composition-panels 0.7.38 → 0.7.40

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-CriXnjlQ.js";
2
- import "./init-Boz-hDuw.js";
1
+ import { e as extensions, A as AccessibilitySystem, C as Container, b as accessibilityTarget, E as EventSystem, c as FederatedContainer } from "./index-jcN279py.js";
2
+ import "./init-BGSnppxz.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-DSoZR12x.js.map
7
+ //# sourceMappingURL=browserAll-DpnGruKP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browserAll-DSoZR12x.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-DpnGruKP.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-DSoZR12x.js");
106217
+ await import("./browserAll-DpnGruKP.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-CvGxK488.js");
106228
+ await import("./webworkerAll-CdPNP56B.js");
106229
106229
  }
106230
106230
  };
106231
106231
  class ObservablePoint {
@@ -154047,7 +154047,35 @@ const getStarColor = (count2) => {
154047
154047
  if (count2 >= 1e5) return "#ffd700";
154048
154048
  if (count2 >= 1e4) return "#c0c0c0";
154049
154049
  if (count2 >= 5e3) return "#cd7f32";
154050
- return "#9ca3af";
154050
+ return "#f97316";
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 = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
154078
+ return `Est. ${months[date.getMonth()]} ${date.getFullYear()}`;
154051
154079
  };
154052
154080
  const STARFIELD_BACKGROUND = `
154053
154081
  radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4) 50%, transparent 50%),
@@ -154144,6 +154172,7 @@ const CardLayout = ({
154144
154172
  license,
154145
154173
  packages,
154146
154174
  namePlateStyle = "beveled",
154175
+ createdAt,
154147
154176
  children: children2
154148
154177
  }) => {
154149
154178
  const { theme: theme2 } = useTheme();
@@ -154504,7 +154533,28 @@ const CardLayout = ({
154504
154533
  ]
154505
154534
  }
154506
154535
  ),
154507
- language2 && /* @__PURE__ */ jsx(
154536
+ createdAt ? (() => {
154537
+ const badgeColors = getAgeBadgeColors(createdAt);
154538
+ return /* @__PURE__ */ jsx(
154539
+ "div",
154540
+ {
154541
+ style: {
154542
+ position: "absolute",
154543
+ bottom: "0",
154544
+ left: "0",
154545
+ backgroundColor: badgeColors.bg,
154546
+ padding: "3px 10px",
154547
+ borderRadius: "0 10px 0 10px",
154548
+ fontFamily: theme2.fonts.body,
154549
+ fontSize: theme2.fontSizes[0],
154550
+ fontWeight: theme2.fontWeights.bold,
154551
+ color: badgeColors.text,
154552
+ textShadow: badgeColors.text === "#ffffff" ? "0 1px 1px rgba(0,0,0,0.3)" : "none"
154553
+ },
154554
+ children: formatCreatedDate(createdAt)
154555
+ }
154556
+ );
154557
+ })() : language2 ? /* @__PURE__ */ jsx(
154508
154558
  "div",
154509
154559
  {
154510
154560
  style: {
@@ -154519,7 +154569,7 @@ const CardLayout = ({
154519
154569
  },
154520
154570
  children: language2
154521
154571
  }
154522
- ),
154572
+ ) : null,
154523
154573
  license && /* @__PURE__ */ jsx(
154524
154574
  "div",
154525
154575
  {
@@ -155554,6 +155604,7 @@ const RepoSprite = ({
155554
155604
  label,
155555
155605
  owner,
155556
155606
  language: language2,
155607
+ createdAt,
155557
155608
  variant = "default",
155558
155609
  cardTheme = "blue",
155559
155610
  width = 200,
@@ -155754,6 +155805,7 @@ const RepoSprite = ({
155754
155805
  language: language2,
155755
155806
  license,
155756
155807
  packages,
155808
+ createdAt,
155757
155809
  children: /* @__PURE__ */ jsx(
155758
155810
  "div",
155759
155811
  {
@@ -155810,7 +155862,7 @@ const RepoCard = ({
155810
155862
  onPackageHover,
155811
155863
  onPackageHoverEnd
155812
155864
  }) => {
155813
- var _a, _b, _c, _d, _e2, _f;
155865
+ var _a, _b, _c, _d, _e2, _f, _g;
155814
155866
  const size = sizeOverride ?? calculateRepositorySize(repository.metrics);
155815
155867
  const color2 = colorOverride ?? getRepositoryColor(repository);
155816
155868
  const packages = transformPackages(repository.packages);
@@ -155825,6 +155877,7 @@ const RepoCard = ({
155825
155877
  label: repository.name,
155826
155878
  owner: (_e2 = repository.github) == null ? void 0 : _e2.owner,
155827
155879
  language: (_f = repository.github) == null ? void 0 : _f.primaryLanguage,
155880
+ createdAt: (_g = repository.github) == null ? void 0 : _g.createdAt,
155828
155881
  variant,
155829
155882
  cardTheme,
155830
155883
  width,
@@ -155846,7 +155899,7 @@ const RepoCardStatic = ({
155846
155899
  height = 280,
155847
155900
  spriteSize = 160
155848
155901
  }) => {
155849
- var _a, _b, _c, _d, _e2, _f;
155902
+ var _a, _b, _c, _d, _e2, _f, _g;
155850
155903
  const [spriteDataUrl, setSpriteDataUrl] = useState(null);
155851
155904
  const [isLoading, setIsLoading] = useState(true);
155852
155905
  const size = calculateRepositorySize(repository.metrics);
@@ -155930,6 +155983,7 @@ const RepoCardStatic = ({
155930
155983
  language: (_e2 = repository.github) == null ? void 0 : _e2.primaryLanguage,
155931
155984
  license: (_f = repository.github) == null ? void 0 : _f.license,
155932
155985
  packages,
155986
+ createdAt: (_g = repository.github) == null ? void 0 : _g.createdAt,
155933
155987
  children: spriteContent
155934
155988
  }
155935
155989
  ) });
@@ -156127,4 +156181,4 @@ export {
156127
156181
  RepoCardStatic as y,
156128
156182
  CardBack as z
156129
156183
  };
156130
- //# sourceMappingURL=index-CriXnjlQ.js.map
156184
+ //# sourceMappingURL=index-jcN279py.js.map