@cratis/scene.model

中文文档
5.2.0发布于 2026/11/11MITTypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 2.8万

The TypeScript mirror of Cratis.Scene.Model — the platform-agnostic Screen object model.

原始使用文档
文档目录6 节
  1. Packages / Deployables
  2. .NET support
  3. Builds
  4. Description
  5. Support
  6. The Cratis ecosystem

Cratis Scene

Cratis Scene is a UI model and runtime for developers building platform-independent, Screenplay-based user interfaces.

Describing a user interface without describing a platform — Scene is the UI model of the Cratis model-first layer.

The object model and runtime for Screenplay-based UIs: Scene.Model (platform-agnostic screens, layouts, forms, contribution points, ui profiles and themes), Scene.Engine (binding/resolution runtime), and Scene.React (the React renderer).

Packages / Deployables

Nuget NPM NPM NPM

.NET support

Cratis.Scene.Model and Cratis.Scene.Engine target .NET 10 and .NET 11. .NET 8 and .NET 9 are no longer supported. Building from source requires the .NET 11 SDK selected by global.json. Specifications run on .NET 11 by default; CI also runs both library specification projects on .NET 10.

Builds

.NET Build JavaScript Build

Description

Scene owns the object model and runtime half of the Screenplay stack. In the model-first pipeline, Screenplay describes an event-sourced, CQRS system, Stage renders it into a running application, and Scene is how that application's user interface is described — independently of any rendering platform.

Scene.Model is the platform-agnostic C# object model that Stage translates Screenplay's parsed language constructs into, and that Studio's design-time tooling reads and writes. Scene.Engine walks that graph, resolves bindings (data, action, form, navigation contribution) and drives whichever renderer is plugged in — it does not know React exists. Scene.React is one renderer implementing the abstract vocabulary against real React/DOM; sibling positions are reserved for future Scene.Native / Scene.Desktop renderers. Vendor and internal component packages (PrimeReact, internal widget libraries) are adapters plugging into the renderer contract, not part of it.

The design-time editor built on top of this object model lives in Studio, not here — see StudioIssues#156.

Support

Cratis is an open community, and we are glad to help users, teams evaluating the stack, and contributors.

ChannelDetails
DiscordJoin the community on Discord for questions and discussions
GitHub IssuesReport bugs or request features
DocumentationRead the docs at cratis.io

The Cratis ecosystem

This project is part of Cratis — tools for building event-sourced and CQRS applications.

Scene is MIT licensed and free to use.


Part of the Cratis platform · MIT

版本与发布记录

@cratis/scene.model 共发布 137 个版本,首次发布于 2026/08/16;过去 12 个月发布了 137 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
5.2.0latest2026/11/11今天
5.1.02026/11/082 天前
5.0.02026/11/083 天前
4.88.02026/11/046 天前
4.87.02026/11/037 天前
4.86.02026/10/3011 天前

关于 @cratis/scene.model 的常见问题

@cratis/scene.model 是什么?

The TypeScript mirror of Cratis.Scene.Model — the platform-agnostic Screen object model.

如何安装 @cratis/scene.model?

在项目目录运行 npm install @cratis/scene.model,或使用 pnpm add / yarn add / bun add。

@cratis/scene.model 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cratis/scene.model 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@cratis/scene.model 可以商用吗?

@cratis/scene.model 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@cratis/scene.model 的下载量有多少?

根据 npm 官方下载统计,@cratis/scene.model 在 2026/10/11 – 2026/11/09 这 30 天内被下载 27,753 次,日均约 925 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cratis/scene.model 还在维护吗?

最新版本 5.2.0 发布于 2026/11/11(今天);至今共发布 137 个版本,其中过去 12 个月发布了 137 个;首次发布于 2026/08/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。