@foxglove/extension 2.42.0 → 2.44.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/stable.ts +29 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxglove/extension",
3
- "version": "2.42.0",
3
+ "version": "2.44.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Foxglove Technologies",
@@ -15,7 +15,7 @@
15
15
  "prepack": "tsc -b tsconfig.json"
16
16
  },
17
17
  "devDependencies": {
18
- "@foxglove/tsconfig": "2.0.0",
18
+ "@foxglove/tsconfig": "3.1.0",
19
19
  "typescript": "5.9.2"
20
20
  }
21
21
  }
package/src/stable.ts CHANGED
@@ -383,7 +383,7 @@ export type PanelExtensionContext = {
383
383
  * Identifies the semantics of the data being played back, such as which topics or parameters
384
384
  * are semantically meaningful or normalization conventions to use. This typically maps to a
385
385
  * shorthand identifier for a robotics framework such as "ros1", "ros2", or "ulog". See the MCAP
386
- * profiles concept at <https://github.com/foxglove/mcap/blob/main/docs/specification/appendix.md#well-known-profiles>.
386
+ * profiles concept at <https://mcap.dev/spec/registry#profiles>.
387
387
  */
388
388
  readonly dataSourceProfile?: string;
389
389
 
@@ -465,7 +465,7 @@ export type PanelExtensionContext = {
465
465
  * const variableValues = renderState.variables;
466
466
  * const myVarValue = variableValues.myVar;
467
467
  *
468
- * // Call done when you've rendered all the UI for this renderState. If your UI framework delays rendering, call done when rendering has actaully happened.
468
+ * // Call done when you've rendered all the UI for this renderState. If your UI framework delays rendering, call done when rendering has actually happened.
469
469
  * done();
470
470
  * };
471
471
  * ```
@@ -556,7 +556,7 @@ export type PanelExtensionContext = {
556
556
  /**
557
557
  * Unsubscribe from all topics.
558
558
  *
559
- * Note: This is analagous to calling `subscribe([])` with an empty array of topics.
559
+ * Note: This is analogous to calling `subscribe([])` with an empty array of topics.
560
560
  */
561
561
  unsubscribeAll(): void;
562
562
 
@@ -1516,6 +1516,26 @@ export type SettingsTreeNodeActionDivider = { type: "divider" };
1516
1516
  */
1517
1517
  export type SettingsTreeNodeAction = SettingsTreeNodeActionItem | SettingsTreeNodeActionDivider;
1518
1518
 
1519
+ /**
1520
+ * Drag-and-drop metadata for a settings tree node. Allows the node to be
1521
+ * dragged onto panels that accept topics or message paths.
1522
+ *
1523
+ * @category Custom panels
1524
+ */
1525
+ export type SettingsTreeNodeDrag =
1526
+ | {
1527
+ type: "topic";
1528
+ /** Topic name without quotes, e.g. `/my_topic`. */
1529
+ topicName: string;
1530
+ }
1531
+ | {
1532
+ type: "message-path";
1533
+ /** Full message path, e.g. `/my_topic.field` or `"/topic with spaces".field`. */
1534
+ value: string;
1535
+ /** True if the path points to a primitive value. Required by panels like Plot. */
1536
+ isLeaf?: boolean;
1537
+ };
1538
+
1519
1539
  /**
1520
1540
  * A node represents a single item or group of items in the settings tree.
1521
1541
  *
@@ -1586,7 +1606,7 @@ export type SettingsTreeNode = {
1586
1606
 
1587
1607
  /**
1588
1608
  * An optional visibility status. If this is not undefined, the node
1589
- * editor will display a visiblity toggle button and send update actions
1609
+ * editor will display a visibility toggle button and send update actions
1590
1610
  * to the action handler.
1591
1611
  **/
1592
1612
  visible?: boolean;
@@ -1595,6 +1615,11 @@ export type SettingsTreeNode = {
1595
1615
  * Filter Children by visibility status
1596
1616
  */
1597
1617
  enableVisibilityFilter?: boolean;
1618
+
1619
+ /**
1620
+ * Drag-and-drop configuration for this node.
1621
+ */
1622
+ drag?: SettingsTreeNodeDrag;
1598
1623
  };
1599
1624
 
1600
1625
  /**