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

@fit-elsa/elsa

v1.0.2

Published

@fit-elsa/elsa 是 ELSA(Enterprise Layout and Structure Assistant)的核心框架模块,提供统一的抽象数据结构和拖拽式流程编排能力。

Readme

@fit-elsa/elsa

简介

@fit-elsa/elsa 是 ELSA(Enterprise Layout and Structure Assistant)的核心框架模块,提供统一的抽象数据结构和拖拽式流程编排能力。

功能亮点

统一的抽象数据结构

  • Graph、Page、Shape结构通用于任意业务场景
  • 全链路JSON序列化能力,兼容任何持久化存储方案

拖拽式流程编排

  • 支持图形拖拽和画布拖拽
  • 提供节点整理和一键显示所有节点的能力

安装

npm install @fit-elsa/elsa

快速开始

import { ELSA, graph, page, shape, rectangle, line } from '@fit-elsa/elsa';

// 创建一个新的图形实例
const newGraph = graph.create();

// 创建一个页面
const newPage = page.create();
newGraph.add(newPage);

// 创建一个矩形
const rect = rectangle.create({
  x: 100,
  y: 100,
  width: 200,
  height: 100,
  text: '示例矩形'
});
newPage.add(rect);

// 创建一条线
const lineShape = line.create({
  startPoint: { x: 300, y: 150 },
  endPoint: { x: 400, y: 150 }
});
newPage.add(lineShape);

// 序列化图形数据
const graphData = ELSA.serialize(newGraph);
console.log('图形数据:', graphData);

// 反序列化图形数据
const deserializedGraph = ELSA.deserialize(graphData);

API 参考

核心类

  • ELSA: 主类,提供序列化和反序列化功能
  • graph: 图形相关API
  • page: 页面相关API
  • shape: 形状相关API

形状类型

  • rectangle: 矩形
  • line: 线条
  • diamond: 菱形
  • container: 容器
  • reference: 引用

开发

构建命令

# 安装依赖
npm install

# 构建开发版本
npm run build

# 构建调试版本
npm run build:debug

# 构建生产版本
npm run build:pro

许可证

MIT License

版权

/*---------------------------------------------------------------------------------------------

  • Copyright (c) 2025 Huawei Technologies Co., Ltd. All rights reserved.
  • This file is a part of the ModelEngine Project.
  • Licensed under the MIT License. See License.txt in the project root for license information. --------------------------------------------------------------------------------------------/