@namiml/web-sdk
Version:
Subscription monetization infrastructure — drop-in SDK with no-code paywalls, onboarding flows, A/B testing for web
46 lines (45 loc) • 3.66 kB
TypeScript
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;
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;
export declare function transform({ moveX, moveY, }: TBaseComponent): 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 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 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;