dsh-chef 0.3.38 → 0.3.39

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
@@ -1183,10 +1183,11 @@ window.__ModuleLoader__.load({
1183
1183
  /** 糙边滤镜 id(文档作用域,故每页只许挂一次 `SealFilterDefs`)。 */
1184
1184
  const ROUGH_EDGE = "dshLifeSealRoughEdge";
1185
1185
  const ROUGH_FRAME = "dshLifeSealRoughFrame";
1186
- const PAPER_BG = "var(--dsw-alias-bg-layer-2, #fdfaf2)";
1187
- const PAPER_EDGE = "var(--dsw-alias-border-l1, #e6d9bd)";
1188
- const LABEL_MAIN = "var(--dsw-alias-label-primary, #42506b)";
1189
- const LABEL_SUB = "var(--dsw-alias-label-secondary, #4b4335)";
1186
+ /** 纸面四色是印自带的(羊皮纸底+ availability 墨色),不跟宿主主题跑——
1187
+ * 深色下宿主变量会把纸染黑,故这里写死定稿值;字族仍继承(定稿零字族)。 */
1188
+ const PAPER_BG = "#fdfaf2";
1189
+ const LABEL_MAIN = "#42506b";
1190
+ const LABEL_SUB = "#4b4335";
1190
1191
  /** 九档材质(3 角色 × 3 档)。键就是原型里的 `role`/`tier`。 */
1191
1192
  const MATERIALS = {
1192
1193
  skill: {
@@ -1316,7 +1317,7 @@ window.__ModuleLoader__.load({
1316
1317
  zIndex: 2,
1317
1318
  borderRadius: "0.25em",
1318
1319
  background: PAPER_BG,
1319
- boxShadow: "0 1px 3px #3d241052, 0 0 0 1px " + PAPER_EDGE + ", inset 0 1px 0 #fffefb"
1320
+ boxShadow: "0 1px 3px #3d241052, 0 0 0 1px #e6d9bd, inset 0 1px 0 #fffefb"
1320
1321
  },
1321
1322
  inner: {
1322
1323
  position: "relative",
@@ -1358,7 +1359,7 @@ window.__ModuleLoader__.load({
1358
1359
  blockDivided: {
1359
1360
  margin: "0 0 0.9375em",
1360
1361
  paddingTop: "0.9375em",
1361
- borderTop: "1px solid " + PAPER_EDGE
1362
+ borderTop: "1px solid #e6d9bd"
1362
1363
  },
1363
1364
  blockLast: { margin: 0 },
1364
1365
  label: {
@@ -1375,21 +1376,23 @@ window.__ModuleLoader__.load({
1375
1376
  letterSpacing: "0.02em",
1376
1377
  color: LABEL_SUB
1377
1378
  },
1378
- /** 弹层遮罩。 */
1379
- mask: {
1380
- position: "fixed",
1381
- inset: 0,
1382
- background: "#241f1966",
1383
- zIndex: 40
1384
- },
1385
- /** 弹层本体:居中,宽度按 em 给(16px 下≈25em)。 */
1379
+ /** 卷轴浮层:卡片内绝对定位(卡片 `S.card` 是 relative 定位祖先),上沿悬在三枚章之下、左右各留半 em——
1380
+ * 不是 modal:无遮罩、不锁滚动,点章切换、点「关闭」收起。 */
1386
1381
  dialog: {
1387
- position: "fixed",
1388
- left: "50%",
1389
- top: "50%",
1390
- transform: "translate(-50%,-50%)",
1382
+ position: "absolute",
1383
+ left: "0.5em",
1384
+ right: "0.5em",
1385
+ top: "8em",
1386
+ zIndex: 10,
1387
+ display: "flex",
1388
+ justifyContent: "center",
1389
+ pointerEvents: "auto"
1390
+ },
1391
+ /** 浮层内框:宽按 em 给(16px 下≈25em),窄卡上收满可用宽,永不捅破卡片。 */
1392
+ popInner: {
1393
+ position: "relative",
1391
1394
  width: "25em",
1392
- zIndex: 50
1395
+ maxWidth: "100%"
1393
1396
  },
1394
1397
  close: {
1395
1398
  position: "absolute",
@@ -1501,7 +1504,7 @@ window.__ModuleLoader__.load({
1501
1504
  style: last ? divided ? {
1502
1505
  ...S$1.blockLast,
1503
1506
  paddingTop: "0.9375em",
1504
- borderTop: "1px solid " + PAPER_EDGE
1507
+ borderTop: "1px solid #e6d9bd"
1505
1508
  } : S$1.blockLast : divided ? S$1.blockDivided : S$1.block
1506
1509
  }, react.createElement("div", { style: {
1507
1510
  ...S$1.label,
@@ -1518,7 +1521,7 @@ window.__ModuleLoader__.load({
1518
1521
  background: material.accent
1519
1522
  } }), line("r", "270")), block("progress", "进展", props.progress, false), block("status", "状态", props.status, true), block("plan", "计划", props.plan, true, true))));
1520
1523
  }
1521
- /** 弹层:遮罩 + 居中卷轴 + 关闭。`open` 为假时不渲染(纯函数,不收自己的状态)。 */
1524
+ /** 卷轴浮层:无遮罩 popover + 卷轴 + 关闭。`open` 为假时不渲染(纯函数,不收自己的状态)。 */
1522
1525
  function SealScrollDialog(props) {
1523
1526
  if (!props.open) return null;
1524
1527
  const scroll = {
@@ -1529,16 +1532,12 @@ window.__ModuleLoader__.load({
1529
1532
  status: props.status,
1530
1533
  plan: props.plan
1531
1534
  };
1532
- return react.createElement(react.Fragment, null, react.createElement("div", {
1533
- style: S$1.mask,
1534
- onClick: props.onClose,
1535
- role: "presentation"
1536
- }), react.createElement("div", {
1535
+ return react.createElement("div", {
1537
1536
  style: S$1.dialog,
1538
1537
  role: "dialog",
1539
- "aria-modal": true,
1538
+ "aria-modal": false,
1540
1539
  "aria-label": props.title
1541
- }, react.createElement("button", {
1540
+ }, react.createElement("div", { style: S$1.popInner }, react.createElement("button", {
1542
1541
  type: "button",
1543
1542
  style: S$1.close,
1544
1543
  onClick: props.onClose
@@ -2391,19 +2390,21 @@ window.__ModuleLoader__.load({
2391
2390
  -.5,
2392
2391
  4.5
2393
2392
  ];
2394
- /** 三枚落位(相对覆盖层右上:HELP 右上/技能左中/插件右下,互不遮挡)。 */
2393
+ /** 三枚落位(卡片坐标:右上/左中/右下三处,互不遮挡)。右上与右下两枚按右钉死——
2394
+ * HELP 是单行最长的一枚,左钉会在窄卡上整体飞出面板右侧,右钉则右边界天然收敛;
2395
+ * 左中那枚按左钉(左钉的章向右长,左边界天然收敛)。 */
2395
2396
  const SPOT = [
2396
2397
  {
2397
- left: "45%",
2398
+ right: "0.2em",
2398
2399
  top: "0.3em"
2399
2400
  },
2400
2401
  {
2401
- left: "5%",
2402
- top: "2.8em"
2402
+ left: "2%",
2403
+ top: "3.2em"
2403
2404
  },
2404
2405
  {
2405
- left: "50%",
2406
- top: "5em"
2406
+ right: "6%",
2407
+ top: "5.6em"
2407
2408
  }
2408
2409
  ];
2409
2410
  const seed = props.sealSeed ?? 0;
@@ -2445,19 +2446,22 @@ window.__ModuleLoader__.load({
2445
2446
  key: seals[dataIndex].role + ":" + seals[dataIndex].tier,
2446
2447
  style: {
2447
2448
  position: "absolute",
2448
- left: SPOT[slot].left,
2449
2449
  top: SPOT[slot].top,
2450
+ ...SPOT[slot].left === void 0 ? { right: SPOT[slot].right } : { left: SPOT[slot].left },
2450
2451
  zIndex: zOfRole(seals[dataIndex].role),
2451
2452
  pointerEvents: "auto",
2452
2453
  display: "inline-flex",
2453
2454
  transform: "rotate(" + tiltOfSlot(slot) + "deg)"
2454
2455
  }
2455
- }, react.createElement(SealStamp, {
2456
+ }, react.createElement("span", { style: {
2457
+ fontSize: "0.8em",
2458
+ display: "inline-flex"
2459
+ } }, react.createElement(SealStamp, {
2456
2460
  role: seals[dataIndex].role,
2457
2461
  tier: seals[dataIndex].tier,
2458
2462
  label: seals[dataIndex].label,
2459
2463
  onSelect: props.onSealSelect === void 0 ? void 0 : props.onSealSelect.bind(null, dataIndex)
2460
- }))));
2464
+ })))));
2461
2465
  const openSeal = props.selectedSeal === null || props.selectedSeal === void 0 ? null : seals[props.selectedSeal] ?? null;
2462
2466
  const dialog = openSeal === null ? null : react.createElement(SealScrollDialog, {
2463
2467
  open: true,
@@ -2922,7 +2926,7 @@ window.__ModuleLoader__.load({
2922
2926
  seals: props.seals,
2923
2927
  sealSeed: props.sealSeed,
2924
2928
  selectedSeal,
2925
- onSealSelect: (index) => setSelectedSeal(index),
2929
+ onSealSelect: (index) => setSelectedSeal((prev) => prev === index ? null : index),
2926
2930
  onSealClose: () => setSelectedSeal(null),
2927
2931
  items: props.items,
2928
2932
  state,