open-index/open-npm huggingface dataset:
npm package: @micro-web/sub
Description: @micro-web/app 微前端方案应用接入
Author: MinJieLiu
Latest version: 0.2.3

# @micro-web/sub

[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][downloads-url]
[![Minified size][min-size-image]][bundlephobia-url]
[![Gzip size][gzip-size-image]][bundlephobia-url]

`@micro-web/app` 微应用解决方案 **子应用定义**

## 安装

```bash
pnpm i @micro-web/sub
```

## 使用

```tsx
import { defineMicroApp } from '@micro-web/sub';
import App, { AppProps } from './App';

export default defineMicroApp((container) => {
  function render(props: AppProps) {
    ReactDOM.render(<App {...props} />, container);
  }
  return {
    mount: render,
    render: render,
    unmount() {
      ReactDOM.unmountComponentAtNode(container);
    },
  };
});
```

### `defineMicroApp`

需配合插件 ` @micro-web/vite-plugin`。其主要作用将 CSS 通过 `link` 标签插入到主应用的动态节点上。

[npm-image]: https://img.shields.io/npm/v/@micro-web/sub.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-web/sub
[downloads-image]: http://img.shields.io/npm/dm/@micro-web/sub.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/@micro-web/sub
[min-size-image]: https://badgen.net/bundlephobia/min/@micro-web/sub?label=minified
[gzip-size-image]: https://badgen.net/bundlephobia/minzip/@micro-web/sub?label=gzip
[bundlephobia-url]: https://bundlephobia.com/result?p=@micro-web/sub
npm package: @micro-web/vite-plugin
Description: @micro-web/app 微前端方案 Vite 插件
Author: MinJieLiu
Latest version: 0.3.0

# @micro-web/vite-plugin

[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][downloads-url]
[![Minified size][min-size-image]][bundlephobia-url]
[![Gzip size][gzip-size-image]][bundlephobia-url]

`@micro-web/app` 微应用解决方案 **Vite 插件**

## 安装

```bash
pnpm i @micro-web/vite-plugin
```

## 特性

- 创建极小的入口文件 `main.js`，配合 `hash` 和主应用时间戳缓存处理
- 将 `CSS` 动态插入到 `<MicroApp />` 创建的节点上
- 预设微应用所需的 `Vite` 配置
- 修正图片资源使用绝对地址

## 使用

```tsx
import { microWebPlugin } from '@micro-web/vite-plugin';

export default defineConfig({
  plugins: [react(), microWebPlugin()],
});
```

[npm-image]: https://img.shields.io/npm/v/@micro-web/vite-plugin.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-web/vite-plugin
[downloads-image]: http://img.shields.io/npm/dm/@micro-web/vite-plugin.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/@micro-web/vite-plugin
[min-size-image]: https://badgen.net/bundlephobia/min/@micro-web/vite-plugin?label=minified
[gzip-size-image]: https://badgen.net/bundlephobia/minzip/@micro-web/vite-plugin?label=gzip
[bundlephobia-url]: https://bundlephobia.com/result?p=@micro-web/vite-plugin
npm package: @micro-zoe/micro-mcp
Description: MCP server for micro-app integration
Author: Micro-Zoe
Latest version: 0.1.1

# @micro-zoe/micro-mcp

@micro-zoe/micro-mcp 是一个基于 Model Context Protocol (MCP) 的服务器，专为 micro-app 集成而设计。

## 项目描述

这个项目提供了一个 MCP 服务器实现，用于支持 micro-app 的集成和文档抓取功能。它使用 Node.js 实现，旨在提供一个轻量级且功能强大的 MCP 服务器框架。

## 特性

- 支持抓取 Micro-app 相关文档内容
- 提供获取相关链接的功能
- 基于 Model Context Protocol 的服务器实现

## 安装

要安装此包，请运行以下命令：

```
npm install @micro-zoe/micro-mcp
```

## 使用方法

1. 在你的项目中引入 @micro-zoe/micro-mcp：

```javascript
const MicroAppMcpServer = require('@micro-zoe/micro-mcp');
```

2. 创建并启动服务器：

```javascript
const server = new MicroAppMcpServer();
server.run().catch((error) => {
  console.error('严重错误:', error);
  process.exit(1);
});
```

## API

### crawl_micro_app_docs

抓取 Micro-app 相关文档内容。

参数：
- docType: 要抓取的文档类型（'guide'、'frameworks'、'api'、'others'、'all'）

### get_related_links

获取与指定内容相关的链接。

参数：
- content: 要查找相关链接的内容
- maxResults: 最大返回结果数量（默认为 5）

## 开发

如果你想为这个项目做贡献，请按照以下步骤操作：

1. 克隆此仓库到本地机器
2. 进入项目目录
3. 运行以下命令安装依赖：

```
npm install
```

4. 进行你的修改
5. 运行测试（如果有的话）
6. 提交 Pull Request

## 构建

要构建项目，请运行：

```
npm run build
```

## 许可证

本项目采用 MIT 许可证。

## 关键词

mcp, model-context-protocol, micro-app, micro-frontend

## 版本

当前版本：0.1.1
npm package: @micro.app.dev/auth
Description: Authentication module for MicroApp
Author: Your Name
Latest version: 0.1.2

# @micro.app.dev/auth

Authentication module for MicroApp.

## Installation

```bash
npm install @micro.app.dev/auth
# or
yarn add @micro.app.dev/auth
```

## Features

- Login screen
- Registration screen
- Authentication navigation
- Token management
- User data management

## Usage

### Auth Navigator

```jsx
import { AuthNavigator } from '@micro.app.dev/auth';

function App() {
  return (
    <NavigationContainer>
      <AuthNavigator />
    </NavigationContainer>
  );
}
```

### Login Screen

```jsx
import { LoginScreen } from '@micro.app.dev/auth';

function MyLoginScreen() {
  return <LoginScreen />;
}
```

### Register Screen

```jsx
import { RegisterScreen } from '@micro.app.dev/auth';

function MyRegisterScreen() {
  return <RegisterScreen />;
}
```

### Authentication Services

```jsx
import { 
  authStorage 
} from '@micro.app.dev/auth';

// Set authentication data
await authStorage.setToken('your-auth-token');
await authStorage.setUserData({
  id: '1',
  email: 'user@example.com',
  name: 'John Doe'
});

// Get authentication data
const token = await authStorage.getToken();
const userData = await authStorage.getUserData();

// Clear authentication data (logout)
await authStorage.clearAuth();
```

## Dependencies

This package depends on:
- @micro.app.dev/shared
- @react-navigation/native
- @react-navigation/stack
- react
- react-native

## License

MIT
npm package: @micro.app.dev/budget
Description: Budget management module for MicroApp
Author: Your Name
Latest version: 0.1.2

# @micro.app.dev/budget

Budget management module for MicroApp.

## Installation

```bash
npm install @micro.app.dev/budget
# or
yarn add @micro.app.dev/budget
```

## Features

- Budget home screen with summary
- Expense tracking
- Income tracking
- Savings goals
- Budget navigation

## Usage

### Budget Navigator

```jsx
import { BudgetNavigator } from '@micro.app.dev/budget';

function App() {
  return (
    <NavigationContainer>
      <BudgetNavigator />
    </NavigationContainer>
  );
}
```

### Budget Home Screen

```jsx
import { BudgetHomeScreen } from '@micro.app.dev/budget';

function MyBudgetScreen() {
  return <BudgetHomeScreen />;
}
```

### Budget Services

```jsx
import { 
  getBudgetSummary, 
  getExpenses, 
  getIncoming, 
  getSavings,
  addExpense,
  addIncoming,
  addSaving,
  deleteExpense,
  deleteIncoming,
  deleteSaving
} from '@micro.app.dev/budget';

// Get budget data
const summary = await getBudgetSummary();
const expenses = await getExpenses();
const incoming = await getIncoming();
const savings = await getSavings();

// Add new items
await addExpense({ 
  id: '1', 
  title: 'Groceries', 
  amount: 100, 
  category: 'Food',
  date: new Date().toISOString()
});

await addIncoming({ 
  id: '1', 
  title: 'Salary', 
  amount: 3000, 
  source: 'Work',
  date: new Date().toISOString()
});

await addSaving({ 
  id: '1', 
  title: 'Vacation', 
  amount: 500, 
  goal: 'Summer Trip',
  targetDate: '2023-08-01'
});

// Delete items
await deleteExpense('1');
await deleteIncoming('1');
await deleteSaving('1');
```

## Dependencies

This package depends on:
- @micro.app.dev/shared
- @react-navigation/native
- @react-navigation/stack
- react
- react-native

## License

MIT
npm package: @micro.app.dev/profile
Description: User profile management module for MicroApp
Author: Your Name
Latest version: 0.1.2

# @micro.app.dev/profile

User profile management module for MicroApp.

## Installation

```bash
npm install @micro.app.dev/profile
# or
yarn add @micro.app.dev/profile
```

## Features

- User profile screen
- Change email functionality
- Change password functionality
- Theme settings
- Profile navigation

## Usage

### Profile Navigator

```jsx
import { ProfileNavigator } from '@micro.app.dev/profile';

function App() {
  return (
    <NavigationContainer>
      <ProfileNavigator />
    </NavigationContainer>
  );
}
```

### Profile Screen

```jsx
import { ProfileScreen } from '@micro.app.dev/profile';

function MyProfileScreen() {
  return <ProfileScreen />;
}
```

### Change Email Screen

```jsx
import { ChangeEmailScreen } from '@micro.app.dev/profile';

function MyChangeEmailScreen() {
  return <ChangeEmailScreen />;
}
```

### Change Password Screen

```jsx
import { ChangePasswordScreen } from '@micro.app.dev/profile';

function MyChangePasswordScreen() {
  return <ChangePasswordScreen />;
}
```

### Theme Settings Screen

```jsx
import { ThemeSettingsScreen } from '@micro.app.dev/profile';

function MyThemeSettingsScreen() {
  return <ThemeSettingsScreen />;
}
```

## Dependencies

This package depends on:
- @micro.app.dev/shared
- @react-navigation/native
- @react-navigation/stack
- react
- react-native

## License

MIT
npm package: @micro.app.dev/shared
Description: Shared components, contexts, and services for MicroApp
Author: Your Name
Latest version: 0.1.3

# @micro.app.dev/shared

Shared components, contexts, and services for MicroApp.

## Installation

```bash
npm install @micro.app.dev/shared
# or
yarn add @micro.app.dev/shared
```

## Features

- Theme context and provider
- App context for authentication state
- Storage services for todos, budget, and authentication
- Reusable UI components

## Usage

### Theme Provider

```jsx
import { ThemeProvider } from '@micro.app.dev/shared';

function App() {
  return (
    <ThemeProvider>
      {/* Your app content */}
    </ThemeProvider>
  );
}
```

### Using Theme

```jsx
import { useTheme } from '@micro.app.dev/shared';

function MyComponent() {
  const { colors, isDark, toggleTheme } = useTheme();
  
  return (
    <View style={{ backgroundColor: colors.background }}>
      <Text style={{ color: colors.text }}>
        Current theme: {isDark ? 'Dark' : 'Light'}
      </Text>
      <Button title="Toggle Theme" onPress={toggleTheme} />
    </View>
  );
}
```

### App Context

```jsx
import { AppContext, useAppContext } from '@micro.app.dev/shared';

function App() {
  const [isAuthenticated, setIsAuthenticated] = useState(false);
  
  return (
    <AppContext.Provider value={{ isAuthenticated, setIsAuthenticated }}>
      {/* Your app content */}
    </AppContext.Provider>
  );
}

// In a component
function MyComponent() {
  const { isAuthenticated, setIsAuthenticated } = useAppContext();
  
  return (
    <Button 
      title={isAuthenticated ? 'Logout' : 'Login'} 
      onPress={() => setIsAuthenticated(!isAuthenticated)} 
    />
  );
}
```

### Storage Services

```jsx
import { todoStorage, budgetStorage, authStorage } from '@micro.app.dev/shared';

// Todo storage
const todos = await todoStorage.getTodos();
await todoStorage.addTodo({ id: '1', title: 'New Todo', completed: false });

// Budget storage
const expenses = await budgetStorage.getExpenses();
await budgetStorage.addExpense({ id: '1', amount: 100, category: 'Food' });

// Auth storage
await authStorage.setToken('your-auth-token');
const token = await authStorage.getToken();
```

## License

MIT
npm package: @micro.app.dev/todo
Description: Todo management module for MicroApp
Author: Your Name
Latest version: 0.1.2

# @micro.app.dev/todo

Todo management module for MicroApp.

## Installation

```bash
npm install @micro.app.dev/todo
# or
yarn add @micro.app.dev/todo
```

## Features

- Todo list screen
- Add todo functionality
- Todo detail screen
- Mark todos as complete
- Delete todos
- Todo navigation

## Usage

### Todo Navigator

```jsx
import { TodoNavigator } from '@micro.app.dev/todo';

function App() {
  return (
    <NavigationContainer>
      <TodoNavigator />
    </NavigationContainer>
  );
}
```

### Todo List Screen

```jsx
import { TodoListScreen } from '@micro.app.dev/todo';

function MyTodoListScreen() {
  return <TodoListScreen />;
}
```

### Add Todo Screen

```jsx
import { AddTodoScreen } from '@micro.app.dev/todo';

function MyAddTodoScreen() {
  return <AddTodoScreen />;
}
```

### Todo Detail Screen

```jsx
import { TodoDetailScreen } from '@micro.app.dev/todo';

function MyTodoDetailScreen() {
  return <TodoDetailScreen />;
}
```

### Todo Services

```jsx
import { 
  todoStorage 
} from '@micro.app.dev/todo';

// Get todos
const todos = await todoStorage.getTodos();

// Add a new todo
await todoStorage.addTodo({
  id: '1',
  title: 'New Todo',
  description: 'This is a new todo',
  completed: false,
  createdAt: new Date().toISOString()
});

// Update a todo
await todoStorage.updateTodo({
  id: '1',
  title: 'Updated Todo',
  description: 'This todo has been updated',
  completed: true,
  createdAt: new Date().toISOString()
});

// Delete a todo
await todoStorage.deleteTodo('1');
```

## Dependencies

This package depends on:
- @micro.app.dev/shared
- @react-navigation/native
- @react-navigation/stack
- react
- react-native

## License

MIT
npm package: @micro/thunk-to-promise
Description: Convert a thunk to a promise.
Latest version: 0.1.0


# thunk-to-promise

[![Build status][travis-image]][travis-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Convert a thunk to a promise.

## Installation

    $ npm install @micro/thunk-to-promise

## Usage

```js
var thunkToPromise = require('@micro/thunk-to-promise')

```

## Api

### thunkToPromise(arg1, arg2)

- `arg1` -
- `arg2` -

**Returns:**

## License

MIT

[standard-image]:https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]:https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro/thunk-to-promise.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro/thunk-to-promise
[travis-image]: https://img.shields.io/travis/micro-js/thunk-to-promise.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/thunk-to-promise