@ksp-gonogo/uplink-tools 0.2.0-rc.10 → 0.2.0-rc.8
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/widgets.js +14 -17
- package/dist/widgets.js.map +1 -1
- package/package.json +3 -3
package/dist/widgets.js
CHANGED
|
@@ -5877,7 +5877,7 @@ function ActionGroupConfigForm({ config, onSave }) {
|
|
|
5877
5877
|
|
|
5878
5878
|
// ../components/dist/ActionGroup/ActionGroupView.js
|
|
5879
5879
|
import { jsx as _jsx23, jsxs as _jsxs17 } from "react/jsx-runtime";
|
|
5880
|
-
import { Button as Button4, Cluster, getSizeBucket,
|
|
5880
|
+
import { Button as Button4, Cluster, getSizeBucket, IconButton as IconButton2, Inline, Section, Stack, Text, Tooltip as Tooltip3, Truncate } from "@ksp-gonogo/ui-kit";
|
|
5881
5881
|
import { useRef as useRef7, useState as useState8 } from "react";
|
|
5882
5882
|
|
|
5883
5883
|
// ../components/dist/shared/AlarmsLauncher.js
|
|
@@ -5975,7 +5975,7 @@ function useGroupToggle({ group, value: value91, valueHeld, stateUnreadable, lab
|
|
|
5975
5975
|
}
|
|
5976
5976
|
|
|
5977
5977
|
// ../components/dist/ActionGroup/ActionGroupView.js
|
|
5978
|
-
function ActionGroupView({ config, onConfigChange, w, h, group, value: value91, valueHeld,
|
|
5978
|
+
function ActionGroupView({ config, onConfigChange, w, h, group, value: value91, valueHeld, stateUnreadable }) {
|
|
5979
5979
|
const currentLabel = config?.label ?? group?.name ?? "";
|
|
5980
5980
|
const openAlarms = useAlarmsLauncher();
|
|
5981
5981
|
const { isOn, stateLabel, canToggle, unavailableReason, press } = useGroupToggle({
|
|
@@ -6044,7 +6044,7 @@ function ActionGroupView({ config, onConfigChange, w, h, group, value: value91,
|
|
|
6044
6044
|
name: `Fire ${currentLabel}`,
|
|
6045
6045
|
action: group.toggle
|
|
6046
6046
|
});
|
|
6047
|
-
}, children: _jsx23(BellIcon, {}) }) }), _jsx23(Tooltip3, { text: unavailableReason ?? `Toggle ${currentLabel}`, children: _jsx23(ToggleButton, { active: isOn, size: "sm", disabled: !canToggle, onClick: press, "aria-label": `Toggle ${currentLabel}`, children:
|
|
6047
|
+
}, children: _jsx23(BellIcon, {}) }) }), _jsx23(Tooltip3, { text: unavailableReason ?? `Toggle ${currentLabel}`, children: _jsx23(ToggleButton, { active: isOn, size: "sm", disabled: !canToggle, onClick: press, "aria-label": `Toggle ${currentLabel}`, children: stateLabel }) })] })] }) }, "control"),
|
|
6048
6048
|
_jsx23(AugmentSlot, { name: "action-group.subsystem", props: slotContext }, "subsystem")
|
|
6049
6049
|
] })
|
|
6050
6050
|
);
|
|
@@ -6062,13 +6062,11 @@ var actionGroupActions = [
|
|
|
6062
6062
|
|
|
6063
6063
|
// ../components/dist/ActionGroup/groupState.js
|
|
6064
6064
|
function groupStateOf(group, controlReading) {
|
|
6065
|
-
const
|
|
6066
|
-
const
|
|
6067
|
-
const valueHeld = held && !valueLate;
|
|
6068
|
-
const observed = controlReading.state === "observed" || valueLate ? controlReading.value : void 0;
|
|
6065
|
+
const valueHeld = controlReading.state === "held";
|
|
6066
|
+
const observed = controlReading.state === "observed" ? controlReading.value : void 0;
|
|
6069
6067
|
const value91 = resolveGroupValue(group, observed);
|
|
6070
6068
|
const stateUnreadable = observed !== void 0 && group !== void 0 && group.provenance !== "assumed" && value91 == null;
|
|
6071
|
-
return { value: value91, valueHeld,
|
|
6069
|
+
return { value: value91, valueHeld, stateUnreadable };
|
|
6072
6070
|
}
|
|
6073
6071
|
|
|
6074
6072
|
// ../components/dist/ActionGroup/useActionGroupEssentials.js
|
|
@@ -6087,7 +6085,6 @@ function useActionGroupEssentials(props) {
|
|
|
6087
6085
|
...state,
|
|
6088
6086
|
value: stillTrue(structure, void 0)?.currentStage,
|
|
6089
6087
|
valueHeld: false,
|
|
6090
|
-
valueLate: false,
|
|
6091
6088
|
stateUnreadable: false
|
|
6092
6089
|
} : state,
|
|
6093
6090
|
label
|
|
@@ -6121,12 +6118,12 @@ function ActionGroupComponent(props) {
|
|
|
6121
6118
|
if (group && group.index === void 0 && group.name === "Stage") {
|
|
6122
6119
|
return _jsx24(StageActionGroup, { ...props, group });
|
|
6123
6120
|
}
|
|
6124
|
-
const { value: value91, valueHeld,
|
|
6125
|
-
return _jsx24(ActionGroupView, { ...props, group, value: value91, valueHeld,
|
|
6121
|
+
const { value: value91, valueHeld, stateUnreadable } = groupStateOf(group, controlReading);
|
|
6122
|
+
return _jsx24(ActionGroupView, { ...props, group, value: value91, valueHeld, stateUnreadable });
|
|
6126
6123
|
}
|
|
6127
6124
|
function StageActionGroup({ group, ...props }) {
|
|
6128
6125
|
const structure = useTelemetry("vessel.structure");
|
|
6129
|
-
return _jsx24(ActionGroupView, { ...props, group, value: stillTrue2(structure, void 0)?.currentStage, valueHeld: false,
|
|
6126
|
+
return _jsx24(ActionGroupView, { ...props, group, value: stillTrue2(structure, void 0)?.currentStage, valueHeld: false, stateUnreadable: false });
|
|
6130
6127
|
}
|
|
6131
6128
|
registerComponent({
|
|
6132
6129
|
id: "action-group",
|
|
@@ -8967,7 +8964,7 @@ registerComponent({
|
|
|
8967
8964
|
// ../components/dist/CommSignal/CommSignalView.js
|
|
8968
8965
|
import { jsx as _jsx50, jsxs as _jsxs37 } from "react/jsx-runtime";
|
|
8969
8966
|
import { value as value13 } from "@ksp-gonogo/sitrep-sdk";
|
|
8970
|
-
import { Cluster as Cluster6, EmptyState as EmptyState3, Grid as Grid3, getWidgetShape, HeldFigure
|
|
8967
|
+
import { Cluster as Cluster6, EmptyState as EmptyState3, Grid as Grid3, getWidgetShape, HeldFigure, NULL_DISPLAY as NULL_DISPLAY10, Panel as Panel5, Section as Section5, Stack as Stack6, Unit as Unit5, VisuallyHidden as VisuallyHidden3 } from "@ksp-gonogo/ui-kit";
|
|
8971
8968
|
import { useMemo as useMemo25 } from "react";
|
|
8972
8969
|
|
|
8973
8970
|
// ../components/dist/CommSignal/CommSignalDetailRows.js
|
|
@@ -9351,7 +9348,7 @@ function CommSignalComponent({ w, h }) {
|
|
|
9351
9348
|
showFullPath
|
|
9352
9349
|
});
|
|
9353
9350
|
const figure = pct === null ? null : _jsx50(Unit5, { value: value13("%", pct * 100), decimals: 0 });
|
|
9354
|
-
const percent = figure !== null && strengthMark !== null ? _jsx50(
|
|
9351
|
+
const percent = figure !== null && strengthMark !== null ? _jsx50(HeldFigure, { kind: strengthMark.kind ?? "current", elsewhere: strengthMark.elsewhere, caption: strengthMark.caption, children: figure }) : figure;
|
|
9355
9352
|
const headline = signalHeadline({
|
|
9356
9353
|
noSignal,
|
|
9357
9354
|
connected,
|
|
@@ -27171,7 +27168,7 @@ function CurrentTargetSummary({ tarName, tarType, tarDistance, tarRelVel, rangeR
|
|
|
27171
27168
|
|
|
27172
27169
|
// ../components/dist/TargetPicker/TargetRow.js
|
|
27173
27170
|
import { jsx as _jsx206, jsxs as _jsxs164 } from "react/jsx-runtime";
|
|
27174
|
-
import { HeldFigure as
|
|
27171
|
+
import { HeldFigure as HeldFigure2, heldWord, NULL_DISPLAY as NULL_DISPLAY55, Row as Row11, Spinner as Spinner2, Unit as Unit57 } from "@ksp-gonogo/ui-kit";
|
|
27175
27172
|
|
|
27176
27173
|
// ../components/dist/TargetPicker/knowledge.js
|
|
27177
27174
|
import { TargetKnowledge } from "@ksp-gonogo/sitrep-sdk";
|
|
@@ -27210,9 +27207,9 @@ function KnownOnly({ entry, distance, listHeld }) {
|
|
|
27210
27207
|
const caption = listHeld !== void 0 && known !== null ? `${heldWord(listHeld)}. ${known}` : known;
|
|
27211
27208
|
const reckoned = distance?.reckoning.status === "available" ? distance.reckoning.modelled : void 0;
|
|
27212
27209
|
if (reckoned == null || !reckoned.isFinite()) {
|
|
27213
|
-
return _jsx206(
|
|
27210
|
+
return _jsx206(HeldFigure2, { kind: unchangedSinceHeard(entry) && listHeld === void 0 ? "modelled" : "held", caption, children: NULL_DISPLAY55 });
|
|
27214
27211
|
}
|
|
27215
|
-
return _jsx206(
|
|
27212
|
+
return _jsx206(HeldFigure2, { kind: "modelled", caption: `${caption}. Range reckoned along that orbit`, children: _jsx206(Unit57, { value: reckoned }) });
|
|
27216
27213
|
}
|
|
27217
27214
|
|
|
27218
27215
|
// ../components/dist/TargetPicker/topics.js
|