Skip to content
ContractSpec
Start here

Package manual · platform

·Forms, data views and data exchange

lib.data-exchange-client

Shared controllers plus web and native UI surfaces for data interchange

platformlibraryv2.0.5experimentalservernode
@lssm-tech/lib.data-exchange-client
bun add @lssm-tech/lib.data-exchange-client
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Website: https://contractspec.io

Shared controllers plus web and native UI surfaces for mapping, preview, validation, and audit review.

What It Provides

  • Shared data-exchange view models and stateful controllers.
  • Web mapping studio components built on the existing web data-table stack.
  • Native mapping studio components built on the existing mobile data-table stack.

Template Mapping UI State

The shared controller exposes template-aware rows so web and native surfaces can show recommended columns, matched source columns, confidence, formatting summaries, required gaps, and ignored source columns.

tsx
import { useDataExchangeController } from "@lssm-tech/lib.data-exchange-client";

function ImportReview({ preview }) {
	const controller = useDataExchangeController({ preview });

	return (
		<ul>
			{(controller.model.templateRows ?? []).map((row) => (
				<li key={row.id}>
					{row.label}: {row.sourceField || "Unmatched"} -&gt;{" "}
					{row.targetField}
					{row.formatLabel ? ` (${row.formatLabel})` : ""}
				</li>
			))}
		</ul>
	);
}

Users can remap columns, select aliases, update field formats, reset to the developer template, or accept inferred mappings through controller actions.

Relationships

THIS PACKAGElib.data-exchange-client24 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

6 declarations

Declared capabilities

Lib Data Exchange Client

Shared controllers plus web and native UI surfaces for data interchange

Scripts

  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • devcontractspec-bun-build dev
  • cleanrimraf dist .turbo
  • lintbun lint:fix
  • lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
  • lint:checknode ../../../../scripts/biome.cjs check .
  • prebuildcontractspec-bun-build prebuild
  • typechecktsgo --noEmit