/** * The reshape vocabulary in code-land (blueprint §5.4). * * Nine one-liners over core's PUBLIC {@link applyReshape} — one per LIVE op. * The two deprecated ops (`asOptions`, `template`) are deliberately absent: * the Kit's own props replace them, and wrapping them here would teach a * dialect that is being retired. * * ONE POSTURE, everywhere in this package: you get the value, or `undefined`. * `undefined` in stays `undefined` out (loading is never a mismatch), and a * type mismatch degrades to `undefined` too — a code-land app must render a * placeholder, never throw. When an app wants the REASON, it calls the * re-exported `applyReshape` directly and reads `result.reason`; there is no * second result type in this package. */ import { type Json } from "../../core/index.js"; /** * The nine live reshape ops, as functions. One bundle rather than nine exports * because these are pure projections a code-land app reaches for BY NAME, and * `reshape.sum` never collides with the `$expr` aggregate `sum`. */ export declare const reshape: { /** Keep only these fields (per row on an array, direct on an object). */ pick: (value: Json | undefined, ...fields: string[]) => Json | undefined; /** Rename fields, as old/new pairs. */ rename: (value: Json | undefined, ...pairs: string[]) => Json | undefined; /** Rows → `{ label, value }` points, for the Kit's charts. */ asPoints: (value: Json | undefined, labelField: string, valueField: string) => Json | undefined; /** `format(value, kind)` on a SINGLE value — there is no row form: a table's * money goes through the column's own `format` token so the rows stay * numeric and `sortBy` still sorts. The kind vocabulary is core's and is * checked there: an unknown kind is a mismatch, and `applyReshape` names the * valid ones in its reason. */ format: (value: Json | undefined, kind: string) => Json | undefined; sum: (value: Json | undefined, field: string) => number | undefined; min: (value: Json | undefined, field: string) => number | undefined; max: (value: Json | undefined, field: string) => number | undefined; count: (value: Json | undefined) => number | undefined; };