@launchdarkly/toolbar 2.3.0-beta.1 → 2.3.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 (146) hide show
  1. package/README.md +255 -19
  2. package/cdn/toolbar.min.js +660 -15
  3. package/cdn/toolbar.min.js.LICENSE.txt +14 -0
  4. package/dist/angular/launchdarkly-toolbar.service.d.ts +104 -0
  5. package/dist/angular.cjs +439 -0
  6. package/dist/angular.cjs.map +1 -0
  7. package/dist/angular.d.ts +51 -0
  8. package/dist/core/index.d.ts +0 -1
  9. package/dist/core/services/DevServerClient.d.ts +9 -3
  10. package/dist/core/services/FlagStateManager.d.ts +2 -0
  11. package/dist/core/styles/constants.d.ts +24 -0
  12. package/dist/core/styles/index.d.ts +2 -0
  13. package/dist/core/styles/shadowDomStyles.d.ts +41 -0
  14. package/dist/core/tests/mocks/providers.d.ts +132 -0
  15. package/dist/core/ui/Buttons/IconButton.d.ts +2 -1
  16. package/dist/core/ui/JsonEditor/JsonEditor.d.ts +2 -1
  17. package/dist/core/ui/Toolbar/LaunchDarklyToolbar.d.ts +2 -8
  18. package/dist/core/ui/Toolbar/components/AuthenticationModal/AuthenticationModal.d.ts +1 -1
  19. package/dist/core/ui/Toolbar/components/CircleLogo.d.ts +1 -2
  20. package/dist/core/ui/Toolbar/components/{FlagKeyWithCopy.css.d.ts → CopyableText.css.d.ts} +1 -1
  21. package/dist/core/ui/Toolbar/components/CopyableText.d.ts +18 -0
  22. package/dist/core/ui/Toolbar/components/FilterOptions/FilterOptions.css.d.ts +1 -0
  23. package/dist/core/ui/Toolbar/components/FilterOptions/FilterOptions.d.ts +1 -0
  24. package/dist/core/ui/Toolbar/components/FilterOptions/ShareUrlButton.css.d.ts +2 -0
  25. package/dist/core/ui/Toolbar/components/FilterOptions/ShareUrlButton.d.ts +7 -0
  26. package/dist/core/ui/Toolbar/components/IFrameErrorScreen/IFrameErrorScreen.css.d.ts +7 -0
  27. package/dist/core/ui/Toolbar/components/IFrameErrorScreen/IFrameErrorScreen.d.ts +5 -0
  28. package/dist/core/ui/Toolbar/components/IFrameErrorScreen/index.d.ts +1 -0
  29. package/dist/core/ui/Toolbar/components/LoadingScreen/LoadingScreen.css.d.ts +7 -0
  30. package/dist/core/ui/Toolbar/components/LoadingScreen/LoadingScreen.d.ts +5 -0
  31. package/dist/core/ui/Toolbar/components/LoadingScreen/index.d.ts +1 -0
  32. package/dist/core/ui/Toolbar/components/ShareStatePopover/ShareStatePopover.css.d.ts +10 -0
  33. package/dist/core/ui/Toolbar/components/ShareStatePopover/ShareStatePopover.d.ts +15 -0
  34. package/dist/core/ui/Toolbar/components/ShareStatePopover/index.d.ts +2 -0
  35. package/dist/core/ui/Toolbar/components/icons/ShareIcon.d.ts +5 -0
  36. package/dist/core/ui/Toolbar/components/icons/index.d.ts +2 -0
  37. package/dist/core/ui/Toolbar/components/index.d.ts +1 -2
  38. package/dist/core/ui/Toolbar/components/new/AnalyticsConsentToast/AnalyticsConsentToast.d.ts +5 -0
  39. package/dist/core/ui/Toolbar/components/new/AnalyticsConsentToast/AnalyticsConsentToast.module.css.d.ts +13 -0
  40. package/dist/core/ui/Toolbar/components/new/AnalyticsConsentToast/index.d.ts +1 -0
  41. package/dist/core/ui/Toolbar/components/new/ContentActions.module.css.d.ts +4 -0
  42. package/dist/core/ui/Toolbar/components/new/Contexts/AddContextForm.d.ts +6 -0
  43. package/dist/core/ui/Toolbar/components/new/Contexts/AddContextForm.module.css.d.ts +14 -0
  44. package/dist/core/ui/Toolbar/components/new/Contexts/ContextItem.d.ts +9 -0
  45. package/dist/core/ui/Toolbar/components/new/Contexts/ContextItem.module.css.d.ts +19 -0
  46. package/dist/core/ui/Toolbar/components/new/Contexts/ContextList.d.ts +1 -0
  47. package/dist/core/ui/Toolbar/components/new/Contexts/ContextList.module.css.d.ts +8 -0
  48. package/dist/core/ui/Toolbar/components/new/Contexts/ContextListContent.d.ts +1 -0
  49. package/dist/core/ui/Toolbar/components/new/Contexts/index.d.ts +4 -0
  50. package/dist/core/ui/Toolbar/components/new/ExpandedToolbarContent.d.ts +4 -3
  51. package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagControls.d.ts +5 -5
  52. package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagItem.d.ts +2 -1
  53. package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagListContent.d.ts +1 -1
  54. package/dist/core/ui/Toolbar/components/new/FilterOverlay/FilterOverlay.module.css.d.ts +1 -0
  55. package/dist/core/ui/Toolbar/components/new/Settings/Privacy/PrivacySettings.d.ts +1 -0
  56. package/dist/core/ui/Toolbar/components/new/Settings/SettingsContent.module.css.d.ts +2 -0
  57. package/dist/core/ui/Toolbar/components/new/Settings/ShareButton.d.ts +5 -0
  58. package/dist/core/ui/Toolbar/components/new/Settings/ShareButton.module.css.d.ts +1 -0
  59. package/dist/core/ui/Toolbar/components/new/Settings/index.d.ts +1 -1
  60. package/dist/core/ui/Toolbar/components/new/Tooltip.d.ts +3 -1
  61. package/dist/core/ui/Toolbar/components/new/context/TabSearchProvider.d.ts +7 -5
  62. package/dist/core/ui/Toolbar/components/new/types.d.ts +2 -2
  63. package/dist/core/ui/Toolbar/constants/animations.d.ts +14 -0
  64. package/dist/core/ui/Toolbar/context/DevServerProvider.d.ts +2 -0
  65. package/dist/core/ui/Toolbar/context/api/AuthProvider.d.ts +1 -0
  66. package/dist/core/ui/Toolbar/context/api/ContextsProvider.d.ts +19 -0
  67. package/dist/core/ui/Toolbar/context/api/FlagsProvider.d.ts +1 -0
  68. package/dist/core/ui/Toolbar/context/api/IFrameProvider.d.ts +2 -0
  69. package/dist/core/ui/Toolbar/context/api/index.d.ts +1 -0
  70. package/dist/core/ui/Toolbar/context/state/ToolbarStateProvider.d.ts +6 -0
  71. package/dist/core/ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider.d.ts +14 -0
  72. package/dist/core/ui/Toolbar/context/telemetry/InternalClientProvider.d.ts +11 -1
  73. package/dist/core/ui/Toolbar/context/telemetry/TelemetryBundleProvider.d.ts +2 -0
  74. package/dist/core/ui/Toolbar/context/telemetry/index.d.ts +1 -0
  75. package/dist/core/ui/Toolbar/hooks/index.d.ts +2 -0
  76. package/dist/core/ui/Toolbar/hooks/useLocalStorage.d.ts +10 -0
  77. package/dist/core/ui/Toolbar/hooks/useReducedMotion.d.ts +5 -0
  78. package/dist/core/ui/Toolbar/hooks/useToolbarAnimations.d.ts +1 -1
  79. package/dist/core/ui/Toolbar/types/toolbar.d.ts +1 -1
  80. package/dist/core/ui/Toolbar/utils/context.d.ts +33 -0
  81. package/dist/core/ui/Toolbar/utils/localStorage.d.ts +21 -2
  82. package/dist/core/utils/analytics.d.ts +48 -2
  83. package/dist/core/utils/feedback.d.ts +18 -0
  84. package/dist/core/utils/urlOverrides.d.ts +105 -0
  85. package/dist/flags/toolbarFlags.d.ts +3 -2
  86. package/dist/index.cjs +8 -4
  87. package/dist/index.cjs.map +1 -1
  88. package/dist/js/374.js +446 -0
  89. package/dist/js/374.js.map +1 -0
  90. package/dist/js/816.js +56 -0
  91. package/dist/js/816.js.map +1 -0
  92. package/dist/js/96.js +38 -0
  93. package/dist/js/96.js.map +1 -0
  94. package/dist/js/angular.js +353 -0
  95. package/dist/js/angular.js.map +1 -0
  96. package/dist/js/index.js +3 -527
  97. package/dist/js/index.js.map +1 -1
  98. package/dist/js/plugins.js +1 -0
  99. package/dist/js/react.js +2 -0
  100. package/dist/js/types-entry.js +0 -0
  101. package/dist/js/vue.js +34 -0
  102. package/dist/js/vue.js.map +1 -0
  103. package/dist/plugins.cjs +483 -0
  104. package/dist/plugins.cjs.map +1 -0
  105. package/dist/plugins.d.ts +21 -0
  106. package/dist/react/useLaunchDarklyToolbar.d.ts +1 -1
  107. package/dist/react.cjs +127 -0
  108. package/dist/react.cjs.map +1 -0
  109. package/dist/react.d.ts +25 -0
  110. package/dist/types-entry.cjs +20 -0
  111. package/dist/types-entry.cjs.map +1 -0
  112. package/dist/types-entry.d.ts +12 -0
  113. package/dist/vue/useLaunchDarklyToolbar.d.ts +20 -0
  114. package/dist/vue.cjs +122 -0
  115. package/dist/vue.cjs.map +1 -0
  116. package/dist/vue.d.ts +24 -0
  117. package/package.json +145 -48
  118. package/dist/core/ui/Toolbar/components/FlagKeyWithCopy.d.ts +0 -6
  119. package/dist/core/ui/Toolbar/components/legacy/ActionButtonsContainer.css.d.ts +0 -4
  120. package/dist/core/ui/Toolbar/components/legacy/ActionButtonsContainer.d.ts +0 -6
  121. package/dist/core/ui/Toolbar/components/legacy/ExpandedToolbarContentLegacy.d.ts +0 -25
  122. package/dist/core/ui/Toolbar/components/legacy/FlagControls.css.d.ts +0 -12
  123. package/dist/core/ui/Toolbar/components/legacy/FlagControls.d.ts +0 -20
  124. package/dist/core/ui/Toolbar/components/legacy/Header/Header.css.d.ts +0 -20
  125. package/dist/core/ui/Toolbar/components/legacy/Header/Header.d.ts +0 -13
  126. package/dist/core/ui/Toolbar/components/legacy/Header/components/ActionButtons.d.ts +0 -12
  127. package/dist/core/ui/Toolbar/components/legacy/Header/components/EnvironmentLabel.d.ts +0 -5
  128. package/dist/core/ui/Toolbar/components/legacy/Header/components/LogoSection.d.ts +0 -6
  129. package/dist/core/ui/Toolbar/components/legacy/Header/components/SearchSection.d.ts +0 -8
  130. package/dist/core/ui/Toolbar/components/legacy/Header/components/index.d.ts +0 -4
  131. package/dist/core/ui/Toolbar/components/legacy/LocalFlagControls.css.d.ts +0 -5
  132. package/dist/core/ui/Toolbar/components/legacy/LocalFlagControls.d.ts +0 -25
  133. package/dist/core/ui/Toolbar/components/legacy/LocalObjectFlagControlListItem.css.d.ts +0 -4
  134. package/dist/core/ui/Toolbar/components/legacy/LocalObjectFlagControlListItem.d.ts +0 -13
  135. package/dist/core/ui/Toolbar/components/legacy/TabContent/EventsTabContent.css.d.ts +0 -24
  136. package/dist/core/ui/Toolbar/components/legacy/TabContent/EventsTabContent.d.ts +0 -7
  137. package/dist/core/ui/Toolbar/components/legacy/TabContent/FlagDevServerTabContent.css.d.ts +0 -10
  138. package/dist/core/ui/Toolbar/components/legacy/TabContent/FlagDevServerTabContent.d.ts +0 -5
  139. package/dist/core/ui/Toolbar/components/legacy/TabContent/FlagSdkOverrideTabContent.d.ts +0 -7
  140. package/dist/core/ui/Toolbar/components/legacy/TabContent/SettingsTab.css.d.ts +0 -13
  141. package/dist/core/ui/Toolbar/components/legacy/TabContent/SettingsTabContent.d.ts +0 -10
  142. package/dist/core/ui/Toolbar/components/legacy/TabContentRenderer.css.d.ts +0 -1
  143. package/dist/core/ui/Toolbar/components/legacy/TabContentRenderer.d.ts +0 -16
  144. package/dist/core/ui/Toolbar/components/legacy/index.d.ts +0 -1
  145. package/dist/core/ui/Toolbar/components/new/Settings/SettingsContent.d.ts +0 -1
  146. /package/dist/{react → core}/lazyLoadToolbar.d.ts +0 -0
@@ -1,12 +1,14 @@
1
1
  import { DevServerClient } from './DevServerClient';
2
2
  import { EnhancedFlag } from '../types/devServer';
3
3
  import { ApiFlag } from '../ui/Toolbar/types/ldApi';
4
+ import type { DevServerProjectResponse } from './DevServerClient';
4
5
  export declare class FlagStateManager {
5
6
  private devServerClient;
6
7
  private listeners;
7
8
  private apiFlags;
8
9
  constructor(devServerClient: DevServerClient);
9
10
  getEnhancedFlags(): Promise<Record<string, EnhancedFlag>>;
11
+ getEnhancedFlagsFromDevServerData(devServerData: DevServerProjectResponse): Record<string, EnhancedFlag>;
10
12
  private formatFlagName;
11
13
  private determineFlagType;
12
14
  setOverride(flagKey: string, value: any): Promise<void>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Style isolation constants for Shadow DOM.
3
+ *
4
+ * This module provides unique identifiers and detection patterns for toolbar styles,
5
+ * enabling reliable isolation from host application stylesheets.
6
+ */
7
+ /**
8
+ * Unique prefix for all toolbar vanilla-extract class names.
9
+ * This is configured in rslib.config.ts and rslib.config.cdn.ts
10
+ */
11
+ export declare const TOOLBAR_CLASS_PREFIX = "ldtb_";
12
+ /**
13
+ * CSS comment marker injected into toolbar stylesheets.
14
+ * Used to identify toolbar styles during runtime interception.
15
+ */
16
+ export declare const TOOLBAR_STYLE_MARKER = "/* LD_TOOLBAR_STYLES */";
17
+ /**
18
+ * Checks if CSS content belongs to the toolbar based on known markers.
19
+ * This is used for reliable style interception without false positives.
20
+ *
21
+ * @param content - CSS content to check
22
+ * @returns true if the content is toolbar CSS that should be moved to Shadow DOM
23
+ */
24
+ export declare function isToolbarStyleContent(content: string): boolean;
@@ -0,0 +1,2 @@
1
+ export { TOOLBAR_CLASS_PREFIX, TOOLBAR_STYLE_MARKER, isToolbarStyleContent } from './constants';
2
+ export { injectStylesIntoShadowRoot, createStyleInterceptor, cacheToolbarStyle, getCachedToolbarStyles, clearToolbarStyleCache, } from './shadowDomStyles';
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Shadow DOM Style Injection Utilities
3
+ *
4
+ * This module provides utilities for injecting styles directly into Shadow DOM,
5
+ * bypassing document.head entirely to prevent style conflicts with host applications.
6
+ *
7
+ * The approach uses:
8
+ * 1. adoptedStyleSheets (modern browsers) - Styles never touch document.head
9
+ * 2. Synchronous DOM interception (fallback) - Intercepts before styles are visible
10
+ */
11
+ /**
12
+ * Injects CSS directly into a Shadow DOM root using the best available method.
13
+ *
14
+ * @param shadowRoot - The Shadow DOM root to inject styles into
15
+ * @param cssText - The CSS content to inject
16
+ * @returns A cleanup function to remove the styles
17
+ */
18
+ export declare function injectStylesIntoShadowRoot(shadowRoot: ShadowRoot, cssText: string): () => void;
19
+ /**
20
+ * Creates a synchronous interceptor for styles injected into document.head.
21
+ * This prevents toolbar styles from ever being visible in the main document.
22
+ *
23
+ * IMPORTANT: This must be called BEFORE importing any toolbar components
24
+ * to intercept their style injections.
25
+ *
26
+ * @param shadowRoot - The Shadow DOM root to redirect styles to
27
+ * @returns A cleanup function to restore original DOM methods
28
+ */
29
+ export declare function createStyleInterceptor(shadowRoot: ShadowRoot): () => void;
30
+ /**
31
+ * Caches a style for HMR support.
32
+ */
33
+ export declare function cacheToolbarStyle(content: string): void;
34
+ /**
35
+ * Gets all cached toolbar styles.
36
+ */
37
+ export declare function getCachedToolbarStyles(): string[];
38
+ /**
39
+ * Clears the style cache (useful for testing).
40
+ */
41
+ export declare function clearToolbarStyleCache(): void;
@@ -0,0 +1,132 @@
1
+ import { vi } from 'vitest';
2
+ /**
3
+ * Shared mock factory functions for provider contexts.
4
+ *
5
+ * GLOBAL MOCKS:
6
+ * AnalyticsPreferencesProvider is mocked globally in vitest.setup.ts.
7
+ * Most test files don't need to do anything - the mock is automatic.
8
+ *
9
+ * TESTING REAL IMPLEMENTATIONS:
10
+ * If your test file tests the REAL implementation of a provider, add this at
11
+ * the top of your test file:
12
+ *
13
+ * @example
14
+ * vi.unmock('../ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider');
15
+ *
16
+ * OVERRIDING WITH DYNAMIC VALUES:
17
+ * If your test needs to change mock values during execution, override the
18
+ * global mock with createDynamicAnalyticsPreferencesProviderMock:
19
+ *
20
+ * @example
21
+ * const { getMockValue, setMockValue } = vi.hoisted(() => {
22
+ * let value = false;
23
+ * return { getMockValue: () => value, setMockValue: (v) => { value = v; } };
24
+ * });
25
+ *
26
+ * vi.mock('../ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider', async () => {
27
+ * const { createDynamicAnalyticsPreferencesProviderMock } = await import('./mocks/providers');
28
+ * return createDynamicAnalyticsPreferencesProviderMock({ getIsOptedInToAnalytics: getMockValue });
29
+ * });
30
+ */
31
+ interface AnalyticsPreferencesMock {
32
+ useAnalyticsPreferences: () => {
33
+ isOptedInToAnalytics: boolean;
34
+ isOptedInToEnhancedAnalytics: boolean;
35
+ isOptedInToSessionReplay: boolean;
36
+ handleToggleAnalyticsOptOut: ReturnType<typeof vi.fn>;
37
+ handleToggleEnhancedAnalyticsOptOut: ReturnType<typeof vi.fn>;
38
+ handleToggleSessionReplayOptOut: ReturnType<typeof vi.fn>;
39
+ };
40
+ AnalyticsPreferencesProvider: ({ children }: {
41
+ children: React.ReactNode;
42
+ }) => React.ReactNode;
43
+ }
44
+ /**
45
+ * Creates a mock for AnalyticsPreferencesProvider.
46
+ * Used by vitest.setup.ts for global mocking.
47
+ */
48
+ export declare function createAnalyticsPreferencesProviderMock(overrides?: {
49
+ isOptedInToAnalytics?: boolean;
50
+ isOptedInToEnhancedAnalytics?: boolean;
51
+ isOptedInToSessionReplay?: boolean;
52
+ }): AnalyticsPreferencesMock;
53
+ /**
54
+ * Creates a mock for AnalyticsPreferencesProvider with dynamic values.
55
+ * Use this when you need to change mock values during test execution.
56
+ *
57
+ * @example
58
+ * // For dynamic isOptedInToAnalytics:
59
+ * let mockIsOptedIn = false;
60
+ * vi.mock('../ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider', async () => {
61
+ * const { createDynamicAnalyticsPreferencesProviderMock } = await import('./mocks/providers');
62
+ * return createDynamicAnalyticsPreferencesProviderMock({ getIsOptedInToAnalytics: () => mockIsOptedIn });
63
+ * });
64
+ *
65
+ * // For dynamic isOptedInToEnhancedAnalytics:
66
+ * vi.mock('../ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider', async () => {
67
+ * const { createDynamicAnalyticsPreferencesProviderMock } = await import('./mocks/providers');
68
+ * return createDynamicAnalyticsPreferencesProviderMock({ getIsOptedInToEnhancedAnalytics: () => mockValue });
69
+ * });
70
+ *
71
+ * // In tests:
72
+ * mockIsOptedIn = true; // Changes mock behavior
73
+ */
74
+ export declare function createDynamicAnalyticsPreferencesProviderMock(options: {
75
+ getIsOptedInToAnalytics?: () => boolean;
76
+ getIsOptedInToEnhancedAnalytics?: () => boolean;
77
+ getIsOptedInToSessionReplay?: () => boolean;
78
+ }): AnalyticsPreferencesMock;
79
+ /**
80
+ * Creates a mock for InternalClientProvider with a customizable mock LDClient.
81
+ *
82
+ * @example
83
+ * const mockLDClient = { track: vi.fn(), ... };
84
+ * vi.mock('../../ui/Toolbar/context/telemetry/InternalClientProvider', () =>
85
+ * createInternalClientProviderMock(mockLDClient)
86
+ * );
87
+ */
88
+ export declare function createInternalClientProviderMock(mockClient?: Record<string, unknown>): {
89
+ useInternalClient: () => {
90
+ client: Record<string, unknown> | null;
91
+ loading: boolean;
92
+ error: null;
93
+ updateContext: ReturnType<typeof vi.fn>;
94
+ };
95
+ InternalClientProvider: ({ children }: {
96
+ children: React.ReactNode;
97
+ }) => React.ReactNode;
98
+ };
99
+ /**
100
+ * Creates a mock for DevServerProvider.
101
+ *
102
+ * @example
103
+ * vi.mock('../../ui/Toolbar/context/DevServerProvider', () =>
104
+ * createDevServerProviderMock({ connectionStatus: 'connected' })
105
+ * );
106
+ */
107
+ export declare function createDevServerProviderMock(overrides?: {
108
+ sourceEnvironmentKey?: string;
109
+ connectionStatus?: string;
110
+ flags?: Record<string, unknown>;
111
+ isLoading?: boolean;
112
+ error?: Error | null;
113
+ }): {
114
+ useDevServerContext: () => {
115
+ state: {
116
+ sourceEnvironmentKey: string;
117
+ connectionStatus: string;
118
+ flags: Record<string, unknown>;
119
+ lastSyncTime: number;
120
+ isLoading: boolean;
121
+ error: Error | null;
122
+ };
123
+ setOverride: ReturnType<typeof vi.fn>;
124
+ clearOverride: ReturnType<typeof vi.fn>;
125
+ clearAllOverrides: ReturnType<typeof vi.fn>;
126
+ refresh: ReturnType<typeof vi.fn>;
127
+ };
128
+ DevServerProvider: ({ children }: {
129
+ children: React.ReactNode;
130
+ }) => React.ReactNode;
131
+ };
132
+ export {};
@@ -2,10 +2,11 @@ import React from 'react';
2
2
  interface IconButtonProps {
3
3
  icon: React.ReactNode;
4
4
  label: string;
5
- onClick: () => void;
5
+ onClick: (event: React.MouseEvent) => void;
6
6
  disabled?: boolean;
7
7
  className?: string;
8
8
  size?: 'small' | 'medium' | 'large';
9
+ title?: string;
9
10
  }
10
11
  export declare function IconButton(props: IconButtonProps): import("react/jsx-runtime").JSX.Element;
11
12
  export {};
@@ -6,12 +6,13 @@ interface JsonEditorProps {
6
6
  onFocus?: () => void;
7
7
  onBlur?: (e: React.FocusEvent<HTMLDivElement>, value: string) => void;
8
8
  onChange?: (value: string, viewUpdate: ViewUpdate) => void;
9
- onLintErrors: (errors: Diagnostic[]) => void;
9
+ onLintErrors?: (errors: Diagnostic[]) => void;
10
10
  initialState?: {
11
11
  startCursorAtLine?: number;
12
12
  autoFocus?: boolean;
13
13
  };
14
14
  onEditorHeightChange: (height: number) => void;
15
+ readOnly?: boolean;
15
16
  }
16
17
  export declare function JsonEditor(props: JsonEditorProps): import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -1,12 +1,6 @@
1
- import { ToolbarMode, ToolbarPosition } from './types/toolbar';
1
+ import { ToolbarPosition } from './types/toolbar';
2
2
  import { IEventInterceptionPlugin, IFlagOverridePlugin } from '../../../types';
3
- export interface LdToolbarProps {
4
- mode: ToolbarMode;
5
- baseUrl: string;
6
- flagOverridePlugin?: IFlagOverridePlugin;
7
- eventInterceptionPlugin?: IEventInterceptionPlugin;
8
- }
9
- export declare function LdToolbar(props: LdToolbarProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function LdToolbar(): import("react/jsx-runtime").JSX.Element;
10
4
  export interface LaunchDarklyToolbarProps {
11
5
  baseUrl?: string;
12
6
  authUrl?: string;
@@ -2,5 +2,5 @@ interface AuthenticationModalProps {
2
2
  isOpen: boolean;
3
3
  onClose: () => void;
4
4
  }
5
- export declare function AuthenticationModal(props: AuthenticationModalProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function AuthenticationModal(props: AuthenticationModalProps): null;
6
6
  export {};
@@ -1,7 +1,6 @@
1
1
  import { type MouseEvent } from 'react';
2
2
  interface CircleLogoProps {
3
- onClick: () => void;
4
3
  onMouseDown: (event: MouseEvent) => void;
5
4
  }
6
- export declare const CircleLogo: import("react").ForwardRefExoticComponent<CircleLogoProps & import("react").RefAttributes<HTMLButtonElement>>;
5
+ export declare const CircleLogo: import("react").ForwardRefExoticComponent<CircleLogoProps & import("react").RefAttributes<HTMLDivElement>>;
7
6
  export {};
@@ -1,4 +1,4 @@
1
1
  export declare const wrapper: string;
2
2
  export declare const container: string;
3
- export declare const flagKeyText: string;
3
+ export declare const text: string;
4
4
  export declare const tooltip: string;
@@ -0,0 +1,18 @@
1
+ interface CopyableTextProps {
2
+ /** The text to display and copy to clipboard */
3
+ text: string;
4
+ /** Optional callback fired after copying (useful for analytics) */
5
+ onCopy?: (text: string) => void;
6
+ /** Custom aria-label for accessibility. Defaults to "Copy {text} to clipboard" */
7
+ ariaLabel?: string;
8
+ /** Custom title tooltip. Defaults to "Copy {text} to clipboard" */
9
+ title?: string;
10
+ /** Additional CSS class name */
11
+ className?: string;
12
+ /** Custom tooltip text shown after copying. Defaults to "Copied!" */
13
+ copiedMessage?: string;
14
+ /** Duration in ms to show the copied tooltip. Defaults to 2000 */
15
+ copiedDuration?: number;
16
+ }
17
+ export declare function CopyableText({ text, onCopy, ariaLabel, title, className, copiedMessage, copiedDuration, }: CopyableTextProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -2,3 +2,4 @@ export declare const container: string;
2
2
  export declare const filterButton: string;
3
3
  export declare const bottomRow: string;
4
4
  export declare const statusText: string;
5
+ export declare const buttonGroup: string;
@@ -5,6 +5,7 @@ export interface FilterOptionsProps {
5
5
  starredCount: number;
6
6
  onClearOverrides?: () => void;
7
7
  onClearStarred?: () => void;
8
+ onShareUrl?: () => void;
8
9
  isLoading?: boolean;
9
10
  }
10
11
  export declare function FilterOptions(props: FilterOptionsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const shareButton: string;
2
+ export declare const smallIcon: string;
@@ -0,0 +1,7 @@
1
+ interface ShareUrlButtonProps {
2
+ onClick: () => void;
3
+ isLoading?: boolean;
4
+ count: number;
5
+ }
6
+ export declare function ShareUrlButton({ onClick, isLoading, count }: ShareUrlButtonProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare const errorContainer: string;
2
+ export declare const errorHeader: string;
3
+ export declare const headerLogo: string;
4
+ export declare const errorMainContent: string;
5
+ export declare const errorContent: string;
6
+ export declare const errorTitle: string;
7
+ export declare const errorDescription: string;
@@ -0,0 +1,5 @@
1
+ interface IFrameErrorScreenProps {
2
+ onMouseDown?: (event: React.MouseEvent) => void;
3
+ }
4
+ export declare function IFrameErrorScreen(props: IFrameErrorScreenProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1 @@
1
+ export { IFrameErrorScreen } from './IFrameErrorScreen';
@@ -0,0 +1,7 @@
1
+ export declare const loadingContainer: string;
2
+ export declare const loadingHeader: string;
3
+ export declare const headerLogo: string;
4
+ export declare const loadingMainContent: string;
5
+ export declare const loadingContent: string;
6
+ export declare const spinner: string;
7
+ export declare const loadingText: string;
@@ -0,0 +1,5 @@
1
+ interface LoadingScreenProps {
2
+ onMouseDown?: (event: React.MouseEvent) => void;
3
+ }
4
+ export declare function LoadingScreen(props: LoadingScreenProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1 @@
1
+ export { LoadingScreen } from './LoadingScreen';
@@ -0,0 +1,10 @@
1
+ export declare const popover: string;
2
+ export declare const header: string;
3
+ export declare const title: string;
4
+ export declare const content: string;
5
+ export declare const description: string;
6
+ export declare const options: string;
7
+ export declare const option: string;
8
+ export declare const optionLabel: string;
9
+ export declare const count: string;
10
+ export declare const actions: string;
@@ -0,0 +1,15 @@
1
+ export interface ShareStateOptions {
2
+ includeFlagOverrides: boolean;
3
+ includeContexts: boolean;
4
+ includeSettings: boolean;
5
+ }
6
+ interface ShareStatePopoverProps {
7
+ isOpen: boolean;
8
+ onClose: () => void;
9
+ onShare: (options: ShareStateOptions) => void;
10
+ overrideCount: number;
11
+ contextCount: number;
12
+ anchorRef?: React.RefObject<HTMLElement>;
13
+ }
14
+ export declare function ShareStatePopover(props: ShareStatePopoverProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ export { ShareStatePopover } from './ShareStatePopover';
2
+ export type { ShareStateOptions } from './ShareStatePopover';
@@ -0,0 +1,5 @@
1
+ interface IconProps {
2
+ className?: string;
3
+ }
4
+ export declare function ShareIcon({ className }: IconProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -23,3 +23,5 @@ export { FlaskIcon } from './FlaskIcon';
23
23
  export { ExternalLinkIcon } from './ExternalLinkIcon';
24
24
  export { CursorIcon } from './CursorIcon';
25
25
  export { InfoIcon } from './InfoIcon';
26
+ export { AddIcon } from './AddIcon';
27
+ export { ShareIcon } from './ShareIcon';
@@ -1,10 +1,9 @@
1
- export { ActionButtonsContainer } from './legacy/ActionButtonsContainer';
2
1
  export { CircleLogo } from './CircleLogo';
3
2
  export { ConnectionStatus } from './ConnectionStatus';
3
+ export { CopyableText } from './CopyableText';
4
4
  export { DoNotTrackWarning } from './DoNotTrackWarning';
5
5
  export { LaunchDarklyIcon } from './icons/LaunchDarklyIcon';
6
6
  export { StatusDot } from './StatusDot';
7
- export { TabContentRenderer } from './legacy/TabContentRenderer';
8
7
  export { ErrorMessage } from './ErrorMessage';
9
8
  export { type FlagFilterMode, FlagFilterOptionsContext, useFlagFilterOptions, } from './FilterOptions/useFlagFilterOptions';
10
9
  export { FilterOptions } from './FilterOptions/FilterOptions';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A toast component that appears at the bottom of the toolbar asking users
3
+ * to opt into analytics. Only shows the first time the toolbar is opened.
4
+ */
5
+ export declare function AnalyticsConsentToast(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ export declare const overlay: string;
2
+ export declare const container: string;
3
+ export declare const infoIcon: string;
4
+ export declare const content: string;
5
+ export declare const textContent: string;
6
+ export declare const title: string;
7
+ export declare const description: string;
8
+ export declare const privacyLink: string;
9
+ export declare const actions: string;
10
+ export declare const button: string;
11
+ export declare const primaryButton: string;
12
+ export declare const closeButton: string;
13
+ export declare const closeIcon: string;
@@ -0,0 +1 @@
1
+ export { AnalyticsConsentToast } from './AnalyticsConsentToast';
@@ -1,4 +1,8 @@
1
1
  export declare const container: string;
2
+ export declare const searchContainer: string;
3
+ export declare const searchDropdown: string;
4
+ export declare const searchDropdownFlags: string;
5
+ export declare const searchDropdownLeft: string;
2
6
  export declare const actionButton: string;
3
7
  export declare const clearButton: string;
4
8
  export declare const icon: string;
@@ -0,0 +1,6 @@
1
+ interface AddContextFormProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ }
5
+ export declare function AddContextForm({ isOpen, onClose }: AddContextFormProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,14 @@
1
+ export declare const container: string;
2
+ export declare const header: string;
3
+ export declare const title: string;
4
+ export declare const closeButton: string;
5
+ export declare const form: string;
6
+ export declare const field: string;
7
+ export declare const label: string;
8
+ export declare const required: string;
9
+ export declare const input: string;
10
+ export declare const jsonEditorContainer: string;
11
+ export declare const errorText: string;
12
+ export declare const actions: string;
13
+ export declare const cancelButton: string;
14
+ export declare const submitButton: string;
@@ -0,0 +1,9 @@
1
+ import type { LDContext } from 'launchdarkly-js-client-sdk';
2
+ interface ContextItemProps {
3
+ context: LDContext;
4
+ isActiveContext: boolean;
5
+ handleHeightChange?: (index: number, height: number) => void;
6
+ index?: number;
7
+ }
8
+ export declare const ContextItem: import("react").NamedExoticComponent<ContextItemProps>;
9
+ export {};
@@ -0,0 +1,19 @@
1
+ export declare const container: string;
2
+ export declare const header: string;
3
+ export declare const containerActive: string;
4
+ export declare const containerClickable: string;
5
+ export declare const info: string;
6
+ export declare const nameRow: string;
7
+ export declare const name: string;
8
+ export declare const keyRow: string;
9
+ export declare const key: string;
10
+ export declare const kindBadge: string;
11
+ export declare const anonymousBadge: string;
12
+ export declare const activeDot: string;
13
+ export declare const actions: string;
14
+ export declare const deleteButton: string;
15
+ export declare const iconButton: string;
16
+ export declare const expandButton: string;
17
+ export declare const chevron: string;
18
+ export declare const chevronExpanded: string;
19
+ export declare const editActions: string;
@@ -0,0 +1 @@
1
+ export declare const ContextList: import("react").NamedExoticComponent<object>;
@@ -0,0 +1,8 @@
1
+ export declare const container: string;
2
+ export declare const statsHeader: string;
3
+ export declare const statsText: string;
4
+ export declare const addButton: string;
5
+ export declare const scrollContainer: string;
6
+ export declare const virtualInner: string;
7
+ export declare const loadingMore: string;
8
+ export declare const loadingMoreText: string;
@@ -0,0 +1 @@
1
+ export declare const ContextListContent: import("react").NamedExoticComponent<object>;
@@ -0,0 +1,4 @@
1
+ export { ContextListContent } from './ContextListContent';
2
+ export { ContextList } from './ContextList';
3
+ export { ContextItem } from './ContextItem';
4
+ export { AddContextForm } from './AddContextForm';
@@ -1,9 +1,10 @@
1
- import React from 'react';
1
+ import type { MouseEvent as ReactMouseEvent } from 'react';
2
2
  import { TabId } from '../../types/toolbar';
3
3
  interface ExpandedToolbarContentProps {
4
4
  onClose?: () => void;
5
- onHeaderMouseDown?: (event: React.MouseEvent) => void;
5
+ onHeaderMouseDown?: (event: ReactMouseEvent) => void;
6
6
  defaultActiveTab: TabId;
7
+ onOpenAuthModal?: () => void;
7
8
  }
8
- export declare const ExpandedToolbarContent: React.ForwardRefExoticComponent<ExpandedToolbarContentProps & React.RefAttributes<HTMLDivElement>>;
9
+ export declare const ExpandedToolbarContent: import("react").ForwardRefExoticComponent<ExpandedToolbarContentProps & import("react").RefAttributes<HTMLDivElement>>;
9
10
  export {};
@@ -4,19 +4,19 @@ interface BooleanFlagControlProps {
4
4
  onOverride: (value: boolean) => void;
5
5
  disabled?: boolean;
6
6
  }
7
- export declare function BooleanFlagControl(props: BooleanFlagControlProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare const BooleanFlagControl: import("react").NamedExoticComponent<BooleanFlagControlProps>;
8
8
  interface MultivariateFlagControlProps {
9
9
  flag: NormalizedFlag;
10
10
  onOverride: (value: any) => void;
11
11
  disabled?: boolean;
12
12
  }
13
- export declare function MultivariateFlagControl(props: MultivariateFlagControlProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare const MultivariateFlagControl: import("react").NamedExoticComponent<MultivariateFlagControlProps>;
14
14
  interface StringNumberFlagControlProps {
15
15
  flag: NormalizedFlag;
16
16
  onOverride: (value: string | number) => void;
17
17
  disabled?: boolean;
18
18
  }
19
- export declare function StringNumberFlagControl(props: StringNumberFlagControlProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare const StringNumberFlagControl: import("react").NamedExoticComponent<StringNumberFlagControlProps>;
20
20
  interface ObjectFlagControlButtonsProps {
21
21
  isEditing: boolean;
22
22
  onEditStart: () => void;
@@ -24,7 +24,7 @@ interface ObjectFlagControlButtonsProps {
24
24
  onCancel: () => void;
25
25
  hasErrors: boolean;
26
26
  }
27
- export declare function ObjectFlagControlButtons(props: ObjectFlagControlButtonsProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare const ObjectFlagControlButtons: import("react").NamedExoticComponent<ObjectFlagControlButtonsProps>;
28
28
  interface ObjectFlagEditorProps {
29
29
  flag: NormalizedFlag;
30
30
  isEditing: boolean;
@@ -33,5 +33,5 @@ interface ObjectFlagEditorProps {
33
33
  onLintErrors: (hasErrors: boolean) => void;
34
34
  handleHeightChange: (height: number) => void;
35
35
  }
36
- export declare function ObjectFlagEditor(props: ObjectFlagEditorProps): import("react/jsx-runtime").JSX.Element;
36
+ export declare const ObjectFlagEditor: import("react").NamedExoticComponent<ObjectFlagEditorProps>;
37
37
  export {};
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { NormalizedFlag } from './types';
2
3
  interface FlagItemProps {
3
4
  flag: NormalizedFlag;
@@ -7,5 +8,5 @@ interface FlagItemProps {
7
8
  disabled?: boolean;
8
9
  index: number;
9
10
  }
10
- export declare function FlagItem({ flag, onOverride, onClearOverride, handleHeightChange, disabled, index, }: FlagItemProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare const FlagItem: React.NamedExoticComponent<FlagItemProps>;
11
12
  export {};
@@ -1 +1 @@
1
- export declare function FlagListContent(): import("react/jsx-runtime").JSX.Element;
1
+ export declare const FlagListContent: import("react").NamedExoticComponent<object>;
@@ -1,4 +1,5 @@
1
1
  export declare const overlay: string;
2
+ export declare const overlayFlags: string;
2
3
  export declare const header: string;
3
4
  export declare const title: string;
4
5
  export declare const resetButton: string;
@@ -0,0 +1 @@
1
+ export declare function PrivacySettings(): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,5 @@
1
1
  export declare const container: string;
2
2
  export declare const value: string;
3
3
  export declare const placeholder: string;
4
+ export declare const feedbackSection: string;
5
+ export declare const feedbackTitle: string;