tempest-react-sdk 0.41.0 → 0.42.1

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.
Files changed (119) hide show
  1. package/README.md +3 -3
  2. package/bin/tempest.mjs +3 -3
  3. package/dist/auth/create-tempest-auth.cjs +1 -1
  4. package/dist/auth/create-tempest-auth.cjs.map +1 -1
  5. package/dist/auth/create-tempest-auth.js +34 -30
  6. package/dist/auth/create-tempest-auth.js.map +1 -1
  7. package/dist/br.cjs +1 -1
  8. package/dist/br.cjs.map +1 -1
  9. package/dist/br.d.ts +0 -13
  10. package/dist/br.js +14 -15
  11. package/dist/br.js.map +1 -1
  12. package/dist/charts/palette.cjs +1 -1
  13. package/dist/charts/palette.cjs.map +1 -1
  14. package/dist/charts/palette.js +4 -4
  15. package/dist/charts/palette.js.map +1 -1
  16. package/dist/charts.cjs +1 -1
  17. package/dist/charts.d.ts +0 -3
  18. package/dist/charts.js +8 -8
  19. package/dist/http/api-client.cjs +1 -1
  20. package/dist/http/api-client.cjs.map +1 -1
  21. package/dist/http/api-client.js +58 -30
  22. package/dist/http/api-client.js.map +1 -1
  23. package/dist/http/resumable-upload.cjs +1 -1
  24. package/dist/http/resumable-upload.js +6 -6
  25. package/dist/icons/generated/aliases.cjs +1 -1
  26. package/dist/icons/generated/aliases.cjs.map +1 -1
  27. package/dist/icons/generated/aliases.js +9 -0
  28. package/dist/icons/generated/aliases.js.map +1 -1
  29. package/dist/icons/generated/icon-names.cjs +1 -1
  30. package/dist/icons/generated/icon-names.cjs.map +1 -1
  31. package/dist/icons/generated/icon-names.js +1 -1
  32. package/dist/icons/generated/icon-names.js.map +1 -1
  33. package/dist/icons/generated/shard-a.cjs +1 -1
  34. package/dist/icons/generated/shard-a.cjs.map +1 -1
  35. package/dist/icons/generated/shard-a.js +61 -61
  36. package/dist/icons/generated/shard-a.js.map +1 -1
  37. package/dist/icons/generated/shard-b.cjs +1 -1
  38. package/dist/icons/generated/shard-b.cjs.map +1 -1
  39. package/dist/icons/generated/shard-b.js +15 -13
  40. package/dist/icons/generated/shard-b.js.map +1 -1
  41. package/dist/icons/generated/shard-e.cjs +1 -1
  42. package/dist/icons/generated/shard-e.cjs.map +1 -1
  43. package/dist/icons/generated/shard-e.js +20 -19
  44. package/dist/icons/generated/shard-e.js.map +1 -1
  45. package/dist/icons/generated/shard-f.cjs +1 -1
  46. package/dist/icons/generated/shard-f.cjs.map +1 -1
  47. package/dist/icons/generated/shard-f.js +140 -134
  48. package/dist/icons/generated/shard-f.js.map +1 -1
  49. package/dist/icons/generated/shard-h.cjs +1 -1
  50. package/dist/icons/generated/shard-h.cjs.map +1 -1
  51. package/dist/icons/generated/shard-h.js +13 -14
  52. package/dist/icons/generated/shard-h.js.map +1 -1
  53. package/dist/icons/generated/shard-l.cjs +1 -1
  54. package/dist/icons/generated/shard-l.cjs.map +1 -1
  55. package/dist/icons/generated/shard-l.js +73 -69
  56. package/dist/icons/generated/shard-l.js.map +1 -1
  57. package/dist/icons/generated/shard-m.cjs +1 -1
  58. package/dist/icons/generated/shard-m.cjs.map +1 -1
  59. package/dist/icons/generated/shard-m.js +101 -98
  60. package/dist/icons/generated/shard-m.js.map +1 -1
  61. package/dist/icons/generated/shard-p.cjs +1 -1
  62. package/dist/icons/generated/shard-p.cjs.map +1 -1
  63. package/dist/icons/generated/shard-p.js +19 -20
  64. package/dist/icons/generated/shard-p.js.map +1 -1
  65. package/dist/icons/generated/shard-r.cjs +1 -1
  66. package/dist/icons/generated/shard-r.cjs.map +1 -1
  67. package/dist/icons/generated/shard-r.js +19 -17
  68. package/dist/icons/generated/shard-r.js.map +1 -1
  69. package/dist/icons/generated/shard-s.cjs +1 -1
  70. package/dist/icons/generated/shard-s.cjs.map +1 -1
  71. package/dist/icons/generated/shard-s.js +160 -159
  72. package/dist/icons/generated/shard-s.js.map +1 -1
  73. package/dist/icons/generated/shard-u.cjs +1 -1
  74. package/dist/icons/generated/shard-u.cjs.map +1 -1
  75. package/dist/icons/generated/shard-u.js +11 -10
  76. package/dist/icons/generated/shard-u.js.map +1 -1
  77. package/dist/icons/material-symbols.cjs +2 -0
  78. package/dist/icons/material-symbols.cjs.map +1 -0
  79. package/dist/icons/material-symbols.js +32 -0
  80. package/dist/icons/material-symbols.js.map +1 -0
  81. package/dist/icons/shard-cache.cjs.map +1 -1
  82. package/dist/icons/shard-cache.js.map +1 -1
  83. package/dist/icons.cjs +1 -1
  84. package/dist/icons.d.ts +74 -5
  85. package/dist/icons.js +2 -1
  86. package/dist/imaging/encode.cjs +1 -1
  87. package/dist/imaging/encode.cjs.map +1 -1
  88. package/dist/imaging/encode.js +1 -4
  89. package/dist/imaging/encode.js.map +1 -1
  90. package/dist/imaging.cjs +1 -1
  91. package/dist/imaging.d.ts +0 -7
  92. package/dist/imaging.js +6 -6
  93. package/dist/tabular/compact.cjs +1 -1
  94. package/dist/tabular/compact.cjs.map +1 -1
  95. package/dist/tabular/compact.js +8 -8
  96. package/dist/tabular/compact.js.map +1 -1
  97. package/dist/tabular/manifest.cjs +1 -1
  98. package/dist/tabular/manifest.cjs.map +1 -1
  99. package/dist/tabular/manifest.js +13 -14
  100. package/dist/tabular/manifest.js.map +1 -1
  101. package/dist/tabular.cjs +1 -1
  102. package/dist/tabular.d.ts +0 -9
  103. package/dist/tabular.js +5 -5
  104. package/dist/tempest-react-sdk.cjs +1 -1
  105. package/dist/tempest-react-sdk.d.ts +72 -305
  106. package/dist/tempest-react-sdk.js +183 -188
  107. package/dist/vision/index.cjs +1 -1
  108. package/dist/vision/index.cjs.map +1 -1
  109. package/dist/vision/index.js +1 -1
  110. package/dist/vision/index.js.map +1 -1
  111. package/dist/vision/preprocess/pipeline.cjs +1 -1
  112. package/dist/vision/preprocess/pipeline.cjs.map +1 -1
  113. package/dist/vision/preprocess/pipeline.js +43 -28
  114. package/dist/vision/preprocess/pipeline.js.map +1 -1
  115. package/dist/vision.d.ts +6 -3
  116. package/dist/vite.cjs +1 -1
  117. package/dist/vite.d.ts +0 -25
  118. package/dist/vite.js +6 -6
  119. package/package.json +5 -5
@@ -0,0 +1,2 @@
1
+ var e=`circle-question-mark`,t={brush:`brush`,build:`wrench`,code:`code`,delivery_dining:`bike`,electrical_services:`plug-zap`,format_paint:`paint-roller`,gavel:`gavel`,handyman:`wrench`,hardware:`wrench`,key:`key`,lock:`lock`,mic:`mic`,palette:`palette`,pedal_bike:`bike`,plumbing:`shower-head`,router:`router`,settings:`settings`,shield:`shield`,smartphone:`smartphone`,tv:`tv`,two_wheeler:`bike`,warehouse:`warehouse`};function n(n,r=e){return n?t[n.trim().toLowerCase()]??r:r}exports.MATERIAL_SYMBOL_FALLBACK=e,exports.fromMaterialSymbol=n,exports.materialToLucide=t;
2
+ //# sourceMappingURL=material-symbols.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"material-symbols.cjs","names":[],"sources":["../../src/icons/material-symbols.ts"],"sourcesContent":["import type { IconName } from \"./generated/icon-name\";\n\n/**\n * The slug `fromMaterialSymbol` falls back to when a code is unknown.\n *\n * A neutral glyph rather than nothing: a category created in an admin with a\n * code this table has not learned yet still has to draw something, or it opens a\n * hole in the grid and the bug reads as a layout problem instead of a missing\n * mapping.\n *\n * Lucide's `circle-help` is a deprecated alias of this slug. `<Icon>` resolves\n * aliases, so both render — but the bridge emits the canonical name, since a\n * value that gets persisted should not be one lucide has already renamed.\n */\nexport const MATERIAL_SYMBOL_FALLBACK: IconName = \"circle-question-mark\";\n\n/**\n * Material Symbols code → lucide slug, for backends that store `icon_code`.\n *\n * Every Python backend we write stores a category icon as a Material Symbol\n * (`build`, `format_paint`, `electrical_services`) — the vocabulary Flutter,\n * Android and the administrative seeds already speak. The SDK speaks lucide in\n * kebab-case. The two lists do not meet, and the failure is nastier than an\n * empty screen: a handful of codes collide by accident, so roughly one row in\n * ten draws the right icon and the bug reads as \"some icons went missing\".\n *\n * **This is a seed table, not the full vocabulary.** Material Symbols ships\n * ~3600 names and almost none of them will ever appear in an `icon_code` of\n * ours. It grows on demand, one hand-written pair at a time — a map generated by\n * name heuristics gets it badly wrong, starting with `build`, which is a wrench\n * in Material Symbols and not anything to do with construction.\n *\n * **Approximations, deliberate and not one-to-one:**\n *\n * - `plumbing` → `shower-head`, because lucide has no pipe.\n * - `build`, `handyman` and `hardware` all land on `wrench` — Material Symbols\n * distinguishes the tools, lucide does not.\n * - `pedal_bike`, `two_wheeler` and `delivery_dining` all land on `bike`.\n *\n * The thirteen identity pairs are here on purpose. Their names happen to match\n * in both vocabularies, so they already render today — leaving them out would\n * send them to {@link MATERIAL_SYMBOL_FALLBACK} and make this bridge a\n * regression for exactly the codes that used to work.\n *\n * @see fromMaterialSymbol — the lookup you normally call.\n */\nexport const materialToLucide: Readonly<Record<string, IconName>> = {\n brush: \"brush\",\n build: \"wrench\",\n code: \"code\",\n delivery_dining: \"bike\",\n electrical_services: \"plug-zap\",\n format_paint: \"paint-roller\",\n gavel: \"gavel\",\n handyman: \"wrench\",\n hardware: \"wrench\",\n key: \"key\",\n lock: \"lock\",\n mic: \"mic\",\n palette: \"palette\",\n pedal_bike: \"bike\",\n plumbing: \"shower-head\",\n router: \"router\",\n settings: \"settings\",\n shield: \"shield\",\n smartphone: \"smartphone\",\n tv: \"tv\",\n two_wheeler: \"bike\",\n warehouse: \"warehouse\",\n};\n\n/**\n * Translate a Material Symbols code into a lucide slug, always returning one.\n *\n * Never returns `undefined`: an unknown code resolves to `fallback`, so a row\n * whose `icon_code` this table has not learned yet still renders. The input is\n * trimmed and lower-cased before lookup, because a seed written by hand is the\n * kind of source that carries stray whitespace and the odd capital.\n *\n * Nothing else in `/icons` imports this module, so an app that does not store\n * Material Symbols never pays for the table.\n *\n * @example\n * <Icon name={fromMaterialSymbol(category.icon_code)} size={20} />\n *\n * @example\n * <Icon name={fromMaterialSymbol(category.icon_code, \"folder\")} size={20} />\n *\n * @param code - A Material Symbols name, or `null`/`undefined` for a row that has none.\n * @param fallback - Slug to use when `code` is empty or unknown. Defaults to {@link MATERIAL_SYMBOL_FALLBACK}.\n * @returns A lucide slug `<Icon>` can render.\n */\nexport function fromMaterialSymbol(\n code: string | null | undefined,\n fallback: IconName = MATERIAL_SYMBOL_FALLBACK,\n): IconName {\n if (!code) return fallback;\n return materialToLucide[code.trim().toLowerCase()] ?? fallback;\n}\n"],"mappings":"AAcA,IAAa,EAAqC,uBAgCrC,EAAuD,CAChE,MAAO,QACP,MAAO,SACP,KAAM,OACN,gBAAiB,OACjB,oBAAqB,WACrB,aAAc,eACd,MAAO,QACP,SAAU,SACV,SAAU,SACV,IAAK,MACL,KAAM,OACN,IAAK,MACL,QAAS,UACT,WAAY,OACZ,SAAU,cACV,OAAQ,SACR,SAAU,WACV,OAAQ,SACR,WAAY,aACZ,GAAI,KACJ,YAAa,OACb,UAAW,WACf,EAuBA,SAAgB,EACZ,EACA,EAAqB,EACb,CAER,OADK,EACE,EAAiB,EAAK,KAAK,CAAC,CAAC,YAAY,IAAM,EADpC,CAEtB"}
@@ -0,0 +1,32 @@
1
+ //#region src/icons/material-symbols.ts
2
+ var e = "circle-question-mark", t = {
3
+ brush: "brush",
4
+ build: "wrench",
5
+ code: "code",
6
+ delivery_dining: "bike",
7
+ electrical_services: "plug-zap",
8
+ format_paint: "paint-roller",
9
+ gavel: "gavel",
10
+ handyman: "wrench",
11
+ hardware: "wrench",
12
+ key: "key",
13
+ lock: "lock",
14
+ mic: "mic",
15
+ palette: "palette",
16
+ pedal_bike: "bike",
17
+ plumbing: "shower-head",
18
+ router: "router",
19
+ settings: "settings",
20
+ shield: "shield",
21
+ smartphone: "smartphone",
22
+ tv: "tv",
23
+ two_wheeler: "bike",
24
+ warehouse: "warehouse"
25
+ };
26
+ function n(n, r = e) {
27
+ return n ? t[n.trim().toLowerCase()] ?? r : r;
28
+ }
29
+ //#endregion
30
+ export { e as MATERIAL_SYMBOL_FALLBACK, n as fromMaterialSymbol, t as materialToLucide };
31
+
32
+ //# sourceMappingURL=material-symbols.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"material-symbols.js","names":[],"sources":["../../src/icons/material-symbols.ts"],"sourcesContent":["import type { IconName } from \"./generated/icon-name\";\n\n/**\n * The slug `fromMaterialSymbol` falls back to when a code is unknown.\n *\n * A neutral glyph rather than nothing: a category created in an admin with a\n * code this table has not learned yet still has to draw something, or it opens a\n * hole in the grid and the bug reads as a layout problem instead of a missing\n * mapping.\n *\n * Lucide's `circle-help` is a deprecated alias of this slug. `<Icon>` resolves\n * aliases, so both render — but the bridge emits the canonical name, since a\n * value that gets persisted should not be one lucide has already renamed.\n */\nexport const MATERIAL_SYMBOL_FALLBACK: IconName = \"circle-question-mark\";\n\n/**\n * Material Symbols code → lucide slug, for backends that store `icon_code`.\n *\n * Every Python backend we write stores a category icon as a Material Symbol\n * (`build`, `format_paint`, `electrical_services`) — the vocabulary Flutter,\n * Android and the administrative seeds already speak. The SDK speaks lucide in\n * kebab-case. The two lists do not meet, and the failure is nastier than an\n * empty screen: a handful of codes collide by accident, so roughly one row in\n * ten draws the right icon and the bug reads as \"some icons went missing\".\n *\n * **This is a seed table, not the full vocabulary.** Material Symbols ships\n * ~3600 names and almost none of them will ever appear in an `icon_code` of\n * ours. It grows on demand, one hand-written pair at a time — a map generated by\n * name heuristics gets it badly wrong, starting with `build`, which is a wrench\n * in Material Symbols and not anything to do with construction.\n *\n * **Approximations, deliberate and not one-to-one:**\n *\n * - `plumbing` → `shower-head`, because lucide has no pipe.\n * - `build`, `handyman` and `hardware` all land on `wrench` — Material Symbols\n * distinguishes the tools, lucide does not.\n * - `pedal_bike`, `two_wheeler` and `delivery_dining` all land on `bike`.\n *\n * The thirteen identity pairs are here on purpose. Their names happen to match\n * in both vocabularies, so they already render today — leaving them out would\n * send them to {@link MATERIAL_SYMBOL_FALLBACK} and make this bridge a\n * regression for exactly the codes that used to work.\n *\n * @see fromMaterialSymbol — the lookup you normally call.\n */\nexport const materialToLucide: Readonly<Record<string, IconName>> = {\n brush: \"brush\",\n build: \"wrench\",\n code: \"code\",\n delivery_dining: \"bike\",\n electrical_services: \"plug-zap\",\n format_paint: \"paint-roller\",\n gavel: \"gavel\",\n handyman: \"wrench\",\n hardware: \"wrench\",\n key: \"key\",\n lock: \"lock\",\n mic: \"mic\",\n palette: \"palette\",\n pedal_bike: \"bike\",\n plumbing: \"shower-head\",\n router: \"router\",\n settings: \"settings\",\n shield: \"shield\",\n smartphone: \"smartphone\",\n tv: \"tv\",\n two_wheeler: \"bike\",\n warehouse: \"warehouse\",\n};\n\n/**\n * Translate a Material Symbols code into a lucide slug, always returning one.\n *\n * Never returns `undefined`: an unknown code resolves to `fallback`, so a row\n * whose `icon_code` this table has not learned yet still renders. The input is\n * trimmed and lower-cased before lookup, because a seed written by hand is the\n * kind of source that carries stray whitespace and the odd capital.\n *\n * Nothing else in `/icons` imports this module, so an app that does not store\n * Material Symbols never pays for the table.\n *\n * @example\n * <Icon name={fromMaterialSymbol(category.icon_code)} size={20} />\n *\n * @example\n * <Icon name={fromMaterialSymbol(category.icon_code, \"folder\")} size={20} />\n *\n * @param code - A Material Symbols name, or `null`/`undefined` for a row that has none.\n * @param fallback - Slug to use when `code` is empty or unknown. Defaults to {@link MATERIAL_SYMBOL_FALLBACK}.\n * @returns A lucide slug `<Icon>` can render.\n */\nexport function fromMaterialSymbol(\n code: string | null | undefined,\n fallback: IconName = MATERIAL_SYMBOL_FALLBACK,\n): IconName {\n if (!code) return fallback;\n return materialToLucide[code.trim().toLowerCase()] ?? fallback;\n}\n"],"mappings":";AAcA,IAAa,IAAqC,wBAgCrC,IAAuD;CAChE,OAAO;CACP,OAAO;CACP,MAAM;CACN,iBAAiB;CACjB,qBAAqB;CACrB,cAAc;CACd,OAAO;CACP,UAAU;CACV,UAAU;CACV,KAAK;CACL,MAAM;CACN,KAAK;CACL,SAAS;CACT,YAAY;CACZ,UAAU;CACV,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,YAAY;CACZ,IAAI;CACJ,aAAa;CACb,WAAW;AACf;AAuBA,SAAgB,EACZ,GACA,IAAqB,GACb;CAER,OADK,IACE,EAAiB,EAAK,KAAK,CAAC,CAAC,YAAY,MAAM,IADpC;AAEtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"shard-cache.cjs","names":[],"sources":["../../src/icons/shard-cache.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\n\nimport { iconAliases } from \"./generated/aliases\";\nimport { shardLoaders } from \"./generated/loaders\";\n\n/**\n * Slugs resolved so far, across every shard already fetched.\n *\n * Module-level and readable **synchronously**, which is the whole point: once a\n * page has rendered one icon whose slug starts with `s`, every other `s` icon is\n * already in memory and paints on its first frame. A cache that could only be\n * read from an effect would flash a fallback for each new icon, which is the\n * behavior `lucide-react`'s own `DynamicIcon` has.\n */\nconst resolved = new Map<string, LucideIcon>();\n\n/** In-flight shard fetches, so N icons from one shard trigger one import. */\nconst inFlight = new Map<string, Promise<void>>();\n\n/**\n * Initial letters whose shard has already settled.\n *\n * Needed to tell \"still loading\" from \"no such icon\": until the shard arrives,\n * absence from `resolved` proves nothing. Only once the letter is in here does a\n * missing slug mean the name is genuinely wrong — which is what lets `Icon` warn\n * about a typo without also warning on every icon mid-flight.\n */\nconst settledLetters = new Set<string>();\n\n/** Callbacks to run after a shard lands, so mounted `<Icon>`s re-render. */\nconst listeners = new Set<() => void>();\n\n/**\n * Map a slug to the canonical slug that owns the icon.\n *\n * Lucide keeps 248 deprecated aliases (`alert-circle` → `circle-alert`), and a\n * slug persisted in a database years ago is exactly the case this feature exists\n * for, so an alias must keep resolving after a lucide bump renames it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The canonical slug.\n */\nexport function resolveIconAlias(slug: string): string {\n return iconAliases[slug] ?? slug;\n}\n\n/**\n * Read an icon out of the cache without triggering a fetch.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The icon component, or `undefined` when its shard is not loaded yet.\n */\nexport function peekIcon(slug: string): LucideIcon | undefined {\n return resolved.get(resolveIconAlias(slug));\n}\n\n/**\n * Load the shard that owns `slug`, if it is not loaded or loading already.\n *\n * Resolves without error for an unknown slug: a name that came from an API is\n * data, not a programming mistake, so the caller renders its fallback instead of\n * seeing an exception thrown mid-render.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns A promise that settles once the shard is in the cache.\n */\nexport function loadIcon(slug: string): Promise<void> {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return Promise.resolve();\n\n const letter = canonical[0] ?? \"\";\n const loader = shardLoaders[letter];\n if (!loader) return Promise.resolve();\n\n const pending = inFlight.get(letter);\n if (pending) return pending;\n\n const promise = loader()\n .then((mod) => {\n for (const [name, icon] of Object.entries(mod.default)) resolved.set(name, icon);\n })\n .catch(() => undefined)\n .finally(() => {\n inFlight.delete(letter);\n settledLetters.add(letter);\n for (const listener of listeners) listener();\n });\n inFlight.set(letter, promise);\n return promise;\n}\n\n/**\n * Whether a slug is ready, still loading, or not an icon at all.\n *\n * `\"missing\"` is only reported once that is actually knowable: either lucide has\n * no icons under that initial letter, or the letter's shard already settled\n * without the slug in it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The slug's resolution state.\n */\nexport function iconStatus(slug: string): \"ready\" | \"loading\" | \"missing\" {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return \"ready\";\n const letter = canonical[0] ?? \"\";\n if (!shardLoaders[letter]) return \"missing\";\n return settledLetters.has(letter) ? \"missing\" : \"loading\";\n}\n\n/**\n * Warm the cache for slugs you know you are about to render.\n *\n * Useful right before opening a menu or a picker: the shards land while the user\n * is still reaching for it, so nothing flashes a fallback.\n *\n * @param slugs - Icon slugs to preload.\n * @returns A promise that settles when every needed shard is in the cache.\n */\nexport async function preloadIcons(slugs: readonly string[]): Promise<void> {\n await Promise.all(slugs.map(loadIcon));\n}\n\n/**\n * Subscribe to shard arrivals.\n *\n * @param listener - Called after each shard lands.\n * @returns An unsubscribe function.\n */\nexport function subscribeToIcons(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n"],"mappings":"gFAcA,IAAM,EAAW,IAAI,IAGf,EAAW,IAAI,IAUf,EAAiB,IAAI,IAGrB,EAAY,IAAI,IAYtB,SAAgB,EAAiB,EAAsB,CACnD,OAAO,EAAA,YAAY,IAAS,CAChC,CAQA,SAAgB,EAAS,EAAsC,CAC3D,OAAO,EAAS,IAAI,EAAiB,CAAI,CAAC,CAC9C,CAYA,SAAgB,EAAS,EAA6B,CAClD,IAAM,EAAY,EAAiB,CAAI,EACvC,GAAI,EAAS,IAAI,CAAS,EAAG,OAAO,QAAQ,QAAQ,EAEpD,IAAM,EAAS,EAAU,IAAM,GACzB,EAAS,EAAA,aAAa,GAC5B,GAAI,CAAC,EAAQ,OAAO,QAAQ,QAAQ,EAEpC,IAAM,EAAU,EAAS,IAAI,CAAM,EACnC,GAAI,EAAS,OAAO,EAEpB,IAAM,EAAU,EAAO,CAAC,CACnB,KAAM,GAAQ,CACX,IAAK,GAAM,CAAC,EAAM,KAAS,OAAO,QAAQ,EAAI,OAAO,EAAG,EAAS,IAAI,EAAM,CAAI,CACnF,CAAC,CAAC,CACD,UAAY,IAAA,EAAS,CAAC,CACtB,YAAc,CACX,EAAS,OAAO,CAAM,EACtB,EAAe,IAAI,CAAM,EACzB,IAAK,IAAM,KAAY,EAAW,EAAS,CAC/C,CAAC,EAEL,OADA,EAAS,IAAI,EAAQ,CAAO,EACrB,CACX,CAYA,SAAgB,EAAW,EAA+C,CACtE,IAAM,EAAY,EAAiB,CAAI,EACvC,GAAI,EAAS,IAAI,CAAS,EAAG,MAAO,QACpC,IAAM,EAAS,EAAU,IAAM,GAE/B,OADK,EAAA,aAAa,GACX,EAAe,IAAI,CAAM,EAAI,UAAY,UADd,SAEtC,CAWA,eAAsB,EAAa,EAAyC,CACxE,MAAM,QAAQ,IAAI,EAAM,IAAI,CAAQ,CAAC,CACzC,CAQA,SAAgB,EAAiB,EAAkC,CAE/D,OADA,EAAU,IAAI,CAAQ,MACT,EAAU,OAAO,CAAQ,CAC1C"}
1
+ {"version":3,"file":"shard-cache.cjs","names":[],"sources":["../../src/icons/shard-cache.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\n\nimport { iconAliases } from \"./generated/aliases\";\nimport { shardLoaders } from \"./generated/loaders\";\n\n/**\n * Slugs resolved so far, across every shard already fetched.\n *\n * Module-level and readable **synchronously**, which is the whole point: once a\n * page has rendered one icon whose slug starts with `s`, every other `s` icon is\n * already in memory and paints on its first frame. A cache that could only be\n * read from an effect would flash a fallback for each new icon, which is the\n * behavior `lucide-react`'s own `DynamicIcon` has.\n */\nconst resolved = new Map<string, LucideIcon>();\n\n/** In-flight shard fetches, so N icons from one shard trigger one import. */\nconst inFlight = new Map<string, Promise<void>>();\n\n/**\n * Initial letters whose shard has already settled.\n *\n * Needed to tell \"still loading\" from \"no such icon\": until the shard arrives,\n * absence from `resolved` proves nothing. Only once the letter is in here does a\n * missing slug mean the name is genuinely wrong — which is what lets `Icon` warn\n * about a typo without also warning on every icon mid-flight.\n */\nconst settledLetters = new Set<string>();\n\n/** Callbacks to run after a shard lands, so mounted `<Icon>`s re-render. */\nconst listeners = new Set<() => void>();\n\n/**\n * Map a slug to the canonical slug that owns the icon.\n *\n * Lucide keeps 257 deprecated aliases (`alert-circle` → `circle-alert`), and a\n * slug persisted in a database years ago is exactly the case this feature exists\n * for, so an alias must keep resolving after a lucide bump renames it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The canonical slug.\n */\nexport function resolveIconAlias(slug: string): string {\n return iconAliases[slug] ?? slug;\n}\n\n/**\n * Read an icon out of the cache without triggering a fetch.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The icon component, or `undefined` when its shard is not loaded yet.\n */\nexport function peekIcon(slug: string): LucideIcon | undefined {\n return resolved.get(resolveIconAlias(slug));\n}\n\n/**\n * Load the shard that owns `slug`, if it is not loaded or loading already.\n *\n * Resolves without error for an unknown slug: a name that came from an API is\n * data, not a programming mistake, so the caller renders its fallback instead of\n * seeing an exception thrown mid-render.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns A promise that settles once the shard is in the cache.\n */\nexport function loadIcon(slug: string): Promise<void> {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return Promise.resolve();\n\n const letter = canonical[0] ?? \"\";\n const loader = shardLoaders[letter];\n if (!loader) return Promise.resolve();\n\n const pending = inFlight.get(letter);\n if (pending) return pending;\n\n const promise = loader()\n .then((mod) => {\n for (const [name, icon] of Object.entries(mod.default)) resolved.set(name, icon);\n })\n .catch(() => undefined)\n .finally(() => {\n inFlight.delete(letter);\n settledLetters.add(letter);\n for (const listener of listeners) listener();\n });\n inFlight.set(letter, promise);\n return promise;\n}\n\n/**\n * Whether a slug is ready, still loading, or not an icon at all.\n *\n * `\"missing\"` is only reported once that is actually knowable: either lucide has\n * no icons under that initial letter, or the letter's shard already settled\n * without the slug in it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The slug's resolution state.\n */\nexport function iconStatus(slug: string): \"ready\" | \"loading\" | \"missing\" {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return \"ready\";\n const letter = canonical[0] ?? \"\";\n if (!shardLoaders[letter]) return \"missing\";\n return settledLetters.has(letter) ? \"missing\" : \"loading\";\n}\n\n/**\n * Warm the cache for slugs you know you are about to render.\n *\n * Useful right before opening a menu or a picker: the shards land while the user\n * is still reaching for it, so nothing flashes a fallback.\n *\n * @param slugs - Icon slugs to preload.\n * @returns A promise that settles when every needed shard is in the cache.\n */\nexport async function preloadIcons(slugs: readonly string[]): Promise<void> {\n await Promise.all(slugs.map(loadIcon));\n}\n\n/**\n * Subscribe to shard arrivals.\n *\n * @param listener - Called after each shard lands.\n * @returns An unsubscribe function.\n */\nexport function subscribeToIcons(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n"],"mappings":"gFAcA,IAAM,EAAW,IAAI,IAGf,EAAW,IAAI,IAUf,EAAiB,IAAI,IAGrB,EAAY,IAAI,IAYtB,SAAgB,EAAiB,EAAsB,CACnD,OAAO,EAAA,YAAY,IAAS,CAChC,CAQA,SAAgB,EAAS,EAAsC,CAC3D,OAAO,EAAS,IAAI,EAAiB,CAAI,CAAC,CAC9C,CAYA,SAAgB,EAAS,EAA6B,CAClD,IAAM,EAAY,EAAiB,CAAI,EACvC,GAAI,EAAS,IAAI,CAAS,EAAG,OAAO,QAAQ,QAAQ,EAEpD,IAAM,EAAS,EAAU,IAAM,GACzB,EAAS,EAAA,aAAa,GAC5B,GAAI,CAAC,EAAQ,OAAO,QAAQ,QAAQ,EAEpC,IAAM,EAAU,EAAS,IAAI,CAAM,EACnC,GAAI,EAAS,OAAO,EAEpB,IAAM,EAAU,EAAO,CAAC,CACnB,KAAM,GAAQ,CACX,IAAK,GAAM,CAAC,EAAM,KAAS,OAAO,QAAQ,EAAI,OAAO,EAAG,EAAS,IAAI,EAAM,CAAI,CACnF,CAAC,CAAC,CACD,UAAY,IAAA,EAAS,CAAC,CACtB,YAAc,CACX,EAAS,OAAO,CAAM,EACtB,EAAe,IAAI,CAAM,EACzB,IAAK,IAAM,KAAY,EAAW,EAAS,CAC/C,CAAC,EAEL,OADA,EAAS,IAAI,EAAQ,CAAO,EACrB,CACX,CAYA,SAAgB,EAAW,EAA+C,CACtE,IAAM,EAAY,EAAiB,CAAI,EACvC,GAAI,EAAS,IAAI,CAAS,EAAG,MAAO,QACpC,IAAM,EAAS,EAAU,IAAM,GAE/B,OADK,EAAA,aAAa,GACX,EAAe,IAAI,CAAM,EAAI,UAAY,UADd,SAEtC,CAWA,eAAsB,EAAa,EAAyC,CACxE,MAAM,QAAQ,IAAI,EAAM,IAAI,CAAQ,CAAC,CACzC,CAQA,SAAgB,EAAiB,EAAkC,CAE/D,OADA,EAAU,IAAI,CAAQ,MACT,EAAU,OAAO,CAAQ,CAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"shard-cache.js","names":[],"sources":["../../src/icons/shard-cache.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\n\nimport { iconAliases } from \"./generated/aliases\";\nimport { shardLoaders } from \"./generated/loaders\";\n\n/**\n * Slugs resolved so far, across every shard already fetched.\n *\n * Module-level and readable **synchronously**, which is the whole point: once a\n * page has rendered one icon whose slug starts with `s`, every other `s` icon is\n * already in memory and paints on its first frame. A cache that could only be\n * read from an effect would flash a fallback for each new icon, which is the\n * behavior `lucide-react`'s own `DynamicIcon` has.\n */\nconst resolved = new Map<string, LucideIcon>();\n\n/** In-flight shard fetches, so N icons from one shard trigger one import. */\nconst inFlight = new Map<string, Promise<void>>();\n\n/**\n * Initial letters whose shard has already settled.\n *\n * Needed to tell \"still loading\" from \"no such icon\": until the shard arrives,\n * absence from `resolved` proves nothing. Only once the letter is in here does a\n * missing slug mean the name is genuinely wrong — which is what lets `Icon` warn\n * about a typo without also warning on every icon mid-flight.\n */\nconst settledLetters = new Set<string>();\n\n/** Callbacks to run after a shard lands, so mounted `<Icon>`s re-render. */\nconst listeners = new Set<() => void>();\n\n/**\n * Map a slug to the canonical slug that owns the icon.\n *\n * Lucide keeps 248 deprecated aliases (`alert-circle` → `circle-alert`), and a\n * slug persisted in a database years ago is exactly the case this feature exists\n * for, so an alias must keep resolving after a lucide bump renames it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The canonical slug.\n */\nexport function resolveIconAlias(slug: string): string {\n return iconAliases[slug] ?? slug;\n}\n\n/**\n * Read an icon out of the cache without triggering a fetch.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The icon component, or `undefined` when its shard is not loaded yet.\n */\nexport function peekIcon(slug: string): LucideIcon | undefined {\n return resolved.get(resolveIconAlias(slug));\n}\n\n/**\n * Load the shard that owns `slug`, if it is not loaded or loading already.\n *\n * Resolves without error for an unknown slug: a name that came from an API is\n * data, not a programming mistake, so the caller renders its fallback instead of\n * seeing an exception thrown mid-render.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns A promise that settles once the shard is in the cache.\n */\nexport function loadIcon(slug: string): Promise<void> {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return Promise.resolve();\n\n const letter = canonical[0] ?? \"\";\n const loader = shardLoaders[letter];\n if (!loader) return Promise.resolve();\n\n const pending = inFlight.get(letter);\n if (pending) return pending;\n\n const promise = loader()\n .then((mod) => {\n for (const [name, icon] of Object.entries(mod.default)) resolved.set(name, icon);\n })\n .catch(() => undefined)\n .finally(() => {\n inFlight.delete(letter);\n settledLetters.add(letter);\n for (const listener of listeners) listener();\n });\n inFlight.set(letter, promise);\n return promise;\n}\n\n/**\n * Whether a slug is ready, still loading, or not an icon at all.\n *\n * `\"missing\"` is only reported once that is actually knowable: either lucide has\n * no icons under that initial letter, or the letter's shard already settled\n * without the slug in it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The slug's resolution state.\n */\nexport function iconStatus(slug: string): \"ready\" | \"loading\" | \"missing\" {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return \"ready\";\n const letter = canonical[0] ?? \"\";\n if (!shardLoaders[letter]) return \"missing\";\n return settledLetters.has(letter) ? \"missing\" : \"loading\";\n}\n\n/**\n * Warm the cache for slugs you know you are about to render.\n *\n * Useful right before opening a menu or a picker: the shards land while the user\n * is still reaching for it, so nothing flashes a fallback.\n *\n * @param slugs - Icon slugs to preload.\n * @returns A promise that settles when every needed shard is in the cache.\n */\nexport async function preloadIcons(slugs: readonly string[]): Promise<void> {\n await Promise.all(slugs.map(loadIcon));\n}\n\n/**\n * Subscribe to shard arrivals.\n *\n * @param listener - Called after each shard lands.\n * @returns An unsubscribe function.\n */\nexport function subscribeToIcons(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n"],"mappings":";;;AAcA,IAAM,oBAAW,IAAI,IAAwB,GAGvC,oBAAW,IAAI,IAA2B,GAU1C,oBAAiB,IAAI,IAAY,GAGjC,oBAAY,IAAI,IAAgB;AAYtC,SAAgB,EAAiB,GAAsB;CACnD,OAAO,EAAY,MAAS;AAChC;AAQA,SAAgB,EAAS,GAAsC;CAC3D,OAAO,EAAS,IAAI,EAAiB,CAAI,CAAC;AAC9C;AAYA,SAAgB,EAAS,GAA6B;CAClD,IAAM,IAAY,EAAiB,CAAI;CACvC,IAAI,EAAS,IAAI,CAAS,GAAG,OAAO,QAAQ,QAAQ;CAEpD,IAAM,IAAS,EAAU,MAAM,IACzB,IAAS,EAAa;CAC5B,IAAI,CAAC,GAAQ,OAAO,QAAQ,QAAQ;CAEpC,IAAM,IAAU,EAAS,IAAI,CAAM;CACnC,IAAI,GAAS,OAAO;CAEpB,IAAM,IAAU,EAAO,CAAC,CACnB,MAAM,MAAQ;EACX,KAAK,IAAM,CAAC,GAAM,MAAS,OAAO,QAAQ,EAAI,OAAO,GAAG,EAAS,IAAI,GAAM,CAAI;CACnF,CAAC,CAAC,CACD,YAAY,KAAA,CAAS,CAAC,CACtB,cAAc;EAEX,AADA,EAAS,OAAO,CAAM,GACtB,EAAe,IAAI,CAAM;EACzB,KAAK,IAAM,KAAY,GAAW,EAAS;CAC/C,CAAC;CAEL,OADA,EAAS,IAAI,GAAQ,CAAO,GACrB;AACX;AAYA,SAAgB,EAAW,GAA+C;CACtE,IAAM,IAAY,EAAiB,CAAI;CACvC,IAAI,EAAS,IAAI,CAAS,GAAG,OAAO;CACpC,IAAM,IAAS,EAAU,MAAM;CAE/B,OADK,EAAa,KACX,EAAe,IAAI,CAAM,IAAI,YAAY,YADd;AAEtC;AAWA,eAAsB,EAAa,GAAyC;CACxE,MAAM,QAAQ,IAAI,EAAM,IAAI,CAAQ,CAAC;AACzC;AAQA,SAAgB,EAAiB,GAAkC;CAE/D,OADA,EAAU,IAAI,CAAQ,SACT,EAAU,OAAO,CAAQ;AAC1C"}
1
+ {"version":3,"file":"shard-cache.js","names":[],"sources":["../../src/icons/shard-cache.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\n\nimport { iconAliases } from \"./generated/aliases\";\nimport { shardLoaders } from \"./generated/loaders\";\n\n/**\n * Slugs resolved so far, across every shard already fetched.\n *\n * Module-level and readable **synchronously**, which is the whole point: once a\n * page has rendered one icon whose slug starts with `s`, every other `s` icon is\n * already in memory and paints on its first frame. A cache that could only be\n * read from an effect would flash a fallback for each new icon, which is the\n * behavior `lucide-react`'s own `DynamicIcon` has.\n */\nconst resolved = new Map<string, LucideIcon>();\n\n/** In-flight shard fetches, so N icons from one shard trigger one import. */\nconst inFlight = new Map<string, Promise<void>>();\n\n/**\n * Initial letters whose shard has already settled.\n *\n * Needed to tell \"still loading\" from \"no such icon\": until the shard arrives,\n * absence from `resolved` proves nothing. Only once the letter is in here does a\n * missing slug mean the name is genuinely wrong — which is what lets `Icon` warn\n * about a typo without also warning on every icon mid-flight.\n */\nconst settledLetters = new Set<string>();\n\n/** Callbacks to run after a shard lands, so mounted `<Icon>`s re-render. */\nconst listeners = new Set<() => void>();\n\n/**\n * Map a slug to the canonical slug that owns the icon.\n *\n * Lucide keeps 257 deprecated aliases (`alert-circle` → `circle-alert`), and a\n * slug persisted in a database years ago is exactly the case this feature exists\n * for, so an alias must keep resolving after a lucide bump renames it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The canonical slug.\n */\nexport function resolveIconAlias(slug: string): string {\n return iconAliases[slug] ?? slug;\n}\n\n/**\n * Read an icon out of the cache without triggering a fetch.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The icon component, or `undefined` when its shard is not loaded yet.\n */\nexport function peekIcon(slug: string): LucideIcon | undefined {\n return resolved.get(resolveIconAlias(slug));\n}\n\n/**\n * Load the shard that owns `slug`, if it is not loaded or loading already.\n *\n * Resolves without error for an unknown slug: a name that came from an API is\n * data, not a programming mistake, so the caller renders its fallback instead of\n * seeing an exception thrown mid-render.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns A promise that settles once the shard is in the cache.\n */\nexport function loadIcon(slug: string): Promise<void> {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return Promise.resolve();\n\n const letter = canonical[0] ?? \"\";\n const loader = shardLoaders[letter];\n if (!loader) return Promise.resolve();\n\n const pending = inFlight.get(letter);\n if (pending) return pending;\n\n const promise = loader()\n .then((mod) => {\n for (const [name, icon] of Object.entries(mod.default)) resolved.set(name, icon);\n })\n .catch(() => undefined)\n .finally(() => {\n inFlight.delete(letter);\n settledLetters.add(letter);\n for (const listener of listeners) listener();\n });\n inFlight.set(letter, promise);\n return promise;\n}\n\n/**\n * Whether a slug is ready, still loading, or not an icon at all.\n *\n * `\"missing\"` is only reported once that is actually knowable: either lucide has\n * no icons under that initial letter, or the letter's shard already settled\n * without the slug in it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The slug's resolution state.\n */\nexport function iconStatus(slug: string): \"ready\" | \"loading\" | \"missing\" {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return \"ready\";\n const letter = canonical[0] ?? \"\";\n if (!shardLoaders[letter]) return \"missing\";\n return settledLetters.has(letter) ? \"missing\" : \"loading\";\n}\n\n/**\n * Warm the cache for slugs you know you are about to render.\n *\n * Useful right before opening a menu or a picker: the shards land while the user\n * is still reaching for it, so nothing flashes a fallback.\n *\n * @param slugs - Icon slugs to preload.\n * @returns A promise that settles when every needed shard is in the cache.\n */\nexport async function preloadIcons(slugs: readonly string[]): Promise<void> {\n await Promise.all(slugs.map(loadIcon));\n}\n\n/**\n * Subscribe to shard arrivals.\n *\n * @param listener - Called after each shard lands.\n * @returns An unsubscribe function.\n */\nexport function subscribeToIcons(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n"],"mappings":";;;AAcA,IAAM,oBAAW,IAAI,IAAwB,GAGvC,oBAAW,IAAI,IAA2B,GAU1C,oBAAiB,IAAI,IAAY,GAGjC,oBAAY,IAAI,IAAgB;AAYtC,SAAgB,EAAiB,GAAsB;CACnD,OAAO,EAAY,MAAS;AAChC;AAQA,SAAgB,EAAS,GAAsC;CAC3D,OAAO,EAAS,IAAI,EAAiB,CAAI,CAAC;AAC9C;AAYA,SAAgB,EAAS,GAA6B;CAClD,IAAM,IAAY,EAAiB,CAAI;CACvC,IAAI,EAAS,IAAI,CAAS,GAAG,OAAO,QAAQ,QAAQ;CAEpD,IAAM,IAAS,EAAU,MAAM,IACzB,IAAS,EAAa;CAC5B,IAAI,CAAC,GAAQ,OAAO,QAAQ,QAAQ;CAEpC,IAAM,IAAU,EAAS,IAAI,CAAM;CACnC,IAAI,GAAS,OAAO;CAEpB,IAAM,IAAU,EAAO,CAAC,CACnB,MAAM,MAAQ;EACX,KAAK,IAAM,CAAC,GAAM,MAAS,OAAO,QAAQ,EAAI,OAAO,GAAG,EAAS,IAAI,GAAM,CAAI;CACnF,CAAC,CAAC,CACD,YAAY,KAAA,CAAS,CAAC,CACtB,cAAc;EAEX,AADA,EAAS,OAAO,CAAM,GACtB,EAAe,IAAI,CAAM;EACzB,KAAK,IAAM,KAAY,GAAW,EAAS;CAC/C,CAAC;CAEL,OADA,EAAS,IAAI,GAAQ,CAAO,GACrB;AACX;AAYA,SAAgB,EAAW,GAA+C;CACtE,IAAM,IAAY,EAAiB,CAAI;CACvC,IAAI,EAAS,IAAI,CAAS,GAAG,OAAO;CACpC,IAAM,IAAS,EAAU,MAAM;CAE/B,OADK,EAAa,KACX,EAAe,IAAI,CAAM,IAAI,YAAY,YADd;AAEtC;AAWA,eAAsB,EAAa,GAAyC;CACxE,MAAM,QAAQ,IAAI,EAAM,IAAI,CAAQ,CAAC;AACzC;AAQA,SAAgB,EAAiB,GAAkC;CAE/D,OADA,EAAU,IAAI,CAAQ,SACT,EAAU,OAAO,CAAQ;AAC1C"}
package/dist/icons.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./icons/generated/aliases.cjs"),t=require("./icons/generated/icon-names.cjs"),n=require("./icons/icon-context.cjs"),r=require("./icons/shard-cache.cjs"),i=require("./icons/use-icon.cjs"),a=require("./icons/Icon.cjs"),o=require("./icons/IconProvider.cjs"),s=require("./icons/is-icon-name.cjs");exports.Icon=a.Icon,exports.IconProvider=o.IconProvider,exports.createIconRegistry=n.createIconRegistry,exports.iconAliases=e.iconAliases,exports.iconNames=t.iconNames,exports.iconStatus=r.iconStatus,exports.isIconName=s.isIconName,exports.loadIcon=r.loadIcon,exports.peekIcon=r.peekIcon,exports.preloadIcons=r.preloadIcons,exports.resolveIconAlias=r.resolveIconAlias,exports.useIcon=i.useIcon;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./icons/generated/aliases.cjs"),t=require("./icons/generated/icon-names.cjs"),n=require("./icons/icon-context.cjs"),r=require("./icons/shard-cache.cjs"),i=require("./icons/use-icon.cjs"),a=require("./icons/Icon.cjs"),o=require("./icons/IconProvider.cjs"),s=require("./icons/is-icon-name.cjs"),c=require("./icons/material-symbols.cjs");exports.Icon=a.Icon,exports.IconProvider=o.IconProvider,exports.MATERIAL_SYMBOL_FALLBACK=c.MATERIAL_SYMBOL_FALLBACK,exports.createIconRegistry=n.createIconRegistry,exports.fromMaterialSymbol=c.fromMaterialSymbol,exports.iconAliases=e.iconAliases,exports.iconNames=t.iconNames,exports.iconStatus=r.iconStatus,exports.isIconName=s.isIconName,exports.loadIcon=r.loadIcon,exports.materialToLucide=c.materialToLucide,exports.peekIcon=r.peekIcon,exports.preloadIcons=r.preloadIcons,exports.resolveIconAlias=r.resolveIconAlias,exports.useIcon=i.useIcon;
package/dist/icons.d.ts CHANGED
@@ -20,6 +20,29 @@ import { SVGProps } from 'react';
20
20
  */
21
21
  export declare function createIconRegistry(icons: Record<string, LucideIcon>): IconRegistry;
22
22
 
23
+ /**
24
+ * Translate a Material Symbols code into a lucide slug, always returning one.
25
+ *
26
+ * Never returns `undefined`: an unknown code resolves to `fallback`, so a row
27
+ * whose `icon_code` this table has not learned yet still renders. The input is
28
+ * trimmed and lower-cased before lookup, because a seed written by hand is the
29
+ * kind of source that carries stray whitespace and the odd capital.
30
+ *
31
+ * Nothing else in `/icons` imports this module, so an app that does not store
32
+ * Material Symbols never pays for the table.
33
+ *
34
+ * @example
35
+ * <Icon name={fromMaterialSymbol(category.icon_code)} size={20} />
36
+ *
37
+ * @example
38
+ * <Icon name={fromMaterialSymbol(category.icon_code, "folder")} size={20} />
39
+ *
40
+ * @param code - A Material Symbols name, or `null`/`undefined` for a row that has none.
41
+ * @param fallback - Slug to use when `code` is empty or unknown. Defaults to {@link MATERIAL_SYMBOL_FALLBACK}.
42
+ * @returns A lucide slug `<Icon>` can render.
43
+ */
44
+ export declare function fromMaterialSymbol(code: string | null | undefined, fallback?: IconName): IconName;
45
+
23
46
  /**
24
47
  * Render a lucide icon by slug.
25
48
  *
@@ -40,7 +63,7 @@ export declare function createIconRegistry(icons: Record<string, LucideIcon>): I
40
63
  export declare function Icon({ name, size, strokeWidth, fallback, ...rest }: IconProps): ReactNode;
41
64
 
42
65
  /**
43
- * Lucide's 248 deprecated slugs, mapped to the canonical slug that
66
+ * Lucide's 257 deprecated slugs, mapped to the canonical slug that
44
67
  * replaced them (`alert-circle` → `circle-alert`).
45
68
  *
46
69
  * Kept so a name stored in a database years ago keeps rendering after a lucide
@@ -52,14 +75,14 @@ export declare const iconAliases: Record<string, string>;
52
75
  /**
53
76
  * Every icon slug lucide ships, as a union of string literals.
54
77
  *
55
- * Erased at compile time, so the 1997 members cost no bytes — they buy
78
+ * Erased at compile time, so the 2024 members cost no bytes — they buy
56
79
  * autocomplete and a typo caught by `tsc` instead of at runtime.
57
80
  */
58
- export declare type IconName = "a-arrow-down" | "a-arrow-up" | "a-large-small" | "accessibility" | "activity" | "activity-square" | "ad" | "air-vent" | "airplay" | "alarm-check" | "alarm-clock" | "alarm-clock-check" | "alarm-clock-minus" | "alarm-clock-off" | "alarm-clock-plus" | "alarm-minus" | "alarm-plus" | "alarm-smoke" | "album" | "alert-circle" | "alert-octagon" | "alert-triangle" | "align-center" | "align-center-horizontal" | "align-center-vertical" | "align-end-horizontal" | "align-end-vertical" | "align-horizontal-distribute-center" | "align-horizontal-distribute-end" | "align-horizontal-distribute-start" | "align-horizontal-justify-center" | "align-horizontal-justify-end" | "align-horizontal-justify-start" | "align-horizontal-space-around" | "align-horizontal-space-between" | "align-justify" | "align-left" | "align-right" | "align-start-horizontal" | "align-start-vertical" | "align-vertical-distribute-center" | "align-vertical-distribute-end" | "align-vertical-distribute-start" | "align-vertical-justify-center" | "align-vertical-justify-end" | "align-vertical-justify-start" | "align-vertical-space-around" | "align-vertical-space-between" | "ambulance" | "ampersand" | "ampersands" | "amphora" | "anchor" | "angry" | "annoyed" | "antenna" | "anvil" | "aperture" | "app-window" | "app-window-mac" | "apple" | "archive" | "archive-restore" | "archive-x" | "area-chart" | "armchair" | "arrow-big-down" | "arrow-big-down-dash" | "arrow-big-left" | "arrow-big-left-dash" | "arrow-big-right" | "arrow-big-right-dash" | "arrow-big-up" | "arrow-big-up-dash" | "arrow-down" | "arrow-down-0-1" | "arrow-down-01" | "arrow-down-1-0" | "arrow-down-10" | "arrow-down-a-z" | "arrow-down-az" | "arrow-down-circle" | "arrow-down-from-line" | "arrow-down-left" | "arrow-down-left-from-circle" | "arrow-down-left-from-square" | "arrow-down-left-square" | "arrow-down-narrow-wide" | "arrow-down-right" | "arrow-down-right-from-circle" | "arrow-down-right-from-square" | "arrow-down-right-square" | "arrow-down-square" | "arrow-down-to-dot" | "arrow-down-to-line" | "arrow-down-up" | "arrow-down-wide-narrow" | "arrow-down-z-a" | "arrow-down-za" | "arrow-left" | "arrow-left-circle" | "arrow-left-from-line" | "arrow-left-right" | "arrow-left-square" | "arrow-left-to-line" | "arrow-right" | "arrow-right-circle" | "arrow-right-from-line" | "arrow-right-left" | "arrow-right-square" | "arrow-right-to-line" | "arrow-up" | "arrow-up-0-1" | "arrow-up-01" | "arrow-up-1-0" | "arrow-up-10" | "arrow-up-a-z" | "arrow-up-az" | "arrow-up-circle" | "arrow-up-down" | "arrow-up-from-dot" | "arrow-up-from-line" | "arrow-up-left" | "arrow-up-left-from-circle" | "arrow-up-left-from-square" | "arrow-up-left-square" | "arrow-up-narrow-wide" | "arrow-up-right" | "arrow-up-right-from-circle" | "arrow-up-right-from-square" | "arrow-up-right-square" | "arrow-up-square" | "arrow-up-to-line" | "arrow-up-wide-narrow" | "arrow-up-z-a" | "arrow-up-za" | "arrows-up-from-line" | "asterisk" | "asterisk-square" | "astroid" | "at-sign" | "atom" | "audio-lines" | "audio-waveform" | "award" | "axe" | "axis-3-d" | "axis-3d" | "baby" | "backpack" | "badge" | "badge-alert" | "badge-cent" | "badge-check" | "badge-dollar-sign" | "badge-euro" | "badge-help" | "badge-indian-rupee" | "badge-info" | "badge-japanese-yen" | "badge-minus" | "badge-percent" | "badge-plus" | "badge-pound-sterling" | "badge-question-mark" | "badge-russian-ruble" | "badge-swiss-franc" | "badge-turkish-lira" | "badge-x" | "baggage-claim" | "balloon" | "ban" | "banana" | "bandage" | "banknote" | "banknote-arrow-down" | "banknote-arrow-up" | "banknote-check" | "banknote-x" | "bar-chart" | "bar-chart-2" | "bar-chart-3" | "bar-chart-4" | "bar-chart-big" | "bar-chart-horizontal" | "bar-chart-horizontal-big" | "barcode" | "barrel" | "baseline" | "bath" | "battery" | "battery-charging" | "battery-full" | "battery-low" | "battery-medium" | "battery-plus" | "battery-warning" | "beaker" | "bean" | "bean-off" | "bed" | "bed-double" | "bed-single" | "beef" | "beef-off" | "beer" | "beer-off" | "bell" | "bell-check" | "bell-dot" | "bell-electric" | "bell-minus" | "bell-off" | "bell-plus" | "bell-ring" | "between-horizonal-end" | "between-horizonal-start" | "between-horizontal-end" | "between-horizontal-start" | "between-vertical-end" | "between-vertical-start" | "biceps-flexed" | "bike" | "binary" | "binoculars" | "biohazard" | "bird" | "birdhouse" | "bitcoin" | "blend" | "blender" | "blinds" | "blocks" | "bluetooth" | "bluetooth-connected" | "bluetooth-off" | "bluetooth-searching" | "bold" | "bolt" | "bomb" | "bone" | "bone-fracture" | "book" | "book-a" | "book-alert" | "book-audio" | "book-check" | "book-copy" | "book-dashed" | "book-down" | "book-headphones" | "book-heart" | "book-image" | "book-key" | "book-lock" | "book-marked" | "book-minus" | "book-open" | "book-open-check" | "book-open-text" | "book-plus" | "book-search" | "book-template" | "book-text" | "book-type" | "book-up" | "book-up-2" | "book-user" | "book-x" | "bookmark" | "bookmark-check" | "bookmark-minus" | "bookmark-off" | "bookmark-plus" | "bookmark-x" | "boom-box" | "bot" | "bot-message-square" | "bot-off" | "bottle-wine" | "bow-arrow" | "box" | "box-select" | "boxes" | "braces" | "brackets" | "brain" | "brain-circuit" | "brain-cog" | "brick-wall" | "brick-wall-fire" | "brick-wall-shield" | "briefcase" | "briefcase-business" | "briefcase-conveyor-belt" | "briefcase-medical" | "bring-to-front" | "broccoli" | "brush" | "brush-cleaning" | "bubbles" | "bug" | "bug-off" | "bug-play" | "building" | "building-2" | "bus" | "bus-front" | "cable" | "cable-car" | "cake" | "cake-slice" | "calculator" | "calendar" | "calendar-1" | "calendar-arrow-down" | "calendar-arrow-up" | "calendar-check" | "calendar-check-2" | "calendar-clock" | "calendar-cog" | "calendar-days" | "calendar-fold" | "calendar-heart" | "calendar-minus" | "calendar-minus-2" | "calendar-off" | "calendar-plus" | "calendar-plus-2" | "calendar-range" | "calendar-search" | "calendar-sync" | "calendar-x" | "calendar-x-2" | "calendars" | "camera" | "camera-off" | "candlestick-chart" | "candy" | "candy-cane" | "candy-off" | "cannabis" | "cannabis-off" | "captions" | "captions-off" | "car" | "car-front" | "car-taxi-front" | "caravan" | "card-sim" | "carrot" | "case-lower" | "case-sensitive" | "case-upper" | "cassette-tape" | "cast" | "castle" | "cat" | "cctv" | "cctv-off" | "chart-area" | "chart-bar" | "chart-bar-big" | "chart-bar-decreasing" | "chart-bar-increasing" | "chart-bar-stacked" | "chart-candlestick" | "chart-column" | "chart-column-big" | "chart-column-decreasing" | "chart-column-increasing" | "chart-column-stacked" | "chart-gantt" | "chart-line" | "chart-network" | "chart-no-axes-column" | "chart-no-axes-column-decreasing" | "chart-no-axes-column-increasing" | "chart-no-axes-combined" | "chart-no-axes-gantt" | "chart-pie" | "chart-scatter" | "chart-spline" | "check" | "check-check" | "check-circle" | "check-circle-2" | "check-line" | "check-square" | "check-square-2" | "chef-hat" | "cherry" | "chess-bishop" | "chess-king" | "chess-knight" | "chess-pawn" | "chess-queen" | "chess-rook" | "chevron-down" | "chevron-down-circle" | "chevron-down-square" | "chevron-first" | "chevron-last" | "chevron-left" | "chevron-left-circle" | "chevron-left-square" | "chevron-right" | "chevron-right-circle" | "chevron-right-square" | "chevron-up" | "chevron-up-circle" | "chevron-up-square" | "chevrons-down" | "chevrons-down-up" | "chevrons-left" | "chevrons-left-right" | "chevrons-left-right-ellipsis" | "chevrons-right" | "chevrons-right-left" | "chevrons-up" | "chevrons-up-down" | "church" | "cigarette" | "cigarette-off" | "circle" | "circle-alert" | "circle-arrow-down" | "circle-arrow-left" | "circle-arrow-out-down-left" | "circle-arrow-out-down-right" | "circle-arrow-out-up-left" | "circle-arrow-out-up-right" | "circle-arrow-right" | "circle-arrow-up" | "circle-check" | "circle-check-big" | "circle-chevron-down" | "circle-chevron-left" | "circle-chevron-right" | "circle-chevron-up" | "circle-dashed" | "circle-divide" | "circle-dollar-sign" | "circle-dot" | "circle-dot-dashed" | "circle-ellipsis" | "circle-equal" | "circle-euro" | "circle-fading-arrow-up" | "circle-fading-plus" | "circle-gauge" | "circle-help" | "circle-minus" | "circle-off" | "circle-parking" | "circle-parking-off" | "circle-pause" | "circle-percent" | "circle-pile" | "circle-play" | "circle-plus" | "circle-pound-sterling" | "circle-power" | "circle-question-mark" | "circle-slash" | "circle-slash-2" | "circle-slashed" | "circle-small" | "circle-star" | "circle-stop" | "circle-user" | "circle-user-round" | "circle-x" | "circuit-board" | "citrus" | "clapperboard" | "clipboard" | "clipboard-check" | "clipboard-clock" | "clipboard-copy" | "clipboard-edit" | "clipboard-list" | "clipboard-minus" | "clipboard-paste" | "clipboard-pen" | "clipboard-pen-line" | "clipboard-plus" | "clipboard-signature" | "clipboard-type" | "clipboard-x" | "clock" | "clock-1" | "clock-10" | "clock-11" | "clock-12" | "clock-2" | "clock-3" | "clock-4" | "clock-5" | "clock-6" | "clock-7" | "clock-8" | "clock-9" | "clock-alert" | "clock-arrow-down" | "clock-arrow-left" | "clock-arrow-right" | "clock-arrow-up" | "clock-check" | "clock-fading" | "clock-plus" | "closed-caption" | "cloud" | "cloud-alert" | "cloud-backup" | "cloud-check" | "cloud-cog" | "cloud-download" | "cloud-drizzle" | "cloud-fog" | "cloud-hail" | "cloud-lightning" | "cloud-moon" | "cloud-moon-rain" | "cloud-off" | "cloud-rain" | "cloud-rain-wind" | "cloud-snow" | "cloud-sun" | "cloud-sun-rain" | "cloud-sync" | "cloud-upload" | "cloudy" | "clover" | "club" | "code" | "code-2" | "code-square" | "code-xml" | "coffee" | "cog" | "coins" | "columns" | "columns-2" | "columns-3" | "columns-3-cog" | "columns-4" | "columns-settings" | "combine" | "command" | "compass" | "component" | "computer" | "concierge-bell" | "cone" | "construction" | "contact" | "contact-2" | "contact-round" | "container" | "contrast" | "cookie" | "cooking-pot" | "copy" | "copy-check" | "copy-minus" | "copy-plus" | "copy-slash" | "copy-x" | "copyleft" | "copyright" | "corner-down-left" | "corner-down-right" | "corner-left-down" | "corner-left-up" | "corner-right-down" | "corner-right-up" | "corner-up-left" | "corner-up-right" | "cpu" | "creative-commons" | "credit-card" | "croissant" | "crop" | "cross" | "crosshair" | "crown" | "cuboid" | "cup-soda" | "curly-braces" | "currency" | "cylinder" | "dam" | "database" | "database-arrow-down" | "database-arrow-up" | "database-backup" | "database-check" | "database-minus" | "database-plus" | "database-search" | "database-x" | "database-zap" | "decimals-arrow-left" | "decimals-arrow-right" | "delete" | "dessert" | "diameter" | "diamond" | "diamond-minus" | "diamond-percent" | "diamond-plus" | "dice-1" | "dice-2" | "dice-3" | "dice-4" | "dice-5" | "dice-6" | "dices" | "diff" | "disc" | "disc-2" | "disc-3" | "disc-album" | "divide" | "divide-circle" | "divide-square" | "dna" | "dna-off" | "dock" | "dog" | "dollar-sign" | "donut" | "door-closed" | "door-closed-locked" | "door-open" | "dot" | "dot-square" | "download" | "download-cloud" | "drafting-compass" | "drama" | "drill" | "drone" | "droplet" | "droplet-off" | "droplets" | "drum" | "drumstick" | "dumbbell" | "ear" | "ear-off" | "earth" | "earth-lock" | "eclipse" | "edit" | "edit-2" | "edit-3" | "egg" | "egg-fried" | "egg-off" | "ellipse" | "ellipsis" | "ellipsis-vertical" | "equal" | "equal-approximately" | "equal-not" | "equal-square" | "eraser" | "ethernet-port" | "euro" | "ev-charger" | "expand" | "external-link" | "eye" | "eye-closed" | "eye-dashed" | "eye-off" | "factory" | "fan" | "fast-forward" | "feather" | "fence" | "ferris-wheel" | "file" | "file-archive" | "file-audio" | "file-audio-2" | "file-axis-3-d" | "file-axis-3d" | "file-badge" | "file-badge-2" | "file-bar-chart" | "file-bar-chart-2" | "file-box" | "file-braces" | "file-braces-corner" | "file-chart-column" | "file-chart-column-increasing" | "file-chart-line" | "file-chart-pie" | "file-check" | "file-check-2" | "file-check-corner" | "file-clock" | "file-code" | "file-code-2" | "file-code-corner" | "file-cog" | "file-cog-2" | "file-diff" | "file-digit" | "file-down" | "file-edit" | "file-exclamation-point" | "file-headphone" | "file-heart" | "file-image" | "file-input" | "file-json" | "file-json-2" | "file-key" | "file-key-2" | "file-line-chart" | "file-lock" | "file-lock-2" | "file-minus" | "file-minus-2" | "file-minus-corner" | "file-music" | "file-output" | "file-pen" | "file-pen-line" | "file-pie-chart" | "file-play" | "file-plus" | "file-plus-2" | "file-plus-corner" | "file-question" | "file-question-mark" | "file-scan" | "file-search" | "file-search-2" | "file-search-corner" | "file-signal" | "file-signature" | "file-sliders" | "file-spreadsheet" | "file-stack" | "file-symlink" | "file-terminal" | "file-text" | "file-type" | "file-type-2" | "file-type-corner" | "file-up" | "file-user" | "file-video" | "file-video-2" | "file-video-camera" | "file-volume" | "file-volume-2" | "file-warning" | "file-x" | "file-x-2" | "file-x-corner" | "files" | "film" | "filter" | "filter-x" | "fingerprint-pattern" | "fire-extinguisher" | "fish" | "fish-off" | "fish-symbol" | "fishing-hook" | "fishing-rod" | "flag" | "flag-off" | "flag-triangle-left" | "flag-triangle-right" | "flame" | "flame-kindling" | "flashlight" | "flashlight-off" | "flask-conical" | "flask-conical-off" | "flask-round" | "flip-horizontal" | "flip-horizontal-2" | "flip-vertical" | "flip-vertical-2" | "flower" | "flower-2" | "focus" | "fold-horizontal" | "fold-vertical" | "folder" | "folder-archive" | "folder-bookmark" | "folder-check" | "folder-clock" | "folder-closed" | "folder-code" | "folder-cog" | "folder-cog-2" | "folder-dot" | "folder-down" | "folder-edit" | "folder-git" | "folder-git-2" | "folder-heart" | "folder-input" | "folder-kanban" | "folder-key" | "folder-lock" | "folder-minus" | "folder-open" | "folder-open-dot" | "folder-output" | "folder-pen" | "folder-plus" | "folder-root" | "folder-search" | "folder-search-2" | "folder-symlink" | "folder-sync" | "folder-tree" | "folder-up" | "folder-x" | "folders" | "footprints" | "fork-knife" | "fork-knife-crossed" | "forklift" | "form" | "form-input" | "forward" | "frame" | "frown" | "fuel" | "fullscreen" | "function-square" | "funnel" | "funnel-plus" | "funnel-x" | "gallery-horizontal" | "gallery-horizontal-end" | "gallery-thumbnails" | "gallery-vertical" | "gallery-vertical-end" | "gamepad" | "gamepad-2" | "gamepad-directional" | "gantt-chart" | "gantt-chart-square" | "gauge" | "gauge-circle" | "gavel" | "gem" | "georgian-lari" | "ghost" | "gift" | "git-branch" | "git-branch-minus" | "git-branch-plus" | "git-commit" | "git-commit-horizontal" | "git-commit-vertical" | "git-compare" | "git-compare-arrows" | "git-fork" | "git-graph" | "git-merge" | "git-merge-conflict" | "git-pull-request" | "git-pull-request-arrow" | "git-pull-request-closed" | "git-pull-request-create" | "git-pull-request-create-arrow" | "git-pull-request-draft" | "glass-water" | "glasses" | "globe" | "globe-2" | "globe-check" | "globe-lock" | "globe-off" | "globe-x" | "goal" | "gpu" | "grab" | "graduation-cap" | "grape" | "grid" | "grid-2-x-2" | "grid-2-x-2-check" | "grid-2-x-2-plus" | "grid-2-x-2-x" | "grid-2x2" | "grid-2x2-check" | "grid-2x2-plus" | "grid-2x2-x" | "grid-3-x-3" | "grid-3x2" | "grid-3x3" | "grip" | "grip-horizontal" | "grip-vertical" | "group" | "guitar" | "ham" | "hamburger" | "hammer" | "hand" | "hand-coins" | "hand-fist" | "hand-grab" | "hand-heart" | "hand-helping" | "hand-metal" | "hand-platter" | "handbag" | "handshake" | "hard-drive" | "hard-drive-download" | "hard-drive-upload" | "hard-hat" | "hash" | "hat-glasses" | "haze" | "hd" | "hdmi-port" | "heading" | "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "headphone-off" | "headphones" | "headset" | "heart" | "heart-crack" | "heart-handshake" | "heart-minus" | "heart-off" | "heart-plus" | "heart-pulse" | "heart-x" | "heater" | "helicopter" | "help-circle" | "helping-hand" | "hexagon" | "highlighter" | "history" | "home" | "hop" | "hop-off" | "hospital" | "hotel" | "hourglass" | "house" | "house-heart" | "house-plug" | "house-plus" | "house-wifi" | "ice-cream" | "ice-cream-2" | "ice-cream-bowl" | "ice-cream-cone" | "id-card" | "id-card-lanyard" | "image" | "image-down" | "image-minus" | "image-off" | "image-play" | "image-plus" | "image-up" | "image-upscale" | "images" | "import" | "inbox" | "indent" | "indent-decrease" | "indent-increase" | "indian-rupee" | "infinity" | "info" | "inspect" | "inspection-panel" | "italic" | "iteration-ccw" | "iteration-cw" | "japanese-yen" | "joystick" | "kanban" | "kanban-square" | "kanban-square-dashed" | "kayak" | "key" | "key-round" | "key-square" | "keyboard" | "keyboard-music" | "keyboard-off" | "lamp" | "lamp-ceiling" | "lamp-desk" | "lamp-floor" | "lamp-wall-down" | "lamp-wall-up" | "land-plot" | "landmark" | "languages" | "laptop" | "laptop-2" | "laptop-minimal" | "laptop-minimal-check" | "lasso" | "lasso-select" | "laugh" | "layers" | "layers-2" | "layers-3" | "layers-minus" | "layers-plus" | "layout" | "layout-dashboard" | "layout-grid" | "layout-list" | "layout-panel-left" | "layout-panel-top" | "layout-template" | "leaf" | "leafy-green" | "lectern" | "lens-concave" | "lens-convex" | "letter-text" | "library" | "library-big" | "library-square" | "life-buoy" | "ligature" | "lightbulb" | "lightbulb-off" | "line-chart" | "line-dot-right-horizontal" | "line-squiggle" | "line-style" | "link" | "link-2" | "link-2-off" | "list" | "list-check" | "list-checks" | "list-chevrons-down-up" | "list-chevrons-up-down" | "list-collapse" | "list-end" | "list-filter" | "list-filter-plus" | "list-indent-decrease" | "list-indent-increase" | "list-minus" | "list-music" | "list-ordered" | "list-plus" | "list-restart" | "list-sort-ascending" | "list-sort-descending" | "list-start" | "list-todo" | "list-tree" | "list-video" | "list-x" | "loader" | "loader-2" | "loader-circle" | "loader-pinwheel" | "locate" | "locate-fixed" | "locate-off" | "location-edit" | "lock" | "lock-keyhole" | "lock-keyhole-open" | "lock-open" | "log-in" | "log-out" | "logs" | "lollipop" | "luggage" | "m-square" | "magnet" | "mail" | "mail-check" | "mail-minus" | "mail-open" | "mail-plus" | "mail-question" | "mail-question-mark" | "mail-search" | "mail-warning" | "mail-x" | "mailbox" | "mails" | "map" | "map-minus" | "map-pin" | "map-pin-check" | "map-pin-check-inside" | "map-pin-house" | "map-pin-minus" | "map-pin-minus-inside" | "map-pin-off" | "map-pin-pen" | "map-pin-plus" | "map-pin-plus-inside" | "map-pin-search" | "map-pin-x" | "map-pin-x-inside" | "map-pinned" | "map-plus" | "mars" | "mars-stroke" | "martini" | "maximize" | "maximize-2" | "medal" | "megaphone" | "megaphone-off" | "meh" | "memory-stick" | "menu" | "menu-square" | "merge" | "message-circle" | "message-circle-check" | "message-circle-code" | "message-circle-dashed" | "message-circle-heart" | "message-circle-more" | "message-circle-off" | "message-circle-plus" | "message-circle-question" | "message-circle-question-mark" | "message-circle-reply" | "message-circle-warning" | "message-circle-x" | "message-square" | "message-square-check" | "message-square-code" | "message-square-dashed" | "message-square-diff" | "message-square-dot" | "message-square-heart" | "message-square-lock" | "message-square-more" | "message-square-off" | "message-square-plus" | "message-square-quote" | "message-square-reply" | "message-square-share" | "message-square-text" | "message-square-warning" | "message-square-x" | "messages-square" | "metronome" | "mic" | "mic-2" | "mic-off" | "mic-vocal" | "microchip" | "microscope" | "microwave" | "milestone" | "milk" | "milk-off" | "minimize" | "minimize-2" | "minus" | "minus-circle" | "minus-square" | "mirror-rectangular" | "mirror-round" | "monitor" | "monitor-check" | "monitor-cloud" | "monitor-cog" | "monitor-dot" | "monitor-down" | "monitor-off" | "monitor-pause" | "monitor-play" | "monitor-smartphone" | "monitor-speaker" | "monitor-stop" | "monitor-up" | "monitor-x" | "moon" | "moon-star" | "more-horizontal" | "more-vertical" | "motorbike" | "mountain" | "mountain-snow" | "mouse" | "mouse-left" | "mouse-off" | "mouse-pointer" | "mouse-pointer-2" | "mouse-pointer-2-off" | "mouse-pointer-ban" | "mouse-pointer-click" | "mouse-pointer-square-dashed" | "mouse-right" | "move" | "move-3-d" | "move-3d" | "move-diagonal" | "move-diagonal-2" | "move-down" | "move-down-left" | "move-down-right" | "move-horizontal" | "move-left" | "move-right" | "move-up" | "move-up-left" | "move-up-right" | "move-vertical" | "music" | "music-2" | "music-3" | "music-4" | "navigation" | "navigation-2" | "navigation-2-off" | "navigation-off" | "network" | "newspaper" | "nfc" | "non-binary" | "notebook" | "notebook-pen" | "notebook-tabs" | "notebook-text" | "notepad-text" | "notepad-text-dashed" | "nut" | "nut-off" | "octagon" | "octagon-alert" | "octagon-minus" | "octagon-pause" | "octagon-x" | "omega" | "option" | "orbit" | "origami" | "outdent" | "package" | "package-2" | "package-check" | "package-minus" | "package-open" | "package-plus" | "package-search" | "package-x" | "paint-bucket" | "paint-roller" | "paintbrush" | "paintbrush-2" | "paintbrush-vertical" | "palette" | "palmtree" | "panda" | "panel-bottom" | "panel-bottom-close" | "panel-bottom-dashed" | "panel-bottom-inactive" | "panel-bottom-open" | "panel-left" | "panel-left-close" | "panel-left-dashed" | "panel-left-inactive" | "panel-left-open" | "panel-left-right-dashed" | "panel-right" | "panel-right-close" | "panel-right-dashed" | "panel-right-inactive" | "panel-right-open" | "panel-top" | "panel-top-bottom-dashed" | "panel-top-close" | "panel-top-dashed" | "panel-top-inactive" | "panel-top-open" | "panels-left-bottom" | "panels-left-right" | "panels-right-bottom" | "panels-top-bottom" | "panels-top-left" | "paper-bag" | "paperclip" | "parasol" | "parentheses" | "parking-circle" | "parking-circle-off" | "parking-meter" | "parking-square" | "parking-square-off" | "party-popper" | "pause" | "pause-circle" | "pause-octagon" | "paw-print" | "pc-case" | "pen" | "pen-box" | "pen-line" | "pen-off" | "pen-square" | "pen-tool" | "pencil" | "pencil-line" | "pencil-off" | "pencil-ruler" | "pencil-sparkles" | "pentagon" | "percent" | "percent-circle" | "percent-diamond" | "percent-square" | "person-standing" | "phi" | "philippine-peso" | "phone" | "phone-call" | "phone-forwarded" | "phone-incoming" | "phone-missed" | "phone-off" | "phone-outgoing" | "pi" | "pi-square" | "piano" | "pickaxe" | "picture-in-picture" | "picture-in-picture-2" | "pie-chart" | "piggy-bank" | "pilcrow" | "pilcrow-left" | "pilcrow-right" | "pilcrow-square" | "pill" | "pill-bottle" | "pin" | "pin-off" | "pipette" | "pizza" | "plane" | "plane-landing" | "plane-takeoff" | "play" | "play-circle" | "play-off" | "play-square" | "plug" | "plug-2" | "plug-zap" | "plug-zap-2" | "plus" | "plus-circle" | "plus-square" | "pocket-knife" | "podcast" | "podium" | "pointer" | "pointer-off" | "popcorn" | "popsicle" | "pound-sterling" | "power" | "power-circle" | "power-off" | "power-square" | "presentation" | "printer" | "printer-check" | "printer-x" | "projector" | "proportions" | "puzzle" | "pyramid" | "qr-code" | "quote" | "rabbit" | "radar" | "radiation" | "radical" | "radio" | "radio-off" | "radio-receiver" | "radio-tower" | "radius" | "rainbow" | "rat" | "ratio" | "receipt" | "receipt-cent" | "receipt-euro" | "receipt-indian-rupee" | "receipt-japanese-yen" | "receipt-pound-sterling" | "receipt-russian-ruble" | "receipt-swiss-franc" | "receipt-text" | "receipt-turkish-lira" | "rectangle-circle" | "rectangle-ellipsis" | "rectangle-goggles" | "rectangle-horizontal" | "rectangle-vertical" | "recycle" | "redo" | "redo-2" | "redo-dot" | "refresh-ccw" | "refresh-ccw-dot" | "refresh-cw" | "refresh-cw-off" | "refrigerator" | "regex" | "remove-formatting" | "repeat" | "repeat-1" | "repeat-2" | "repeat-off" | "replace" | "replace-all" | "reply" | "reply-all" | "rewind" | "ribbon" | "road" | "rocket" | "rocking-chair" | "roller-coaster" | "rose" | "rotate-3-d" | "rotate-3d" | "rotate-ccw" | "rotate-ccw-key" | "rotate-ccw-square" | "rotate-cw" | "rotate-cw-square" | "route" | "route-off" | "router" | "rows" | "rows-2" | "rows-3" | "rows-4" | "rss" | "ruler" | "ruler-dimension-line" | "russian-ruble" | "sailboat" | "salad" | "sandwich" | "satellite" | "satellite-dish" | "saudi-riyal" | "save" | "save-all" | "save-check" | "save-off" | "save-pen" | "save-plus" | "scale" | "scale-3-d" | "scale-3d" | "scaling" | "scan" | "scan-barcode" | "scan-box" | "scan-eye" | "scan-face" | "scan-heart" | "scan-line" | "scan-qr-code" | "scan-search" | "scan-text" | "scatter-chart" | "school" | "school-2" | "scissors" | "scissors-line-dashed" | "scissors-square" | "scissors-square-dashed-bottom" | "scooter" | "screen-share" | "screen-share-off" | "scroll" | "scroll-text" | "search" | "search-alert" | "search-check" | "search-code" | "search-slash" | "search-x" | "section" | "send" | "send-horizonal" | "send-horizontal" | "send-to-back" | "separator-horizontal" | "separator-vertical" | "server" | "server-cog" | "server-crash" | "server-off" | "server-plus" | "settings" | "settings-2" | "shapes" | "share" | "share-2" | "sheet" | "shell" | "shelving-unit" | "shield" | "shield-alert" | "shield-ban" | "shield-check" | "shield-close" | "shield-cog" | "shield-cog-corner" | "shield-ellipsis" | "shield-half" | "shield-keyhole" | "shield-minus" | "shield-off" | "shield-plus" | "shield-question" | "shield-question-mark" | "shield-user" | "shield-x" | "ship" | "ship-wheel" | "shirt" | "shopping-bag" | "shopping-basket" | "shopping-cart" | "shovel" | "shower-head" | "shredder" | "shrimp" | "shrink" | "shrub" | "shuffle" | "sidebar" | "sidebar-close" | "sidebar-open" | "sigma" | "sigma-square" | "signal" | "signal-high" | "signal-low" | "signal-medium" | "signal-zero" | "signature" | "signpost" | "signpost-big" | "siren" | "skip-back" | "skip-forward" | "skull" | "slash" | "slash-square" | "slice" | "sliders" | "sliders-horizontal" | "sliders-vertical" | "smartphone" | "smartphone-charging" | "smartphone-nfc" | "smile" | "smile-plus" | "snail" | "snowflake" | "soap-dispenser-droplet" | "sofa" | "solar-panel" | "sort-asc" | "sort-desc" | "soup" | "space" | "spade" | "sparkle" | "sparkles" | "speaker" | "speech" | "spell-check" | "spell-check-2" | "spline" | "spline-pointer" | "split" | "split-square-horizontal" | "split-square-vertical" | "spool" | "sport-shoe" | "spotlight" | "spray-can" | "sprout" | "square" | "square-activity" | "square-arrow-down" | "square-arrow-down-left" | "square-arrow-down-right" | "square-arrow-left" | "square-arrow-out-down-left" | "square-arrow-out-down-right" | "square-arrow-out-up-left" | "square-arrow-out-up-right" | "square-arrow-right" | "square-arrow-right-enter" | "square-arrow-right-exit" | "square-arrow-up" | "square-arrow-up-left" | "square-arrow-up-right" | "square-asterisk" | "square-bottom-dashed-scissors" | "square-centerline-dashed-horizontal" | "square-centerline-dashed-vertical" | "square-chart-gantt" | "square-check" | "square-check-big" | "square-chevron-down" | "square-chevron-left" | "square-chevron-right" | "square-chevron-up" | "square-code" | "square-dashed" | "square-dashed-bottom" | "square-dashed-bottom-code" | "square-dashed-kanban" | "square-dashed-mouse-pointer" | "square-dashed-text" | "square-dashed-top-solid" | "square-divide" | "square-dot" | "square-equal" | "square-function" | "square-gantt-chart" | "square-kanban" | "square-library" | "square-m" | "square-menu" | "square-minus" | "square-mouse-pointer" | "square-parking" | "square-parking-off" | "square-pause" | "square-pen" | "square-percent" | "square-pi" | "square-pilcrow" | "square-play" | "square-plus" | "square-power" | "square-radical" | "square-round-corner" | "square-scissors" | "square-sigma" | "square-slash" | "square-split-horizontal" | "square-split-vertical" | "square-square" | "square-stack" | "square-star" | "square-stop" | "square-terminal" | "square-user" | "square-user-round" | "square-x" | "squares-exclude" | "squares-intersect" | "squares-subtract" | "squares-unite" | "squircle" | "squircle-dashed" | "squirrel" | "stamp" | "star" | "star-check" | "star-half" | "star-minus" | "star-off" | "star-plus" | "star-x" | "stars" | "step-back" | "step-forward" | "stethoscope" | "sticker" | "sticky-note" | "sticky-note-check" | "sticky-note-minus" | "sticky-note-off" | "sticky-note-plus" | "sticky-note-x" | "sticky-notes" | "stone" | "stop-circle" | "store" | "stretch-horizontal" | "stretch-vertical" | "strikethrough" | "subscript" | "subtitles" | "summary" | "sun" | "sun-dim" | "sun-medium" | "sun-moon" | "sun-snow" | "sunrise" | "sunset" | "superscript" | "swatch-book" | "swiss-franc" | "switch-camera" | "sword" | "swords" | "syringe" | "table" | "table-2" | "table-cells-merge" | "table-cells-split" | "table-columns-split" | "table-config" | "table-of-contents" | "table-properties" | "table-rows-split" | "tablet" | "tablet-smartphone" | "tablets" | "tag" | "tag-plus" | "tag-x" | "tags" | "tally-1" | "tally-2" | "tally-3" | "tally-4" | "tally-5" | "tangent" | "target" | "telescope" | "tent" | "tent-tree" | "terminal" | "terminal-square" | "test-tube" | "test-tube-2" | "test-tube-diagonal" | "test-tubes" | "text" | "text-align-center" | "text-align-end" | "text-align-justify" | "text-align-start" | "text-cursor" | "text-cursor-input" | "text-initial" | "text-quote" | "text-search" | "text-select" | "text-selection" | "text-wrap" | "theater" | "thermometer" | "thermometer-snowflake" | "thermometer-sun" | "thumbs-down" | "thumbs-up" | "ticket" | "ticket-check" | "ticket-minus" | "ticket-percent" | "ticket-plus" | "ticket-slash" | "ticket-x" | "tickets" | "tickets-plane" | "timeline" | "timer" | "timer-off" | "timer-reset" | "toggle-left" | "toggle-right" | "toilet" | "tool-case" | "toolbox" | "tornado" | "torus" | "touchpad" | "touchpad-off" | "towel-rack" | "tower-control" | "toy-brick" | "tractor" | "traffic-cone" | "train" | "train-front" | "train-front-tunnel" | "train-track" | "tram-front" | "transgender" | "trash" | "trash-2" | "tree-deciduous" | "tree-palm" | "tree-pine" | "trees" | "trending-down" | "trending-up" | "trending-up-down" | "triangle" | "triangle-alert" | "triangle-dashed" | "triangle-right" | "trophy" | "truck" | "truck-electric" | "turkish-lira" | "turntable" | "turtle" | "tv" | "tv-2" | "tv-minimal" | "tv-minimal-play" | "type" | "type-outline" | "umbrella" | "umbrella-off" | "underline" | "undo" | "undo-2" | "undo-dot" | "unfold-horizontal" | "unfold-vertical" | "ungroup" | "university" | "unlink" | "unlink-2" | "unlock" | "unlock-keyhole" | "unplug" | "upload" | "upload-cloud" | "usb" | "user" | "user-2" | "user-check" | "user-check-2" | "user-circle" | "user-circle-2" | "user-cog" | "user-cog-2" | "user-key" | "user-lock" | "user-minus" | "user-minus-2" | "user-pen" | "user-plus" | "user-plus-2" | "user-round" | "user-round-arrow-left" | "user-round-check" | "user-round-cog" | "user-round-key" | "user-round-minus" | "user-round-pen" | "user-round-plus" | "user-round-search" | "user-round-x" | "user-search" | "user-square" | "user-square-2" | "user-star" | "user-x" | "user-x-2" | "users" | "users-2" | "users-round" | "utensils" | "utensils-crossed" | "utility-pole" | "van" | "variable" | "vault" | "vector-square" | "vegan" | "venetian-mask" | "venus" | "venus-and-mars" | "verified" | "vibrate" | "vibrate-off" | "video" | "video-off" | "videotape" | "view" | "voicemail" | "volleyball" | "volume" | "volume-1" | "volume-2" | "volume-off" | "volume-x" | "vote" | "wallet" | "wallet-2" | "wallet-cards" | "wallet-minimal" | "wallpaper" | "wand" | "wand-2" | "wand-sparkles" | "warehouse" | "washing-machine" | "watch" | "waves" | "waves-arrow-down" | "waves-arrow-up" | "waves-horizontal" | "waves-ladder" | "waves-vertical" | "waypoints" | "webcam" | "webcam-off" | "webhook" | "webhook-off" | "weight" | "weight-tilde" | "wheat" | "wheat-off" | "whole-word" | "wifi" | "wifi-cog" | "wifi-high" | "wifi-low" | "wifi-off" | "wifi-pen" | "wifi-sync" | "wifi-zero" | "wind" | "wind-arrow-down" | "wine" | "wine-off" | "workflow" | "worm" | "wrap-text" | "wrench" | "wrench-off" | "x" | "x-circle" | "x-line-top" | "x-octagon" | "x-square" | "zap" | "zap-off" | "zodiac-aquarius" | "zodiac-aries" | "zodiac-cancer" | "zodiac-capricorn" | "zodiac-gemini" | "zodiac-leo" | "zodiac-libra" | "zodiac-ophiuchus" | "zodiac-pisces" | "zodiac-sagittarius" | "zodiac-scorpio" | "zodiac-taurus" | "zodiac-virgo" | "zoom-in" | "zoom-out";
81
+ export declare type IconName = "a-arrow-down" | "a-arrow-up" | "a-large-small" | "accessibility" | "activity" | "activity-square" | "ad" | "air-vent" | "airplay" | "alarm-check" | "alarm-clock" | "alarm-clock-check" | "alarm-clock-minus" | "alarm-clock-off" | "alarm-clock-plus" | "alarm-minus" | "alarm-plus" | "alarm-smoke" | "album" | "alert-circle" | "alert-octagon" | "alert-triangle" | "align-center" | "align-center-horizontal" | "align-center-vertical" | "align-end-horizontal" | "align-end-vertical" | "align-horizontal-distribute-center" | "align-horizontal-distribute-end" | "align-horizontal-distribute-start" | "align-horizontal-justify-center" | "align-horizontal-justify-end" | "align-horizontal-justify-start" | "align-horizontal-space-around" | "align-horizontal-space-between" | "align-justify" | "align-left" | "align-right" | "align-start-horizontal" | "align-start-vertical" | "align-vertical-distribute-center" | "align-vertical-distribute-end" | "align-vertical-distribute-start" | "align-vertical-justify-center" | "align-vertical-justify-end" | "align-vertical-justify-start" | "align-vertical-space-around" | "align-vertical-space-between" | "ambulance" | "ampersand" | "ampersands" | "amphora" | "anchor" | "angle" | "angry" | "annoyed" | "antenna" | "anvil" | "aperture" | "app-window" | "app-window-mac" | "apple" | "archive" | "archive-restore" | "archive-x" | "area-chart" | "armchair" | "arrow-big-down" | "arrow-big-down-dash" | "arrow-big-left" | "arrow-big-left-dash" | "arrow-big-right" | "arrow-big-right-dash" | "arrow-big-up" | "arrow-big-up-dash" | "arrow-down" | "arrow-down-0-1" | "arrow-down-01" | "arrow-down-1-0" | "arrow-down-10" | "arrow-down-a-z" | "arrow-down-az" | "arrow-down-circle" | "arrow-down-from-line" | "arrow-down-left" | "arrow-down-left-from-circle" | "arrow-down-left-from-square" | "arrow-down-left-square" | "arrow-down-narrow-wide" | "arrow-down-right" | "arrow-down-right-from-circle" | "arrow-down-right-from-square" | "arrow-down-right-square" | "arrow-down-square" | "arrow-down-to-dot" | "arrow-down-to-line" | "arrow-down-up" | "arrow-down-wide-narrow" | "arrow-down-z-a" | "arrow-down-za" | "arrow-left" | "arrow-left-circle" | "arrow-left-from-line" | "arrow-left-right" | "arrow-left-square" | "arrow-left-to-line" | "arrow-right" | "arrow-right-circle" | "arrow-right-from-line" | "arrow-right-left" | "arrow-right-square" | "arrow-right-to-line" | "arrow-up" | "arrow-up-0-1" | "arrow-up-01" | "arrow-up-1-0" | "arrow-up-10" | "arrow-up-a-z" | "arrow-up-az" | "arrow-up-circle" | "arrow-up-down" | "arrow-up-from-dot" | "arrow-up-from-line" | "arrow-up-left" | "arrow-up-left-from-circle" | "arrow-up-left-from-square" | "arrow-up-left-square" | "arrow-up-narrow-wide" | "arrow-up-right" | "arrow-up-right-from-circle" | "arrow-up-right-from-square" | "arrow-up-right-square" | "arrow-up-square" | "arrow-up-to-line" | "arrow-up-wide-narrow" | "arrow-up-z-a" | "arrow-up-za" | "arrows-up-from-line" | "asterisk" | "asterisk-square" | "astroid" | "at-sign" | "atom" | "audio-lines" | "audio-lines-x" | "audio-waveform" | "award" | "axe" | "axis-3-d" | "axis-3d" | "baby" | "backpack" | "badge" | "badge-alert" | "badge-cent" | "badge-check" | "badge-dollar-sign" | "badge-euro" | "badge-help" | "badge-indian-rupee" | "badge-info" | "badge-japanese-yen" | "badge-minus" | "badge-percent" | "badge-plus" | "badge-pound-sterling" | "badge-question-mark" | "badge-russian-ruble" | "badge-swiss-franc" | "badge-turkish-lira" | "badge-x" | "baggage-claim" | "balloon" | "ban" | "banana" | "bandage" | "banknote" | "banknote-arrow-down" | "banknote-arrow-up" | "banknote-check" | "banknote-x" | "bar-chart" | "bar-chart-2" | "bar-chart-3" | "bar-chart-4" | "bar-chart-big" | "bar-chart-horizontal" | "bar-chart-horizontal-big" | "barcode" | "barrel" | "baseline" | "bath" | "battery" | "battery-charging" | "battery-full" | "battery-low" | "battery-medium" | "battery-plus" | "battery-warning" | "beaker" | "bean" | "bean-off" | "bed" | "bed-double" | "bed-single" | "beef" | "beef-off" | "beer" | "beer-off" | "bell" | "bell-check" | "bell-dot" | "bell-electric" | "bell-minus" | "bell-off" | "bell-plus" | "bell-ring" | "between-horizonal-end" | "between-horizonal-start" | "between-horizontal-end" | "between-horizontal-start" | "between-vertical-end" | "between-vertical-start" | "biceps-flexed" | "bike" | "binary" | "binoculars" | "biohazard" | "bird" | "birdhouse" | "bitcoin" | "blend" | "blender" | "blinds" | "blocks" | "bluetooth" | "bluetooth-connected" | "bluetooth-off" | "bluetooth-searching" | "bold" | "bolt" | "bomb" | "bone" | "bone-fracture" | "book" | "book-a" | "book-alert" | "book-audio" | "book-check" | "book-copy" | "book-dashed" | "book-down" | "book-headphones" | "book-heart" | "book-image" | "book-key" | "book-lock" | "book-marked" | "book-minus" | "book-open" | "book-open-check" | "book-open-text" | "book-plus" | "book-search" | "book-template" | "book-text" | "book-type" | "book-up" | "book-up-2" | "book-user" | "book-x" | "bookmark" | "bookmark-check" | "bookmark-minus" | "bookmark-off" | "bookmark-plus" | "bookmark-x" | "boom-box" | "bot" | "bot-message-square" | "bot-off" | "bottle-wine" | "bow-arrow" | "box" | "box-select" | "boxes" | "braces" | "brackets" | "brain" | "brain-circuit" | "brain-cog" | "brick-wall" | "brick-wall-fire" | "brick-wall-shield" | "briefcase" | "briefcase-business" | "briefcase-conveyor-belt" | "briefcase-medical" | "bring-to-front" | "broccoli" | "broom" | "broom-sparkles" | "brush" | "brush-cleaning" | "bubbles" | "bug" | "bug-off" | "bug-play" | "building" | "building-2" | "bus" | "bus-front" | "cable" | "cable-car" | "cake" | "cake-slice" | "calculator" | "calendar" | "calendar-1" | "calendar-arrow-down" | "calendar-arrow-up" | "calendar-check" | "calendar-check-2" | "calendar-clock" | "calendar-cog" | "calendar-days" | "calendar-fold" | "calendar-heart" | "calendar-minus" | "calendar-minus-2" | "calendar-off" | "calendar-plus" | "calendar-plus-2" | "calendar-range" | "calendar-search" | "calendar-sync" | "calendar-x" | "calendar-x-2" | "calendars" | "camera" | "camera-off" | "candlestick-chart" | "candy" | "candy-cane" | "candy-off" | "cannabis" | "cannabis-off" | "captions" | "captions-off" | "car" | "car-front" | "car-taxi-front" | "caravan" | "card-sim" | "carrot" | "case-lower" | "case-sensitive" | "case-upper" | "cassette-tape" | "cast" | "castle" | "cat" | "cctv" | "cctv-off" | "chart-area" | "chart-bar" | "chart-bar-big" | "chart-bar-decreasing" | "chart-bar-increasing" | "chart-bar-stacked" | "chart-candlestick" | "chart-column" | "chart-column-big" | "chart-column-decreasing" | "chart-column-increasing" | "chart-column-stacked" | "chart-gantt" | "chart-line" | "chart-network" | "chart-no-axes-column" | "chart-no-axes-column-decreasing" | "chart-no-axes-column-increasing" | "chart-no-axes-combined" | "chart-no-axes-gantt" | "chart-pie" | "chart-scatter" | "chart-spline" | "check" | "check-check" | "check-circle" | "check-circle-2" | "check-line" | "check-square" | "check-square-2" | "chef-hat" | "cherry" | "chess-bishop" | "chess-king" | "chess-knight" | "chess-pawn" | "chess-queen" | "chess-rook" | "chevron-down" | "chevron-down-circle" | "chevron-down-square" | "chevron-first" | "chevron-last" | "chevron-left" | "chevron-left-circle" | "chevron-left-square" | "chevron-right" | "chevron-right-circle" | "chevron-right-square" | "chevron-up" | "chevron-up-circle" | "chevron-up-square" | "chevrons-down" | "chevrons-down-up" | "chevrons-left" | "chevrons-left-right" | "chevrons-left-right-ellipsis" | "chevrons-right" | "chevrons-right-left" | "chevrons-up" | "chevrons-up-down" | "church" | "cigarette" | "cigarette-off" | "circle" | "circle-alert" | "circle-arrow-down" | "circle-arrow-left" | "circle-arrow-out-down-left" | "circle-arrow-out-down-right" | "circle-arrow-out-up-left" | "circle-arrow-out-up-right" | "circle-arrow-right" | "circle-arrow-up" | "circle-check" | "circle-check-big" | "circle-chevron-down" | "circle-chevron-left" | "circle-chevron-right" | "circle-chevron-up" | "circle-dashed" | "circle-divide" | "circle-dollar-sign" | "circle-dot" | "circle-dot-dashed" | "circle-ellipsis" | "circle-equal" | "circle-euro" | "circle-fading-arrow-up" | "circle-fading-plus" | "circle-gauge" | "circle-help" | "circle-minus" | "circle-off" | "circle-parking" | "circle-parking-off" | "circle-pause" | "circle-percent" | "circle-pile" | "circle-play" | "circle-plus" | "circle-pound-sterling" | "circle-power" | "circle-question-mark" | "circle-slash" | "circle-slash-2" | "circle-slashed" | "circle-small" | "circle-star" | "circle-stop" | "circle-user" | "circle-user-round" | "circle-x" | "circuit-board" | "citrus" | "clapperboard" | "clipboard" | "clipboard-check" | "clipboard-clock" | "clipboard-copy" | "clipboard-edit" | "clipboard-list" | "clipboard-minus" | "clipboard-paste" | "clipboard-pen" | "clipboard-pen-line" | "clipboard-plus" | "clipboard-signature" | "clipboard-type" | "clipboard-x" | "clock" | "clock-1" | "clock-10" | "clock-11" | "clock-12" | "clock-2" | "clock-3" | "clock-4" | "clock-5" | "clock-6" | "clock-7" | "clock-8" | "clock-9" | "clock-alert" | "clock-arrow-down" | "clock-arrow-left" | "clock-arrow-right" | "clock-arrow-up" | "clock-check" | "clock-fading" | "clock-plus" | "closed-caption" | "cloud" | "cloud-alert" | "cloud-backup" | "cloud-check" | "cloud-cog" | "cloud-download" | "cloud-drizzle" | "cloud-fog" | "cloud-hail" | "cloud-lightning" | "cloud-moon" | "cloud-moon-rain" | "cloud-off" | "cloud-rain" | "cloud-rain-wind" | "cloud-snow" | "cloud-sun" | "cloud-sun-rain" | "cloud-sync" | "cloud-upload" | "cloudy" | "clover" | "club" | "code" | "code-2" | "code-square" | "code-xml" | "coffee" | "cog" | "coins" | "columns" | "columns-2" | "columns-3" | "columns-3-cog" | "columns-4" | "columns-settings" | "combine" | "command" | "compass" | "component" | "computer" | "concierge-bell" | "cone" | "construction" | "contact" | "contact-2" | "contact-round" | "container" | "contrast" | "cookie" | "cooking-pot" | "copy" | "copy-check" | "copy-minus" | "copy-plus" | "copy-slash" | "copy-x" | "copyleft" | "copyright" | "corner-down-left" | "corner-down-right" | "corner-left-down" | "corner-left-up" | "corner-right-down" | "corner-right-up" | "corner-up-left" | "corner-up-right" | "cpu" | "creative-commons" | "credit-card" | "croissant" | "crop" | "cross" | "crosshair" | "crown" | "cuboid" | "cup-soda" | "curly-braces" | "currency" | "cylinder" | "dam" | "database" | "database-arrow-down" | "database-arrow-up" | "database-backup" | "database-check" | "database-minus" | "database-plus" | "database-search" | "database-x" | "database-zap" | "decimals-arrow-left" | "decimals-arrow-right" | "delete" | "dessert" | "diameter" | "diamond" | "diamond-minus" | "diamond-percent" | "diamond-plus" | "dice-1" | "dice-2" | "dice-3" | "dice-4" | "dice-5" | "dice-6" | "dices" | "diff" | "disc" | "disc-2" | "disc-3" | "disc-album" | "divide" | "divide-circle" | "divide-square" | "dna" | "dna-off" | "dock" | "dog" | "dollar-sign" | "donut" | "door-closed" | "door-closed-locked" | "door-open" | "dot" | "dot-square" | "download" | "download-cloud" | "drafting-compass" | "drama" | "drill" | "drone" | "droplet" | "droplet-off" | "droplets" | "drum" | "drumstick" | "dumbbell" | "ear" | "ear-off" | "earth" | "earth-lock" | "eclipse" | "edit" | "edit-2" | "edit-3" | "egg" | "egg-fried" | "egg-off" | "eject" | "ellipse" | "ellipsis" | "ellipsis-vertical" | "equal" | "equal-approximately" | "equal-not" | "equal-square" | "eraser" | "ethernet-port" | "euro" | "ev-charger" | "expand" | "external-link" | "eye" | "eye-closed" | "eye-dashed" | "eye-off" | "face-angry" | "face-expressionless" | "face-grinning" | "face-neutral" | "face-slightly-frowning" | "face-slightly-smiling" | "face-slightly-smiling-plus" | "factory" | "fan" | "fast-forward" | "feather" | "fence" | "ferris-wheel" | "file" | "file-archive" | "file-audio" | "file-audio-2" | "file-axis-3-d" | "file-axis-3d" | "file-badge" | "file-badge-2" | "file-bar-chart" | "file-bar-chart-2" | "file-box" | "file-braces" | "file-braces-corner" | "file-chart-column" | "file-chart-column-increasing" | "file-chart-line" | "file-chart-pie" | "file-check" | "file-check-2" | "file-check-corner" | "file-clock" | "file-code" | "file-code-2" | "file-code-corner" | "file-cog" | "file-cog-2" | "file-diff" | "file-digit" | "file-down" | "file-edit" | "file-exclamation-point" | "file-headphone" | "file-heart" | "file-image" | "file-input" | "file-json" | "file-json-2" | "file-key" | "file-key-2" | "file-line-chart" | "file-lock" | "file-lock-2" | "file-minus" | "file-minus-2" | "file-minus-corner" | "file-music" | "file-output" | "file-pen" | "file-pen-line" | "file-pie-chart" | "file-play" | "file-plus" | "file-plus-2" | "file-plus-corner" | "file-question" | "file-question-mark" | "file-scan" | "file-search" | "file-search-2" | "file-search-corner" | "file-signal" | "file-signature" | "file-sliders" | "file-spreadsheet" | "file-stack" | "file-symlink" | "file-terminal" | "file-text" | "file-type" | "file-type-2" | "file-type-corner" | "file-up" | "file-user" | "file-video" | "file-video-2" | "file-video-camera" | "file-volume" | "file-volume-2" | "file-warning" | "file-x" | "file-x-2" | "file-x-corner" | "files" | "film" | "filter" | "filter-x" | "fingerprint-pattern" | "fire-extinguisher" | "fish" | "fish-off" | "fish-symbol" | "fishing-hook" | "fishing-rod" | "flag" | "flag-off" | "flag-triangle-left" | "flag-triangle-right" | "flame" | "flame-kindling" | "flashlight" | "flashlight-off" | "flask-conical" | "flask-conical-off" | "flask-round" | "flip-horizontal" | "flip-horizontal-2" | "flip-vertical" | "flip-vertical-2" | "flower" | "flower-2" | "focus" | "fold-horizontal" | "fold-vertical" | "folder" | "folder-archive" | "folder-bookmark" | "folder-check" | "folder-clock" | "folder-closed" | "folder-code" | "folder-cog" | "folder-cog-2" | "folder-dot" | "folder-down" | "folder-edit" | "folder-git" | "folder-git-2" | "folder-heart" | "folder-input" | "folder-kanban" | "folder-key" | "folder-lock" | "folder-minus" | "folder-open" | "folder-open-dot" | "folder-output" | "folder-pen" | "folder-plus" | "folder-root" | "folder-search" | "folder-search-2" | "folder-symlink" | "folder-sync" | "folder-tree" | "folder-up" | "folder-x" | "folders" | "footprints" | "fork-knife" | "fork-knife-crossed" | "forklift" | "form" | "form-input" | "forward" | "frame" | "frown" | "fuel" | "fullscreen" | "function-square" | "funnel" | "funnel-plus" | "funnel-x" | "gallery-horizontal" | "gallery-horizontal-end" | "gallery-thumbnails" | "gallery-vertical" | "gallery-vertical-end" | "gamepad" | "gamepad-2" | "gamepad-directional" | "gantt-chart" | "gantt-chart-square" | "gauge" | "gauge-circle" | "gavel" | "gem" | "georgian-lari" | "ghost" | "gift" | "git-branch" | "git-branch-minus" | "git-branch-plus" | "git-commit" | "git-commit-horizontal" | "git-commit-vertical" | "git-compare" | "git-compare-arrows" | "git-fork" | "git-graph" | "git-merge" | "git-merge-conflict" | "git-pull-request" | "git-pull-request-arrow" | "git-pull-request-closed" | "git-pull-request-create" | "git-pull-request-create-arrow" | "git-pull-request-draft" | "glass-water" | "glasses" | "globe" | "globe-2" | "globe-check" | "globe-lock" | "globe-off" | "globe-x" | "goal" | "gpu" | "grab" | "graduation-cap" | "grape" | "grid" | "grid-2-x-2" | "grid-2-x-2-check" | "grid-2-x-2-plus" | "grid-2-x-2-x" | "grid-2x2" | "grid-2x2-check" | "grid-2x2-plus" | "grid-2x2-x" | "grid-3-x-3" | "grid-3x2" | "grid-3x3" | "grip" | "grip-horizontal" | "grip-vertical" | "group" | "guitar" | "ham" | "hamburger" | "hammer" | "hand" | "hand-coins" | "hand-fist" | "hand-grab" | "hand-heart" | "hand-helping" | "hand-metal" | "hand-platter" | "handbag" | "handshake" | "hard-drive" | "hard-drive-download" | "hard-drive-upload" | "hard-hat" | "hash" | "hat-glasses" | "haze" | "hd" | "hdmi-port" | "heading" | "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "headphone-off" | "headphones" | "headset" | "heart" | "heart-crack" | "heart-handshake" | "heart-minus" | "heart-off" | "heart-plus" | "heart-pulse" | "heart-x" | "heater" | "helicopter" | "help-circle" | "helping-hand" | "hexagon" | "highlighter" | "history" | "home" | "hop" | "hop-off" | "hospital" | "hotel" | "hourglass" | "house" | "house-heart" | "house-plug" | "house-plus" | "house-wifi" | "ice-cream" | "ice-cream-2" | "ice-cream-bowl" | "ice-cream-cone" | "id-card" | "id-card-lanyard" | "image" | "image-down" | "image-minus" | "image-off" | "image-play" | "image-plus" | "image-up" | "image-upscale" | "images" | "import" | "inbox" | "indent" | "indent-decrease" | "indent-increase" | "indian-rupee" | "infinity" | "info" | "inspect" | "inspection-panel" | "italic" | "iteration-ccw" | "iteration-cw" | "japanese-yen" | "joystick" | "kanban" | "kanban-square" | "kanban-square-dashed" | "kayak" | "key" | "key-round" | "key-square" | "keyboard" | "keyboard-music" | "keyboard-off" | "lamp" | "lamp-ceiling" | "lamp-desk" | "lamp-floor" | "lamp-wall-down" | "lamp-wall-up" | "land-plot" | "landmark" | "languages" | "laptop" | "laptop-2" | "laptop-minimal" | "laptop-minimal-check" | "lasso" | "lasso-select" | "laugh" | "layer-arrow-down" | "layer-arrow-up" | "layers" | "layers-2" | "layers-3" | "layers-arrow-down" | "layers-arrow-up" | "layers-minus" | "layers-plus" | "layout" | "layout-dashboard" | "layout-freeform" | "layout-grid" | "layout-list" | "layout-panel-left" | "layout-panel-top" | "layout-template" | "leaf" | "leafy-green" | "lectern" | "lens-concave" | "lens-convex" | "letter-text" | "library" | "library-big" | "library-square" | "life-buoy" | "ligature" | "lightbulb" | "lightbulb-off" | "line-chart" | "line-dot-right-horizontal" | "line-squiggle" | "line-style" | "link" | "link-2" | "link-2-off" | "list" | "list-check" | "list-checks" | "list-chevrons-down-up" | "list-chevrons-up-down" | "list-collapse" | "list-end" | "list-filter" | "list-filter-plus" | "list-indent-decrease" | "list-indent-increase" | "list-minus" | "list-music" | "list-ordered" | "list-plus" | "list-restart" | "list-sort-ascending" | "list-sort-descending" | "list-start" | "list-todo" | "list-tree" | "list-video" | "list-x" | "loader" | "loader-2" | "loader-circle" | "loader-pinwheel" | "locate" | "locate-fixed" | "locate-off" | "location-edit" | "lock" | "lock-keyhole" | "lock-keyhole-open" | "lock-open" | "log-in" | "log-out" | "logs" | "lollipop" | "luggage" | "m-square" | "magnet" | "mail" | "mail-badge" | "mail-check" | "mail-minus" | "mail-open" | "mail-plus" | "mail-question" | "mail-question-mark" | "mail-search" | "mail-warning" | "mail-x" | "mailbox" | "mails" | "map" | "map-minus" | "map-pin" | "map-pin-check" | "map-pin-check-inside" | "map-pin-house" | "map-pin-minus" | "map-pin-minus-inside" | "map-pin-off" | "map-pin-pen" | "map-pin-plus" | "map-pin-plus-inside" | "map-pin-search" | "map-pin-x" | "map-pin-x-inside" | "map-pinned" | "map-plus" | "mars" | "mars-stroke" | "martini" | "maximize" | "maximize-2" | "medal" | "megaphone" | "megaphone-off" | "meh" | "memory-stick" | "menu" | "menu-square" | "merge" | "message-circle" | "message-circle-check" | "message-circle-code" | "message-circle-dashed" | "message-circle-heart" | "message-circle-more" | "message-circle-off" | "message-circle-plus" | "message-circle-question" | "message-circle-question-mark" | "message-circle-reply" | "message-circle-warning" | "message-circle-x" | "message-square" | "message-square-check" | "message-square-code" | "message-square-dashed" | "message-square-diff" | "message-square-dot" | "message-square-heart" | "message-square-lock" | "message-square-more" | "message-square-off" | "message-square-plus" | "message-square-quote" | "message-square-reply" | "message-square-share" | "message-square-text" | "message-square-warning" | "message-square-x" | "messages-square" | "metronome" | "mic" | "mic-2" | "mic-audio-lines" | "mic-off" | "mic-signal" | "mic-vocal" | "microchip" | "microscope" | "microwave" | "milestone" | "milk" | "milk-off" | "minimize" | "minimize-2" | "minus" | "minus-circle" | "minus-square" | "mirror-rectangular" | "mirror-round" | "monitor" | "monitor-check" | "monitor-cloud" | "monitor-cog" | "monitor-dot" | "monitor-down" | "monitor-off" | "monitor-pause" | "monitor-play" | "monitor-smartphone" | "monitor-speaker" | "monitor-stop" | "monitor-up" | "monitor-x" | "moon" | "moon-star" | "more-horizontal" | "more-vertical" | "mosque" | "motorbike" | "mountain" | "mountain-snow" | "mouse" | "mouse-left" | "mouse-off" | "mouse-pointer" | "mouse-pointer-2" | "mouse-pointer-2-off" | "mouse-pointer-ban" | "mouse-pointer-click" | "mouse-pointer-square-dashed" | "mouse-right" | "move" | "move-3-d" | "move-3d" | "move-diagonal" | "move-diagonal-2" | "move-down" | "move-down-left" | "move-down-right" | "move-horizontal" | "move-left" | "move-right" | "move-up" | "move-up-left" | "move-up-right" | "move-vertical" | "music" | "music-2" | "music-3" | "music-4" | "navigation" | "navigation-2" | "navigation-2-off" | "navigation-off" | "network" | "newspaper" | "nfc" | "non-binary" | "notebook" | "notebook-pen" | "notebook-tabs" | "notebook-text" | "notepad-text" | "notepad-text-dashed" | "nut" | "nut-off" | "octagon" | "octagon-alert" | "octagon-minus" | "octagon-pause" | "octagon-x" | "omega" | "option" | "orbit" | "origami" | "outdent" | "package" | "package-2" | "package-check" | "package-minus" | "package-open" | "package-plus" | "package-search" | "package-x" | "paint-bucket" | "paint-roller" | "paintbrush" | "paintbrush-2" | "paintbrush-vertical" | "palette" | "palmtree" | "panda" | "panel-bottom" | "panel-bottom-close" | "panel-bottom-dashed" | "panel-bottom-inactive" | "panel-bottom-open" | "panel-left" | "panel-left-close" | "panel-left-dashed" | "panel-left-inactive" | "panel-left-open" | "panel-left-right-dashed" | "panel-right" | "panel-right-close" | "panel-right-dashed" | "panel-right-inactive" | "panel-right-open" | "panel-top" | "panel-top-bottom-dashed" | "panel-top-close" | "panel-top-dashed" | "panel-top-inactive" | "panel-top-open" | "panels-left-bottom" | "panels-left-right" | "panels-right-bottom" | "panels-top-bottom" | "panels-top-left" | "paper-bag" | "paperclip" | "parasol" | "parentheses" | "parking-circle" | "parking-circle-off" | "parking-meter" | "parking-square" | "parking-square-off" | "party-popper" | "pause" | "pause-circle" | "pause-octagon" | "paw-print" | "pc-case" | "pen" | "pen-box" | "pen-line" | "pen-off" | "pen-square" | "pen-tool" | "pencil" | "pencil-line" | "pencil-off" | "pencil-ruler" | "pencil-sparkles" | "pentagon" | "percent" | "percent-circle" | "percent-diamond" | "percent-square" | "person-standing" | "phi" | "philippine-peso" | "phone" | "phone-call" | "phone-forwarded" | "phone-incoming" | "phone-missed" | "phone-off" | "phone-outgoing" | "pi" | "pi-square" | "piano" | "pickaxe" | "picture-in-picture" | "picture-in-picture-2" | "pie-chart" | "piggy-bank" | "pilcrow" | "pilcrow-left" | "pilcrow-right" | "pilcrow-square" | "pill" | "pill-bottle" | "pin" | "pin-off" | "pipette" | "pizza" | "plane" | "plane-landing" | "plane-takeoff" | "play" | "play-circle" | "play-off" | "play-square" | "plug" | "plug-2" | "plug-zap" | "plug-zap-2" | "plus" | "plus-circle" | "plus-square" | "pocket-knife" | "podcast" | "podium" | "pointer" | "pointer-off" | "popcorn" | "popsicle" | "pound-sterling" | "power" | "power-circle" | "power-off" | "power-square" | "presentation" | "printer" | "printer-check" | "printer-x" | "projector" | "proportions" | "puzzle" | "pyramid" | "qr-code" | "quote" | "rabbit" | "radar" | "radiation" | "radical" | "radio" | "radio-off" | "radio-receiver" | "radio-tower" | "radius" | "rainbow" | "rat" | "ratio" | "receipt" | "receipt-cent" | "receipt-euro" | "receipt-indian-rupee" | "receipt-japanese-yen" | "receipt-pound-sterling" | "receipt-russian-ruble" | "receipt-swiss-franc" | "receipt-text" | "receipt-turkish-lira" | "rectangle-circle" | "rectangle-ellipsis" | "rectangle-goggles" | "rectangle-horizontal" | "rectangle-vertical" | "recycle" | "redo" | "redo-2" | "redo-dot" | "refresh-ccw" | "refresh-ccw-dot" | "refresh-cw" | "refresh-cw-off" | "refrigerator" | "regex" | "remove-formatting" | "repeat" | "repeat-1" | "repeat-2" | "repeat-off" | "replace" | "replace-all" | "reply" | "reply-all" | "rewind" | "ribbon" | "road" | "rocket" | "rocking-chair" | "roller-coaster" | "rose" | "rotate-3-d" | "rotate-3d" | "rotate-ccw" | "rotate-ccw-clock" | "rotate-ccw-key" | "rotate-ccw-square" | "rotate-cw" | "rotate-cw-fading-clock" | "rotate-cw-square" | "route" | "route-off" | "router" | "rows" | "rows-2" | "rows-3" | "rows-4" | "rss" | "ruler" | "ruler-dimension-line" | "russian-ruble" | "sailboat" | "salad" | "sandwich" | "satellite" | "satellite-dish" | "saudi-riyal" | "save" | "save-all" | "save-check" | "save-off" | "save-pen" | "save-plus" | "scale" | "scale-3-d" | "scale-3d" | "scaling" | "scan" | "scan-barcode" | "scan-box" | "scan-eye" | "scan-face" | "scan-heart" | "scan-line" | "scan-qr-code" | "scan-search" | "scan-square" | "scan-text" | "scatter-chart" | "school" | "school-2" | "scissors" | "scissors-line-dashed" | "scissors-square" | "scissors-square-dashed-bottom" | "scooter" | "screen-share" | "screen-share-off" | "scroll" | "scroll-text" | "search" | "search-alert" | "search-check" | "search-code" | "search-slash" | "search-x" | "section" | "send" | "send-horizonal" | "send-horizontal" | "send-to-back" | "separator-horizontal" | "separator-vertical" | "server" | "server-cog" | "server-crash" | "server-off" | "server-plus" | "settings" | "settings-2" | "shapes" | "share" | "share-2" | "sheet" | "shell" | "shelving-unit" | "shield" | "shield-alert" | "shield-ban" | "shield-check" | "shield-close" | "shield-cog" | "shield-cog-corner" | "shield-ellipsis" | "shield-half" | "shield-keyhole" | "shield-lock" | "shield-minus" | "shield-off" | "shield-plus" | "shield-question" | "shield-question-mark" | "shield-user" | "shield-x" | "ship" | "ship-wheel" | "shirt" | "shopping-bag" | "shopping-basket" | "shopping-cart" | "shovel" | "shower-head" | "shredder" | "shrimp" | "shrink" | "shrub" | "shuffle" | "sidebar" | "sidebar-close" | "sidebar-open" | "sigma" | "sigma-square" | "signal" | "signal-high" | "signal-low" | "signal-medium" | "signal-zero" | "signature" | "signpost" | "signpost-big" | "siren" | "skip-back" | "skip-forward" | "skull" | "slash" | "slash-square" | "slice" | "sliders" | "sliders-horizontal" | "sliders-vertical" | "smartphone" | "smartphone-charging" | "smartphone-nfc" | "smile" | "smile-plus" | "snail" | "snowflake" | "soap-dispenser-droplet" | "sofa" | "solar-panel" | "sort-asc" | "sort-desc" | "soup" | "space" | "spade" | "sparkle" | "sparkles" | "speaker" | "speech" | "spell-check" | "spell-check-2" | "spline" | "spline-pointer" | "split" | "split-square-horizontal" | "split-square-vertical" | "spool" | "sport-shoe" | "spotlight" | "spray-can" | "sprout" | "square" | "square-activity" | "square-arrow-down" | "square-arrow-down-left" | "square-arrow-down-right" | "square-arrow-left" | "square-arrow-out-down-left" | "square-arrow-out-down-right" | "square-arrow-out-up-left" | "square-arrow-out-up-right" | "square-arrow-right" | "square-arrow-right-enter" | "square-arrow-right-exit" | "square-arrow-up" | "square-arrow-up-left" | "square-arrow-up-right" | "square-asterisk" | "square-bottom-dashed-scissors" | "square-centerline-dashed-horizontal" | "square-centerline-dashed-vertical" | "square-chart-gantt" | "square-check" | "square-check-big" | "square-chevron-down" | "square-chevron-left" | "square-chevron-right" | "square-chevron-up" | "square-code" | "square-dashed" | "square-dashed-bottom" | "square-dashed-bottom-code" | "square-dashed-kanban" | "square-dashed-mouse-pointer" | "square-dashed-text" | "square-dashed-top-solid" | "square-divide" | "square-dot" | "square-equal" | "square-function" | "square-gantt-chart" | "square-kanban" | "square-library" | "square-m" | "square-menu" | "square-minus" | "square-mouse-pointer" | "square-off" | "square-parking" | "square-parking-off" | "square-pause" | "square-pen" | "square-percent" | "square-pi" | "square-pilcrow" | "square-play" | "square-plus" | "square-power" | "square-radical" | "square-round-corner" | "square-scissors" | "square-sigma" | "square-slash" | "square-split-horizontal" | "square-split-vertical" | "square-square" | "square-stack" | "square-star" | "square-stop" | "square-terminal" | "square-user" | "square-user-round" | "square-x" | "squares-exclude" | "squares-intersect" | "squares-subtract" | "squares-unite" | "squircle" | "squircle-dashed" | "squirrel" | "stamp" | "star" | "star-check" | "star-half" | "star-minus" | "star-off" | "star-plus" | "star-x" | "stars" | "step-back" | "step-forward" | "stethoscope" | "sticker" | "sticky-note" | "sticky-note-check" | "sticky-note-minus" | "sticky-note-off" | "sticky-note-plus" | "sticky-note-x" | "sticky-notes" | "stone" | "stop-circle" | "store" | "stretch-horizontal" | "stretch-vertical" | "strikethrough" | "subscript" | "subtitles" | "summary" | "sun" | "sun-dim" | "sun-medium" | "sun-moon" | "sun-snow" | "sunrise" | "sunset" | "superscript" | "swatch-book" | "swiss-franc" | "switch-camera" | "sword" | "swords" | "syringe" | "table" | "table-2" | "table-cells-merge" | "table-cells-split" | "table-columns-split" | "table-config" | "table-of-contents" | "table-properties" | "table-rows-split" | "tablet" | "tablet-smartphone" | "tablets" | "tag" | "tag-plus" | "tag-x" | "tags" | "tally-1" | "tally-2" | "tally-3" | "tally-4" | "tally-5" | "tangent" | "target" | "telescope" | "tent" | "tent-tree" | "terminal" | "terminal-square" | "test-tube" | "test-tube-2" | "test-tube-diagonal" | "test-tubes" | "text" | "text-align-center" | "text-align-end" | "text-align-justify" | "text-align-start" | "text-cursor" | "text-cursor-input" | "text-initial" | "text-quote" | "text-search" | "text-select" | "text-selection" | "text-wrap" | "theater" | "thermometer" | "thermometer-snowflake" | "thermometer-sun" | "thumbs-down" | "thumbs-up" | "ticket" | "ticket-check" | "ticket-minus" | "ticket-percent" | "ticket-plus" | "ticket-slash" | "ticket-x" | "tickets" | "tickets-plane" | "timeline" | "timer" | "timer-off" | "timer-reset" | "toggle-left" | "toggle-right" | "toilet" | "tool-case" | "toolbox" | "tornado" | "torus" | "touchpad" | "touchpad-off" | "towel-rack" | "tower-control" | "toy-brick" | "tractor" | "traffic-cone" | "train" | "train-front" | "train-front-tunnel" | "train-track" | "tram-front" | "transgender" | "trash" | "trash-2" | "tree-deciduous" | "tree-palm" | "tree-pine" | "trees" | "trending-down" | "trending-up" | "trending-up-down" | "triangle" | "triangle-alert" | "triangle-dashed" | "triangle-right" | "trophy" | "truck" | "truck-electric" | "turkish-lira" | "turntable" | "turtle" | "tv" | "tv-2" | "tv-minimal" | "tv-minimal-play" | "type" | "type-outline" | "umbrella" | "umbrella-off" | "underline" | "undo" | "undo-2" | "undo-dot" | "unfold-horizontal" | "unfold-vertical" | "ungroup" | "university" | "unlink" | "unlink-2" | "unlock" | "unlock-keyhole" | "unplug" | "upload" | "upload-cloud" | "usb" | "user" | "user-2" | "user-check" | "user-check-2" | "user-circle" | "user-circle-2" | "user-cog" | "user-cog-2" | "user-key" | "user-lock" | "user-minus" | "user-minus-2" | "user-pen" | "user-plus" | "user-plus-2" | "user-round" | "user-round-arrow-left" | "user-round-check" | "user-round-cog" | "user-round-key" | "user-round-minus" | "user-round-pen" | "user-round-plus" | "user-round-search" | "user-round-x" | "user-search" | "user-shield" | "user-square" | "user-square-2" | "user-star" | "user-x" | "user-x-2" | "users" | "users-2" | "users-round" | "utensils" | "utensils-crossed" | "utility-pole" | "van" | "variable" | "vault" | "vector-square" | "vegan" | "venetian-mask" | "venus" | "venus-and-mars" | "verified" | "vibrate" | "vibrate-off" | "video" | "video-off" | "videotape" | "view" | "voicemail" | "volleyball" | "volume" | "volume-1" | "volume-2" | "volume-off" | "volume-x" | "vote" | "wallet" | "wallet-2" | "wallet-cards" | "wallet-minimal" | "wallpaper" | "wand" | "wand-2" | "wand-sparkles" | "warehouse" | "washing-machine" | "watch" | "waves" | "waves-arrow-down" | "waves-arrow-up" | "waves-horizontal" | "waves-ladder" | "waves-vertical" | "waypoints" | "webcam" | "webcam-off" | "webhook" | "webhook-off" | "weight" | "weight-tilde" | "wheat" | "wheat-off" | "whole-word" | "wifi" | "wifi-cog" | "wifi-high" | "wifi-low" | "wifi-off" | "wifi-pen" | "wifi-sync" | "wifi-zero" | "wind" | "wind-arrow-down" | "wine" | "wine-off" | "workflow" | "worm" | "wrap-text" | "wrench" | "wrench-off" | "x" | "x-circle" | "x-line-top" | "x-octagon" | "x-square" | "zap" | "zap-off" | "zodiac-aquarius" | "zodiac-aries" | "zodiac-cancer" | "zodiac-capricorn" | "zodiac-gemini" | "zodiac-leo" | "zodiac-libra" | "zodiac-ophiuchus" | "zodiac-pisces" | "zodiac-sagittarius" | "zodiac-scorpio" | "zodiac-taurus" | "zodiac-virgo" | "zoom-in" | "zoom-out";
59
82
 
60
83
  /**
61
84
  * Every addressable icon slug — canonical names plus deprecated aliases,
62
- * 1997 in total, sorted.
85
+ * 2024 in total, sorted.
63
86
  *
64
87
  * Importing this pulls in the whole list (~6 KB brotli). Reach for it when you
65
88
  * are building a picker; `<Icon>` itself does not need it.
@@ -169,6 +192,52 @@ export declare function isIconName(value: string): value is IconName;
169
192
  */
170
193
  export declare function loadIcon(slug: string): Promise<void>;
171
194
 
195
+ /**
196
+ * The slug `fromMaterialSymbol` falls back to when a code is unknown.
197
+ *
198
+ * A neutral glyph rather than nothing: a category created in an admin with a
199
+ * code this table has not learned yet still has to draw something, or it opens a
200
+ * hole in the grid and the bug reads as a layout problem instead of a missing
201
+ * mapping.
202
+ *
203
+ * Lucide's `circle-help` is a deprecated alias of this slug. `<Icon>` resolves
204
+ * aliases, so both render — but the bridge emits the canonical name, since a
205
+ * value that gets persisted should not be one lucide has already renamed.
206
+ */
207
+ export declare const MATERIAL_SYMBOL_FALLBACK: IconName;
208
+
209
+ /**
210
+ * Material Symbols code → lucide slug, for backends that store `icon_code`.
211
+ *
212
+ * Every Python backend we write stores a category icon as a Material Symbol
213
+ * (`build`, `format_paint`, `electrical_services`) — the vocabulary Flutter,
214
+ * Android and the administrative seeds already speak. The SDK speaks lucide in
215
+ * kebab-case. The two lists do not meet, and the failure is nastier than an
216
+ * empty screen: a handful of codes collide by accident, so roughly one row in
217
+ * ten draws the right icon and the bug reads as "some icons went missing".
218
+ *
219
+ * **This is a seed table, not the full vocabulary.** Material Symbols ships
220
+ * ~3600 names and almost none of them will ever appear in an `icon_code` of
221
+ * ours. It grows on demand, one hand-written pair at a time — a map generated by
222
+ * name heuristics gets it badly wrong, starting with `build`, which is a wrench
223
+ * in Material Symbols and not anything to do with construction.
224
+ *
225
+ * **Approximations, deliberate and not one-to-one:**
226
+ *
227
+ * - `plumbing` → `shower-head`, because lucide has no pipe.
228
+ * - `build`, `handyman` and `hardware` all land on `wrench` — Material Symbols
229
+ * distinguishes the tools, lucide does not.
230
+ * - `pedal_bike`, `two_wheeler` and `delivery_dining` all land on `bike`.
231
+ *
232
+ * The thirteen identity pairs are here on purpose. Their names happen to match
233
+ * in both vocabularies, so they already render today — leaving them out would
234
+ * send them to {@link MATERIAL_SYMBOL_FALLBACK} and make this bridge a
235
+ * regression for exactly the codes that used to work.
236
+ *
237
+ * @see fromMaterialSymbol — the lookup you normally call.
238
+ */
239
+ export declare const materialToLucide: Readonly<Record<string, IconName>>;
240
+
172
241
  /**
173
242
  * Read an icon out of the cache without triggering a fetch.
174
243
  *
@@ -191,7 +260,7 @@ export declare function preloadIcons(slugs: readonly string[]): Promise<void>;
191
260
  /**
192
261
  * Map a slug to the canonical slug that owns the icon.
193
262
  *
194
- * Lucide keeps 248 deprecated aliases (`alert-circle` → `circle-alert`), and a
263
+ * Lucide keeps 257 deprecated aliases (`alert-circle` → `circle-alert`), and a
195
264
  * slug persisted in a database years ago is exactly the case this feature exists
196
265
  * for, so an alias must keep resolving after a lucide bump renames it.
197
266
  *
package/dist/icons.js CHANGED
@@ -6,4 +6,5 @@ import { useIcon as c } from "./icons/use-icon.js";
6
6
  import { Icon as l } from "./icons/Icon.js";
7
7
  import { IconProvider as u } from "./icons/IconProvider.js";
8
8
  import { isIconName as d } from "./icons/is-icon-name.js";
9
- export { l as Icon, u as IconProvider, n as createIconRegistry, e as iconAliases, t as iconNames, r as iconStatus, d as isIconName, i as loadIcon, a as peekIcon, o as preloadIcons, s as resolveIconAlias, c as useIcon };
9
+ import { MATERIAL_SYMBOL_FALLBACK as f, fromMaterialSymbol as p, materialToLucide as m } from "./icons/material-symbols.js";
10
+ export { l as Icon, u as IconProvider, f as MATERIAL_SYMBOL_FALLBACK, n as createIconRegistry, p as fromMaterialSymbol, e as iconAliases, t as iconNames, r as iconStatus, d as isIconName, i as loadIcon, m as materialToLucide, a as peekIcon, o as preloadIcons, s as resolveIconAlias, c as useIcon };
@@ -1,2 +1,2 @@
1
- const e=require("./exceptions.cjs"),t=require("./canvas.cjs");var n=.85,r=`image/jpeg`,i=new Map;async function a(t,n={}){let r=n.type??`image/jpeg`,i=await o(t,r,n.quality??.85);if(i===null)throw new e.ImageEncodeError(`The canvas produced no bytes for ${r}. The image may be too large for this browser's canvas limits.`);return{blob:i,width:t.width,height:t.height,type:i.type||r,bytes:i.size}}async function o(e,t,n){return`convertToBlob`in e?await e.convertToBlob({type:t,quality:n}):await new Promise(r=>{e.toBlob(e=>r(e),t,n)})}async function s(e){let n=i.get(e);if(n!==void 0)return n;let r;try{let{createSurface:n}=await Promise.resolve().then(()=>require("./canvas.cjs")),i=n(1,1);t.getContext(i);let a=await o(i,e,.5);r=a!==null&&a.type===e}catch{r=!1}return i.set(e,r),r}async function c(e=[`image/webp`,`image/jpeg`]){for(let t of e)if(await s(t))return t;return`image/jpeg`}function l(){i.clear()}exports.DEFAULT_QUALITY=n,exports.DEFAULT_TYPE=r,exports.bestSupportedType=c,exports.encodeImage=a,exports.resetImageTypeSupportCache=l,exports.supportsImageType=s;
1
+ const e=require("./exceptions.cjs"),t=require("./canvas.cjs");var n=.85,r=`image/jpeg`,i=new Map;async function a(t,n={}){let r=n.type??`image/jpeg`,i=await o(t,r,n.quality??.85);if(i===null)throw new e.ImageEncodeError(`The canvas produced no bytes for ${r}. The image may be too large for this browser's canvas limits.`);return{blob:i,width:t.width,height:t.height,type:i.type||r,bytes:i.size}}async function o(e,t,n){return`convertToBlob`in e?await e.convertToBlob({type:t,quality:n}):await new Promise(r=>{e.toBlob(e=>r(e),t,n)})}async function s(e){let n=i.get(e);if(n!==void 0)return n;let r;try{let{createSurface:n}=await Promise.resolve().then(()=>require("./canvas.cjs")),i=n(1,1);t.getContext(i);let a=await o(i,e,.5);r=a!==null&&a.type===e}catch{r=!1}return i.set(e,r),r}async function c(e=[`image/webp`,`image/jpeg`]){for(let t of e)if(await s(t))return t;return`image/jpeg`}exports.DEFAULT_QUALITY=n,exports.DEFAULT_TYPE=r,exports.bestSupportedType=c,exports.encodeImage=a,exports.supportsImageType=s;
2
2
  //# sourceMappingURL=encode.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"encode.cjs","names":[],"sources":["../../src/imaging/encode.ts"],"sourcesContent":["/**\n * Getting bytes back out, and knowing which bytes you got.\n *\n * The trap here is silent: `canvas.toBlob(cb, \"image/avif\")` does not throw\n * on a browser without an AVIF encoder. It hands back a **PNG** with the\n * requested type ignored, and an app that trusted the request uploads\n * several megabytes where it planned for a few hundred kilobytes. Every\n * function here reports the type actually produced, and\n * :func:`supportsImageType` answers the question up front.\n */\n\nimport { getContext, type Surface } from \"./canvas\";\nimport { ImageEncodeError } from \"./exceptions\";\nimport type { EncodeOptions, ImageType, ProcessedImage } from \"./types\";\n\n/** Quality used when the caller does not choose. */\nexport const DEFAULT_QUALITY = 0.85;\n\n/** Format used when the caller does not choose. */\nexport const DEFAULT_TYPE: ImageType = \"image/jpeg\";\n\nconst supportCache = new Map<string, boolean>();\n\n/**\n * Encode a surface into image bytes.\n *\n * @param surface The canvas to encode.\n * @param options Format and quality.\n * @returns The blob plus the dimensions and the type actually produced.\n * @throws {@link ImageEncodeError} when the canvas produces nothing.\n */\nexport async function encodeImage(\n surface: Surface,\n options: EncodeOptions = {},\n): Promise<ProcessedImage> {\n const type = options.type ?? DEFAULT_TYPE;\n const quality = options.quality ?? DEFAULT_QUALITY;\n\n const blob = await surfaceToBlob(surface, type, quality);\n if (blob === null) {\n throw new ImageEncodeError(\n `The canvas produced no bytes for ${type}. The image may be too large ` +\n \"for this browser's canvas limits.\",\n );\n }\n\n return {\n blob,\n width: surface.width,\n height: surface.height,\n type: blob.type || type,\n bytes: blob.size,\n };\n}\n\n/**\n * Encode a surface, whichever kind it is.\n *\n * `OffscreenCanvas` and `HTMLCanvasElement` disagree on how to hand back\n * bytes — one returns a promise, the other takes a callback.\n *\n * @param surface The canvas.\n * @param type MIME type to request.\n * @param quality Quality for lossy formats.\n * @returns The blob, or `null` when the canvas produced nothing.\n */\nasync function surfaceToBlob(\n surface: Surface,\n type: string,\n quality: number,\n): Promise<Blob | null> {\n if (\"convertToBlob\" in surface) {\n return await surface.convertToBlob({ type, quality });\n }\n return await new Promise<Blob | null>((resolve) => {\n surface.toBlob((blob) => resolve(blob), type, quality);\n });\n}\n\n/**\n * Whether this browser can actually encode a format.\n *\n * Asks for a 1x1 image in that type and checks what came back, because\n * that is the only answer that counts: a browser that \"supports\" WebP for\n * display may still not encode it.\n *\n * @example\n * ```ts\n * const type = (await supportsImageType(\"image/webp\")) ? \"image/webp\" : \"image/jpeg\";\n * const resized = await resizeImage(file, { width: 1200, type });\n * ```\n *\n * @param type The format to test.\n * @returns Whether encoding produces that type. Cached per type.\n */\nexport async function supportsImageType(type: ImageType): Promise<boolean> {\n const cached = supportCache.get(type);\n if (cached !== undefined) return cached;\n\n let supported: boolean;\n try {\n const { createSurface } = await import(\"./canvas\");\n const surface = createSurface(1, 1);\n getContext(surface);\n const blob = await surfaceToBlob(surface, type, 0.5);\n supported = blob !== null && blob.type === type;\n } catch {\n supported = false;\n }\n\n supportCache.set(type, supported);\n return supported;\n}\n\n/**\n * Pick the smallest format this browser can actually produce.\n *\n * @example\n * ```ts\n * const type = await bestSupportedType([\"image/avif\", \"image/webp\", \"image/jpeg\"]);\n * ```\n *\n * @param preferences Formats in preference order.\n * @returns The first supported one, falling back to `image/jpeg`, which\n * every canvas implementation encodes.\n */\nexport async function bestSupportedType(\n preferences: readonly ImageType[] = [\"image/webp\", \"image/jpeg\"],\n): Promise<ImageType> {\n for (const type of preferences) {\n if (await supportsImageType(type)) return type;\n }\n return \"image/jpeg\";\n}\n\n/**\n * Clear the format-support cache.\n *\n * Only useful in tests: browser support does not change at runtime.\n */\nexport function resetImageTypeSupportCache(): void {\n supportCache.clear();\n}\n"],"mappings":"8DAgBA,IAAa,EAAkB,IAGlB,EAA0B,aAEjC,EAAe,IAAI,IAUzB,eAAsB,EAClB,EACA,EAAyB,CAAC,EACH,CACvB,IAAM,EAAO,EAAQ,MAAA,aAGf,EAAO,MAAM,EAAc,EAAS,EAF1B,EAAQ,SAAA,GAE+B,EACvD,GAAI,IAAS,KACT,MAAM,IAAI,EAAA,iBACN,oCAAoC,EAAK,+DAE7C,EAGJ,MAAO,CACH,OACA,MAAO,EAAQ,MACf,OAAQ,EAAQ,OAChB,KAAM,EAAK,MAAQ,EACnB,MAAO,EAAK,IAChB,CACJ,CAaA,eAAe,EACX,EACA,EACA,EACoB,CAIpB,MAHI,kBAAmB,EACZ,MAAM,EAAQ,cAAc,CAAE,OAAM,SAAQ,CAAC,EAEjD,MAAM,IAAI,QAAsB,GAAY,CAC/C,EAAQ,OAAQ,GAAS,EAAQ,CAAI,EAAG,EAAM,CAAO,CACzD,CAAC,CACL,CAkBA,eAAsB,EAAkB,EAAmC,CACvE,IAAM,EAAS,EAAa,IAAI,CAAI,EACpC,GAAI,IAAW,IAAA,GAAW,OAAO,EAEjC,IAAI,EACJ,GAAI,CACA,GAAM,CAAE,iBAAkB,MAAA,QAAA,QAAA,CAAA,CAAA,SAAA,QAAM,cAAA,CAAA,EAC1B,EAAU,EAAc,EAAG,CAAC,EAClC,EAAA,WAAW,CAAO,EAClB,IAAM,EAAO,MAAM,EAAc,EAAS,EAAM,EAAG,EACnD,EAAY,IAAS,MAAQ,EAAK,OAAS,CAC/C,MAAQ,CACJ,EAAY,EAChB,CAGA,OADA,EAAa,IAAI,EAAM,CAAS,EACzB,CACX,CAcA,eAAsB,EAClB,EAAoC,CAAC,aAAc,YAAY,EAC7C,CAClB,IAAK,IAAM,KAAQ,EACf,GAAI,MAAM,EAAkB,CAAI,EAAG,OAAO,EAE9C,MAAO,YACX,CAOA,SAAgB,GAAmC,CAC/C,EAAa,MAAM,CACvB"}
1
+ {"version":3,"file":"encode.cjs","names":[],"sources":["../../src/imaging/encode.ts"],"sourcesContent":["/**\n * Getting bytes back out, and knowing which bytes you got.\n *\n * The trap here is silent: `canvas.toBlob(cb, \"image/avif\")` does not throw\n * on a browser without an AVIF encoder. It hands back a **PNG** with the\n * requested type ignored, and an app that trusted the request uploads\n * several megabytes where it planned for a few hundred kilobytes. Every\n * function here reports the type actually produced, and\n * :func:`supportsImageType` answers the question up front.\n */\n\nimport { getContext, type Surface } from \"./canvas\";\nimport { ImageEncodeError } from \"./exceptions\";\nimport type { EncodeOptions, ImageType, ProcessedImage } from \"./types\";\n\n/** Quality used when the caller does not choose. */\nexport const DEFAULT_QUALITY = 0.85;\n\n/** Format used when the caller does not choose. */\nexport const DEFAULT_TYPE: ImageType = \"image/jpeg\";\n\nconst supportCache = new Map<string, boolean>();\n\n/**\n * Encode a surface into image bytes.\n *\n * @param surface The canvas to encode.\n * @param options Format and quality.\n * @returns The blob plus the dimensions and the type actually produced.\n * @throws {@link ImageEncodeError} when the canvas produces nothing.\n */\nexport async function encodeImage(\n surface: Surface,\n options: EncodeOptions = {},\n): Promise<ProcessedImage> {\n const type = options.type ?? DEFAULT_TYPE;\n const quality = options.quality ?? DEFAULT_QUALITY;\n\n const blob = await surfaceToBlob(surface, type, quality);\n if (blob === null) {\n throw new ImageEncodeError(\n `The canvas produced no bytes for ${type}. The image may be too large ` +\n \"for this browser's canvas limits.\",\n );\n }\n\n return {\n blob,\n width: surface.width,\n height: surface.height,\n type: blob.type || type,\n bytes: blob.size,\n };\n}\n\n/**\n * Encode a surface, whichever kind it is.\n *\n * `OffscreenCanvas` and `HTMLCanvasElement` disagree on how to hand back\n * bytes — one returns a promise, the other takes a callback.\n *\n * @param surface The canvas.\n * @param type MIME type to request.\n * @param quality Quality for lossy formats.\n * @returns The blob, or `null` when the canvas produced nothing.\n */\nasync function surfaceToBlob(\n surface: Surface,\n type: string,\n quality: number,\n): Promise<Blob | null> {\n if (\"convertToBlob\" in surface) {\n return await surface.convertToBlob({ type, quality });\n }\n return await new Promise<Blob | null>((resolve) => {\n surface.toBlob((blob) => resolve(blob), type, quality);\n });\n}\n\n/**\n * Whether this browser can actually encode a format.\n *\n * Asks for a 1x1 image in that type and checks what came back, because\n * that is the only answer that counts: a browser that \"supports\" WebP for\n * display may still not encode it.\n *\n * @example\n * ```ts\n * const type = (await supportsImageType(\"image/webp\")) ? \"image/webp\" : \"image/jpeg\";\n * const resized = await resizeImage(file, { width: 1200, type });\n * ```\n *\n * @param type The format to test.\n * @returns Whether encoding produces that type. Cached per type.\n */\nexport async function supportsImageType(type: ImageType): Promise<boolean> {\n const cached = supportCache.get(type);\n if (cached !== undefined) return cached;\n\n let supported: boolean;\n try {\n const { createSurface } = await import(\"./canvas\");\n const surface = createSurface(1, 1);\n getContext(surface);\n const blob = await surfaceToBlob(surface, type, 0.5);\n supported = blob !== null && blob.type === type;\n } catch {\n supported = false;\n }\n\n supportCache.set(type, supported);\n return supported;\n}\n\n/**\n * Pick the smallest format this browser can actually produce.\n *\n * @example\n * ```ts\n * const type = await bestSupportedType([\"image/avif\", \"image/webp\", \"image/jpeg\"]);\n * ```\n *\n * @param preferences Formats in preference order.\n * @returns The first supported one, falling back to `image/jpeg`, which\n * every canvas implementation encodes.\n */\nexport async function bestSupportedType(\n preferences: readonly ImageType[] = [\"image/webp\", \"image/jpeg\"],\n): Promise<ImageType> {\n for (const type of preferences) {\n if (await supportsImageType(type)) return type;\n }\n return \"image/jpeg\";\n}\n\n/**\n * Clear the format-support cache.\n *\n * Only useful in tests: browser support does not change at runtime.\n */\nexport function resetImageTypeSupportCache(): void {\n supportCache.clear();\n}\n"],"mappings":"8DAgBA,IAAa,EAAkB,IAGlB,EAA0B,aAEjC,EAAe,IAAI,IAUzB,eAAsB,EAClB,EACA,EAAyB,CAAC,EACH,CACvB,IAAM,EAAO,EAAQ,MAAA,aAGf,EAAO,MAAM,EAAc,EAAS,EAF1B,EAAQ,SAAA,GAE+B,EACvD,GAAI,IAAS,KACT,MAAM,IAAI,EAAA,iBACN,oCAAoC,EAAK,+DAE7C,EAGJ,MAAO,CACH,OACA,MAAO,EAAQ,MACf,OAAQ,EAAQ,OAChB,KAAM,EAAK,MAAQ,EACnB,MAAO,EAAK,IAChB,CACJ,CAaA,eAAe,EACX,EACA,EACA,EACoB,CAIpB,MAHI,kBAAmB,EACZ,MAAM,EAAQ,cAAc,CAAE,OAAM,SAAQ,CAAC,EAEjD,MAAM,IAAI,QAAsB,GAAY,CAC/C,EAAQ,OAAQ,GAAS,EAAQ,CAAI,EAAG,EAAM,CAAO,CACzD,CAAC,CACL,CAkBA,eAAsB,EAAkB,EAAmC,CACvE,IAAM,EAAS,EAAa,IAAI,CAAI,EACpC,GAAI,IAAW,IAAA,GAAW,OAAO,EAEjC,IAAI,EACJ,GAAI,CACA,GAAM,CAAE,iBAAkB,MAAA,QAAA,QAAA,CAAA,CAAA,SAAA,QAAM,cAAA,CAAA,EAC1B,EAAU,EAAc,EAAG,CAAC,EAClC,EAAA,WAAW,CAAO,EAClB,IAAM,EAAO,MAAM,EAAc,EAAS,EAAM,EAAG,EACnD,EAAY,IAAS,MAAQ,EAAK,OAAS,CAC/C,MAAQ,CACJ,EAAY,EAChB,CAGA,OADA,EAAa,IAAI,EAAM,CAAS,EACzB,CACX,CAcA,eAAsB,EAClB,EAAoC,CAAC,aAAc,YAAY,EAC7C,CAClB,IAAK,IAAM,KAAQ,EACf,GAAI,MAAM,EAAkB,CAAI,EAAG,OAAO,EAE9C,MAAO,YACX"}
@@ -39,10 +39,7 @@ async function c(e = ["image/webp", "image/jpeg"]) {
39
39
  for (let t of e) if (await s(t)) return t;
40
40
  return "image/jpeg";
41
41
  }
42
- function l() {
43
- i.clear();
44
- }
45
42
  //#endregion
46
- export { n as DEFAULT_QUALITY, r as DEFAULT_TYPE, c as bestSupportedType, a as encodeImage, l as resetImageTypeSupportCache, s as supportsImageType };
43
+ export { n as DEFAULT_QUALITY, r as DEFAULT_TYPE, c as bestSupportedType, a as encodeImage, s as supportsImageType };
47
44
 
48
45
  //# sourceMappingURL=encode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"encode.js","names":[],"sources":["../../src/imaging/encode.ts"],"sourcesContent":["/**\n * Getting bytes back out, and knowing which bytes you got.\n *\n * The trap here is silent: `canvas.toBlob(cb, \"image/avif\")` does not throw\n * on a browser without an AVIF encoder. It hands back a **PNG** with the\n * requested type ignored, and an app that trusted the request uploads\n * several megabytes where it planned for a few hundred kilobytes. Every\n * function here reports the type actually produced, and\n * :func:`supportsImageType` answers the question up front.\n */\n\nimport { getContext, type Surface } from \"./canvas\";\nimport { ImageEncodeError } from \"./exceptions\";\nimport type { EncodeOptions, ImageType, ProcessedImage } from \"./types\";\n\n/** Quality used when the caller does not choose. */\nexport const DEFAULT_QUALITY = 0.85;\n\n/** Format used when the caller does not choose. */\nexport const DEFAULT_TYPE: ImageType = \"image/jpeg\";\n\nconst supportCache = new Map<string, boolean>();\n\n/**\n * Encode a surface into image bytes.\n *\n * @param surface The canvas to encode.\n * @param options Format and quality.\n * @returns The blob plus the dimensions and the type actually produced.\n * @throws {@link ImageEncodeError} when the canvas produces nothing.\n */\nexport async function encodeImage(\n surface: Surface,\n options: EncodeOptions = {},\n): Promise<ProcessedImage> {\n const type = options.type ?? DEFAULT_TYPE;\n const quality = options.quality ?? DEFAULT_QUALITY;\n\n const blob = await surfaceToBlob(surface, type, quality);\n if (blob === null) {\n throw new ImageEncodeError(\n `The canvas produced no bytes for ${type}. The image may be too large ` +\n \"for this browser's canvas limits.\",\n );\n }\n\n return {\n blob,\n width: surface.width,\n height: surface.height,\n type: blob.type || type,\n bytes: blob.size,\n };\n}\n\n/**\n * Encode a surface, whichever kind it is.\n *\n * `OffscreenCanvas` and `HTMLCanvasElement` disagree on how to hand back\n * bytes — one returns a promise, the other takes a callback.\n *\n * @param surface The canvas.\n * @param type MIME type to request.\n * @param quality Quality for lossy formats.\n * @returns The blob, or `null` when the canvas produced nothing.\n */\nasync function surfaceToBlob(\n surface: Surface,\n type: string,\n quality: number,\n): Promise<Blob | null> {\n if (\"convertToBlob\" in surface) {\n return await surface.convertToBlob({ type, quality });\n }\n return await new Promise<Blob | null>((resolve) => {\n surface.toBlob((blob) => resolve(blob), type, quality);\n });\n}\n\n/**\n * Whether this browser can actually encode a format.\n *\n * Asks for a 1x1 image in that type and checks what came back, because\n * that is the only answer that counts: a browser that \"supports\" WebP for\n * display may still not encode it.\n *\n * @example\n * ```ts\n * const type = (await supportsImageType(\"image/webp\")) ? \"image/webp\" : \"image/jpeg\";\n * const resized = await resizeImage(file, { width: 1200, type });\n * ```\n *\n * @param type The format to test.\n * @returns Whether encoding produces that type. Cached per type.\n */\nexport async function supportsImageType(type: ImageType): Promise<boolean> {\n const cached = supportCache.get(type);\n if (cached !== undefined) return cached;\n\n let supported: boolean;\n try {\n const { createSurface } = await import(\"./canvas\");\n const surface = createSurface(1, 1);\n getContext(surface);\n const blob = await surfaceToBlob(surface, type, 0.5);\n supported = blob !== null && blob.type === type;\n } catch {\n supported = false;\n }\n\n supportCache.set(type, supported);\n return supported;\n}\n\n/**\n * Pick the smallest format this browser can actually produce.\n *\n * @example\n * ```ts\n * const type = await bestSupportedType([\"image/avif\", \"image/webp\", \"image/jpeg\"]);\n * ```\n *\n * @param preferences Formats in preference order.\n * @returns The first supported one, falling back to `image/jpeg`, which\n * every canvas implementation encodes.\n */\nexport async function bestSupportedType(\n preferences: readonly ImageType[] = [\"image/webp\", \"image/jpeg\"],\n): Promise<ImageType> {\n for (const type of preferences) {\n if (await supportsImageType(type)) return type;\n }\n return \"image/jpeg\";\n}\n\n/**\n * Clear the format-support cache.\n *\n * Only useful in tests: browser support does not change at runtime.\n */\nexport function resetImageTypeSupportCache(): void {\n supportCache.clear();\n}\n"],"mappings":";;;AAgBA,IAAa,IAAkB,KAGlB,IAA0B,cAEjC,oBAAe,IAAI,IAAqB;AAU9C,eAAsB,EAClB,GACA,IAAyB,CAAC,GACH;CACvB,IAAM,IAAO,EAAQ,QAAA,cAGf,IAAO,MAAM,EAAc,GAAS,GAF1B,EAAQ,WAAA,GAE+B;CACvD,IAAI,MAAS,MACT,MAAM,IAAI,EACN,oCAAoC,EAAK,+DAE7C;CAGJ,OAAO;EACH;EACA,OAAO,EAAQ;EACf,QAAQ,EAAQ;EAChB,MAAM,EAAK,QAAQ;EACnB,OAAO,EAAK;CAChB;AACJ;AAaA,eAAe,EACX,GACA,GACA,GACoB;CAIpB,OAHI,mBAAmB,IACZ,MAAM,EAAQ,cAAc;EAAE;EAAM;CAAQ,CAAC,IAEjD,MAAM,IAAI,SAAsB,MAAY;EAC/C,EAAQ,QAAQ,MAAS,EAAQ,CAAI,GAAG,GAAM,CAAO;CACzD,CAAC;AACL;AAkBA,eAAsB,EAAkB,GAAmC;CACvE,IAAM,IAAS,EAAa,IAAI,CAAI;CACpC,IAAI,MAAW,KAAA,GAAW,OAAO;CAEjC,IAAI;CACJ,IAAI;EACA,IAAM,EAAE,qBAAkB,MAAM,OAAO,gBACjC,IAAU,EAAc,GAAG,CAAC;EAClC,EAAW,CAAO;EAClB,IAAM,IAAO,MAAM,EAAc,GAAS,GAAM,EAAG;EACnD,IAAY,MAAS,QAAQ,EAAK,SAAS;CAC/C,QAAQ;EACJ,IAAY;CAChB;CAGA,OADA,EAAa,IAAI,GAAM,CAAS,GACzB;AACX;AAcA,eAAsB,EAClB,IAAoC,CAAC,cAAc,YAAY,GAC7C;CAClB,KAAK,IAAM,KAAQ,GACf,IAAI,MAAM,EAAkB,CAAI,GAAG,OAAO;CAE9C,OAAO;AACX;AAOA,SAAgB,IAAmC;CAC/C,EAAa,MAAM;AACvB"}
1
+ {"version":3,"file":"encode.js","names":[],"sources":["../../src/imaging/encode.ts"],"sourcesContent":["/**\n * Getting bytes back out, and knowing which bytes you got.\n *\n * The trap here is silent: `canvas.toBlob(cb, \"image/avif\")` does not throw\n * on a browser without an AVIF encoder. It hands back a **PNG** with the\n * requested type ignored, and an app that trusted the request uploads\n * several megabytes where it planned for a few hundred kilobytes. Every\n * function here reports the type actually produced, and\n * :func:`supportsImageType` answers the question up front.\n */\n\nimport { getContext, type Surface } from \"./canvas\";\nimport { ImageEncodeError } from \"./exceptions\";\nimport type { EncodeOptions, ImageType, ProcessedImage } from \"./types\";\n\n/** Quality used when the caller does not choose. */\nexport const DEFAULT_QUALITY = 0.85;\n\n/** Format used when the caller does not choose. */\nexport const DEFAULT_TYPE: ImageType = \"image/jpeg\";\n\nconst supportCache = new Map<string, boolean>();\n\n/**\n * Encode a surface into image bytes.\n *\n * @param surface The canvas to encode.\n * @param options Format and quality.\n * @returns The blob plus the dimensions and the type actually produced.\n * @throws {@link ImageEncodeError} when the canvas produces nothing.\n */\nexport async function encodeImage(\n surface: Surface,\n options: EncodeOptions = {},\n): Promise<ProcessedImage> {\n const type = options.type ?? DEFAULT_TYPE;\n const quality = options.quality ?? DEFAULT_QUALITY;\n\n const blob = await surfaceToBlob(surface, type, quality);\n if (blob === null) {\n throw new ImageEncodeError(\n `The canvas produced no bytes for ${type}. The image may be too large ` +\n \"for this browser's canvas limits.\",\n );\n }\n\n return {\n blob,\n width: surface.width,\n height: surface.height,\n type: blob.type || type,\n bytes: blob.size,\n };\n}\n\n/**\n * Encode a surface, whichever kind it is.\n *\n * `OffscreenCanvas` and `HTMLCanvasElement` disagree on how to hand back\n * bytes — one returns a promise, the other takes a callback.\n *\n * @param surface The canvas.\n * @param type MIME type to request.\n * @param quality Quality for lossy formats.\n * @returns The blob, or `null` when the canvas produced nothing.\n */\nasync function surfaceToBlob(\n surface: Surface,\n type: string,\n quality: number,\n): Promise<Blob | null> {\n if (\"convertToBlob\" in surface) {\n return await surface.convertToBlob({ type, quality });\n }\n return await new Promise<Blob | null>((resolve) => {\n surface.toBlob((blob) => resolve(blob), type, quality);\n });\n}\n\n/**\n * Whether this browser can actually encode a format.\n *\n * Asks for a 1x1 image in that type and checks what came back, because\n * that is the only answer that counts: a browser that \"supports\" WebP for\n * display may still not encode it.\n *\n * @example\n * ```ts\n * const type = (await supportsImageType(\"image/webp\")) ? \"image/webp\" : \"image/jpeg\";\n * const resized = await resizeImage(file, { width: 1200, type });\n * ```\n *\n * @param type The format to test.\n * @returns Whether encoding produces that type. Cached per type.\n */\nexport async function supportsImageType(type: ImageType): Promise<boolean> {\n const cached = supportCache.get(type);\n if (cached !== undefined) return cached;\n\n let supported: boolean;\n try {\n const { createSurface } = await import(\"./canvas\");\n const surface = createSurface(1, 1);\n getContext(surface);\n const blob = await surfaceToBlob(surface, type, 0.5);\n supported = blob !== null && blob.type === type;\n } catch {\n supported = false;\n }\n\n supportCache.set(type, supported);\n return supported;\n}\n\n/**\n * Pick the smallest format this browser can actually produce.\n *\n * @example\n * ```ts\n * const type = await bestSupportedType([\"image/avif\", \"image/webp\", \"image/jpeg\"]);\n * ```\n *\n * @param preferences Formats in preference order.\n * @returns The first supported one, falling back to `image/jpeg`, which\n * every canvas implementation encodes.\n */\nexport async function bestSupportedType(\n preferences: readonly ImageType[] = [\"image/webp\", \"image/jpeg\"],\n): Promise<ImageType> {\n for (const type of preferences) {\n if (await supportsImageType(type)) return type;\n }\n return \"image/jpeg\";\n}\n\n/**\n * Clear the format-support cache.\n *\n * Only useful in tests: browser support does not change at runtime.\n */\nexport function resetImageTypeSupportCache(): void {\n supportCache.clear();\n}\n"],"mappings":";;;AAgBA,IAAa,IAAkB,KAGlB,IAA0B,cAEjC,oBAAe,IAAI,IAAqB;AAU9C,eAAsB,EAClB,GACA,IAAyB,CAAC,GACH;CACvB,IAAM,IAAO,EAAQ,QAAA,cAGf,IAAO,MAAM,EAAc,GAAS,GAF1B,EAAQ,WAAA,GAE+B;CACvD,IAAI,MAAS,MACT,MAAM,IAAI,EACN,oCAAoC,EAAK,+DAE7C;CAGJ,OAAO;EACH;EACA,OAAO,EAAQ;EACf,QAAQ,EAAQ;EAChB,MAAM,EAAK,QAAQ;EACnB,OAAO,EAAK;CAChB;AACJ;AAaA,eAAe,EACX,GACA,GACA,GACoB;CAIpB,OAHI,mBAAmB,IACZ,MAAM,EAAQ,cAAc;EAAE;EAAM;CAAQ,CAAC,IAEjD,MAAM,IAAI,SAAsB,MAAY;EAC/C,EAAQ,QAAQ,MAAS,EAAQ,CAAI,GAAG,GAAM,CAAO;CACzD,CAAC;AACL;AAkBA,eAAsB,EAAkB,GAAmC;CACvE,IAAM,IAAS,EAAa,IAAI,CAAI;CACpC,IAAI,MAAW,KAAA,GAAW,OAAO;CAEjC,IAAI;CACJ,IAAI;EACA,IAAM,EAAE,qBAAkB,MAAM,OAAO,gBACjC,IAAU,EAAc,GAAG,CAAC;EAClC,EAAW,CAAO;EAClB,IAAM,IAAO,MAAM,EAAc,GAAS,GAAM,EAAG;EACnD,IAAY,MAAS,QAAQ,EAAK,SAAS;CAC/C,QAAQ;EACJ,IAAY;CAChB;CAGA,OADA,EAAa,IAAI,GAAM,CAAS,GACzB;AACX;AAcA,eAAsB,EAClB,IAAoC,CAAC,cAAc,YAAY,GAC7C;CAClB,KAAK,IAAM,KAAQ,GACf,IAAI,MAAM,EAAkB,CAAI,GAAG,OAAO;CAE9C,OAAO;AACX"}