Compare commits

..
24 Commits
Author SHA1 Message Date
Eric Fennis 291b016d45 Setup build config 2024-09-25 14:36:15 +02:00
Isaac c6a4908ed0 Add missing space between Svelte and Preact (#2489) 2024-09-25 07:52:27 +02:00
Jakob Guddas b6e71c6c7a feat(icons): added file-user icon (#2457)
* Added icons/file-user.svg

* Added icons/file-user.json
2024-09-25 07:21:56 +02:00
Jakob Guddas 7de43440ee feat(icons): added message-square-lock icon (#2430)
* Added icons/message-square-lock.svg

* Added icons/message-square-lock.json

* Updated icons/message-square-lock.json
2024-09-20 23:26:47 +02:00
Jakob Guddas c8d5260d54 feat(icons): added briefcase-conveyor-belt icon (#2431)
* Added icons/briefcase-conveyor-belt.svg

* Added icons/briefcase-conveyor-belt.json
2024-09-20 23:26:05 +02:00
Jakob Guddas 0c912bd7ff fix(icons): changed loader-pinwheel icon (#2470)
* Updated icons/loader-pinwheel.svg

* Updated icons/loader-pinwheel.json
2024-09-20 23:18:06 +02:00
Jakob Guddas 3f24597a65 Updated icons/circle-stop.svg (#2479) 2024-09-20 23:08:18 +02:00
Jakob Guddas 590d59ac5f fix(icons): changed octagon-pause icon (#2485)
* Updated icons/octagon-pause.svg

* Updated icons/octagon-pause.json
2024-09-20 23:03:31 +02:00
Jakob Guddas 85d427d846 feat: added .github/workflows/close-issue-with-banned-phrases.yml (#2460)
* feat: added .github/workflows/close-issue-with-banned-phrases.yml

* feat: added link to search

* chore: improved comment
2024-09-19 09:20:22 +02:00
Jakob GuddasandEric Fennis 478a624162 Updated icons/messages-square.svg (#2429)
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2024-09-13 09:07:13 +02:00
Jakob Guddas f0afdd4614 feat(icons): added clock-alert icon (#2401)
* Added icons/clock-alert.svg

* Added icons/clock-alert.json
2024-09-12 14:22:36 +02:00
Need-an-AwPandKarsa 38e7431189 add headphone-off svg & json in icon folder (#2445)
* add headphone-off svg & json in icon folder

* edit contributor in json & adjust icon

* adjust icon

* contributors changed

* icon adjust

* adjust path

* detail adjustment

* Apply suggestions from code review

Co-authored-by: Karsa <contact@karsa.org>

* delete files of categories in headphone-off's json

* prettier format json

---------

Co-authored-by: Karsa <contact@karsa.org>
2024-09-12 10:21:34 +02:00
Jakob GuddasandEric Fennis 19dd912381 fix(icons): arcified caravan icon (#2423)
* Updated icons/caravan.svg

* Updated icons/caravan.json

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2024-09-06 13:13:34 +02:00
Jakob Guddas f70d5f5169 fix(pr-comment): added missing details open tag (#2425) 2024-09-06 12:45:07 +02:00
Jakob Guddas 30e0d55b4a fix(pr-comment): changed diff path url (#2426) 2024-09-06 12:44:38 +02:00
Jakob Guddas 36a5a8b9ac fix(icons): arcified book-open-* icon (#2358)
* Updated icons/book-open.svg

* Updated icons/book-open-check.svg

* Updated icons/book-open-check.svg

* Updated icons/book-open-text.svg
2024-09-06 09:58:11 +02:00
Jakob Guddas e20e7a43ba feat(icons): added grid-2x2-plus icon (#2362)
* Added icons/grid-2x2-plus.svg

* Added icons/grid-2x2-plus.json
2024-09-06 09:40:16 +02:00
Eric Fennis e8ab1bc15b chore: Update PNPM (#2376)
* update-workflows

* Update pnpm

* update lockfile

* Update pnpm lock file

* Revert icon changes
2024-09-06 09:30:23 +02:00
Jakob Guddas ef090c7dd4 fix(icons): changed combine icon (#2424)
* Updated icons/combine.svg

* Updated icons/combine.json
2024-09-06 09:14:33 +02:00
Karsa 65e49e2684 fix(docs): fixes yarn workspace guide link (#2435) 2024-09-06 09:13:46 +02:00
Jakob Guddas 0ca2099113 feat(icons): added octagon-minus icon (#2408)
* Added icons/octagon-minus.svg

* Added icons/octagon-minus.json

* Updated icons/octagon-minus.json
2024-09-01 21:08:00 +02:00
Jakob Guddas 9c99fd809c feat(pr-comment): moved diff into separate section (#2421)
* feat(pr-comment): moved diff into separate section

* Update docs/.vitepress/lib/SvgPreview/Diff.tsx
2024-09-01 21:04:36 +02:00
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Eric Fennis
cd0d4e1f8a build(deps-dev): bump svelte from 4.1.2 to 4.2.19 (#2419)
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.1.2 to 4.2.19.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.19/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.19/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2024-09-01 21:04:25 +02:00
Jakob Guddas e1668804c9 Updated icons/battery-warning.svg (#2422) 2024-09-01 21:04:08 +02:00
60 changed files with 17333 additions and 21573 deletions
-2
View File
@@ -17,8 +17,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -0,0 +1,35 @@
name: Close Issue with Banned Phrases
on:
issues:
types: [opened]
jobs:
block_phrases:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Check for blocked phrases in issue title
run: |
ISSUE_TITLE=$(jq -r '.issue.title' "$GITHUB_EVENT_PATH")
BLOCKED_PHRASES=("twitter" "whatsapp" "logo" "google" "tiktok" "facebook" "slack" "discord")
# Check title and body for blocked phrases
for PHRASE in "${BLOCKED_PHRASES[@]}"
do
if echo "$ISSUE_TITLE" | grep -i "$PHRASE"; then
gh issue close ${{ github.event.issue.number }} --reason "not planned" --comment "This looks like a duplicate, use the [search](https://github.com/lucide-icons/lucide/issues?q=is%3Aissue+$PHRASE) to find similar issues.
Read more about brand guideline rules at [We're not accepting new Brand icons #670](https://github.com/lucide-icons/lucide/issues/670).
Always happy to help on [Discord](https://discord.gg/EH6nSts)."
gh issue lock ${{ github.event.issue.number }} --reason spam
exit 1
fi
done
env:
GH_TOKEN: ${{ github.token }}
-2
View File
@@ -11,8 +11,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
-4
View File
@@ -13,8 +13,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -31,8 +29,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3.8.1
with:
node-version: 18
-2
View File
@@ -13,8 +13,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
-2
View File
@@ -14,8 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -14,8 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
-4
View File
@@ -15,8 +15,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -33,8 +31,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3.8.1
with:
node-version: 18
-4
View File
@@ -14,8 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -32,8 +30,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3.8.1
with:
node-version: 18
-2
View File
@@ -13,8 +13,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
-4
View File
@@ -14,8 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -32,8 +30,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3.8.1
with:
node-version: 18
-4
View File
@@ -14,8 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -32,8 +30,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3.8.1
with:
node-version: 18
-4
View File
@@ -14,8 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -32,8 +30,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3.8.1
with:
node-version: 18
-4
View File
@@ -14,8 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -32,8 +30,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3.8.1
with:
node-version: 18
-6
View File
@@ -56,8 +56,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -89,8 +87,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
@@ -121,8 +117,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
+1 -1
View File
@@ -72,7 +72,7 @@ pnpm install # Install dependencies, including the workspace packages
### Packages -> PNPM Workspaces
To distribute different packages we use PNPM workspaces. Before you start make sure you are familiar with this concept. The concept of working in workspaces is created by Yarn, they have a well written introduction: [yarn workspaces](https://classic.yarnpkg.com/lang/enhttps://lucide.dev/docs/workspaces).
To distribute different packages we use [PNPM workspaces](https://pnpm.io/workspaces). Before you start make sure you are familiar with this concept. The concept of working in workspaces is created by Yarn, they have a well written introduction: [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces).
The configured directory for workspaces is the [packages](https://github.com/lucide-icons/lucide/tree/main/packages) directory, located in the root directory. There you will find all the current packages from lucide.
There are more workspaces defined, see [`pnpm-workspace.yaml`](https://github.com/lucide-icons/lucide/blob/main/pnpm-workspace.yaml).
+2 -11
View File
@@ -28,7 +28,7 @@ export default eventHandler((event) => {
.map((_, idx, arr) => arr.slice(0, idx + 1).join('-'))
.reverse()
.find((groupName) => groupName in iconNodes);
if (backdropName) {
if (!(name in iconNodes) && backdropName) {
const iconNode = iconNodes[backdropName];
const LucideIcon = createLucideIcon(backdropName, iconNode);
@@ -39,18 +39,9 @@ export default eventHandler((event) => {
createElement(Backdrop, {
backdropString,
src,
color: name in iconNodes ? 'red' : '#777',
color: '#777',
}),
);
if (name in iconNodes) {
children.push(
createElement(Backdrop, {
backdropString: src,
src: backdropString,
color: 'lime',
}),
);
}
}
const svg = Buffer.from(
@@ -0,0 +1,37 @@
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
import { renderToString, renderToStaticMarkup } from 'react-dom/server';
import { createElement } from 'react';
import Diff from '../../../lib/SvgPreview/Diff.tsx';
import iconNodes from '../../../data/iconNodes';
import createLucideIcon from 'lucide-react/src/createLucideIcon';
export default eventHandler((event) => {
const { params } = event.context;
const pathData = params.data.split('/');
const data = pathData.at(-1).slice(0, -4);
const [name] = pathData;
const newSrc = Buffer.from(data, 'base64')
.toString('utf8')
.replaceAll('\n', '')
.replace(/<svg[^>]*>|<\/svg>/g, '');
const children = [];
const oldSrc = iconNodes[name]
? renderToStaticMarkup(createElement(createLucideIcon(name, iconNodes[name])))
.replaceAll('\n', '')
.replace(/<svg[^>]*>|<\/svg>/g, '')
: '';
const svg = Buffer.from(
// We can't use jsx here, is not supported here by nitro.
renderToString(createElement(Diff, { oldSrc, newSrc, showGrid: true }, children)),
).toString('utf8');
defaultContentType(event, 'image/svg+xml');
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
return svg;
});
+16 -8
View File
@@ -3,10 +3,16 @@ import React from 'react';
interface BackdropProps {
src: string;
color?: string;
outline?: boolean;
backdropString: string;
}
const Backdrop = ({ src, color = 'red', backdropString }: BackdropProps): JSX.Element => {
const Backdrop = ({
src,
color = 'red',
outline = true,
backdropString,
}: BackdropProps): JSX.Element => {
const id = React.useId();
return (
<>
@@ -73,13 +79,15 @@ const Backdrop = ({ src, color = 'red', backdropString }: BackdropProps): JSX.El
opacity={0.75}
dangerouslySetInnerHTML={{ __html: src }}
/>
<g
stroke={color}
strokeWidth={2.25}
opacity={0.75}
mask={`url(#svg-preview-backdrop-mask-outline-${id})`}
dangerouslySetInnerHTML={{ __html: backdropString }}
/>
{outline && (
<g
stroke={color}
strokeWidth={2.25}
opacity={0.75}
mask={`url(#svg-preview-backdrop-mask-outline-${id})`}
dangerouslySetInnerHTML={{ __html: backdropString }}
/>
)}
</g>
</>
);
+71
View File
@@ -0,0 +1,71 @@
import React from 'react';
import Backdrop from './Backdrop.tsx';
import { darkModeCss, Grid } from './index.tsx';
const SvgPreview = React.forwardRef<
SVGSVGElement,
{
oldSrc: string;
newSrc: string;
} & React.SVGProps<SVGSVGElement>
>(({ oldSrc, newSrc, children, ...props }, ref) => {
return (
<svg
ref={ref}
xmlns="http://www.w3.org/2000/svg"
width={24}
height={24}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth={2}
strokeLinecap="round"
strokeLinejoin="round"
{...props}
>
<style>{darkModeCss}</style>
<Grid
strokeWidth={0.1}
stroke="#777"
strokeOpacity={0.3}
radius={1}
/>
<mask
id="gray"
maskUnits="userSpaceOnUse"
>
<rect
x="0"
y="0"
width="24"
height="24"
fill="#000"
stroke="none"
/>
<g
stroke="#fff"
dangerouslySetInnerHTML={{ __html: oldSrc }}
/>
</mask>
<Backdrop
src=""
outline={false}
backdropString={`<g mask="url('#gray')">${newSrc}</g>`}
color="#777"
/>
<Backdrop
src={oldSrc}
backdropString={newSrc}
color="lime"
/>
<Backdrop
src={newSrc}
backdropString={oldSrc}
color="red"
/>
{children}
</svg>
);
});
export default SvgPreview;
+17 -14
View File
@@ -2,7 +2,23 @@ import React from 'react';
import { PathProps, Path } from './types';
import { getPaths, assert } from './utils';
const Grid = ({
export const darkModeCss = `
@media screen and (prefers-color-scheme: light) {
.svg-preview-grid-rect { fill: none }
}
@media screen and (prefers-color-scheme: dark) {
.svg-preview-grid-rect { fill: none }
.svg
.svg-preview-grid-group,
.svg-preview-radii-group,
.svg-preview-shadow-mask-group,
.svg-preview-shadow-group {
stroke: #fff;
}
}
`;
export const Grid = ({
radius,
fill = '#fff',
...props
@@ -339,19 +355,6 @@ const SvgPreview = React.forwardRef<
>(({ src, children, showGrid = false, ...props }, ref) => {
const paths = typeof src === 'string' ? getPaths(src) : src;
const darkModeCss = `@media screen and (prefers-color-scheme: light) {
.svg-preview-grid-rect { fill: none }
}
@media screen and (prefers-color-scheme: dark) {
.svg-preview-grid-rect { fill: none }
.svg
.svg-preview-grid-group,
.svg-preview-radii-group,
.svg-preview-shadow-mask-group,
.svg-preview-shadow-group {
stroke: #fff;
}
}`;
return (
<svg
ref={ref}
+1 -1
View File
@@ -28,7 +28,7 @@ However, not everyone can understand them easily. Read more about [how to use Lu
## Official Packages
Lucide's official packages are designed to work on different platforms, making it easier for users to integrate icons into their projects. The packages are available for various technologies, including [Web (Vanilla)](https://lucide.dev/guide/packages/lucide), [React](https://lucide.dev/guide/packages/lucide-react), [React Native](https://lucide.dev/guide/packages/lucide-react-native), [Vue](https://lucide.dev/guide/packages/lucide-vue), [Vue 3](https://lucide.dev/guide/packages/lucide-vue-next), [Svelte](https://lucide.dev/guide/packages/lucide-svelte),[Preact](https://lucide.dev/guide/packages/lucide-preact), [Solid](https://lucide.dev/guide/packages/lucide-solid), [Angular](https://lucide.dev/guide/packages/lucide-angular), [NodeJS](https://lucide.dev/guide/packages/lucide-static#nodejs) and [Flutter](https://lucide.dev/guide/packages/lucide-flutter).
Lucide's official packages are designed to work on different platforms, making it easier for users to integrate icons into their projects. The packages are available for various technologies, including [Web (Vanilla)](https://lucide.dev/guide/packages/lucide), [React](https://lucide.dev/guide/packages/lucide-react), [React Native](https://lucide.dev/guide/packages/lucide-react-native), [Vue](https://lucide.dev/guide/packages/lucide-vue), [Vue 3](https://lucide.dev/guide/packages/lucide-vue-next), [Svelte](https://lucide.dev/guide/packages/lucide-svelte), [Preact](https://lucide.dev/guide/packages/lucide-preact), [Solid](https://lucide.dev/guide/packages/lucide-solid), [Angular](https://lucide.dev/guide/packages/lucide-angular), [NodeJS](https://lucide.dev/guide/packages/lucide-static#nodejs) and [Flutter](https://lucide.dev/guide/packages/lucide-flutter).
## Community
If you have any questions about Lucide, feel free to reach out to the community. You can find them on [GitHub](https://github.com/lucide-icons/lucide) and [Discord](https://discord.gg/EH6nSts).
+5 -5
View File
@@ -9,9 +9,9 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M14 7h2a2 2 0 0 1 2 2v6c0 1-1 2-2 2h-2" />
<path d="M6 7H4a2 2 0 0 0-2 2v6c0 1 1 2 2 2h2" />
<line x1="22" x2="22" y1="11" y2="13" />
<line x1="10" x2="10" y1="7" y2="13" />
<line x1="10" x2="10" y1="17" y2="17.01" />
<path d="M10 17h.01" />
<path d="M10 7v6" />
<path d="M14 7h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-2" />
<path d="M22 11v2" />
<path d="M6 7H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" />
</svg>

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 391 B

+2 -2
View File
@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M8 3H2v15h7c1.7 0 3 1.3 3 3V7c0-2.2-1.8-4-4-4Z" />
<path d="M12 21V7" />
<path d="m16 12 2 2 4-4" />
<path d="M22 6V3h-6c-2.2 0-4 1.8-4 4v14c0-1.7 1.3-3 3-3h7v-2.3" />
<path d="M22 6V4a1 1 0 0 0-1-1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4H3a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h6a3 3 0 0 1 3 3 3 3 0 0 1 3-3h6a1 1 0 0 0 1-1v-1.3" />
</svg>

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 414 B

+5 -5
View File
@@ -9,10 +9,10 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" />
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" />
<path d="M6 8h2" />
<path d="M6 12h2" />
<path d="M16 8h2" />
<path d="M12 7v14" />
<path d="M16 12h2" />
<path d="M16 8h2" />
<path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" />
<path d="M6 12h2" />
<path d="M6 8h2" />
</svg>

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 470 B

+2 -2
View File
@@ -9,6 +9,6 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" />
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" />
<path d="M12 7v14" />
<path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" />
</svg>

Before

Width:  |  Height:  |  Size: 322 B

After

Width:  |  Height:  |  Size: 378 B

+19
View File
@@ -0,0 +1,19 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"karsa-mistmere",
"jguddas"
],
"tags": [
"baggage",
"luggage",
"travel",
"suitcase",
"conveyor",
"carousel"
],
"categories": [
"travel",
"transportation"
]
}
+19
View File
@@ -0,0 +1,19 @@
<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="M10 20v2" />
<path d="M14 20v2" />
<path d="M18 20v2" />
<path d="M21 20H3" />
<path d="M6 20v2" />
<path d="M8 16V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v12" />
<rect x="4" y="6" width="16" height="10" rx="2" />
</svg>

After

Width:  |  Height:  |  Size: 436 B

+2 -1
View File
@@ -1,7 +1,8 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"danielbayley"
"danielbayley",
"jguddas"
],
"tags": [
"trailer",
+2 -3
View File
@@ -9,9 +9,8 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<rect width="4" height="4" x="2" y="9" />
<rect width="4" height="10" x="10" y="9" />
<path d="M18 19V9a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v8a2 2 0 0 0 2 2h2" />
<path d="M2 9h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2" />
<path d="M22 17v1a1 1 0 0 1-1 1H10v-9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v9" />
<circle cx="8" cy="19" r="2" />
<path d="M10 19h12v-2" />
</svg>

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 444 B

+1 -1
View File
@@ -10,5 +10,5 @@
stroke-linejoin="round"
>
<circle cx="12" cy="12" r="10" />
<rect width="6" height="6" x="9" y="9" />
<rect x="9" y="9" width="6" height="6" rx="1" />
</svg>

Before

Width:  |  Height:  |  Size: 288 B

After

Width:  |  Height:  |  Size: 295 B

+17
View File
@@ -0,0 +1,17 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis",
"jguddas"
],
"tags": [
"time",
"watch",
"alarm",
"warning",
"wrong"
],
"categories": [
"time"
]
}
+16
View File
@@ -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 6v6l4 2" />
<path d="M16 21.16a10 10 0 1 1 5-13.516" />
<path d="M20 11.5v6" />
<path d="M20 21.5h.01" />
</svg>

After

Width:  |  Height:  |  Size: 335 B

+2 -1
View File
@@ -2,7 +2,8 @@
"$schema": "../icon.schema.json",
"contributors": [
"danielbayley",
"ericfennis"
"ericfennis",
"jguddas"
],
"tags": [
"cubes",
+6 -6
View File
@@ -9,10 +9,10 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<rect width="8" height="8" x="2" y="2" rx="2" />
<path d="M14 2c1.1 0 2 .9 2 2v4c0 1.1-.9 2-2 2" />
<path d="M20 2c1.1 0 2 .9 2 2v4c0 1.1-.9 2-2 2" />
<path d="M10 18H5c-1.7 0-3-1.3-3-3v-1" />
<polyline points="7 21 10 18 7 15" />
<rect width="8" height="8" x="14" y="14" rx="2" />
<path d="M10 18H5a3 3 0 0 1-3-3v-1" />
<path d="M14 2a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" />
<path d="M20 2a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" />
<path d="m7 21 3-3-3-3" />
<rect x="14" y="14" width="8" height="8" rx="2" />
<rect x="2" y="2" width="8" height="8" rx="2" />
</svg>

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 484 B

+28
View File
@@ -0,0 +1,28 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"danielbayley",
"colebemis",
"ericfennis",
"jguddas"
],
"tags": [
"person",
"personal information",
"people",
"listing",
"networking",
"document",
"contact",
"cover letter",
"resume",
"cv",
"curriculum vitae",
"application form"
],
"categories": [
"account",
"communication",
"files"
]
}
+16
View File
@@ -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="M14 2v4a2 2 0 0 0 2 2h4" />
<path d="M15 18a3 3 0 1 0-6 0" />
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z" />
<circle cx="12" cy="13" r="2" />
</svg>

After

Width:  |  Height:  |  Size: 392 B

+33
View File
@@ -0,0 +1,33 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"danielbayley",
"chessurisme",
"jguddas"
],
"tags": [
"table",
"rows",
"columns",
"blocks",
"plot",
"land",
"geometry",
"measure",
"data",
"size",
"width",
"height",
"distance",
"surface area",
"square meter",
"acre"
],
"categories": [
"text",
"layout",
"design",
"shapes",
"maths"
]
}
+15
View File
@@ -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 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3" />
<path d="M16 19h6" />
<path d="M19 22v-6" />
</svg>

After

Width:  |  Height:  |  Size: 362 B

+24
View File
@@ -0,0 +1,24 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis",
"csandman",
"ericfennis",
"jguddas",
"Need-an-AwP"
],
"tags": [
"music",
"audio",
"sound",
"mute",
"off"
],
"categories": [
"multimedia",
"connectivity",
"communication",
"devices",
"gaming"
]
}
+17
View File
@@ -0,0 +1,17 @@
<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="M21 14h-1.343" />
<path d="M9.128 3.47A9 9 0 0 1 21 12v3.343" />
<path d="m2 2 20 20" />
<path d="M20.414 20.414A2 2 0 0 1 19 21h-1a2 2 0 0 1-2-2v-3" />
<path d="M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 2.636-6.364" />
</svg>

After

Width:  |  Height:  |  Size: 472 B

+2 -1
View File
@@ -1,7 +1,8 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"danielbayley"
"danielbayley",
"jguddas"
],
"tags": [
"loading",
+1 -1
View File
@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M2 12c0-2.8 2.2-5 5-5s5 2.2 5 5 2.2 5 5 5 5-2.2 5-5" />
<path d="M22 12a1 1 0 0 1-10 0 1 1 0 0 0-10 0" />
<path d="M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6" />
<path d="M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6" />
<circle cx="12" cy="12" r="10" />

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 405 B

+23
View File
@@ -0,0 +1,23 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis",
"csandman",
"ericfennis",
"jguddas"
],
"tags": [
"comment",
"chat",
"conversation",
"dialog",
"feedback",
"speech bubble",
"secure",
"encrypted"
],
"categories": [
"account",
"social"
]
}
+15
View File
@@ -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="M19 15v-2a2 2 0 1 0-4 0v2" />
<path d="M9 17H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v3.5" />
<rect x="13" y="15" width="8" height="5" rx="1" />
</svg>

After

Width:  |  Height:  |  Size: 367 B

+1 -1
View File
@@ -9,6 +9,6 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z" />
<path d="M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z" />
<path d="M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1" />
</svg>

Before

Width:  |  Height:  |  Size: 348 B

After

Width:  |  Height:  |  Size: 348 B

+22
View File
@@ -0,0 +1,22 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"colebemis",
"jguddas"
],
"tags": [
"stop",
"forbidden",
"subtract",
"remove",
"decrease",
"reduce",
"-",
"traffic",
"halt",
"restricted"
],
"categories": [
"transportation"
]
}
+14
View File
@@ -0,0 +1,14 @@
<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="M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" />
<path d="M8 12h8" />
</svg>

After

Width:  |  Height:  |  Size: 481 B

+2 -1
View File
@@ -1,7 +1,8 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"mittalyashu"
"mittalyashu",
"jguddas"
],
"tags": [
"music",
+1 -1
View File
@@ -11,5 +11,5 @@
>
<path d="M10 15V9" />
<path d="M14 15V9" />
<path d="M2.586 16.872A2 2 0 0 1 2 15.458V8.542a2 2 0 0 1 .586-1.414l4.542-4.542A2 2 0 0 1 8.542 2h6.916a2 2 0 0 1 1.414.586l4.542 4.542A2 2 0 0 1 22 8.542v6.916a2 2 0 0 1-.586 1.414l-4.542 4.542a2 2 0 0 1-1.414.586H8.542a2 2 0 0 1-1.414-.586z" />
<path d="M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" />
</svg>

Before

Width:  |  Height:  |  Size: 506 B

After

Width:  |  Height:  |  Size: 506 B

-7747
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -66,7 +66,7 @@
"svgson": "^5.3.1",
"yargs": "^17.7.2"
},
"packageManager": "pnpm@8.14.0+sha256.9cebf61abd83f68177b29484da72da9751390eaad46dfc3072d266bfbb1ba7bf",
"packageManager": "pnpm@9.7.1+sha512.faf344af2d6ca65c4c5c8c2224ea77a81a5e8859cbc4e06b1511ddce2f0151512431dd19e6aff31f2c6a8f5f2aced9bd2273e1fed7dd4de1868984059d2c4247",
"pnpm": {
"packageExtensions": {
"vue-template-compiler": {
@@ -75,5 +75,8 @@
}
}
}
},
"dependencies": {
"c12": "^1.11.2"
}
}
+1 -1
View File
@@ -65,7 +65,7 @@
"@tsconfig/svelte": "^5.0.0",
"jest-serializer-html": "^7.1.0",
"jsdom": "^20.0.3",
"svelte": "^4.0.1",
"svelte": "^4.2.19",
"svelte-check": "^3.4.4",
"svelte-preprocess": "^5.0.4",
"typescript": "^5.1.6",
+12
View File
@@ -0,0 +1,12 @@
import { BuildConfig } from '@lucide/build-icons/types/config'
export default {
output: './src ',
templateSrc: './scripts/exportTemplate.mjs',
iconFileExtension: '.ts',
aliases: {
exportNamesOnly: true,
fileExtension: '.ts',
},
indexFileName: 'index.ts'
} satisfies BuildConfig;
@@ -13,11 +13,11 @@ exports[`createIcons > should add custom attributes 1`] = `
data-lucide="volume-2"
class="lucide lucide-volume-2 icon custom-class"
>
<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5">
</polygon>
<path d="M15.54 8.46a5 5 0 0 1 0 7.07">
<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z">
</path>
<path d="M19.07 4.93a10 10 0 0 1 0 14.14">
<path d="M16 9a5 5 0 0 1 0 6">
</path>
<path d="M19.364 18.364a9 9 0 0 0 0-12.728">
</path>
</svg>
`;
@@ -66,11 +66,11 @@ exports[`createIcons > should read elements from DOM and replace it with icons 1
data-lucide="volume-2"
class="lucide lucide-volume-2"
>
<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5">
</polygon>
<path d="M15.54 8.46a5 5 0 0 1 0 7.07">
<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z">
</path>
<path d="M19.07 4.93a10 10 0 0 1 0 14.14">
<path d="M16 9a5 5 0 0 1 0 6">
</path>
<path d="M19.364 18.364a9 9 0 0 0 0-12.728">
</path>
</svg>
`;
+16786 -13700
View File
File diff suppressed because it is too large Load Diff
@@ -77,6 +77,16 @@ const changeFilesXRayImageTags = getImageTagsByFiles(
400,
).join(' ');
const changeFilesDiffImageTags = getImageTagsByFiles(
changedFiles,
(file) => {
const iconName = path.basename(file, '.svg');
return `${BASE_URL}/diff/${iconName}`;
},
400,
).join(' ');
const readyToUseCode = changedFiles
.map((changedFile) => {
const svgContent = fs.readFileSync(path.join(process.cwd(), changedFile), 'utf-8');
@@ -113,6 +123,10 @@ ${changeFilesLowDPIImageTags}<br/>
${changeFilesXRayImageTags}
</details>
<details>
<summary>Icon Diffs</summary>
${changeFilesDiffImageTags}
</details>
<details>
<summary>Icons as code</summary>
Works for: \`lucide-react\`, \`lucide-react-native\`, \`lucide-preact\`, \`lucide-vue-next\`
@@ -3,13 +3,13 @@ import path from 'path';
// eslint-disable-next-line import/no-extraneous-dependencies
import { toPascalCase, toCamelCase, resetFile, appendFile } from '@lucide/helpers';
export default (
export default function generateIndexFile (
inputEntry,
outputDirectory,
iconNodes,
exportModuleNameCasing,
iconFileExtension = '',
) => {
) {
const fileName = path.basename(inputEntry);
// Reset file
+2 -2
View File
@@ -6,7 +6,7 @@ import getArgumentOptions from 'minimist';
import { readSvgDirectory } from '@lucide/helpers';
import renderIconsObject from './render/renderIconsObject.mjs';
import generateIconFiles from './building/generateIconFiles.mjs';
import generateExportsFile from './building/generateExportsFile.mjs';
import generateIndexFile from './building/generateIndexFile.mjs';
import generateAliasesFile from './building/generateAliasesFile.mjs';
// eslint-disable-next-line import/no-named-as-default, import/no-named-as-default-member
@@ -89,7 +89,7 @@ async function buildIcons() {
}
// Generates entry files for the compiler filled with icons exports
generateExportsFile(
generateIndexFile(
path.join(OUTPUT_DIR, 'icons', exportFileName),
path.join(OUTPUT_DIR, 'icons'),
icons,
+12
View File
@@ -0,0 +1,12 @@
interface AliasConfig {
exportNamesOnly: boolean,
fileExtension: string
}
export interface BuildConfig {
output: string
templateSrc: string
iconFileExtension?: string
aliases?: AliasConfig | boolean
indexFileName?: string
}