open-index/open-npm huggingface dataset:
npm package: @mtzgpepe/react-ui-hero
Description: A flexible hero component for React applications
Author: mtzgpepe
Latest version: 1.0.1

# React UI Hero Component

A flexible and customizable Hero component for React applications.

## Installation

```bash
npm install @your-org/react-ui-hero
```

## Usage

```jsx
import { Hero } from '@your-org/react-ui-hero';

function App() {
  return (
    <Hero
      title="Welcome to Our Platform"
      subtitle="Discover amazing features and start building today"
      primaryAction={{
        label: 'Get Started',
        onClick: () => console.log('Get Started clicked')
      }}
      secondaryAction={{
        label: 'Learn More',
        onClick: () => console.log('Learn More clicked')
      }}
    />
  );
}
```

## Props

- `title` (string, required): Main title text
- `subtitle` (string, optional): Subtitle text
- `children` (ReactNode, optional): Additional content
- `primaryAction` (object, optional): Primary call-to-action button configuration
  - `label` (string): Button text
  - `onClick` (function): Click handler
- `secondaryAction` (object, optional): Secondary call-to-action button configuration
  - `label` (string): Button text
  - `onClick` (function): Click handler
- `backgroundClass` (string, optional): Custom background CSS classes (default: 'bg-gradient-to-r from-blue-600 to-blue-500')
- `imageUrl` (string, optional): Background image URL

## Development

### Setup
1. Clone the repository
2. Install dependencies:
   ```bash
   npm install
   ```

### Building
```bash
npm run build
```

### Publishing
1. Update version in package.json
2. Build the package:
   ```bash
   npm run build
   ```
3. Login to npm:
   ```bash
   npm login
   ```
4. Publish the package:
   ```bash
   npm publish --access public
   ```

## License

MIT
npm package: @mu-cabin/opms-permission
Description: Frontend SDK for OPMS permission and auth management.
Author: wangluluez@gmail.com
Latest version: 0.9.29

# @mu-cabin/opms-permission

## 简介

`@mu-cabin/opms-permission` 是一个用于 OPMS 权限与认证管理的前端 SDK，支持资源、菜单、组织、用户信息的统一获取与本地缓存，适用于需要接入 OPMS 权限体系的前端项目。

## 安装

```bash
pnpm add @mu-cabin/opms-permission
# 或
yarn add @mu-cabin/opms-permission
# 或
npm install @mu-cabin/opms-permission
```

## 主要功能
- SSO 单点登录/登出跳转
- 用户信息获取与本地缓存
- 资源、菜单、控件权限获取与处理
- 组织树、公司信息查询
- 本地存储自动过期管理

## 快速开始

```ts
import { OpmsPermission, jumpToSSOLogin, jumpToSSOLogout } from '@mu-cabin/opms-permission';

const permission = new OpmsPermission({
  systemId: 1001, // 系统ID
  baseUrl: 'https://your-api-domain/opms', // OPMS后端接口地址
  ssoBaseUrl: 'https://your-sso-domain', // SSO登录地址
});

// 登录（需URL带有code参数）
await permission.login();

// 获取用户信息
const userInfo = await permission.getUserInfo();

// 获取资源、菜单、控件权限
const { resources, menuList, widgetMap } = await permission.getResources(userInfo.account);

// 跳转到SSO登录
jumpToSSOLogin({ baseUrl: 'https://your-sso-domain' });

// 跳转到SSO登出
jumpToSSOLogout({ baseUrl: 'https://your-sso-domain', redirectToUrl: window.location.origin });
```

## 主要API

### 类：OpmsPermission

| 方法 | 说明 |
| ---- | ---- |
| `login()` | SSO登录，获取并缓存token |
| `logout()` | 登出并清除本地缓存 |
| `getUserInfo()` | 获取当前用户信息 |
| `getResources(uniAccount)` | 获取资源、菜单、控件权限 |
| `queryOrgs()` | 获取组织树 |
| `queryCompanies()` | 获取公司信息 |
| `isLogin()` | 判断当前是否已登录 |
| `getToken()` | 获取当前token |

### SSO 工具方法
- `jumpToSSOLogin({ baseUrl, redirectUrl?, clientId? })` 跳转到SSO登录页
- `jumpToSSOLogout({ baseUrl, redirectToUrl, clientId? })` 跳转到SSO登出页

## 类型说明

- `Resource` 资源对象，包含资源ID、类型、路径、子节点等
- `MenuItem` 菜单项对象，包含菜单路径、名称、子菜单等
- `UserInfo` 用户信息对象，包含账号、姓名、工号、组织等
- `UserOrganization` 用户组织信息

## 常见问题

1. **为什么获取不到资源/菜单？**
   - 请确保已正确登录（URL带有code参数），并且接口地址、systemId 配置正确。
2. **本地缓存多久失效？**
   - 资源、菜单等默认缓存24小时，超时会自动重新拉取。
3. **如何自定义SSO clientId？**
   - `jumpToSSOLogin` 和 `jumpToSSOLogout` 方法均支持传入 `clientId` 参数。

## License
npm package: @mu-cms/express-es-git
Description: Micro CMS express middleware for git
Author: Mikael Karon
Latest version: 0.3.1

# Express middleware for `es-git`

[`express-es-git`](https://github.com/mu-cms/express-es-git/) is a v4 [Express](https://expressjs.com/) [router middleware](http://expressjs.com/en/4x/api.html#router) that allows you to expose an [`es-git`](https://github.com/mariusGundersen/es-git/) repository for read over http(s).

## Installation

Install `express-es-git` with npm

```shell
npm install --save @mu-cms/express-es-git
```

## Usage

```javascript
const git = require('@mu-cms/express-es-git');
const { SPECS, HEAD } = require('@mu-cms/express-es-git/const');

// options is/are optional
const options = {
  specs: [ ref => ({}) ], // SPECS
  head: data => ({})      // HEAD
};
// es-git repository instance
const repo;
// app is an express/router instance
app.use(git(repo, options));
```

A full example can be found in [`mu-express`](https://github.com/mu-cms/mu-express).

## Routes

- `GET` `/:ref\.:ext?`
  Load by object sha1 or ref
- `GET` `/:ref/:path([^$]+)`
  Load by tree sha1 or ref and path
- `POST` `/fetch`
  Fetches refspecs from url

### Examples

- `/testing/package.json`
  Load by tag ref
- `/master/package.json`
  Load by head ref
- `/0e3b9890a6af246cff7db2bd8b68ccfaba5b1c78/package.json`
  Load by tree hash
- `/166db7d969ef2db26bbc62127a276475828384a2.json`
  Load by blob hash (with `.ext` mime type)
- `/166db7d969ef2db26bbc62127a276475828384a2`
  Load by blob hash (with `application/octet-stream` mime type)

```shell
curl -X POST http://127.0.0.1:8080/fetch -d 'url=https://github.com/mu-cms/mu-express.git' -d 'refs=refs/heads/*:refs/remotes/express/*'
```

```shell
curl -X POST http://127.0.0.1:8080/refs -d 'refs=refs/heads/express:refs/remotes/express/master'
```