foamicons 0.10.1 → 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/llms.txt ADDED
@@ -0,0 +1,66 @@
1
+ # Foamicons
2
+
3
+ React SVG icon library with 170+ icons and 14 brand logos in three styles.
4
+
5
+ ## Naming
6
+
7
+ - All component names are PascalCase.
8
+ - Base (stroked) icons have no suffix: `Bell`
9
+ - Duotone variant: `BellDuotone`
10
+ - Filled variant: `BellFill`
11
+ - Logos use `Logo` prefix: `LogoInstagram`
12
+ - Dark variant: `LogoInstagramDark`
13
+ - Fill variant (currentColor): `LogoInstagramFill`
14
+
15
+ ## Aliases
16
+
17
+ Many icons have semantic aliases (e.g. `Settings` -> `Cog`, `Home` -> `House`).
18
+ Aliases are valid imports but canonical names are preferred in generated code.
19
+ Aliases apply to all variants: `Settings`, `SettingsDuotone`, `SettingsFill`.
20
+
21
+ ## Metadata (machine-readable)
22
+
23
+ Read the catalog instead of parsing dist/index.js:
24
+
25
+ ```js
26
+ import catalog from 'foamicons/catalog'; // { version, icons, logos, deprecated }
27
+ import aliases from 'foamicons/aliases'; // { alias: canonical }
28
+ import tags from 'foamicons/tags'; // { canonical: [tags] }
29
+ import deprecations from 'foamicons/deprecations'; // { old: new }
30
+ ```
31
+
32
+ Each catalog entry has: name, kind, variants, aliases, tags.
33
+
34
+ ## Typed helpers (runtime)
35
+
36
+ ```ts
37
+ import {
38
+ iconNames, // readonly string[] of all icon component names
39
+ logoNames, // readonly string[] of all logo component names
40
+ allNames, // combined
41
+ baseIconNames, // base names without variant suffixes
42
+ baseLogoNames, // base logo names without variant suffixes
43
+ iconAliases, // { canonical: [aliases] }
44
+ aliasToCanonical, // { alias: canonical }
45
+ iconTags, // { canonical: [tags] }
46
+ getCanonicalName, // (nameOrAlias) => canonical
47
+ } from 'foamicons';
48
+
49
+ // TypeScript types
50
+ import type { IconName, LogoName, BaseIconName, BaseLogoName } from 'foamicons';
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ ```tsx
56
+ import { Bell, BellDuotone, BellFill } from 'foamicons';
57
+
58
+ <Bell className="h-4 w-4" />
59
+ <BellDuotone secondaryOpacity={0.4} />
60
+ <BellFill size={24} />
61
+ ```
62
+
63
+ ## Props
64
+
65
+ size (default 16), strokeWidth (default 1), absoluteStrokeWidth (default true),
66
+ color, secondaryColor, secondaryOpacity (default 0.4), className, ...SVGProps.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foamicons",
3
- "version": "0.10.1",
3
+ "version": "1.0.0",
4
4
  "description": "Foam icon library for React",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -16,15 +16,28 @@
16
16
  "types": "./dist/index.d.cts",
17
17
  "default": "./dist/index.cjs"
18
18
  }
19
+ },
20
+ "./catalog": {
21
+ "default": "./dist/catalog.json"
22
+ },
23
+ "./aliases": {
24
+ "default": "./dist/aliases.json"
25
+ },
26
+ "./tags": {
27
+ "default": "./dist/tags.json"
28
+ },
29
+ "./deprecations": {
30
+ "default": "./dist/deprecations.json"
19
31
  }
20
32
  },
21
33
  "files": [
22
- "dist"
34
+ "dist",
35
+ "llms.txt"
23
36
  ],
24
37
  "sideEffects": false,
25
38
  "scripts": {
26
39
  "generate": "tsx scripts/build-icons.ts",
27
- "build": "pnpm run generate && tsup",
40
+ "build": "pnpm run generate && tsup && tsx scripts/build-metadata.ts",
28
41
  "test": "vitest run",
29
42
  "test:watch": "vitest",
30
43
  "prepublishOnly": "pnpm run build"