npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aiao/rxdb-model

v0.0.19

Published

This library was generated with [Nx](https://nx.dev).

Downloads

497

Readme

@aiao/rxdb-model

框架无关的 RxDB 实体模型核心库:从实体元数据(EntityMetadata)派生表单、详情页、可编辑表格与可视化查询构建器所需的全部纯逻辑,并配套 VTable 表格运行时基础设施。

定位与边界

  • 唯一输入源:@aiao/rxdb 的实体装饰器体系产出的 EntityMetadata。
  • 框架无关:本包不含任何 Angular / React / Vue 依赖,可被任意前端技术栈消费;三框架 UI 组件层见 @aiao/rxdb-model-angular(React / Vue 版本陆续提供)。
  • 与 @aiao/rxdb 的边界:核心包的 entity-field.utils(Field Descriptor 字段语义元数据)与 entity-value.utils(parseEntityFieldValue/formatEntityFieldValue/validateFieldValue 等)服务于核心内部与插件契约;本包的同名模块面向「实体管理界面」场景(表单字段提取、字段值解析/格式化/校验、表格列构建),语义不同、请勿混用。
  • 表格引擎:@visactor/vtable 与 @visactor/vtable-editors 为 peer 依赖(~1.26.x),由消费方提供。

模块一览

| 目录 | 职责 | | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | | 根目录 entity-field.utils / entity-value.utils / structural-equal | 字段配置提取、字段值解析/格式化/校验、键序无关的结构化深比较 | | entity-form/ | 元数据 → 表单字段配置(create/edit/view 三模式)、实体与表单数据双向转换(仅变化字段)、表单校验 | | entity-detail/ | 元数据 → 详情页 Tab 结构(基础表单 + 每关系一个表格 Tab) | | entity-table/ | 可编辑表格列构建、15 个 VTable 单元格编辑器、剪贴板 / 键盘 / 主题 / tooltip / 拖拽重排等运行时基础设施 | | query-builder/ | 可视化查询构建器引擎:状态服务、操作符注册表、查询转换、schema 解析、即时校验、字段树等工具 |

使用

import { buildFormFields, buildEditableColumns, buildDetailTabs } from '@aiao/rxdb-model';

const fields = buildFormFields(metadata, 'create');
const columns = buildEditableColumns(metadata);
const tabs = buildDetailTabs(metadata);

查询构建器(框架无关服务层):

import { createQueryBuilderService } from '@aiao/rxdb-model';

const qb = createQueryBuilderService<MyEntity>({ schema: { fields } });
qb.state$.subscribe(state => console.log(state));
qb.addRule({ field: 'title', operator: 'contains', value: 'a' });
const rxdbQuery = qb.toRxDBQuery();

开发

pnpm nx test rxdb-model        # Vitest(node 默认环境,DOM 用例经文件头 pragma 切 happy-dom)
pnpm nx build rxdb-model       # Vite 库构建(ES 单格式 + dts)