diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 229990d4..e2eda8a3 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -4,7 +4,7 @@ github: [jbetancur] # patreon: # Replace with a single Patreon username open_collective: react-data-table-component # ko_fi: # Replace with a single Ko-fi username -# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +tidelift: npm/react-data-table-component # community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry # liberapay: # Replace with a single Liberapay username # issuehunt: # Replace with a single IssueHunt username diff --git a/CLAUDE.md b/CLAUDE.md index b2839229..5fce620a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -95,6 +95,33 @@ Rules: --- +## Sponsors and backers + +Tier definitions must stay in sync across three places: + +1. `README.md` tier table (canonical wording for perks and pricing). +2. `apps/docs/src/pages/support.astro` tier cards, including the `ocSlug` Open Collective checkout links. +3. The GitHub Sponsors and Open Collective dashboards. These are manual and John-only: never assume they changed, and remind John to update them whenever tiers change. + +Open Collective slugs survive tier renames, so they may not match the tier name (Supporter uses `backer-14044`, Backer uses `sponsor-14045`). Verify live tiers by fetching `https://opencollective.com/react-data-table-component`. + +**Adding a backer (Backer tier, $20/mo recurring, and above):** + +- Add to the `backers` array at the top of `support.astro` and to the `## Backers` list in `README.md`. +- Recurring sponsors only. One-time donors never go in these lists, regardless of amount. +- Link only their Open Collective or GitHub profile, verified against the collective's contributor list. Never guess personal sites or emails. + +**Adding a logo sponsor:** + +- Bronze ($100): small logo in the docs footer (`apps/docs/src/layouts/Layout.astro`) + small logo in README. +- Silver ($200): medium logo in the docs sidebar (`apps/docs/src/layouts/DocsLayout.astro`) + logo in README. +- Gold ($500): homepage sponsors section (`apps/docs/src/pages/index.astro`, replace the "Be the first to sponsor" placeholder) + top placement in README. Limited to 3. +- Logos are curated by hand: get the asset and target URL from John, never source logos yourself. + +The contact email is `sponsors@reactdatatable.com` (Cloudflare Email Routing alias). It must never appear in static HTML; on the site it is assembled client-side from `data-user`/`data-domain` attributes (see the contact block in `support.astro`). + +--- + ## Release process Releases are triggered manually via the **Release** GitHub Actions workflow (`workflow_dispatch`). Before triggering: diff --git a/README.md b/README.md index 1134e2fa..783e794f 100644 --- a/README.md +++ b/README.md @@ -51,14 +51,22 @@ Sponsoring puts your company logo in front of ~215k developers a week: in the RE | Tier | Price/month | Perk | | --- | --- | --- | | ☕ Supporter | $5 | Your name in the README supporters list | -| 🎗 Backer | $20 | Name + link in README | +| 🎗 Backer | $20 | Name + link in README + listed in the Backers section on reactdatatable.com | | 🥉 Bronze | $100 | Priority issue triage + small logo in README + docs site footer | | 🥈 Silver | $200 | Priority issue triage + medium logo in README + docs site sidebar | -| 🥇 Gold | $500 | Priority issue triage + large logo in README + hero spot on reactdatatable.com. Limited to 3. | +| 🥇 Gold | $500 | Priority issue triage + direct maintainer line + large logo in README + hero spot on reactdatatable.com. Limited to 3. | [![Sponsor on GitHub Sponsors](https://img.shields.io/badge/Sponsor-GitHub%20Sponsors-ea4aaa?logo=github)](https://github.com/sponsors/jbetancur) [![Sponsor on OpenCollective](https://img.shields.io/badge/Sponsor-OpenCollective-blue?logo=opencollective)](https://opencollective.com/react-data-table-component) +## Enterprise support + +Available as part of the Tidelift Subscription. + +The maintainer of react-data-table-component and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-react-data-table-component?utm_source=npm-react-data-table-component&utm_medium=referral&utm_campaign=readme) + + + ## Need help? Open a [GitHub issue](https://github.com/jbetancur/react-data-table-component/issues). Priority support is available for teams that [sponsor the project](https://github.com/sponsors/jbetancur). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..e1ff0a3b --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +## Supported versions + +| Version | Supported | +| ------- | --------- | +| 8.x | Yes | +| < 8.0 | No | + +## Reporting a vulnerability + +Please do not open a public issue for security reports. + +Report vulnerabilities privately using one of: + +1. **GitHub private vulnerability reporting** (preferred): use the [Report a vulnerability](https://github.com/jbetancur/react-data-table-component/security/advisories/new) form on this repository. +2. **Email**: + +You will receive an acknowledgment within 5 business days. Once the report is validated, a fix will be prioritized and released as a patch to the current major version, followed by a coordinated disclosure through a GitHub Security Advisory crediting the reporter. + +## Scope + +react-data-table-component is a client-side UI library. Reports most likely to qualify: XSS via table data or props, prototype pollution, and supply-chain issues in the published npm package. The library has zero runtime dependencies, which keeps the supply-chain surface small. diff --git a/apps/docs/public/llms.txt b/apps/docs/public/llms.txt new file mode 100644 index 00000000..287e5326 --- /dev/null +++ b/apps/docs/public/llms.txt @@ -0,0 +1,85 @@ +# react-data-table-component + +> A fast, accessible React data table component with sorting, pagination, row selection, expandable rows, column filtering, and theming built in. Zero runtime dependencies, Apache-2.0 licensed, free with no paid tier. A working table takes about 10 lines of code. + +Install: `npm install react-data-table-component` + +Minimal usage: + +```tsx +import DataTable from 'react-data-table-component'; + +const columns = [ + { name: 'Name', selector: row => row.name, sortable: true }, + { name: 'Role', selector: row => row.role }, +]; + + +``` + +## Getting started + +- [Getting Started](https://reactdatatable.com/docs/getting-started): install and render a first table +- [Installation](https://reactdatatable.com/docs/installation): package managers, CSS import, framework setup +- [API Reference](https://reactdatatable.com/docs/api): all props and types +- [Migration Guide](https://reactdatatable.com/docs/migration): upgrading from v7 to v8 + +## Columns + +- [Columns Overview](https://reactdatatable.com/docs/columns): defining columns, selectors, formatting +- [Cell Rendering](https://reactdatatable.com/docs/cells): custom cell components +- [Column Groups](https://reactdatatable.com/docs/column-groups): spanning headers across columns +- [Column Visibility](https://reactdatatable.com/docs/column-visibility): show and hide columns +- [Column Reordering](https://reactdatatable.com/docs/column-reorder): drag to reorder +- [Column Resizing](https://reactdatatable.com/docs/resizable): drag column edges, persist widths +- [Column Pinning](https://reactdatatable.com/docs/column-pinning): pin columns left or right +- [Column Filtering](https://reactdatatable.com/docs/filtering): per-column text, number, and select filters +- [Sorting](https://reactdatatable.com/docs/sorting): client-side and server-side sorting + +## Rows + +- [Row Selection](https://reactdatatable.com/docs/selection): checkbox multi-select, select all, controlled selection +- [Expandable Rows](https://reactdatatable.com/docs/expandable): detail panels with any component +- [Row Interactions](https://reactdatatable.com/docs/row-interactions): click, double-click, hover handlers +- [Row Pinning](https://reactdatatable.com/docs/row-pinning): pin rows to top +- [Pagination](https://reactdatatable.com/docs/pagination): built-in and custom pagination, server-side +- [Conditional Styles](https://reactdatatable.com/docs/conditional-styles): style rows and cells by data +- [Fixed Header](https://reactdatatable.com/docs/fixed-header): sticky header with scrollable body +- [Footer](https://reactdatatable.com/docs/footer): summary and pagination footers +- [Loading State](https://reactdatatable.com/docs/loading): progress and skeleton states +- [Inline Editing](https://reactdatatable.com/docs/inline-editing): edit cells in place + +## Styling + +- [Themes](https://reactdatatable.com/docs/themes): 5 built-in themes with dark mode, createTheme() +- [Custom Styles](https://reactdatatable.com/docs/custom-styles): style every table region + +## Advanced + +- [TypeScript](https://reactdatatable.com/docs/typescript): generic column and row typing +- [SSR](https://reactdatatable.com/docs/ssr): Next.js App Router, Remix, Astro +- [Performance](https://reactdatatable.com/docs/performance): large datasets, memoization +- [Headless Hooks](https://reactdatatable.com/docs/headless): use the logic without the UI +- [Accessibility](https://reactdatatable.com/docs/accessibility): keyboard and screen reader support +- [Localization](https://reactdatatable.com/docs/localization): translated labels and locales +- [RTL Support](https://reactdatatable.com/docs/rtl): right-to-left layouts +- [Mobile](https://reactdatatable.com/docs/mobile): responsive columns and layouts +- [Export](https://reactdatatable.com/docs/export): CSV and JSON export +- [Animations](https://reactdatatable.com/docs/animations): row animations + +## Recipes + +- [Server-side sort & filter](https://reactdatatable.com/docs/recipes/server-side) +- [Approval workflow with bulk actions](https://reactdatatable.com/docs/recipes/bulk-action-toolbar) +- [URL-synced table state](https://reactdatatable.com/docs/recipes/editable-grid) +- [Dashboard drill-down](https://reactdatatable.com/docs/recipes/master-detail) +- [Audit log viewer](https://reactdatatable.com/docs/recipes/sticky-footer) +- [Persist column widths](https://reactdatatable.com/docs/recipes/persist-column-widths) +- [Inline row actions](https://reactdatatable.com/docs/recipes/row-grouping) + +## Optional + +- [Changelog](https://reactdatatable.com/docs/changelog): release history +- [Support & Sponsorship](https://reactdatatable.com/support): sponsor tiers, enterprise support via Tidelift +- [GitHub repository](https://github.com/jbetancur/react-data-table-component) +- [npm package](https://www.npmjs.com/package/react-data-table-component) diff --git a/apps/docs/public/og-image.png b/apps/docs/public/og-image.png new file mode 100644 index 00000000..8b33c403 Binary files /dev/null and b/apps/docs/public/og-image.png differ diff --git a/apps/docs/src/layouts/DocsLayout.astro b/apps/docs/src/layouts/DocsLayout.astro index adafaf6d..9320c4d1 100644 --- a/apps/docs/src/layouts/DocsLayout.astro +++ b/apps/docs/src/layouts/DocsLayout.astro @@ -16,6 +16,7 @@ const nav = [ links: [ { label: 'Getting Started', href: '/docs/getting-started' }, { label: 'Installation', href: '/docs/installation' }, + { label: 'Comparisons', href: '/docs/comparisons' }, { label: 'Changelog', href: '/docs/changelog' }, ], }, @@ -135,9 +136,7 @@ const nextLink = currentIndex < allLinks.length - 1 ? allLinks[currentIndex + 1]
diff --git a/apps/docs/src/layouts/Layout.astro b/apps/docs/src/layouts/Layout.astro index 507d1800..da9b70c7 100644 --- a/apps/docs/src/layouts/Layout.astro +++ b/apps/docs/src/layouts/Layout.astro @@ -10,6 +10,24 @@ const { title = 'react-data-table-component', description = 'A fast, feature-rich React data table. Working table in 10 lines.', } = Astro.props; + +const jsonLd = JSON.stringify({ + '@context': 'https://schema.org', + '@type': 'SoftwareApplication', + name: 'react-data-table-component', + description: + 'A fast, accessible React data table component with sorting, pagination, row selection, expandable rows, column filtering, and theming built in. Zero runtime dependencies.', + url: 'https://reactdatatable.com', + applicationCategory: 'DeveloperApplication', + operatingSystem: 'Any', + license: 'https://www.apache.org/licenses/LICENSE-2.0', + offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' }, + softwareHelp: { '@type': 'CreativeWork', url: 'https://reactdatatable.com/docs' }, + downloadUrl: 'https://www.npmjs.com/package/react-data-table-component', + codeRepository: 'https://github.com/jbetancur/react-data-table-component', + programmingLanguage: 'TypeScript', + author: { '@type': 'Person', name: 'John Betancur', url: 'https://github.com/jbetancur' }, +}); --- @@ -30,6 +48,7 @@ const { + diff --git a/package.json b/package.json index defa1a32..c08c26e3 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,20 @@ "name": "react-data-table-component", "version": "8.4.2", "description": "A fast, feature-rich React data table. Working table in 10 lines.", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jbetancur" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/react-data-table-component" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/react-data-table-component" + } + ], "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts",