more prod ready comments
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
//! Computed fields subsystem.
|
||||
//!
|
||||
//! This module exposes the provider trait and the internal state management
|
||||
//! for computed (display-only) fields. Computed fields are values derived
|
||||
//! from other fields in the form and are not directly editable by the user.
|
||||
|
||||
pub mod provider;
|
||||
pub mod state;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ================================================================================================
|
||||
// COMPUTED FIELDS - Provider and Context
|
||||
// ================================================================================================
|
||||
//! Provider interface and context for computed/display-only fields.
|
||||
//!
|
||||
//! Implementors provide logic to compute a field's display value from the
|
||||
//! other field values in the form.
|
||||
|
||||
/// Context information provided to computed field calculations
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
/* file: canvas/src/computed/state.rs */
|
||||
/*
|
||||
Add computed state module file implementing caching and dependencies
|
||||
*/
|
||||
|
||||
// ================================================================================================
|
||||
// COMPUTED FIELDS - State: caching and dependencies
|
||||
// ================================================================================================
|
||||
// src/computed/state.rs
|
||||
//! Computed field state: caching and dependency graph.
|
||||
//!
|
||||
//! This module holds the internal state necessary to track which fields are
|
||||
//! computed, their dependencies, and cached computed values. It is used by the
|
||||
//! editor to avoid unnecessary recomputation and to present computed fields as
|
||||
//! read-only.
|
||||
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
// src/editor/mod.rs
|
||||
// Only module declarations and re-exports.
|
||||
//! Editor submodule exports.
|
||||
//!
|
||||
//! This module exposes the internal editor pieces (core, editing, movement,
|
||||
//! navigation, mode, and optional features like suggestions, validation, and
|
||||
//! computed field helpers). Only module declarations and re-exports live here.
|
||||
|
||||
pub mod core;
|
||||
pub mod display;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
// src/suggestions/mod.rs
|
||||
//! Suggestions subsystem - provider and optional GUI.
|
||||
//!
|
||||
//! Contains the suggestion provider types used by the editor and, when the GUI
|
||||
//! feature is enabled, the rendering helpers for the suggestions dropdown.
|
||||
|
||||
pub mod state;
|
||||
#[cfg(feature = "gui")]
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
// src/textarea/mod.rs
|
||||
//! Text area convenience exports.
|
||||
//!
|
||||
//! Re-export the core textarea types and provider so consumers can use
|
||||
//! `canvas::textarea::TextArea` / `TextAreaState` / `TextAreaProvider`.
|
||||
|
||||
pub mod provider;
|
||||
pub mod state;
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/* canvas/src/validation/formatting.rs
|
||||
Add new formatting module with CustomFormatter, PositionMapper, DefaultPositionMapper, and FormattingResult
|
||||
*/
|
||||
// src/validation/formatting.rs
|
||||
//! Custom formatting and position mapping for validation/display.
|
||||
//!
|
||||
//! This module defines the CustomFormatter trait along with helpers to map
|
||||
//! cursor positions between the raw stored text and the formatted display
|
||||
//! representation. Implementors may provide a custom PositionMapper to handle
|
||||
//! advanced formatting scenarios.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Bidirectional mapping between raw input positions and formatted display positions.
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
// src/validation/mod.rs
|
||||
//! Validation subsystem re-exports and helpers.
|
||||
//!
|
||||
//! This module collects validation-related modules (limits, masks, patterns,
|
||||
//! formatting, and state) and re-exports the most commonly used types so that
|
||||
//! callers can import them from `crate::validation`.
|
||||
|
||||
// Core validation modules
|
||||
// Core validation modules
|
||||
pub mod config;
|
||||
pub mod limits;
|
||||
pub mod state;
|
||||
|
||||
Reference in New Issue
Block a user