@linkdesk/contracts 0.1.20 → 0.1.22

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.
Files changed (2) hide show
  1. package/linkdesk.d.ts +73 -6
  2. package/package.json +1 -1
package/linkdesk.d.ts CHANGED
@@ -1646,6 +1646,18 @@ export type PoolReleaseNotesData = {
1646
1646
  listUrl?: string;
1647
1647
  /** 左窄栏历史(倒序,含选中那版) */
1648
1648
  historical: PoolReleaseNotesHistoryItem[];
1649
+ /**
1650
+ * 「刷新中」相位(04「发行说明刷新按钮」)——壳推下来,**池不自己判**(同 `state` 规矩):
1651
+ * `true` = 刷新在途 ⇒ 头部按钮转圈 + 禁用 + `aria-busy`,**正文保持旧内容**(不回骨架)。
1652
+ * `undefined` = 不在刷新中。
1653
+ */
1654
+ refreshing?: boolean;
1655
+ /**
1656
+ * 刷新结果注记(壳 `t()` 完整句,含数据的文本归壳)——`undefined` = 不画。
1657
+ * 三种:「已是最新」/「已发现新版本 {{version}}…」/「刷新失败 · 正在显示本地缓存」。
1658
+ * 只在 force 那一趟组装 ⇒ 普通取数(切版本/重试)不残留。
1659
+ */
1660
+ refreshNote?: string;
1649
1661
  /**
1650
1662
  * 首启自动弹横幅的**整句文案**(壳 `t()` 完,含版本号)——`undefined` = 不画横幅。
1651
1663
  *
@@ -1689,10 +1701,29 @@ export type PoolReleaseNotesData = {
1689
1701
  * 反之若池自持标签表,加字段就得壳池两处同改,且两处的顺序随时可能漂移。
1690
1702
  */
1691
1703
  export interface PoolAboutField {
1692
- /** 字段名(壳 `t()` 完)——如「版本」「Electron」 */
1704
+ /** 字段名(壳 `t()` 完)——如「提交」「Electron」「邮箱」 */
1693
1705
  label: string;
1694
1706
  /** 字段值——原样展示,壳不加工(`app.getVersion()` 的**纯**版本号,不带 VS Code 那种 `(user setup)` 后缀) */
1695
1707
  value: string;
1708
+ /**
1709
+ * 存在 = 该值是**链接**(04「关于页重设计」②原则「身份/联系方式/出处一律可点」):
1710
+ * `mailto:` → 池画 `<a href>`(全局外链路由 `EXTERNAL_PROTOCOLS` 含 mailto → openEmail);
1711
+ * `https` → 外链(`target="_blank"`,同一路由转系统浏览器,软件本身不导航离开)。
1712
+ * `undefined` = 纯文本(提交哈希 / 版本串这类机器产出值,不可点也不该点)。
1713
+ */
1714
+ href?: string;
1715
+ /**
1716
+ * true = 值降一档色(`--text-secondary`)——作者卡**备用邮箱**行用(04 设计 §三②:主走链接色、
1717
+ * 备降一档,主次靠顺序 + 颜色双表达;mockup 的 `.mail--secondary` 同款)。`undefined` = 正常档。
1718
+ */
1719
+ secondary?: boolean;
1720
+ }
1721
+ /** 关于页卡片区的一张卡(04 设计 §四.1 ③:本版本 / 运行环境 / 作者——版心 640 内齐宽) */
1722
+ export interface PoolAboutCard {
1723
+ /** 卡标题(壳 `t()` 完)——如「本版本」「运行环境」「作者」 */
1724
+ title: string;
1725
+ /** 卡内行——卡内文本**左对齐**(04 拍板①:版心居中 ≠ 每行居中,key: value 要竖线) */
1726
+ rows: PoolAboutField[];
1696
1727
  }
1697
1728
  /**
1698
1729
  * 关于标签页的壳→池数据——**两态判别联合**(06 §4.2 的布局无第三态)。
@@ -1726,8 +1757,25 @@ export type PoolAboutData = {
1726
1757
  * (标题栏一个、关于页一个)。故改用真资产:**品牌标全仓只有一个文件、一处规则**。
1727
1758
  */
1728
1759
  logoUrl: string;
1729
- /** 字段表——顺序即渲染顺序,壳定 */
1730
- fields: PoolAboutField[];
1760
+ /** HERO 版本药丸(04 设计 §四.1:版本从字段表提到名字旁——这一页被打开的原因要一眼看到) */
1761
+ version: string;
1762
+ /** HERO 定位句(壳 `t()` 完整句——拍板⑤文案「一个容器,装下你所有的工作方式」;它是标签、要翻译) */
1763
+ tagline: string;
1764
+ /**
1765
+ * 卡片区(04 设计 §四.1 ③:版心 640 内齐宽的三张卡)——壳组好、池只 `map`。
1766
+ * 作者卡**整块缺席** = `product.author` 形状不合法(保底:不画整卡,不是画一屏 `—`)⇒ 2 或 3 张。
1767
+ */
1768
+ cards: PoolAboutCard[];
1769
+ /**
1770
+ * 页脚版权行(壳侧组装的完整句——`© ${年份} ${product.author.copyrightHolder} · MIT License`)。
1771
+ * `undefined` = 不画(author 块缺席 ⇒ 版权行没有署名主体,与作者卡同生共死)。
1772
+ */
1773
+ footerCopyright?: string;
1774
+ /**
1775
+ * 页脚「在 GitHub 查看源码」目标——由 `updateUrl` 推(owner/repo 段 → `github.com/O/R`,
1776
+ * **不写死仓库地址**,`useReleaseNotes.listPageUrl()` 同源推导);`undefined` = 不画(同「空链接比没有链接更糟」)。
1777
+ */
1778
+ repoUrl?: string;
1731
1779
  };
1732
1780
  /** 标签页在池中的表示——壳 pushLayout 时序列化 */
1733
1781
  export interface PoolTab {
@@ -1735,6 +1783,12 @@ export interface PoolTab {
1735
1783
  pluginId: string;
1736
1784
  title: string;
1737
1785
  sourceId?: string;
1786
+ /** 标签 tooltip 文案——**只给人看**(有才用;无 ⇒ 池侧回落 `title` +「双击固定」后缀)。
1787
+ * 🔴 2026-09-27:⛔ 别拿 `sourceId` 当文案——它是跨组移动/事件寻址/插件绑数据的**功能键**
1788
+ * (插件 API `tabs.closeBySourceId` 认的就是它),插件标签上常是 `settings-2`、`serial-monitor-49`
1789
+ * 这类内部 id,收编 HintTip 时曾被原样印在 tooltip 上。壳 serializeGroups 现场解析:
1790
+ * 文件标签 → 完整路径(E5#53 原意),其余 → `undefined`。 */
1791
+ hint?: string;
1738
1792
  dirty?: boolean;
1739
1793
  // 🆕 E5.6#16.5:TabBar 渲染所需元数据
1740
1794
  /** 标签图标——IconBarIcon 判别联合(E6#69f/#69g:视图标签 = Type-2 身份图 img;文件标签 = 文件类型图标
@@ -1992,10 +2046,18 @@ export interface StatusBarLayout {
1992
2046
  notif: NotifLayout;
1993
2047
  }
1994
2048
  /**
1995
- * PoolLayout v2——E5.7 唯一的 Pool 收到全量布局快照。
1996
- * titleBar 必有(窗口 chrome——池恒渲染);iconBar/sidebar/statusBar/panel/rightSidebar 可选——
1997
- * 主池恒推全量,脱出窗(E5.8#43-2 窗口模式策略表)只推 titleBar+groups 子集(池按字段条件渲染,无空列/空条)。
2049
+ * 04「悬停提示系统」件 1:命令表——`commandId → { title, keybinding }`,供 `data-hint-command` 自动补文案与快捷键。
2050
+ *
2051
+ * **必须与菜单同源**:菜单今天读的是 `usePoolSync/titlebar.ts` 的「注册表 + formatKeyLabel」,
2052
+ * 提示条若另拉一份(池侧再查一次注册表)⇒ 同一命令在两处显示不同快捷键
2053
+ * (memory `two-rulers-one-caliber`:同一判断实现两遍 = 假红让真红失效)。
2054
+ * ⇒ 壳侧 `usePoolSync/hints.ts` 一次算好推下来,池**哑渲染**(显示文本铁律)。
2055
+ * `keybinding` 是**壳已格式化**的串(`"Ctrl+K Ctrl+T"`)——池不 import `src/core/*`(Path B)。
1998
2056
  */
2057
+ export type PoolCommandHints = Record<string, {
2058
+ title: string;
2059
+ keybinding?: string;
2060
+ }>;
1999
2061
  export interface PoolLayout {
2000
2062
  version: 2;
2001
2063
  titleBar: TitleBarLayout;
@@ -2018,6 +2080,11 @@ export interface PoolLayout {
2018
2080
  panel?: PanelLayout;
2019
2081
  /** 状态栏——缺省 = 池不渲染该 zone(脱出窗子集;主池恒推) */
2020
2082
  statusBar?: StatusBarLayout;
2083
+ /** 04「悬停提示系统」件 1:提示条总开关(`app.hint.enabled` 的镜像)。
2084
+ * 缺省/undefined = **开**——脱出窗或未推送时不该「因为没这个字段」就全软件没提示。 */
2085
+ hintEnabled?: boolean;
2086
+ /** 04「悬停提示系统」件 1:命令表——`data-hint-command` 的自动补文案与快捷键来源。窗口无关 ⇒ 恒推。 */
2087
+ commands?: PoolCommandHints;
2021
2088
  }
2022
2089
  /**
2023
2090
  * 池→壳侧栏动作 wire 契约——E5.7#97。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linkdesk/contracts",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "LinkDesk 插件契约类型——window.linkdesk.* 全量类型定义(E5.8 契约生成产物)。第三方插件作者唯一合法类型消费路径。",
5
5
  "type": "module",
6
6
  "types": "./linkdesk.d.ts",