import type { ColorScaleType, D3InterpolateName } from './colors'; import type { HullFaceColorMode } from './convex-hull/types'; import type { D3SymbolName } from './labels'; import type { Vec2, Vec3 } from './math'; import type { BandwidthOption, Orientation, SankeyNodeAlign, SankeyOrientation, SunburstLabelRotation, SunburstLabelText, SunburstShape, SunburstValueMode, ViolinKind, ViolinSide, WhiskerMode } from './plot'; import type { BondingStrategy } from './structure/bonding'; import type { PolyhedraColorMode } from './structure/polyhedra'; export interface SettingType { value: T; description: string; enum?: Readonly, string>>; minimum?: number; maximum?: number; minItems?: number; maxItems?: number; context?: `web` | `editor` | `notebook` | `all`; } export declare const SHOW_BONDS_OPTIONS: readonly ["never", "always", "crystals", "molecules"]; export type ShowBonds = (typeof SHOW_BONDS_OPTIONS)[number]; export type CameraProjection = `perspective` | `orthographic`; export declare const VECTOR_COLOR_MODES: readonly ["auto", "element", "spin_direction", "magnitude", "uniform"]; export type VectorColorMode = (typeof VECTOR_COLOR_MODES)[number]; export type VectorLayerConfig = { visible: boolean; color: string | null; scale: number | null; }; export declare const ATOM_COLOR_MODE_OPTIONS: readonly ["element", "coordination", "wyckoff", "custom"]; export type AtomColorMode = (typeof ATOM_COLOR_MODE_OPTIONS)[number]; type DisplayConfigType = { x_grid: SettingType; y_grid: SettingType; y2_grid: SettingType; x_zero_line: SettingType; y_zero_line: SettingType; }; type BarStyleType = { color: SettingType; opacity: SettingType; stroke_width: SettingType; stroke_color: SettingType; stroke_opacity: SettingType; }; type PointStyleType = { size: SettingType; color: SettingType; opacity: SettingType; stroke_width: SettingType; stroke_color: SettingType; stroke_opacity: SettingType; }; type LineStyleType = { width: SettingType; color: SettingType; opacity: SettingType; dash: SettingType; }; type SimpleBarStyleType = { color: SettingType; opacity: SettingType; border_radius: SettingType; }; type SimpleLineStyleType = { width: SettingType; color: SettingType; }; type BoxStyleType = { color: SettingType; opacity: SettingType; stroke_width: SettingType; stroke_color: SettingType; border_radius: SettingType; }; type BoxWhiskerStyleType = { width: SettingType; color: SettingType; cap_fraction: SettingType; }; type BoxLineStyleType = { width: SettingType; color: SettingType; }; type BoxOutlierStyleType = { radius: SettingType; opacity: SettingType; stroke_width: SettingType; }; type BoxViolinStyleType = { opacity: SettingType; stroke_width: SettingType; }; type ConvexHullCommonType = { camera_zoom: SettingType; camera_center_x: SettingType; camera_center_y: SettingType; color_mode: SettingType<`stability` | `energy`>; color_scale: SettingType; show_stable: SettingType; show_unstable: SettingType; show_stable_labels: SettingType; show_unstable_labels: SettingType; max_hull_dist_show_phases: SettingType; max_hull_dist_show_labels: SettingType; fullscreen: SettingType; info_pane_open: SettingType; legend_pane_open: SettingType; }; type ConvexHullWith3DType = ConvexHullCommonType & { show_hull_faces: SettingType; hull_face_color: SettingType; hull_face_opacity: SettingType; hull_face_color_mode: SettingType; }; export interface SettingsConfig { color_scheme: SettingType; background_color: SettingType; background_opacity: SettingType; symmetry: { symprec: SettingType; algo: SettingType<`Moyo` | `Spglib`>; }; structure: { atom_radius: SettingType; same_size_atoms: SettingType; show_atoms: SettingType; show_image_atoms: SettingType; sphere_segments: SettingType; bond_thickness: SettingType; auto_bond_order: SettingType; aromatic_display: SettingType<`aromatic` | `kekule`>; show_bonds: SettingType; bond_color: SettingType; bonding_strategy: SettingType; show_polyhedra: SettingType; polyhedra_opacity: SettingType; polyhedra_show_edges: SettingType; polyhedra_edge_color: SettingType; polyhedra_color_mode: SettingType; polyhedra_color: SettingType; polyhedra_hide_center_atoms: SettingType; polyhedra_min_neighbors: SettingType; polyhedra_max_neighbors: SettingType; polyhedra_excluded_elements: SettingType; polyhedra_included_elements: SettingType; atom_color_mode: SettingType; atom_color_scale: SettingType; atom_color_scale_type: SettingType; show_gizmo: SettingType; camera_position: SettingType; camera_projection: SettingType; initial_zoom: SettingType; fov: SettingType; rotation_damping: SettingType; rotate_speed: SettingType; zoom_speed: SettingType; pan_speed: SettingType; zoom_to_cursor: SettingType; max_zoom: SettingType; min_zoom: SettingType; auto_rotate: SettingType; rotation: SettingType; show_site_labels: SettingType; show_site_indices: SettingType; site_label_size: SettingType; site_label_color: SettingType; site_label_bg_color: SettingType; site_label_padding: SettingType; site_label_offset: SettingType; ambient_light: SettingType; directional_light: SettingType; vector_configs: SettingType>; vector_scale: SettingType; vector_color: SettingType; vector_color_mode: SettingType; vector_color_scale: SettingType; vector_normalize: SettingType; vector_uniform_thickness: SettingType; vector_origin_gap: SettingType; vector_shaft_radius: SettingType; vector_arrow_head_radius: SettingType; vector_arrow_head_length: SettingType; show_cell: SettingType; show_cell_vectors: SettingType; cell_edge_opacity: SettingType; cell_surface_opacity: SettingType; cell_edge_color: SettingType; cell_surface_color: SettingType; cell_edge_width: SettingType; fullscreen_toggle: SettingType; }; trajectory: { auto_play: SettingType; fps: SettingType; fps_range: SettingType; display_mode: SettingType<`structure+scatter` | `structure` | `scatter` | `histogram` | `structure+histogram`>; show_controls: SettingType; fullscreen_toggle: SettingType; step_labels: SettingType; layout: SettingType<`auto` | Orientation>; allow_file_drop: SettingType; bin_file_threshold: SettingType; text_file_threshold: SettingType; use_indexing: SettingType; chunk_size: SettingType; step_label_format: SettingType; property_value_format: SettingType; tooltip_format: SettingType; enable_keyboard_shortcuts: SettingType; show_parsing_progress: SettingType; compact_controls: SettingType; show_filename_in_controls: SettingType; smooth_playback: SettingType; loop_playback: SettingType; pause_on_hover: SettingType; highlight_current_frame: SettingType; show_frame_info: SettingType; max_frames_in_memory: SettingType; memory_usage_warning_threshold: SettingType; enable_performance_monitoring: SettingType; prefetch_frames: SettingType; cache_parsed_data: SettingType; }; plot: { animation_duration: SettingType; enable_zoom: SettingType; zoom_factor: SettingType; auto_fit_range: SettingType; grid_lines: SettingType; axis_labels: SettingType; show_x_zero_line: SettingType; show_y_zero_line: SettingType; show_x_grid: SettingType; show_x2_grid: SettingType; show_y_grid: SettingType; show_y2_grid: SettingType; x_format: SettingType; x2_format: SettingType; y_format: SettingType; y2_format: SettingType; x_scale_type: SettingType; y_scale_type: SettingType; x_ticks: SettingType; y_ticks: SettingType; }; scatter: { show_legend: SettingType; show_points: SettingType; show_lines: SettingType; symbol_type: SettingType; display: DisplayConfigType; point: PointStyleType; line: LineStyleType; }; histogram: { mode: SettingType<`overlay` | `single`>; show_legend: SettingType; bin_count: SettingType; bar: BarStyleType; display: DisplayConfigType; }; bar: { display: DisplayConfigType; bar: SimpleBarStyleType; line: SimpleLineStyleType; }; box: { whisker_mode: SettingType; box_width: SettingType; show_outliers: SettingType; show_mean: SettingType; kind: SettingType; side: SettingType; bandwidth: SettingType>; violin_width: SettingType; violin_box_width: SettingType; box: BoxStyleType; whisker: BoxWhiskerStyleType; median: BoxLineStyleType; outlier: BoxOutlierStyleType; violin: BoxViolinStyleType; display: DisplayConfigType; }; sankey: { orientation: SettingType; node_align: SettingType; node_width: SettingType; node_padding: SettingType; link_opacity: SettingType; show_node_labels: SettingType; iterations: SettingType; }; sunburst: { shape: SettingType; value_mode: SettingType; max_depth: SettingType; inner_radius: SettingType; pad_angle: SettingType; min_fraction: SettingType; show_labels: SettingType; label_rotation: SettingType; label_text: SettingType; zoom_on_click: SettingType; show_breadcrumbs: SettingType; }; composition: { display_mode: SettingType<`pie` | `bubble` | `bar`>; color_scheme: SettingType; }; convex_hull: { binary: ConvexHullCommonType; ternary: ConvexHullWith3DType & { camera_elevation: SettingType; camera_azimuth: SettingType; }; quaternary: ConvexHullWith3DType & { camera_rotation_x: SettingType; camera_rotation_y: SettingType; }; }; } export declare const SETTINGS_CONFIG: SettingsConfig; export type DefaultSettings = { [K in keyof SettingsConfig]: SettingsConfig[K] extends SettingType ? T : SettingsConfig[K] extends Record ? { [NK in keyof SettingsConfig[K]]: SettingsConfig[K][NK] extends SettingType ? T : SettingsConfig[K][NK] extends Record ? { [NNK in keyof SettingsConfig[K][NK]]: SettingsConfig[K][NK][NNK] extends SettingType ? T : never; } : never; } : never; }; export declare const DEFAULTS: DefaultSettings; export declare const merge: (user?: Partial) => DefaultSettings; export {};