@agentiffai/design 1.3.13 → 1.3.14

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
@@ -5466,6 +5466,7 @@ var Input2 = ({
5466
5466
  };
5467
5467
  function parseMarkdown(text) {
5468
5468
  if (!text) return [];
5469
+ text = text.replace(/<!--TOOL_CALL:[^>]*-->/g, "").replace(/__TOOL_CALL__:[^:]+:\{[^}]*(?:\{[^}]*\}[^}]*)*\}/g, "");
5469
5470
  const elements = [];
5470
5471
  let key = 0;
5471
5472
  const paragraphs = text.split(/\n\n+/);
@@ -9234,9 +9235,15 @@ function getSubredditColor(subreddit) {
9234
9235
  return SUBREDDIT_COLORS[lower] || REDDIT_COLORS.orange;
9235
9236
  }
9236
9237
  function formatRelativeTime(timestamp) {
9237
- if (!timestamp) return "unknown";
9238
+ if (!timestamp && timestamp !== 0) return "unknown";
9238
9239
  const now = /* @__PURE__ */ new Date();
9239
- const date = new Date(timestamp);
9240
+ let date;
9241
+ const numericVal = typeof timestamp === "number" ? timestamp : Number(timestamp);
9242
+ if (!Number.isNaN(numericVal) && numericVal > 0) {
9243
+ date = new Date(numericVal < 1e12 ? numericVal * 1e3 : numericVal);
9244
+ } else {
9245
+ date = new Date(timestamp);
9246
+ }
9240
9247
  if (Number.isNaN(date.getTime())) return "unknown";
9241
9248
  const diffMs = now.getTime() - date.getTime();
9242
9249
  const diffMins = Math.floor(diffMs / 6e4);
@@ -9373,7 +9380,7 @@ var RedditOpportunityCard = ({
9373
9380
  !condensed && opportunity.postContent && /* @__PURE__ */ jsxRuntime.jsx(PostContent2, { children: truncateText(opportunity.postContent, 300) }),
9374
9381
  /* @__PURE__ */ jsxRuntime.jsxs(PostAuthor, { children: [
9375
9382
  "Posted by u/",
9376
- opportunity.postAuthor,
9383
+ opportunity.postAuthor || "unknown",
9377
9384
  opportunity.flair && /* @__PURE__ */ jsxRuntime.jsx(PostFlair, { children: opportunity.flair })
9378
9385
  ] })
9379
9386
  ] }),
@@ -9399,13 +9406,13 @@ var RedditOpportunityCard = ({
9399
9406
  autoFocus: true
9400
9407
  }
9401
9408
  ) : /* @__PURE__ */ jsxRuntime.jsx(ReplyContent, { children: displayContent }),
9402
- /* @__PURE__ */ jsxRuntime.jsxs(StrategyHint, { children: [
9409
+ opportunity.strategy ? /* @__PURE__ */ jsxRuntime.jsxs(StrategyHint, { children: [
9403
9410
  /* @__PURE__ */ jsxRuntime.jsx(StrategyIconImg, { src: "/assets/icon-set/Icon-lightbulb-fill.svg", alt: "" }),
9404
9411
  /* @__PURE__ */ jsxRuntime.jsxs(StrategyText, { children: [
9405
9412
  "Strategy: ",
9406
9413
  opportunity.strategy
9407
9414
  ] })
9408
- ] }),
9415
+ ] }) : null,
9409
9416
  /* @__PURE__ */ jsxRuntime.jsx(ProgressBarContainer2, { children: /* @__PURE__ */ jsxRuntime.jsx(ProgressBarTrack2, { children: /* @__PURE__ */ jsxRuntime.jsx(
9410
9417
  ProgressBarFill3,
9411
9418
  {