@structyl/icons 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 your-lib contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # @structyl/icons
2
+
3
+ > The structyl icon set — 1000+ accessible, tree-shakeable SVG icons for React.
4
+
5
+ ![npm](https://img.shields.io/npm/v/@structyl/icons)
6
+ ![license](https://img.shields.io/npm/l/@structyl/icons)
7
+
8
+ The icon layer for [structyl](https://structyl.dev). It re-exports the full [lucide-react](https://lucide.dev) icon set as individual React components, fully typed for React 18 and 19. Using it through `@structyl/icons` keeps your imports on the structyl scope, so the underlying icon source can evolve without changing your application code.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ # pnpm
14
+ pnpm add @structyl/icons
15
+
16
+ # npm
17
+ npm install @structyl/icons
18
+
19
+ # yarn
20
+ yarn add @structyl/icons
21
+ ```
22
+
23
+ `react` is a peer dependency (`^18.0.0 || ^19.0.0`) and must be installed in your project.
24
+
25
+ ## Usage
26
+
27
+ Import icons by name. Each icon is a standalone component that accepts the standard SVG props plus `size`, `color`, `strokeWidth`, and `absoluteStrokeWidth`.
28
+
29
+ ```tsx
30
+ import { Camera, ChevronRight, Settings } from '@structyl/icons';
31
+
32
+ export function Toolbar() {
33
+ return (
34
+ <div className="flex items-center gap-2">
35
+ <Camera size={20} />
36
+ <Settings size={20} strokeWidth={1.5} />
37
+ <ChevronRight className="text-muted-foreground" aria-hidden />
38
+ </div>
39
+ );
40
+ }
41
+ ```
42
+
43
+ Decorative icons should be marked `aria-hidden`. Icons that convey meaning on their own should be given an accessible label:
44
+
45
+ ```tsx
46
+ import { Trash2 } from '@structyl/icons';
47
+
48
+ <button aria-label="Delete item">
49
+ <Trash2 size={16} aria-hidden />
50
+ </button>;
51
+ ```
52
+
53
+ Because the package is side-effect free, named imports are tree-shaken — only the icons you reference are included in your bundle.
54
+
55
+ ## Features
56
+
57
+ - Over 1000 SVG icon components, re-exported from lucide-react.
58
+ - Tree-shakeable: `"sideEffects": false` means unused icons are dropped by your bundler.
59
+ - Fully typed for TypeScript, including the `LucideProps` and `LucideIcon` types.
60
+ - Consistent stroke-based design, sizable via `size` and styleable with `className` (Tailwind-friendly).
61
+ - React 18 and 19 compatible.
62
+ - Ships ESM and CJS builds with type declarations.
63
+
64
+ ## API
65
+
66
+ `@structyl/icons` re-exports the public surface of lucide-react:
67
+
68
+ | Export | Description |
69
+ | --- | --- |
70
+ | Named icon components (e.g. `Camera`, `ChevronRight`, `Settings`) | Individual SVG icon components accepting `size`, `color`, `strokeWidth`, `absoluteStrokeWidth`, and standard SVG props. |
71
+ | `Icon` | Generic component for rendering an icon from raw node data. |
72
+ | `createLucideIcon` | Factory for building a custom icon component with the lucide API. |
73
+ | `icons` | Object map of every icon keyed by name, for dynamic/programmatic lookup. |
74
+ | `LucideProps` (type) | Props shared by all icon components. |
75
+ | `LucideIcon` (type) | Type of an icon component. |
76
+
77
+ For the full searchable icon catalog, see [lucide.dev/icons](https://lucide.dev/icons).
78
+
79
+ ## Part of structyl
80
+
81
+ This package is part of [structyl](https://github.com/imirfanul/structyl) — see the [documentation](https://structyl.dev) for the full component library.
82
+
83
+ ## License
84
+
85
+ MIT
package/dist/index.cjs ADDED
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var lucideReact = require('lucide-react');
4
+
5
+
6
+
7
+ Object.keys(lucideReact).forEach(function (k) {
8
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
+ enumerable: true,
10
+ get: function () { return lucideReact[k]; }
11
+ });
12
+ });
13
+ //# sourceMappingURL=index.cjs.map
14
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs","sourcesContent":[]}
@@ -0,0 +1 @@
1
+ export * from 'lucide-react';
@@ -0,0 +1 @@
1
+ export * from 'lucide-react';
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ export * from 'lucide-react';
2
+ //# sourceMappingURL=index.mjs.map
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs","sourcesContent":[]}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@structyl/icons",
3
+ "version": "1.0.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "description": "The structyl icon set: 1000+ tree-shakeable SVG icon components re-exported from lucide-react, typed for React 18 and 19.",
8
+ "keywords": [
9
+ "react",
10
+ "typescript",
11
+ "structyl",
12
+ "icons",
13
+ "svg",
14
+ "lucide",
15
+ "lucide-react",
16
+ "icon-components",
17
+ "tree-shakeable",
18
+ "ui"
19
+ ],
20
+ "license": "MIT",
21
+ "type": "module",
22
+ "sideEffects": false,
23
+ "main": "./dist/index.cjs",
24
+ "module": "./dist/index.mjs",
25
+ "types": "./dist/index.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "import": "./dist/index.mjs",
30
+ "require": "./dist/index.cjs"
31
+ }
32
+ },
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "dependencies": {
37
+ "lucide-react": "^0.453.0"
38
+ },
39
+ "peerDependencies": {
40
+ "react": "^18.0.0 || ^19.0.0"
41
+ },
42
+ "devDependencies": {
43
+ "@types/react": "^19.0.0",
44
+ "react": "^19.0.0",
45
+ "tsup": "^8.3.0",
46
+ "typescript": "^5.6.3"
47
+ },
48
+ "scripts": {
49
+ "build": "tsup",
50
+ "dev": "tsup --watch",
51
+ "lint": "eslint src",
52
+ "typecheck": "tsc --noEmit",
53
+ "clean": "rm -rf dist .turbo"
54
+ }
55
+ }