platformicons 9.0.7 → 9.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.1.0
4
+
5
+ ### New Features ✨
6
+
7
+ - Replace dynamic require() with static SVG import map for Vite/Astro support by @sergical in [#226](https://github.com/getsentry/platformicons/pull/226)
8
+
9
+ ### Documentation 📚
10
+
11
+ - Add usage documentation and contributing guide by @sergical in [#228](https://github.com/getsentry/platformicons/pull/228)
12
+
13
+ ### Internal Changes 🔧
14
+
15
+ - (release) Switch from action-prepare-release to Craft by @BYK in [#222](https://github.com/getsentry/platformicons/pull/222)
16
+ - Enable auto changelog generation by @sergical in [#227](https://github.com/getsentry/platformicons/pull/227)
17
+
18
+ ### Other
19
+
20
+ - Add Convex icon by @nipunn1313 in [#150](https://github.com/getsentry/platformicons/pull/150)
21
+
3
22
  ## 5.0.2
4
23
 
5
24
  - Fixes issues with craft builds
package/README.md CHANGED
@@ -2,12 +2,91 @@
2
2
 
3
3
  A set of platform and framework icons from the people behind https://sentry.io.
4
4
 
5
- ## SVG Versions
5
+ ## Installation
6
6
 
7
- There are two kinds of icons in this collection:
7
+ ```bash
8
+ # yarn
9
+ yarn add platformicons
8
10
 
9
- - The icons in `/svg` are for smaller rendering sizes. They can have a solid background to achieve high contrast to make them easier to "read" in smaller sizes.
10
- - The icons in `/svg_80x80` are for bigger rendering sizes. They can have a transparent background.
11
+ # npm
12
+ npm install platformicons
13
+ ```
14
+
15
+ React is a peer dependency, so make sure it’s installed in your project.
16
+
17
+ The package ships both CommonJS and ESM builds:
18
+
19
+ - `"main"` → `build/index.js` (CommonJS — works with webpack, Gatsby, etc.)
20
+ - `"module"` → `esmbuild/index.js` (ESM — works with Vite, Astro, etc.)
21
+
22
+ Most bundlers pick the right entry automatically. Static SVG imports ensure both module systems resolve icons correctly.
23
+
24
+ ## Usage
25
+
26
+ ```tsx
27
+ import { PlatformIcon } from ‘platformicons’;
28
+
29
+ function App() {
30
+ return <PlatformIcon platform="javascript-react" size={32} />;
31
+ }
32
+ ```
33
+
34
+ ### Props
35
+
36
+ | Prop | Type | Default | Description |
37
+ |------|------|---------|-------------|
38
+ | `platform` | `string` | — | Platform identifier (e.g. `"python-django"`, `"javascript-react"`) |
39
+ | `size` | `string \| number` | `20` | Icon width and height in pixels |
40
+ | `format` | `"sm" \| "lg"` | `"sm"` | `"sm"` uses compact icons from `/svg`, `"lg"` uses detailed icons from `/svg_80x80` |
41
+ | `radius` | `number \| null` | `3` | Border radius in pixels |
42
+ | `withLanguageIcon` | `boolean` | `false` | Show a small language badge in the bottom-right corner (e.g. the Python logo on a Django icon) |
43
+ | `languageIconStyles` | `React.CSSProperties` | `{}` | Custom styles for the language badge |
44
+
45
+ ### Platform Names
46
+
47
+ Platforms use a `language-framework` naming convention:
48
+
49
+ ```
50
+ python-django
51
+ javascript-react
52
+ ruby-rails
53
+ go-echo
54
+ ```
55
+
56
+ Both dashes and dots are accepted (`python-django` and `python.django` are equivalent). If an exact match isn’t found, the library falls back to the language icon (the part before the first dash), then to a generic default icon.
57
+
58
+ `node-*` is an alias for `javascript-*` for backwards compatibility.
59
+
60
+ You can get the full list of supported platform keys at runtime:
61
+
62
+ ```tsx
63
+ import { platforms } from ‘platformicons’;
64
+ // platforms is a string[] of all valid platform keys
65
+ ```
66
+
67
+ ### Preloading
68
+
69
+ To avoid render jank when icons appear on a new page, you can preload them:
70
+
71
+ ```tsx
72
+ import { preloadIcons } from ‘platformicons’;
73
+
74
+ // Preload all icons (both sizes)
75
+ preloadIcons();
76
+
77
+ // Preload only small or large icons
78
+ preloadIcons(‘sm’);
79
+ preloadIcons(‘lg’);
80
+ ```
81
+
82
+ This inserts `<link rel="preload">` tags into the document head.
83
+
84
+ ## Using SVGs Directly
85
+
86
+ If you aren’t using React, the raw SVG files are included in the package:
87
+
88
+ - `platformicons/svg/` — small icons (solid backgrounds, optimized for small sizes)
89
+ - `platformicons/svg_80x80/` — large icons (transparent backgrounds, 80x80px)
11
90
 
12
91
  ## Publishing Changes
13
92
 
@@ -18,3 +97,7 @@ Platformicons uses GitHub Actions to publish changes. You don’t need to update
18
97
  3. Head to the [Release workflow](https://github.com/getsentry/platformicons/actions/workflows/release.yml) and then run the workflow
19
98
  4. This will create an issue in [getsentry/publish](https://github.com/getsentry/publish/issues)
20
99
  5. Add the accepted label to publish
100
+
101
+ ## Contributing
102
+
103
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and how to add new icons.
@@ -0,0 +1,2 @@
1
+ export declare const icons: Record<string, string>;
2
+ export declare const iconsLg: Record<string, string>;