@foxglove/extension 3.0.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": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "homepage": "https://foxglove.dev/",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -346,9 +346,20 @@ export namespace Experimental {
346
346
  * (origin t=0), not wall-clock epoch. Prefer elapsed / seconds formatting for those values.
347
347
  * Recover a source-local absolute time with `sourceTime = currentTime - timeOffset` using the
348
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}.
349
352
  */
350
353
  comparisonSources?: ComparisonSources;
351
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
+
352
363
  /** MCAP metadata records from all active sources. */
353
364
  metadata?: MetadataRecord[];
354
365
 
@@ -365,8 +376,9 @@ export namespace Experimental {
365
376
  * this field changes.
366
377
  *
367
378
  * Use `context.watch` to indicate which fields in {@link RenderState} (e.g. `currentFrame`,
368
- * `currentTime`, `previewTime`, `parameters`, `topics`, `metadata`, `attachments`) should
369
- * 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.
370
382
  *
371
383
  * ```ts
372
384
  * context.watch("topics");
@@ -382,7 +394,8 @@ export namespace Experimental {
382
394
  /**
383
395
  * Process render events for the panel. Each render event receives a render state and a done
384
396
  * callback. This override surfaces the experimental {@link RenderState} fields
385
- * (`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`.
386
399
  */
387
400
  onRender?: (renderState: Immutable<RenderState>, done: () => void) => void;
388
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
  /**