libraryPackage manifestv7.0.4

lib.presentation-runtime-core

Core presentation runtime for contract-driven UIs

@lssm-tech/lib.presentation-runtime-core
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 7.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 ↗
servernode
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.presentation-runtime-coreplatform

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

8 déclarations · les 6 premières affichéesSELECT TO INSPECT

@lssm-tech/lib.presentation-runtime-core

Website: https://contractspec.io

Core presentation runtime for contract-driven UIs.

What It Provides

  • Couche: lib.
  • Consumers: presentation-runtime-react, presentation-runtime-react-native.
  • Related ContractSpec packages include @lssm-tech/lib.contracts-spec, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.
  • Related ContractSpec packages include @lssm-tech/lib.contracts-spec, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.

Installation

npm install @lssm-tech/lib.presentation-runtime-core

or

bun add @lssm-tech/lib.presentation-runtime-core

Usage

Import the root entrypoint from @lssm-tech/lib.presentation-runtime-core, or choose a documented subpath when you only need one part of the package surface.

Adaptive Experiences

The ./adaptive-experience entrypoint maps ContractSpec adaptive experience primitives into presentation defaults that UI renderers can consume without importing product-specific code. It currently resolves DataView defaults such as collection view, density, data depth, and page size from ResolvedAdaptiveExperience.

Use this adapter at the boundary between product policy and rendering code. It should receive already-resolved preferences, behavior support, signals, constraints, and overrides; it should not store hidden user profiles or bypass permissions.

Bundler Helpers

Import the bundler helpers from the root package:

ts
import {
  withPresentationTurbopackAliases,
  withPresentationWebpackAliases,
  withPresentationMetroAliases,
} from '@lssm-tech/lib.presentation-runtime-core';

Next.js Turbopack helper (default)

Use Turbopack as the default Next.js path:

ts
import { withPresentationTurbopackAliases } from '@lssm-tech/lib.presentation-runtime-core';

const nextConfig = withPresentationTurbopackAliases({
  turbopack: {
    resolveAlias: {
      fs: { browser: 'browserify-fs' },
    },
  },
});

export default nextConfig;

Next.js Webpack helper (fallback)

Use Webpack only when you opt in with next dev --webpack or next build --webpack:

ts
import { withPresentationWebpackAliases } from '@lssm-tech/lib.presentation-runtime-core';

const nextConfig = {
  webpack: (config) => withPresentationWebpackAliases(config),
};

export default nextConfig;

Expo / Metro helper

js
const { getDefaultConfig } = require('expo/metro-config');
const {
  withPresentationMetroAliases,
} = require('@lssm-tech/lib.presentation-runtime-core');

const projectRoot = __dirname;
const config = getDefaultConfig(projectRoot);

module.exports = withPresentationMetroAliases(config);

The helpers also keep shared UI imports platform-correct:

  • Metro rewrites @lssm-tech/lib.ui-kit-web/ui/* to @lssm-tech/lib.ui-kit/ui/*, @lssm-tech/lib.presentation-runtime-react to @lssm-tech/lib.presentation-runtime-react-native, and lucide-react to lucide-react-native for native platforms.
  • Metro also enables package exports and merges platform export conditions so ios, android, react-native, and browser package conditions can resolve platform-specific build-tool outputs.
  • Next.js Turbopack/Webpack rewrites the native package names back to the web packages, including lucide-react-native to lucide-react.

Architecture

  • src/index.ts is the root public barrel that builds the package entrypoint.
  • src/adaptive-experience.ts is part of the package's public or composition surface.
  • src/metro.ts is part of the package's public or composition surface.
  • src/next.ts is part of the package's public or composition surface.
  • src/table.ts is part of the package's public or composition surface.
  • src/visualization.echarts.ts is part of the package's public or composition surface.
  • src/visualization.model.builders.ts is part of the package's public or composition surface.
  • src/visualization.model.helpers.ts is part of the package's public or composition surface.

Public Entry Points

  • Export . publishes through ./dist/index.js; CommonJS require resolves to the generated Metro helper at ./dist/metro.cjs.
  • Export ./adaptive-experience builds from ./src/adaptive-experience.ts.
  • Bundler helpers are part of the root entrypoint; no dedicated ./webpack or ./turbopack subpaths are published.
  • Export ./metro builds from ./src/metro.ts and publishes a generated CommonJS dist/metro.cjs require target for Metro config files.
  • Export ./next builds from ./src/next.ts.
  • Export ./table builds from ./src/table.ts.
  • Export ./visualization builds from ./src/visualization.ts.
  • Export ./visualization.echarts builds from ./src/visualization.echarts.ts.
  • Export ./visualization.model builds from ./src/visualization.model.ts.
  • Export ./visualization.model.builders builds from ./src/visualization.model.builders.ts.
  • Export ./visualization.model.helpers builds from ./src/visualization.model.helpers.ts.
  • Export ./visualization.types builds from ./src/visualization.types.ts.
  • Export ./visualization.utils builds from ./src/visualization.utils.ts.
  • Export ./marketing builds from ./src/marketing/index.ts: marketing meta builders, the SEO transform and the presentation descriptor normalizer.

Marketing presentation descriptors

normalizeMarketingPresentationDescriptor turns a marketing page (and optional site bindings, evidence and global CTAs) into a serializable MarketingPresentationDescriptor. Its input is structural: MarketingPresentationPageInput and MarketingPresentationSiteInput name only the fields the normalizer reads, over a MarketingPresentation* vocabulary that mirrors the growth marketing site vocabulary. Growth MarketingPageContract and MarketingSiteContract values satisfy them as-is, so hosts pass growth contracts directly. This platform package has no runtime dependency on @lssm-tech/lib.growth-spec; a type-only parity test (src/marketing/descriptor-vocabulary.test.ts, growth-spec as a devDependency) fails typecheck if the two vocabularies drift.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — bun run prebuild && bun run build:bundle && bun run build:types
  • bun run lint — bun run lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit -p tsconfig.json
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rimraf dist .turbo
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.
  • Add data visualization capabilities.
  • Add table capabilities.
  • Add table overflow metadata to controller render models so web and native renderers can apply consistent cell overflow behavior.
  • Add adaptive experience adapters for DataView presentation defaults.

Notes

  • Core runtime interface is consumed by all presentation runtimes — changes here affect both web and mobile.
  • Must remain platform-agnostic; no React or React Native imports allowed.
  • API surface changes require coordinated updates in both downstream runtimes.

Whole canonical adaptive and presentation ownership

Preserve the complete existing adaptive policy, permissions, constraints, override and event families; schema-to-markdown and structured-data implementations; rich-code preferences; all rendering and marketing behavior, defaults and original test assertions. Bind each whole family to its genuine existing Core, Kernel, Growth, DesignCatalog or complete RuntimeCore host supplier. Historical imports remain exact canonical forwards.

This is a Source-only compatible ownership proposal. Fresh task-bound adoption, owning production, declarations, affected runtime tests and platform qualification remain required.

The complete SEO integration test and snapshot live in the Legacy app-config test directory because they exercise its original resolveAppConfig implementation. Pure presentation tests remain with this package; the Legacy test declares its canonical presentation dependency.

Declared capabilities.

Lib Presentation Runtime Core

Core presentation runtime for contract-driven UIs

Use it to

  • Adopt core presentation runtime for contract-driven uis

Requires

  • TypeScript

Choose another boundary when

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

@lssm-tech/lib.presentation-runtime-core

@lssm-tech/lib.presentation-runtime-core/metro

@lssm-tech/lib.presentation-runtime-core/adaptive-experience

@lssm-tech/lib.presentation-runtime-core/marketing

@lssm-tech/lib.presentation-runtime-core/next

@lssm-tech/lib.presentation-runtime-core/presentation-aliases

@lssm-tech/lib.presentation-runtime-core/presentation-runtime-core.feature

@lssm-tech/lib.presentation-runtime-core/table

@lssm-tech/lib.presentation-runtime-core/transform-engine

@lssm-tech/lib.presentation-runtime-core/transform-engine.markdown

@lssm-tech/lib.presentation-runtime-core/visualization

@lssm-tech/lib.presentation-runtime-core/visualization.echarts

Imports and export paths.

38 entries

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

38 imports · 35 affichés

@lssm-tech/lib.presentation-runtime-core/next

Dependencies and related packages.

Runtime dependencies 8
@types/turndown
^5.0.6
echarts
catalog:ui
turndown
^7.2.4
Peer dependencies 1
typescript
^7.0.2 || ^6.0.3
Development dependencies 4
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
buildbun run build:bundle && bun run build:require && bun run build:types
build:bundlecontractspec-bun-build transpile
build:requirebun build src/metro.ts --target node --format cjs --packages external --outfile dist/metro.cjs
build:typescontractspec-bun-build types
cleanrimraf dist .turbo
devcontractspec-bun-build dev
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 -p tsconfig.json
Votre vue

Make room for your context.

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

Votre contexte

The different parts of you

Choose a starting point

Un mélange utile de contexte, de visuels et de guidage discret.

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

Confort de lecture

Choisir votre langue

La langue de l’interface change uniquement le texte. Les marchés, les prix et les parcours conservent leurs propres paramètres.

Couverture des traductions

Une partie du contenu est affichée en anglais.

Navigation151
Graphe616
Catégories378
Portfolio833
Exemples2 035
Aperçu de la source1 542

D’autres traductions seront ajoutées à mesure que le contenu sera relu.

Cette préférence est enregistrée dans ce navigateur.

Rechercher sur le site

Des points de départ utiles

Aucun résultat. Essayez une expression plus courte, un nom d’opération ou un autre périmètre de recherche.

UN PEU DE PLACE POUR EXPLORER

Trouvez quelque chose à explorer.

Ouvrez un aperçu détaillé sur cette page, essayez une autre perspective ou suivez le détail vers sa propre page.

Fonctionnement des aperçus et des commandes
01

Regarder avant de partir

Survolez un lien ou sélectionnez-le avec Tab pour voir un aperçu. Cliquer sur le lien d’origine ou appuyer sur Entrée ouvre toujours sa destination.

02

Rester dans le contexte

Entrez dans l’aperçu pour explorer ses sections. Depuis un lien sélectionné, utilisez Alt + ↓ pour y entrer au clavier. Échap le ferme.

03

Ouvrir les possibilités

Les lignes dépliables, les choix de perspective et les commandes mises en évidence révèlent davantage. Votre vue adapte le confort de lecture et le contexte exploré.

Un bouton séparé pour voir de plus près

Affichez de petits boutons d’aperçu à côté des liens quand l’espace le permet. Touchez l’œil pour examiner ou le lien pour y aller directement. Ce choix reste dans cet onglet.

Aucun historique de navigation n’est collecté. La réduction des animations suit votre appareil et Votre vue.