import { Schema } from 'effect';
import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
export { getStructFieldDescription, getStructFieldTitle } from '../../../../table/utils/schema-meta.js';
type AnySchema = Schema.Schema<any, any, never>;
type Configure = (env: Environment) => void;
export declare const type: "com.shwfed.block.chart.xy";
export declare const compatibilityDate: "2026-05-17";
export declare const metadata: {
    readonly name: "笛卡尔坐标图表";
    readonly icon: "fluent:chart-multiple-20-regular";
    readonly w: {
        readonly initial: 20;
        readonly min: 8;
        readonly max: number;
    };
    readonly h: {
        readonly initial: 9;
        readonly min: 5;
        readonly max: number;
    };
};
export declare const CurveType: Schema.Literal<["linear", "monotoneX", "natural", "basis", "cardinal", "catmullRom", "step", "stepAfter", "stepBefore"]>;
export declare const ChartType: Schema.Literal<["line", "area", "groupedBar", "scatter", "stackedBar"]>;
/**
 * A named data source. Exported so the config editor can read field
 * `title` / `description` annotations without rebuilding the whole schema.
 *
 * Composes the generic `DataSource` (request + data) from the table module,
 * adding the chart-specific `id` / `name` wrapper and chart-flavored field
 * descriptions (mentioning X / Y exposure).
 */
export declare function dataSourceSchema(configure: Configure): Schema.Struct<{
    id: Schema.refine<string, typeof Schema.String>;
    name: Schema.refine<string, typeof Schema.String>;
    request: Schema.optional<Schema.Schema<string, string, never>>;
    data: Schema.Schema<string, string, never>;
}>;
/**
 * One Y series. A flat struct: `chart` selects how the series renders, and the
 * variant-specific fields below it apply only to the matching chart type
 * (others are ignored at render time). Exported so the config editor can read
 * field `title` / `description` annotations off it.
 */
export declare function ySeriesSchema(configure: Configure): Schema.Struct<{
    id: Schema.refine<string, typeof Schema.String>;
    value: Schema.Schema<string, string, never>;
    label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
        locale: Schema.Literal<["zh"]>;
        message: Schema.SchemaClass<string, string, never>;
    }>], [Schema.Struct<{
        locale: Schema.Literal<["ja", "en", "ko"]>;
        message: Schema.SchemaClass<string, string, never>;
    }>]>>;
    chart: Schema.optionalWith<Schema.Literal<["line", "area", "groupedBar", "scatter", "stackedBar"]>, {
        default: () => "line";
    }>;
    color: Schema.optional<typeof Schema.String>;
    curveType: Schema.optionalWith<Schema.Literal<["linear", "monotoneX", "natural", "basis", "cardinal", "catmullRom", "step", "stepAfter", "stepBefore"]>, {
        default: () => "monotoneX";
    }>;
    lineWidth: Schema.optionalWith<Schema.filter<typeof Schema.Number>, {
        default: () => number;
    }>;
    dash: Schema.optional<Schema.Schema<string, string, never>>;
    lineColor: Schema.optional<typeof Schema.String>;
    width: Schema.optional<Schema.Schema<string, string, never>>;
    size: Schema.optional<Schema.Schema<string, string, never>>;
}>;
export declare function schema(configure: Configure, _blockRef?: AnySchema): Schema.refine<{
    readonly type: "com.shwfed.block.chart.xy";
    readonly id: string;
    readonly caption?: readonly [{
        readonly locale: "zh";
        readonly message: string;
    }, ...{
        readonly locale: "en" | "ja" | "ko";
        readonly message: string;
    }[]] | undefined;
    readonly x: string;
    readonly y: readonly {
        readonly label?: readonly [{
            readonly locale: "zh";
            readonly message: string;
        }, ...{
            readonly locale: "en" | "ja" | "ko";
            readonly message: string;
        }[]] | undefined;
        readonly size?: string | undefined;
        readonly id: string;
        readonly color?: string | undefined;
        readonly width?: string | undefined;
        readonly value: string;
        readonly chart: "area" | "line" | "groupedBar" | "scatter" | "stackedBar";
        readonly curveType: "linear" | "step" | "monotoneX" | "natural" | "basis" | "cardinal" | "catmullRom" | "stepAfter" | "stepBefore";
        readonly lineWidth: number;
        readonly dash?: string | undefined;
        readonly lineColor?: string | undefined;
    }[];
    readonly displayName?: string | undefined;
    readonly compatibilityDate: "2026-05-17";
    readonly dataSources: readonly {
        readonly name: string;
        readonly data: string;
        readonly id: string;
        readonly request?: string | undefined;
    }[];
}, Schema.Struct<{
    id: Schema.refine<string, typeof Schema.String>;
    type: Schema.tag<"com.shwfed.block.chart.xy">;
    compatibilityDate: Schema.tag<"2026-05-17">;
    displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
    caption: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
        locale: Schema.Literal<["zh"]>;
        message: Schema.SchemaClass<string, string, never>;
    }>], [Schema.Struct<{
        locale: Schema.Literal<["ja", "en", "ko"]>;
        message: Schema.SchemaClass<string, string, never>;
    }>]>>;
    dataSources: Schema.Array$<Schema.Struct<{
        id: Schema.refine<string, typeof Schema.String>;
        name: Schema.refine<string, typeof Schema.String>;
        request: Schema.optional<Schema.Schema<string, string, never>>;
        data: Schema.Schema<string, string, never>;
    }>>;
    x: Schema.Schema<string, string, never>;
    y: Schema.refine<readonly {
        readonly label?: readonly [{
            readonly locale: "zh";
            readonly message: string;
        }, ...{
            readonly locale: "en" | "ja" | "ko";
            readonly message: string;
        }[]] | undefined;
        readonly size?: string | undefined;
        readonly id: string;
        readonly color?: string | undefined;
        readonly width?: string | undefined;
        readonly value: string;
        readonly chart: "area" | "line" | "groupedBar" | "scatter" | "stackedBar";
        readonly curveType: "linear" | "step" | "monotoneX" | "natural" | "basis" | "cardinal" | "catmullRom" | "stepAfter" | "stepBefore";
        readonly lineWidth: number;
        readonly dash?: string | undefined;
        readonly lineColor?: string | undefined;
    }[], Schema.Array$<Schema.Struct<{
        id: Schema.refine<string, typeof Schema.String>;
        value: Schema.Schema<string, string, never>;
        label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
            locale: Schema.Literal<["zh"]>;
            message: Schema.SchemaClass<string, string, never>;
        }>], [Schema.Struct<{
            locale: Schema.Literal<["ja", "en", "ko"]>;
            message: Schema.SchemaClass<string, string, never>;
        }>]>>;
        chart: Schema.optionalWith<Schema.Literal<["line", "area", "groupedBar", "scatter", "stackedBar"]>, {
            default: () => "line";
        }>;
        color: Schema.optional<typeof Schema.String>;
        curveType: Schema.optionalWith<Schema.Literal<["linear", "monotoneX", "natural", "basis", "cardinal", "catmullRom", "step", "stepAfter", "stepBefore"]>, {
            default: () => "monotoneX";
        }>;
        lineWidth: Schema.optionalWith<Schema.filter<typeof Schema.Number>, {
            default: () => number;
        }>;
        dash: Schema.optional<Schema.Schema<string, string, never>>;
        lineColor: Schema.optional<typeof Schema.String>;
        width: Schema.optional<Schema.Schema<string, string, never>>;
        size: Schema.optional<Schema.Schema<string, string, never>>;
    }>>>;
}>>;
export declare function defaultBody(): Record<string, unknown>;
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
export type YSeriesValue = Value['y'][number];
export type DataSourceValue = Value['dataSources'][number];
export type ChartTypeValue = Schema.Schema.Type<typeof ChartType>;
