@launchdarkly/toolbar 1.6.0 → 2.2.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.
- package/README.md +6 -4
- package/cdn/toolbar.min.js +339 -9
- package/dist/core/services/DevServerClient.d.ts +3 -10
- package/dist/core/services/FlagStateManager.d.ts +3 -0
- package/dist/core/types/devServer.d.ts +2 -3
- package/dist/core/ui/{Toolbar/components → Buttons}/StarButton.css.d.ts +1 -0
- package/dist/core/ui/Toolbar/LaunchDarklyToolbar.d.ts +1 -1
- package/dist/core/ui/Toolbar/components/FlagKeyWithCopy.css.d.ts +4 -0
- package/dist/core/ui/Toolbar/components/FlagKeyWithCopy.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/LoginScreen/LoginScreen.css.d.ts +14 -0
- package/dist/core/ui/Toolbar/components/LoginScreen/LoginScreen.d.ts +10 -0
- package/dist/core/ui/Toolbar/components/icons/ChartHistogram.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/icons/ChipAiIcon.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/icons/ClickIcon.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/icons/CursorIcon.d.ts +7 -0
- package/dist/core/ui/Toolbar/components/icons/ExternalLinkIcon.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/icons/FilterTuneIcon.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/icons/FlaskIcon.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/icons/Icon.css.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/icons/InfoIcon.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/icons/LaunchDarklyIcon.d.ts +2 -1
- package/dist/core/ui/Toolbar/components/icons/index.d.ts +8 -0
- package/dist/core/ui/Toolbar/components/index.d.ts +2 -3
- package/dist/core/ui/Toolbar/components/{ExpandedToolbarContent.d.ts → legacy/ExpandedToolbarContentLegacy.d.ts} +3 -5
- package/dist/core/ui/Toolbar/components/{FlagControls.d.ts → legacy/FlagControls.d.ts} +1 -1
- package/dist/core/ui/Toolbar/{Header → components/legacy/Header}/Header.css.d.ts +2 -0
- package/dist/core/ui/Toolbar/{Header → components/legacy/Header}/Header.d.ts +1 -2
- package/dist/core/ui/Toolbar/components/{LocalFlagControls.d.ts → legacy/LocalFlagControls.d.ts} +2 -2
- package/dist/core/ui/Toolbar/components/{LocalObjectFlagControlListItem.d.ts → legacy/LocalObjectFlagControlListItem.d.ts} +2 -2
- package/dist/core/ui/Toolbar/{TabContent → components/legacy/TabContent}/EventsTabContent.d.ts +1 -1
- package/dist/core/ui/Toolbar/{TabContent → components/legacy/TabContent}/FlagSdkOverrideTabContent.d.ts +1 -1
- package/dist/core/ui/Toolbar/{TabContent → components/legacy/TabContent}/SettingsTabContent.d.ts +1 -3
- package/dist/core/ui/Toolbar/components/{TabContentRenderer.d.ts → legacy/TabContentRenderer.d.ts} +2 -4
- package/dist/core/ui/Toolbar/components/legacy/index.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/ContentActions.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/ContentActions.module.css.d.ts +4 -0
- package/dist/core/ui/Toolbar/components/new/ContentRenderer.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/ExpandedToolbarContent.d.ts +9 -0
- package/dist/core/ui/Toolbar/components/new/ExpandedToolbarContent.module.css.d.ts +2 -0
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagControls.d.ts +37 -0
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagControls.module.css.d.ts +9 -0
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagItem.d.ts +11 -0
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagItem.module.css.d.ts +18 -0
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagList.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagList.module.css.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagListContent.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/types.d.ts +9 -0
- package/dist/core/ui/Toolbar/components/new/FilterOverlay/FilterOverlay.d.ts +11 -0
- package/dist/core/ui/Toolbar/components/new/FilterOverlay/FilterOverlay.module.css.d.ts +16 -0
- package/dist/core/ui/Toolbar/components/new/FilterOverlay/index.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Header/ToolbarHeader.d.ts +7 -0
- package/dist/core/ui/Toolbar/components/new/Header/ToolbarHeader.module.css.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/new/IconBar/IconBar.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/new/IconBar/IconBar.module.css.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/InteractiveContent.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/InteractiveContent.module.css.d.ts +4 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/InteractiveWrapper.d.ts +10 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/MCPSetupAlert.d.ts +10 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/MCPSetupAlert.module.css.d.ts +12 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/SelectedElementInfo.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/SelectedElementInfo.module.css.d.ts +21 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/SelectionModeBar.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/SelectionOverlay.d.ts +2 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/WorkflowCard.d.ts +13 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/WorkflowCard.module.css.d.ts +27 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/WorkflowSection.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/WorkflowSection.module.css.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/index.d.ts +9 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/utils/elementUtils.d.ts +56 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/utils/ideLinks.d.ts +58 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/utils/promptBuilder.d.ts +26 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/utils/throttle.d.ts +10 -0
- package/dist/core/ui/Toolbar/components/new/Interactive/workflowConfigs.d.ts +36 -0
- package/dist/core/ui/Toolbar/components/new/Monitoring/EventsContent.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Monitoring/EventsContent.module.css.d.ts +24 -0
- package/dist/core/ui/Toolbar/components/new/SearchSection.d.ts +8 -0
- package/dist/core/ui/Toolbar/components/new/SearchSection.module.css.d.ts +3 -0
- package/dist/core/ui/Toolbar/components/new/Settings/ConnectionStatus.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/new/Settings/ConnectionStatus.module.css.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/new/Settings/EnvironmentSelector.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Settings/GeneralSettings.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Settings/LogoutButton.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Settings/LogoutButton.module.css.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Settings/PositionSelector.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/new/Settings/ProjectSelector.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Settings/SettingsContent.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Settings/SettingsContent.module.css.d.ts +3 -0
- package/dist/core/ui/Toolbar/components/new/Settings/SettingsItem.d.ts +8 -0
- package/dist/core/ui/Toolbar/components/new/Settings/SettingsItem.module.css.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/new/Settings/SettingsSection.d.ts +7 -0
- package/dist/core/ui/Toolbar/components/new/Settings/SettingsSection.module.css.d.ts +3 -0
- package/dist/core/ui/Toolbar/components/new/Settings/index.d.ts +8 -0
- package/dist/core/ui/Toolbar/components/new/SubtabDropdown.d.ts +8 -0
- package/dist/core/ui/Toolbar/components/new/SubtabDropdown.module.css.d.ts +10 -0
- package/dist/core/ui/Toolbar/components/new/TabBar.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/TabBar.module.css.d.ts +4 -0
- package/dist/core/ui/Toolbar/components/new/Tooltip.d.ts +7 -0
- package/dist/core/ui/Toolbar/components/new/Tooltip.module.css.d.ts +2 -0
- package/dist/core/ui/Toolbar/components/new/context/ActiveSubtabProvider.d.ts +12 -0
- package/dist/core/ui/Toolbar/components/new/context/FiltersProvider.d.ts +41 -0
- package/dist/core/ui/Toolbar/components/new/context/TabSearchProvider.d.ts +10 -0
- package/dist/core/ui/Toolbar/components/new/context/index.d.ts +3 -0
- package/dist/core/ui/Toolbar/components/new/index.d.ts +10 -0
- package/dist/core/ui/Toolbar/components/new/types.d.ts +16 -0
- package/dist/core/ui/Toolbar/constants/virtualization.d.ts +1 -0
- package/dist/core/ui/Toolbar/context/DevServerProvider.d.ts +1 -5
- package/dist/core/ui/Toolbar/context/ElementSelectionProvider.d.ts +52 -0
- package/dist/core/ui/Toolbar/context/FlagSdkOverrideProvider.d.ts +5 -1
- package/dist/core/ui/Toolbar/context/api/ApiBundleProvider.d.ts +8 -0
- package/dist/core/ui/Toolbar/context/api/ApiProvider.d.ts +15 -0
- package/dist/core/ui/Toolbar/context/{AuthProvider.d.ts → api/AuthProvider.d.ts} +4 -3
- package/dist/core/ui/Toolbar/context/api/EnvironmentProvider.d.ts +12 -0
- package/dist/core/ui/Toolbar/context/api/FlagsProvider.d.ts +12 -0
- package/dist/core/ui/Toolbar/context/{IFrameProvider.d.ts → api/IFrameProvider.d.ts} +13 -11
- package/dist/core/ui/Toolbar/context/api/ProjectProvider.d.ts +17 -0
- package/dist/core/ui/Toolbar/context/api/index.d.ts +7 -0
- package/dist/core/ui/Toolbar/context/index.d.ts +7 -6
- package/dist/core/ui/Toolbar/context/state/ActiveTabProvider.d.ts +10 -0
- package/dist/core/ui/Toolbar/context/state/PluginsProvider.d.ts +16 -0
- package/dist/core/ui/Toolbar/context/{SearchProvider.d.ts → state/SearchProvider.d.ts} +2 -2
- package/dist/core/ui/Toolbar/context/state/ToolbarStateBundleProvider.d.ts +13 -0
- package/dist/core/ui/Toolbar/{hooks/useToolbarState.d.ts → context/state/ToolbarStateProvider.d.ts} +11 -11
- package/dist/core/ui/Toolbar/context/{ToolbarUIProvider.d.ts → state/ToolbarUIProvider.d.ts} +1 -1
- package/dist/core/ui/Toolbar/context/state/index.d.ts +6 -0
- package/dist/core/ui/Toolbar/context/{AnalyticsProvider.d.ts → telemetry/AnalyticsProvider.d.ts} +2 -2
- package/dist/core/ui/Toolbar/context/telemetry/TelemetryBundleProvider.d.ts +11 -0
- package/dist/core/ui/Toolbar/context/telemetry/index.d.ts +3 -0
- package/dist/core/ui/Toolbar/hooks/index.d.ts +0 -1
- package/dist/core/ui/Toolbar/types/ldApi.d.ts +40 -0
- package/dist/core/ui/Toolbar/types/toolbar.d.ts +3 -2
- package/dist/core/ui/Toolbar/utils/clipboard.d.ts +6 -0
- package/dist/core/ui/Toolbar/utils/localStorage.d.ts +9 -4
- package/dist/core/utils/analytics.d.ts +28 -0
- package/dist/flags/toolbarFlags.d.ts +4 -1
- package/dist/index.cjs +1 -3
- package/dist/index.cjs.map +1 -1
- package/dist/js/index.js +1 -3
- package/dist/js/index.js.map +1 -1
- package/dist/types/config.d.ts +11 -1
- package/package.json +16 -13
- package/dist/core/ui/Toolbar/components/Popover.css.d.ts +0 -2
- package/dist/core/ui/Toolbar/context/ApiProvider.d.ts +0 -11
- package/dist/core/ui/{Toolbar/components → Buttons}/IconButton.css.d.ts +0 -0
- package/dist/core/ui/{Toolbar/components → Buttons}/IconButton.d.ts +0 -0
- package/dist/core/ui/{Toolbar/components → Buttons}/IconLinkButton.d.ts +0 -0
- package/dist/core/ui/{Toolbar/components → Buttons}/StarButton.d.ts +0 -0
- package/dist/core/ui/{Toolbar/components → Select}/Select.css.d.ts +0 -0
- package/dist/core/ui/{Toolbar/components → Select}/Select.d.ts +0 -0
- package/dist/core/ui/Toolbar/components/{AuthenticationModal.css.d.ts → AuthenticationModal/AuthenticationModal.css.d.ts} +0 -0
- package/dist/core/ui/Toolbar/components/{AuthenticationModal.d.ts → AuthenticationModal/AuthenticationModal.d.ts} +0 -0
- package/dist/core/ui/Toolbar/components/{ActionButtonsContainer.css.d.ts → legacy/ActionButtonsContainer.css.d.ts} +0 -0
- package/dist/core/ui/Toolbar/components/{ActionButtonsContainer.d.ts → legacy/ActionButtonsContainer.d.ts} +0 -0
- package/dist/core/ui/Toolbar/components/{FlagControls.css.d.ts → legacy/FlagControls.css.d.ts} +0 -0
- package/dist/core/ui/Toolbar/{Header → components/legacy/Header}/components/ActionButtons.d.ts +0 -0
- package/dist/core/ui/Toolbar/{Header → components/legacy/Header}/components/EnvironmentLabel.d.ts +0 -0
- package/dist/core/ui/Toolbar/{Header → components/legacy/Header}/components/LogoSection.d.ts +0 -0
- package/dist/core/ui/Toolbar/{Header → components/legacy/Header}/components/SearchSection.d.ts +0 -0
- package/dist/core/ui/Toolbar/{Header → components/legacy/Header}/components/index.d.ts +1 -1
- /package/dist/core/ui/Toolbar/components/{LocalFlagControls.css.d.ts → legacy/LocalFlagControls.css.d.ts} +0 -0
- /package/dist/core/ui/Toolbar/components/{LocalObjectFlagControlListItem.css.d.ts → legacy/LocalObjectFlagControlListItem.css.d.ts} +0 -0
- /package/dist/core/ui/Toolbar/{TabContent → components/legacy/TabContent}/EventsTabContent.css.d.ts +0 -0
- /package/dist/core/ui/Toolbar/{TabContent → components/legacy/TabContent}/FlagDevServerTabContent.css.d.ts +0 -0
- /package/dist/core/ui/Toolbar/{TabContent → components/legacy/TabContent}/FlagDevServerTabContent.d.ts +0 -0
- /package/dist/core/ui/Toolbar/{TabContent → components/legacy/TabContent}/SettingsTab.css.d.ts +0 -0
- /package/dist/core/ui/Toolbar/components/{TabContentRenderer.css.d.ts → legacy/TabContentRenderer.css.d.ts} +0 -0
- /package/dist/core/ui/Toolbar/context/{InternalClientProvider.d.ts → telemetry/InternalClientProvider.d.ts} +0 -0
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { IFlagOverridePlugin } from '../../../../types';
|
|
2
|
+
import { ApiVariation } from '../types/ldApi';
|
|
2
3
|
interface LocalFlag {
|
|
3
4
|
key: string;
|
|
4
5
|
name: string;
|
|
5
6
|
currentValue: any;
|
|
6
7
|
isOverridden: boolean;
|
|
7
|
-
type: 'boolean' | 'string' | 'number' | 'object';
|
|
8
|
+
type: 'boolean' | 'multivariate' | 'string' | 'number' | 'object';
|
|
9
|
+
availableVariations: ApiVariation[];
|
|
8
10
|
}
|
|
9
11
|
interface FlagSdkOverrideContextType {
|
|
10
12
|
flags: Record<string, LocalFlag>;
|
|
11
13
|
isLoading: boolean;
|
|
14
|
+
setOverride: (flagKey: string, value: any) => void;
|
|
15
|
+
removeOverride: (flagKey: string) => void;
|
|
12
16
|
}
|
|
13
17
|
interface FlagSdkOverrideProviderProps {
|
|
14
18
|
children: React.ReactNode;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ApiBundleProviderProps {
|
|
2
|
+
authUrl: string;
|
|
3
|
+
clientSideId?: string;
|
|
4
|
+
providedProjectKey?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function ApiBundleProvider(props: ApiBundleProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FlagsPaginationParams, FlagsResponse, ApiFlag, ProjectsResponse } from '../../types/ldApi';
|
|
2
|
+
interface ApiProviderContextValue {
|
|
3
|
+
apiReady: boolean;
|
|
4
|
+
getFlag: (flagKey: string) => Promise<ApiFlag>;
|
|
5
|
+
getProjects: () => Promise<ProjectsResponse>;
|
|
6
|
+
getFlags: (projectKey: string, params?: FlagsPaginationParams) => Promise<FlagsResponse>;
|
|
7
|
+
}
|
|
8
|
+
export interface ApiProviderProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function ApiProvider({ children }: {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function useApi(): ApiProviderContextValue;
|
|
15
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
|
|
2
|
+
interface AuthContextType {
|
|
3
3
|
authenticated: boolean;
|
|
4
4
|
authenticating: boolean;
|
|
5
5
|
loading: boolean;
|
|
6
6
|
setAuthenticating: Dispatch<SetStateAction<boolean>>;
|
|
7
|
-
|
|
7
|
+
logout: () => void;
|
|
8
|
+
}
|
|
8
9
|
export declare function AuthProvider({ children }: {
|
|
9
10
|
children: React.ReactNode;
|
|
10
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare function useAuthContext():
|
|
12
|
+
export declare function useAuthContext(): AuthContextType;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface EnvironmentContextType {
|
|
3
|
+
environment: string;
|
|
4
|
+
setEnvironment: (environment: string) => void;
|
|
5
|
+
}
|
|
6
|
+
interface EnvironmentProviderProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
clientSideId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const EnvironmentProvider: FC<EnvironmentProviderProps>;
|
|
11
|
+
export declare function useEnvironmentContext(): EnvironmentContextType;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ApiFlag, FlagsResponse } from '../../types/ldApi';
|
|
2
|
+
interface FlagsContextType {
|
|
3
|
+
flags: ApiFlag[];
|
|
4
|
+
loading: boolean;
|
|
5
|
+
getProjectFlags: (projectKey: string) => Promise<FlagsResponse>;
|
|
6
|
+
resetFlags: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const FlagsProvider: ({ children }: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useFlagsContext(): FlagsContextType;
|
|
12
|
+
export {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
export declare const IFRAME_COMMANDS: {
|
|
3
|
+
LOGOUT: string;
|
|
4
|
+
GET_PROJECTS: string;
|
|
5
|
+
GET_FLAGS: string;
|
|
6
|
+
GET_FLAG: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const getResponseTopic: (command: string) => string;
|
|
9
|
+
export declare const getErrorTopic: (command: string) => string;
|
|
10
|
+
export declare const IFRAME_EVENTS: {
|
|
11
|
+
AUTHENTICATED: string;
|
|
12
|
+
AUTH_REQUIRED: string;
|
|
13
|
+
AUTH_ERROR: string;
|
|
14
|
+
API_READY: string;
|
|
13
15
|
};
|
|
14
16
|
interface IFrameProviderProps {
|
|
15
17
|
children: React.ReactNode;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ApiProject, ProjectsResponse, ApiEnvironment } from '../../types/ldApi';
|
|
2
|
+
interface ProjectContextType {
|
|
3
|
+
projectKey: string;
|
|
4
|
+
setProjectKey: (projectKey: string) => void;
|
|
5
|
+
getProjects: () => Promise<ProjectsResponse>;
|
|
6
|
+
projects: ApiProject[];
|
|
7
|
+
environments: ApiEnvironment[];
|
|
8
|
+
loading: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface ProjectProviderProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
clientSideId?: string;
|
|
13
|
+
providedProjectKey?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const ProjectProvider: ({ children, clientSideId, providedProjectKey }: ProjectProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function useProjectContext(): ProjectContextType;
|
|
17
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './state';
|
|
3
|
+
export * from './telemetry';
|
|
4
|
+
export * from './DevServerProvider';
|
|
5
|
+
export * from './FlagSdkOverrideProvider';
|
|
6
|
+
export * from './StarredFlagsProvider';
|
|
7
|
+
export * from './ElementSelectionProvider';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ActiveTabId } from '../../types';
|
|
2
|
+
interface ActiveTabContextType {
|
|
3
|
+
activeTab: ActiveTabId;
|
|
4
|
+
setActiveTab: (tab: ActiveTabId) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function ActiveTabProvider({ children }: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function useActiveTabContext(): ActiveTabContextType;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IEventInterceptionPlugin, IFlagOverridePlugin } from '../../../../../types';
|
|
3
|
+
interface PluginsContextValue {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
flagOverridePlugin?: IFlagOverridePlugin;
|
|
6
|
+
eventInterceptionPlugin?: IEventInterceptionPlugin;
|
|
7
|
+
}
|
|
8
|
+
export interface PluginsProviderProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
flagOverridePlugin?: IFlagOverridePlugin;
|
|
12
|
+
eventInterceptionPlugin?: IEventInterceptionPlugin;
|
|
13
|
+
}
|
|
14
|
+
export declare function PluginsProvider({ children, baseUrl, flagOverridePlugin, eventInterceptionPlugin, }: PluginsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function usePlugins(): PluginsContextValue;
|
|
16
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { Dispatch, type SetStateAction } from 'react';
|
|
2
|
-
|
|
2
|
+
interface SearchContextType {
|
|
3
3
|
searchTerm: string;
|
|
4
4
|
setSearchTerm: Dispatch<SetStateAction<string>>;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
export declare function SearchProvider({ children }: {
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IEventInterceptionPlugin, IFlagOverridePlugin } from '../../../../../types';
|
|
2
|
+
import { ToolbarPosition } from '../../types';
|
|
3
|
+
interface ToolbarStateBundleProviderProps {
|
|
4
|
+
initialPosition?: ToolbarPosition;
|
|
5
|
+
domId: string;
|
|
6
|
+
devServerUrl?: string;
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
flagOverridePlugin?: IFlagOverridePlugin;
|
|
9
|
+
eventInterceptionPlugin?: IEventInterceptionPlugin;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function ToolbarStateBundleProvider(props: ToolbarStateBundleProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
package/dist/core/ui/Toolbar/{hooks/useToolbarState.d.ts → context/state/ToolbarStateProvider.d.ts}
RENAMED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { ActiveTabId } from '
|
|
3
|
-
export interface
|
|
4
|
-
defaultActiveTab: ActiveTabId;
|
|
5
|
-
domId: string;
|
|
6
|
-
}
|
|
7
|
-
export interface UseToolbarStateReturn {
|
|
1
|
+
import React, { Dispatch, SetStateAction, ReactNode } from 'react';
|
|
2
|
+
import { ActiveTabId, ToolbarMode } from '../../types';
|
|
3
|
+
export interface ToolbarStateContextValue {
|
|
8
4
|
isExpanded: boolean;
|
|
9
|
-
activeTab: ActiveTabId;
|
|
10
5
|
previousTab: ActiveTabId;
|
|
11
6
|
isAnimating: boolean;
|
|
12
7
|
searchIsExpanded: boolean;
|
|
@@ -14,16 +9,21 @@ export interface UseToolbarStateReturn {
|
|
|
14
9
|
hasBeenExpanded: boolean;
|
|
15
10
|
reloadOnFlagChangeIsEnabled: boolean;
|
|
16
11
|
isAutoCollapseEnabled: boolean;
|
|
17
|
-
|
|
12
|
+
mode: ToolbarMode;
|
|
18
13
|
toolbarRef: React.RefObject<HTMLDivElement | null>;
|
|
19
14
|
handleTabChange: (tabId: string) => void;
|
|
20
15
|
handleClose: () => void;
|
|
21
16
|
handleSearch: (newSearchTerm: string) => void;
|
|
22
17
|
handleToggleReloadOnFlagChange: () => void;
|
|
23
18
|
handleToggleAutoCollapse: () => void;
|
|
24
|
-
handleToggleOptInToNewFeatures: () => void;
|
|
25
19
|
handleCircleClick: () => void;
|
|
26
20
|
setIsAnimating: Dispatch<SetStateAction<boolean>>;
|
|
27
21
|
setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
|
|
28
22
|
}
|
|
29
|
-
export
|
|
23
|
+
export interface ToolbarStateProviderProps {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
domId: string;
|
|
26
|
+
devServerUrl?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function ToolbarStateProvider({ children, domId, devServerUrl }: ToolbarStateProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function useToolbarState(): ToolbarStateContextValue;
|
package/dist/core/ui/Toolbar/context/{ToolbarUIProvider.d.ts → state/ToolbarUIProvider.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FC, ReactNode } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { ToolbarPosition } from '../../types';
|
|
3
3
|
interface ToolbarUIContextValue {
|
|
4
4
|
position: ToolbarPosition;
|
|
5
5
|
handlePositionChange: (position: ToolbarPosition) => void;
|
package/dist/core/ui/Toolbar/context/{AnalyticsProvider.d.ts → telemetry/AnalyticsProvider.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ToolbarAnalytics } from '
|
|
2
|
-
import { ToolbarMode } from '
|
|
1
|
+
import { ToolbarAnalytics } from '../../../../utils/analytics';
|
|
2
|
+
import { ToolbarMode } from '../../types';
|
|
3
3
|
interface AnalyticsProviderProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
mode?: ToolbarMode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ToolbarMode } from '../../types';
|
|
2
|
+
interface TelemetryBundleProviderProps {
|
|
3
|
+
mode: ToolbarMode;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
clientSideId?: string;
|
|
6
|
+
streamUrl?: string;
|
|
7
|
+
eventsUrl?: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function TelemetryBundleProvider(props: TelemetryBundleProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface ApiProject {
|
|
2
|
+
_id: string;
|
|
3
|
+
key: string;
|
|
4
|
+
name: string;
|
|
5
|
+
environments: ApiEnvironment[];
|
|
6
|
+
}
|
|
7
|
+
export interface ApiEnvironment {
|
|
8
|
+
_id: string;
|
|
9
|
+
key: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ApiFlag {
|
|
13
|
+
archived: boolean;
|
|
14
|
+
clientSideAvailability: {
|
|
15
|
+
usingEnvironmentId: boolean;
|
|
16
|
+
usingMobileKey: boolean;
|
|
17
|
+
};
|
|
18
|
+
customProperties: Record<string, any>;
|
|
19
|
+
description: string;
|
|
20
|
+
key: string;
|
|
21
|
+
kind: 'boolean' | 'string' | 'number' | 'object' | 'multivariate';
|
|
22
|
+
name: string;
|
|
23
|
+
variations: ApiVariation[];
|
|
24
|
+
}
|
|
25
|
+
export interface ApiVariation {
|
|
26
|
+
_id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
value: any;
|
|
29
|
+
}
|
|
30
|
+
export interface FlagsResponse {
|
|
31
|
+
items: ApiFlag[];
|
|
32
|
+
}
|
|
33
|
+
export interface ProjectsResponse {
|
|
34
|
+
items: ApiProject[];
|
|
35
|
+
}
|
|
36
|
+
export interface FlagsPaginationParams {
|
|
37
|
+
limit?: number;
|
|
38
|
+
offset?: number;
|
|
39
|
+
query?: string;
|
|
40
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export type TabId = 'flag-sdk' | 'flag-dev-server' | 'events' | 'settings';
|
|
1
|
+
export type TabId = 'flag-sdk' | 'flag-dev-server' | 'events' | 'settings' | 'flags' | 'monitoring' | 'interactive' | 'ai' | 'optimize';
|
|
2
2
|
export type ActiveTabId = TabId | undefined;
|
|
3
3
|
export declare const TAB_ORDER: readonly TabId[];
|
|
4
4
|
export type ToolbarMode = 'dev-server' | 'sdk';
|
|
5
5
|
export declare const DEV_SERVER_TABS: readonly TabId[];
|
|
6
6
|
export declare const SDK_MODE_TABS: readonly TabId[];
|
|
7
|
+
export declare const NEW_TOOLBAR_TABS: readonly TabId[];
|
|
7
8
|
export declare function getToolbarMode(devServerUrl?: string): ToolbarMode;
|
|
8
9
|
export declare function getTabsForMode(mode: ToolbarMode, hasFlagOverridePlugin: boolean, hasEventInterceptionPlugin: boolean): readonly TabId[];
|
|
9
|
-
export declare function getDefaultActiveTab(mode: ToolbarMode, hasFlagOverridePlugin?: boolean, hasEventInterceptionPlugin?: boolean): TabId;
|
|
10
|
+
export declare function getDefaultActiveTab(mode: ToolbarMode, hasFlagOverridePlugin?: boolean, hasEventInterceptionPlugin?: boolean, useNewToolbarDesign?: boolean): TabId;
|
|
10
11
|
export interface FeatureFlag {
|
|
11
12
|
id: string;
|
|
12
13
|
name: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy text to clipboard with fallback for older browsers
|
|
3
|
+
* @param text - The text to copy to clipboard
|
|
4
|
+
* @returns Promise that resolves to true if copy was successful, false otherwise
|
|
5
|
+
*/
|
|
6
|
+
export declare function copyToClipboard(text: string): Promise<boolean>;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { ToolbarPosition } from '../types/toolbar';
|
|
2
2
|
export declare const TOOLBAR_STORAGE_KEYS: {
|
|
3
|
+
readonly ENVIRONMENT: "ld-toolbar-environment";
|
|
3
4
|
readonly SETTINGS: "ld-toolbar-settings";
|
|
4
5
|
readonly DISABLED: "ld-toolbar-disabled";
|
|
5
6
|
readonly PROJECT: "ld-toolbar-project";
|
|
6
|
-
readonly OPT_IN_TO_NEW_FEATURES: "ld-toolbar-opt-in-to-new-features";
|
|
7
7
|
readonly STARRED_FLAGS: "ld-toolbar-starred-flags";
|
|
8
|
+
readonly MCP_ALERT_DISMISSED: "ld-toolbar-mcp-alert-dismissed";
|
|
8
9
|
};
|
|
10
|
+
export type PreferredIde = 'cursor' | 'windsurf' | 'vscode' | 'github-copilot';
|
|
11
|
+
export declare const PREFERRED_IDES: PreferredIde[];
|
|
9
12
|
export interface ToolbarSettings {
|
|
10
13
|
position: ToolbarPosition;
|
|
11
14
|
reloadOnFlagChange: boolean;
|
|
12
15
|
autoCollapse: boolean;
|
|
13
|
-
|
|
16
|
+
preferredIde: PreferredIde;
|
|
14
17
|
}
|
|
15
18
|
export declare const DEFAULT_SETTINGS: ToolbarSettings;
|
|
16
19
|
export declare function saveToolbarPosition(position: ToolbarPosition): void;
|
|
@@ -19,7 +22,9 @@ export declare function saveToolbarAutoCollapse(autoCollapse: boolean): void;
|
|
|
19
22
|
export declare function loadToolbarAutoCollapse(): boolean;
|
|
20
23
|
export declare function saveReloadOnFlagChange(isReloadOnFlagChange: boolean): void;
|
|
21
24
|
export declare function loadReloadOnFlagChange(): boolean;
|
|
22
|
-
export declare function saveOptInToNewFeatures(optInToNewFeatures: boolean): void;
|
|
23
|
-
export declare function loadOptInToNewFeatures(): boolean;
|
|
24
25
|
export declare function loadStarredFlags(): Set<string>;
|
|
25
26
|
export declare function saveStarredFlags(starredFlags: Set<string>): void;
|
|
27
|
+
export declare function savePreferredIde(ide: PreferredIde): void;
|
|
28
|
+
export declare function loadPreferredIde(): PreferredIde;
|
|
29
|
+
export declare function saveMCPAlertDismissed(dismissed: boolean): void;
|
|
30
|
+
export declare function loadMCPAlertDismissed(): boolean;
|
|
@@ -54,6 +54,10 @@ export declare class ToolbarAnalytics {
|
|
|
54
54
|
* Track opening a flag deeplink
|
|
55
55
|
*/
|
|
56
56
|
trackOpenFlagDeeplink(flagKey: string, baseUrl: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* Track clearing events
|
|
59
|
+
*/
|
|
60
|
+
trackClearEvents(): void;
|
|
57
61
|
/**
|
|
58
62
|
* Track Event clicks
|
|
59
63
|
*/
|
|
@@ -62,10 +66,30 @@ export declare class ToolbarAnalytics {
|
|
|
62
66
|
* Track Reload on Flag Change toggles
|
|
63
67
|
*/
|
|
64
68
|
trackReloadOnFlagChangeToggle(enabled: boolean): void;
|
|
69
|
+
/**
|
|
70
|
+
* Track successful login
|
|
71
|
+
*/
|
|
72
|
+
trackLoginSuccess(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Track when user closes the login screen without logging in
|
|
75
|
+
*/
|
|
76
|
+
trackLoginCancelled(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Track when user logs out
|
|
79
|
+
*/
|
|
80
|
+
trackLogout(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Track authentication errors
|
|
83
|
+
*/
|
|
84
|
+
trackAuthError(error: unknown): void;
|
|
65
85
|
/**
|
|
66
86
|
* Track project switching in dev server mode
|
|
67
87
|
*/
|
|
68
88
|
trackProjectSwitch(fromProject: string, toProject: string): void;
|
|
89
|
+
/**
|
|
90
|
+
* Track API errors
|
|
91
|
+
*/
|
|
92
|
+
trackApiError(error: unknown): void;
|
|
69
93
|
/**
|
|
70
94
|
* Track refresh button clicks in dev server mode
|
|
71
95
|
*/
|
|
@@ -74,4 +98,8 @@ export declare class ToolbarAnalytics {
|
|
|
74
98
|
* Track user feedback
|
|
75
99
|
*/
|
|
76
100
|
trackFeedback(feedback: string, sentiment: FeedbackSentiment): void;
|
|
101
|
+
/**
|
|
102
|
+
* Track flag key copy
|
|
103
|
+
*/
|
|
104
|
+
trackFlagKeyCopy(flagKey: string): void;
|
|
77
105
|
}
|
|
@@ -7,4 +7,7 @@
|
|
|
7
7
|
* To add a toolbar feature flag, export it here like:
|
|
8
8
|
* export const myFeature = createToolbarFlagFunction('my-feature-key', defaultValue);
|
|
9
9
|
*/
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const useNewToolbarDesign: () => boolean;
|
|
11
|
+
export declare const enableInteractiveIcon: () => boolean;
|
|
12
|
+
export declare const enableAiIcon: () => boolean;
|
|
13
|
+
export declare const enableOptimizeIcon: () => boolean;
|
package/dist/index.cjs
CHANGED
|
@@ -552,9 +552,7 @@ async function lazyLoad(signal, url) {
|
|
|
552
552
|
throw new Error(`Could not load LaunchDarkly developer toolbar bundle from ${url}`);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
var package_namespaceObject = {
|
|
556
|
-
rE: "1.6.0"
|
|
557
|
-
};
|
|
555
|
+
var package_namespaceObject = JSON.parse('{"rE":"2.2.0-beta.1"}');
|
|
558
556
|
function useLaunchDarklyToolbar(args) {
|
|
559
557
|
const { toolbarBundleUrl, enabled, ...initConfig } = args;
|
|
560
558
|
const configRef = (0, external_react_namespaceObject.useRef)(null);
|