dsh-life-pack 0.3.26 → 0.3.29

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/client.js CHANGED
@@ -1764,6 +1764,84 @@ window.__ModuleLoader__.load({
1764
1764
  return rows.find((row) => row.error !== null)?.error ?? null;
1765
1765
  }
1766
1766
  //#endregion
1767
+ //#region src/title-seal.ts
1768
+ /** 共用标题 + 印章书签 · 纯组件(#996,不认任何一家)。
1769
+ *
1770
+ * 来源:原型 #995 变体 A(行尾悬签,人裁已定形)——标题左、签贴同行行尾向右探出。
1771
+ * 用它的有两家(共用件的第二个用法从这里长出来):`config-panel-view.ts` 的 `PanelBody`
1772
+ * (`product`=各家产品名/`purpose`=`配置`)与 `health-view.ts` 的 `HealthTable`
1773
+ * (`product`=各家产品名/`purpose`=`体检`)。别处要同形标题才用它,用不出来就留在那两家。
1774
+ *
1775
+ * 形状(逐值照原型锁死,不许自己重新设计):
1776
+ * 标题:同行双样式、无 `·`——`product` 700/1.15em 主色 + `purpose` 400/0.85em 次色,
1777
+ * 同行基线、`gap .5em`(16px 下=8px,满足地图 8px),整块 `h2`(`aria-label`=`product purpose`)。
1778
+ * 字号取原型锁(地图 Notes 写 1.08em/640 是 grill 共识早值,原型后锁 1.15em/700,以原型为准)。
1779
+ * 签:横向书签固定色 `#a5281b` 白字、`clip-path` 右端 V 尾切角 + 微旋 `-3°`、
1780
+ * `white-space:pre` 保空格、`role="note"` 纯展示不可点(无点击、无 tabindex)。
1781
+ * 印文由调用方交 `sealText`(显示形一律带空格大写 HELP,空格=U+0020,997 接线)。
1782
+ *
1783
+ * 纪律(#739/#941):
1784
+ * 零字族(无 `fontFamily`、无 `font:` 简写)、字号一律 em;颜色走 DSH 主题别名,
1785
+ * 唯签固定色沿 health 红黄固定色先例(纸变印不变,印不管纸面派生)。
1786
+ *
1787
+ * 本件是纯函数:吃 props 回元素树,不留状态、不取数。手写 `React.createElement`(本包 client 束禁 JSX)。
1788
+ */
1789
+ const S$2 = {
1790
+ /** 整块 `h2`:同行基线双样式容器(原型 `.titleblock`;`flex:1 1 auto` 把签顶到行尾,390 宽可换行不挤)。 */
1791
+ titleBlock: {
1792
+ display: "flex",
1793
+ flexWrap: "wrap",
1794
+ alignItems: "baseline",
1795
+ gap: "0 0.5em",
1796
+ margin: 0,
1797
+ fontSize: "1em",
1798
+ lineHeight: 1.5,
1799
+ flex: "1 1 auto",
1800
+ minWidth: "9em"
1801
+ },
1802
+ /** 产品名(原型 `.product`:700/1.15em 主色)。 */
1803
+ product: {
1804
+ fontSize: "1.15em",
1805
+ fontWeight: 700,
1806
+ color: "var(--dsw-alias-label-primary, #f9fafb)"
1807
+ },
1808
+ /** 用途(原型 `.purpose`:400/0.85em 次色)。 */
1809
+ purpose: {
1810
+ fontSize: "0.85em",
1811
+ fontWeight: 400,
1812
+ color: "var(--dsw-alias-label-secondary, #9a9a9a)"
1813
+ },
1814
+ /** 签(原型 `.seal`:固定印色+右端 V 尾+微旋,纯展示)。 */
1815
+ seal: {
1816
+ display: "inline-block",
1817
+ flexShrink: 0,
1818
+ fontSize: "0.78em",
1819
+ lineHeight: 1.6,
1820
+ color: "#fff",
1821
+ background: "#a5281b",
1822
+ padding: "0.15em 0.9em 0.15em 0.8em",
1823
+ whiteSpace: "pre",
1824
+ transform: "rotate(-3deg)",
1825
+ clipPath: "polygon(0 0, calc(100% - 0.65em) 0, 100% 50%, calc(100% - 0.65em) 100%, 0 100%)"
1826
+ }
1827
+ };
1828
+ /** 标题分层(同行双样式,无 `·`,整块 `h2`)。 */
1829
+ function TitleBlock(props) {
1830
+ const label = (props.product + " " + props.purpose).trim();
1831
+ return react.createElement("h2", {
1832
+ style: S$2.titleBlock,
1833
+ "aria-label": label
1834
+ }, react.createElement("span", { style: S$2.product }, props.product), react.createElement("span", { style: S$2.purpose }, props.purpose));
1835
+ }
1836
+ /** 印章书签(横向固定印,纯展示)。 */
1837
+ function Seal(props) {
1838
+ return react.createElement("span", {
1839
+ style: S$2.seal,
1840
+ role: "note",
1841
+ "aria-label": props.sealText
1842
+ }, props.sealText);
1843
+ }
1844
+ //#endregion
1767
1845
  //#region src/health-view.ts
1768
1846
  /** 配置体检的两个画法:面板顶部那行总览(六家一盏灯)+ 各家那张表。
1769
1847
  *
@@ -2117,10 +2195,14 @@ window.__ModuleLoader__.load({
2117
2195
  function HealthTable(props) {
2118
2196
  const { report } = props;
2119
2197
  const prefixes = report ? dirPrefixesOf(report) : [];
2198
+ const seal = props.sealText === void 0 || props.sealText === "" ? null : react.createElement(Seal, { sealText: props.sealText });
2120
2199
  return react.createElement("div", {
2121
2200
  style: HEALTH_STYLE.box,
2122
2201
  "data-ilife-health": "table"
2123
- }, react.createElement("div", { style: HEALTH_STYLE.headRow }, react.createElement("div", { style: HEALTH_STYLE.head }, props.title + " · 体检"), report ? headerCounts(report) : null), props.phase === "idle" ? react.createElement("div", { style: HEALTH_STYLE.meta }, "还没体检:点上面那个「体检一次」。") : null, props.phase === "running" ? react.createElement("div", { style: HEALTH_STYLE.meta }, "正在体检…") : null, props.error !== null ? react.createElement("div", { style: HEALTH_STYLE.error }, props.error) : null, report ? react.createElement("div", null, report.dataDir !== "" ? react.createElement("div", { style: {
2202
+ }, react.createElement("div", { style: HEALTH_STYLE.headRow }, react.createElement(TitleBlock, {
2203
+ product: props.title,
2204
+ purpose: "体检"
2205
+ }), seal, report ? headerCounts(report) : null), props.phase === "idle" ? react.createElement("div", { style: HEALTH_STYLE.meta }, "还没体检:点上面那个「体检一次」。") : null, props.phase === "running" ? react.createElement("div", { style: HEALTH_STYLE.meta }, "正在体检…") : null, props.error !== null ? react.createElement("div", { style: HEALTH_STYLE.error }, props.error) : null, report ? react.createElement("div", null, report.dataDir !== "" ? react.createElement("div", { style: {
2124
2206
  color: INK_DIM,
2125
2207
  fontSize: 11.5,
2126
2208
  marginTop: 2
@@ -3178,7 +3260,7 @@ window.__ModuleLoader__.load({
3178
3260
  }, react.createElement("span", { style: S.morePkg }, row.pkg), react.createElement("span", { style: S.moreDesc }, row.desc), react.createElement("span", { style: S.moreIcon }, react.createElement(ExternalIcon, null)))));
3179
3261
  }
3180
3262
  /** 版本胶囊那一行字:只在这里拼一次,屏上与用例读的是同一串。 */
3181
- const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.25";
3263
+ const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.29";
3182
3264
  /** 爱生活面板:总设置区 + 检查更新(七家)+ 爱生活页签条(slot 驱动)+ 技能设置页投影/缺席卡。 */
3183
3265
  function LifePackSection(props) {
3184
3266
  const tabsId = react.useId();
@@ -3322,6 +3404,7 @@ window.__ModuleLoader__.load({
3322
3404
  style: selected ? void 0 : { display: "none" }
3323
3405
  }, present.has(tab.plugin) ? react.createElement("div", { style: S.tabStack }, props.renderSlot(CONFIG_TAB_SLOT, {}, { only: tab.plugin }), react.createElement(HealthTable, {
3324
3406
  title: labelFor(tab),
3407
+ sealText: labelFor(tab) + " HELP",
3325
3408
  phase: health.rows[tab.plugin]?.phase ?? "idle",
3326
3409
  report: health.rows[tab.plugin]?.report ?? null,
3327
3410
  error: health.rows[tab.plugin]?.error ?? null