Skip to content
Shapemetry

Model - Tables

API reference for src/lanes/tables/tables, src/schema/tables, src/validate/tables on @huukhanhnguyen/model, reachable from ..

See the Guide for the ModelJSON / evaluate pipeline.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

cellValueToExpression

function

Serialize a JS cell value as a house expression literal.

cellValueToExpression(cell: unknown): string

columnKeys

function

columnKeys(value: TableValue): string[]

DELETED_TABLE_METHODS

const

Deleted methods — validate + evaluate throw, naming the replacement.

const DELETED_TABLE_METHODS: Record<string, string>

evaluateTableChain

function

Evaluate one tables[] chain. operationCount cuts the body after N steps (TablesSection verb preview — same idea as evaluateTexture).

evaluateTableChain(chain: TableChain, scope: ModelScope, sceneFrame?: () => RenderFrameSlice[], dependencyTarget?: unknown, runAnalysis?: RunAnalysis, operationCount?: number, resolveTable?: (key: string) => TableValue): TableValue

EvaluateTableOptions

type

type EvaluateTableOptions
// = {
    sceneFrame?: () => RenderFrameSlice[];
    dependencyTarget?: unknown;
    runAnalysis?: RunAnalysis;
    /** Truncate body fold after this many operations (per-step preview). */
    operationCount?: number;
    /** Resolve another tables[] chain by key (tableJoin/tableUnion). */
    resolveTable?: (key: string) => TableValue;
}

isLiteralCellInput

function

isLiteralCellInput(input: string): boolean

parseLiteralCell

function

Parse a bare JSON literal without jsep/scope.

parseLiteralCell(input: string): unknown

RunAnalysis

type

type RunAnalysis
// = (mode: AnalyzeMode, config: AnalyzeConfig) => AnalyzeRunResult

tableChainFromArrays

function

Build a v2 static data chain (columns[] + row nodes) from array shape. Used by CSV import, Analyze freeze, clash report, AI snapshots.

tableChainFromArrays(key: string, columns: string[], rows: unknown[][], options?: { label?: string; }): TableChain

tableErrors

function

tableErrors(model: ModelJSON): RegistryError[]

tableValueToRows

function

Convert a computed table value into display-ready string rows.

tableValueToRows(value: TableValue): { columns: string[]; rows: string[][]; }
Last updated: 📖 1 min readEdit on GitHub