import { type Define } from '@sigx/lynx'; import '@sigx/lynx-icons/__font-face.css'; import type { IconPropsExtensions } from './types.js'; export type IconProps = Define.Prop<'set', string, true> & Define.Prop<'name', string, true> & Define.Prop<'size', number, false> & Define.Prop<'color', string, false> & Define.Prop<'class', string, false> /** * Follow the OS text-size setting (#776). Default `false`: the icon holds * its designed `size` in dp regardless of the system font scale — the * layout-stable choice for chrome (tab bars, headers, list accessories). * Set `true` for icons sitting inline with scaling text: glyph AND box * grow together by the effective scale, live, on every backend (svg and * font mode behave identically). */ & Define.Prop<'scaleWithText', boolean, false> /** * Augmentation point — theme packages declaration-merge into * `IconPropsExtensions` to add their own typed props (e.g. daisy * adds `variant?: DaisyColor`). Core declares no specific * extensions, so without a theme installed, no extra props exist * and the type system rejects `` at compile time. */ & IconPropsExtensions; export declare function sanitizeColor(color: string): string; export declare function inlineSvg(template: string, color: string): string; /** * Render a glyph from a registered icon set. * * Sets are declared in `signalx.config.ts` via `iconSets: [...]` (build-time, * tree-shaken) or via `defineIconSet({ id, glyphs })` (runtime, ad-hoc). * * Resolution order: **SVG first**, then codepoint, then missing placeholder. * * - SVG-mode sets render with Lynx's native `` element * (the engine parses the inline XML; no JSX children, no data: URIs). * - Font-mode sets fall back to a single character inside a `` element * with a matching `font-family`. The plugin only emits codepoints when the * matching `@font-face` has also been registered (v1.1+); v1 always hits * the SVG branch. * - Missing glyphs render an empty `` of the same size so layout * doesn't jump. * * @example * ```tsx * * * ``` */ export declare const Icon: import("@sigx/runtime-core").ComponentFactory;