Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec3c3906f7 | ||
|
|
eb3c04d059 | ||
|
|
796dad298f | ||
|
|
3f4a337c5d | ||
|
|
47ad47f321 |
@@ -3,7 +3,7 @@
|
||||
.next
|
||||
.obsidian
|
||||
.now
|
||||
.idea
|
||||
.cache
|
||||
.env
|
||||
node_modules
|
||||
dist
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"colebemis",
|
||||
"ericfennis",
|
||||
"karsa-mistmere"
|
||||
],
|
||||
"use-cases": [
|
||||
"Confirming a saved payment card is valid",
|
||||
"Indicating an approved card payment during checkout",
|
||||
"Verifying a payment method in billing settings",
|
||||
"Showing successful card authorization in banking apps"
|
||||
],
|
||||
"tags": [
|
||||
"debit",
|
||||
"payment",
|
||||
"banking",
|
||||
"finance",
|
||||
"transaction",
|
||||
"wallet",
|
||||
"purchase",
|
||||
"checkout",
|
||||
"billing",
|
||||
"account",
|
||||
"cardholder",
|
||||
"verified",
|
||||
"approved",
|
||||
"authorized",
|
||||
"valid",
|
||||
"success",
|
||||
"complete",
|
||||
"check",
|
||||
"bank",
|
||||
"cc"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"finance",
|
||||
"shopping"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M12.5 19H4a2 2 0 01-2-2V7a2 2 0 012-2h16a2 2 0 012 2v4" />
|
||||
<path d="m16 17 2 2 4-4" />
|
||||
<path d="M2 10h20" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 332 B |
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"colebemis",
|
||||
"ericfennis",
|
||||
"karsa-mistmere",
|
||||
"ameniti-mx"
|
||||
],
|
||||
"use-cases": [
|
||||
"Removing a saved payment card from an account",
|
||||
"Unlinking a payment method in billing settings",
|
||||
"Revoking card access in banking apps",
|
||||
"Indicating a declined or canceled card payment"
|
||||
],
|
||||
"tags": [
|
||||
"debit",
|
||||
"payment",
|
||||
"remove",
|
||||
"delete",
|
||||
"unlink",
|
||||
"revoke",
|
||||
"decline",
|
||||
"canceled",
|
||||
"banking",
|
||||
"finance",
|
||||
"wallet",
|
||||
"transaction",
|
||||
"billing",
|
||||
"account",
|
||||
"purchase",
|
||||
"checkout",
|
||||
"subtract",
|
||||
"minus",
|
||||
"bank",
|
||||
"cc"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"finance",
|
||||
"shopping"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M16 17h6" />
|
||||
<path d="M22 10H2" />
|
||||
<path d="M22 13V7a2 2 0 00-2-2H4a2 2 0 00-2 2v10a2 2 0 002 2h8.536" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 329 B |
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"colebemis",
|
||||
"ericfennis",
|
||||
"karsa-mistmere",
|
||||
"ameniti-mx"
|
||||
],
|
||||
"use-cases": [
|
||||
"Adding a payment card during checkout",
|
||||
"Saving a new payment method in billing settings",
|
||||
"Linking a card to a customer account",
|
||||
"Requesting an additional card in banking apps"
|
||||
],
|
||||
"tags": [
|
||||
"debit",
|
||||
"payment",
|
||||
"banking",
|
||||
"finance",
|
||||
"transaction",
|
||||
"wallet",
|
||||
"purchase",
|
||||
"checkout",
|
||||
"billing",
|
||||
"account",
|
||||
"cardholder",
|
||||
"add",
|
||||
"new",
|
||||
"link",
|
||||
"save",
|
||||
"method",
|
||||
"plastic",
|
||||
"bank",
|
||||
"cc"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"finance",
|
||||
"shopping"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M16 17h6" />
|
||||
<path d="M19 14v6" />
|
||||
<path d="M22 10H2" />
|
||||
<path d="M22 11.354V7a2 2 0 00-2-2H4a2 2 0 00-2 2v10a2 2 0 002 2h8.536" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 357 B |
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"colebemis",
|
||||
"ericfennis",
|
||||
"karsa-mistmere"
|
||||
],
|
||||
"use-cases": [
|
||||
"Indicating a declined card payment during checkout",
|
||||
"Marking an invalid payment card in billing settings",
|
||||
"Showing failed card authorization in banking apps",
|
||||
"Canceling a card payment before submission"
|
||||
],
|
||||
"tags": [
|
||||
"debit",
|
||||
"payment",
|
||||
"banking",
|
||||
"finance",
|
||||
"transaction",
|
||||
"wallet",
|
||||
"purchase",
|
||||
"checkout",
|
||||
"billing",
|
||||
"account",
|
||||
"cardholder",
|
||||
"declined",
|
||||
"rejected",
|
||||
"failed",
|
||||
"invalid",
|
||||
"canceled",
|
||||
"error",
|
||||
"cancel",
|
||||
"bank",
|
||||
"cc"
|
||||
],
|
||||
"categories": [
|
||||
"account",
|
||||
"finance",
|
||||
"shopping"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M12.5 19H4a2 2 0 01-2-2V7a2 2 0 012-2h16a2 2 0 012 2v3.5" />
|
||||
<path d="m16.5 14.5 5 5" />
|
||||
<path d="M2 10h20" />
|
||||
<path d="m21.5 14.5-5 5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 364 B |
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"daboudii",
|
||||
"timmy471",
|
||||
"karsa-mistmere"
|
||||
],
|
||||
"use-cases": [
|
||||
"Representing polygon geometry in drawing tools",
|
||||
"Indicating area boundaries on maps",
|
||||
"Editing vector shapes in design software",
|
||||
"Working with GIS regions or coordinate data"
|
||||
],
|
||||
"tags": [
|
||||
"map",
|
||||
"vector",
|
||||
"geometry",
|
||||
"coordinates",
|
||||
"shape",
|
||||
"location",
|
||||
"boundary",
|
||||
"area",
|
||||
"region",
|
||||
"gis",
|
||||
"geospatial",
|
||||
"vertices",
|
||||
"points",
|
||||
"outline",
|
||||
"drawing",
|
||||
"design",
|
||||
"math"
|
||||
],
|
||||
"categories": [
|
||||
"design",
|
||||
"math",
|
||||
"shapes"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="m12.828 4.813 5.344 2.375" />
|
||||
<path d="m15.769 18.153 3.461-8.306" />
|
||||
<path d="m5.687 14.074 7.625 4.852" />
|
||||
<path d="M9.772 5.579 5.228 11.42" />
|
||||
<circle cx="11" cy="4" r="2" />
|
||||
<circle cx="15" cy="20" r="2" />
|
||||
<circle cx="20" cy="8" r="2" />
|
||||
<circle cx="4" cy="13" r="2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 509 B |
@@ -9,12 +9,12 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M19.5 7a24 24 0 0 1 0 10" />
|
||||
<path d="M4.5 7a24 24 0 0 0 0 10" />
|
||||
<path d="M7 19.5a24 24 0 0 0 10 0" />
|
||||
<path d="M7 4.5a24 24 0 0 1 10 0" />
|
||||
<rect x="17" y="17" width="5" height="5" rx="1" />
|
||||
<rect x="17" y="2" width="5" height="5" rx="1" />
|
||||
<rect x="2" y="17" width="5" height="5" rx="1" />
|
||||
<rect x="2" y="2" width="5" height="5" rx="1" />
|
||||
<path d="M17.055 4.533a24 24 0 00-10.11 0" />
|
||||
<path d="M19.467 17.055a24 24 0 000-10.11" />
|
||||
<path d="M4.533 6.945a24 24 0 000 10.11" />
|
||||
<path d="M6.945 19.467a24 24 0 0010.11 0" />
|
||||
<circle cx="19" cy="19" r="2" />
|
||||
<circle cx="19" cy="5" r="2" />
|
||||
<circle cx="5" cy="19" r="2" />
|
||||
<circle cx="5" cy="5" r="2" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 533 B |
@@ -26,6 +26,7 @@
|
||||
"generate:sponsors": "node scripts/updateSponsors.mts",
|
||||
"generate:contributors": "node ./scripts/updateContributors.mts icons/*.svg",
|
||||
"generate:nextJSAliases": "node ./scripts/generateNextJSAliases.mts",
|
||||
"icon-usage": "node ./scripts/iconUsage.mts",
|
||||
"suggest:metadata": "node ./scripts/suggestMetaData.mts",
|
||||
"suggest:metadata:watch": "node --env-file .env --watch ./scripts/suggestMetaData.mts",
|
||||
"postinstall": "husky install",
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Lucide Icon Usage Estimator
|
||||
|
||||
Run with:
|
||||
|
||||
```sh
|
||||
pnpm icon-usage trash trash-2
|
||||
```
|
||||
|
||||
The default is a bounded first pass over `lucide-react`, with two GitHub search pages and up to 200 candidate files validated per query slice. Use `--all-packages` to include every supported package, or `--thorough` for the previous broader limits of 10 pages and 1,000 candidate files per query slice.
|
||||
|
||||
GitHub code search requires authentication, so set `GITHUB_TOKEN` or pass `--token-env <NAME>`.
|
||||
|
||||
Use `--verbose` or `-v` to print detailed progress logs to stderr, including queries, pages, cache hits, retries, content validation, and matches.
|
||||
|
||||
## Method
|
||||
|
||||
The script uses GitHub REST `GET /search/code` with package-scoped, code-extension-scoped queries, then fetches each returned file and validates common Lucide import styles before counting a repository. Counts are deduplicated by `owner/repository`.
|
||||
|
||||
Output includes overall repository counts and per-package statistics. Per-package statistics are computed from validated matches for that package, so a repository using `trash` via `lucide-react` and `trash-2` via another package is represented correctly in both the overall totals and each package section.
|
||||
|
||||
Supported packages are `lucide-react`, `@lucide/vue`, `@lucide/svelte`, `@lucide/angular`, `@lucide/astro`, `lucide-preact`, `lucide-solid`, `lucide`, and `@lucide/lab`. The default package is `lucide-react` because all packages plus file-scope slicing is slow for broad icons; use `--all-packages` when that broader sample is needed.
|
||||
|
||||
Searches are split across relevant implementation file scopes using REST code search qualifiers such as `language:typescript`, `language:javascript`, `extension:vue`, and `extension:svelte`. Returned paths are still filtered by expected extensions before content is fetched, so Markdown and prompt/spec files are intentionally excluded by default because they frequently contain examples or generated implementation notes rather than live package usage.
|
||||
|
||||
By default, queries exclude forks, archived repositories, generated files, and vendored files using GitHub code search qualifiers. Use `--include-forks`, `--include-archived`, `--include-generated`, or `--include-vendored` to include them.
|
||||
|
||||
## GitHub API Limits
|
||||
|
||||
GitHub REST code search is authenticated and rate-limited to 10 requests per minute. Each query can return at most 1,000 results, with up to 100 results per page. Search only covers default branches and files smaller than 384 KB.
|
||||
|
||||
`total_count` and `incomplete_results` come from GitHub search and are recorded in JSON metadata. If a query exceeds the 1,000-result cap or returns `incomplete_results: true`, the script reports a warning and the result should be treated as incomplete rather than exhaustive.
|
||||
|
||||
GitHub's newer code search syntax is usable for public code search queries and supports qualifiers such as `NOT is:fork`, `NOT is:archived`, `NOT is:generated`, and `NOT is:vendored`, but the documented REST code search endpoint remains capped for result retrieval.
|
||||
|
||||
## Practical Strategy For Broad Icons
|
||||
|
||||
For common icons that hit search caps, use the script output as lower-bound or sampled evidence. The most defensible follow-up is to narrow query slices and cite them separately, for example by package, language/path, or repository cohorts, while preserving the JSON metadata for every query performed.
|
||||
|
||||
## Known Biases
|
||||
|
||||
Only public GitHub repositories visible to the token are observable. Private repositories and consumers outside GitHub are absent. GitHub is not representative of every Lucide consumer. Framework/package usage can differ materially. GitHub indexing may be incomplete or delayed. Generated or vendored code can still create false positives when GitHub does not identify it. Very common icons may exceed GitHub search-result caps.
|
||||