@robotical/webapp-types 3.27.2 → 3.27.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marty-web-app",
3
- "version": "3.27.2",
3
+ "version": "3.27.4",
4
4
  "private": true,
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -18,7 +18,7 @@
18
18
  "@robotical/martyblocks": "^4.0.80",
19
19
  "@robotical/martyblocksjr": "^4.6.0",
20
20
  "@robotical/maze": "^0.1.24",
21
- "@robotical/rc-sequencer": "^1.1.16",
21
+ "@robotical/rc-sequencer": "^1.1.18",
22
22
  "@robotical/ricjs-robotical-addons": "^1.2.8",
23
23
  "@robotical/robofly-game": "^0.1.27",
24
24
  "@robotical/roboticaljs": "^1.1.28",
@@ -142,7 +142,9 @@ export declare class ColourDiagnosticError extends Error {
142
142
  }
143
143
  export declare const newColourSession: () => ColourSession;
144
144
  export declare const getColourSensors: (raftId: string) => ColourSensor[];
145
- export declare const assertColourSensorActive: (sensor: ColourSensor, signal: AbortSignal) => void;
145
+ export declare const assertColourSensorActive: (sensor: ColourSensor, signal: AbortSignal, { allowBackground }?: {
146
+ allowBackground?: boolean | undefined;
147
+ }) => void;
146
148
  export declare const interpretColour: (vals: Record<string, number | boolean>, profile?: ColourSignalProfile) => {
147
149
  red: number;
148
150
  green: number;
@@ -113,10 +113,11 @@ export var getColourSensors = function (raftId) {
113
113
  .filter(function (addon) { return addon.whoAmI === "coloursensor"; })
114
114
  .map(function (addon) { return ({ key: JSON.stringify([addon.id, addon.name]), raftId: raftId, raft: raft, addon: addon }); });
115
115
  };
116
- export var assertColourSensorActive = function (sensor, signal) {
116
+ export var assertColourSensorActive = function (sensor, signal, _a) {
117
+ var _b = _a === void 0 ? {} : _a, _c = _b.allowBackground, allowBackground = _c === void 0 ? false : _c;
117
118
  if (signal.aborted)
118
119
  throw new ColourDiagnosticError("cancelled");
119
- if (document.hidden)
120
+ if (document.hidden && !allowBackground)
120
121
  throw new ColourDiagnosticError("backgrounded");
121
122
  var current = getColourSensors(sensor.raftId).find(function (candidate) { return candidate.key === sensor.key; });
122
123
  if (!current || current.raft !== sensor.raft)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robotical/webapp-types",
3
- "version": "3.27.2",
3
+ "version": "3.27.4",
4
4
  "description": "Type definitions for the Application Manager",
5
5
  "main": "dist/application-manager.d.ts",
6
6
  "types": "dist/application-manager.d.ts",