diff --git a/docs/developer-guide/plugin/api-reference/ui/_meta.json b/docs/developer-guide/plugin/api-reference/ui/_meta.json index c3bc4804..389e1e0c 100644 --- a/docs/developer-guide/plugin/api-reference/ui/_meta.json +++ b/docs/developer-guide/plugin/api-reference/ui/_meta.json @@ -3,10 +3,16 @@ "api-request", "formkit", "shared", + { + "type": "dir", + "name": "base-components", + "label": "基础组件", + "collapsed": true + }, { "type": "dir", "name": "components", - "label": "组件", + "label": "业务组件", "collapsed": true } ] diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/_meta.json b/docs/developer-guide/plugin/api-reference/ui/base-components/_meta.json new file mode 100644 index 00000000..a90ac8ef --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/_meta.json @@ -0,0 +1,24 @@ +[ + "button", + "space", + "card", + "description", + "header", + "tag", + "status", + "avatar", + "empty", + "loading", + "alert", + "switch", + "tabs", + "menu", + "pagination", + "dropdown", + "modal", + "dialog", + "toast", + "tooltip", + "entity", + "icons" +] diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/alert.md b/docs/developer-guide/plugin/api-reference/ui/base-components/alert.md new file mode 100644 index 00000000..a4e9b903 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/alert.md @@ -0,0 +1,147 @@ +--- +title: VAlert 提示 +description: 使用 VAlert 在 Halo 插件页面中展示成功、信息、警告和错误等提示信息,支持关闭、自定义图标和操作按钮 +--- + +`VAlert` 用于在页面内展示需要用户注意的信息,提供比 Toast 更持久、比 Dialog 更轻量的提示方式。 + +## 引入 + +```ts +import { VAlert } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + +``` + +### 不同类型 + +```vue preview + + + + + + + + + + +``` + +### 带操作按钮 + +```vue preview + + + + + + + 保存 + 放弃 + + + + +``` + +### 不可关闭 + +```vue preview + + + + + +``` + +### 监听关闭事件 + +`VAlert` 不会自行隐藏,需要在 `close` 事件中控制显示状态。 + +```vue preview + + + + + + 重新显示 + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| ------------- | ---------------------------------------------------------- | ----------- | ------------------------ | +| `type` | `"default" \| "success" \| "info" \| "warning" \| "error"` | `"default"` | 提示类型,决定图标和配色 | +| `title` | `string` | `""` | 标题 | +| `description` | `string` | `""` | 描述内容 | +| `closable` | `boolean` | `true` | 是否显示关闭按钮 | + +## Emits + +| 事件 | 参数 | 说明 | +| ------- | ---- | ------------------------------------ | +| `close` | - | 点击关闭按钮时触发,不会自动隐藏提示 | + +## Slots + +| 插槽 | 说明 | +| ------------- | ---------------------------------------- | +| `icon` | 自定义图标,默认根据 `type` 显示对应图标 | +| `title` | 自定义标题 | +| `description` | 自定义描述内容 | +| `actions` | 操作区域,显示在描述下方 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/avatar.md b/docs/developer-guide/plugin/api-reference/ui/base-components/avatar.md new file mode 100644 index 00000000..761ef810 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/avatar.md @@ -0,0 +1,138 @@ +--- +title: VAvatar 头像 +description: 使用 VAvatar 和 VAvatarGroup 在 Halo 插件界面中展示用户或应用头像,支持尺寸、圆形、加载失败占位和头像组 +--- + +头像用于展示用户、应用或站点的图片标识。`VAvatar` 在图片加载失败时会显示 `alt` 的首字母作为占位,`VAvatarGroup` 用于把多个头像组合在一起。 + +## 引入 + +```ts +import { VAvatar, VAvatarGroup } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + +``` + +### 不同尺寸 + +```vue preview + + + + + + + + + + +``` + +### 圆形头像 + +```vue preview + + + + + +``` + +### 无图片或加载失败 + +没有图片地址或图片无法加载时,会显示 `alt` 的首字母;没有 `alt` 时显示警告图标。 + +```vue preview + + + + + + + + +``` + +### 自定义尺寸 + +```vue preview + + + + + +``` + +### 头像组 + +`VAvatarGroup` 会统一应用尺寸和形状,并让相邻头像产生重叠效果。 + +```vue preview + + + + + + + + + +``` + +## VAvatar Props + +| 属性 | 类型 | 默认值 | 说明 | +| -------- | ------------------------------ | ----------- | ------------------------------------------ | +| `src` | `string` | `undefined` | 图片地址 | +| `alt` | `string` | `undefined` | 图片替代文本,加载失败时取其首字母作为占位 | +| `size` | `"lg" \| "md" \| "sm" \| "xs"` | `"md"` | 头像尺寸 | +| `width` | `string` | `undefined` | 自定义宽度,优先级高于 `size` | +| `height` | `string` | `undefined` | 自定义高度,优先级高于 `size` | +| `circle` | `boolean` | `false` | 是否显示为圆形 | + +## VAvatarGroup Props + +| 属性 | 类型 | 默认值 | 说明 | +| -------- | ------------------------------ | ----------- | ----------------------------------------- | +| `size` | `"lg" \| "md" \| "sm" \| "xs"` | `"md"` | 组内头像尺寸,会覆盖 `VAvatar` 的同名属性 | +| `width` | `string` | `undefined` | 组内头像宽度 | +| `height` | `string` | `undefined` | 组内头像高度 | +| `circle` | `boolean` | `false` | 组内头像是否显示为圆形 | + +## Slots + +| 组件 | 插槽 | 说明 | +| -------------- | --------- | -------- | +| `VAvatarGroup` | `default` | 头像内容 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/button.md b/docs/developer-guide/plugin/api-reference/ui/base-components/button.md new file mode 100644 index 00000000..3b63e953 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/button.md @@ -0,0 +1,173 @@ +--- +title: 按钮 +description: 使用 VButton 在 Halo 插件界面中触发操作,支持多种类型、尺寸、加载状态以及路由跳转 +--- + +按钮用于触发一个操作,例如提交表单、打开弹窗或跳转页面。 + +## 引入 + +```ts +import { VButton } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + 按钮 + +``` + +### 不同类型 + +```vue preview + + + + + 默认按钮 + 主要按钮 + 次要按钮 + 危险按钮 + + +``` + +### 不同尺寸 + +```vue preview + + + + + 大号按钮 + 中号按钮 + 小号按钮 + 超小按钮 + + +``` + +### 加载状态 + +```vue preview + + + + + {{ loading ? "处理中" : "点击加载" }} + + +``` + +### 禁用状态 + +```vue preview + + + + + 禁用按钮 + 禁用主要按钮 + 禁用危险按钮 + + +``` + +### 图标按钮 + +```vue preview + + + + + + + + + 新建 + + + + + + + + + + + + + +``` + +### 块级按钮 + +```vue preview + + + + 块级按钮 + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| ---------- | --------------------------------------------------- | ----------- | -------------------------------------------------------- | +| `type` | `"default" \| "primary" \| "secondary" \| "danger"` | `"default"` | 按钮类型 | +| `size` | `"lg" \| "md" \| "sm" \| "xs"` | `"md"` | 按钮尺寸 | +| `circle` | `boolean` | `false` | 是否为圆形图标按钮 | +| `block` | `boolean` | `false` | 是否占满父容器宽度 | +| `disabled` | `boolean` | `false` | 是否禁用 | +| `loading` | `boolean` | `false` | 是否显示加载状态,加载时不可点击 | +| `route` | `RouteLocationRaw` | `undefined` | 点击后跳转的路由,使用 Halo Console 的 `vue-router` 实例 | +| `ghost` | `boolean` | `false` | 是否为幽灵按钮 | + +## Emits + +| 事件 | 参数 | 说明 | +| ------- | ---- | -------------------------------------------------- | +| `click` | - | 点击按钮时触发,`disabled` 或 `loading` 时不会触发 | + +## Slots + +| 插槽 | 说明 | +| --------- | ------------------------ | +| `default` | 按钮内容 | +| `icon` | 按钮图标,显示在内容左侧 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/card.md b/docs/developer-guide/plugin/api-reference/ui/base-components/card.md new file mode 100644 index 00000000..af3624d9 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/card.md @@ -0,0 +1,101 @@ +--- +title: VCard 卡片 +description: 使用 VCard 在 Halo 插件界面中组织内容,支持标题、头部操作、主体和页脚区域 +--- + +`VCard` 是一个带边框和阴影的内容容器,用来把相关的内容和操作组织在一起。 + +## 引入 + +```ts +import { VCard } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + Halo 是一个强大易用的开源建站工具,拥有丰富的可扩展性。 + + +``` + +### 带头部操作 + +```vue preview + + + + + + 新建文章 + + 这里展示文章列表。 + + +``` + +### 带页脚 + +```vue preview + + + + + 修改站点名称和描述。 + + + 保存 + 取消 + + + + +``` + +### 自定义头部 + +```vue preview + + + + + + + 插件设置 + 已启用 + + + 插件设置内容。 + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| ----------- | ---------- | ----------- | ------------------------------- | +| `title` | `string` | `undefined` | 卡片标题 | +| `bodyClass` | `string[]` | `undefined` | 应用到卡片主体区域的 class 列表 | + +## Slots + +| 插槽 | 说明 | +| --------- | ----------------------------------------------- | +| `default` | 卡片主体内容 | +| `header` | 自定义整个头部区域,会覆盖 `title` 和 `actions` | +| `actions` | 头部右侧的操作区域 | +| `footer` | 卡片底部区域,存在时才显示 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/description.md b/docs/developer-guide/plugin/api-reference/ui/base-components/description.md new file mode 100644 index 00000000..8fb320ee --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/description.md @@ -0,0 +1,94 @@ +--- +title: VDescription 描述列表 +description: 使用 VDescription 和 VDescriptionItem 在 Halo 插件界面中以键值对形式展示详情信息 +--- + +描述列表用于以“标签 - 内容”的形式展示对象的详细信息,常用于详情页和侧边信息面板。 + +## 引入 + +```ts +import { VDescription, VDescriptionItem } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + + + + + + + +``` + +### 自定义内容 + +`VDescriptionItem` 的默认插槽优先级高于 `content` 属性,可以在内容中放置标签、链接等富文本。 + +```vue preview + + + + + + + 已启用 + + + + Halo 团队 + + + + + +``` + +### 垂直居中 + +```vue preview + + + + + + + 当内容较长时,标签与内容垂直居中显示。 + + + + +``` + +## VDescription Props + +`VDescription` 没有属性,只提供默认插槽。 + +## VDescriptionItem Props + +| 属性 | 类型 | 默认值 | 说明 | +| ---------------- | --------- | ----------- | ------------------------ | +| `label` | `string` | - | 标签文本,必填 | +| `content` | `string` | `undefined` | 内容文本 | +| `verticalCenter` | `boolean` | `false` | 是否让标签和内容垂直居中 | + +## Slots + +| 组件 | 插槽 | 说明 | +| ------------------ | --------- | ---------------------------- | +| `VDescription` | `default` | 描述项列表 | +| `VDescriptionItem` | `default` | 自定义内容,优先于 `content` | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/dialog.md b/docs/developer-guide/plugin/api-reference/ui/base-components/dialog.md new file mode 100644 index 00000000..65dd8453 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/dialog.md @@ -0,0 +1,162 @@ +--- +title: Dialog 确认对话框 +description: 使用 Dialog 函数或 VDialog 组件在 Halo 插件中展示确认、警告和错误对话框,支持确认与取消回调 +--- + +`Dialog` 用于让用户确认一个操作,例如删除、发布或离开未保存的页面。组件库提供函数式调用和组件式两种用法。 + +## 引入 + +```ts +import { Dialog, VDialog } from "@halo-dev/components"; +``` + +## 函数式调用 + +推荐使用 `Dialog` 函数,它会自动挂载到 `document.body`,不需要在模板中维护显示状态。 + +### 基础用法 + +```vue preview + + + + 打开对话框 + +``` + +### 确认与取消 + +```vue preview + + + + 删除 + +``` + +### 四种类型 + +```vue preview + + + + + 成功 + 信息 + 警告 + 错误 + + +``` + +## 组件式调用 + +需要在自定义位置渲染或精确控制生命周期时,可以使用 `VDialog`。 + +```vue preview + + + + 打开对话框 + + +``` + +## Dialog 配置 + +`Dialog(props)` 以及 `Dialog.info`、`Dialog.success`、`Dialog.warning`、`Dialog.error` 接受以下参数: + +| 属性 | 类型 | 默认值 | 说明 | +| ------------- | --------------------------------------------------- | ----------- | ----------------------------------------------------- | +| `title` | `string` | `"提示"` | 标题 | +| `description` | `string` | `""` | 描述内容 | +| `confirmText` | `string` | `"确定"` | 确认按钮文字 | +| `confirmType` | `"default" \| "primary" \| "secondary" \| "danger"` | `"primary"` | 确认按钮类型 | +| `cancelText` | `string` | `"取消"` | 取消按钮文字 | +| `showCancel` | `boolean` | `true` | 是否显示取消按钮 | +| `uniqueId` | `string` | `undefined` | 唯一标识,用于避免重复弹出 | +| `onConfirm` | `() => void \| Promise` | `undefined` | 点击确认时调用,返回 Promise 时确认按钮会显示加载状态 | +| `onCancel` | `() => void` | `undefined` | 点击取消时调用 | + +## VDialog Props + +| 属性 | 类型 | 默认值 | 说明 | +| ------------- | --------------------------------------------------- | ----------- | -------------------------------- | +| `type` | `"success" \| "info" \| "warning" \| "error"` | `"info"` | 对话框类型 | +| `visible` | `boolean` | `false` | 是否显示,支持 `v-model:visible` | +| `title` | `string` | `"提示"` | 标题 | +| `description` | `string` | `""` | 描述内容 | +| `confirmText` | `string` | `"确定"` | 确认按钮文字 | +| `confirmType` | `"default" \| "primary" \| "secondary" \| "danger"` | `"primary"` | 确认按钮类型 | +| `cancelText` | `string` | `"取消"` | 取消按钮文字 | +| `showCancel` | `boolean` | `true` | 是否显示取消按钮 | +| `uniqueId` | `string` | `undefined` | 唯一标识 | +| `onConfirm` | `() => void \| Promise` | `undefined` | 点击确认时调用 | +| `onCancel` | `() => void` | `undefined` | 点击取消时调用 | + +## Emits + +| 事件 | 参数 | 说明 | +| ---------------- | --------- | ------------------------ | +| `update:visible` | `boolean` | 对话框显示状态变化时触发 | +| `close` | - | 对话框关闭时触发 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/dropdown.md b/docs/developer-guide/plugin/api-reference/ui/base-components/dropdown.md new file mode 100644 index 00000000..730f6ac0 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/dropdown.md @@ -0,0 +1,176 @@ +--- +title: VDropdown 下拉菜单 +description: 使用 VDropdown、VDropdownItem 和 VDropdownDivider 在 Halo 插件界面中构建下拉操作菜单 +--- + +下拉菜单用于收纳一组次要操作,点击触发元素后展开。 + +组件库重新导出了 [floating-vue](https://floating-vue.starpad.dev/guide/component.html) 的 `Dropdown` 组件,并基于它提供了 Halo 风格的菜单项和分割线。 + +## 引入 + +```ts +import { + VDropdown, + VDropdownDivider, + VDropdownItem, +} from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + 更多操作 + + 编辑 + 复制 + 移动 + + + +``` + +### 选中与禁用 + +```vue preview + + + + + 排序方式 + + 最近创建 + 最近更新 + 访问量最多 + + + +``` + +### 分割线与危险操作 + +```vue preview + + + + + 操作 + + 查看详情 + 导出 + + 删除 + + + +``` + +### 带图标 + +```vue preview + + + + + 操作 + + + + + + 保存 + + + + + + 在新窗口打开 + + + + + + 删除 + + + + +``` + +## VDropdown Props + +`VDropdown` 的完整属性请参考 [floating-vue 文档](https://floating-vue.starpad.dev/guide/component.html),常用属性如下: + +| 属性 | 类型 | 默认值 | 说明 | +| ----------- | ---------- | -------------------- | --------------------------------------------- | +| `placement` | `string` | `"bottom"` | 弹出位置,例如 `top`、`bottom-start`、`right` | +| `distance` | `number` | `0` | 弹出层与触发元素的距离 | +| `triggers` | `string[]` | `["hover", "focus"]` | 触发方式,可选 `hover`、`click`、`focus` | +| `shown` | `boolean` | `false` | 是否显示弹出层,支持 `v-model:shown` | +| `disabled` | `boolean` | `false` | 是否禁用 | +| `theme` | `string` | `"dropdown"` | 弹出层主题 | + +## VDropdownItem Props + +| 属性 | 类型 | 默认值 | 说明 | +| ---------- | ----------------------- | ----------- | ---------------- | +| `selected` | `boolean` | `false` | 是否显示选中样式 | +| `disabled` | `boolean` | `false` | 是否禁用 | +| `type` | `"default" \| "danger"` | `"default"` | 菜单项类型 | + +## Emits + +| 组件 | 事件 | 参数 | 说明 | +| --------------- | -------------- | ------------ | --------------------------------------- | +| `VDropdownItem` | `click` | `MouseEvent` | 点击菜单项时触发,`disabled` 时不会触发 | +| `VDropdown` | `show` | - | 弹出层显示时触发 | +| `VDropdown` | `hide` | - | 弹出层隐藏时触发 | +| `VDropdown` | `update:shown` | `boolean` | 弹出层显示状态变化时触发 | + +## Slots + +| 组件 | 插槽 | 说明 | +| --------------- | ------------- | -------------- | +| `VDropdown` | `default` | 触发元素 | +| `VDropdown` | `popper` | 弹出层内容 | +| `VDropdownItem` | `default` | 菜单项内容 | +| `VDropdownItem` | `prefix-icon` | 菜单项左侧图标 | +| `VDropdownItem` | `suffix-icon` | 菜单项右侧图标 | + +## 指令 + +`vClosePopper` 可以在弹出层内的元素上使用,点击后关闭当前弹出层。 + +```vue +点击后关闭 +``` diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/empty.md b/docs/developer-guide/plugin/api-reference/ui/base-components/empty.md new file mode 100644 index 00000000..fadf3f36 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/empty.md @@ -0,0 +1,74 @@ +--- +title: VEmpty 空状态 +description: 使用 VEmpty 在 Halo 插件列表中展示无数据时的占位提示和引导操作 +--- + +当列表或页面没有数据时,使用 `VEmpty` 展示友好的空状态提示,并提供下一步操作。 + +## 引入 + +```ts +import { VEmpty } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + +``` + +### 带操作按钮 + +```vue preview + + + + + + 前往应用市场 + + + +``` + +### 搜索无结果 + +```vue preview + + + + + + 清除筛选 + + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| --------- | -------- | ----------- | -------------------------------- | +| `title` | `string` | `undefined` | 空状态标题 | +| `message` | `string` | `undefined` | 补充说明 | +| `image` | `string` | `undefined` | 自定义图片地址,默认使用内置插图 | + +## Slots + +| 插槽 | 说明 | +| --------- | ------------------------ | +| `image` | 自定义插图 | +| `message` | 自定义补充说明 | +| `actions` | 操作区域,显示在说明下方 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/entity.md b/docs/developer-guide/plugin/api-reference/ui/base-components/entity.md new file mode 100644 index 00000000..55dd74d9 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/entity.md @@ -0,0 +1,165 @@ +--- +title: VEntity 实体 +description: 使用 VEntity、VEntityContainer 和 VEntityField 在 Halo 插件中构建与 Console 一致的列表行 +--- + +`VEntity` 表示列表中的一行数据,通常与 `VEntityContainer` 和 `VEntityField` 一起使用,构成 Halo Console 中常见的列表界面。 + +## 引入 + +```ts +import { VEntity, VEntityContainer, VEntityField } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + + + + + + 已发布 + + + + +``` + +### 选中状态 + +```vue preview + + + + + + + + + + + + + + +``` + +### 行内操作菜单 + +`dropdownItems` 插槽会自动生成右侧的更多操作菜单。 + +```vue preview + + + + + + + + + + + 编辑 + + + 删除 + + + + + +``` + +## VEntity Props + +| 属性 | 类型 | 默认值 | 说明 | +| ------------ | --------- | ------- | ---------------- | +| `isSelected` | `boolean` | `false` | 是否处于选中状态 | + +## VEntityContainer Props + +`VEntityContainer` 没有属性,只提供默认插槽,内部会渲染为表格结构。 + +## VEntityField Props + +| 属性 | 类型 | 默认值 | 说明 | +| ------------- | ------------------ | ----------- | -------------------------- | +| `title` | `string` | `undefined` | 标题 | +| `description` | `string` | `undefined` | 描述文本 | +| `route` | `RouteLocationRaw` | `undefined` | 标题点击后跳转的路由 | +| `width` | `string \| number` | `undefined` | 固定宽度,数字会按像素处理 | +| `maxWidth` | `string \| number` | `undefined` | 最大宽度,数字会按像素处理 | + +## Emits + +| 组件 | 事件 | 参数 | 说明 | +| -------------- | ------- | ---- | -------------- | +| `VEntityField` | `click` | - | 点击标题时触发 | + +## Slots + +| 组件 | 插槽 | 说明 | +| ------------------ | --------------- | -------------------- | +| `VEntity` | `prepend` | 显示在行最左侧的内容 | +| `VEntity` | `checkbox` | 选择框区域 | +| `VEntity` | `start` | 行左侧的主要内容 | +| `VEntity` | `end` | 行右侧的内容 | +| `VEntity` | `dropdownItems` | 更多操作菜单中的内容 | +| `VEntity` | `footer` | 行下方的附加内容 | +| `VEntityContainer` | `default` | 实体行列表 | +| `VEntityField` | `title` | 自定义标题 | +| `VEntityField` | `extra` | 标题旁的附加内容 | +| `VEntityField` | `description` | 自定义描述 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/header.md b/docs/developer-guide/plugin/api-reference/ui/base-components/header.md new file mode 100644 index 00000000..6e0db5de --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/header.md @@ -0,0 +1,72 @@ +--- +title: VPageHeader 页头 +description: 使用 VPageHeader 在 Halo 插件页面顶部展示标题、图标和操作按钮 +--- + +`VPageHeader` 用于页面顶部,展示页面标题、图标和操作区域,通常作为插件独立页面的第一个元素。 + +## 引入 + +```ts +import { VPageHeader } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + +``` + +### 带图标和操作 + +```vue preview + + + + + + + + + + 导入 + + + + + 新建文章 + + + + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| ------- | -------- | ----------- | -------- | +| `title` | `string` | `undefined` | 页面标题 | + +## Slots + +| 插槽 | 说明 | +| --------- | ------------ | +| `icon` | 标题前的图标 | +| `actions` | 右侧操作区域 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/icons.md b/docs/developer-guide/plugin/api-reference/ui/base-components/icons.md new file mode 100644 index 00000000..b1088b7e --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/icons.md @@ -0,0 +1,167 @@ +--- +title: 图标 Icons +description: 使用 @halo-dev/components 内置的图标组件在 Halo 插件界面中展示图标,包含完整图标清单 +--- + +基础组件库内置了一组基于 [Remix Icon](https://remixicon.com/) 的图标组件,可以直接引入使用。图标会继承当前文字颜色和字体大小。 + +## 引入 + +```ts +import { IconAddCircle, IconDeleteBin } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + + + + + +``` + +### 在按钮中使用 + +```vue preview + + + + + + + + 新建 + + +``` + +### 通过组件动态渲染 + +```vue preview + + + + + + + {{ icon.name }} + + + +``` + +## 图标清单 + +| 组件 | 对应的 Remix Icon | +| --------------------------- | ------------------------------- | +| `IconAccountCircleLine` | `ri/account-circle-line` | +| `IconAddCircle` | `ri/add-circle-line` | +| `IconArrowDownCircleLine` | `ri/arrow-down-circle-line` | +| `IconArrowDown` | `ri/arrow-down-s-fill` | +| `IconArrowDownLine` | `ri/arrow-down-s-line` | +| `IconArrowLeftRightLine` | `ri/arrow-left-right-line` | +| `IconArrowLeft` | `ri/arrow-left-s-line` | +| `IconArrowRight` | `ri/arrow-right-s-line` | +| `IconArrowUpCircleLine` | `ri/arrow-up-circle-line` | +| `IconArrowUpDownLine` | `ri/arrow-up-down-line` | +| `IconArrowUpLine` | `ri/arrow-up-s-line` | +| `IconBookRead` | `ri/book-read-line` | +| `IconCalendar` | `ri/calendar-line` | +| `IconCharacterRecognition` | `ri/character-recognition-line` | +| `IconCheckboxFill` | `ri/checkbox-circle-fill` | +| `IconCheckboxCircle` | `ri/checkbox-circle-line` | +| `IconClipboardLine` | `ri/clipboard-line` | +| `IconCloseCircle` | `ri/close-circle-line` | +| `IconClose` | `ri/close-line` | +| `IconCodeBoxLine` | `ri/code-box-line` | +| `IconComputer` | `ri/computer-line` | +| `IconDashboard` | `ri/dashboard-3-line` | +| `IconDatabase2Line` | `ri/database-2-line` | +| `IconDeleteBin` | `ri/delete-bin-2-line` | +| `IconMotionLine` | `ri/emotion-line` | +| `IconErrorWarning` | `ri/error-warning-line` | +| `IconExchange` | `ri/exchange-line` | +| `IconExternalLinkLine` | `ri/external-link-line` | +| `IconEye` | `ri/eye-line` | +| `IconEyeOff` | `ri/eye-off-line` | +| `IconFolder` | `ri/folder-2-line` | +| `IconForbidLine` | `ri/forbid-line` | +| `IconGitBranch` | `ri/git-branch-line` | +| `IconGitHub` | `ri/github-fill` | +| `IconGrid` | `ri/grid-line` | +| `IconHistoryLine` | `ri/history-line` | +| `IconImageAddLine` | `ri/image-add-line` | +| `IconInformation` | `ri/information-line` | +| `IconLink` | `ri/link` | +| `IconListSettings` | `ri/list-settings-line` | +| `IconList` | `ri/list-unordered` | +| `IconLockPasswordLine` | `ri/lock-password-line` | +| `IconLogoutCircleRLine` | `ri/logout-circle-r-line` | +| `IconMagic` | `ri/magic-line` | +| `IconMessage` | `ri/message-3-line` | +| `IconMore` | `ri/more-line` | +| `IconNotificationBadgeLine` | `ri/notification-badge-line` | +| `IconPages` | `ri/pages-line` | +| `IconPalette` | `ri/palette-line` | +| `IconRiPencilFill` | `ri/pencil-fill` | +| `IconPlug` | `ri/plug-2-line` | +| `IconRefreshLine` | `ri/refresh-line` | +| `IconReplyLine` | `ri/reply-line` | +| `IconRocketLine` | `ri/rocket-line` | +| `IconSave` | `ri/save-line` | +| `IconSearch` | `ri/search-2-line` | +| `IconSendPlaneFill` | `ri/send-plane-fill` | +| `IconServerLine` | `ri/server-line` | +| `IconSettings3Line` | `ri/settings-3-line` | +| `IconSettings` | `ri/settings-4-line` | +| `IconShieldUser` | `ri/shield-user-line` | +| `IconPhone` | `ri/smartphone-line` | +| `IconStopCircle` | `ri/stop-circle-line` | +| `IconTablet` | `ri/tablet-line` | +| `IconTeam` | `ri/team-fill` | +| `IconTerminalBoxLine` | `ri/terminal-box-line` | +| `IconThumbUpLine` | `ri/thumb-up-line` | +| `IconTimerLine` | `ri/timer-line` | +| `IconToolsFill` | `ri/tools-fill` | +| `IconRiUpload2Fill` | `ri/upload-2-fill` | +| `IconUpload` | `ri/upload-cloud-2-line` | +| `IconUserFollow` | `ri/user-follow-line` | +| `IconUserLine` | `ri/user-line` | +| `IconUserSettings` | `ri/user-settings-line` | +| `IconWindowLine` | `ri/window-line` | +| `IconZoomInLine` | `ri/zoom-in-line` | +| `IconZoomOutLine` | `ri/zoom-out-line` | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/index.md b/docs/developer-guide/plugin/api-reference/ui/base-components/index.md new file mode 100644 index 00000000..7cee8899 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/index.md @@ -0,0 +1,87 @@ +--- +title: 基础组件 +description: 使用 Halo 官方基础组件库 @halo-dev/components 构建与 Console 视觉一致的插件管理界面,包含组件清单、安装方式和在线示例 +overview: true +--- + +`@halo-dev/components` 是 Halo 官方维护的基础组件库,Halo Console 和用户中心的界面均由这套组件构建。在插件中使用它可以获得与 Halo 一致的外观、交互和暗色模式适配。 + +本文档基于 `@halo-dev/components` 2.27.0。 + +## 安装 + +```bash +pnpm install @halo-dev/components +``` + +在 Vue 组件中按需引入: + +```vue + + + + Hello + +``` + +:::tip +插件运行在 Halo Console 中时,组件库的样式已由 Console 统一加载,无需额外引入。如果需要在独立的 Vue 应用中预览或调试组件,可以手动引入: + +```ts +import "@halo-dev/components/dist/style.css"; +``` + +::: + +## 组件列表 + +### 通用 + +| 组件 | 说明 | +| ----------------------------------------- | ---------------------------------- | +| [按钮 VButton](./button.md) | 触发操作,支持类型、尺寸、加载状态 | +| [间距 VSpace](./space.md) | 控制子元素之间的间距 | +| [卡片 VCard](./card.md) | 带标题、操作和页脚的内容容器 | +| [描述列表 VDescription](./description.md) | 以键值对形式展示详情 | +| [页头 VPageHeader](./header.md) | 页面标题与操作区域 | +| [标签 VTag](./tag.md) | 状态或分类标记 | +| [状态点 VStatusDot](./status.md) | 表示运行状态的小圆点 | +| [头像 VAvatar](./avatar.md) | 用户或应用头像,支持头像组 | +| [空状态 VEmpty](./empty.md) | 无数据时的占位提示 | +| [加载中 VLoading](./loading.md) | 加载动画 | +| [提示 VAlert](./alert.md) | 页面内提示信息 | +| [开关 VSwitch](./switch.md) | 开关选择器 | + +### 导航与布局 + +| 组件 | 说明 | +| ----------------------------------- | ---------------------- | +| [选项卡 VTabs](./tabs.md) | 在同一区域切换不同内容 | +| [菜单 VMenu](./menu.md) | 多级垂直菜单 | +| [分页 VPagination](./pagination.md) | 列表分页与每页条数选择 | +| [下拉菜单 VDropdown](./dropdown.md) | 悬浮展开的操作菜单 | + +### 反馈 + +| 组件 | 说明 | +| -------------------------------- | -------------------------------- | +| [弹窗 VModal](./modal.md) | 模态对话框 | +| [确认对话框 Dialog](./dialog.md) | 函数式调用的确认对话框 | +| [轻提示 Toast](./toast.md) | 页面顶部的临时消息 | +| [文字提示 Tooltip](./tooltip.md) | 悬停提示,支持指令与组件两种用法 | + +### 数据展示 + +| 组件 | 说明 | +| --------------------------- | ---------------- | +| [实体 VEntity](./entity.md) | 列表中的一行数据 | + +### 其他 + +| 组件 | 说明 | +| ------------------------ | ------------------- | +| [图标 Icons](./icons.md) | Halo 内置的图标组件 | + +业务组件(如 `UppyUpload`、`SearchInput` 等)已在 Console 中全局注册,可直接使用,文档请参阅[业务组件](../components/index.md)。 diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/loading.md b/docs/developer-guide/plugin/api-reference/ui/base-components/loading.md new file mode 100644 index 00000000..5e8ad381 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/loading.md @@ -0,0 +1,42 @@ +--- +title: VLoading 加载中 +description: 使用 VLoading 在 Halo 插件中展示加载动画,提示内容正在加载 +--- + +`VLoading` 显示一个居中的加载动画,用于数据加载中的占位。 + +## 引入 + +```ts +import { VLoading } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + +``` + +### 在容器中使用 + +```vue preview + + + + + + + +``` + +`VLoading` 没有属性、事件和插槽,大小由所在容器决定。 diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/menu.md b/docs/developer-guide/plugin/api-reference/ui/base-components/menu.md new file mode 100644 index 00000000..bd347c35 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/menu.md @@ -0,0 +1,149 @@ +--- +title: VMenu 菜单 +description: 使用 VMenu、VMenuItem 和 VMenuLabel 在 Halo 插件中构建多级垂直导航菜单 +--- + +`VMenu` 用于构建垂直导航菜单,支持多级子菜单、图标和选中状态。 + +## 引入 + +```ts +import { VMenu, VMenuItem, VMenuLabel } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + + + + + +``` + +### 带图标 + +```vue preview + + + + + + + + + + + + + + + + + + + + + +``` + +### 多级菜单 + +默认插槽中的 `VMenuItem` 会作为子菜单渲染。 + +```vue preview + + + + + + + + + + + + +``` + +### 分组标签 + +```vue preview + + + + + 内容 + + + 系统 + + + +``` + +## VMenu Props + +| 属性 | 类型 | 默认值 | 说明 | +| --------- | ---------- | ----------- | ------------------------ | +| `openIds` | `string[]` | `undefined` | 默认展开的菜单项 ID 列表 | + +## VMenuItem Props + +| 属性 | 类型 | 默认值 | 说明 | +| -------- | --------- | ------- | -------------- | +| `id` | `string` | `""` | 菜单项唯一标识 | +| `title` | `string` | `""` | 菜单项文字 | +| `active` | `boolean` | `false` | 是否为选中状态 | + +## Emits + +| 事件 | 参数 | 说明 | +| -------- | -------- | ----------------------------------- | +| `select` | `string` | 点击菜单项时触发,参数为菜单项 `id` | + +## Slots + +| 组件 | 插槽 | 说明 | +| ------------ | --------- | ------------ | +| `VMenuItem` | `default` | 子菜单项 | +| `VMenuItem` | `icon` | 菜单项图标 | +| `VMenuLabel` | `default` | 分组标签内容 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/modal.md b/docs/developer-guide/plugin/api-reference/ui/base-components/modal.md new file mode 100644 index 00000000..a29e9b8c --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/modal.md @@ -0,0 +1,125 @@ +--- +title: VModal 弹窗 +description: 使用 VModal 在 Halo 插件中展示模态对话框,支持标题、页脚、全屏、居中以及点击遮罩关闭 +--- + +`VModal` 是一个模态对话框容器,可以承载表单、详情或确认内容。需要在插件中展示复杂内容时使用它。 + +## 引入 + +```ts +import { VModal } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + 打开弹窗 + + 这里是弹窗内容。 + +``` + +### 带页脚操作 + +```vue preview + + + + 打开弹窗 + + + 文章发布后将对所有访客可见。 + + + 确认发布 + 取消 + + + + +``` + +### 点击遮罩关闭 + +```vue preview + + + + 打开弹窗 + + + 也可以按 Esc 关闭。 + + +``` + +### 全屏 + +```vue preview + + + + 全屏打开 + + + 全屏弹窗适合放置代码编辑器或复杂表单。 + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| --------------- | ---------- | ----------- | -------------------------------- | +| `visible` | `boolean` | `undefined` | 是否显示,支持 `v-model:visible` | +| `title` | `string` | `undefined` | 标题 | +| `width` | `number` | `500` | 最大宽度,单位像素 | +| `height` | `string` | `undefined` | 内容高度 | +| `fullscreen` | `boolean` | `false` | 是否全屏显示 | +| `bodyClass` | `string[]` | `undefined` | 应用到内容区域的 class 列表 | +| `mountToBody` | `boolean` | `false` | 是否通过 Teleport 挂载到 `body` | +| `centered` | `boolean` | `true` | 是否在视口中垂直居中 | +| `layerClosable` | `boolean` | `false` | 是否允许点击遮罩关闭 | + +## Emits + +| 事件 | 参数 | 说明 | +| ---------------- | --------- | ------------------ | +| `update:visible` | `boolean` | 显示状态变化时触发 | +| `close` | - | 关闭时触发 | + +## Slots + +| 插槽 | 说明 | +| --------- | -------------------------------- | +| `default` | 弹窗内容 | +| `header` | 自定义整个头部区域 | +| `center` | 头部中间区域 | +| `actions` | 头部右侧操作区域(关闭按钮之前) | +| `footer` | 底部操作区域 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/pagination.md b/docs/developer-guide/plugin/api-reference/ui/base-components/pagination.md new file mode 100644 index 00000000..63a90d78 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/pagination.md @@ -0,0 +1,112 @@ +--- +title: VPagination 分页 +description: 使用 VPagination 在 Halo 插件列表中实现分页、每页条数切换和总数展示 +--- + +`VPagination` 用于列表底部的分页控制,支持页码切换、每页条数选择和总条数展示。 + +## 引入 + +```ts +import { VPagination } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + +``` + +### 监听分页变化 + +```vue preview + + + + + + + 当前第 {{ current.page }} 页,每页 {{ current.size }} 条 + + + +``` + +### 自定义文案 + +```vue preview + + + + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| ------------- | ---------- | ----------- | --------------------------------------- | +| `page` | `number` | `1` | 当前页码,支持 `v-model:page` | +| `size` | `number` | `10` | 每页条数,支持 `v-model:size` | +| `total` | `number` | `0` | 数据总条数 | +| `sizeOptions` | `number[]` | `[10]` | 每页条数选项 | +| `showTotal` | `boolean` | `true` | 是否显示总条数 | +| `pageLabel` | `string` | `"页"` | 页码选择框后的文字 | +| `sizeLabel` | `string` | `"条 / 页"` | 每页条数选择框后的文字 | +| `totalLabel` | `string` | `undefined` | 自定义总条数文字,默认显示“共 N 项数据” | + +## Emits + +| 事件 | 参数 | 说明 | +| ------------- | -------------------------------- | -------------------------------------- | +| `update:page` | `number` | 页码变化时触发 | +| `update:size` | `number` | 每页条数变化时触发,页码会同时重置为 1 | +| `change` | `{ page: number; size: number }` | 页码或每页条数变化时触发 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/space.md b/docs/developer-guide/plugin/api-reference/ui/base-components/space.md new file mode 100644 index 00000000..7e0447a9 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/space.md @@ -0,0 +1,104 @@ +--- +title: VSpace 间距 +description: 使用 VSpace 在 Halo 插件中控制一组元素之间的间距和排列方向 +--- + +`VSpace` 用于给一组元素设置统一的间距,避免手动添加 margin。 + +## 引入 + +```ts +import { VSpace } from "@halo-dev/components"; +``` + +## 示例 + +### 水平排列 + +```vue preview + + + + + 按钮 + 按钮 + 按钮 + + +``` + +### 垂直排列 + +```vue preview + + + + + 第一个按钮 + 第二个按钮 + 第三个按钮 + + +``` + +### 不同间距 + +```vue preview + + + + + + xs + xs + + + sm + sm + + + md + md + + + lg + lg + + + +``` + +### 对齐方式 + +```vue preview + + + + + 大按钮 + 小按钮 + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| ----------- | ------------------------------------------- | ---------- | ---------------------------------- | +| `spacing` | `"xs" \| "sm" \| "md" \| "lg"` | `"xs"` | 元素间距,对应 10、12、16、20 像素 | +| `direction` | `"row" \| "column"` | `"row"` | 排列方向 | +| `align` | `"start" \| "end" \| "center" \| "stretch"` | `"center"` | 交叉轴对齐方式 | + +## Slots + +| 插槽 | 说明 | +| --------- | ------------------ | +| `default` | 需要设置间距的元素 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/status.md b/docs/developer-guide/plugin/api-reference/ui/base-components/status.md new file mode 100644 index 00000000..2145b2e6 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/status.md @@ -0,0 +1,73 @@ +--- +title: VStatusDot 状态点 +description: 使用 VStatusDot 在 Halo 插件中展示运行状态,支持不同颜色、文字说明和动画效果 +--- + +`VStatusDot` 用一个小圆点表示状态,常用于展示插件、服务器或任务的运行情况。 + +## 引入 + +```ts +import { VStatusDot } from "@halo-dev/components"; +``` + +## 示例 + +### 不同状态 + +```vue preview + + + + + + + + + + +``` + +### 动画效果 + +```vue preview + + + + + +``` + +### 自定义文字 + +```vue preview + + + + + + 磁盘空间不足 + + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| --------- | ------------------------------------------------ | ----------- | ---------------- | +| `state` | `"default" \| "success" \| "warning" \| "error"` | `"success"` | 状态类型 | +| `animate` | `boolean` | `false` | 是否显示呼吸动画 | +| `text` | `string` | `undefined` | 状态文字 | + +## Slots + +| 插槽 | 说明 | +| ------ | -------------- | +| `text` | 自定义状态文字 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/switch.md b/docs/developer-guide/plugin/api-reference/ui/base-components/switch.md new file mode 100644 index 00000000..dce27f68 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/switch.md @@ -0,0 +1,101 @@ +--- +title: VSwitch 开关 +description: 使用 VSwitch 在 Halo 插件中实现布尔值切换,支持禁用和加载状态 +--- + +`VSwitch` 用于在两个互斥状态之间切换,例如开启/关闭某个功能。 + +## 引入 + +```ts +import { VSwitch } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + + + {{ enabled ? "已开启" : "已关闭" }} + + + +``` + +### 禁用状态 + +```vue preview + + + + + + + + +``` + +### 加载状态 + +```vue preview + + + + + +``` + +### 监听变化 + +```vue preview + + + + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| ------------ | --------- | ------- | -------------------------------- | +| `modelValue` | `boolean` | `false` | 是否开启,支持 `v-model` | +| `disabled` | `boolean` | `false` | 是否禁用 | +| `loading` | `boolean` | `false` | 是否显示加载状态,加载时不可操作 | + +## Emits + +| 事件 | 参数 | 说明 | +| ------------------- | --------- | ------------------ | +| `update:modelValue` | `boolean` | 开关状态变化时触发 | +| `change` | `boolean` | 开关状态变化时触发 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/tabs.md b/docs/developer-guide/plugin/api-reference/ui/base-components/tabs.md new file mode 100644 index 00000000..876d295c --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/tabs.md @@ -0,0 +1,140 @@ +--- +title: VTabs 选项卡 +description: 使用 VTabs、VTabItem 和 VTabbar 在 Halo 插件中切换不同内容区域,支持多种样式和排列方向 +--- + +选项卡用于在同一区域切换不同的内容。`VTabs` 组合 `VTabItem` 使用,`VTabbar` 则适合只需要标签栏的场景。 + +## 引入 + +```ts +import { VTabs, VTabItem, VTabbar } from "@halo-dev/components"; +``` + +## 示例 + +### 基础用法 + +```vue preview + + + + + + 在这里配置站点的基本信息。 + + 在这里配置搜索引擎优化选项。 + + 高级设置仅供有经验的用户使用。 + + + +``` + +### 不同样式 + +```vue preview + + + + + 文章列表 + 页面列表 + 评论列表 + + +``` + +### 垂直排列 + +```vue preview + + + + + 个人资料内容 + 安全设置内容 + 通知设置内容 + + +``` + +### 仅使用标签栏 + +```vue preview + + + + + +``` + +## VTabs Props + +| 属性 | 类型 | 默认值 | 说明 | +| ----------- | ----------------------------------- | ----------- | ------------------------------------------- | +| `activeId` | `number \| string` | `undefined` | 当前选中的标签 ID,支持 `v-model:active-id` | +| `type` | `"default" \| "pills" \| "outline"` | `"default"` | 标签栏样式 | +| `direction` | `"row" \| "column"` | `"row"` | 标签栏排列方向 | +| `idKey` | `string` | `"id"` | 从 `VTabItem` 中读取 ID 的属性名 | +| `labelKey` | `string` | `"label"` | 从 `VTabItem` 中读取标签文字的属性名 | + +## VTabItem Props + +| 属性 | 类型 | 默认值 | 说明 | +| ------- | -------- | ----------- | -------- | +| `id` | `string` | `undefined` | 标签 ID | +| `label` | `string` | `undefined` | 标签文字 | + +## VTabbar Props + +| 属性 | 类型 | 默认值 | 说明 | +| ----------- | ----------------------------------- | ----------- | ------------------------------------------- | +| `activeId` | `number \| string` | `undefined` | 当前选中的标签 ID,支持 `v-model:active-id` | +| `items` | `Array>` | `undefined` | 标签数据,每项至少包含 `id` 和 `label` | +| `type` | `"default" \| "pills" \| "outline"` | `"default"` | 标签栏样式 | +| `direction` | `"row" \| "column"` | `"row"` | 标签栏排列方向 | +| `idKey` | `string` | `"id"` | 读取 ID 的属性名 | +| `labelKey` | `string` | `"label"` | 读取标签文字的属性名 | + +## Emits + +| 组件 | 事件 | 参数 | 说明 | +| --------- | ----------------- | ------------------ | -------------------- | +| `VTabs` | `update:activeId` | `number \| string` | 选中的标签变化时触发 | +| `VTabs` | `change` | `number \| string` | 选中的标签变化时触发 | +| `VTabbar` | `update:activeId` | `number \| string` | 选中的标签变化时触发 | +| `VTabbar` | `change` | `number \| string` | 选中的标签变化时触发 | + +## Slots + +| 组件 | 插槽 | 说明 | +| ---------- | --------- | --------------- | +| `VTabs` | `default` | `VTabItem` 列表 | +| `VTabItem` | `default` | 标签内容 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/tag.md b/docs/developer-guide/plugin/api-reference/ui/base-components/tag.md new file mode 100644 index 00000000..37b96e93 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/tag.md @@ -0,0 +1,101 @@ +--- +title: VTag 标签 +description: 使用 VTag 在 Halo 插件中展示分类、状态等标记,支持不同主题、圆角和图标 +--- + +`VTag` 用于展示分类、状态或属性标记。 + +## 引入 + +```ts +import { VTag } from "@halo-dev/components"; +``` + +## 示例 + +### 不同主题 + +```vue preview + + + + + 默认 + 主要 + 次要 + 危险 + + +``` + +### 圆角标签 + +```vue preview + + + + + 已发布 + 草稿 + + +``` + +### 带图标 + +```vue preview + + + + + + + + + 已发布 + + + + + + 定时发布 + + + +``` + +### 自定义样式 + +```vue preview + + + + + 自定义颜色 + + +``` + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| --------- | --------------------------------------------------- | ----------- | ------------------ | +| `theme` | `"default" \| "primary" \| "secondary" \| "danger"` | `"default"` | 标签主题 | +| `rounded` | `boolean` | `false` | 是否显示为圆角标签 | +| `styles` | `CSSProperties` | `{}` | 自定义样式 | + +## Slots + +| 插槽 | 说明 | +| ----------- | -------- | +| `default` | 标签内容 | +| `leftIcon` | 左侧图标 | +| `rightIcon` | 右侧图标 | diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/toast.md b/docs/developer-guide/plugin/api-reference/ui/base-components/toast.md new file mode 100644 index 00000000..bf8221e0 --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/toast.md @@ -0,0 +1,106 @@ +--- +title: Toast 轻提示 +description: 使用 Toast 在 Halo 插件中展示自动消失的轻量提示消息,支持成功、信息、警告和错误类型 +--- + +`Toast` 用于展示短暂的操作结果提示,会自动消失,不需要用户确认。它通过函数调用,不需要在模板中声明组件。 + +## 引入 + +```ts +import { Toast } from "@halo-dev/components"; +``` + +## 示例 + +### 不同类型 + +```vue preview + + + + + 成功 + 信息 + 警告 + 错误 + + +``` + +### 自定义关闭行为 + +```vue preview + + + + 显示提示 + +``` + +### 不自动消失 + +将 `duration` 设为负数,提示会一直显示,直到用户手动关闭。 + +```vue preview + + + + 显示常驻提示 + +``` + +## Toast 函数 + +| 方法 | 参数 | 说明 | +| -------------------------------- | ------------------------- | -------------- | +| `Toast(options)` | `ToastProps` | 按配置显示提示 | +| `Toast.success(content, props?)` | `string`, `ToastApiProps` | 显示成功提示 | +| `Toast.info(content, props?)` | `string`, `ToastApiProps` | 显示信息提示 | +| `Toast.warning(content, props?)` | `string`, `ToastApiProps` | 显示警告提示 | +| `Toast.error(content, props?)` | `string`, `ToastApiProps` | 显示错误提示 | + +## Props + +| 属性 | 类型 | 默认值 | 说明 | +| --------------- | --------------------------------------------- | ----------- | -------------------------------------- | +| `type` | `"success" \| "info" \| "warning" \| "error"` | `"success"` | 提示类型 | +| `content` | `string` | `""` | 提示内容 | +| `duration` | `number` | `3000` | 显示时长(毫秒),设为负数时不自动关闭 | +| `closable` | `boolean` | `true` | 是否显示关闭按钮 | +| `frozenOnHover` | `boolean` | `true` | 鼠标悬停时是否暂停倒计时 | +| `onClose` | `() => void` | `undefined` | 关闭时调用 | + +## 返回值 + +`Toast` 函数返回一个实例对象: + +| 属性 | 类型 | 说明 | +| ------- | ------------ | -------------- | +| `id` | `string` | 实例 ID | +| `vnode` | `VNode` | 组件 VNode | +| `close` | `() => void` | 手动关闭该提示 | + +:::tip +连续显示内容相同、类型相同的提示时,会合并为一个提示并显示出现次数。 +::: diff --git a/docs/developer-guide/plugin/api-reference/ui/base-components/tooltip.md b/docs/developer-guide/plugin/api-reference/ui/base-components/tooltip.md new file mode 100644 index 00000000..b1f18e3a --- /dev/null +++ b/docs/developer-guide/plugin/api-reference/ui/base-components/tooltip.md @@ -0,0 +1,99 @@ +--- +title: Tooltip 文字提示 +description: 使用 v-tooltip 指令或 VTooltipComponent 在 Halo 插件中为元素添加悬停提示 +--- + +文字提示用于在用户悬停或聚焦元素时,展示简短的说明文字。组件库重新导出了 [floating-vue](https://floating-vue.starpad.dev/) 的 Tooltip 组件和指令。 + +## 引入 + +```ts +import { VTooltipComponent, vTooltip } from "@halo-dev/components"; +``` + +## 示例 + +### 使用指令 + +```vue preview + + + + + + + + + +``` + +### 使用组件 + +```vue preview + + + + + 悬停查看提示 + 这是一个文字提示 + + +``` + +### 不同位置 + +```vue preview + + + + + + 上方 + 上方提示 + + + 下方 + 下方提示 + + + 左侧 + 左侧提示 + + + 右侧 + 右侧提示 + + + +``` + +## VTooltipComponent Props + +`VTooltipComponent` 是 floating-vue 的 `Tooltip` 组件,完整属性请参考 [floating-vue 文档](https://floating-vue.starpad.dev/guide/tooltip.html)。常用属性如下: + +| 属性 | 类型 | 默认值 | 说明 | +| ----------- | ---------- | -------------------- | ----------------------------------------------- | +| `placement` | `string` | `"top"` | 提示位置,例如 `top`、`bottom`、`left`、`right` | +| `triggers` | `string[]` | `["hover", "focus"]` | 触发方式 | +| `distance` | `number` | `0` | 提示与元素的间距 | +| `disabled` | `boolean` | `false` | 是否禁用提示 | +| `shown` | `boolean` | `false` | 是否显示提示,支持 `v-model:shown` | + +## 指令 + +| 指令 | 示例 | 说明 | +| ----------- | ------------------------ | -------------------- | +| `v-tooltip` | `v-tooltip="'提示内容'"` | 在元素上添加文字提示 | + +## Slots + +| 插槽 | 说明 | +| --------- | -------------- | +| `default` | 触发提示的元素 | +| `popper` | 提示内容 | diff --git a/docs/developer-guide/plugin/api-reference/ui/components/index.md b/docs/developer-guide/plugin/api-reference/ui/components/index.md index fb453250..efc76575 100644 --- a/docs/developer-guide/plugin/api-reference/ui/components/index.md +++ b/docs/developer-guide/plugin/api-reference/ui/components/index.md @@ -1,37 +1,9 @@ --- -title: 组件 -description: 在 Halo 插件 UI 中安装并使用基础组件库,以及直接调用 Console 和 UC 全局注册的业务组件与指令来扩展管理界面功能 +title: 业务组件 +description: 直接调用 Halo Console 和用户中心全局注册的业务组件与指令来扩展管理界面功能 overview: true --- -此文档将介绍所有在插件中可用的组件,以及它们的使用方法和区别。 - -## 基础组件库 - -我们为 Halo 的前端封装了一个基础组件的库,你可以在插件中使用这些组件。 - -安装方式: - -```bash -pnpm install @halo-dev/components -``` - -在 Vue 组件中: - -```vue - - - - Hello - -``` - -所有可用的基础组件以及文档可查阅:[https://halo-ui-components.halo-run.workers.dev](https://halo-ui-components.halo-run.workers.dev) - -## 业务组件和指令 - -除了基础组件库,我们还为 Halo 的前端封装了一些业务组件和指令,这些组件已经在全局注册,你可以直接在插件中使用这些组件和指令。 +除了[基础组件库](../base-components/index.md),Halo 还封装了一些与具体业务相关的组件和指令。这些组件已经在 Console 中全局注册,你可以在插件中直接使用,无需额外安装或引入。 以下是所有可用的业务组件和指令: diff --git a/package.json b/package.json index 7a1763eb..acaa3b0b 100644 --- a/package.json +++ b/package.json @@ -17,20 +17,26 @@ "rspress-plugin-mermaid": "^1.0.3" }, "devDependencies": { + "@halo-dev/components": "2.27.0", "@iconify-json/mingcute": "^1.2.8", "@iconify-json/ph": "^1.2.2", "@iconify-json/simple-icons": "^1.2.99", "@rsbuild/plugin-sass": "^2.0.1", + "@rsbuild/plugin-vue": "^2.0.1", + "@rspress/plugin-preview": "2.1.3", "@svgr/core": "^8.1.0", "@svgr/plugin-jsx": "^8.1.0", "@types/node": "^22.20.1", "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", + "@vueuse/core": "^14.4.0", "react": "^19.3.0", "react-dom": "^19.3.0", "rstack": "^0.8.0", "typescript": "^6.0.3", - "unplugin-icons": "^24.0.0" + "unplugin-icons": "^24.0.0", + "vue": "^3.5.45", + "vue-router": "5.1.0" }, "devEngines": { "packageManager": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 78fe9d10..37d0a009 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -179,6 +179,9 @@ importers: specifier: ^1.0.3 version: 1.0.3(@rspress/core@2.1.3(@rspack/core@2.2.8(@swc/helpers@0.5.23))(micromark-util-types@2.0.2)(micromark@4.0.2(supports-color@9.4.0))(supports-color@9.4.0))(supports-color@9.4.0) devDependencies: + '@halo-dev/components': + specifier: 2.27.0 + version: 2.27.0(vue-router@5.1.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.45)(vue@3.5.45(typescript@6.0.3)))(vue@3.5.45(typescript@6.0.3)) '@iconify-json/mingcute': specifier: ^1.2.8 version: 1.2.8 @@ -191,6 +194,12 @@ importers: '@rsbuild/plugin-sass': specifier: ^2.0.1 version: 2.0.1(@rsbuild/core@2.3.0) + '@rsbuild/plugin-vue': + specifier: ^2.0.1 + version: 2.0.1(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.45)(vue@3.5.45(typescript@6.0.3)) + '@rspress/plugin-preview': + specifier: 2.1.3 + version: 2.1.3(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@rspress/core@2.1.3(@rspack/core@2.2.8(@swc/helpers@0.5.23))(micromark-util-types@2.0.2)(micromark@4.0.2(supports-color@9.4.0))(supports-color@9.4.0))(react-dom@19.3.0(react@19.3.0))(react@19.3.0) '@svgr/core': specifier: ^8.1.0 version: 8.1.0(supports-color@9.4.0)(typescript@6.0.3) @@ -206,6 +215,9 @@ importers: '@types/react-dom': specifier: ^19.3.0 version: 19.3.0(@types/react@19.3.0) + '@vueuse/core': + specifier: ^14.4.0 + version: 14.4.0(vue@3.5.45(typescript@6.0.3)) react: specifier: ^19.3.0 version: 19.3.0 @@ -220,7 +232,13 @@ importers: version: 6.0.3 unplugin-icons: specifier: ^24.0.0 - version: 24.0.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@svgr/core@8.1.0(supports-color@9.4.0)(typescript@6.0.3)) + version: 24.0.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@svgr/core@8.1.0(supports-color@9.4.0)(typescript@6.0.3))(@vue/compiler-sfc@3.5.45) + vue: + specifier: ^3.5.45 + version: 3.5.45(typescript@6.0.3) + vue-router: + specifier: 5.1.0 + version: 5.1.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.45)(vue@3.5.45(typescript@6.0.3)) packages: @@ -308,6 +326,10 @@ packages: resolution: {integrity: sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==} engines: {node: '>=6.9.0'} + '@babel/generator@8.1.2': + resolution: {integrity: sha512-tAjURz1NaCZGtdG3hB6gjaIeTVo4XFD4TnbqIEneADVJ1Jpt2NxhPBAjbhius8ulUG5b/P2b56ec1ClJZa2aBQ==} + engines: {node: ^22.18.0 || >=24.11.0} + '@babel/helper-compilation-targets@7.29.7': resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} engines: {node: '>=6.9.0'} @@ -326,14 +348,26 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-string-parser@7.29.14': + resolution: {integrity: sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.29.7': resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@8.1.2': + resolution: {integrity: sha512-TRz5Z0MgfIfWqwEIq/pCpUpEXQxUt2Ig2ZbxG3SdmhSbHMAFFYGOix0kI4JLV371/TA+qWnQ4xWHPWjojkyRFA==} + engines: {node: ^22.18.0 || >=24.11.0} + '@babel/helper-validator-identifier@7.29.7': resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@8.0.6': + resolution: {integrity: sha512-HYx0YmuchRxRSpnjvcNffnPS8DCauKNmnumIuHG3jnQAVewRA7kfJGwF13ayEpSZs7s4R/oBH4eppuXcAQd5JQ==} + engines: {node: ^22.18.0 || >=24.11.0} + '@babel/helper-validator-option@7.29.7': resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} engines: {node: '>=6.9.0'} @@ -342,11 +376,21 @@ packages: resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} engines: {node: '>=6.9.0'} + '@babel/parser@7.29.14': + resolution: {integrity: sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/parser@7.29.8': resolution: {integrity: sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==} engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@8.1.2': + resolution: {integrity: sha512-ZDKU7vaX0VORd2BhaO+3FKr/30TKjbUy3SMZcydiPngnAb+MesgUoh5SJcE5EwEyBj14M5J6fK56GuBqvYmOpw==} + engines: {node: ^22.18.0 || >=24.11.0} + hasBin: true + '@babel/template@7.29.7': resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} engines: {node: '>=6.9.0'} @@ -355,10 +399,18 @@ packages: resolution: {integrity: sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==} engines: {node: '>=6.9.0'} + '@babel/types@7.29.14': + resolution: {integrity: sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==} + engines: {node: '>=6.9.0'} + '@babel/types@7.29.8': resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} engines: {node: '>=6.9.0'} + '@babel/types@8.1.2': + resolution: {integrity: sha512-uXt6qt2f5G61jZwNIzK1RKu7l5Xjt1VXtPPOGuVveha9fxbx0QM94U1kM4pFZKTRLjWK+X8vmwjwbIemJjiQTA==} + engines: {node: ^22.18.0 || >=24.11.0} + '@braintree/sanitize-url@6.0.4': resolution: {integrity: sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==} @@ -374,6 +426,21 @@ packages: '@emnapi/wasi-threads@1.2.3': resolution: {integrity: sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==} + '@floating-ui/core@1.8.0': + resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==} + + '@floating-ui/dom@1.8.0': + resolution: {integrity: sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==} + + '@floating-ui/utils@0.2.12': + resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==} + + '@halo-dev/components@2.27.0': + resolution: {integrity: sha512-FXPB9Gt4T7usu9UqHSoJwFSZc61EhaZJCbuRqKSv1XA9DsRlNa9+AFbb56LK/Xr0Y8Bz4L5fAsfJiF8zSF0Jpg==} + peerDependencies: + vue: ^3.5.x + vue-router: ~5.1.0 + '@iconify-json/mingcute@1.2.8': resolution: {integrity: sha512-J8VXpRwTpx5yzOzyhx3T4IXnfXIKTWFl3rZ9okcW4c+NMMuwkLvdmM4rkjB83tnYIhg5+kkeMpmw8tvSnxd4rQ==} @@ -392,6 +459,9 @@ packages: '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + '@jridgewell/gen-mapping@0.4.0-beta.0': + resolution: {integrity: sha512-JdGNkbE4GlNPYQhM0L95fBQr7ctLZJ276QXQLTad4t1oSdnnCI3fDq9DW3BqYAWv8Wc3+HS+4Gsii1oPMCfz1w==} + '@jridgewell/remapping@2.3.5': resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} @@ -402,6 +472,9 @@ packages: '@jridgewell/sourcemap-codec@1.5.5': resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} @@ -538,6 +611,14 @@ packages: '@rsbuild/core': optional: true + '@rsbuild/plugin-vue@2.0.1': + resolution: {integrity: sha512-JbQ/e4J7lICXC6JpovJS9PHlIT0Vl1XngTni3HuVkXF82Q18k8nd0RmRDVRDFcb/mvqij5ITwZsez9h3DoYcQQ==} + peerDependencies: + '@rsbuild/core': ^2.0.0 + peerDependenciesMeta: + '@rsbuild/core': + optional: true + '@rslib/core@1.0.3': resolution: {integrity: sha512-a5IZiyf9sNeeE9jcTsTmz16vxcThpbOSJg0BZXzJAxrUFOZX5xG25PJua9hr0LDWGryBX2UQTruVsLQ8BCpqng==} engines: {node: ^20.19.0 || >=22.12.0} @@ -788,6 +869,9 @@ packages: '@swc/helpers': optional: true + '@rspack/lite-tapable@1.3.0': + resolution: {integrity: sha512-YQLaGRltBp5wzh9ee7PMmh1pErbx0E3zDlfO4K3iQpsEcJcBcgj3+9gq6/wqB/zbXbluoWoRCvL+odkft/Qt3A==} + '@rspack/plugin-react-refresh@2.0.2': resolution: {integrity: sha512-dGNZiCxQxgAUI9sah7gd8u+O7OJZRCmqtEJNDOd8xW5RqcieC86F7p5qcShyw6onH5pKf57evpr2VjGbaFGkZg==} peerDependencies: @@ -802,6 +886,14 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + '@rspress/plugin-preview@2.1.3': + resolution: {integrity: sha512-LL9HKGxsEhSA7xKePgZfQyb0YXFBjfnqQUfSrz6+4fEh5iEGv1umYePkYOy0kcP/sJds8kbIkawpODVdni4QeA==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@rspress/core': ^2.1.0-beta.2 + react: '>=18.0.0' + react-dom: '>=18.0.0' + '@rspress/shared@2.1.3': resolution: {integrity: sha512-VwJ7kgsTWVqHzSXQVHIUCsdMparmq9b/IDmTa3a6jMPl1zmm5Qg9M0eP4j8JXWoIS9n19XtCkQcZmMTFOPRy3A==} @@ -1131,6 +1223,9 @@ packages: '@types/hast@3.0.5': resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==} + '@types/jsesc@2.5.1': + resolution: {integrity: sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==} + '@types/mdast@3.0.15': resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} @@ -1163,6 +1258,9 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/web-bluetooth@0.0.21': + resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} + '@ungap/structured-clone@1.3.3': resolution: {integrity: sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==} @@ -1171,6 +1269,64 @@ packages: peerDependencies: react: '>=18.3.1' + '@vue-macros/common@3.1.4': + resolution: {integrity: sha512-/5Fv+6DgIcM9ajY05ZmKBv+LMX1M9A0X+IUwDRVdt67ciw8OV9bvG2r34p3RiEadlsQybjhKPRKNXDC8Bp23cw==} + engines: {node: '>=20.19.0'} + peerDependencies: + vue: ^2.7.0 || ^3.2.25 + peerDependenciesMeta: + vue: + optional: true + + '@vue/compiler-core@3.5.45': + resolution: {integrity: sha512-XGHJrM6ufZARAc/w+tyOswStw9tdKiqCKBScI4gGaNxD+aaGu/HQWgKJ+JItjRLPqenQ7iE7G8AJC7T5ew1p+g==} + + '@vue/compiler-dom@3.5.45': + resolution: {integrity: sha512-LbP2d19GSOYGPmvMBBCVJVlv7TKtjM1Cfeyu3cYia720pknZP+1cLX7H5MVatvruT6MuJhiPuNbQBW/MDn/EwA==} + + '@vue/compiler-sfc@3.5.45': + resolution: {integrity: sha512-MKFjb2UX0M/l/jhfzqMLrI8VM4pfvFKG3pqFZkSZFHRLtNld/O4RtUPZFWSwhro/14qP88UQEkWzHxAZAQ0tsw==} + + '@vue/compiler-ssr@3.5.45': + resolution: {integrity: sha512-RF5sbZOfYz5AK00tOJUn2PwFXR2fS1u2HVzI8D9VF9rGAFxuGBqg2bB1kJ3ZHMprqSltXnT9MZE1IsqjSM8oew==} + + '@vue/devtools-api@8.2.1': + resolution: {integrity: sha512-6u4vXBlIBAC1wMplIZgpyPn7uh/s4Bf6F5bMzvLv+EdJ0aHs/+4B7Ygv864EStQSjRbsRzTko/kUG1A1IejQ3A==} + + '@vue/devtools-kit@8.2.1': + resolution: {integrity: sha512-FIGIuq3AWReEpbAHY/cRGeHDfI0qOb8OCQ3YjbEAX04uaxIDbGc9rhkbVcG7rnfHPXE3RsU5KrWOu9V/okd8AQ==} + + '@vue/devtools-shared@8.2.1': + resolution: {integrity: sha512-Fkac7lUdGReh6pVOi3AYPRGe82LQqRmAfThW7RRligOAP0ZA/Z1z9XLHDM9dv34pV2HRc79DK8uKPeG2fLnA/g==} + + '@vue/reactivity@3.5.45': + resolution: {integrity: sha512-WqkyubNWpI4OYBOipSrjIssMdJO8K1i9Zts/Wm8Er10/0msOEwCyWWWvZnAI7WW3kQsTong6DJp8Cbb+vd4cPA==} + + '@vue/runtime-core@3.5.45': + resolution: {integrity: sha512-bzIO3+FABjpj85uIKSc+Qnj36/sxDNI3tcH9i6w6xKA1k6e0ejv0G0jMCfeJBvK3yGL5XbJ3DMZj+ClqyCHFYw==} + + '@vue/runtime-dom@3.5.45': + resolution: {integrity: sha512-ZvRTFMDgfqTDYWvJfoVpQTJx1RN5M6l7Pyd6wfdY2NaXzbPQVh9ezeQYFbNPP6bIcRVn2SqSSR25N/jSW69BFw==} + + '@vue/server-renderer@3.5.45': + resolution: {integrity: sha512-1fNXUHhhsWf4EVL4XixbGBU5mKdiIXJAB82feHRTyPPo6ZUEYWIJuEeUl3mVV6QDBp50HJOX4obLhxYXlrjrzA==} + + '@vue/shared@3.5.45': + resolution: {integrity: sha512-ue9fgHmVNPlP7iW3+cxoBX/Cnlw53dHlVSw0JKGY6z1lObg8pHoj928M2nzG4/yVsMZ3NaRZ2s2z61uC16NDwQ==} + + '@vueuse/core@14.4.0': + resolution: {integrity: sha512-X4WHz1HlCzCBoYXesUkifzzWBAcZgXG8Fi5iNPQg/epdzOB3gu8Fawj3hvuwYR1nGcXGnvxwYYcUC/71++svtQ==} + peerDependencies: + vue: ^3.5.0 + + '@vueuse/metadata@14.4.0': + resolution: {integrity: sha512-swx/255R6JyHZFJhx845iz5CRWDZdCfvkZOpACWc5+c5WHcG24mv8gUT1WIdFQaHt6dq79rvILd9QnCWiyVm9g==} + + '@vueuse/shared@14.4.0': + resolution: {integrity: sha512-JRgY90Sz8DDtPMsaDflvPMp9xYk69JZAmbuDvAquUVXKr2gEjqtzGNTTthLfckH0BzBqvnu31gb4a8TGLRe79g==} + peerDependencies: + vue: ^3.5.0 + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1181,6 +1337,10 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -1188,6 +1348,14 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + ast-kit@2.2.0: + resolution: {integrity: sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw==} + engines: {node: '>=20.19.0'} + + ast-walker-scope@0.9.0: + resolution: {integrity: sha512-IJdzo2vLiElBxKzwS36VsCue/62d6IdWjnPB2v3nuPKeWGynp6FF/CYoLa5i/3jXH/z97ZDdsXz6abpgM6w07A==} + engines: {node: '>=20.19.0'} + astring@1.9.0: resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} hasBin: true @@ -1207,6 +1375,9 @@ packages: big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} + birpc@2.9.0: + resolution: {integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==} + body-scroll-lock@4.0.0-beta.0: resolution: {integrity: sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==} @@ -1233,6 +1404,10 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -1262,6 +1437,13 @@ packages: collapse-white-space@2.1.0: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + colorjs.io@0.7.1: resolution: {integrity: sha512-LY7OHnJZxHwT5UlzNa9bbhHHDbzB6yE5+3MIPwJEQKRvSCt/T4G7epsj+9j2BExUIIfXFIJGsIXUKdfrK9Q5tA==} @@ -1522,6 +1704,10 @@ packages: resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} engines: {node: '>=0.12'} + entities@7.0.1: + resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} + engines: {node: '>=0.12'} + error-ex@1.3.4: resolution: {integrity: sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==} @@ -1557,6 +1743,9 @@ packages: estree-util-visit@2.0.0: resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -1583,6 +1772,15 @@ packages: flexsearch@0.8.212: resolution: {integrity: sha512-wSyJr1GUWoOOIISRu+X2IXiOcVfg9qqBRyCPRUdLMIGJqPzMo+jMRlvE83t14v1j0dRMEaBbER/adQjp6Du2pw==} + floating-vue@5.4.0: + resolution: {integrity: sha512-hb5y5N8sXs9Dy4iZfWBKLzf3FkUkqhbkQREhRulAEvIihMlSGxc/7pXGrIDetoqXm/RRHNVjvN6lql9IhMM+tQ==} + peerDependencies: + '@nuxt/kit': ^3.2.0 || ^4.0.0 || ^5.0.0-0 + vue: ^3.2.0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -1631,6 +1829,9 @@ packages: hastscript@9.0.1: resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==} + hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + hookable@6.1.1: resolution: {integrity: sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==} @@ -1752,6 +1953,13 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + magic-string-ast@1.0.3: + resolution: {integrity: sha512-CvkkH1i81zl7mmb94DsRiFeG9V2fR2JeuK8yDgS8oiZSFa++wWLEgZ5ufEOyLHbvSbD1gTRKv9NdX69Rnvr9JA==} + engines: {node: '>=20.19.0'} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + markdown-extensions@2.0.0: resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} engines: {node: '>=16'} @@ -2054,11 +2262,19 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + muggle-string@0.4.1: + resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + nanoid@3.3.18: resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} @@ -2112,6 +2328,9 @@ packages: pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + perfect-debounce@2.1.0: + resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -2129,6 +2348,10 @@ packages: resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} engines: {node: ^10 || ^12 || >=14} + postcss@8.5.33: + resolution: {integrity: sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==} + engines: {node: ^10 || ^12 || >=14} + prettier@3.9.8: resolution: {integrity: sha512-WRFq3Wn3WId7LLROfMLdH7xaFr2jR62wU8nLO6rQUOLOxNZUviyJQs1M0iIhLexSFy+L+w0ch66wtoO2jRjG0A==} engines: {node: '>=14'} @@ -2137,6 +2360,11 @@ packages: property-information@7.2.0: resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} + qrcode.react@4.2.0: + resolution: {integrity: sha512-QpgqWi8rD9DsS9EP3z7BT+5lY5SFhsqGjpgW5DY/i3mK4M9DTBNz3ErMi8BWYEfI3L0d8GIbGmcdFAS1uIRGjA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + quansync@0.2.11: resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} @@ -2290,6 +2518,20 @@ packages: typescript: optional: true + rspack-vue-loader@17.7.2: + resolution: {integrity: sha512-i6W3epmp98tibZ2rycV6YP4FhSJvvui9JnJm7SicSC1fXzkPBGSS1g9BNZLGUqVGM6opWEq/Aw2uzD3Q0pnQOg==} + peerDependencies: + '@rspack/core': ^1.0.0 || ^2.0.0 + '@vue/compiler-sfc': '*' + vue: '*' + peerDependenciesMeta: + '@rspack/core': + optional: true + '@vue/compiler-sfc': + optional: true + vue: + optional: true + rspress-plugin-devkit@1.0.1: resolution: {integrity: sha512-uEzS3D/jwDSHN2KAHvoQDiia4+gov5t4ZHv+YP1Iu11TRJ/0dlDjao4QXrPEIgCPJ1MHvMHfkpIJecn/h3ilVA==} peerDependencies: @@ -2485,6 +2727,10 @@ packages: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} + engines: {node: '>=0.10.0'} + source-map@0.7.6: resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} engines: {node: '>= 12'} @@ -2507,6 +2753,10 @@ packages: stylis@4.4.0: resolution: {integrity: sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==} + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + supports-color@8.1.1: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} @@ -2623,6 +2873,10 @@ packages: svelte: optional: true + unplugin-utils@0.3.2: + resolution: {integrity: sha512-xVToRh2CTmLk2HnEG7ac4rl1MJTT3RFkpS8B++/SnB0kXvuaavD+n3m/vrzyWQOdJNSZQACnbz01pnppbwV5BA==} + engines: {node: '>=20.19.0'} + unplugin@3.4.0: resolution: {integrity: sha512-9skdIFlCsPdFV7wUfZxNsFInlW+7nJmGu2gkTu0OUhF56aXGsHab9x52/QhdJ4lC7ZDPWTxbiC4ANqVlsuaW3w==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2689,6 +2943,32 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + vue-router@5.1.0: + resolution: {integrity: sha512-HAbiLzLEHQwxPgvsbOJDAwtavszEgLwri6XfyrsPECIFez8+59xc9LofWVdc/HEaSRT822lJ8H9Ns38VVond5g==} + peerDependencies: + '@pinia/colada': '>=0.21.2' + '@vue/compiler-sfc': ^3.5.34 + pinia: ^3.0.4 + vite: ^7.0.0 || ^8.0.0 + vue: ^3.5.34 + peerDependenciesMeta: + '@pinia/colada': + optional: true + '@vue/compiler-sfc': + optional: true + pinia: + optional: true + vite: + optional: true + + vue@3.5.45: + resolution: {integrity: sha512-3cvsib8m9c0vB24+MDKsgcW4+Da4xaBl9Z/5Tbm2pmSIsRPxcil4cdXjXlVsmJ2g64XJo5h+IRd7rsdGT9pZaw==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} @@ -2796,6 +3076,15 @@ snapshots: '@jridgewell/trace-mapping': 0.3.31 jsesc: 3.1.0 + '@babel/generator@8.1.2': + dependencies: + '@babel/parser': 8.1.2 + '@babel/types': 8.1.2 + '@jridgewell/gen-mapping': 0.4.0-beta.0 + '@jridgewell/trace-mapping': 0.3.31 + '@types/jsesc': 2.5.1 + jsesc: 3.1.0 + '@babel/helper-compilation-targets@7.29.7': dependencies: '@babel/compat-data': 7.29.7 @@ -2822,10 +3111,16 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-string-parser@7.29.14': {} + '@babel/helper-string-parser@7.29.7': {} + '@babel/helper-string-parser@8.1.2': {} + '@babel/helper-validator-identifier@7.29.7': {} + '@babel/helper-validator-identifier@8.0.6': {} + '@babel/helper-validator-option@7.29.7': {} '@babel/helpers@7.29.7': @@ -2833,10 +3128,18 @@ snapshots: '@babel/template': 7.29.7 '@babel/types': 7.29.8 + '@babel/parser@7.29.14': + dependencies: + '@babel/types': 7.29.14 + '@babel/parser@7.29.8': dependencies: '@babel/types': 7.29.8 + '@babel/parser@8.1.2': + dependencies: + '@babel/types': 8.1.2 + '@babel/template@7.29.7': dependencies: '@babel/code-frame': 7.29.7 @@ -2855,11 +3158,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/types@7.29.14': + dependencies: + '@babel/helper-string-parser': 7.29.14 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/types@7.29.8': dependencies: '@babel/helper-string-parser': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 + '@babel/types@8.1.2': + dependencies: + '@babel/helper-string-parser': 8.1.2 + '@babel/helper-validator-identifier': 8.0.6 + '@braintree/sanitize-url@6.0.4': {} '@bufbuild/protobuf@2.14.0': {} @@ -2880,6 +3193,25 @@ snapshots: tslib: 2.8.1 optional: true + '@floating-ui/core@1.8.0': + dependencies: + '@floating-ui/utils': 0.2.12 + + '@floating-ui/dom@1.8.0': + dependencies: + '@floating-ui/core': 1.8.0 + '@floating-ui/utils': 0.2.12 + + '@floating-ui/utils@0.2.12': {} + + '@halo-dev/components@2.27.0(vue-router@5.1.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.45)(vue@3.5.45(typescript@6.0.3)))(vue@3.5.45(typescript@6.0.3))': + dependencies: + floating-vue: 5.4.0(vue@3.5.45(typescript@6.0.3)) + vue: 3.5.45(typescript@6.0.3) + vue-router: 5.1.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.45)(vue@3.5.45(typescript@6.0.3)) + transitivePeerDependencies: + - '@nuxt/kit' + '@iconify-json/mingcute@1.2.8': dependencies: '@iconify/types': 2.0.0 @@ -2905,6 +3237,11 @@ snapshots: '@jridgewell/sourcemap-codec': 1.5.5 '@jridgewell/trace-mapping': 0.3.31 + '@jridgewell/gen-mapping@0.4.0-beta.0': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + '@jridgewell/remapping@2.3.5': dependencies: '@jridgewell/gen-mapping': 0.3.13 @@ -2914,6 +3251,8 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.5': {} + '@jridgewell/sourcemap-codec@1.6.0': {} + '@jridgewell/trace-mapping@0.3.31': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -3052,6 +3391,16 @@ snapshots: optionalDependencies: '@rsbuild/core': 2.3.0 + '@rsbuild/plugin-vue@2.0.1(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.45)(vue@3.5.45(typescript@6.0.3))': + dependencies: + rspack-vue-loader: 17.7.2(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.45)(vue@3.5.45(typescript@6.0.3)) + optionalDependencies: + '@rsbuild/core': 2.3.0 + transitivePeerDependencies: + - '@rspack/core' + - '@vue/compiler-sfc' + - vue + '@rslib/core@1.0.3(typescript@6.0.3)': dependencies: '@rsbuild/core': 2.2.11 @@ -3237,6 +3586,8 @@ snapshots: optionalDependencies: '@swc/helpers': 0.5.23 + '@rspack/lite-tapable@1.3.0': {} + '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.2.8(@swc/helpers@0.5.23))(react-refresh@0.19.0)': dependencies: react-refresh: 0.19.0 @@ -3292,6 +3643,20 @@ snapshots: - micromark-util-types - supports-color + '@rspress/plugin-preview@2.1.3(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@rspress/core@2.1.3(@rspack/core@2.2.8(@swc/helpers@0.5.23))(micromark-util-types@2.0.2)(micromark@4.0.2(supports-color@9.4.0))(supports-color@9.4.0))(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + dependencies: + '@rsbuild/core': 2.3.0 + '@rsbuild/plugin-react': 2.1.1(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23)) + '@rspress/core': 2.1.3(@rspack/core@2.2.8(@swc/helpers@0.5.23))(micromark-util-types@2.0.2)(micromark@4.0.2(supports-color@9.4.0))(supports-color@9.4.0) + picocolors: 1.1.1 + qrcode.react: 4.2.0(react@19.3.0) + react: 19.3.0 + react-dom: 19.3.0(react@19.3.0) + transitivePeerDependencies: + - '@module-federation/runtime-tools' + - '@rspack/core' + - core-js + '@rspress/shared@2.1.3(supports-color@9.4.0)': dependencies: '@rsbuild/core': 2.3.0 @@ -3579,6 +3944,8 @@ snapshots: dependencies: '@types/unist': 3.0.3 + '@types/jsesc@2.5.1': {} + '@types/mdast@3.0.15': dependencies: '@types/unist': 2.0.11 @@ -3610,6 +3977,8 @@ snapshots: '@types/unist@3.0.3': {} + '@types/web-bluetooth@0.0.21': {} + '@ungap/structured-clone@1.3.3': {} '@unhead/react@2.1.17(react@19.3.1)': @@ -3617,16 +3986,121 @@ snapshots: react: 19.3.1 unhead: 2.1.17 + '@vue-macros/common@3.1.4(vue@3.5.45(typescript@6.0.3))': + dependencies: + '@vue/compiler-sfc': 3.5.45 + ast-kit: 2.2.0 + local-pkg: 1.2.1 + magic-string-ast: 1.0.3 + unplugin-utils: 0.3.2 + optionalDependencies: + vue: 3.5.45(typescript@6.0.3) + + '@vue/compiler-core@3.5.45': + dependencies: + '@babel/parser': 7.29.14 + '@vue/shared': 3.5.45 + entities: 7.0.1 + estree-walker: 2.0.2 + source-map-js: 1.2.2 + + '@vue/compiler-dom@3.5.45': + dependencies: + '@vue/compiler-core': 3.5.45 + '@vue/shared': 3.5.45 + + '@vue/compiler-sfc@3.5.45': + dependencies: + '@babel/parser': 7.29.14 + '@vue/compiler-core': 3.5.45 + '@vue/compiler-dom': 3.5.45 + '@vue/compiler-ssr': 3.5.45 + '@vue/shared': 3.5.45 + estree-walker: 2.0.2 + magic-string: 0.30.21 + postcss: 8.5.33 + source-map-js: 1.2.2 + + '@vue/compiler-ssr@3.5.45': + dependencies: + '@vue/compiler-dom': 3.5.45 + '@vue/shared': 3.5.45 + + '@vue/devtools-api@8.2.1': + dependencies: + '@vue/devtools-kit': 8.2.1 + + '@vue/devtools-kit@8.2.1': + dependencies: + '@vue/devtools-shared': 8.2.1 + birpc: 2.9.0 + hookable: 5.5.3 + perfect-debounce: 2.1.0 + + '@vue/devtools-shared@8.2.1': {} + + '@vue/reactivity@3.5.45': + dependencies: + '@vue/shared': 3.5.45 + + '@vue/runtime-core@3.5.45': + dependencies: + '@vue/reactivity': 3.5.45 + '@vue/shared': 3.5.45 + + '@vue/runtime-dom@3.5.45': + dependencies: + '@vue/reactivity': 3.5.45 + '@vue/runtime-core': 3.5.45 + '@vue/shared': 3.5.45 + csstype: 3.2.3 + + '@vue/server-renderer@3.5.45': + dependencies: + '@vue/compiler-ssr': 3.5.45 + '@vue/runtime-dom': 3.5.45 + '@vue/shared': 3.5.45 + + '@vue/shared@3.5.45': {} + + '@vueuse/core@14.4.0(vue@3.5.45(typescript@6.0.3))': + dependencies: + '@types/web-bluetooth': 0.0.21 + '@vueuse/metadata': 14.4.0 + '@vueuse/shared': 14.4.0(vue@3.5.45(typescript@6.0.3)) + vue: 3.5.45(typescript@6.0.3) + + '@vueuse/metadata@14.4.0': {} + + '@vueuse/shared@14.4.0(vue@3.5.45(typescript@6.0.3))': + dependencies: + vue: 3.5.45(typescript@6.0.3) + acorn-jsx@5.3.2(acorn@8.18.0): dependencies: acorn: 8.18.0 acorn@8.18.0: {} + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + argparse@2.0.1: {} assertion-error@2.0.1: {} + ast-kit@2.2.0: + dependencies: + '@babel/parser': 7.29.8 + pathe: 2.0.3 + + ast-walker-scope@0.9.0: + dependencies: + '@babel/parser': 7.29.8 + '@babel/types': 7.29.8 + ast-kit: 2.2.0 + astring@1.9.0: {} bail@2.0.2: {} @@ -3637,6 +4111,8 @@ snapshots: big.js@5.2.2: {} + birpc@2.9.0: {} + body-scroll-lock@4.0.0-beta.0: {} brace-expansion@5.0.9: @@ -3659,6 +4135,11 @@ snapshots: ccount@2.0.1: {} + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + character-entities-html4@2.1.0: {} character-entities-legacy@3.0.0: {} @@ -3670,7 +4151,6 @@ snapshots: chokidar@5.0.0: dependencies: readdirp: 5.1.1 - optional: true cjs-module-lexer@2.2.1: {} @@ -3680,6 +4160,12 @@ snapshots: collapse-white-space@2.1.0: {} + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + colorjs.io@0.7.1: {} comma-separated-tokens@2.0.3: {} @@ -3944,6 +4430,8 @@ snapshots: entities@6.0.1: {} + entities@7.0.1: {} + error-ex@1.3.4: dependencies: is-arrayish: 0.2.1 @@ -3995,6 +4483,8 @@ snapshots: '@types/estree-jsx': 1.0.5 '@types/unist': 3.0.3 + estree-walker@2.0.2: {} + estree-walker@3.0.3: dependencies: '@types/estree': 1.0.9 @@ -4011,6 +4501,11 @@ snapshots: flexsearch@0.8.212: {} + floating-vue@5.4.0(vue@3.5.45(typescript@6.0.3)): + dependencies: + '@floating-ui/dom': 1.8.0 + vue: 3.5.45(typescript@6.0.3) + gensync@1.0.0-beta.2: {} get-east-asian-width@1.6.0: {} @@ -4137,6 +4632,8 @@ snapshots: property-information: 7.2.0 space-separated-tokens: 2.0.2 + hookable@5.5.3: {} + hookable@6.1.1: {} html-void-elements@3.0.0: {} @@ -4235,6 +4732,14 @@ snapshots: dependencies: yallist: 3.1.1 + magic-string-ast@1.0.3: + dependencies: + magic-string: 0.30.21 + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + markdown-extensions@2.0.0: {} markdown-table@3.0.4: {} @@ -4948,8 +5453,12 @@ snapshots: ms@2.1.3: {} + muggle-string@0.4.1: {} + nanoid@3.3.18: {} + nanoid@3.3.20: {} + no-case@3.0.4: dependencies: lower-case: 2.0.2 @@ -5007,6 +5516,8 @@ snapshots: pathe@2.0.3: {} + perfect-debounce@2.1.0: {} + picocolors@1.1.1: {} picomatch@4.0.7: {} @@ -5029,10 +5540,20 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + postcss@8.5.33: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 + prettier@3.9.8: {} property-information@7.2.0: {} + qrcode.react@4.2.0(react@19.3.0): + dependencies: + react: 19.3.0 + quansync@0.2.11: {} react-dom@19.3.0(react@19.3.0): @@ -5077,8 +5598,7 @@ snapshots: react@19.3.1: {} - readdirp@5.1.1: - optional: true + readdirp@5.1.1: {} recma-build-jsx@1.0.0: dependencies: @@ -5242,6 +5762,15 @@ snapshots: optionalDependencies: typescript: 6.0.3 + rspack-vue-loader@17.7.2(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.45)(vue@3.5.45(typescript@6.0.3)): + dependencies: + '@rspack/lite-tapable': 1.3.0 + chalk: 4.1.2 + optionalDependencies: + '@rspack/core': 2.2.8(@swc/helpers@0.5.23) + '@vue/compiler-sfc': 3.5.45 + vue: 3.5.45(typescript@6.0.3) + rspress-plugin-devkit@1.0.1(@rspress/core@2.1.3(@rspack/core@2.2.8(@swc/helpers@0.5.23))(micromark-util-types@2.0.2)(micromark@4.0.2(supports-color@9.4.0))(supports-color@9.4.0))(supports-color@9.4.0): dependencies: '@rspress/core': 2.1.3(@rspack/core@2.2.8(@swc/helpers@0.5.23))(micromark-util-types@2.0.2)(micromark@4.0.2(supports-color@9.4.0))(supports-color@9.4.0) @@ -5458,6 +5987,8 @@ snapshots: source-map-js@1.2.1: {} + source-map-js@1.2.2: {} + source-map@0.7.6: {} space-separated-tokens@2.0.2: {} @@ -5481,6 +6012,10 @@ snapshots: stylis@4.4.0: {} + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + supports-color@8.1.1: dependencies: has-flag: 4.0.0 @@ -5577,7 +6112,7 @@ snapshots: unist-util-is: 6.0.1 unist-util-visit-parents: 6.0.2 - unplugin-icons@24.0.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@svgr/core@8.1.0(supports-color@9.4.0)(typescript@6.0.3)): + unplugin-icons@24.0.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@svgr/core@8.1.0(supports-color@9.4.0)(typescript@6.0.3))(@vue/compiler-sfc@3.5.45): dependencies: '@antfu/install-pkg': 1.1.0 '@iconify/utils': 3.1.7 @@ -5586,6 +6121,7 @@ snapshots: unplugin: 3.4.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23)) optionalDependencies: '@svgr/core': 8.1.0(supports-color@9.4.0)(typescript@6.0.3) + '@vue/compiler-sfc': 3.5.45 transitivePeerDependencies: - '@farmfe/core' - '@rsbuild/core' @@ -5598,6 +6134,11 @@ snapshots: - vite - webpack + unplugin-utils@0.3.2: + dependencies: + pathe: 2.0.3 + picomatch: 4.0.7 + unplugin@3.4.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23)): dependencies: '@jridgewell/remapping': 2.3.5 @@ -5641,6 +6182,49 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 + vue-router@5.1.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.45)(vue@3.5.45(typescript@6.0.3)): + dependencies: + '@babel/generator': 8.1.2 + '@vue-macros/common': 3.1.4(vue@3.5.45(typescript@6.0.3)) + '@vue/devtools-api': 8.2.1 + ast-walker-scope: 0.9.0 + chokidar: 5.0.0 + json5: 2.2.3 + local-pkg: 1.2.1 + magic-string: 0.30.21 + mlly: 1.8.2 + muggle-string: 0.4.1 + pathe: 2.0.3 + picomatch: 4.0.7 + scule: 1.3.0 + tinyglobby: 0.2.17 + unplugin: 3.4.0(@rsbuild/core@2.3.0)(@rspack/core@2.2.8(@swc/helpers@0.5.23)) + unplugin-utils: 0.3.2 + vue: 3.5.45(typescript@6.0.3) + yaml: 2.9.0 + optionalDependencies: + '@vue/compiler-sfc': 3.5.45 + transitivePeerDependencies: + - '@farmfe/core' + - '@rsbuild/core' + - '@rspack/core' + - bun-types-no-globals + - esbuild + - rolldown + - rollup + - unloader + - webpack + + vue@3.5.45(typescript@6.0.3): + dependencies: + '@vue/compiler-dom': 3.5.45 + '@vue/compiler-sfc': 3.5.45 + '@vue/runtime-dom': 3.5.45 + '@vue/server-renderer': 3.5.45 + '@vue/shared': 3.5.45 + optionalDependencies: + typescript: 6.0.3 + web-namespaces@2.0.1: {} web-worker@1.5.0: {} diff --git a/rstack.config.ts b/rstack.config.ts index 51b71732..e95e437f 100644 --- a/rstack.config.ts +++ b/rstack.config.ts @@ -12,6 +12,8 @@ define.doc(async () => { { default: ga }, { default: mermaid }, { default: Icons }, + { pluginVue }, + { pluginPreview }, ] = await Promise.all([ import("@rsbuild/plugin-sass"), import("@rspress/core/shiki-transformers"), @@ -19,6 +21,8 @@ define.doc(async () => { import("rspress-plugin-google-analytics"), import("rspress-plugin-mermaid"), import("unplugin-icons/rspack"), + import("@rsbuild/plugin-vue"), + import("@rspress/plugin-preview"), ]); return { @@ -54,6 +58,26 @@ define.doc(async () => { id: "UA-110780416-7", }), fileTree(), + pluginPreview({ + previewLanguages: ["vue"], + defaultPreviewMode: "iframe-follow", + iframeOptions: { + customEntry: ({ demoPath }) => ` +import { createApp } from "vue"; +import "@halo-dev/components/dist/style.css"; +import Demo from ${JSON.stringify(demoPath)}; + +const style = document.createElement("style"); +style.textContent = "#root { padding: 24px; }"; +document.head.appendChild(style); + +createApp(Demo).mount("#root"); +`, + builderConfig: { + plugins: [pluginVue()], + }, + }, + }), ], builderConfig: { plugins: [pluginSass()],
修改站点名称和描述。
+ 当前第 {{ current.page }} 页,每页 {{ current.size }} 条 +