/** * Creates a host-side predicate for selection-driven conditional encoding. * The selection test expression is compiled lazily when the predicate is * first evaluated so encoder construction does not depend on eager selection * materialization. * * @param {string} param * @param {import("../spec/channel.js").Encoding} encoding * @param {{ findValue: (param: string) => any, createExpression: (expr: string) => import("../paramRuntime/types.js").ExprRefFunction }} paramRuntime * @param {boolean} empty * @returns {import("../types/encoder.js").Predicate} */ export function createSelectionPredicate(param: string, encoding: import("../spec/channel.js").Encoding, paramRuntime: { findValue: (param: string) => any; createExpression: (expr: string) => import("../paramRuntime/types.js").ExprRefFunction; }, empty: boolean): import("../types/encoder.js").Predicate; /** * Creates ordered conditional branches for a channel definition. The last * branch is always the fallback branch. * * @param {import("../spec/channel.js").Channel} channel * @param {import("../spec/channel.js").ChannelDef} channelDef * @param {import("../spec/channel.js").Encoding} encoding * @param {{ createExpression: (expr: string) => import("../paramRuntime/types.js").ExprRefFunction, findValue: (param: string) => any }} paramRuntime * @returns {import("../types/encoder.js").EncodingBranch[]} */ export function createConditionalBranches(channel: import("../spec/channel.js").Channel, channelDef: import("../spec/channel.js").ChannelDef, encoding: import("../spec/channel.js").Encoding, paramRuntime: { createExpression: (expr: string) => import("../paramRuntime/types.js").ExprRefFunction; findValue: (param: string) => any; }): import("../types/encoder.js").EncodingBranch[]; /** * Creates encoders for direct mark-property channels in an encoding object. * * @param {import("../view/unitView.js").default} unitView * @param {import("../spec/channel.js").Encoding} encoding * @returns {Partial>} */ export default function createEncoders(unitView: import("../view/unitView.js").default, encoding: import("../spec/channel.js").Encoding): Partial>; /** * Channels that are present in encoding but are not direct mark properties. * Keep this centralized so metadata channels (for example tooltip) can reuse * the same handling path. * * @param {import("../spec/channel.js").Channel} channel * @returns {boolean} */ export function isNonMarkPropertyChannel(channel: import("../spec/channel.js").Channel): boolean; /** * @param {import("../types/encoder.js").Encoder} encoder * @returns {import("../types/encoder.js").Accessor[]} */ export function getEncoderAccessors(encoder: import("../types/encoder.js").Encoder): import("../types/encoder.js").Accessor[]; /** * @param {import("../types/encoder.js").Encoder} encoder * @returns {import("../types/encoder.js").Accessor | undefined} */ export function getEncoderDataAccessor(encoder: import("../types/encoder.js").Encoder): import("../types/encoder.js").Accessor | undefined; /** * Creates an encoder from ordered branches. The first matching branch wins. * * @param {import("../types/encoder.js").EncodingBranch[]} branches * @param {(channel: import("../spec/channel.js").ChannelWithScale) => import("../types/encoder.js").VegaScale} scaleSource * @returns {Encoder} */ export function createSimpleOrConditionalEncoder(branches: import("../types/encoder.js").EncodingBranch[], scaleSource: (channel: import("../spec/channel.js").ChannelWithScale) => import("../types/encoder.js").VegaScale): import("../types/encoder.js").Encoder; /** * Wraps a single accessor with optional scale application and encoder metadata. * * @param {Accessor} accessor * @param {(channel: import("../spec/channel.js").ChannelWithScale) => import("../types/encoder.js").VegaScale} scaleSource * @returns {Encoder} */ export function createEncoder(accessor: import("../types/encoder.js").Accessor, scaleSource: (channel: import("../spec/channel.js").ChannelWithScale) => import("../types/encoder.js").VegaScale): import("../types/encoder.js").Encoder; /** * @param {import("../spec/channel.js").ChannelDef} channelDef * @returns {channelDef is import("../spec/channel.js").ValueDef} */ export function isValueDef(channelDef: import("../spec/channel.js").ChannelDef): channelDef is import("../spec/channel.js").ValueDef; /** * @param {import("../spec/channel.js").ChannelDef} channelDef * @returns {channelDef is import("../spec/channel.js").FieldDefBase} */ export function isFieldDef(channelDef: import("../spec/channel.js").ChannelDef): channelDef is import("../spec/channel.js").FieldDefBase; /** * @param {import("../spec/channel.js").ChannelDef} channelDef * @returns {channelDef is import("../spec/channel.js").DatumDef} */ export function isDatumDef(channelDef: import("../spec/channel.js").ChannelDef): channelDef is import("../spec/channel.js").DatumDef; /** * Returns true for direct channel definitions that participate in scale * resolution. Conditional wrappers must be unwrapped by the caller first. * * @param {import("../spec/channel.js").ChannelDef} channelDef * @returns {channelDef is import("../spec/channel.js").ChannelDefWithScale} */ export function isChannelDefWithScale(channelDef: import("../spec/channel.js").ChannelDef): channelDef is import("../spec/channel.js").ChannelDefWithScale; /** * @param {import("../spec/channel.js").ChannelDef} channelDef */ export function findChannelDefWithScale(channelDef: import("../spec/channel.js").ChannelDef): import("../spec/channel.js").FieldOrDatumDefWithCondition, number> | import("../spec/channel.js").FieldOrDatumDefWithCondition, string> | import("../spec/channel.js").PositionFieldDef | import("../spec/channel.js").ChromPosDef | import("../spec/channel.js").PositionDatumDef | import("../spec/channel.js").MarkPropExprDef | import("../spec/channel.js").Conditional>; /** * @param {import("../view/unitView.js").default} view * @param {import("../spec/channel.js").Channel} channel */ export function getChannelDefWithScale(view: import("../view/unitView.js").default, channel: import("../spec/channel.js").Channel): import("../spec/channel.js").FieldOrDatumDefWithCondition, number> | import("../spec/channel.js").FieldOrDatumDefWithCondition, string> | import("../spec/channel.js").PositionFieldDef | import("../spec/channel.js").ChromPosDef | import("../spec/channel.js").PositionDatumDef | import("../spec/channel.js").MarkPropExprDef | import("../spec/channel.js").Conditional>; /** * @param {import("../spec/channel.js").ChannelDef} channelDef * @returns {channelDef is import("../spec/channel.js").TypeMixins} */ export function isChannelDefWithType(channelDef: import("../spec/channel.js").ChannelDef): channelDef is import("../spec/channel.js").TypeMixins; /** * @param {import("../spec/channel.js").ChannelDef} channelDef * @returns {channelDef is import("../spec/channel.js").ChromPosDef} */ export function isChromPosDef(channelDef: import("../spec/channel.js").ChannelDef): channelDef is import("../spec/channel.js").ChromPosDef; /** * @param {import("../spec/channel.js").ChannelDef} channelDef * @returns {channelDef is import("../spec/channel.js").ExprDef} */ export function isExprDef(channelDef: import("../spec/channel.js").ChannelDef): channelDef is import("../spec/channel.js").ExprDef; /** * @param {import("../spec/channel.js").ChannelDef} channelDef * @returns {channelDef is import("../spec/channel.js").FieldOrDatumDefWithCondition} */ export function isFieldOrDatumDefWithCondition(channelDef: import("../spec/channel.js").ChannelDef): channelDef is import("../spec/channel.js").FieldOrDatumDefWithCondition; /** * @param {import("../spec/channel.js").ChannelDef} channelDef * @returns {channelDef is import("../spec/channel.js").ValueDefWithCondition} */ export function isValueDefWithCondition(channelDef: import("../spec/channel.js").ChannelDef): channelDef is import("../spec/channel.js").ValueDefWithCondition; /** * @param {import("../spec/channel.js").Channel} channel * @returns {channel is import("../spec/channel.js").PrimaryPositionalChannel} */ export function isPrimaryPositionalChannel(channel: import("../spec/channel.js").Channel): channel is import("../spec/channel.js").PrimaryPositionalChannel; /** * @param {import("../spec/channel.js").Channel} channel * @returns {channel is import("../spec/channel.js").PositionalChannel} */ export function isPositionalChannel(channel: import("../spec/channel.js").Channel): channel is import("../spec/channel.js").PositionalChannel; /** * * @param {string} channel */ export function isSecondaryChannel(channel: string): boolean; /** * Return the matching secondary channel or throws if one does not exist. * * @param {import("../spec/channel.js").Channel} primaryChannel */ export function getSecondaryChannel(primaryChannel: import("../spec/channel.js").Channel): import("../spec/channel.js").SecondaryPositionalChannel; /** * Finds the primary channel for the provided channel, which may be * the primary or secondary. * * @param {import("../spec/channel.js").Channel} channel */ export function getPrimaryChannel(channel: import("../spec/channel.js").Channel): import("../spec/channel.js").Channel; /** * Returns an array that contains the given channel and its secondary channel if one exists. * * @param {import("../spec/channel.js").Channel} channel */ export function getChannelWithSecondarys(channel: import("../spec/channel.js").Channel): import("../spec/channel.js").Channel[]; /** * @param {import("../spec/channel.js").Channel} channel */ export function isColorChannel(channel: import("../spec/channel.js").Channel): boolean; /** * Returns true if the channel has a discrete range. * * @param {import("../spec/channel.js").Channel} channel */ export function isDiscreteChannel(channel: import("../spec/channel.js").Channel): boolean; /** * @param {import("../spec/channel.js").Channel} channel * @returns {channel is import("../spec/channel.js").ChannelWithScale} */ export function isChannelWithScale(channel: import("../spec/channel.js").Channel): channel is import("../spec/channel.js").ChannelWithScale; /** * Returns valid discrete values for a discrete channel. * * @param {import("../spec/channel.js").Channel} channel * @returns {any[]} */ export function getDiscreteRange(channel: import("../spec/channel.js").Channel): any[]; /** * @param {import("../spec/channel.js").Channel} channel * @returns {function(any):number} */ export function getDiscreteRangeMapper(channel: import("../spec/channel.js").Channel): (arg0: any) => number; /** * @type {import("../spec/channel.js").PrimaryPositionalChannel[]} */ export const primaryPositionalChannels: import("../spec/channel.js").PrimaryPositionalChannel[]; /** * @type {import("../spec/channel.js").SecondaryPositionalChannel[]} */ export const secondaryPositionalChannels: import("../spec/channel.js").SecondaryPositionalChannel[]; /** * @type {import("../spec/channel.js").PositionalChannel[]} */ export const positionalChannels: import("../spec/channel.js").PositionalChannel[]; /** * Map primary channels to secondarys * * @type {Partial>} */ export const secondaryChannels: Partial>; /** * Map secondary channels to primaries * * @type {Partial>} */ export const primaryChannels: Partial>; //# sourceMappingURL=encoder.d.ts.map