@qilin-agent/client-ui-brand 0.0.0-stage → 3.1.4
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/LICENSE +21 -0
- package/README.i18n.yaml +31 -0
- package/README.md +55 -2
- package/README.zh.md +56 -0
- package/lib/client.js +54 -0
- package/lib/index.js +9 -0
- package/lib/types/client/Seal.d.ts +21 -0
- package/lib/types/client/index.d.ts +12 -0
- package/lib/types/index.d.ts +7 -0
- package/package.json +64 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kkutysllb
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/client/ui-brand/README.md
|
|
5
|
+
/:
|
|
6
|
+
en: 0849adcc1b77677c
|
|
7
|
+
zh: 330bdb3cd1a3dda4
|
|
8
|
+
/qilin-agent-client-ui-brand:
|
|
9
|
+
en: 3bbc99c223e49c43
|
|
10
|
+
zh: 7a8af4db92f101f7
|
|
11
|
+
/qilin-agent-client-ui-brand/summary:
|
|
12
|
+
en: 95377ff450c656ff
|
|
13
|
+
zh: a9908aa55d89e35f
|
|
14
|
+
/qilin-agent-client-ui-brand/table-of-contents:
|
|
15
|
+
en: 4e53164159b5ce41
|
|
16
|
+
zh: 024420bdbdd3e0ac
|
|
17
|
+
/qilin-agent-client-ui-brand/use-this-package:
|
|
18
|
+
en: 6f4d483895bfadef
|
|
19
|
+
zh: 6d63376599a90894
|
|
20
|
+
/qilin-agent-client-ui-brand/dev-note:
|
|
21
|
+
en: f3c698886ef928a7
|
|
22
|
+
zh: eaac63c14c20b932
|
|
23
|
+
/qilin-agent-client-ui-brand/model-experience:
|
|
24
|
+
en: 4d7eb90e99c59ab9
|
|
25
|
+
zh: da60e592bccf5a3c
|
|
26
|
+
/qilin-agent-client-ui-brand/model-experience/kv-cache-effect:
|
|
27
|
+
en: 8cef18f4fc036de1
|
|
28
|
+
zh: fa4d629e49531593
|
|
29
|
+
/qilin-agent-client-ui-brand/known-limitations-and-deferred-work:
|
|
30
|
+
en: b9339c6577080908
|
|
31
|
+
zh: a4ba753a1f9bd502
|
package/README.md
CHANGED
|
@@ -1,3 +1,56 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "QiLin occupants for the Web client sidebar, conversation-hero, and settings brand slots: the cinnabar 麒麟 seal stamp, drawn from embedded outlines."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# @qilin-agent/client-ui-brand
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
Mount this plugin beside [`ui-sidebar`](../ui-sidebar/README.md), [`ui-conversation`](../ui-conversation/README.md), and [`ui-settings-general`](../ui-settings-general/README.md) to replace generic fallbacks with the QiLin seal: a cinnabar rounded square, gold ring, and warm-white 麒 and 麟 outlines. The embedded SVG needs no font and keeps the stamp legible on light and dark surfaces. The sidebar name and version badge remain shell-owned; the settings About page receives the same seal through a root-scoped slot.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Model Experience](#model-experience)
|
|
18
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
19
|
+
- [Dev Note](#dev-note)
|
|
20
|
+
|
|
21
|
+
-----
|
|
22
|
+
|
|
23
|
+
<a id="use-this-package"></a>
|
|
24
|
+
## Use this package
|
|
25
|
+
|
|
26
|
+
The `qilin` profile mounts this package through its bundle patch, so no configuration is required. The plugin waits for each declaring chain before it occupies its paired slots, and unloading it restores the shell fallbacks. The settings marks are registered independently from the sidebar and conversation hero chain.
|
|
27
|
+
|
|
28
|
+
| Slot | Occupant |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `sidebar.brand.mark` | the seal at the sidebar's requested size |
|
|
31
|
+
| `conversation.hero.brand.mark` | the seal at the hero's requested size and placement class |
|
|
32
|
+
| `settings.about.mark` | the seal in the shell-owned About page |
|
|
33
|
+
|
|
34
|
+
The two character outlines and the body, ring, and glyph-cell geometry now live in [`@qilin-agent/client-ui-primitives`](../ui-primitives/README.md) (`seal-glyphs.ts`, `seal-geometry.ts`), so the shell's unbranded fallbacks draw the same stamp; [`Seal.tsx`](src/client/Seal.tsx) occupies the brand slots with it, one gradient id per instance.
|
|
35
|
+
|
|
36
|
+
<a id="dev-note"></a>
|
|
37
|
+
## Dev Note
|
|
38
|
+
|
|
39
|
+
None.
|
|
40
|
+
|
|
41
|
+
<a id="model-experience"></a>
|
|
42
|
+
## Model Experience
|
|
43
|
+
|
|
44
|
+
None, as the seal is browser presentation and never enters a model request or the session log.
|
|
45
|
+
|
|
46
|
+
#### KV Cache effect
|
|
47
|
+
|
|
48
|
+
None; the seal contributes no prompt text.
|
|
49
|
+
|
|
50
|
+
## Known Limitations and Deferred Work
|
|
51
|
+
|
|
52
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
53
|
+
|
|
54
|
+
- The seal is authored from a text-face outline, not from a designer's seal-script drawing. A commissioned 篆书 mark would replace the two path constants without touching the component.
|
|
55
|
+
- The seal's body gradient, glyph fill, and ring colour are fixed constants rather than theme tokens: the brand stamp must read identically on a light and a dark surface, so a themed variant needs a deliberate second artwork instead of a token swap.
|
|
56
|
+
- No browser-level assertion covers the fully assembled settings surface yet; the shipped specs exercise the slot registry, mark rendering, and the settings shell separately.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "QiLin 在 Web 客户端侧边栏、会话 hero 与设置品牌槽位的占位实现:由内嵌轮廓绘制的朱红麒麟印章。"
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @qilin-agent/client-ui-brand
|
|
7
|
+
|
|
8
|
+
[English](README.md) | 中文
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
把本插件挂在 [`ui-sidebar`](../ui-sidebar/README.zh.md)、[`ui-conversation`](../ui-conversation/README.zh.md) 与 [`ui-settings-general`](../ui-settings-general/README.zh.md) 旁边,即可用麒麟印章替换通用回退:朱红圆角方框、金色圆环,以及暖白色并排的麒与麟轮廓。内嵌 SVG 无需字体,在浅色与深色表面保持清晰。侧边栏品牌名与版本徽章仍由外壳拥有;设置 About 页面与桌面摘要卡通过根作用域槽位收到同一枚印章。
|
|
13
|
+
|
|
14
|
+
## 目录
|
|
15
|
+
|
|
16
|
+
- [使用本包](#use-this-package)
|
|
17
|
+
- [模型体验](#model-experience)
|
|
18
|
+
- [已知限制与待办](#known-limitations-and-deferred-work)
|
|
19
|
+
- [开发说明](#dev-note)
|
|
20
|
+
|
|
21
|
+
-----
|
|
22
|
+
|
|
23
|
+
<a id="use-this-package"></a>
|
|
24
|
+
## 使用本包
|
|
25
|
+
|
|
26
|
+
`qilin` profile 通过其 bundle 补丁挂载本包,无需配置。插件会等待每条声明链就绪后再占用对应的一组槽位,卸载后恢复外壳回退。设置标识链独立于侧边栏与会话 hero 链。
|
|
27
|
+
|
|
28
|
+
| 槽位 | 占用内容 |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `sidebar.brand.mark` | 按侧边栏请求尺寸渲染的印章 |
|
|
31
|
+
| `conversation.hero.brand.mark` | 按 hero 请求尺寸与摆放类渲染的印章 |
|
|
32
|
+
| `settings.about.mark` | 外壳 About 页面中的印章 |
|
|
33
|
+
|
|
34
|
+
两个字形轮廓与印身、圆环、字形格子的几何现在位于 [`@qilin-agent/client-ui-primitives`](../ui-primitives/README.zh.md)(`seal-glyphs.ts`、`seal-geometry.ts`),让外壳的无品牌兜底画出同一枚印章;[`Seal.tsx`](src/client/Seal.tsx) 用它占据品牌槽位,并为每个实例生成独立的渐变 id。
|
|
35
|
+
|
|
36
|
+
<a id="dev-note"></a>
|
|
37
|
+
## 开发备注
|
|
38
|
+
|
|
39
|
+
无。
|
|
40
|
+
|
|
41
|
+
<a id="model-experience"></a>
|
|
42
|
+
## 模型体验
|
|
43
|
+
|
|
44
|
+
无;印章属于浏览器呈现,不进入模型请求或会话日志。
|
|
45
|
+
|
|
46
|
+
#### KV Cache 影响
|
|
47
|
+
|
|
48
|
+
无;印章不贡献任何提示文本。
|
|
49
|
+
|
|
50
|
+
## 已知限制与待办
|
|
51
|
+
|
|
52
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
53
|
+
|
|
54
|
+
- 印章取自正文字体轮廓,而非设计师的篆书稿。委托绘制的篆书标记只需替换两个路径常量,无需改动组件。
|
|
55
|
+
- 印身渐变、字形填充与圆环颜色是固定常量而非主题令牌:品牌印章必须在浅色与深色表面上读起来一致,因此主题化变体需要一份刻意的第二版图形,而不是替换令牌。
|
|
56
|
+
- 完整组装的设置表层尚无浏览器级断言;随附规格分别覆盖槽位注册、标识渲染和设置外壳。
|
package/lib/client.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@qilin-agent/client-ui-brand",
|
|
3
|
+
factory: (require) => {
|
|
4
|
+
var module = { exports: {} };
|
|
5
|
+
var exports = module.exports;
|
|
6
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let _qilin_agent_client_ui_primitives = require("@qilin-agent/client-ui-primitives");
|
|
9
|
+
//#region lib/types/client/Seal.js
|
|
10
|
+
/**
|
|
11
|
+
* Occupy the sidebar brand-mark slot.
|
|
12
|
+
* @param props - host-supplied mark presentation.
|
|
13
|
+
* @returns the seal at the sidebar's requested size.
|
|
14
|
+
*/
|
|
15
|
+
function QilinSealMark({ size }) {
|
|
16
|
+
return (0, react_jsx_runtime.jsx)(_qilin_agent_client_ui_primitives.QilinSeal, { size });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Occupy the conversation hero's brand-mark slot.
|
|
20
|
+
* @param props - host-supplied mark presentation.
|
|
21
|
+
* @returns the seal at the hero's requested size and placement class.
|
|
22
|
+
*/
|
|
23
|
+
function QilinSealHeroMark({ size, className }) {
|
|
24
|
+
return (0, react_jsx_runtime.jsx)(_qilin_agent_client_ui_primitives.QilinSeal, {
|
|
25
|
+
size,
|
|
26
|
+
className
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region lib/types/client/index.js
|
|
31
|
+
/** QiLin occupants for the generic sidebar and conversation brand slots. */
|
|
32
|
+
/** Required service: the UI slot registry. */
|
|
33
|
+
const inject = ["slots"];
|
|
34
|
+
/**
|
|
35
|
+
* Fill the sidebar and hero brand-mark slots as one declaration-aware
|
|
36
|
+
* registration set. The sidebar brand name keeps the shell's own fallback, so
|
|
37
|
+
* the QiLin label and its build badge stay owned by the shell.
|
|
38
|
+
* @param ctx - Client root context.
|
|
39
|
+
*/
|
|
40
|
+
function apply(ctx) {
|
|
41
|
+
ctx.slots.inject("sidebar.brand.mark", () => ctx.slots.inject("conversation.hero.brand.mark", function* () {
|
|
42
|
+
yield ctx.slots.register({ name: "sidebar.brand.mark" }, QilinSealMark);
|
|
43
|
+
yield ctx.slots.register({ name: "conversation.hero.brand.mark" }, QilinSealHeroMark);
|
|
44
|
+
}));
|
|
45
|
+
ctx.slots.inject("settings.about.mark", () => ctx.slots.register({ name: "settings.about.mark" }, _qilin_agent_client_ui_primitives.QilinSeal));
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.apply = apply;
|
|
49
|
+
exports.inject = inject;
|
|
50
|
+
return module.exports;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=client.js.map
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region lib/types/index.js
|
|
2
|
+
/**
|
|
3
|
+
* QiLin brand plugin, node half. The empty apply gives Loader a host-side row
|
|
4
|
+
* while the browser half ships through `exports["./client"]`.
|
|
5
|
+
*/
|
|
6
|
+
/** Host plugin body — this package contributes browser presentation only. */
|
|
7
|
+
function apply() {}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { apply };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The QiLin seal slot occupants. The drawing itself lives in
|
|
3
|
+
* `@qilin-agent/client-ui-primitives` so the shell's unbranded fallbacks render the
|
|
4
|
+
* same stamp; this module owns the brand slots that place it.
|
|
5
|
+
*/
|
|
6
|
+
import type { HeroBrandMarkOwnerProps } from '@qilin-agent/client-ui-conversation/client';
|
|
7
|
+
import type { SidebarBrandMarkOwnerProps } from '@qilin-agent/client-ui-sidebar/client';
|
|
8
|
+
export { QilinSeal as QilinSealArtist } from '@qilin-agent/client-ui-primitives';
|
|
9
|
+
/**
|
|
10
|
+
* Occupy the sidebar brand-mark slot.
|
|
11
|
+
* @param props - host-supplied mark presentation.
|
|
12
|
+
* @returns the seal at the sidebar's requested size.
|
|
13
|
+
*/
|
|
14
|
+
export declare function QilinSealMark({ size }: SidebarBrandMarkOwnerProps): import("react").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Occupy the conversation hero's brand-mark slot.
|
|
17
|
+
* @param props - host-supplied mark presentation.
|
|
18
|
+
* @returns the seal at the hero's requested size and placement class.
|
|
19
|
+
*/
|
|
20
|
+
export declare function QilinSealHeroMark({ size, className }: HeroBrandMarkOwnerProps): import("react").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=Seal.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** QiLin occupants for the generic sidebar and conversation brand slots. */
|
|
2
|
+
import type { Context as ClientContext } from '@qilin-agent/kylin';
|
|
3
|
+
/** Required service: the UI slot registry. */
|
|
4
|
+
export declare const inject: string[];
|
|
5
|
+
/**
|
|
6
|
+
* Fill the sidebar and hero brand-mark slots as one declaration-aware
|
|
7
|
+
* registration set. The sidebar brand name keeps the shell's own fallback, so
|
|
8
|
+
* the QiLin label and its build badge stay owned by the shell.
|
|
9
|
+
* @param ctx - Client root context.
|
|
10
|
+
*/
|
|
11
|
+
export declare function apply(ctx: ClientContext): void;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QiLin brand plugin, node half. The empty apply gives Loader a host-side row
|
|
3
|
+
* while the browser half ships through `exports["./client"]`.
|
|
4
|
+
*/
|
|
5
|
+
/** Host plugin body — this package contributes browser presentation only. */
|
|
6
|
+
export declare function apply(): void;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-ui-brand",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"description": "QiLin brand occupants for the Web client's sidebar and conversation-hero brand slots: the 麒麟 seal mark",
|
|
4
|
+
"version": "3.1.4",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/kkutysllb/QiLin.git",
|
|
11
|
+
"directory": "packages/client/ui-brand"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "lib/index.js",
|
|
18
|
+
"types": "lib/types/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./lib/types/index.d.ts",
|
|
22
|
+
"default": "./lib/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./client": {
|
|
25
|
+
"types": "./lib/types/client/index.d.ts",
|
|
26
|
+
"default": "./lib/client.js"
|
|
27
|
+
},
|
|
28
|
+
"./src/*": "./src/*",
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"qilin": {
|
|
32
|
+
"client": {
|
|
33
|
+
"inject": [
|
|
34
|
+
"@qilin-agent/client-ui-renderer",
|
|
35
|
+
"@qilin-agent/client-ui-sidebar",
|
|
36
|
+
"@qilin-agent/client-ui-conversation"
|
|
37
|
+
],
|
|
38
|
+
"platform": "web"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@qilin-agent/kylin": "~4.0.3"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@testing-library/react": "^16.1.0",
|
|
47
|
+
"@types/react": "~18.3.1",
|
|
48
|
+
"react": "^18.2.0",
|
|
49
|
+
"react-dom": "^18.2.0",
|
|
50
|
+
"@qilin-agent/kylin": "~4.0.3",
|
|
51
|
+
"@qilin-agent/client-test-runtime": "3.1.4",
|
|
52
|
+
"@qilin-agent/client-ui-conversation": "3.1.4",
|
|
53
|
+
"@qilin-agent/client-ui-renderer": "3.1.4",
|
|
54
|
+
"@qilin-agent/client-ui-primitives": "3.1.4",
|
|
55
|
+
"@qilin-agent/client-ui-sidebar": "3.1.4",
|
|
56
|
+
"@qilin-agent/client-ui-settings": "3.1.4"
|
|
57
|
+
},
|
|
58
|
+
"files": [
|
|
59
|
+
"lib/index.js",
|
|
60
|
+
"lib/client.js",
|
|
61
|
+
"lib/types/**/*.d.ts"
|
|
62
|
+
],
|
|
63
|
+
"scripts": {
|
|
64
|
+
"bundle": "tsdown",
|
|
65
|
+
"watch": "tsdown --watch"
|
|
66
|
+
}
|
|
6
67
|
}
|