@linkdesk/ui 0.2.56 → 0.2.58
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/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +770 -740
- package/dist/plugin-icon/PluginIcon.d.ts +6 -2
- package/dist/plugin-icon/iconUtils.d.ts +13 -1
- package/dist/shell-provenance.json +2 -2
- package/package.json +1 -1
|
@@ -12,13 +12,17 @@
|
|
|
12
12
|
* <PluginIcon pluginId="terminal" manifest={plugin.manifest} className="my-icon-class" />
|
|
13
13
|
* manifest 缺省 → emoji 兜底(池内无 manifest 的历史条目沿用现状)。
|
|
14
14
|
*/
|
|
15
|
-
import { type ManifestIconShape } from "./iconUtils";
|
|
15
|
+
import { type ManifestIconShape, type SharedIconDefault } from "./iconUtils";
|
|
16
16
|
interface PluginIconProps {
|
|
17
17
|
pluginId: string;
|
|
18
18
|
/** 插件 manifest(或其含 icon/iconSource 的子集)——图标唯一裁决来源;缺省 → emoji 兜底 */
|
|
19
19
|
manifest?: ManifestIconShape;
|
|
20
|
+
/** 共享图标定义快照(iconSource: "shared" 按名查——04 内置配置组图标 2026-11-18)。
|
|
21
|
+
* 数据源 = iconTheme:changed 广播的 sharedIcons(宿主默认项 app.group-* + 插件 contributes.icons)。
|
|
22
|
+
* 缺省 / 名字缺省 → emoji 兜底;image 默认项按 **ink 剪影**渲染(mask + --icon-ink 随主题)。 */
|
|
23
|
+
sharedIcons?: Record<string, SharedIconDefault>;
|
|
20
24
|
className?: string;
|
|
21
25
|
alt?: string;
|
|
22
26
|
}
|
|
23
|
-
export declare function PluginIcon({ pluginId, manifest, className, alt }: PluginIconProps): import("react").JSX.Element;
|
|
27
|
+
export declare function PluginIcon({ pluginId, manifest, sharedIcons, className, alt }: PluginIconProps): import("react").JSX.Element;
|
|
24
28
|
export {};
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* 的 icon/iconSource,零运行时依赖、零 window.linkdesk 调用),搬包零行为变化。
|
|
6
6
|
*
|
|
7
7
|
* 消费方:
|
|
8
|
-
* - shared PluginIcon.tsx(组件内 resolvePluginIcon(pluginId, manifest)
|
|
8
|
+
* - shared PluginIcon.tsx(组件内 resolvePluginIcon(pluginId, manifest);iconSource:"shared"
|
|
9
|
+
* 按名查共享图标需调用方注入 sharedIcons 快照——04 内置配置组图标 2026-11-18)
|
|
9
10
|
* - 壳 usePoolSync(iconbar/windowLayout 序列化进 pool 布局前先解析)——两处壳消费维持同源,
|
|
10
11
|
* pool/PluginIcon 不 import pluginLoader/viewRegistry(特权假设已除)。
|
|
11
12
|
*
|
|
@@ -21,6 +22,17 @@ export interface ResolvedIcon {
|
|
|
21
22
|
codicon?: string;
|
|
22
23
|
/** emoji fallback——无 lucide/src/codicon 时用 */
|
|
23
24
|
emoji?: string;
|
|
25
|
+
/** iconSource: "shared"——按名引用 IconRegistry 共享图标(04 内置配置组图标 2026-11-18)。
|
|
26
|
+
* 渲染需调用方注入 sharedIcons 快照(PluginIcon 同名 prop);无快照/名字缺省 → emoji 兜底。 */
|
|
27
|
+
sharedName?: string;
|
|
28
|
+
}
|
|
29
|
+
/** IconContribution.default 的池侧渲染所需最小结构——共享图标定义快照的值形状(零壳依赖,
|
|
30
|
+
* 与壳 core IconContribution.default 结构同构;04 内置配置组图标 2026-11-18) */
|
|
31
|
+
export interface SharedIconDefault {
|
|
32
|
+
fontPath?: string;
|
|
33
|
+
fontCharacter?: string;
|
|
34
|
+
/** 图片资产默认项——PluginIcon 按 **ink 剪影**渲染(mask + --icon-ink,VS Code product-icon 语义) */
|
|
35
|
+
url?: string;
|
|
24
36
|
}
|
|
25
37
|
/** manifest 中图标相关的最小结构——函数只消费这两字段,任何 manifest 形状(完整 PluginManifest /
|
|
26
38
|
* IPC 序列化子集 / 插件列表条目)结构兼容均可直接传入,零跨包类型漂移。 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkdesk/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.58",
|
|
4
4
|
"description": "@linkdesk/ui——LinkDesk 共享 UI 组件的类型契约 + dev 解析体。L9 集中供给:组件代码与样式在运行时由壳池 vendor 单实例供给(壳改一处全生态跟随);npm i 装的是类型与本地解析体,插件源码不 import 本包 css(lint 腿 check-ui-css-import 判红)。版本号自走(E6#166 对货不对号:2026-10-01 起与壳脱钩,壳发版只查作者面货不落后)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|