@huaqiu/dsh-hardware-ui 0.7.19 → 0.7.20

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/lib/client.js CHANGED
@@ -288,6 +288,8 @@ window.__ModuleLoader__.load({
288
288
  "wizard.solidcraftChip": "可选 · MCAD",
289
289
  "wizard.solidcraftBlurb": "提供结构外壳上下文与 3D CAD 互操作能力。",
290
290
  "wizard.selectFile": "选择本地文件…",
291
+ "wizard.ready": "✓ 就绪(v{label})",
292
+ "wizard.readyDetected": "✓ 就绪(已检测)",
291
293
  "wizard.dontHave": "还没有 {name}?",
292
294
  "wizard.serverDownload": "从 HuaQiu 服务器下载",
293
295
  "wizard.footer": "你随时可以在「设置 → 硬件工程」中配置或更新这些路径",
@@ -298,6 +300,8 @@ window.__ModuleLoader__.load({
298
300
  "settings.statusVerified": "已验证可执行文件",
299
301
  "settings.statusAwaiting": "等待可执行文件路径",
300
302
  "settings.statusUnsaved": "未保存 · 点「校验并保存」",
303
+ "settings.statusSavedBadge": "已保存 v{version}",
304
+ "settings.statusSavedPlain": "已保存",
301
305
  "settings.downloadKicad": "下载 KiCad(v{version})",
302
306
  "settings.downloadSolidCraft": "下载 SolidCraft(v{version})",
303
307
  "toolchain.downloading": "正在从 down.eda.cn 下载…",
@@ -559,6 +563,8 @@ window.__ModuleLoader__.load({
559
563
  "wizard.solidcraftChip": "Optional • MCAD",
560
564
  "wizard.solidcraftBlurb": "Provides structural enclosure context and 3D CAD interoperability.",
561
565
  "wizard.selectFile": "Select Local File...",
566
+ "wizard.ready": "✓ Ready (v{label})",
567
+ "wizard.readyDetected": "✓ Ready (Detected)",
562
568
  "wizard.dontHave": "Don't have {name}?",
563
569
  "wizard.serverDownload": "Download from HuaQiu Server",
564
570
  "wizard.footer": "You can configure or update these anytime in Settings → Hardware Engineering",
@@ -569,6 +575,8 @@ window.__ModuleLoader__.load({
569
575
  "settings.statusVerified": "Verified executable",
570
576
  "settings.statusAwaiting": "Awaiting executable path",
571
577
  "settings.statusUnsaved": "Not saved · click Validate and save",
578
+ "settings.statusSavedBadge": "Saved v{version}",
579
+ "settings.statusSavedPlain": "Saved",
572
580
  "settings.downloadKicad": "Download KiCad (v{version})",
573
581
  "settings.downloadSolidCraft": "Download SolidCraft (v{version})",
574
582
  "toolchain.downloading": "Downloading from down.eda.cn...",
@@ -1089,6 +1097,15 @@ window.__ModuleLoader__.load({
1089
1097
  get selectFile() {
1090
1098
  return translateCopy("wizard.selectFile");
1091
1099
  },
1100
+ /**
1101
+ * The prototype's wizard badge once a tool is usable: `✓ Ready (v10.0.7)`.
1102
+ * It says "ready", not "configured", because the wizard is about what the user
1103
+ * can start using now — a path the Host just validated counts, saved or not.
1104
+ */
1105
+ ready: (label) => translateCopy("wizard.ready", { label }),
1106
+ get readyDetected() {
1107
+ return translateCopy("wizard.readyDetected");
1108
+ },
1092
1109
  dontHave: (name) => translateCopy("wizard.dontHave", { name }),
1093
1110
  get serverDownload() {
1094
1111
  return translateCopy("wizard.serverDownload");
@@ -1163,6 +1180,11 @@ window.__ModuleLoader__.load({
1163
1180
  get statusUnsaved() {
1164
1181
  return translateCopy("settings.statusUnsaved");
1165
1182
  },
1183
+ /** The fading success badge that replaces the (no longer printed) path line. */
1184
+ statusSavedBadge: (version) => translateCopy("settings.statusSavedBadge", { version }),
1185
+ get statusSavedPlain() {
1186
+ return translateCopy("settings.statusSavedPlain");
1187
+ },
1166
1188
  download: (tool, version) => tool === "kicad" ? translateCopy("settings.downloadKicad", { version }) : translateCopy("settings.downloadSolidCraft", { version })
1167
1189
  },
1168
1190
  /**
@@ -146388,6 +146410,10 @@ void main() {
146388
146410
  const TOAST_MS = 7e3;
146389
146411
  /** Poll cadence while a job or a discovery run is live. */
146390
146412
  const POLL_MS = 700;
146413
+ /** How long a typed path must settle before its validity is asked of the Host. */
146414
+ const CHECK_MS = 500;
146415
+ /** How long the "saved" badge stays on a card after the Host accepted the write. */
146416
+ const CONFIRM_MS = 6e3;
146391
146417
  const EMPTY_DRAFTS = {
146392
146418
  kicad: "",
146393
146419
  solidcraft: ""
@@ -146447,6 +146473,8 @@ void main() {
146447
146473
  loading: true,
146448
146474
  jobs: {},
146449
146475
  drafts: EMPTY_DRAFTS,
146476
+ checks: {},
146477
+ confirmed: {},
146450
146478
  toasts: []
146451
146479
  };
146452
146480
  listeners = /* @__PURE__ */ new Set();
@@ -146459,6 +146487,12 @@ void main() {
146459
146487
  phases = /* @__PURE__ */ new Map();
146460
146488
  /** The job id each tool's card is watching; the poll asks for all of them at once. */
146461
146489
  watched = /* @__PURE__ */ new Map();
146490
+ /** Debounce timers for the input's own validity check, one per tool. */
146491
+ checkTimers = /* @__PURE__ */ new Map();
146492
+ /** Per-tool sequence so a late answer cannot overwrite a newer verdict. */
146493
+ checkSeq = /* @__PURE__ */ new Map();
146494
+ /** Timers that retract the "saved" badge after {@link CONFIRM_MS}. */
146495
+ confirmTimers = /* @__PURE__ */ new Map();
146462
146496
  constructor(transport = HOST_TRANSPORT, pollMs = POLL_MS) {
146463
146497
  this.transport = transport;
146464
146498
  this.pollMs = pollMs;
@@ -146495,6 +146529,10 @@ void main() {
146495
146529
  this.timer = void 0;
146496
146530
  for (const timer of this.timers.values()) clearTimeout(timer);
146497
146531
  this.timers.clear();
146532
+ for (const timer of this.checkTimers.values()) clearTimeout(timer);
146533
+ this.checkTimers.clear();
146534
+ for (const timer of this.confirmTimers.values()) clearTimeout(timer);
146535
+ this.confirmTimers.clear();
146498
146536
  this.listeners.clear();
146499
146537
  }
146500
146538
  /** Read the Host status, asking about every job a card is watching. */
@@ -146516,12 +146554,24 @@ void main() {
146516
146554
  solidcraft
146517
146555
  };
146518
146556
  const jobs = collectJobs(status, this.snapshot.jobs);
146557
+ const checks = { ...this.snapshot.checks };
146558
+ if ((kicad ?? solidcraft) !== void 0) {
146559
+ if (kicad !== void 0) checks.kicad = {
146560
+ state: "valid",
146561
+ installPath: kicad
146562
+ };
146563
+ if (solidcraft !== void 0) checks.solidcraft = {
146564
+ state: "valid",
146565
+ installPath: solidcraft
146566
+ };
146567
+ }
146519
146568
  this.set({
146520
146569
  status,
146521
146570
  loading: false,
146522
146571
  error: void 0,
146523
146572
  drafts,
146524
- jobs
146573
+ jobs,
146574
+ checks
146525
146575
  });
146526
146576
  for (const job of Object.values(jobs)) if (job !== void 0) this.noteJob(job);
146527
146577
  for (const [tool, id] of this.watched) {
@@ -146746,18 +146796,146 @@ void main() {
146746
146796
  nativePending: false
146747
146797
  } : void 0 });
146748
146798
  }
146749
- /** Type a path without persisting it. */
146799
+ /**
146800
+ * Type a path without persisting it, and ask the Host whether it is usable.
146801
+ *
146802
+ * The verdict is not cosmetic: the wizard's primary button is enabled only
146803
+ * when a tool is configured or one input has been verified, so this check is
146804
+ * what keeps "greyed out" honest instead of guessing from the text.
146805
+ */
146750
146806
  setDraft(tool, value) {
146751
146807
  this.set({ drafts: this.withDraft(tool, value) });
146808
+ this.scheduleCheck(tool, value);
146809
+ }
146810
+ /** Debounce a validity check for the text that just changed. */
146811
+ scheduleCheck(tool, value) {
146812
+ const pending = this.checkTimers.get(tool);
146813
+ if (pending !== void 0) {
146814
+ clearTimeout(pending);
146815
+ this.checkTimers.delete(tool);
146816
+ }
146817
+ const text = value.trim();
146818
+ if (text === "") {
146819
+ this.patchCheck(tool, void 0);
146820
+ return;
146821
+ }
146822
+ const root = this.roots[tool];
146823
+ if (root !== "" && text === root) {
146824
+ this.patchCheck(tool, {
146825
+ state: "valid",
146826
+ installPath: root
146827
+ });
146828
+ return;
146829
+ }
146830
+ const known = this.knownVersion(tool, text);
146831
+ if (known !== void 0) {
146832
+ this.patchCheck(tool, {
146833
+ state: "valid",
146834
+ version: known
146835
+ });
146836
+ return;
146837
+ }
146838
+ this.patchCheck(tool, { state: "pending" });
146839
+ const timer = setTimeout(() => {
146840
+ this.checkTimers.delete(tool);
146841
+ this.runCheck(tool, text);
146842
+ }, CHECK_MS);
146843
+ this.checkTimers.set(tool, timer);
146844
+ }
146845
+ /** A discovered, already-validated executable: no process needs to run again. */
146846
+ knownVersion(tool, text) {
146847
+ const match = (this.snapshot.status?.[tool].discovery.candidates ?? []).find((candidate) => candidate.valid && candidate.path === text);
146848
+ return match?.version ?? (match === void 0 ? void 0 : "?");
146849
+ }
146850
+ /** Ask the Host about one path and record the verdict if it is still current. */
146851
+ async runCheck(tool, text) {
146852
+ if (this.stopped) return;
146853
+ const seq = (this.checkSeq.get(tool) ?? 0) + 1;
146854
+ this.checkSeq.set(tool, seq);
146855
+ let outcome;
146856
+ try {
146857
+ outcome = await this.transport.validate(tool, text);
146858
+ } catch (error) {
146859
+ outcome = {
146860
+ ok: false,
146861
+ error: messageOf$2(error)
146862
+ };
146863
+ }
146864
+ if (this.stopped || this.checkSeq.get(tool) !== seq) return;
146865
+ if (this.snapshot.drafts[tool].trim() !== text) return;
146866
+ this.patchCheck(tool, outcome.ok ? {
146867
+ state: "valid",
146868
+ ...outcome.installPath === void 0 ? {} : { installPath: outcome.installPath },
146869
+ ...outcome.version === void 0 ? {} : { version: outcome.version }
146870
+ } : {
146871
+ state: "invalid",
146872
+ ...outcome.error === void 0 ? {} : { error: outcome.error }
146873
+ });
146874
+ }
146875
+ /** Replace (or drop, with `undefined`) one tool's verdict. */
146876
+ patchCheck(tool, check) {
146877
+ const next = { ...this.snapshot.checks };
146878
+ if (check === void 0) delete next[tool];
146879
+ else next[tool] = check;
146880
+ this.set({ checks: next });
146881
+ }
146882
+ /**
146883
+ * Show the success badge for a write the Host accepted, then retract it.
146884
+ *
146885
+ * The badge replaces the verdict line, so the card stops shouting the full
146886
+ * executable path (or "not saved") about a path that is in fact saved.
146887
+ */
146888
+ confirm(tool, version) {
146889
+ this.clearConfirm(tool);
146890
+ this.set({ confirmed: {
146891
+ ...this.snapshot.confirmed,
146892
+ [tool]: {
146893
+ at: Date.now(),
146894
+ ...version === void 0 ? {} : { version }
146895
+ }
146896
+ } });
146897
+ const timer = setTimeout(() => {
146898
+ this.confirmTimers.delete(tool);
146899
+ this.clearConfirm(tool);
146900
+ }, CONFIRM_MS);
146901
+ this.confirmTimers.set(tool, timer);
146902
+ }
146903
+ clearConfirm(tool) {
146904
+ const timer = this.confirmTimers.get(tool);
146905
+ if (timer !== void 0) {
146906
+ clearTimeout(timer);
146907
+ this.confirmTimers.delete(tool);
146908
+ }
146909
+ if (this.snapshot.confirmed[tool] === void 0) return;
146910
+ const next = { ...this.snapshot.confirmed };
146911
+ delete next[tool];
146912
+ this.set({ confirmed: next });
146752
146913
  }
146753
146914
  /** Validate and persist one path through the Host (§6.3). */
146754
146915
  async save(tool, path, source = "manual") {
146755
146916
  const name = tool === "kicad" ? "KiCad" : "SolidCraft";
146756
146917
  this.set({ saving: tool });
146918
+ this.clearConfirm(tool);
146757
146919
  try {
146758
146920
  const outcome = await this.transport.save(tool, path, source);
146759
- if (outcome.ok) this.toast("ok", COPY.toolchain.toastSaved(name, outcome.version ?? "?"));
146760
- else this.toast("warn", COPY.toolchain.toastInvalid(name, outcome.error ?? COPY.toolchain.notDetected));
146921
+ if (outcome.ok) {
146922
+ const accepted = outcome.installPath ?? path.trim();
146923
+ this.roots[tool] = accepted;
146924
+ if (this.snapshot.drafts[tool].trim() !== accepted) this.set({ drafts: this.withDraft(tool, accepted) });
146925
+ this.patchCheck(tool, {
146926
+ state: "valid",
146927
+ installPath: accepted,
146928
+ ...outcome.version === void 0 ? {} : { version: outcome.version }
146929
+ });
146930
+ this.confirm(tool, outcome.version);
146931
+ this.toast("ok", COPY.toolchain.toastSaved(name, outcome.version ?? "?"));
146932
+ } else {
146933
+ this.patchCheck(tool, {
146934
+ state: "invalid",
146935
+ ...outcome.error === void 0 ? {} : { error: outcome.error }
146936
+ });
146937
+ this.toast("warn", COPY.toolchain.toastInvalid(name, outcome.error ?? COPY.toolchain.notDetected));
146938
+ }
146761
146939
  await this.refresh();
146762
146940
  return outcome;
146763
146941
  } catch (error) {
@@ -146951,6 +147129,43 @@ void main() {
146951
147129
  };
146952
147130
  }
146953
147131
  }
147132
+ /**
147133
+ * The wizard's badge, which is about **readiness**, not configuration.
147134
+ *
147135
+ * The prototype reads `✓ Ready (v10.0.7)`. The wizard is the first-run surface,
147136
+ * so it must light up as soon as the user has a tool it can actually use —
147137
+ * whether that came from a saved root, a path the Host just validated, or an
147138
+ * executable discovery already checked. Only when none of those hold does it fall
147139
+ * back to the state pill (`Not configured`, a running download, a failure), which
147140
+ * is also what it shows while a job is in flight.
147141
+ */
147142
+ function wizardPill(tool, job, check) {
147143
+ const statePill = statusPill(tool, job);
147144
+ if (job !== void 0 && job.tool === tool.tool && (jobRunning(job) || job.phase === "failed")) return statePill;
147145
+ const detected = tool.discovery?.selected;
147146
+ const saved = tool.installPath !== void 0 && tool.version !== void 0 && tool.state !== "invalid";
147147
+ if (!(tool.state === "configured" || saved || check?.state === "valid" || detected?.valid === true)) return statePill;
147148
+ const version = tool.state === "configured" || saved ? tool.version : check?.state === "valid" ? check.version : detected?.version;
147149
+ return {
147150
+ text: version === void 0 ? COPY.wizard.readyDetected : COPY.wizard.ready(version),
147151
+ tone: "ok"
147152
+ };
147153
+ }
147154
+ /** One line of verdict text beside the validate button; never a filesystem path. */
147155
+ function textVerdict(text, color) {
147156
+ return (0, react.createElement)("span", {
147157
+ style: {
147158
+ ...MONO_TEXT,
147159
+ fontSize: 11,
147160
+ color,
147161
+ maxWidth: 260,
147162
+ overflow: "hidden",
147163
+ textOverflow: "ellipsis",
147164
+ whiteSpace: "nowrap"
147165
+ },
147166
+ title: text
147167
+ }, text);
147168
+ }
146954
147169
  /** One line describing what discovery found, or that it is still looking. */
146955
147170
  function discoveryLine(tool) {
146956
147171
  const discovery = tool.discovery;
@@ -147044,10 +147259,11 @@ void main() {
147044
147259
  const draft = snapshot.drafts[id];
147045
147260
  const saving = snapshot.saving === id;
147046
147261
  const running = jobRunning(job);
147262
+ const check = snapshot.checks[id];
147047
147263
  const pill = tool === void 0 ? {
147048
147264
  text: COPY.toolchain.statusValidating,
147049
147265
  tone: "muted"
147050
- } : statusPill(tool, job);
147266
+ } : variant === "wizard" ? wizardPill(tool, job, check) : statusPill(tool, job);
147051
147267
  const entry = tool?.download;
147052
147268
  const busy = running || saving;
147053
147269
  const onSave = () => {
@@ -147092,7 +147308,10 @@ void main() {
147092
147308
  }, `(${meta.code})`)], variant === "wizard" ? (0, react.createElement)(Chip, { text: id === "kicad" ? COPY.wizard.kicadChip : COPY.wizard.solidcraftChip }) : null), variant === "wizard" ? (0, react.createElement)("span", { style: {
147093
147309
  fontSize: 11,
147094
147310
  color: C.text3
147095
- } }, id === "kicad" ? COPY.wizard.kicadBlurb : COPY.wizard.solidcraftBlurb) : null)), (0, react.createElement)("span", { style: pillStyle(pill.tone) }, pill.text));
147311
+ } }, id === "kicad" ? COPY.wizard.kicadBlurb : COPY.wizard.solidcraftBlurb) : null)), (0, react.createElement)("span", {
147312
+ style: pillStyle(pill.tone),
147313
+ "data-hardware-toolchain-pill": id
147314
+ }, pill.text));
147096
147315
  const description = variant === "settings" ? (0, react.createElement)("p", { style: {
147097
147316
  ...MUTED,
147098
147317
  lineHeight: 1.6
@@ -147139,7 +147358,26 @@ void main() {
147139
147358
  color: "#FBBF24"
147140
147359
  }), variant === "wizard" ? COPY.wizard.selectFile : COPY.toolchain.browse));
147141
147360
  const savedRoot = tool?.installPath ?? "";
147142
- const statusText = draft.trim() !== "" && draft.trim() !== savedRoot ? COPY.settings.statusUnsaved : tool?.state === "configured" ? tool.cliPath ?? COPY.settings.statusVerified : tool?.error ?? COPY.settings.statusAwaiting;
147361
+ const dirty = draft.trim() !== "" && draft.trim() !== savedRoot;
147362
+ const confirmation = snapshot.confirmed[id];
147363
+ const verdict = (() => {
147364
+ if (confirmation !== void 0) return (0, react.createElement)("span", {
147365
+ style: {
147366
+ ...pillStyle("ok"),
147367
+ display: "inline-flex",
147368
+ alignItems: "center",
147369
+ gap: 6,
147370
+ whiteSpace: "nowrap"
147371
+ },
147372
+ role: "status",
147373
+ "data-hardware-toolchain-confirmed": id
147374
+ }, (0, react.createElement)("span", { style: dotStyle(C.ok, 6) }), confirmation.version === void 0 ? COPY.settings.statusSavedPlain : COPY.settings.statusSavedBadge(confirmation.version));
147375
+ if (dirty && check?.state === "invalid") return textVerdict(check.error ?? COPY.toolchain.statusInvalid, C.warn);
147376
+ if (dirty && check?.state === "pending") return textVerdict(COPY.toolchain.statusValidating, C.text3);
147377
+ if (dirty) return textVerdict(COPY.settings.statusUnsaved, C.text3);
147378
+ if (tool?.state === "configured") return null;
147379
+ return textVerdict(tool?.error ?? COPY.settings.statusAwaiting, tool?.error === void 0 ? C.text3 : C.warn);
147380
+ })();
147143
147381
  const validateRow = (0, react.createElement)("div", { style: {
147144
147382
  display: "flex",
147145
147383
  alignItems: "center",
@@ -147154,17 +147392,7 @@ void main() {
147154
147392
  },
147155
147393
  disabled: busy,
147156
147394
  onClick: onSave
147157
- }, saving ? COPY.settings.validating : COPY.settings.validate), variant === "settings" ? (0, react.createElement)("span", {
147158
- style: {
147159
- ...MONO_TEXT,
147160
- fontSize: 11,
147161
- maxWidth: 260,
147162
- overflow: "hidden",
147163
- textOverflow: "ellipsis",
147164
- whiteSpace: "nowrap"
147165
- },
147166
- title: statusText
147167
- }, statusText) : null);
147395
+ }, saving ? COPY.settings.validating : COPY.settings.validate), variant === "settings" ? verdict : null);
147168
147396
  /** Download affordance: a plugin job first, the vendor page as the honest fallback. */
147169
147397
  const download = entry === void 0 && tool !== void 0 ? officialFallback(id, snapshot) : (0, react.createElement)("a", {
147170
147398
  href: entry?.url ?? snapshot.status?.official[id] ?? "#",
@@ -147232,7 +147460,8 @@ void main() {
147232
147460
  padding: variant === "wizard" ? 14 : 16
147233
147461
  }),
147234
147462
  "data-hardware-toolchain-card": id,
147235
- "data-variant": variant
147463
+ "data-variant": variant,
147464
+ "data-hardware-toolchain-check": check?.state ?? "none"
147236
147465
  }, header, ...description === null ? [] : [description], pathRow, ...actionRow === null ? [] : [actionRow], ...downloadBar === null ? [] : [downloadBar], ...running && job !== void 0 ? [Progress({
147237
147466
  job,
147238
147467
  color: meta.bar
@@ -147246,7 +147475,7 @@ void main() {
147246
147475
  /** §9.2: no in-app build for this platform means the vendor page, never a fake button. */
147247
147476
  function officialFallback(tool, snapshot) {
147248
147477
  return (0, react.createElement)("a", {
147249
- href: snapshot.status?.official[tool] ?? "#",
147478
+ href: snapshot.status?.official?.[tool] ?? "#",
147250
147479
  target: "_blank",
147251
147480
  rel: "noreferrer noopener",
147252
147481
  style: {
@@ -147396,7 +147625,7 @@ void main() {
147396
147625
  alignItems: "center",
147397
147626
  justifyContent: "center",
147398
147627
  padding: 16,
147399
- background: "rgba(0,0,0,0.75)",
147628
+ background: "rgba(0,0,0,0.32)",
147400
147629
  pointerEvents: "auto"
147401
147630
  },
147402
147631
  role: "dialog",
@@ -147567,7 +147796,7 @@ void main() {
147567
147796
  style: {
147568
147797
  position: "fixed",
147569
147798
  inset: 0,
147570
- zIndex: 2100,
147799
+ zIndex: 2400,
147571
147800
  pointerEvents: "none"
147572
147801
  },
147573
147802
  "data-hardware-toolchain-toasts": true
@@ -148196,16 +148425,21 @@ void main() {
148196
148425
  /**
148197
148426
  * May the footer's primary button submit?
148198
148427
  *
148199
- * The prototype's wizard card carries no per-card validate control, so this
148200
- * button is the step's *only* way to persist a typed path. Gating it on "both
148201
- * tools already configured" made a clean first launch a dead end: nothing could
148202
- * be configured because the button that configures was disabled. Readiness is
148203
- * therefore "there is something to save".
148428
+ * Two gates, both asked for after the first-run walk:
148429
+ * - **No run in flight.** While a toolchain is downloading or extracting, the
148430
+ * step must not hand itself back: the install owns the profile, and
148431
+ * "Get Started" would dismiss the modal out from under the bar it shows.
148432
+ * - **Something usable.** At least one tool is already configured, or the text
148433
+ * in an input has been verified against the Host (`checks`). A merely
148434
+ * non-empty input is not enough: the button used to be pressed with garbage
148435
+ * paths and then reported the Host's rejection, which is a worse first run
148436
+ * than a disabled button that lights up the moment a path checks out.
148204
148437
  */
148205
148438
  function saveReady(snapshot) {
148206
148439
  if (snapshot.saving !== void 0) return false;
148207
- if (TOOLCHAIN_IDS.some((id) => (snapshot.drafts[id] ?? "").trim() !== "")) return true;
148208
- return snapshot.status === void 0 ? false : TOOLCHAIN_IDS.some((id) => snapshot.status[id].state === "configured");
148440
+ if (TOOLCHAIN_IDS.some((id) => jobRunning(snapshot.jobs[id]))) return false;
148441
+ if (TOOLCHAIN_IDS.some((id) => snapshot.status?.[id].state === "configured")) return true;
148442
+ return TOOLCHAIN_IDS.some((id) => snapshot.checks[id]?.state === "valid");
148209
148443
  }
148210
148444
  /** Fields of the stored configuration this step reacts to. */ function sameConfig(left, right) {
148211
148445
  if (left === right) return true;
@@ -148315,6 +148549,8 @@ void main() {
148315
148549
  kicad: "",
148316
148550
  solidcraft: ""
148317
148551
  },
148552
+ checks: {},
148553
+ confirmed: {},
148318
148554
  toasts: []
148319
148555
  };
148320
148556
  const emptySnapshot = () => EMPTY$1;