@7365admin1/layer-common 4.73.1-staging.452 → 4.73.1-staging.453

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "4.73.1-staging.452",
5
+ "version": "4.73.1-staging.453",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
@@ -877,20 +877,25 @@ export function mapRobots(
877
877
  });
878
878
  }
879
879
 
880
- /** Robots that answer but cannot report a floor - listed, never placed (a guessed floor is worse than none). */
880
+ /**
881
+ * Robots that answer but cannot be drawn: no floor (a guessed floor is worse
882
+ * than none), or a floor but no position on the plan (Ounitech reports its
883
+ * floor since the 2025.10 API, but not a plan position). Listed, never placed.
884
+ * An offline robot with a plan position is simply not drawn (never a frozen dot).
885
+ */
881
886
  export function unplacedRobots<T extends { _id?: unknown }>(rows: T[], states: Record<string, TLiveRobotState>): T[] {
882
887
  return rows.filter((r) => {
883
888
  const live = states[String(r?._id ?? "")];
884
- return !!live?.ok && live.monitorable !== false && live.floorKnown !== true;
889
+ return !!live?.ok && live.monitorable !== false && (live.floorKnown !== true || !planPoint(live as any));
885
890
  });
886
891
  }
887
892
 
888
- /** "2 robots (Ounitech) can't report a floor, so they are listed but not placed on the map." */
893
+ /** "2 robots (Ounitech) can't be placed on the map, so they are listed but not drawn." */
889
894
  export function unplacedText(brandNames: string[]): string {
890
895
  const n = brandNames.length;
891
896
  if (!n) return "";
892
897
  const brands = [...new Set(brandNames)].join(", ");
893
- return `${n} ${n === 1 ? "robot" : "robots"} (${brands}) can't report a floor, so ${n === 1 ? "it is" : "they are"} listed but not placed on the map.`;
898
+ return `${n} ${n === 1 ? "robot" : "robots"} (${brands}) can't be placed on the map, so ${n === 1 ? "it is" : "they are"} listed but not drawn.`;
894
899
  }
895
900
 
896
901
  /* -------------------------------------------------------- patrol routes */