@ksp-gonogo/ui-kit 1.0.0-rc.47 → 1.0.0

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.js CHANGED
@@ -241,7 +241,7 @@ import {
241
241
  writeQuantity,
242
242
  writtenAs,
243
243
  writtenQuantity
244
- } from "./chunk-WR3644JL.js";
244
+ } from "./chunk-FIYXARZ7.js";
245
245
  import {
246
246
  COL_WIDTH,
247
247
  GRID_MARGIN,
@@ -1263,8 +1263,8 @@ var SwitchTrack = styled5.div`
1263
1263
  height: 14px;
1264
1264
  /* --radius-pill keeps the stadium shape through a height change. */
1265
1265
  border-radius: var(--radius-pill);
1266
- background: ${({ $checked, $disabled }) => $disabled ? "var(--color-surface-raised)" : $checked ? "var(--color-go-mark)" : "var(--color-surface-raised)"};
1267
- border: 1px solid ${({ $checked, $disabled }) => $disabled ? "var(--color-border-strong)" : $checked ? "var(--color-go-mark)" : "var(--color-border-strong)"};
1266
+ background: ${({ $checked }) => $checked ? "var(--color-go-mark)" : "var(--color-surface-raised)"};
1267
+ border: 1px solid ${({ $checked }) => $checked ? "var(--color-go-mark)" : "var(--color-border-strong)"};
1268
1268
  position: relative;
1269
1269
  flex-shrink: 0;
1270
1270
  transition: background var(--duration-base), border-color var(--duration-base);
@@ -1304,7 +1304,7 @@ var SwitchThumb = styled5.div`
1304
1304
  width: 8px;
1305
1305
  height: 8px;
1306
1306
  border-radius: var(--radius-circle);
1307
- background: ${({ $checked, $disabled }) => $disabled ? "var(--color-text-faint)" : $checked ? "var(--color-accent-fg)" : "var(--color-text-faint)"};
1307
+ background: ${({ $checked }) => $checked ? "var(--color-accent-fg)" : "var(--color-text-faint)"};
1308
1308
  transition: left var(--duration-base), background var(--duration-base);
1309
1309
  `;
1310
1310
  var SwitchText = styled5.span`
@@ -1998,13 +1998,25 @@ function MarkedFigure({
1998
1998
  main = false,
1999
1999
  children
2000
2000
  }) {
2001
+ if (main) {
2002
+ return /* @__PURE__ */ jsx16(
2003
+ HeldFigure,
2004
+ {
2005
+ kind,
2006
+ caption,
2007
+ "data-role": kind === "modelled" ? "expected" : "last-seen",
2008
+ "data-held": kind === "held" ? "" : void 0,
2009
+ children
2010
+ }
2011
+ );
2012
+ }
2001
2013
  return /* @__PURE__ */ jsxs14(
2002
2014
  "span",
2003
2015
  {
2004
2016
  "data-role": kind === "modelled" ? "expected" : "last-seen",
2005
2017
  "data-reckoning-mark": kind,
2006
2018
  "data-held": kind === "held" ? "" : void 0,
2007
- style: main ? MAIN_MARKED : SECONDARY,
2019
+ style: SECONDARY,
2008
2020
  children: [
2009
2021
  /* @__PURE__ */ jsx16(MarkShape, { kind }),
2010
2022
  children,
@@ -2058,11 +2070,6 @@ var FIGURE = {
2058
2070
  minWidth: "36px",
2059
2071
  textAlign: "right"
2060
2072
  };
2061
- var MAIN_MARKED = {
2062
- display: "inline-flex",
2063
- alignItems: "center",
2064
- gap: "var(--gap-figure-parts)"
2065
- };
2066
2073
  var SECONDARY = {
2067
2074
  display: "inline-flex",
2068
2075
  alignItems: "center",
@@ -7964,6 +7971,39 @@ function applyDelta(value7, bounds, deltaSteps) {
7964
7971
  return Math.min(max, Math.max(min, snapped));
7965
7972
  }
7966
7973
  function JogWheel(props) {
7974
+ if (props.command) {
7975
+ return /* @__PURE__ */ jsx44(CommandedJogWheel, { ...props, command: props.command });
7976
+ }
7977
+ const { command: _command, unavailable: _unavailable, ...rest } = props;
7978
+ return /* @__PURE__ */ jsx44(
7979
+ JogWheelView,
7980
+ {
7981
+ ...rest,
7982
+ onChange: rest.onChange
7983
+ }
7984
+ );
7985
+ }
7986
+ function CommandedJogWheel(props) {
7987
+ const { command, unavailable, ...rest } = props;
7988
+ const input = useCommandInput({ command, unavailable });
7989
+ const [dialled, setDialled] = useState11(null);
7990
+ return /* @__PURE__ */ jsx44(
7991
+ JogWheelView,
7992
+ {
7993
+ ...rest,
7994
+ value: dialled ?? rest.value,
7995
+ disabled: input.inert,
7996
+ onChange: setDialled,
7997
+ onCommit: (next) => {
7998
+ setDialled(null);
7999
+ input.send(next);
8000
+ },
8001
+ input,
8002
+ status: /* @__PURE__ */ jsx44(LiveRegion, { visuallyHidden: true, children: input.announce })
8003
+ }
8004
+ );
8005
+ }
8006
+ function JogWheelView(props) {
7967
8007
  const {
7968
8008
  value: value7,
7969
8009
  min,
@@ -7971,6 +8011,9 @@ function JogWheel(props) {
7971
8011
  step,
7972
8012
  orientation = "horizontal",
7973
8013
  onChange,
8014
+ onCommit,
8015
+ input,
8016
+ status,
7974
8017
  format,
7975
8018
  "aria-label": ariaLabel,
7976
8019
  label: caption = ariaLabel,
@@ -8000,9 +8043,20 @@ function JogWheel(props) {
8000
8043
  const [displacement, setDisplacement] = useState11(0);
8001
8044
  const label = format ? format(value7) : String(Math.round(value7));
8002
8045
  const fraction = hi > lo && Number.isFinite(hi - lo) ? (value7 - lo) / (hi - lo) : 0.5;
8046
+ const pending = useRef9(null);
8003
8047
  const emit = (next) => {
8004
8048
  if (disabled) return;
8005
- if (next !== value7) onChange(next);
8049
+ if (next === value7) return;
8050
+ pending.current = next;
8051
+ onChange(next);
8052
+ };
8053
+ const emitKey = (next) => {
8054
+ if (!onCommit) {
8055
+ emit(next);
8056
+ return;
8057
+ }
8058
+ if (disabled || next === value7) return;
8059
+ onCommit(next);
8006
8060
  };
8007
8061
  useEffect8(() => {
8008
8062
  if (!rate || displacement === 0 || disabled) return;
@@ -8014,7 +8068,10 @@ function JogWheel(props) {
8014
8068
  latest.current + displacement * stepsPerSecond * step * (RATE_TICK_MS / 1e3)
8015
8069
  )
8016
8070
  );
8017
- if (moved !== latest.current) onChangeRef.current(moved);
8071
+ if (moved !== latest.current) {
8072
+ pending.current = moved;
8073
+ onChangeRef.current(moved);
8074
+ }
8018
8075
  }, RATE_TICK_MS);
8019
8076
  return () => clearInterval(timer);
8020
8077
  }, [rate, displacement, disabled, step, stepsPerSecond, lo, hi]);
@@ -8042,7 +8099,7 @@ function JogWheel(props) {
8042
8099
  return;
8043
8100
  }
8044
8101
  e.preventDefault();
8045
- emit(next);
8102
+ emitKey(next);
8046
8103
  };
8047
8104
  const axisPos = (e) => orientation === "vertical" ? e.clientY : e.clientX;
8048
8105
  const handlePointerDown = (e) => {
@@ -8065,48 +8122,54 @@ function JogWheel(props) {
8065
8122
  if (!drag.current) return;
8066
8123
  drag.current = null;
8067
8124
  setDisplacement(0);
8125
+ const sent = pending.current;
8126
+ pending.current = null;
8127
+ if (onCommit && sent !== null) onCommit(sent);
8068
8128
  if (e.currentTarget.hasPointerCapture(e.pointerId)) {
8069
8129
  e.currentTarget.releasePointerCapture(e.pointerId);
8070
8130
  }
8071
8131
  };
8132
+ const root = /* @__PURE__ */ jsxs30(
8133
+ JogWheel__Root,
8134
+ {
8135
+ ...input?.edge,
8136
+ role: "slider",
8137
+ "aria-label": ariaLabel,
8138
+ "aria-orientation": orientation,
8139
+ "aria-valuenow": Number.isFinite(value7) ? value7 : void 0,
8140
+ "aria-valuemin": min,
8141
+ "aria-valuemax": max,
8142
+ "aria-valuetext": label,
8143
+ "aria-disabled": disabled || void 0,
8144
+ tabIndex: disabled ? -1 : 0,
8145
+ $orientation: orientation,
8146
+ $disabled: disabled,
8147
+ $width: boxWidth,
8148
+ $height: boxHeight,
8149
+ $compact: (vertical ? boxWidth : boxHeight) < COMPACT_CROSS_AXIS_PX,
8150
+ onKeyDown: handleKeyDown,
8151
+ onPointerDown: handlePointerDown,
8152
+ onPointerMove: handlePointerMove,
8153
+ onPointerUp: endDrag,
8154
+ onPointerCancel: endDrag,
8155
+ children: [
8156
+ /* @__PURE__ */ jsx44(
8157
+ JogWheel__Tape,
8158
+ {
8159
+ $orientation: orientation,
8160
+ style: orientation === "vertical" ? { transform: `translateY(${(0.5 - fraction) * 100}%)` } : { transform: `translateX(${(0.5 - fraction) * 100}%)` },
8161
+ "aria-hidden": "true"
8162
+ }
8163
+ ),
8164
+ /* @__PURE__ */ jsx44(JogWheel__Caret, { $orientation: orientation, "aria-hidden": "true" }),
8165
+ /* @__PURE__ */ jsx44(JogWheel__Label, { "aria-hidden": "true", children: input?.word ?? label })
8166
+ ]
8167
+ }
8168
+ );
8072
8169
  return /* @__PURE__ */ jsxs30(JogWheel__Frame, { children: [
8073
8170
  caption !== false && /* @__PURE__ */ jsx44(JogWheel__Caption, { "aria-hidden": "true", children: caption }),
8074
- /* @__PURE__ */ jsxs30(
8075
- JogWheel__Root,
8076
- {
8077
- role: "slider",
8078
- "aria-label": ariaLabel,
8079
- "aria-orientation": orientation,
8080
- "aria-valuenow": Number.isFinite(value7) ? value7 : void 0,
8081
- "aria-valuemin": min,
8082
- "aria-valuemax": max,
8083
- "aria-valuetext": label,
8084
- "aria-disabled": disabled || void 0,
8085
- tabIndex: disabled ? -1 : 0,
8086
- $orientation: orientation,
8087
- $disabled: disabled,
8088
- $width: boxWidth,
8089
- $height: boxHeight,
8090
- $compact: (vertical ? boxWidth : boxHeight) < COMPACT_CROSS_AXIS_PX,
8091
- onKeyDown: handleKeyDown,
8092
- onPointerDown: handlePointerDown,
8093
- onPointerMove: handlePointerMove,
8094
- onPointerUp: endDrag,
8095
- onPointerCancel: endDrag,
8096
- children: [
8097
- /* @__PURE__ */ jsx44(
8098
- JogWheel__Tape,
8099
- {
8100
- $orientation: orientation,
8101
- style: orientation === "vertical" ? { transform: `translateY(${(0.5 - fraction) * 100}%)` } : { transform: `translateX(${(0.5 - fraction) * 100}%)` },
8102
- "aria-hidden": "true"
8103
- }
8104
- ),
8105
- /* @__PURE__ */ jsx44(JogWheel__Caret, { $orientation: orientation, "aria-hidden": "true" }),
8106
- /* @__PURE__ */ jsx44(JogWheel__Label, { "aria-hidden": "true", children: label })
8107
- ]
8108
- }
8109
- )
8171
+ input ? /* @__PURE__ */ jsx44(Tooltip, { text: input.tip, children: root }) : root,
8172
+ status
8110
8173
  ] });
8111
8174
  }
8112
8175
  var JogWheel__Frame = styled29.div`
@@ -8139,6 +8202,8 @@ var JogWheel__Root = styled29.div`
8139
8202
  opacity: ${(p) => p.$disabled ? 0.5 : 1};
8140
8203
 
8141
8204
  ${focusRing}
8205
+
8206
+ ${commandEdge}
8142
8207
  `;
8143
8208
  var JogWheel__Tape = styled29.div`
8144
8209
  position: absolute;
@@ -9103,6 +9168,7 @@ function MissionDate({ value: value7, context }) {
9103
9168
  // src/MissionDateField.tsx
9104
9169
  import { value as value4 } from "@ksp-gonogo/sitrep-sdk";
9105
9170
  import { useId as useId11, useState as useState12 } from "react";
9171
+ import styled35 from "styled-components";
9106
9172
  import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
9107
9173
  function partsOfUt(ut) {
9108
9174
  const { year: YEAR, day: DAY, hour: HOUR, minute: MINUTE } = kspCalendar();
@@ -9133,12 +9199,63 @@ function utOfParts(parts) {
9133
9199
  function stepLabel(seconds) {
9134
9200
  return writeQuantity(value4("s", seconds));
9135
9201
  }
9136
- function MissionDateField({
9202
+ function MissionDateField(props) {
9203
+ if (props.command) {
9204
+ return /* @__PURE__ */ jsx50(CommandedMissionDateField, { ...props, command: props.command });
9205
+ }
9206
+ return /* @__PURE__ */ jsx50(
9207
+ MissionDateFieldView,
9208
+ {
9209
+ value: props.value,
9210
+ label: props.label,
9211
+ steps: props.steps,
9212
+ onChange: props.onChange,
9213
+ disabled: props.disabled
9214
+ }
9215
+ );
9216
+ }
9217
+ function CommandedMissionDateField({
9218
+ command,
9219
+ unavailable,
9220
+ ...props
9221
+ }) {
9222
+ const input = useCommandInput({ command, unavailable });
9223
+ return /* @__PURE__ */ jsx50(
9224
+ MissionDateFieldView,
9225
+ {
9226
+ value: props.value,
9227
+ label: props.label,
9228
+ steps: props.steps,
9229
+ onChange: input.send,
9230
+ disabled: input.inert,
9231
+ input
9232
+ }
9233
+ );
9234
+ }
9235
+ var MissionDateField__Word = styled35.span`
9236
+ position: absolute;
9237
+ inset-block-start: 0;
9238
+ inset-inline-end: 0;
9239
+ padding-inline: var(--gap-related-dense);
9240
+ background: var(--color-surface-sunken);
9241
+ color: var(--color-text-muted);
9242
+ pointer-events: none;
9243
+ &:empty {
9244
+ display: none;
9245
+ }
9246
+ font-size: var(--font-size-caption);
9247
+ letter-spacing: 0.08em;
9248
+ `;
9249
+ var MissionDateField__Frame = styled35.div`
9250
+ position: relative;
9251
+ `;
9252
+ function MissionDateFieldView({
9137
9253
  value: value7,
9138
9254
  onChange,
9139
9255
  label,
9140
9256
  disabled,
9141
- steps
9257
+ steps,
9258
+ input
9142
9259
  }) {
9143
9260
  const groupId = useId11();
9144
9261
  const absentId = `${groupId}-absent`;
@@ -9152,11 +9269,26 @@ function MissionDateField({
9152
9269
  calendar.day
9153
9270
  ];
9154
9271
  const [draft, setDraft] = useState12(null);
9272
+ const commit = () => {
9273
+ if (!input || draft === null) return;
9274
+ const typed = draft.text.trim();
9275
+ const typedNumber = Number(typed);
9276
+ setDraft(null);
9277
+ if (typed === "" || !Number.isFinite(typedNumber)) return;
9278
+ const min = draft.key === "year" || draft.key === "day" ? 1 : 0;
9279
+ const next = Math.max(min, Math.round(typedNumber));
9280
+ const sent = utOfParts({ ...parts ?? EPOCH_PARTS, [draft.key]: next });
9281
+ if (sent !== instant) onChange(sent);
9282
+ };
9283
+ const { "data-command-phase": _phase, ...edge } = input?.edge ?? {
9284
+ "data-command-phase": ""
9285
+ };
9155
9286
  const field = (key, text, min, width) => /* @__PURE__ */ jsxs36(Stack, { gap: "caption", children: [
9156
9287
  /* @__PURE__ */ jsx50(FieldLabel, { htmlFor: `${groupId}-${key}`, children: text }),
9157
9288
  /* @__PURE__ */ jsx50(
9158
9289
  Input,
9159
9290
  {
9291
+ ...edge,
9160
9292
  id: `${groupId}-${key}`,
9161
9293
  type: "number",
9162
9294
  inputMode: "numeric",
@@ -9168,10 +9300,14 @@ function MissionDateField({
9168
9300
  disabled,
9169
9301
  placeholder: parts === null ? NULL_DISPLAY : void 0,
9170
9302
  value: draft?.key === key ? draft.text : parts === null ? "" : String(parts[key]),
9171
- onBlur: () => setDraft(null),
9303
+ onBlur: () => input ? commit() : setDraft(null),
9304
+ onKeyDown: (event) => {
9305
+ if (input && event.key === "Enter") commit();
9306
+ },
9172
9307
  onChange: (event) => {
9173
9308
  const typed = event.target.value;
9174
9309
  setDraft({ key, text: typed });
9310
+ if (input) return;
9175
9311
  if (typed.trim() === "") return;
9176
9312
  const typedNumber = Number(typed);
9177
9313
  if (!Number.isFinite(typedNumber)) return;
@@ -9181,7 +9317,7 @@ function MissionDateField({
9181
9317
  }
9182
9318
  )
9183
9319
  ] }, key);
9184
- return /* @__PURE__ */ jsxs36(Stack, { gap: "related-dense", role: "group", "aria-label": label, children: [
9320
+ const group = /* @__PURE__ */ jsxs36(Stack, { gap: "related-dense", role: "group", "aria-label": label, children: [
9185
9321
  /* @__PURE__ */ jsxs36(Cluster, { gap: "related-dense", wrap: true, justify: "start", children: [
9186
9322
  field("year", "YEAR", 1, "5rem"),
9187
9323
  field("day", "DAY", 1, "5rem"),
@@ -9218,6 +9354,12 @@ function MissionDateField({
9218
9354
  ))
9219
9355
  ] })
9220
9356
  ] });
9357
+ if (!input) return group;
9358
+ return /* @__PURE__ */ jsx50(Tooltip, { text: input.tip, children: /* @__PURE__ */ jsxs36(MissionDateField__Frame, { children: [
9359
+ group,
9360
+ /* @__PURE__ */ jsx50(MissionDateField__Word, { "aria-hidden": "true", children: input.word }),
9361
+ /* @__PURE__ */ jsx50(LiveRegion, { visuallyHidden: true, children: input.announce })
9362
+ ] }) });
9221
9363
  }
9222
9364
 
9223
9365
  // src/Modal.tsx
@@ -9232,7 +9374,7 @@ import {
9232
9374
  useState as useState13
9233
9375
  } from "react";
9234
9376
  import { createPortal as createPortal2 } from "react-dom";
9235
- import styled35 from "styled-components";
9377
+ import styled36 from "styled-components";
9236
9378
 
9237
9379
  // src/ModalSaveBar.tsx
9238
9380
  import { createContext as createContext2, useContext as useContext2, useEffect as useEffect9, useMemo as useMemo4, useRef as useRef11 } from "react";
@@ -9488,7 +9630,7 @@ function ModalDialog({ entry, isTop, onClose }) {
9488
9630
  document.body
9489
9631
  ) });
9490
9632
  }
9491
- var Backdrop = styled35.div`
9633
+ var Backdrop = styled36.div`
9492
9634
  position: fixed;
9493
9635
  inset: 0;
9494
9636
  background: rgba(0, 0, 0, 0.72);
@@ -9497,7 +9639,7 @@ var Backdrop = styled35.div`
9497
9639
  justify-content: center;
9498
9640
  z-index: var(--z-modal);
9499
9641
  `;
9500
- var Dialog = styled35.div`
9642
+ var Dialog = styled36.div`
9501
9643
  background: var(--color-surface-panel);
9502
9644
  border: 1px solid var(--color-border-strong);
9503
9645
  border-radius: var(--radius-floating);
@@ -9511,7 +9653,7 @@ var Dialog = styled35.div`
9511
9653
  flex-direction: column;
9512
9654
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
9513
9655
  `;
9514
- var DialogHeader = styled35.div`
9656
+ var DialogHeader = styled36.div`
9515
9657
  display: flex;
9516
9658
  align-items: center;
9517
9659
  justify-content: space-between;
@@ -9519,17 +9661,17 @@ var DialogHeader = styled35.div`
9519
9661
  border-bottom: 1px solid var(--color-border-subtle);
9520
9662
  flex-shrink: 0;
9521
9663
  `;
9522
- var DialogTitleRow = styled35.div`
9664
+ var DialogTitleRow = styled36.div`
9523
9665
  display: flex;
9524
9666
  align-items: center;
9525
9667
  gap: var(--gap-related);
9526
9668
  min-width: 0;
9527
9669
  `;
9528
- var DialogTitle = styled35.h2`
9670
+ var DialogTitle = styled36.h2`
9529
9671
  margin: 0;
9530
9672
  ${titleText}
9531
9673
  `;
9532
- var DialogBody = styled35(ScrollArea)`
9674
+ var DialogBody = styled36(ScrollArea)`
9533
9675
  margin-inline: 0;
9534
9676
 
9535
9677
  [data-scroll-area-inner] {
@@ -9544,7 +9686,7 @@ var DialogBody = styled35(ScrollArea)`
9544
9686
  min-width: 0;
9545
9687
  }
9546
9688
  `;
9547
- var DialogFooter = styled35.div`
9689
+ var DialogFooter = styled36.div`
9548
9690
  display: flex;
9549
9691
  align-items: center;
9550
9692
  justify-content: flex-end;
@@ -9553,16 +9695,16 @@ var DialogFooter = styled35.div`
9553
9695
  border-top: 1px solid var(--color-border-subtle);
9554
9696
  flex-shrink: 0;
9555
9697
  `;
9556
- var DiscardPrompt = styled35.span`
9698
+ var DiscardPrompt = styled36.span`
9557
9699
  margin-right: auto;
9558
9700
  font-size: var(--font-size-compact);
9559
9701
  color: var(--color-text-primary);
9560
9702
  `;
9561
9703
 
9562
9704
  // src/ModelledAlongside.tsx
9563
- import styled36 from "styled-components";
9705
+ import styled37 from "styled-components";
9564
9706
  import { Fragment as Fragment19, jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
9565
- var ModelledAlongside__Figure = styled36.span`
9707
+ var ModelledAlongside__Figure = styled37.span`
9566
9708
  margin-left: 0.6em;
9567
9709
  color: var(--color-text-muted);
9568
9710
  `;
@@ -9601,9 +9743,9 @@ function ReckonedUnit({
9601
9743
 
9602
9744
  // src/Notice.tsx
9603
9745
  import { useEffect as useEffect11, useRef as useRef13, useState as useState14 } from "react";
9604
- import styled37 from "styled-components";
9746
+ import styled38 from "styled-components";
9605
9747
  import { Fragment as Fragment20, jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
9606
- var Notice__Root = styled37(Block__Root)`
9748
+ var Notice__Root = styled38(Block__Root)`
9607
9749
  --gap-related: var(--gap-related-comfortable);
9608
9750
  --bleed-inline: 0px;
9609
9751
 
@@ -9661,7 +9803,7 @@ function spokenText(root) {
9661
9803
  }
9662
9804
 
9663
9805
  // src/PanZoomViewport.tsx
9664
- import styled38 from "styled-components";
9806
+ import styled39 from "styled-components";
9665
9807
  import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
9666
9808
  function PanZoomViewport({
9667
9809
  panZoom,
@@ -9686,14 +9828,14 @@ function PanZoomViewport({
9686
9828
  }
9687
9829
  );
9688
9830
  }
9689
- var Viewport = styled38.div`
9831
+ var Viewport = styled39.div`
9690
9832
  position: relative;
9691
9833
  width: 100%;
9692
9834
  height: 100%;
9693
9835
  user-select: none;
9694
9836
  ${focusRingInset}
9695
9837
  `;
9696
- var HintRegion = styled38.div`
9838
+ var HintRegion = styled39.div`
9697
9839
  position: absolute;
9698
9840
  bottom: var(--gap-related);
9699
9841
  left: 50%;
@@ -9702,7 +9844,7 @@ var HintRegion = styled38.div`
9702
9844
  max-width: calc(100% - 16px);
9703
9845
  pointer-events: none;
9704
9846
  `;
9705
- var Chip = styled38.div`
9847
+ var Chip = styled39.div`
9706
9848
  padding: var(--inset-control);
9707
9849
  border: 1px solid var(--color-border-strong);
9708
9850
  border-radius: var(--radius-regular);
@@ -9715,7 +9857,7 @@ var Chip = styled38.div`
9715
9857
  `;
9716
9858
 
9717
9859
  // src/Pips.tsx
9718
- import styled39 from "styled-components";
9860
+ import styled40 from "styled-components";
9719
9861
  import { jsx as jsx56 } from "react/jsx-runtime";
9720
9862
  function Pips({ filled, of, tone = "info", label }) {
9721
9863
  const count = `${filled} of ${of}`;
@@ -9736,13 +9878,13 @@ function Pips({ filled, of, tone = "info", label }) {
9736
9878
  }
9737
9879
  );
9738
9880
  }
9739
- var Pips__Root = styled39.span`
9881
+ var Pips__Root = styled40.span`
9740
9882
  display: inline-flex;
9741
9883
  align-items: center;
9742
9884
  gap: var(--gap-related);
9743
9885
  flex: none;
9744
9886
  `;
9745
- var Pips__Pip = styled39.span`
9887
+ var Pips__Pip = styled40.span`
9746
9888
  width: 1em;
9747
9889
  height: 1em;
9748
9890
  border-radius: var(--radius-circle);
@@ -9795,7 +9937,7 @@ function ReadFrameControl({
9795
9937
  }
9796
9938
 
9797
9939
  // src/ReadOnlyField.tsx
9798
- import styled40 from "styled-components";
9940
+ import styled41 from "styled-components";
9799
9941
  import { jsx as jsx58, jsxs as jsxs43 } from "react/jsx-runtime";
9800
9942
  function ReadOnlyField({
9801
9943
  label,
@@ -9819,14 +9961,14 @@ function ReadOnlyFieldContent({
9819
9961
  if (typeof value7 === "boolean") return value7 ? "On" : "Off";
9820
9962
  return value7;
9821
9963
  }
9822
- var ReadOnlyField__List = styled40.dl`
9964
+ var ReadOnlyField__List = styled41.dl`
9823
9965
  display: flex;
9824
9966
  align-items: baseline;
9825
9967
  justify-content: space-between;
9826
9968
  gap: var(--gap-field-term);
9827
9969
  margin: 0;
9828
9970
  `;
9829
- var ReadOnlyField__Term = styled40.dt`
9971
+ var ReadOnlyField__Term = styled41.dt`
9830
9972
  display: flex;
9831
9973
  flex-direction: column;
9832
9974
  gap: var(--gap-caption);
@@ -9834,16 +9976,16 @@ var ReadOnlyField__Term = styled40.dt`
9834
9976
  /* Grows into the space a short value leaves and yields to a long one. */
9835
9977
  flex: 1 1 auto;
9836
9978
  `;
9837
- var ReadOnlyField__Label = styled40.span`
9979
+ var ReadOnlyField__Label = styled41.span`
9838
9980
  font-size: var(--font-size-value);
9839
9981
  color: var(--color-text-primary);
9840
9982
  `;
9841
- var ReadOnlyField__Description = styled40.span`
9983
+ var ReadOnlyField__Description = styled41.span`
9842
9984
  font-size: var(--font-size-compact);
9843
9985
  color: var(--color-text-dim);
9844
9986
  max-width: 32em;
9845
9987
  `;
9846
- var ReadOnlyField__Value = styled40.dd`
9988
+ var ReadOnlyField__Value = styled41.dd`
9847
9989
  margin: 0;
9848
9990
  min-width: 0;
9849
9991
  text-align: right;
@@ -9860,9 +10002,9 @@ var ReadOnlyField__Value = styled40.dd`
9860
10002
  `;
9861
10003
 
9862
10004
  // src/Readout.tsx
9863
- import styled41, { css as css10 } from "styled-components";
10005
+ import styled42, { css as css10 } from "styled-components";
9864
10006
  import { jsx as jsx59 } from "react/jsx-runtime";
9865
- var Readout__Box = styled41.div`
10007
+ var Readout__Box = styled42.div`
9866
10008
  display: ${({ $size }) => $size === "hero" ? "flex" : "inline-flex"};
9867
10009
  font-weight: 700;
9868
10010
  letter-spacing: 0.04em;
@@ -9892,7 +10034,7 @@ function Readout({
9892
10034
  }) {
9893
10035
  return /* @__PURE__ */ jsx59(Readout__Box, { $size: size, $tone: tone, ...rest });
9894
10036
  }
9895
- var ReadoutCaption = styled41.span`
10037
+ var ReadoutCaption = styled42.span`
9896
10038
  font-size: var(--font-size-caption);
9897
10039
  font-weight: 400;
9898
10040
  letter-spacing: 0.05em;
@@ -9907,8 +10049,8 @@ import {
9907
10049
  } from "@ksp-gonogo/sitrep-sdk";
9908
10050
 
9909
10051
  // src/Truncate.tsx
9910
- import styled42 from "styled-components";
9911
- var Truncate = styled42.span`
10052
+ import styled43 from "styled-components";
10053
+ var Truncate = styled43.span`
9912
10054
  /* Its own theme colour rather than whatever the nearest element gives it, so no ancestor's default can reach the words. */
9913
10055
  color: var(--color-neutral-text);
9914
10056
  overflow: hidden;
@@ -9979,7 +10121,7 @@ import {
9979
10121
  import { useEffect as useEffect12, useId as useId13, useState as useState15 } from "react";
9980
10122
 
9981
10123
  // src/Tag.tsx
9982
- import styled43, { css as css11 } from "styled-components";
10124
+ import styled44, { css as css11 } from "styled-components";
9983
10125
  import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
9984
10126
  var TAG_COLOURS = {
9985
10127
  telemetry: {
@@ -10029,7 +10171,7 @@ function Tag({ label, symbol, name = false, ...rest }) {
10029
10171
  }
10030
10172
  );
10031
10173
  }
10032
- var TagBadge = styled43.span`
10174
+ var TagBadge = styled44.span`
10033
10175
  display: ${({ $symbol }) => $symbol ? "inline-flex" : "inline-block"};
10034
10176
  ${({ $symbol, $name }) => {
10035
10177
  if ($symbol) return css11`padding: 0;`;
@@ -10052,14 +10194,14 @@ var TagBadge = styled43.span`
10052
10194
  border: 1px solid ${$border};
10053
10195
  `}
10054
10196
  `;
10055
- var TagSymbol = styled43.span`
10197
+ var TagSymbol = styled44.span`
10056
10198
  display: inline-flex;
10057
10199
  align-items: center;
10058
10200
  justify-content: center;
10059
10201
  ${({ $name }) => $name ? css11`padding: 0 var(--gap-glyph);` : css11`padding: var(--inset-chip);`}
10060
10202
  background: currentColor;
10061
10203
  `;
10062
- var TagSymbolInk = styled43.span`
10204
+ var TagSymbolInk = styled44.span`
10063
10205
  display: inline-flex;
10064
10206
  align-items: center;
10065
10207
  justify-content: center;
@@ -10068,7 +10210,7 @@ var TagSymbolInk = styled43.span`
10068
10210
  line-height: var(--line-height-flush);
10069
10211
  color: var(--color-surface-panel);
10070
10212
  `;
10071
- var TagLabel = styled43.span`
10213
+ var TagLabel = styled44.span`
10072
10214
  ${({ $name }) => $name ? css11`padding: 0 var(--gap-glyph) 0 var(--gap-glyph-tray);` : css11`padding: var(--inset-chip);`}
10073
10215
  `;
10074
10216
 
@@ -10249,7 +10391,7 @@ var ROW2 = { justifyContent: "space-between", flexWrap: "wrap" };
10249
10391
  var AMOUNT = { width: "6em" };
10250
10392
 
10251
10393
  // src/Row.tsx
10252
- import styled44, { css as css12 } from "styled-components";
10394
+ import styled45, { css as css12 } from "styled-components";
10253
10395
  import { Fragment as Fragment22, jsx as jsx63, jsxs as jsxs47 } from "react/jsx-runtime";
10254
10396
  function RowBase(props) {
10255
10397
  if (props.command) {
@@ -10288,7 +10430,7 @@ function CommandedRow({
10288
10430
  /* @__PURE__ */ jsx63(LiveRegion, { visuallyHidden: true, children: input.announce })
10289
10431
  ] });
10290
10432
  }
10291
- var RowWord = styled44.span`
10433
+ var RowWord = styled45.span`
10292
10434
  position: absolute;
10293
10435
  inset-inline-end: var(--gap-related);
10294
10436
  top: 50%;
@@ -10327,7 +10469,7 @@ function PlainRow({
10327
10469
  }
10328
10470
  );
10329
10471
  }
10330
- var RowName = styled44.span`
10472
+ var RowName = styled45.span`
10331
10473
  overflow: hidden;
10332
10474
  text-overflow: ellipsis;
10333
10475
  white-space: nowrap;
@@ -10336,7 +10478,7 @@ var RowName = styled44.span`
10336
10478
  color: var(--color-text-primary);
10337
10479
  `;
10338
10480
  var WRAPPED_NAME_FLOOR = "min(12ch, 100%)";
10339
- var Row__Root = styled44.li`
10481
+ var Row__Root = styled45.li`
10340
10482
  position: relative;
10341
10483
  display: flex;
10342
10484
  justify-content: space-between;
@@ -10500,9 +10642,44 @@ function resourceColor(name) {
10500
10642
  }
10501
10643
 
10502
10644
  // src/SelectableRow.tsx
10503
- import styled45, { css as css13 } from "styled-components";
10504
- import { jsx as jsx64 } from "react/jsx-runtime";
10505
- function SelectableRow({
10645
+ import styled46, { css as css13 } from "styled-components";
10646
+ import { Fragment as Fragment23, jsx as jsx64, jsxs as jsxs48 } from "react/jsx-runtime";
10647
+ function SelectableRow(props) {
10648
+ if (props.command) {
10649
+ return /* @__PURE__ */ jsx64(CommandedSelectableRow, { ...props, command: props.command });
10650
+ }
10651
+ const { command: _command, unavailable: _unavailable, ...rest } = props;
10652
+ return /* @__PURE__ */ jsx64(PlainSelectableRow, { ...rest });
10653
+ }
10654
+ function CommandedSelectableRow({
10655
+ command,
10656
+ unavailable,
10657
+ children,
10658
+ onClick,
10659
+ ...rest
10660
+ }) {
10661
+ const input = useBoundCommandInput({ command, unavailable });
10662
+ return /* @__PURE__ */ jsxs48(Fragment23, { children: [
10663
+ /* @__PURE__ */ jsx64(Tooltip, { text: input.tip, children: /* @__PURE__ */ jsxs48(
10664
+ PlainSelectableRow,
10665
+ {
10666
+ ...rest,
10667
+ ...input.edge,
10668
+ onClick: (e) => {
10669
+ if (input.inert) return;
10670
+ input.send();
10671
+ onClick?.(e);
10672
+ },
10673
+ children: [
10674
+ children,
10675
+ /* @__PURE__ */ jsx64(SelectableRow__Word, { "aria-hidden": "true", children: input.word })
10676
+ ]
10677
+ }
10678
+ ) }),
10679
+ /* @__PURE__ */ jsx64(LiveRegion, { visuallyHidden: true, children: input.announce })
10680
+ ] });
10681
+ }
10682
+ function PlainSelectableRow({
10506
10683
  selected,
10507
10684
  gap = "caption",
10508
10685
  layout = "stack",
@@ -10524,7 +10701,22 @@ function SelectableRow({
10524
10701
  }
10525
10702
  );
10526
10703
  }
10527
- var SelectableRow__Root = styled45.button`
10704
+ var SelectableRow__Word = styled46.span`
10705
+ position: absolute;
10706
+ inset-inline-end: var(--gap-related);
10707
+ top: 50%;
10708
+ transform: translateY(-50%);
10709
+ padding-inline: var(--gap-related-dense);
10710
+ background: var(--color-surface-sunken);
10711
+ color: var(--color-text-muted);
10712
+ pointer-events: none;
10713
+ &:empty {
10714
+ display: none;
10715
+ }
10716
+ font-size: var(--font-size-caption);
10717
+ letter-spacing: 0.08em;
10718
+ `;
10719
+ var SelectableRow__Root = styled46.button`
10528
10720
  display: flex;
10529
10721
  ${({ $layout }) => $layout === "split" ? css13`
10530
10722
  justify-content: space-between;
@@ -10562,6 +10754,12 @@ var SelectableRow__Root = styled45.button`
10562
10754
  }
10563
10755
 
10564
10756
  ${focusRing}
10757
+
10758
+ &[data-command-phase] {
10759
+ position: relative;
10760
+ }
10761
+
10762
+ ${commandOutlineEdge}
10565
10763
  `;
10566
10764
 
10567
10765
  // src/Slider.tsx
@@ -10570,8 +10768,8 @@ import {
10570
10768
  useEffect as useEffect13,
10571
10769
  useState as useState16
10572
10770
  } from "react";
10573
- import styled46 from "styled-components";
10574
- import { jsx as jsx65, jsxs as jsxs48 } from "react/jsx-runtime";
10771
+ import styled47 from "styled-components";
10772
+ import { jsx as jsx65, jsxs as jsxs49 } from "react/jsx-runtime";
10575
10773
  var Slider = forwardRef3(function Slider2(props, ref) {
10576
10774
  if (props.command) {
10577
10775
  return /* @__PURE__ */ jsx65(CommandedSlider, { ...props, command: props.command, forwardedRef: ref });
@@ -10643,8 +10841,8 @@ function MarkedSlider({
10643
10841
  if (input && !input.inert) setAsked(v);
10644
10842
  input?.send(v);
10645
10843
  };
10646
- return /* @__PURE__ */ jsxs48("div", { style: ROW, children: [
10647
- /* @__PURE__ */ jsx65(Tooltip, { text: input?.tip, children: /* @__PURE__ */ jsxs48("div", { style: TRACK, children: [
10844
+ return /* @__PURE__ */ jsxs49("div", { style: ROW, children: [
10845
+ /* @__PURE__ */ jsx65(Tooltip, { text: input?.tip, children: /* @__PURE__ */ jsxs49("div", { style: TRACK, children: [
10648
10846
  /* @__PURE__ */ jsx65(
10649
10847
  Slider__Input,
10650
10848
  {
@@ -10686,14 +10884,14 @@ function MarkedSlider({
10686
10884
  }
10687
10885
  )
10688
10886
  ] }) }),
10689
- /* @__PURE__ */ jsxs48("span", { style: { ...FIGURE, position: "relative" }, children: [
10887
+ /* @__PURE__ */ jsxs49("span", { style: { ...FIGURE, position: "relative" }, children: [
10690
10888
  shown === null ? NULL_DISPLAY : figure(shown),
10691
10889
  input && /* @__PURE__ */ jsx65(SliderWord, { "aria-hidden": "true", children: input.word })
10692
10890
  ] }),
10693
10891
  /* @__PURE__ */ jsx65(LiveRegion, { visuallyHidden: true, children: input?.announce ?? null })
10694
10892
  ] });
10695
10893
  }
10696
- var SliderWord = styled46.span`
10894
+ var SliderWord = styled47.span`
10697
10895
  position: absolute;
10698
10896
  inset-inline-end: 0;
10699
10897
  top: 50%;
@@ -10708,7 +10906,7 @@ var SliderWord = styled46.span`
10708
10906
  color: var(--color-text-muted);
10709
10907
  letter-spacing: 0.08em;
10710
10908
  `;
10711
- var Slider__Input = styled46.input`
10909
+ var Slider__Input = styled47.input`
10712
10910
  width: 100%;
10713
10911
  min-width: 0;
10714
10912
  margin: 0;
@@ -10727,7 +10925,7 @@ var Slider__Input = styled46.input`
10727
10925
  `;
10728
10926
 
10729
10927
  // src/Spinner.tsx
10730
- import styled47, { keyframes as keyframes3 } from "styled-components";
10928
+ import styled48, { keyframes as keyframes3 } from "styled-components";
10731
10929
  import { jsx as jsx66 } from "react/jsx-runtime";
10732
10930
  function Spinner({
10733
10931
  size = 12,
@@ -10751,7 +10949,7 @@ function Spinner({
10751
10949
  var spin = keyframes3`
10752
10950
  to { transform: rotate(360deg); }
10753
10951
  `;
10754
- var SpinnerEl = styled47.span`
10952
+ var SpinnerEl = styled48.span`
10755
10953
  display: inline-block;
10756
10954
  width: ${({ $size }) => `${$size}px`};
10757
10955
  height: ${({ $size }) => `${$size}px`};
@@ -10767,8 +10965,8 @@ var SpinnerEl = styled47.span`
10767
10965
  `;
10768
10966
 
10769
10967
  // src/Stat.tsx
10770
- import styled48 from "styled-components";
10771
- import { jsx as jsx67, jsxs as jsxs49 } from "react/jsx-runtime";
10968
+ import styled49 from "styled-components";
10969
+ import { jsx as jsx67, jsxs as jsxs50 } from "react/jsx-runtime";
10772
10970
  function Stat({
10773
10971
  label,
10774
10972
  children,
@@ -10776,13 +10974,13 @@ function Stat({
10776
10974
  tone = "neutral",
10777
10975
  ...rest
10778
10976
  }) {
10779
- return /* @__PURE__ */ jsxs49(Stat__Root, { ...rest, children: [
10977
+ return /* @__PURE__ */ jsxs50(Stat__Root, { ...rest, children: [
10780
10978
  /* @__PURE__ */ jsx67(Stat__Label, { children: label }),
10781
10979
  /* @__PURE__ */ jsx67(Stat__Figure, { $tone: tone, children }),
10782
10980
  detail !== void 0 && detail !== null && /* @__PURE__ */ jsx67(Stat__Detail, { children: detail })
10783
10981
  ] });
10784
10982
  }
10785
- var Stat__Root = styled48.dl`
10983
+ var Stat__Root = styled49.dl`
10786
10984
  display: flex;
10787
10985
  flex-direction: column;
10788
10986
  gap: var(--gap-caption);
@@ -10793,13 +10991,13 @@ var Stat__Root = styled48.dl`
10793
10991
  border: 1px solid var(--color-border-subtle);
10794
10992
  border-radius: var(--radius-regular);
10795
10993
  `;
10796
- var Stat__Label = styled48.dt`
10994
+ var Stat__Label = styled49.dt`
10797
10995
  font-size: var(--font-size-caption);
10798
10996
  letter-spacing: 0.1em;
10799
10997
  text-transform: uppercase;
10800
10998
  color: var(--color-text-muted);
10801
10999
  `;
10802
- var Stat__Figure = styled48.dd`
11000
+ var Stat__Figure = styled49.dd`
10803
11001
  margin: 0;
10804
11002
  min-width: 0;
10805
11003
  /* Bottom-aligned, so figures line up across the strip even where one label wraps. */
@@ -10814,7 +11012,7 @@ var Stat__Figure = styled48.dd`
10814
11012
  font-variant-numeric: tabular-nums;
10815
11013
  color: ${({ $tone }) => TONE_TEXT[$tone]};
10816
11014
  `;
10817
- var Stat__Detail = styled48.dd`
11015
+ var Stat__Detail = styled49.dd`
10818
11016
  margin: 0;
10819
11017
  min-width: 0;
10820
11018
  font-size: var(--font-size-compact);
@@ -10822,11 +11020,11 @@ var Stat__Detail = styled48.dd`
10822
11020
  `;
10823
11021
 
10824
11022
  // src/StatContributions.tsx
10825
- import { Fragment as Fragment23, jsx as jsx68 } from "react/jsx-runtime";
11023
+ import { Fragment as Fragment24, jsx as jsx68 } from "react/jsx-runtime";
10826
11024
  function StatContributions({ slot }) {
10827
11025
  const entries = useContributionsBySlotId(slot);
10828
11026
  if (entries.length === 0) return null;
10829
- return /* @__PURE__ */ jsx68(Fragment23, { children: entries.map((entry) => /* @__PURE__ */ jsx68(
11027
+ return /* @__PURE__ */ jsx68(Fragment24, { children: entries.map((entry) => /* @__PURE__ */ jsx68(
10830
11028
  Stat,
10831
11029
  {
10832
11030
  label: entry.label,
@@ -10841,14 +11039,14 @@ function StatFigure({ entry }) {
10841
11039
  if (entry.value !== void 0) return /* @__PURE__ */ jsx68(Unit, { value: entry.value });
10842
11040
  if (entry.text === void 0) return /* @__PURE__ */ jsx68(NullValue, {});
10843
11041
  const marking = heldMarking(entry.held);
10844
- if (marking === null) return /* @__PURE__ */ jsx68(Fragment23, { children: entry.text });
11042
+ if (marking === null) return /* @__PURE__ */ jsx68(Fragment24, { children: entry.text });
10845
11043
  return /* @__PURE__ */ jsx68(HeldFigure, { kind: marking.kind, caption: marking.caption, children: entry.text });
10846
11044
  }
10847
11045
 
10848
11046
  // src/Stepper.tsx
10849
11047
  import { useId as useId14 } from "react";
10850
- import styled49 from "styled-components";
10851
- import { Fragment as Fragment24, jsx as jsx69, jsxs as jsxs50 } from "react/jsx-runtime";
11048
+ import styled50 from "styled-components";
11049
+ import { Fragment as Fragment25, jsx as jsx69, jsxs as jsxs51 } from "react/jsx-runtime";
10852
11050
  function Stepper(props) {
10853
11051
  if (props.command) {
10854
11052
  return /* @__PURE__ */ jsx69(CommandedStepper, { ...props, command: props.command });
@@ -10886,7 +11084,7 @@ function CommandedStepper(props) {
10886
11084
  "data-testid": props["data-testid"],
10887
11085
  edge: input.edge,
10888
11086
  tip: input.tip,
10889
- trailing: /* @__PURE__ */ jsxs50(Fragment24, { children: [
11087
+ trailing: /* @__PURE__ */ jsxs51(Fragment25, { children: [
10890
11088
  /* @__PURE__ */ jsx69(StepperWord, { "aria-hidden": "true", children: input.word }),
10891
11089
  /* @__PURE__ */ jsx69(LiveRegion, { visuallyHidden: true, children: input.announce })
10892
11090
  ] }),
@@ -10894,7 +11092,7 @@ function CommandedStepper(props) {
10894
11092
  }
10895
11093
  );
10896
11094
  }
10897
- var StepperWord = styled49.span`
11095
+ var StepperWord = styled50.span`
10898
11096
  position: absolute;
10899
11097
  inset-inline-end: var(--gap-related);
10900
11098
  top: 50%;
@@ -10969,7 +11167,7 @@ function StepperView({
10969
11167
  const modelled = marks.expected === null || marks.expected === void 0 || marks.expected === value7 ? null : marks.expected;
10970
11168
  const held = marks.lastSeen ?? null;
10971
11169
  const showsHeldFigure = marks.lastSeen !== void 0 && marks.lastSeen !== null && marks.lastSeen === value7;
10972
- return /* @__PURE__ */ jsx69(Tooltip, { text: tip, children: /* @__PURE__ */ jsxs50(Stepper__Body, { "data-testid": testId, children: [
11170
+ return /* @__PURE__ */ jsx69(Tooltip, { text: tip, children: /* @__PURE__ */ jsxs51(Stepper__Body, { "data-testid": testId, children: [
10973
11171
  /* @__PURE__ */ jsx69(
10974
11172
  IconButton,
10975
11173
  {
@@ -10980,7 +11178,7 @@ function StepperView({
10980
11178
  children: "\u2212"
10981
11179
  }
10982
11180
  ),
10983
- /* @__PURE__ */ jsxs50(
11181
+ /* @__PURE__ */ jsxs51(
10984
11182
  Stepper__Value,
10985
11183
  {
10986
11184
  ...edge,
@@ -11054,13 +11252,13 @@ function StepperView({
11054
11252
  children != null && /* @__PURE__ */ jsx69(Stepper__Note, { id: describedBy, children })
11055
11253
  ] }) });
11056
11254
  }
11057
- var Stepper__Body = styled49.div`
11255
+ var Stepper__Body = styled50.div`
11058
11256
  display: inline-grid;
11059
11257
  grid-template-columns: auto 1fr auto;
11060
11258
  align-items: center;
11061
11259
  gap: var(--gap-stepper);
11062
11260
  `;
11063
- var Stepper__Value = styled49.div`
11261
+ var Stepper__Value = styled50.div`
11064
11262
  position: relative;
11065
11263
  text-align: center;
11066
11264
  font-family: var(--font-family-mono);
@@ -11080,7 +11278,7 @@ var Stepper__Value = styled49.div`
11080
11278
  opacity: 0.4;
11081
11279
  }
11082
11280
  `;
11083
- var Stepper__Note = styled49.div`
11281
+ var Stepper__Note = styled50.div`
11084
11282
  grid-column: 1 / -1;
11085
11283
  font-size: var(--font-size-compact);
11086
11284
  color: var(--color-text-muted);
@@ -11165,8 +11363,8 @@ import {
11165
11363
  useRef as useRef14,
11166
11364
  useState as useState17
11167
11365
  } from "react";
11168
- import styled50 from "styled-components";
11169
- import { Fragment as Fragment25, jsx as jsx71, jsxs as jsxs51 } from "react/jsx-runtime";
11366
+ import styled51 from "styled-components";
11367
+ import { Fragment as Fragment26, jsx as jsx71, jsxs as jsxs52 } from "react/jsx-runtime";
11170
11368
  var TABS_PANEL_MIN_WIDTH = 240;
11171
11369
  var TABS_PANEL_GAP = 8;
11172
11370
  function shouldExpandTabs(containerWidth, panelCount) {
@@ -11304,10 +11502,10 @@ function Tabs({
11304
11502
  minColWidth: `${TABS_PANEL_MIN_WIDTH}px`,
11305
11503
  align: "start",
11306
11504
  gap: "related-comfortable",
11307
- children: selectable.map((tab) => /* @__PURE__ */ jsxs51(Section, { children: [
11308
- /* @__PURE__ */ jsxs51(SectionTitle, { as: "h3", $rule: true, children: [
11505
+ children: selectable.map((tab) => /* @__PURE__ */ jsxs52(Section, { children: [
11506
+ /* @__PURE__ */ jsxs52(SectionTitle, { as: "h3", $rule: true, children: [
11309
11507
  tab.label,
11310
- tab.indicator && /* @__PURE__ */ jsxs51(Fragment25, { children: [
11508
+ tab.indicator && /* @__PURE__ */ jsxs52(Fragment26, { children: [
11311
11509
  /* @__PURE__ */ jsx71(Tabs__Dot, { "aria-hidden": "true" }),
11312
11510
  /* @__PURE__ */ jsx71(VisuallyHidden, { children: ", needs attention" })
11313
11511
  ] })
@@ -11317,9 +11515,9 @@ function Tabs({
11317
11515
  }
11318
11516
  ) });
11319
11517
  }
11320
- return /* @__PURE__ */ jsxs51(Tabs__Root, { ref: sizeRef, "data-tabs-root": "", className, children: [
11321
- /* @__PURE__ */ jsxs51(Tabs__BarShell, { children: [
11322
- /* @__PURE__ */ jsx71(Tabs__Scroller, { ref: scrollerRef, children: /* @__PURE__ */ jsxs51(
11518
+ return /* @__PURE__ */ jsxs52(Tabs__Root, { ref: sizeRef, "data-tabs-root": "", className, children: [
11519
+ /* @__PURE__ */ jsxs52(Tabs__BarShell, { children: [
11520
+ /* @__PURE__ */ jsx71(Tabs__Scroller, { ref: scrollerRef, children: /* @__PURE__ */ jsxs52(
11323
11521
  Tabs__Bar,
11324
11522
  {
11325
11523
  role: "tablist",
@@ -11335,7 +11533,7 @@ function Tabs({
11335
11533
  ),
11336
11534
  resolved.map((tab) => {
11337
11535
  const isActive = tab.id === active?.id;
11338
- return /* @__PURE__ */ jsxs51(
11536
+ return /* @__PURE__ */ jsxs52(
11339
11537
  Tabs__Button,
11340
11538
  {
11341
11539
  ref: (el) => {
@@ -11356,7 +11554,7 @@ function Tabs({
11356
11554
  $compact: compact,
11357
11555
  children: [
11358
11556
  tab.label,
11359
- tab.indicator && /* @__PURE__ */ jsxs51(Fragment25, { children: [
11557
+ tab.indicator && /* @__PURE__ */ jsxs52(Fragment26, { children: [
11360
11558
  /* @__PURE__ */ jsx71(Tabs__Dot, { "aria-hidden": "true" }),
11361
11559
  /* @__PURE__ */ jsx71("span", { id: `${uid}${tab.id}-attention`, hidden: true, children: "Needs attention" })
11362
11560
  ] })
@@ -11382,7 +11580,7 @@ function Tabs({
11382
11580
  )
11383
11581
  ] });
11384
11582
  }
11385
- var Tabs__Root = styled50.div`
11583
+ var Tabs__Root = styled51.div`
11386
11584
  display: flex;
11387
11585
  flex-direction: column;
11388
11586
  gap: var(--gap-tabs-panel);
@@ -11390,11 +11588,11 @@ var Tabs__Root = styled50.div`
11390
11588
  flex: 1;
11391
11589
  min-height: 0;
11392
11590
  `;
11393
- var Tabs__BarShell = styled50.div`
11591
+ var Tabs__BarShell = styled51.div`
11394
11592
  position: relative;
11395
11593
  margin-inline: calc(-1 * var(--bleed-inline));
11396
11594
  `;
11397
- var Tabs__Scroller = styled50.div`
11595
+ var Tabs__Scroller = styled51.div`
11398
11596
  display: flex;
11399
11597
  padding-inline: var(--bleed-inline);
11400
11598
  overflow-x: auto;
@@ -11408,7 +11606,7 @@ var Tabs__Scroller = styled50.div`
11408
11606
  display: none;
11409
11607
  }
11410
11608
  `;
11411
- var Tabs__Bar = styled50.div`
11609
+ var Tabs__Bar = styled51.div`
11412
11610
  position: relative;
11413
11611
  flex: 1 0 auto;
11414
11612
  display: flex;
@@ -11418,7 +11616,7 @@ var Tabs__Bar = styled50.div`
11418
11616
  padding: var(--inset-tab-track);
11419
11617
  flex-wrap: nowrap;
11420
11618
  `;
11421
- var Tabs__Blob = styled50.span`
11619
+ var Tabs__Blob = styled51.span`
11422
11620
  position: absolute;
11423
11621
  top: var(--inset-tab-track);
11424
11622
  bottom: var(--inset-tab-track);
@@ -11434,7 +11632,7 @@ var Tabs__Blob = styled50.span`
11434
11632
  transition: none;
11435
11633
  }
11436
11634
  `;
11437
- var Tabs__Dot = styled50.span`
11635
+ var Tabs__Dot = styled51.span`
11438
11636
  display: inline-block;
11439
11637
  width: 7px;
11440
11638
  height: 7px;
@@ -11443,7 +11641,7 @@ var Tabs__Dot = styled50.span`
11443
11641
  border-radius: var(--radius-circle);
11444
11642
  background: var(--color-warn-mark);
11445
11643
  `;
11446
- var Tabs__Button = styled50.button`
11644
+ var Tabs__Button = styled51.button`
11447
11645
  /* Transparent: the blob behind it is the selected background. */
11448
11646
  background: transparent;
11449
11647
  border: none;
@@ -11496,7 +11694,7 @@ var Tabs__Button = styled50.button`
11496
11694
  ${({ $compact }) => $compact ? "padding: var(--inset-tab-compact-touch);" : "padding: var(--inset-control-touch);"}
11497
11695
  }
11498
11696
  `;
11499
- var Tabs__Panel = styled50.div`
11697
+ var Tabs__Panel = styled51.div`
11500
11698
  display: flex;
11501
11699
  flex-direction: column;
11502
11700
  flex: 1;
@@ -11506,8 +11704,8 @@ var Tabs__Panel = styled50.div`
11506
11704
  // src/Tape.tsx
11507
11705
  import { bandIn as bandIn2 } from "@ksp-gonogo/sitrep-sdk";
11508
11706
  import { useEffect as useEffect15, useRef as useRef15, useState as useState18 } from "react";
11509
- import styled51 from "styled-components";
11510
- import { Fragment as Fragment26, jsx as jsx72, jsxs as jsxs52 } from "react/jsx-runtime";
11707
+ import styled52 from "styled-components";
11708
+ import { Fragment as Fragment27, jsx as jsx72, jsxs as jsxs53 } from "react/jsx-runtime";
11511
11709
  var FIGURE_CLEARANCE_PX = 12;
11512
11710
  var PAD_TOP = 12;
11513
11711
  var PAD_BOTTOM = 12;
@@ -11608,7 +11806,7 @@ function Tape({
11608
11806
  const x1 = trackX - 4;
11609
11807
  const x2 = trackX + TRACK_W + 4;
11610
11808
  const mid = trackX + TRACK_W / 2;
11611
- return /* @__PURE__ */ jsxs52("g", { "data-level": dashed ? "sea" : "ground", children: [
11809
+ return /* @__PURE__ */ jsxs53("g", { "data-level": dashed ? "sea" : "ground", children: [
11612
11810
  /* @__PURE__ */ jsx72(
11613
11811
  "line",
11614
11812
  {
@@ -11651,7 +11849,7 @@ function Tape({
11651
11849
  [onScale(onRail(interval.lo)), onScale(onRail(interval.hi))],
11652
11850
  placedOnScale()
11653
11851
  ) ? interval : null;
11654
- return /* @__PURE__ */ jsxs52(
11852
+ return /* @__PURE__ */ jsxs53(
11655
11853
  Tape__Meter,
11656
11854
  {
11657
11855
  ref: wrapRef,
@@ -11673,7 +11871,7 @@ function Tape({
11673
11871
  },
11674
11872
  style: fillHeight ? { height: "100%" } : void 0,
11675
11873
  children: [
11676
- /* @__PURE__ */ jsxs52(
11874
+ /* @__PURE__ */ jsxs53(
11677
11875
  "svg",
11678
11876
  {
11679
11877
  width,
@@ -11721,7 +11919,7 @@ function Tape({
11721
11919
  const underFigure = hasFigure && Math.abs(
11722
11920
  y - Math.max(trackTop + 4, Math.min(trackBottom - 4, pointerY))
11723
11921
  ) < FIGURE_CLEARANCE_PX;
11724
- return /* @__PURE__ */ jsxs52("g", { children: [
11922
+ return /* @__PURE__ */ jsxs53("g", { children: [
11725
11923
  /* @__PURE__ */ jsx72(
11726
11924
  "line",
11727
11925
  {
@@ -11751,7 +11949,7 @@ function Tape({
11751
11949
  const { bounds } = m;
11752
11950
  const y = onRail(m.value);
11753
11951
  const color = m.color ?? "var(--color-accent-fg)";
11754
- return /* @__PURE__ */ jsxs52("g", { "data-marker": m.label, children: [
11952
+ return /* @__PURE__ */ jsxs53("g", { "data-marker": m.label, children: [
11755
11953
  /* @__PURE__ */ jsx72(
11756
11954
  "line",
11757
11955
  {
@@ -11803,7 +12001,7 @@ function Tape({
11803
12001
  end
11804
12002
  );
11805
12003
  }),
11806
- hasFigure && /* @__PURE__ */ jsxs52(Fragment26, { children: [
12004
+ hasFigure && /* @__PURE__ */ jsxs53(Fragment27, { children: [
11807
12005
  /* @__PURE__ */ jsx72(
11808
12006
  "line",
11809
12007
  {
@@ -11815,7 +12013,7 @@ function Tape({
11815
12013
  strokeWidth: 2
11816
12014
  }
11817
12015
  ),
11818
- /* @__PURE__ */ jsxs52(
12016
+ /* @__PURE__ */ jsxs53(
11819
12017
  "text",
11820
12018
  {
11821
12019
  x: mirrored ? labelX + 2 : labelX - 2,
@@ -11860,27 +12058,27 @@ function Tape({
11860
12058
  }
11861
12059
  );
11862
12060
  }
11863
- var Tape__Meter = styled51.div`
12061
+ var Tape__Meter = styled52.div`
11864
12062
  display: block;
11865
12063
  max-width: 100%;
11866
12064
  `;
11867
12065
 
11868
12066
  // src/TextField.tsx
11869
12067
  import { useEffect as useEffect16, useId as useId16, useState as useState19 } from "react";
11870
- import styled52 from "styled-components";
11871
- import { jsx as jsx73, jsxs as jsxs53 } from "react/jsx-runtime";
12068
+ import styled53 from "styled-components";
12069
+ import { jsx as jsx73, jsxs as jsxs54 } from "react/jsx-runtime";
11872
12070
  function TextField(props) {
11873
12071
  if (props.command) {
11874
12072
  return /* @__PURE__ */ jsx73(CommandedTextField, { ...props, command: props.command });
11875
12073
  }
11876
12074
  return /* @__PURE__ */ jsx73(PlainTextField, { ...props });
11877
12075
  }
11878
- var FieldBox = styled52.div`
12076
+ var FieldBox = styled53.div`
11879
12077
  position: relative;
11880
12078
  width: 100%;
11881
12079
 
11882
12080
  `;
11883
- var FieldWord = styled52.span`
12081
+ var FieldWord = styled53.span`
11884
12082
  position: absolute;
11885
12083
  inset-block: 0;
11886
12084
  inset-inline-end: var(--gap-related);
@@ -11917,9 +12115,9 @@ function CommandedTextField({
11917
12115
  if (draft === null || draft === value7 || input.inert) return;
11918
12116
  input.send(draft);
11919
12117
  };
11920
- return /* @__PURE__ */ jsxs53(Field, { children: [
12118
+ return /* @__PURE__ */ jsxs54(Field, { children: [
11921
12119
  /* @__PURE__ */ jsx73(FieldLabel, { htmlFor: id, children: label }),
11922
- /* @__PURE__ */ jsx73(Tooltip, { text: input.tip, children: /* @__PURE__ */ jsxs53(FieldBox, { children: [
12120
+ /* @__PURE__ */ jsx73(Tooltip, { text: input.tip, children: /* @__PURE__ */ jsxs54(FieldBox, { children: [
11923
12121
  /* @__PURE__ */ jsx73(
11924
12122
  Input,
11925
12123
  {
@@ -11957,7 +12155,7 @@ function PlainTextField({
11957
12155
  }) {
11958
12156
  const id = useId16();
11959
12157
  const errorId = `${id}-invalid`;
11960
- return /* @__PURE__ */ jsxs53(Field, { children: [
12158
+ return /* @__PURE__ */ jsxs54(Field, { children: [
11961
12159
  /* @__PURE__ */ jsx73(FieldLabel, { htmlFor: id, children: label }),
11962
12160
  /* @__PURE__ */ jsx73(
11963
12161
  Input,
@@ -11985,8 +12183,8 @@ import {
11985
12183
  value as value6
11986
12184
  } from "@ksp-gonogo/sitrep-sdk";
11987
12185
  import { useId as useId17, useState as useState20 } from "react";
11988
- import styled53 from "styled-components";
11989
- import { jsx as jsx74, jsxs as jsxs54 } from "react/jsx-runtime";
12186
+ import styled54 from "styled-components";
12187
+ import { jsx as jsx74, jsxs as jsxs55 } from "react/jsx-runtime";
11990
12188
  var INSTANT_WHEEL_PX = 112;
11991
12189
  function worth(symbol, unit) {
11992
12190
  try {
@@ -12022,7 +12220,7 @@ function UnitInput({
12022
12220
  const [typing, setTyping] = useState20({});
12023
12221
  const typed = (index) => typing[index] ?? null;
12024
12222
  const type = (index, next) => setTyping((held2) => ({ ...held2, [index]: next }));
12025
- const wheel = rate ? /* @__PURE__ */ jsxs54(Stack, { gap: "related-packed", children: [
12223
+ const wheel = rate ? /* @__PURE__ */ jsxs55(Stack, { gap: "related-packed", children: [
12026
12224
  /* @__PURE__ */ jsx74(
12027
12225
  JogWheel,
12028
12226
  {
@@ -12047,9 +12245,9 @@ function UnitInput({
12047
12245
  )
12048
12246
  ] }) : null;
12049
12247
  if (isInstant(unit)) {
12050
- return /* @__PURE__ */ jsxs54(Control, { children: [
12248
+ return /* @__PURE__ */ jsxs55(Control, { children: [
12051
12249
  /* @__PURE__ */ jsx74(GroupName, { "aria-hidden": "true", children: name }),
12052
- /* @__PURE__ */ jsxs54(Stack, { gap: "related-dense", children: [
12250
+ /* @__PURE__ */ jsxs55(Stack, { gap: "related-dense", children: [
12053
12251
  /* @__PURE__ */ jsx74(
12054
12252
  MissionDateField,
12055
12253
  {
@@ -12082,9 +12280,9 @@ function UnitInput({
12082
12280
  type(index, { text, against: amount });
12083
12281
  onChange(dynamicValue(unit, total));
12084
12282
  };
12085
- return /* @__PURE__ */ jsxs54(Control, { children: [
12283
+ return /* @__PURE__ */ jsxs55(Control, { children: [
12086
12284
  /* @__PURE__ */ jsx74(GroupName, { id: `${id}-label`, children: name }),
12087
- /* @__PURE__ */ jsx74(RungRow, { role: "group", "aria-labelledby": `${id}-label`, children: rungs.map((symbol, index) => /* @__PURE__ */ jsxs54(RungCell, { children: [
12285
+ /* @__PURE__ */ jsx74(RungRow, { role: "group", "aria-labelledby": `${id}-label`, children: rungs.map((symbol, index) => /* @__PURE__ */ jsxs55(RungCell, { children: [
12088
12286
  /* @__PURE__ */ jsx74(
12089
12287
  RungField,
12090
12288
  {
@@ -12107,9 +12305,9 @@ function UnitInput({
12107
12305
  onChange(dynamicValue(unit, amount));
12108
12306
  }
12109
12307
  };
12110
- return /* @__PURE__ */ jsxs54(Control, { children: [
12308
+ return /* @__PURE__ */ jsxs55(Control, { children: [
12111
12309
  /* @__PURE__ */ jsx74(FieldName, { htmlFor: id, children: name }),
12112
- /* @__PURE__ */ jsxs54(ValueRow, { children: [
12310
+ /* @__PURE__ */ jsxs55(ValueRow, { children: [
12113
12311
  /* @__PURE__ */ jsx74(
12114
12312
  SingleField,
12115
12313
  {
@@ -12167,7 +12365,7 @@ function readNumber(text) {
12167
12365
  function round(n) {
12168
12366
  return Number.isFinite(n) ? Math.round(n * 1e6) / 1e6 : 0;
12169
12367
  }
12170
- var Control = styled53.div`
12368
+ var Control = styled54.div`
12171
12369
  display: flex;
12172
12370
  flex-direction: column;
12173
12371
  gap: var(--gap-field-label-compact);
@@ -12178,19 +12376,19 @@ var nameStyles = `
12178
12376
  letter-spacing: 0.06em;
12179
12377
  text-transform: uppercase;
12180
12378
  `;
12181
- var FieldName = styled53.label`
12379
+ var FieldName = styled54.label`
12182
12380
  ${nameStyles}
12183
12381
  `;
12184
- var GroupName = styled53.span`
12382
+ var GroupName = styled54.span`
12185
12383
  ${nameStyles}
12186
12384
  `;
12187
- var ValueRow = styled53.div`
12385
+ var ValueRow = styled54.div`
12188
12386
  display: grid;
12189
12387
  grid-template-columns: 1fr auto;
12190
12388
  align-items: center;
12191
12389
  gap: var(--gap-value-tag);
12192
12390
  `;
12193
- var SingleField = styled53.input`
12391
+ var SingleField = styled54.input`
12194
12392
  background: var(--color-surface-panel);
12195
12393
  border: 1px solid var(--color-border-subtle);
12196
12394
  color: var(--color-text-primary);
@@ -12203,21 +12401,21 @@ var SingleField = styled53.input`
12203
12401
 
12204
12402
  ${focusRing}
12205
12403
  `;
12206
- var UnitSymbol = styled53.span`
12404
+ var UnitSymbol = styled54.span`
12207
12405
  font-size: var(--font-size-compact);
12208
12406
  color: var(--color-text-faint);
12209
12407
  `;
12210
- var RungRow = styled53.div`
12408
+ var RungRow = styled54.div`
12211
12409
  display: flex;
12212
12410
  gap: var(--gap-unit-parts);
12213
12411
  `;
12214
- var RungCell = styled53.div`
12412
+ var RungCell = styled54.div`
12215
12413
  display: grid;
12216
12414
  grid-template-columns: 1fr auto;
12217
12415
  align-items: center;
12218
12416
  gap: var(--gap-unit-suffix);
12219
12417
  `;
12220
- var RungField = styled53(SingleField)`
12418
+ var RungField = styled54(SingleField)`
12221
12419
  width: 4.5em;
12222
12420
  `;
12223
12421