import type { IAxisDescriptor } from "./IAxisDescriptor"; /** * Serialises exactly what {@link AxisCubeEntity} writes across the TypeScript/wasm * seam, so a native replay can render the identical axis cube. * * This is deliberately a pure function separate from AxisCubeEntity: Update() needs a * live wasm context and a real surface, so it cannot be unit-tested, whereas this can. * * It records ONLY fields the seam writes. isVisible, labelDepthTestEnabled and * smoothLabelOverlapAvoidance are declared on IAxisDescriptor and never copied to * wasm, so they are absent here - recording them would invite the replay to set * native fields the web left at their C++ defaults, producing a difference the web * never had. * * EVERY export in this file is `@ignore`d, and must stay that way. This is axis-cube probe * plumbing, not public API - `generate-exports-file.ts` walks all of `src/` and would otherwise * emit all ten symbols into `src/index.ts` on the next `npm run buildJs`. Its only consumer, * `SciChartVisualTests/captureAxisCubeSpec.ts`, imports this module by path, so nothing breaks. * The scanner tests each statement's own leading comment, hence the tag repeated below. * @ignore */ export declare const AXIS_CUBE_SPEC_SCHEMA_VERSION = 1; /** Mark name the harness filters on. `enableDebug` turns on every other mark too. @ignore */ export declare const AXIS_CUBE_MARK_NAME = "AxisCubeDescriptor"; /** * Reads the numeric value off an embind enum-wrapper object, e.g. {@link AxisPlaneVisibilityMode}, * `eAxisPlaneDrawLabelsMode`, `eAxisPlaneDrawTitlesMode`, or the per-axis * `labelOrientationMode`/`titleOrientationMode`/`multilineAlignment` fields `copyAxis()` * reads below. Those are declared in TSciChart.ts as opaque classes with no members, so * TypeScript cannot see `.value` on them - confirmed at runtime (not merely assumed) that * Emscripten embind puts the underlying numeric enum value there: logging one of these * fields from a rendered 3D chart showed * `{ typeofField: "object", ownKeys: [], hasValueProp: true, valueTypeof: "number" }`. * * Shared by {@link AxisCubeEntity} (12 cube-level fields) and `copyAxis()` (4 per-axis * fields) so there is exactly one definition of "how to unwrap an embind enum" - the two * levels diverged once already because this existed only at the cube level, leaving the * per-axis fields serialising as `{}` under `JSON.stringify`. * @ignore */ export declare const embindEnumValue: (field: unknown) => number; /** @ignore */ export interface IAxisCubeSpecViewport { width: number; height: number; devicePixelRatio: number; } /** @ignore */ export interface IAxisCubeSpecMeta { snapshotId: string; testFile: string; testName: string; renderer: string; capturedAt: string; commit: string; viewport: IAxisCubeSpecViewport; } /** @ignore */ export interface IAxisCubeSpecCube { isZxPlaneVisible: boolean; isXyPlaneVisible: boolean; isZyPlaneVisible: boolean; xyPlaneDrawLabelsMode: number; zxPlaneDrawLabelsMode: number; zyPlaneDrawLabelsMode: number; xyPlaneDrawTitlesMode: number; zxPlaneDrawTitlesMode: number; zyPlaneDrawTitlesMode: number; xyPlaneVisibilityMode: number; zxPlaneVisibilityMode: number; zyPlaneVisibilityMode: number; /** * Whether `m_bIsCameraChange` was written at all. Always true since the write became * unconditional (see AxisCubeEntity.Update); it was conditional on an axis using * TickLabelOrientationAuto before that. Kept so a spec captured either way stays readable. */ isCameraChangeWritten: boolean; isCameraChange?: boolean; } /** @ignore */ export interface IAxisCubeSpecCamera { position: number[]; target: number[]; fieldOfView: number; } /** @ignore */ export interface IAxisCubeSpecInput { meta: IAxisCubeSpecMeta; camera: IAxisCubeSpecCamera; cube: IAxisCubeSpecCube; descriptors: { x: IAxisDescriptor; y: IAxisDescriptor; z: IAxisDescriptor; }; } /** @ignore */ export interface IAxisCubeSpec { schemaVersion: number; meta: IAxisCubeSpecMeta; camera: IAxisCubeSpecCamera; cube: IAxisCubeSpecCube; axes: { [key: string]: any; }; } /** @ignore */ export declare const buildAxisCubeSpec: (input: IAxisCubeSpecInput) => IAxisCubeSpec;