@launchdarkly/toolbar 0.19.0-beta.1 → 0.22.0-beta.1

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 (31) hide show
  1. package/README.md +8 -8
  2. package/dist/index.d.ts +1 -0
  3. package/dist/js/index.js +790 -535
  4. package/dist/js/plugins/index.js +13 -1
  5. package/dist/plugins/EventInterceptionPlugin.d.ts +4 -1
  6. package/dist/tests/plugins/EventInterceptionPlugin.test.d.ts +1 -0
  7. package/dist/types/plugin.d.ts +5 -0
  8. package/dist/ui/Toolbar/Header/Header.d.ts +1 -0
  9. package/dist/ui/Toolbar/Header/components/LogoSection.d.ts +6 -1
  10. package/dist/ui/Toolbar/LaunchDarklyToolbar.css.d.ts +4 -2
  11. package/dist/ui/Toolbar/TabContent/SettingsTab.css.d.ts +1 -0
  12. package/dist/ui/Toolbar/components/CircleLogo.d.ts +3 -2
  13. package/dist/ui/Toolbar/components/ExpandedToolbarContent.d.ts +4 -3
  14. package/dist/ui/Toolbar/components/icons/ChevronUpIcon.d.ts +5 -0
  15. package/dist/ui/Toolbar/components/icons/LaunchDarklyLogo.d.ts +6 -0
  16. package/dist/ui/Toolbar/components/icons/index.d.ts +1 -0
  17. package/dist/ui/Toolbar/constants/animations.d.ts +68 -26
  18. package/dist/ui/Toolbar/context/AnalyticsProvider.d.ts +9 -0
  19. package/dist/ui/Toolbar/context/DevServerProvider.d.ts +0 -4
  20. package/dist/ui/Toolbar/context/ToolbarUIProvider.d.ts +13 -0
  21. package/dist/ui/Toolbar/context/index.d.ts +2 -0
  22. package/dist/ui/Toolbar/hooks/index.d.ts +0 -1
  23. package/dist/ui/Toolbar/hooks/useToolbarAnimations.d.ts +6 -3
  24. package/dist/ui/Toolbar/hooks/useToolbarDrag.d.ts +2 -1
  25. package/dist/ui/Toolbar/hooks/useToolbarState.d.ts +5 -6
  26. package/dist/ui/Toolbar/types/toolbar.d.ts +1 -1
  27. package/dist/utils/analytics.d.ts +54 -0
  28. package/package.json +1 -1
  29. package/dist/static/font/Audimat3000-Regulier.var-subset.woff2 +0 -0
  30. package/dist/static/font/Inter.var-subset.woff2 +0 -0
  31. package/dist/ui/Toolbar/hooks/useKeyPressed.d.ts +0 -1
@@ -366,12 +366,14 @@ class AfterEvaluationHook {
366
366
  };
367
367
  }
368
368
  }
369
+ const ANALYTICS_EVENT_PREFIX = 'ld.toolbar';
369
370
  class EventInterceptionPlugin {
370
371
  afterTrackHook;
371
372
  afterIdentifyHook;
372
373
  afterEvaluationHook;
373
374
  eventStore;
374
375
  config;
376
+ ldClient = null;
375
377
  constructor(config = {}){
376
378
  this.config = {
377
379
  enableLogging: false,
@@ -382,6 +384,8 @@ class EventInterceptionPlugin {
382
384
  maxEvents: this.config.eventCapacity
383
385
  });
384
386
  const onNewEvent = (event)=>{
387
+ const isToolbarEvent = this.isToolbarEvent(event);
388
+ if (isToolbarEvent) return;
385
389
  if (this.config.enableLogging) console.log("\uD83C\uDFAF Event intercepted:", {
386
390
  kind: event.kind,
387
391
  key: event.key,
@@ -403,6 +407,9 @@ class EventInterceptionPlugin {
403
407
  onNewEvent
404
408
  });
405
409
  }
410
+ isToolbarEvent(event) {
411
+ return event.key?.startsWith(ANALYTICS_EVENT_PREFIX) ?? false;
412
+ }
406
413
  getMetadata() {
407
414
  return {
408
415
  name: 'EventInterceptionPlugin'
@@ -415,7 +422,12 @@ class EventInterceptionPlugin {
415
422
  this.afterEvaluationHook
416
423
  ];
417
424
  }
418
- register(_client) {}
425
+ register(ldClient) {
426
+ this.ldClient = ldClient;
427
+ }
428
+ getClient() {
429
+ return this.ldClient;
430
+ }
419
431
  getEvents() {
420
432
  return this.eventStore.getEvents();
421
433
  }
@@ -21,10 +21,13 @@ export declare class EventInterceptionPlugin implements IEventInterceptionPlugin
21
21
  private afterEvaluationHook;
22
22
  private eventStore;
23
23
  private config;
24
+ private ldClient;
24
25
  constructor(config?: EventInterceptionPluginConfig);
26
+ isToolbarEvent(event: ProcessedEvent): boolean;
25
27
  getMetadata(): LDPluginMetadata;
26
28
  getHooks(_metadata: LDPluginEnvironmentMetadata): Hook[];
27
- register(_client: LDClient): void;
29
+ register(ldClient: LDClient): void;
30
+ getClient(): LDClient | null;
28
31
  getEvents(): ProcessedEvent[];
29
32
  subscribe(listener: () => void): () => void;
30
33
  clearEvents(): void;
@@ -49,4 +49,9 @@ export interface IEventInterceptionPlugin extends LDPlugin {
49
49
  * Clears all events from the event store
50
50
  */
51
51
  clearEvents(): void;
52
+ /**
53
+ * Returns the LaunchDarkly client instance
54
+ * @returns The LaunchDarkly client with allFlags method
55
+ */
56
+ getClient(): LDClient | null;
52
57
  }
@@ -8,5 +8,6 @@ export interface HeaderProps {
8
8
  setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
9
9
  label: string;
10
10
  mode: ToolbarMode;
11
+ onMouseDown?: (event: React.MouseEvent) => void;
11
12
  }
12
13
  export declare function Header(props: HeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,6 @@
1
- export declare function LogoSection(): import("react/jsx-runtime").JSX.Element;
1
+ import type React from 'react';
2
+ interface LogoSectionProps {
3
+ onMouseDown?: (event: React.MouseEvent) => void;
4
+ }
5
+ export declare function LogoSection(props: LogoSectionProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,6 +1,8 @@
1
1
  export declare const toolbarContainer: string;
2
- export declare const positionRight: string;
3
- export declare const positionLeft: string;
2
+ export declare const positionBottomRight: string;
3
+ export declare const positionBottomLeft: string;
4
+ export declare const positionTopRight: string;
5
+ export declare const positionTopLeft: string;
4
6
  export declare const toolbarCircle: string;
5
7
  export declare const toolbarExpanded: string;
6
8
  export declare const circleContent: string;
@@ -1,5 +1,6 @@
1
1
  export declare const settingsGroup: string;
2
2
  export declare const settingsGroupTitle: string;
3
+ export declare const switch_: string;
3
4
  export declare const settingInfo: string;
4
5
  export declare const settingDetails: string;
5
6
  export declare const settingName: string;
@@ -1,5 +1,6 @@
1
1
  interface CircleLogoProps {
2
- hasBeenExpanded: boolean;
2
+ onClick: () => void;
3
+ onMouseDown: (event: React.MouseEvent) => void;
3
4
  }
4
- export declare function CircleLogo(props: CircleLogoProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare const CircleLogo: import("react").ForwardRefExoticComponent<CircleLogoProps & import("react").RefAttributes<HTMLButtonElement>>;
5
6
  export {};
@@ -1,8 +1,7 @@
1
- import { Dispatch, SetStateAction } from 'react';
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
2
  import { ActiveTabId, ToolbarMode } from '../types';
3
3
  import type { IFlagOverridePlugin, IEventInterceptionPlugin } from '../../../types/plugin';
4
4
  interface ExpandedToolbarContentProps {
5
- isExpanded: boolean;
6
5
  activeTab: ActiveTabId;
7
6
  slideDirection: number;
8
7
  searchTerm: string;
@@ -15,8 +14,10 @@ interface ExpandedToolbarContentProps {
15
14
  setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
16
15
  mode: ToolbarMode;
17
16
  baseUrl: string;
17
+ defaultActiveTab: ActiveTabId;
18
18
  flagOverridePlugin?: IFlagOverridePlugin;
19
19
  eventInterceptionPlugin?: IEventInterceptionPlugin;
20
+ onHeaderMouseDown?: (event: React.MouseEvent) => void;
20
21
  }
21
- export declare function ExpandedToolbarContent(props: ExpandedToolbarContentProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare const ExpandedToolbarContent: React.ForwardRefExoticComponent<ExpandedToolbarContentProps & React.RefAttributes<HTMLDivElement>>;
22
23
  export {};
@@ -0,0 +1,5 @@
1
+ interface IconProps {
2
+ className?: string;
3
+ }
4
+ export declare function ChevronUpIcon({ className }: IconProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ interface LaunchDarklyLogoProps {
2
+ className?: string;
3
+ onMouseDown?: (event: React.MouseEvent) => void;
4
+ }
5
+ export declare function LaunchDarklyLogo(props: LaunchDarklyLogoProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,5 +1,6 @@
1
1
  export { SearchIcon } from './SearchIcon';
2
2
  export { ChevronDownIcon } from './ChevronDownIcon';
3
+ export { ChevronUpIcon } from './ChevronUpIcon';
3
4
  export { EditIcon } from './EditIcon';
4
5
  export { SyncIcon } from './SyncIcon';
5
6
  export { ArrowUndoIcon } from './ArrowUndoIcon';
@@ -4,60 +4,98 @@ export declare const EASING: {
4
4
  readonly elastic: readonly [0.22, 1, 0.36, 1];
5
5
  };
6
6
  export declare const ANIMATION_CONFIG: {
7
+ readonly containerExpand: {
8
+ readonly width: {
9
+ readonly duration: 0.25;
10
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
11
+ };
12
+ readonly height: {
13
+ readonly duration: 0.25;
14
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
15
+ };
16
+ readonly borderRadius: {
17
+ readonly duration: 0.2;
18
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
19
+ };
20
+ readonly boxShadow: {
21
+ readonly duration: 0.2;
22
+ readonly ease: "easeInOut";
23
+ };
24
+ };
25
+ readonly containerCollapse: {
26
+ readonly width: {
27
+ readonly duration: 0.35;
28
+ readonly ease: readonly [0.22, 1, 0.36, 1];
29
+ };
30
+ readonly height: {
31
+ readonly duration: 0.35;
32
+ readonly ease: readonly [0.22, 1, 0.36, 1];
33
+ };
34
+ readonly borderRadius: {
35
+ readonly duration: 0.25;
36
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
37
+ };
38
+ readonly boxShadow: {
39
+ readonly duration: 0.25;
40
+ readonly ease: "easeInOut";
41
+ };
42
+ };
7
43
  readonly container: {
8
44
  readonly width: {
9
- readonly duration: 0.5;
10
- readonly ease: readonly [0.34, 1.56, 0.64, 1];
45
+ readonly duration: 0.25;
46
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
11
47
  };
12
48
  readonly height: {
13
- readonly duration: 0.5;
14
- readonly ease: readonly [0.34, 1.56, 0.64, 1];
49
+ readonly duration: 0.25;
50
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
15
51
  };
16
52
  readonly borderRadius: {
17
- readonly duration: 0.4;
53
+ readonly duration: 0.2;
18
54
  readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
19
55
  };
20
56
  readonly boxShadow: {
21
- readonly duration: 0.3;
57
+ readonly duration: 0.2;
22
58
  readonly ease: "easeInOut";
23
59
  };
24
60
  };
25
61
  readonly circleLogo: {
26
62
  readonly opacity: {
27
- readonly duration: 0.25;
63
+ readonly duration: 0.15;
28
64
  readonly ease: "easeOut";
29
65
  };
30
66
  readonly scale: {
31
- readonly duration: 0.3;
67
+ readonly duration: 0.2;
32
68
  readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
33
69
  };
34
70
  readonly rotate: {
35
- readonly duration: 0.3;
71
+ readonly duration: 0.2;
36
72
  readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
37
73
  };
38
74
  };
39
75
  readonly toolbarContent: {
40
76
  readonly opacity: {
41
- readonly duration: 0.4;
77
+ readonly duration: 0.2;
42
78
  readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
43
79
  };
44
80
  readonly y: {
45
- readonly duration: 0.5;
46
- readonly ease: readonly [0.34, 1.56, 0.64, 1];
81
+ readonly duration: 0.25;
82
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
47
83
  };
48
84
  readonly scale: {
49
- readonly duration: 0.5;
50
- readonly ease: readonly [0.34, 1.56, 0.64, 1];
85
+ readonly duration: 0.25;
86
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
51
87
  };
52
88
  };
53
89
  readonly contentArea: {
54
90
  readonly opacity: {
55
- readonly duration: 0.4;
91
+ readonly duration: 0.2;
56
92
  readonly ease: "easeInOut";
93
+ readonly delay: 0.1;
57
94
  };
58
- readonly maxHeight: {
59
- readonly duration: 0.5;
60
- readonly ease: readonly [0.22, 1, 0.36, 1];
95
+ readonly y: {
96
+ readonly duration: 0.25;
97
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
98
+ readonly delay: 0.1;
61
99
  };
62
100
  };
63
101
  readonly tabContent: {
@@ -66,14 +104,14 @@ export declare const ANIMATION_CONFIG: {
66
104
  };
67
105
  readonly tabsContainer: {
68
106
  readonly opacity: {
69
- readonly duration: 0.5;
70
- readonly ease: readonly [0.34, 1.56, 0.64, 1];
107
+ readonly duration: 0.2;
108
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
71
109
  };
72
110
  readonly y: {
73
- readonly duration: 0.5;
74
- readonly ease: readonly [0.34, 1.56, 0.64, 1];
111
+ readonly duration: 0.2;
112
+ readonly ease: readonly [0.25, 0.46, 0.45, 0.94];
75
113
  };
76
- readonly delay: 0.3;
114
+ readonly delay: 0.05;
77
115
  };
78
116
  readonly eventList: {
79
117
  readonly liveTail: {
@@ -105,9 +143,9 @@ export declare const ANIMATION_CONFIG: {
105
143
  };
106
144
  export declare const DIMENSIONS: {
107
145
  readonly collapsed: {
108
- readonly width: 60;
109
- readonly height: 60;
110
- readonly borderRadius: 30;
146
+ readonly width: 48;
147
+ readonly height: 48;
148
+ readonly borderRadius: 24;
111
149
  };
112
150
  readonly expanded: {
113
151
  readonly width: 400;
@@ -124,3 +162,7 @@ export declare const SHADOWS: {
124
162
  readonly hoveredCollapsed: "0 8px 40px rgba(0, 0, 0, 0.4)";
125
163
  readonly collapsed: "0 4px 16px rgba(0, 0, 0, 0.3)";
126
164
  };
165
+ export declare const DRAG_CONSTANTS: {
166
+ readonly THRESHOLD_PIXELS: 3;
167
+ readonly CLICK_RESET_DELAY_MS: 50;
168
+ };
@@ -0,0 +1,9 @@
1
+ import type { LDClient } from 'launchdarkly-js-client-sdk';
2
+ import { ToolbarAnalytics } from '../../../utils/analytics';
3
+ interface AnalyticsProviderProps {
4
+ children: React.ReactNode;
5
+ ldClient?: LDClient | null;
6
+ }
7
+ export declare function AnalyticsProvider({ children, ldClient }: AnalyticsProviderProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function useAnalytics(): ToolbarAnalytics;
9
+ export {};
@@ -1,24 +1,20 @@
1
1
  import type { FC, ReactNode } from 'react';
2
2
  import { LdToolbarConfig, ToolbarState } from '../../../types/devServer';
3
- import { ToolbarPosition } from '../types/toolbar';
4
3
  interface DevServerContextValue {
5
4
  state: ToolbarState & {
6
5
  availableProjects: string[];
7
6
  currentProjectKey: string | null;
8
- position: ToolbarPosition;
9
7
  };
10
8
  setOverride: (flagKey: string, value: any) => Promise<void>;
11
9
  clearOverride: (flagKey: string) => Promise<void>;
12
10
  clearAllOverrides: () => Promise<void>;
13
11
  refresh: () => Promise<void>;
14
12
  switchProject: (projectKey: string) => Promise<void>;
15
- handlePositionChange: (position: ToolbarPosition) => void;
16
13
  }
17
14
  export declare const useDevServerContext: () => DevServerContextValue;
18
15
  export interface DevServerProviderProps {
19
16
  children: ReactNode;
20
17
  config: LdToolbarConfig;
21
- initialPosition?: ToolbarPosition;
22
18
  }
23
19
  export declare const DevServerProvider: FC<DevServerProviderProps>;
24
20
  export {};
@@ -0,0 +1,13 @@
1
+ import type { FC, ReactNode } from 'react';
2
+ import type { ToolbarPosition } from '../types/toolbar';
3
+ interface ToolbarUIContextValue {
4
+ position: ToolbarPosition;
5
+ handlePositionChange: (position: ToolbarPosition) => void;
6
+ }
7
+ export declare const useToolbarUIContext: () => ToolbarUIContextValue;
8
+ export interface ToolbarUIProviderProps {
9
+ children: ReactNode;
10
+ initialPosition?: ToolbarPosition;
11
+ }
12
+ export declare const ToolbarUIProvider: FC<ToolbarUIProviderProps>;
13
+ export {};
@@ -1,3 +1,5 @@
1
1
  export { DevServerProvider, useDevServerContext } from './DevServerProvider';
2
2
  export { SearchProvider, useSearchContext } from './SearchProvider';
3
+ export { ToolbarUIProvider, useToolbarUIContext } from './ToolbarUIProvider';
3
4
  export { FlagSdkOverrideProvider, useFlagSdkOverrideContext, type LocalFlag, type FlagSdkOverrideContextType, } from './FlagSdkOverrideProvider';
5
+ export { AnalyticsProvider, useAnalytics } from './AnalyticsProvider';
@@ -2,6 +2,5 @@ export { useToolbarState } from './useToolbarState';
2
2
  export { useToolbarAnimations } from './useToolbarAnimations';
3
3
  export { useToolbarVisibility } from './useToolbarVisibility';
4
4
  export { useToolbarDrag } from './useToolbarDrag';
5
- export { useKeyPressed } from './useKeyPressed';
6
5
  export { useEvents } from './useEvents';
7
6
  export { useCurrentDate } from './useCurrentDate';
@@ -1,10 +1,12 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { ANIMATION_CONFIG } from '../constants';
3
3
  export interface UseToolbarAnimationsProps {
4
- showFullToolbar: boolean;
5
- isHovered: boolean;
4
+ isExpanded: boolean;
6
5
  setIsAnimating: Dispatch<SetStateAction<boolean>>;
6
+ onExpandComplete?: () => void;
7
+ onCollapseComplete?: () => void;
7
8
  }
9
+ type AnimationConfig = typeof ANIMATION_CONFIG.containerExpand | typeof ANIMATION_CONFIG.containerCollapse;
8
10
  export interface UseToolbarAnimationsReturn {
9
11
  containerAnimations: {
10
12
  width: number;
@@ -13,8 +15,9 @@ export interface UseToolbarAnimationsReturn {
13
15
  scale: number;
14
16
  boxShadow: string;
15
17
  };
16
- animationConfig: typeof ANIMATION_CONFIG.container;
18
+ animationConfig: AnimationConfig;
17
19
  handleAnimationStart: () => void;
18
20
  handleAnimationComplete: () => void;
19
21
  }
20
22
  export declare function useToolbarAnimations(props: UseToolbarAnimationsProps): UseToolbarAnimationsReturn;
23
+ export {};
@@ -1,10 +1,11 @@
1
1
  interface UseToolbarDragOptions {
2
2
  enabled: boolean;
3
- onDragEnd: (clientX: number) => void;
3
+ onDragEnd: (clientX: number, clientY: number) => void;
4
4
  elementRef: React.RefObject<HTMLDivElement | null>;
5
5
  }
6
6
  interface UseToolbarDragReturn {
7
7
  handleMouseDown: (event: React.MouseEvent) => void;
8
+ isDragging: () => boolean;
8
9
  }
9
10
  export declare function useToolbarDrag({ enabled, onDragEnd, elementRef }: UseToolbarDragOptions): UseToolbarDragReturn;
10
11
  export {};
@@ -1,25 +1,24 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { ActiveTabId } from '../types';
3
+ export interface UseToolbarStateProps {
4
+ defaultActiveTab: ActiveTabId;
5
+ }
3
6
  export interface UseToolbarStateReturn {
4
7
  isExpanded: boolean;
5
- isHovered: boolean;
6
8
  activeTab: ActiveTabId;
7
9
  previousTab: ActiveTabId;
8
10
  isAnimating: boolean;
9
11
  searchIsExpanded: boolean;
10
- showFullToolbar: boolean;
11
12
  slideDirection: number;
12
13
  hasBeenExpanded: boolean;
13
- isDragModifierPressed: boolean;
14
14
  isPinned: boolean;
15
15
  toolbarRef: React.RefObject<HTMLDivElement | null>;
16
16
  handleTabChange: (tabId: string) => void;
17
- handleMouseEnter: () => void;
18
- handleMouseLeave: () => void;
19
17
  handleClose: () => void;
20
18
  handleSearch: (newSearchTerm: string) => void;
21
19
  handleTogglePin: () => void;
20
+ handleCircleClick: () => void;
22
21
  setIsAnimating: Dispatch<SetStateAction<boolean>>;
23
22
  setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
24
23
  }
25
- export declare function useToolbarState(): UseToolbarStateReturn;
24
+ export declare function useToolbarState(props: UseToolbarStateProps): UseToolbarStateReturn;
@@ -16,5 +16,5 @@ export interface FeatureFlag {
16
16
  lastModified?: Date;
17
17
  environment?: string;
18
18
  }
19
- export declare const TOOLBAR_POSITIONS: readonly ["left", "right"];
19
+ export declare const TOOLBAR_POSITIONS: readonly ["top-left", "top-right", "bottom-left", "bottom-right"];
20
20
  export type ToolbarPosition = (typeof TOOLBAR_POSITIONS)[number];
@@ -0,0 +1,54 @@
1
+ import type { LDClient } from 'launchdarkly-js-client-sdk';
2
+ export declare const ANALYTICS_EVENT_PREFIX = "ld.toolbar";
3
+ /**
4
+ * Analytics utility for tracking toolbar usage events
5
+ */
6
+ export declare class ToolbarAnalytics {
7
+ private ldClient;
8
+ private searchDebounceTimer;
9
+ constructor(ldClient?: LDClient | null);
10
+ /**
11
+ * Internal method to send tracking events
12
+ */
13
+ private track;
14
+ /**
15
+ * Track toolbar initialization
16
+ */
17
+ trackInitialization(): void;
18
+ /**
19
+ * Track toolbar position changes
20
+ */
21
+ trackPositionChange(oldPosition: string, newPosition: string, source: 'drag' | 'settings'): void;
22
+ /**
23
+ * Track toolbar pin/unpin actions
24
+ */
25
+ trackPinToggle(action: 'pin' | 'unpin'): void;
26
+ /**
27
+ * Track toolbar tab navigation
28
+ */
29
+ trackTabChange(fromTab: string | null, toTab: string): void;
30
+ /**
31
+ * Track search usage
32
+ */
33
+ trackSearch(query: string): void;
34
+ /**
35
+ * Track toolbar expand/collapse events
36
+ */
37
+ trackToolbarToggle(action: 'expand' | 'collapse', trigger: 'close_button' | 'click_outside' | 'tab_toggle'): void;
38
+ /**
39
+ * Track flag override events
40
+ */
41
+ trackFlagOverride(flagKey: string, value: unknown, action: 'set' | 'remove' | 'clear_all'): void;
42
+ /**
43
+ * Track opening a flag deeplink
44
+ */
45
+ trackOpenFlagDeeplink(flagKey: string, baseUrl: string): void;
46
+ /**
47
+ * Track 'Show overrides only' clicks
48
+ */
49
+ trackShowOverridesOnlyClick(enabled: boolean): void;
50
+ /**
51
+ * Track Event clicks
52
+ */
53
+ trackEventClick(eventName: string): void;
54
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/toolbar",
3
- "version": "0.19.0-beta.1",
3
+ "version": "0.22.0-beta.1",
4
4
  "description": "A React component that provides a developer-friendly toolbar for interacting with LaunchDarkly during development",
5
5
  "keywords": [
6
6
  "launchdarkly",
@@ -1 +0,0 @@
1
- export declare function useKeyPressed(targetKey: string): boolean;