libraryPackage manifestv6.0.4

lib.ui-kit-core

Core UI primitives and utilities

@lssm-tech/lib.ui-kit-core
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 6.0.4. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
react-nativeserverbunnode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGElib.ui-kit-coreplatform

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

10 declaraciones · se muestran las primeras 6SELECT TO INSPECT

@lssm-tech/lib.ui-kit-core

/hooks/useReducedMotion selects the web implementation under the browser condition, including when react-native is also active. Native alone selects AccessibilityInfo; Bun and Node retain the web implementation and its SSR fallback. Workspace source resolution follows the existing published condition order, and published export targets are unchanged.

@lssm-tech/lib.ui-kit-core is the shared foundation for the UI packages. It provides the low-level cn() utility plus the canonical shared interface layer used by ui-kit and ui-kit-web.

Website: https://contractspec.io

Installation

bun add @lssm-tech/lib.ui-kit-core

or

npm install @lssm-tech/lib.ui-kit-core

What belongs here

This package is intentionally small:

  • Very low-level, zero-surprise UI helpers shared across ui-kit, ui-kit-web, and ui-link.
  • Small shared utilities that are useful across multiple UI packages and do not belong in a component package.
  • Platform-neutral shared UI contracts under ./interfaces.

API map

  • root export: .
  • shared interfaces subpath: ./interfaces
  • server-only subject propagation port: ./ssr/subject-scope
  • utility subpath: ./utils
  • command theme class contract: ./command-theme
  • core function: cn(...inputs)

Operational semantics and gotchas

  • This package is intentionally tiny.
  • ./interfaces is the shared compatibility layer for semantically matching ui-kit and ui-kit-web exports.
  • ./command-theme is a narrow shared class contract for command palette/search-trigger color states. It exists only to keep native, web, and design-system command surfaces aligned on semantic theme tokens; it is not a general design-token bucket.
  • cn() composes clsx with tailwind-merge.
  • Changes here ripple into all UI packages even though the file count is small.
  • This package should stay boring and predictable.
  • ./ssr/subject-scope carries an already resolved contract Subject through request-local async scopes. AuthOS supplies the subject at the request edge; web SSR reads the same scope. It performs no authentication or policy decision, returns undefined outside a scope, and belongs only in Node server bundles. Existing AuthOS SSR entry points keep their signatures and strict missing-context error. This additive lower port removes the UI package's upward domain dependency.

Compatibility guard

ui-kit-core also owns the registry used to compare the native and web UI kit lanes. Run the repo-level guard before adding or changing shared ./ui/* surfaces:

bash
bun run ui-kit:compat

The guard compares packages/platform/ui/ui-kit and packages/platform/ui/ui-kit-web exported ./ui/* subpaths, exported symbols, and shared prop-shape contracts. Existing drift is recorded in scripts/ui-kit-compatibility-baseline.json; new drift should be fixed or deliberately accepted by refreshing that baseline in the same reviewed change. Shared component contracts should be declared here first under ./interfaces, then consumed from both UI kit packages.

Layout contract split

./interfaces separates neutral wrapper semantics from directional stack semantics so the web and native lanes can migrate Box safely:

  • SharedBoxProps is the shared semantic wrapper contract. It intentionally carries only className today; consumers should not depend on Box for flex direction, default gap, or default alignment.
  • SharedFlexStackProps owns the cross-platform stack subset: gap, align, justify, and wrap.
  • HStack and VStack should consume SharedFlexStackProps; new shared UI should pick one of them whenever direction matters.
  • SharedStackProps remains exported for compatibility while the staged Box neutral-default migration is underway.

Changing gap, align, justify, wrap, as, or the Box/stack split is a public compatibility decision. Update package docs, release capsules, and guard evidence in the same reviewed change.

When not to use this package

  • Do not use it for components.
  • Do not use it for design tokens.
  • Do not use it for router or link abstractions.
  • @lssm-tech/lib.ui-kit
  • @lssm-tech/lib.ui-kit-web
  • @lssm-tech/lib.ui-link

Local commands

  • bun run lint:check
  • bun run typecheck

Graph & Timeline Primitives

@lssm-tech/lib.ui-kit-core now exports platform-agnostic graph and timeline hooks and interfaces — pure TypeScript, no React or react-native imports.

Hooks: useGraphFilter, useGraphLayout, useGraphSelection, useAdaptiveGraphRenderer, useTimelineRange, useTimelineZoom

Interfaces: GraphNode, GraphEdge, GraphSelection, GraphCanvasProps, TimelineEvent, TimelineRange, TimelineProps, TimelineGraphProps, GraphLayoutKind

useAdaptiveGraphRenderer returns "svg" or "reactflow" based on a bounded node/edge threshold (default 300 nodes / 500 edges), enabling lazy-loading of GraphCanvasAdvanced in the web lane.

See AGENTS.md for full details.

Complete graph view contract ownership

The compatible ownership proposal places the complete existing Annotation, SavedView, and GraphExport declaration families in UiKitCore under ./data-views/annotation, ./data-views/saved-view, and ./data-views/graph-export. Legacy imports remain forwards to those same declarations and documentation objects. Existing constants, fields, defaults, helper behavior and tests are preserved. Source and publication roots include their existing platform conditions and the explicit Node condition.

The proposal also binds UI consumers to existing canonical Core, Kernel and DesignCatalog families. Qualification requires fresh task-bound adoption, owning production, declaration consumers and affected tests; this source checkpoint does not claim that execution.

Declared capabilities.

Lib Ui Kit Core

Core UI primitives and utilities

Use it to

  • Adopt core ui primitives and utilities

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/lib.ui-kit-core package constraints do not match the target runtime or platform.

@lssm-tech/lib.ui-kit-core

@lssm-tech/lib.ui-kit-core/a11y

@lssm-tech/lib.ui-kit-core/a11y/GraphAccessibilityProvider

@lssm-tech/lib.ui-kit-core/a11y/narration-types

@lssm-tech/lib.ui-kit-core/algorithms/color-scale

@lssm-tech/lib.ui-kit-core/algorithms/convex-hull

@lssm-tech/lib.ui-kit-core/algorithms/path-algorithms

@lssm-tech/lib.ui-kit-core/command-theme

@lssm-tech/lib.ui-kit-core/exporters/dot-exporter

@lssm-tech/lib.ui-kit-core/exporters/json-exporter

@lssm-tech/lib.ui-kit-core/exporters/mermaid-exporter

@lssm-tech/lib.ui-kit-core/exporters/pii-redactor

Imports and export paths.

82 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

82 importaciones · se muestran 35

Dependencies and related packages.

Runtime dependencies 10
@types/d3-force
^3.0.10
@types/d3-hierarchy
^3.1.7
class-variance-authority
^0.7.1
clsx
^2.1.1
d3-force
^3.0.0
d3-hierarchy
^3.1.2
fuse.js
^7.5.0
tailwind-merge
catalog:ui
Peer dependencies 2
react
catalog:
react-native
catalog:native
Development dependencies 7
@types/node
catalog:types
@types/react
catalog:types
react
catalog:
react-native
catalog:native
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

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 .
testbun test --pass-with-no-tests
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
Tu vista

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Tu contexto

The different parts of you

Choose a starting point

Una mezcla útil de contexto, imágenes y orientación discreta.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Comodidad de lectura

Elige tu idioma

El idioma de la interfaz solo cambia el texto. Los mercados, precios y flujos de trabajo conservan sus propios ajustes.

Cobertura de traducción

Parte del contenido se muestra en inglés.

Navegación151
Grafo616
Categorías188
Portafolio332
Ejemplos2035
Vista previa de la fuente41

Se añadirán más traducciones a medida que se revise el contenido.

Esta preferencia se guarda en este navegador.

Buscar en el sitio web

Puntos de partida útiles

Sin resultados. Prueba una frase más corta, un nombre de operación u otro ámbito de búsqueda.

UN POCO DE ESPACIO PARA EXPLORAR

Encuentra algo que explorar.

Abre una vista detallada en esta página, prueba otra perspectiva o sigue el detalle a su propia página.

Cómo funcionan las vistas previas y los controles
01

Mirar antes de salir

Pasa el cursor por un enlace o enfócalo con Tab para ver una vista previa. Hacer clic en el enlace original o pulsar Intro siempre abre su destino.

02

Mantener el contexto

Entra en la vista previa para explorar sus secciones. Usa Alt + ↓ desde un enlace enfocado para entrar con el teclado. Escape la cierra.

03

Abrir las posibilidades

Las filas desplegables, las perspectivas y los controles destacados revelan más. Tu vista cambia la comodidad de lectura y el contexto que exploras.

Un botón separado para mirar más de cerca

Muestra pequeños botones de vista previa junto a los enlaces donde haya espacio. Toca el ojo para inspeccionar o el enlace para ir directamente. Esta elección permanece en esta pestaña.

No se recoge historial de navegación. El movimiento reducido sigue tu dispositivo y Tu vista.