sealed-surface 0.2.0

Non-extractable data surface: tables and timeseries as glyphs, never DOM text
Documentation
//! Non-extractable data surface.
//!
//! Paint tables and timeseries as glyphs on a bitmap so cell values never
//! appear as Unicode in a host DOM. Framework-agnostic. Zero required
//! dependencies.
//!
//! **Not DRM. Not OCR-proof.** A human with a camera still wins. The crate
//! signs DOM scrape, copy/paste, and tooltip-JSON layers when the host obeys
//! the contract (see `examples/host_contract.rs`). Screen readers do not get
//! cell values in sealed mode; the accessible egress is a licensed API the
//! host already meters.
//!
//! ```
//! use sealed_surface::{
//!     AccessTier, CellValue, Column, FrameRequest, Grid, LicenseLens, Row, Surface,
//!     SurfaceMode, Viewport,
//! };
//!
//! let grid = Grid::try_new(
//!     vec![Column::new(0, "sku"), Column::new(1, "price")],
//!     vec![Row::new(
//!         0,
//!         vec![CellValue::text("ACME-SKU-1"), CellValue::float(49.0, 2)],
//!     )],
//! )?;
//!
//! let mut surface = Surface::new(
//!     SurfaceMode::Sealed,
//!     LicenseLens::from_tier(AccessTier::Trial),
//! );
//! let frame = surface.render(&grid, &FrameRequest::full(Viewport::window(640, 240)))?;
//! assert!(frame.host.clipboard.is_none());
//! assert!(!frame.host.audit_text().contains("49.00"));
//! assert!(frame.png.starts_with(b"\x89PNG"));
//! # Ok::<(), sealed_surface::Error>(())
//! ```

#![warn(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]

mod chart;
mod deflate;
mod error;
mod font;
mod host;
mod layout;
mod lens;
mod mode;
mod model;
mod raster;
mod surface;
mod theme;

pub use chart::{Series, SeriesId, SeriesLayout, SeriesPoint};
pub use error::Error;
pub use host::{ClipboardPayload, HostProjection, HostText};
pub use layout::{Hit, HitKind, HitMap, Pointer, TableMetrics, Viewport, MAX_PIXMAP_AXIS};
pub use lens::{AccessTier, LicenseLens, RedactionStyle};
pub use mode::SurfaceMode;
pub use model::{CellValue, Column, ColumnId, Grid, Row, RowId};
pub use raster::Pixmap;
pub use surface::{Frame, FrameRequest, Surface};
pub use theme::{Rgb, Theme};