@launchdarkly/toolbar 1.4.1 → 1.5.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.
@@ -1,7 +1,9 @@
1
1
  import { ToolbarAnalytics } from '../../../utils/analytics';
2
+ import { ToolbarMode } from '../types';
2
3
  interface AnalyticsProviderProps {
3
4
  children: React.ReactNode;
5
+ mode?: ToolbarMode;
4
6
  }
5
- export declare function AnalyticsProvider({ children }: AnalyticsProviderProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function AnalyticsProvider({ children, mode }: AnalyticsProviderProps): import("react/jsx-runtime").JSX.Element;
6
8
  export declare function useAnalytics(): ToolbarAnalytics;
7
9
  export {};
@@ -1,12 +1,14 @@
1
1
  import type { LDClient } from 'launchdarkly-js-client-sdk';
2
+ import { ToolbarMode } from '../ui/Toolbar/types';
2
3
  export declare const ANALYTICS_EVENT_PREFIX = "ld.toolbar";
3
4
  /**
4
5
  * Analytics utility for tracking toolbar usage events
5
6
  */
6
7
  export declare class ToolbarAnalytics {
7
8
  private ldClient;
9
+ private mode;
8
10
  private searchDebounceTimer;
9
- constructor(ldClient?: LDClient | null);
11
+ constructor(ldClient?: LDClient | null, mode?: ToolbarMode);
10
12
  /**
11
13
  * Internal method to send tracking events
12
14
  */
@@ -59,4 +61,12 @@ export declare class ToolbarAnalytics {
59
61
  * Track Reload on Flag Change toggles
60
62
  */
61
63
  trackReloadOnFlagChangeToggle(enabled: boolean): void;
64
+ /**
65
+ * Track project switching in dev server mode
66
+ */
67
+ trackProjectSwitch(fromProject: string, toProject: string): void;
68
+ /**
69
+ * Track refresh button clicks in dev server mode
70
+ */
71
+ trackRefresh(): void;
62
72
  }
package/dist/index.cjs CHANGED
@@ -553,7 +553,7 @@ async function lazyLoad(signal, url) {
553
553
  }
554
554
  }
555
555
  var package_namespaceObject = {
556
- rE: "1.4.1"
556
+ rE: "1.5.0"
557
557
  };
558
558
  function useLaunchDarklyToolbar(args) {
559
559
  const { toolbarBundleUrl, enabled, ...initConfig } = args;
package/dist/js/index.js CHANGED
@@ -519,7 +519,7 @@ async function lazyLoad(signal, url) {
519
519
  }
520
520
  }
521
521
  var package_namespaceObject = {
522
- rE: "1.4.1"
522
+ rE: "1.5.0"
523
523
  };
524
524
  function useLaunchDarklyToolbar(args) {
525
525
  const { toolbarBundleUrl, enabled, ...initConfig } = args;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@launchdarkly/toolbar",
4
- "version": "1.4.1",
4
+ "version": "1.5.0",
5
5
  "description": "A React component that provides a developer-friendly toolbar for interacting with LaunchDarkly during development",
6
6
  "keywords": [
7
7
  "launchdarkly",
@@ -73,12 +73,12 @@
73
73
  "@testing-library/jest-dom": "^6.9.1",
74
74
  "@testing-library/react": "^16.3.0",
75
75
  "@types/node": "^24.10.1",
76
- "@types/react": "19.2.4",
76
+ "@types/react": "19.2.6",
77
77
  "@types/react-dom": "19.2.3",
78
78
  "@vanilla-extract/css": "^1.17.4",
79
79
  "@vanilla-extract/vite-plugin": "^5.1.1",
80
80
  "@vanilla-extract/webpack-plugin": "^2.3.22",
81
- "@vitest/coverage-v8": "4.0.8",
81
+ "@vitest/coverage-v8": "4.0.13",
82
82
  "css-loader": "^7.1.2",
83
83
  "jsdom": "^27.2.0",
84
84
  "launchdarkly-js-client-sdk": "^3.9.0",
@@ -90,7 +90,7 @@
90
90
  "storybook-addon-rslib": "^2.1.6",
91
91
  "storybook-react-rsbuild": "^2.1.6",
92
92
  "typescript": "^5.9.3",
93
- "vitest": "^4.0.12"
93
+ "vitest": "^4.0.13"
94
94
  },
95
95
  "peerDependencies": {
96
96
  "launchdarkly-js-client-sdk": ">=3.9.0 <4.0.0",