@ekanos/ui 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -186,7 +186,14 @@ import { IconStyleOverrideProvider } from '@ekanos/ui/icon';
186
186
  ```
187
187
 
188
188
  Any glyph Free still doesn't have falls back to a question mark rather than
189
- vanishing (`--ekanos-icon-fa-fallback`, default `'\f059'`).
189
+ vanishing (`--ekanos-icon-fa-fallback`, default `'\f059'`) — and in
190
+ development, `Icon` / `resolveIcon` / `renderIcon` `console.warn` once per
191
+ distinct name that isn't in Free's set, so you find out from your terminal
192
+ instead of a screenshot review. Check a name yourself with
193
+ `pnpm --filter @ekanos/ui check:fa-free-names` (it verifies the generated
194
+ `src/_impl/fa-free-icon-names.generated.ts` against the installed
195
+ `@fortawesome/fontawesome-free`; run it with `--write` after bumping that
196
+ package).
190
197
 
191
198
  **If you load no Font Awesome at all**, icons do not disappear silently: this
192
199
  package's CSS draws a placeholder box (`□`) in their place, so "I forgot the
package/dist/icon.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { CSSProperties, ComponentType, ReactNode } from 'react';
2
+ import { ComponentType, CSSProperties, ReactNode } from 'react';
3
3
 
4
4
  declare const FA_ICON_STYLES: readonly ["solid", "regular", "light", "duotone", "brands"];
5
5
  type FaIconStyle = (typeof FA_ICON_STYLES)[number];
@@ -30,18 +30,18 @@ declare function IconStyleOverrideProvider({ value, children, }: {
30
30
  children: ReactNode;
31
31
  }): React.JSX.Element;
32
32
  declare function useIconStyleOverride(): "solid" | "regular" | "light" | "duotone" | null;
33
- /**
34
- * Resolve a stored icon value to a component that accepts `{ className }`.
35
- * Keeps the historical call signature so existing render sites
36
- * (`const Icon = resolveIcon(name); <Icon className="h-4 w-4" />`) keep working.
37
- * Legacy Lucide names are translated to Font Awesome; unknown names fall back.
38
- */
39
- declare function resolveIcon(name: string): IconRenderer;
40
- /** Ergonomic single-shot renderer for new code. */
41
- declare function Icon({ name, className, style }: {
33
+
34
+ declare function Icon({ name, className, style, }: {
35
+ name: string;
36
+ className?: string;
37
+ style?: CSSProperties;
38
+ }): React.FunctionComponentElement<{
42
39
  name: string;
43
- } & IconProps): React.JSX.Element;
44
- /** Render an icon by value, returning `null` for an empty name. */
40
+ } & {
41
+ className?: string;
42
+ style?: CSSProperties;
43
+ }>;
44
+ declare function resolveIcon(name: string): IconRenderer;
45
45
  declare function renderIcon(name: string | null | undefined, className?: string): React.JSX.Element | null;
46
46
 
47
47
  export { FA_ICON_STYLES, FA_OVERRIDE_STYLES, type FaIconOverrideStyle, type FaIconStyle, Icon, type IconRenderer, IconStyleOverrideProvider, buildFaIconValue, isFaIcon, renderIcon, resolveIcon, useIconStyleOverride };