@foxglove/extension 2.59.0 → 3.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxglove/extension",
3
- "version": "2.59.0",
3
+ "version": "3.1.0",
4
4
  "homepage": "https://foxglove.dev/",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -340,9 +340,26 @@ export namespace Experimental {
340
340
 
341
341
  /**
342
342
  * Map of compare data sources. Only present when multiple data sources are loaded in compare mode.
343
+ *
344
+ * When set, player times on this render state (`currentTime`, `startTime`, `endTime`) and
345
+ * remapped message `receiveTime` / `publishTime` values live on the shared compare clock
346
+ * (origin t=0), not wall-clock epoch. Prefer elapsed / seconds formatting for those values.
347
+ * Recover a source-local absolute time with `sourceTime = currentTime - timeOffset` using the
348
+ * matching entry's `timeOffset`.
349
+ *
350
+ * Reordering sources reassigns which source occupies each slot. The occupant of the primary
351
+ * slot is also on {@link RenderState.primaryComparisonSource}.
343
352
  */
344
353
  comparisonSources?: ComparisonSources;
345
354
 
355
+ /**
356
+ * The comparison source that occupies the primary slot. Only set in compare mode.
357
+ * Reordering sources may update this field to a different source in the primary slot;
358
+ * this field then updates. Watch {@link RenderState.comparisonSources} when you need every
359
+ * source, not only the primary.
360
+ */
361
+ primaryComparisonSource?: ComparisonSource;
362
+
346
363
  /** MCAP metadata records from all active sources. */
347
364
  metadata?: MetadataRecord[];
348
365
 
@@ -359,8 +376,9 @@ export namespace Experimental {
359
376
  * this field changes.
360
377
  *
361
378
  * Use `context.watch` to indicate which fields in {@link RenderState} (e.g. `currentFrame`,
362
- * `currentTime`, `previewTime`, `parameters`, `topics`, `metadata`, `attachments`) should
363
- * trigger panel re-renders when their contained values change.
379
+ * `currentTime`, `previewTime`, `parameters`, `topics`, `metadata`, `attachments`,
380
+ * `comparisonSources`, `primaryComparisonSource`) should trigger panel re-renders when their
381
+ * contained values change.
364
382
  *
365
383
  * ```ts
366
384
  * context.watch("topics");
@@ -376,7 +394,8 @@ export namespace Experimental {
376
394
  /**
377
395
  * Process render events for the panel. Each render event receives a render state and a done
378
396
  * callback. This override surfaces the experimental {@link RenderState} fields
379
- * (`dataSources`, `metadata`, `attachments`) so panels can read them after calling `watch`.
397
+ * (`comparisonSources`, `primaryComparisonSource`, `metadata`, `attachments`) so panels can read
398
+ * them after calling `watch`.
380
399
  */
381
400
  onRender?: (renderState: Immutable<RenderState>, done: () => void) => void;
382
401
 
package/src/stable.ts CHANGED
@@ -1555,6 +1555,11 @@ export type SettingsTreeNodeActionItem = {
1555
1555
  * Whether this action is disabled or not. Defaults to false.
1556
1556
  */
1557
1557
  disabled?: boolean;
1558
+
1559
+ /**
1560
+ * Optional explanatory tooltip for the action.
1561
+ */
1562
+ tooltip?: string;
1558
1563
  };
1559
1564
 
1560
1565
  /**