import type { TCarouselContainer } from "@namiml/sdk-core"; import { TComponent, type TBaseComponent, type TContainerPosition } from '@namiml/sdk-core'; import type { TSegmentPicker, TTextLikeComponent } from "@namiml/sdk-core"; import type { TSemverObj } from "@namiml/sdk-core"; export declare function toPixels(scaleFactor: number, value?: number | string): number; export declare function parseSize(value: string | number, scaleFactor: number): string; export declare function backgroundColor(value: string, fallback?: string): string; export declare function filteredBorderColor(value: string, fallback?: string): string; export declare function filteredTextColor(value: string, fallback?: string): string; export declare function pickAndApplyBackgroundColor(component: TBaseComponent, inFocusedState?: boolean): string; /** * Background CSS for a component that may have a fill color, a fill image, or * both. The color is painted behind the image (CSS paints background-color * behind background-image), so a transparent fill image shows the color * through — matching Apple/Android. (NAM-2199) */ export declare function pickAndApplyBackground(component: TBaseComponent & { fillImage?: string | null; }, inFocusedState?: boolean): string; export declare function flexDirection({ direction }: TBaseComponent): string; export declare function alignAndJustifyItems(component: TBaseComponent): string; /** * Content-container-specific alignment: respects verticalAlignment and * horizontalAlignment when explicitly set, but falls back to the content * container's original defaults (align-items: center, justify-content: start) * instead of using the generic `alignment` property which controls child/text * alignment and would produce incorrect cross-axis values. */ export declare function contentAlignAndJustify(component: TBaseComponent): string; export declare function applyTextWidth(minSDKVersion: TSemverObj): string; export declare function applyChildSizing(minSDKVersion: TSemverObj, sizeKey: string): string; export declare function applyTextOverflow(component: TTextLikeComponent): string; export declare function transition(): string; export declare function grow({ grow }: TBaseComponent): string; export declare function paddingAndMargin(component: TBaseComponent, scaleFactor: number): string; export declare function applySegmentAbsoluteStyles(component: TSegmentPicker, scaleFactor: number): string; export declare function slidePaddingAndMargin(component: TCarouselContainer, scaleFactor: number): string; /** * Positional offsets for a component (NAM-4465). * * `moveX`/`moveY` are authored in the same pixel space as `width`, `height` and padding, * so a numeric offset rides `scaleFactor` exactly like they do — otherwise a component * shrinks on a television at a fractional scale factor while its offset stays put, and it * drifts out from under whatever it was positioned against. * * A string offset ("50%") is emitted verbatim: CSS resolves a percentage against the * containing block, which is already scaled. This matches Android's `getMoveValueDp`, * which scales numbers and resolves percentages against the parent dimension. */ export declare function transform({ moveX, moveY }: TBaseComponent, scaleFactor: number): string; export declare function borders(component: TBaseComponent, scaleFactor: number, inFocusedState?: boolean): string; export declare function alignItems({ alignment, verticalAlignment }: TBaseComponent): string; export declare function justifyContent({ alignment, horizontalAlignment }: TBaseComponent): string; export declare function widthAndHeight(component: TBaseComponent, scaleFactor: number): string; export declare function parseSizeConstraint(value: unknown, scaleFactor: number): string | null; export declare function zIndex({ zIndex }: TBaseComponent): string; export declare function dropShadow(dropShadow?: string, isText?: boolean): string; export declare function textStrikethrough(value: boolean | undefined): string; export declare function fontFamily(fontName?: string): string; export declare function coerceNumeric(value: unknown): number; export declare function hasValidLineHeight(component: { lineHeight?: unknown; }): boolean; /** * lineHeight/letterSpacing text properties (NAM-1409). Mirrors the Page * Builder previewer's `textSpacing()` contract (nami-platform PR #1722, * services/frontend/src/components/PaywallPreview/css.ts): * - lineHeight is an ABSOLUTE px value; only emitted when it coerces to a * finite number > 0 (scaled by `scaleFactor`). Otherwise the caller's * existing computed default line-height applies unchanged. * - letterSpacing is an em fraction of font-size, signed decimal in * [-1, 1]; emitted directly as `em` (NOT scaled). Applied whenever finite. * Numeric strings ("4", "0.08") coerce via Number(); non-numeric / an * unresolved `${var}` smart-text token coerce to NaN and are omitted. */ export declare function textSpacing(component: { lineHeight?: unknown; letterSpacing?: unknown; }, scaleFactor: number): string; export declare function applyStyles(component: TBaseComponent, scaleFactor: number, inFocusedState?: boolean): string; export declare function applyGridStyles(component: TBaseComponent, inFocusedState?: boolean, scaleFactor?: number): string; export declare function parsePosition(position?: TContainerPosition): string; export declare function getComponentStyles(prefix: string, component: TComponent): TComponent; export declare function formatKey(key: string, prefix: string): string; export declare function applySegmentStyles(styles: any, scaleFactor: number, inFocusedState: boolean): string; export declare function applySegmentFontStyles(styles: any, scaleFactor: number): string; export declare function focusVisibleStyles(component: TBaseComponent): string; export declare function srOnlyStyle(): string;