import { Cell, CellMatrix } from '../types'; /** Below this absolute value, never use automatic scientific (Sheets-like). */ export declare const GS_PLAIN_MAX_ABS = 999999999999997; /** Smallest 16-digit positive integer — use plain / text, not E-notation. */ export declare const GS_SIXTEEN_DIGIT_MIN_ABS = 1000000000000000; /** Scientific only in (GS_PLAIN_MAX_ABS, 1e15) — 999…997 itself stays plain. */ export declare function gsAllowsScientificMagnitude(av: number): boolean; /** Integer string (optional `-`, optional `,`) with ≥16 digits — store literally under General/Auto. */ export declare function isSixteenPlusDigitIntegerString(value: unknown): boolean; /** * Display string for a JS number when `toString()` may use `e` notation. * Applies Sheets-like rules: no E below GS_PLAIN_MAX_ABS or at/above 16-digit scale. */ export declare function formatMForNumericCellAvoidingGsRules(v: number): string; /** * Numeric safety gate for formula-computed numbers: * - integer beyond MAX_SAFE_INTEGER => scientific * - significant digits > 15 => scientific */ export declare function shouldUseScientificForComputedNumber(v: number): boolean; export declare function formatScientificForComputedNumber(v: number): string; export declare function formatCompactScientific(v: number, fractionDigits?: number): string; /** * Sheets-like Auto decimal display: * keep about 10 visible digits total (integer digits + decimal digits), with rounding. * Examples: * - 999999999.478 -> 999999999.5 * - 123456.123456 -> 123456.1235 */ export declare function formatGeneralAutoDecimalWithTenDigitRule(v: number): string | null; export declare function datenum_local(v: Date, date1904?: number): number; export declare function genarate(value: string | number | boolean): any[] | null; /** Crypto tickers for typed prefix (e.g. BTC123) — keep aligned with toolbar CRYPTO_OPTIONS. */ export declare const TYPED_CRYPTO_CURRENCY_PREFIXES: readonly ["BTC", "ETH", "SOL"]; /** * True when `fa` matches formats produced by typed currency/crypto prefix (or the same shape). * Used so the format dropdown shows "Currency" instead of mislabeling `#,##0` masks as "Number". */ export declare function isTypedCurrencyDisplayFormat(fa: string | undefined, currencyDetail: unknown): boolean; /** * True for currency / accounting / crypto number formats where we should keep `fa` when the user * types plain text, so a later numeric entry still formats like Google Sheets. */ export declare function isCurrencyLikeNumberFormat(fa: string | undefined, currencyDetail: unknown): boolean; /** * If the user types a known currency/crypto prefix immediately followed by a parseable number * (e.g. `$1,234.5`, `€100`, `BTC1.5`), return numeric cell value + matching currency format. * Uses locale `currencyDetail` (fiat symbols); object-shaped locales yield no fiat prefixes. */ export declare function parseCurrencyPrefixedInput(raw: string, currencyDetail: unknown): [string, { fa: string; t: string; }, number] | null; export declare function genarateOrCurrencyPrefixed(vupdateStr: string, vupdate: any, currencyDetail: unknown): ReturnType; /** Wrap text for SSF/Excel `fa` so letters like M/H/S/d are not date/time tokens (e.g. MXN → 5XN). */ export declare function quoteSsfLiteral(text: string): string; /** Build a fiat currency display mask safe for SSF.format (always quotes the symbol). */ export declare function buildFiatCurrencyFormat(symbol: string, decimals?: number, options?: { spaced?: boolean; }): string; export declare function update(fmt: string, v: any): string; /** Max decimal places for toolbar +/- on General (Auto) without switching to a numeric `fa`. */ export declare const MAX_GENERAL_AUTO_DP = 15; /** * Recompute `m` for numeric cells with `fa === "General"`. * When `ct.dp` is set (1..MAX), uses fixed decimals like Sheets Auto + decimal buttons. * Otherwise uses the usual `genarate` General display. */ export declare function refreshGeneralNumericDisplay(cell: Cell): void; export declare function is_date(fmt: string, v?: any): boolean; export declare function valueShowEs(r: number, c: number, d: CellMatrix): any;