@koishi-ce/client 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/app/home/home.vue +4 -0
- package/app/home/index.ts +4 -0
- package/app/home/welcome.en-US.yml +4 -0
- package/app/home/welcome.vue +4 -0
- package/app/home/welcome.zh-CN.yml +4 -0
- package/app/index.scss +4 -0
- package/app/index.ts +4 -0
- package/app/layout/header.vue +4 -0
- package/app/layout/index.ts +4 -0
- package/app/layout/layout.vue +4 -0
- package/app/layout/menu-item.vue +4 -0
- package/app/settings/index.ts +4 -0
- package/app/settings/settings.vue +4 -0
- package/app/settings/theme.vue +4 -0
- package/app/shims.d.ts +3 -0
- package/app/status/index.ts +4 -0
- package/app/status/loading.vue +4 -0
- package/app/status/status.vue +4 -0
- package/app/styles/element.scss +4 -0
- package/app/styles/hc.scss +4 -0
- package/app/styles/index.scss +4 -0
- package/app/styles/index.ts +4 -0
- package/app/styles/layout.scss +4 -0
- package/app/theme/activity/button.vue +4 -0
- package/app/theme/activity/index.vue +4 -0
- package/app/theme/activity/item.vue +4 -0
- package/app/theme/activity/separator.vue +4 -0
- package/app/theme/activity/utils.ts +4 -0
- package/app/theme/blank.vue +4 -0
- package/app/theme/index.ts +4 -0
- package/app/theme/index.vue +4 -0
- package/app/theme/menu/index.vue +4 -0
- package/app/theme/menu/menu-item.vue +4 -0
- package/app/theme/menu/menu.vue +4 -0
- package/app/theme/status.vue +4 -0
- package/client/components/chat/image.vue +4 -0
- package/client/components/chat/overlay.vue +4 -0
- package/client/components/chat/utils.ts +4 -0
- package/client/components/common/index.ts +4 -0
- package/client/components/common/k-button.vue +4 -0
- package/client/components/common/k-hint.vue +4 -0
- package/client/components/common/k-tab.vue +4 -0
- package/client/components/dynamic.vue +4 -0
- package/client/components/icons/activity/default.vue +4 -0
- package/client/components/icons/activity/ellipsis.vue +4 -0
- package/client/components/icons/activity/home.vue +4 -0
- package/client/components/icons/activity/moon.vue +4 -0
- package/client/components/icons/activity/settings.vue +4 -0
- package/client/components/icons/activity/sun.vue +4 -0
- package/client/components/icons/index.ts +4 -0
- package/client/components/icons/style.scss +4 -0
- package/client/components/icons/svg/arrow-left.vue +4 -0
- package/client/components/icons/svg/arrow-right.vue +4 -0
- package/client/components/icons/svg/box-open.vue +4 -0
- package/client/components/icons/svg/check-full.vue +4 -0
- package/client/components/icons/svg/chevron-down.vue +4 -0
- package/client/components/icons/svg/chevron-left.vue +4 -0
- package/client/components/icons/svg/chevron-right.vue +4 -0
- package/client/components/icons/svg/chevron-up.vue +4 -0
- package/client/components/icons/svg/clipboard-list.vue +4 -0
- package/client/components/icons/svg/edit.vue +4 -0
- package/client/components/icons/svg/exclamation-full.vue +4 -0
- package/client/components/icons/svg/expand.vue +4 -0
- package/client/components/icons/svg/file-archive.vue +4 -0
- package/client/components/icons/svg/filter.vue +4 -0
- package/client/components/icons/svg/github.vue +4 -0
- package/client/components/icons/svg/gitlab.vue +4 -0
- package/client/components/icons/svg/info-full.vue +4 -0
- package/client/components/icons/svg/koishi.vue +4 -0
- package/client/components/icons/svg/link.vue +4 -0
- package/client/components/icons/svg/paper-plane.vue +4 -0
- package/client/components/icons/svg/question-empty.vue +4 -0
- package/client/components/icons/svg/redo.vue +4 -0
- package/client/components/icons/svg/search-minus.vue +4 -0
- package/client/components/icons/svg/search-plus.vue +4 -0
- package/client/components/icons/svg/search.vue +4 -0
- package/client/components/icons/svg/star-empty.vue +4 -0
- package/client/components/icons/svg/star-full.vue +4 -0
- package/client/components/icons/svg/start.vue +4 -0
- package/client/components/icons/svg/tag.vue +4 -0
- package/client/components/icons/svg/times-full.vue +4 -0
- package/client/components/icons/svg/tools.vue +4 -0
- package/client/components/icons/svg/undo.vue +4 -0
- package/client/components/icons/svg/user.vue +4 -0
- package/client/components/index.ts +4 -0
- package/client/components/layout/card.vue +4 -0
- package/client/components/layout/content.vue +4 -0
- package/client/components/layout/empty.vue +4 -0
- package/client/components/layout/index.ts +4 -0
- package/client/components/layout/tab-group.vue +4 -0
- package/client/components/layout/tab-item.vue +4 -0
- package/client/components/link.ts +4 -0
- package/client/components/perms.vue +4 -0
- package/client/components/slot.ts +4 -0
- package/client/context.ts +4 -0
- package/client/data.ts +4 -0
- package/client/index.ts +4 -0
- package/client/plugins/action.ts +4 -0
- package/client/plugins/i18n.ts +4 -0
- package/client/plugins/loader.ts +4 -0
- package/client/plugins/router.ts +4 -0
- package/client/plugins/setting.ts +4 -0
- package/client/plugins/theme.ts +4 -0
- package/client/shims.d.ts +3 -0
- package/client/utils.ts +4 -0
- package/global.d.ts +4 -0
- package/lib/bin.mjs +6 -2
- package/lib/index.mjs +1 -1
- package/lib/{src-lTfcJ1xA.mjs → src-DXaM1Kgh.mjs} +6 -0
- package/package.json +6 -2
- package/src/bin.ts +3 -0
- package/src/index.ts +14 -0
- package/src/yaml.ts +3 -0
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 四角外扩图标(注册名 "expand"),用于复原/全屏切换 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 压缩包文件图标(注册名 "file-archive"),用于导出/备份文件 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 漏斗筛选图标(注册名 "filter"),用于列表过滤开关 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon k-icon-filter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- GitHub 品牌图标(注册名 "github"),用于源码/Issue 链接 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- GitLab 品牌图标(注册名 "gitlab"),用于 GitLab 相关链接 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 实心圆形信息图标(注册名 "info-full"),用于提示/说明状态 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- Koishi 官方徽标图标(注册名 "koishi"),用于品牌展示与空状态占位 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 双环链条图标(注册名 "link"),用于链接/关联 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 纸飞机图标(注册名 "paper-plane"),用于发送消息/指令 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 空心圆形问号图标(注册名 "question-empty"),k-hint 提示图标的默认图标 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 顺时针旋转箭头图标(注册名 "redo"),用于向右旋转/重做 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 带减号的放大镜图标(注册名 "search-minus"),用于缩小视图 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 带加号的放大镜图标(注册名 "search-plus"),用于放大视图 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 放大镜图标(注册名 "search"),用于搜索入口 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 空心五角星图标(注册名 "star-empty"),用于未收藏/未订阅状态 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 实心五角星图标(注册名 "star-full"),用于已收藏/已订阅状态 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 播放(三角)图标(注册名 "start"),用于启动/运行 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 标签图标(注册名 "tag"),用于标签/标记 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 实心圆形叉号图标(注册名 "times-full"),用于失败/关闭状态 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 扳手与螺丝刀工具图标(注册名 "tools"),用于维护/调试功能 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 逆时针旋转箭头图标(注册名 "undo"),用于向左旋转/撤销 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!-- 用户人形图标(注册名 "user"),用于用户/登录相关界面 -->
|
|
2
6
|
<template>
|
|
3
7
|
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2019-present Shigma and Koishijs contributors.
|
|
3
|
+
// Copyright (c) 2026-present Koishi-CE contributors.
|
|
4
|
+
|
|
1
5
|
import type { App } from "vue";
|
|
2
6
|
import Card from "./card.vue";
|
|
3
7
|
import Content from "./content.vue";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!--
|
|
2
6
|
k-tab-item:选项卡条目(配合 k-tab-group 使用)。
|
|
3
7
|
label 为条目标识兼默认文案,点击时 emit update:modelValue;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2019-present Shigma and Koishijs contributors.
|
|
3
|
+
// Copyright (c) 2026-present Koishi-CE contributors.
|
|
4
|
+
|
|
1
5
|
import { type App, defineComponent, h } from "vue";
|
|
2
6
|
import { RouterLink } from "vue-router";
|
|
3
7
|
import { useContext } from "../context";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
2
|
+
<!-- Copyright (c) 2019-present Shigma and Koishijs contributors. -->
|
|
3
|
+
<!-- Copyright (c) 2026-present Koishi-CE contributors. -->
|
|
4
|
+
|
|
1
5
|
<!--
|
|
2
6
|
perms.vue:权限选择控件(array + perms 角色)。
|
|
3
7
|
把服务端下发的扁平权限名(如 "channel.xxx")按 ":" 逐级拆分,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2019-present Shigma and Koishijs contributors.
|
|
3
|
+
// Copyright (c) 2026-present Koishi-CE contributors.
|
|
4
|
+
|
|
1
5
|
import { type App, type Component, defineComponent, h } from "vue";
|
|
2
6
|
import { useContext } from "../context";
|
|
3
7
|
|
package/client/context.ts
CHANGED
package/client/data.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2019-present Shigma and Koishijs contributors.
|
|
3
|
+
// Copyright (c) 2026-present Koishi-CE contributors.
|
|
4
|
+
|
|
1
5
|
/// <reference path="./shims.d.ts" />
|
|
2
6
|
import type { Promisify, Universal } from "@koishi-ce/koishi";
|
|
3
7
|
import type {
|
package/client/index.ts
CHANGED
package/client/plugins/action.ts
CHANGED
package/client/plugins/i18n.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2019-present Shigma and Koishijs contributors.
|
|
3
|
+
// Copyright (c) 2026-present Koishi-CE contributors.
|
|
4
|
+
|
|
1
5
|
import { watchEffect } from "vue";
|
|
2
6
|
import { createI18n } from "vue-i18n";
|
|
3
7
|
import type { Context } from "../context";
|
package/client/plugins/loader.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2019-present Shigma and Koishijs contributors.
|
|
3
|
+
// Copyright (c) 2026-present Koishi-CE contributors.
|
|
4
|
+
|
|
1
5
|
import type { EntryData } from "@koishi-ce/plugin-console";
|
|
2
6
|
import type { EffectScope, Plugin } from "cordis";
|
|
3
7
|
import type { Dict } from "cosmokit";
|
package/client/plugins/router.ts
CHANGED
package/client/plugins/theme.ts
CHANGED
package/client/shims.d.ts
CHANGED
package/client/utils.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2019-present Shigma and Koishijs contributors.
|
|
3
|
+
// Copyright (c) 2026-present Koishi-CE contributors.
|
|
4
|
+
|
|
1
5
|
import * as cordis from "cordis";
|
|
2
6
|
import { markRaw } from "vue";
|
|
3
7
|
import type { Context } from "./context";
|
package/global.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2019-present Shigma and Koishijs contributors.
|
|
3
|
+
// Copyright (c) 2026-present Koishi-CE contributors.
|
|
4
|
+
|
|
1
5
|
/// <reference types="vue-i18n" />
|
|
2
6
|
/// <reference types="vite/client" />
|
|
3
7
|
/// <reference types="element-plus/global" />
|
package/lib/bin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as build } from "./src-
|
|
2
|
+
import { t as build } from "./src-DXaM1Kgh.mjs";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
//#endregion
|
|
@@ -16,7 +16,7 @@ import { resolve } from "node:path";
|
|
|
16
16
|
const { version } = {
|
|
17
17
|
name: "@koishi-ce/client",
|
|
18
18
|
description: "Koishi Console Client",
|
|
19
|
-
version: "1.0.
|
|
19
|
+
version: "1.0.3",
|
|
20
20
|
type: "module",
|
|
21
21
|
main: "client/index.ts",
|
|
22
22
|
exports: {
|
|
@@ -70,6 +70,10 @@ const { version } = {
|
|
|
70
70
|
"vue": "^3.5.42",
|
|
71
71
|
"vue-i18n": "^11.4.10",
|
|
72
72
|
"vue-router": "^5.2.0"
|
|
73
|
+
},
|
|
74
|
+
devDependencies: {
|
|
75
|
+
"@koishi-ce/koishi": "workspace:*",
|
|
76
|
+
"@koishi-ce/plugin-console": "workspace:*"
|
|
73
77
|
}
|
|
74
78
|
};
|
|
75
79
|
const help = `koishi-console/${version}
|
package/lib/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createServer, t as build } from "./src-
|
|
1
|
+
import { n as createServer, t as build } from "./src-DXaM1Kgh.mjs";
|
|
2
2
|
export { build, createServer };
|
|
@@ -2,6 +2,7 @@ import { t as yaml } from "./yaml-UzQbvquH.mjs";
|
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { mkdir, rm } from "node:fs/promises";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
5
6
|
import vue from "@vitejs/plugin-vue";
|
|
6
7
|
import * as vite from "vite";
|
|
7
8
|
//#region src/index.ts
|
|
@@ -43,6 +44,11 @@ const runtimeShimPath = (workspaceAliases["@koishi-ce/components"] ?? "").replac
|
|
|
43
44
|
*/
|
|
44
45
|
async function build(root, config = {}) {
|
|
45
46
|
if (!existsSync(`${root}/client`)) return;
|
|
47
|
+
const overridePath = `${root}/build/client.ts`;
|
|
48
|
+
if (existsSync(overridePath)) {
|
|
49
|
+
const mod = await import(pathToFileURL(overridePath).href);
|
|
50
|
+
config = vite.mergeConfig(config, mod.default ?? mod);
|
|
51
|
+
}
|
|
46
52
|
const outDir = `${root}/dist`;
|
|
47
53
|
if (existsSync(outDir)) await rm(outDir, { recursive: true });
|
|
48
54
|
await mkdir(outDir, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koishi-ce/client",
|
|
3
3
|
"description": "Koishi Console Client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "client/index.ts",
|
|
7
7
|
"exports": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"build"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@koishi-ce/components": "^1.0.
|
|
51
|
+
"@koishi-ce/components": "^1.0.1",
|
|
52
52
|
"@satorijs/protocol": "^1.7.0",
|
|
53
53
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
54
54
|
"@vueuse/core": "^14.4.0",
|
|
@@ -62,5 +62,9 @@
|
|
|
62
62
|
"vue": "^3.5.42",
|
|
63
63
|
"vue-i18n": "^11.4.10",
|
|
64
64
|
"vue-router": "^5.2.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@koishi-ce/koishi": "^1.0.4",
|
|
68
|
+
"@koishi-ce/plugin-console": "^1.0.3"
|
|
65
69
|
}
|
|
66
70
|
}
|
package/src/bin.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2019-present Shigma and Koishijs contributors.
|
|
3
|
+
// Copyright (c) 2026-present Koishi-CE contributors.
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* @koishi-ce/client 构建入口。
|
|
3
7
|
*
|
|
@@ -10,6 +14,7 @@
|
|
|
10
14
|
import { existsSync } from "node:fs";
|
|
11
15
|
import { mkdir, rm } from "node:fs/promises";
|
|
12
16
|
import { resolve } from "node:path";
|
|
17
|
+
import { pathToFileURL } from "node:url";
|
|
13
18
|
import vue from "@vitejs/plugin-vue";
|
|
14
19
|
import * as vite from "vite";
|
|
15
20
|
import { yaml } from "./yaml.ts";
|
|
@@ -78,6 +83,15 @@ const runtimeShimPath = (
|
|
|
78
83
|
export async function build(root: string, config: vite.UserConfig = {}) {
|
|
79
84
|
if (!existsSync(`${root}/client`)) return;
|
|
80
85
|
|
|
86
|
+
// 插件可自带 `build/client.ts` 导出额外的 vite 配置覆盖下方默认值
|
|
87
|
+
// (vite 只自动发现 vite.config.*,不会加载该路径,须在此显式接线),
|
|
88
|
+
// 如 analytics 的 fuck-echarts 符号遮蔽修补
|
|
89
|
+
const overridePath = `${root}/build/client.ts`;
|
|
90
|
+
if (existsSync(overridePath)) {
|
|
91
|
+
const mod = await import(pathToFileURL(overridePath).href);
|
|
92
|
+
config = vite.mergeConfig(config, mod.default ?? mod);
|
|
93
|
+
}
|
|
94
|
+
|
|
81
95
|
// 产物约定:固定写入插件目录下的 dist/,清空后重建
|
|
82
96
|
const outDir = `${root}/dist`;
|
|
83
97
|
if (existsSync(outDir)) {
|