@feedmepos/mf-common

中文文档
1.29.40发布于 2026/11/05ES Module近 30 天下载 2356

This package provide:

原始使用文档
文档目录12 节
  1. Changelog
  2. Overview
  3. Usage
  4. 1. Register Remy Callback
  5. 2. Automatic Icon Display
  6. 3. Icon Click Behavior
  7. Implementation Details
  8. Desktop (PortalDesktop.vue)
  9. Mobile (PortalMobile.vue)
  10. Tablet (PortalTablet.vue)
  11. Example: Full Integration
  12. Benefits

@feedmepos/mf-common

This package provide:

  • shared portal shell component

  • shared coreStore pinia store

  • other shared utilities, like: i18n, country etc

Changelog

See CHANGELOG.md for details about changes in each version.


Remy Integration Guide

Overview

The common package provides a simplified interface for integrating Remy AI assistant into microfrontends. The responsibility of the common package is only to:

  1. Register a callback when Remy icon is clicked
  2. Show/hide the Remy icon based on callback registration
  3. Trigger the callback when the icon is clicked

Usage

1. Register Remy Callback

In your microfrontend (e.g., mf-menu), register a callback that will be triggered when the Remy icon is clicked:

import { useCoreStore } from '@feedmepos/common'

const coreStore = useCoreStore()

// Register your callback
coreStore.registerOnRemyClicked(() => {
  // Your Remy logic here
  // For example: open Remy dialog, activate Remy session, etc.
  console.log('Remy icon clicked!')
})

2. Automatic Icon Display

When you register the callback:

  • The publicSetting.aiSettings.remy.enable will be automatically set to true
  • The Remy icon will appear on Desktop, Mobile, and Tablet views
  • The icon is a video element showing the Remy animation

3. Icon Click Behavior

When a user clicks the Remy icon:

  • The registered callback will be triggered
  • You control what happens next (open dialog, start session, etc.)

Implementation Details

Desktop (PortalDesktop.vue)

  • Icon appears in the header next to user info
  • Positioned before debug and storefront buttons

Mobile (PortalMobile.vue)

  • Icon appears in the footer navigation
  • Positioned next to the more menu button

Tablet (PortalTablet.vue)

  • Icon appears in the header
  • Similar position to desktop view

Example: Full Integration

// In your microfrontend's main component or setup
import { onMounted } from 'vue'
import { useCoreStore } from '@feedmepos/common'

onMounted(async () => {
  const coreStore = useCoreStore()
})

Benefits

  1. Decoupled: Common package doesn't need to know about Remy implementation details
  2. Flexible: Each microfrontend can implement their own Remy behavior
  3. Simple API: Only one method to register, icon visibility is automatic
  4. Consistent UX: Icon appears in the same place across all views

版本与发布记录

@feedmepos/mf-common 共发布 256 个版本,首次发布于 2023/10/25;过去 12 个月发布了 47 个版本。

版本发布日期距今
1.29.40latest2026/11/059 天前
1.29.392026/10/2619 天前
1.29.382026/10/2322 天前
1.29.372026/10/2124 天前
1.29.362026/10/2025 天前
1.29.36-dev.52026/10/2025 天前

其他发布通道:legacy → 1.5.3-rc.1。

关于 @feedmepos/mf-common 的常见问题

@feedmepos/mf-common 是什么?

This package provide:

如何安装 @feedmepos/mf-common?

在项目目录运行 npm install @feedmepos/mf-common,或使用 pnpm add / yarn add / bun add。

@feedmepos/mf-common 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/feedmepos__mf-common 是否存在。

@feedmepos/mf-common 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@feedmepos/mf-common 可以商用吗?

@feedmepos/mf-common 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@feedmepos/mf-common 的下载量有多少?

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

@feedmepos/mf-common 还在维护吗?

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