Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@
},
"devDependencies": {
"@tailwindcss/postcss": "^4.2.1",
"@types/react": "^19.2.14",
"autoprefixer": "^10.4.27",
"postcss": "^8.5.6",
"tailwindcss": "^4.2.1",
"typescript": "^5.9.3"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
Comment on lines +47 to +49

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

For a published npm library, is an open-ended React peer dependency like ">=18" recommended, or should the range be capped to explicitly tested majors such as "^18.3.0 || ^19.0.0"? Please include the latest stable React major version in the answer.

💡 Result:

For a published npm library, avoid an open-ended React peer dependency like "react": ">=18" because it will also accept future majors (e.g. React 20) that may introduce breaking changes—so users can end up installing an incompatible React version without any peer warning.

Prefer declaring the broadest range you actually support, but cap it to supported majors, e.g.:

  • If you support React 18 and 19: "react": "^18.0.0 || ^19.0.0" (and same for react-dom)
  • Or equivalently: "react": ">=18 <20"

Only raise the minimum (e.g. ^18.3.0) if you truly require APIs/behavior introduced in that minor.

This aligns with the intent of peer dependencies (declare what you’re compatible with, not just what you happened to test once) and avoids npm v7+ peer-resolution conflicts surprising consumers. (nodejs.org)

Latest stable React major: React 19 (current latest line is 19.2.x; e.g. 19.2.4 was released Jan 26, 2026). (react.dev)

Citations:


Cap the React peer range to tested majors.

>=18 will accept React 20+ without evidence that this library has been validated there. Specify the explicit range of tested majors, such as ^18.0.0 || ^19.0.0 (or >=18 <20).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 47 - 49, Update the peerDependencies range to
limit accepted React majors to the tested ones: replace the open-ended ">=18"
entries under peerDependencies for "react" and "react-dom" with a capped range
such as "^18.0.0 || ^19.0.0" (or equivalently ">=18 <20") so the package only
allows validated major versions; ensure both "react" and "react-dom" entries are
changed consistently in package.json.

}
}
155 changes: 155 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
import type { ReactNode } from "react";

/* =========================
Theme
========================= */

export type Theme = "AOSSIE" | "light" | "dark" | "minimal" | "corporate";

/* =========================================================
Button Variant
========================================================= */

export type ButtonVariant = "solid" | "outline" | "ghost" | "gradient";

/* =========================
IMAGE TYPE
========================= */

export type Image = {
src?: string;
alt?: string;
};

/* =========================
Hero SECTION
========================= */

export type Hero = {
/** Optional Hero background Image */
Image?: Image;

title: string;
description: string;

/** Label like: YOU'RE SPONSORING */
sponsorLabel?: string;
};

/* =========================
PROJECT INFORMATION
========================= */

export type projectInformation = {
name: string;
description: string;
};

/* =========================
ORGANIZATION INFORMATION
========================= */

export type organizationInformation = {
name: string;
description: string;

/** Organization logo */
logo?: Image | string;

projectInformation: projectInformation;
};

/* =========================
SPONSOR TIERS
========================= */

export type Tier = "Platinum" | "Gold" | "Silver" | "Bronze";

/* =========================
SPONSOR CARD
========================= */

export type sponsor = {
name: string;

/** Sponsor logo or avatar */
logo?: string;

/** Sponsor website */
link?: string;

/** Sponsorship tier */
sponsorshipTier?: Tier;
};

/* =========================
CURRENT SPONSORS
========================= */

export type sponsors = sponsor[];

/* =========================
SPONSOR LINKS (CTA)
========================= */

export type sponsorLink = {
name: string;
url: string;
icon?: ReactNode;
className?: string;

/** open link in new tab */
newTab?: boolean;
};

/* =========================
CTA SECTION
========================= */

export type CTASection = {
title: string;
description: string;
sponsorLink: sponsorLink[];
};
Comment thread
coderabbitai[bot] marked this conversation as resolved.

/* =========================
BACKGROUND PATTERNS
========================= */

export type Pattern = "dots" | "grid" | "stripes" | "none";

/* =========================
SUPPORT US COMPO PROPS
========================= */

export interface supportUsButtonProps {
// Theme for the button, can be one of "AOSSIE", "light", "dark", "minimal", or "corporate"
Theme?: Theme;

// Optional background pattern for the button, can be one of "dots", "grid", "stripes", or "none"
pattern?: Pattern;

// Information about the Hero section, including title, description, sponsor label, and optional background Image
hero: Hero;

// Information about the organization, including name, description, logo, and project information
organizationInformation: organizationInformation;

// List of current sponsors, each with name, optional logo, link, and sponsorship tier
sponsors: sponsors;

// Information about the call-to-action section, including title, description, and sponsor links
ctaSection: CTASection;

// Optional class name for custom styling
classNames?: {
container?: string;
Hero?: string;
organizationInformation?: string;
sponsors?: string;
ctaSection?: string;
};

// Optional button variant for styling the call-to-action buttons
buttonVariant?: ButtonVariant;
}
Loading