Skip to content
ContractSpec
Start here

Package manual · platform

·Interfaces, presentations and design

lib.cockpit-kit

Cross-platform type contracts and canonical variant unions for cockpit primitives

platformlibraryv2.0.5experimentalservernode
@lssm-tech/lib.cockpit-kit
bun add @lssm-tech/lib.cockpit-kit
Package source ↗Manifest ↗

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

Package guide

Cross-platform type contracts and canonical variant unions for cockpit UI primitives.

Overview

cockpit-kit is the shared foundation for the four cockpit primitives:

PrimitivePurpose
CockpitFrameTop-level layout shell for the cockpit surface
NavRailVertical navigation sidebar
GraphCanvasDependency/workflow graph view
MetricPanelMetric and KPI display panel

This package ships type contracts only. Component implementations land in Phase 1.

Canonical variant unions

Two variant unions are defined and owned here:

ts
import { Density, Expansion } from '@lssm-tech/lib.cockpit-kit/variants';

// Density: 'comfortable' | 'compact'
// Expansion: 'collapsed' | 'expanded'

Rule: lib.personalized-presentation imports these FROM here. Never the other way around.

Subpath exports

ImportWhat you get
@lssm-tech/lib.cockpit-kitAll types + variants
@lssm-tech/lib.cockpit-kit/variantsDensity, Expansion + schema descriptors
@lssm-tech/lib.cockpit-kit/variants/densityDensity only
@lssm-tech/lib.cockpit-kit/variants/expansionExpansion only
@lssm-tech/lib.cockpit-kit/typesComponent prop interfaces

Usage

ts
import type { CockpitFrameProps, NavRailProps } from '@lssm-tech/lib.cockpit-kit';
import { densityVariantSchema, expansionVariantSchema } from '@lssm-tech/lib.cockpit-kit/variants';

Dependency rules

  • This package has no UI framework dependencies — it is purely types and constants
  • Web-specific implementations live in @lssm-tech/lib.cockpit-kit-web
  • lib.personalized-presentation imports FROM this package, not vice versa

Standalone declaration exports keep their existing public subpath names. The shared builder preserves their original declaration suffix and copies checked source declarations into dist, without overwriting emitted implementation types.

Relationships

THIS PACKAGElib.cockpit-kit8 import paths

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

2 declarations

Declared capabilities

Lib Cockpit Kit

Cross-platform type contracts and canonical variant unions for cockpit primitives

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
  • cleanrm -rf dist
  • lintbun run 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
  • testbun test
  • typechecktsgo --noEmit