@launchdarkly/toolbar 1.2.0 → 1.3.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.
@@ -9,5 +9,6 @@ export interface HeaderProps {
9
9
  label: string;
10
10
  mode: ToolbarMode;
11
11
  onMouseDown?: (event: React.MouseEvent) => void;
12
+ onOpenConfig?: () => void;
12
13
  }
13
14
  export declare function Header(props: HeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -4,6 +4,7 @@ interface ActionButtonsProps {
4
4
  setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
5
5
  onClose: () => void;
6
6
  onRefresh: () => void;
7
+ onOpenConfig?: () => void;
7
8
  showSearchButton: boolean;
8
9
  showRefreshButton: boolean;
9
10
  }
@@ -10,6 +10,7 @@ export interface LdToolbarProps {
10
10
  export declare function LdToolbar(props: LdToolbarProps): import("react/jsx-runtime").JSX.Element;
11
11
  export interface LaunchDarklyToolbarProps {
12
12
  baseUrl?: string;
13
+ authUrl?: string;
13
14
  devServerUrl?: string;
14
15
  projectKey?: string;
15
16
  flagOverridePlugin?: IFlagOverridePlugin;
@@ -5,6 +5,8 @@ interface SettingsTabContentProps {
5
5
  onToggleReloadOnFlagChange: () => void;
6
6
  isAutoCollapseEnabled: boolean;
7
7
  onToggleAutoCollapse: () => void;
8
+ optInToNewFeatures: boolean;
9
+ onToggleOptInToNewFeatures: () => void;
8
10
  }
9
11
  export declare function SettingsTabContent(props: SettingsTabContentProps): import("react/jsx-runtime").JSX.Element;
10
12
  export {};
@@ -0,0 +1 @@
1
+ export declare const iframeContainer: string;
@@ -0,0 +1,6 @@
1
+ interface AuthenticationModalProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ }
5
+ export declare function AuthenticationModal(props: AuthenticationModalProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -20,6 +20,8 @@ interface ExpandedToolbarContentProps {
20
20
  onHeaderMouseDown?: (event: React.MouseEvent) => void;
21
21
  reloadOnFlagChangeIsEnabled: boolean;
22
22
  onToggleReloadOnFlagChange: () => void;
23
+ optInToNewFeatures: boolean;
24
+ onToggleOptInToNewFeatures: () => void;
23
25
  }
24
26
  export declare const ExpandedToolbarContent: React.ForwardRefExoticComponent<ExpandedToolbarContentProps & React.RefAttributes<HTMLDivElement>>;
25
27
  export {};
@@ -0,0 +1,12 @@
1
+ export declare const selectContainer: string;
2
+ export declare const trigger: string;
3
+ export declare const disabled: string;
4
+ export declare const value: string;
5
+ export declare const placeholder: string;
6
+ export declare const icon: string;
7
+ export declare const iconOpen: string;
8
+ export declare const dropdown: string;
9
+ export declare const list: string;
10
+ export declare const option: string;
11
+ export declare const focused: string;
12
+ export declare const selected: string;
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SelectOption {
3
+ id: string;
4
+ label: string;
5
+ value?: any;
6
+ }
7
+ export interface SelectProps {
8
+ selectedKey?: string | null;
9
+ onSelectionChange?: (key: string | null) => void;
10
+ 'aria-label'?: string;
11
+ placeholder?: string;
12
+ 'data-theme'?: 'dark' | 'light';
13
+ className?: string;
14
+ isDisabled?: boolean;
15
+ children?: ReactNode;
16
+ options: SelectOption[];
17
+ }
18
+ export declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
@@ -11,6 +11,8 @@ interface TabContentRendererProps {
11
11
  onToggleReloadOnFlagChange: () => void;
12
12
  isAutoCollapseEnabled: boolean;
13
13
  onToggleAutoCollapse: () => void;
14
+ optInToNewFeatures: boolean;
15
+ onToggleOptInToNewFeatures: () => void;
14
16
  }
15
17
  export declare function TabContentRenderer(props: TabContentRendererProps): import("react/jsx-runtime").JSX.Element | null;
16
18
  export {};
@@ -0,0 +1,5 @@
1
+ interface IconProps {
2
+ className?: string;
3
+ }
4
+ export declare function PersonPassword({ className }: IconProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -12,3 +12,4 @@ export { CancelCircleIcon } from './CancelCircleIcon';
12
12
  export { CancelIcon } from './CancelIcon';
13
13
  export { StarIcon } from './StarIcon';
14
14
  export { StarOutlineIcon } from './StarOutlineIcon';
15
+ export { PersonPassword } from './PersonPassword';
@@ -0,0 +1,11 @@
1
+ interface ApiProviderContextValue {
2
+ getFlag: (flagKey: string) => Promise<any>;
3
+ }
4
+ export interface ApiProviderProps {
5
+ children: React.ReactNode;
6
+ }
7
+ export declare function ApiProvider({ children }: {
8
+ children: React.ReactNode;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export declare function useApi(): ApiProviderContextValue;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ type AuthProviderType = {
3
+ authenticated: boolean;
4
+ authenticating: boolean;
5
+ loading: boolean;
6
+ setAuthenticating: Dispatch<SetStateAction<boolean>>;
7
+ };
8
+ export declare function AuthProvider({ children }: {
9
+ children: React.ReactNode;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ export declare function useAuthContext(): AuthProviderType;
12
+ export {};
@@ -0,0 +1,24 @@
1
+ import { RefObject } from 'react';
2
+ export declare const IFRAME_API_MESSAGES: {
3
+ AUTHENTICATION: {
4
+ authenticated: string;
5
+ authenticationRequired: string;
6
+ error: string;
7
+ };
8
+ GET_FLAG: {
9
+ request: string;
10
+ response: string;
11
+ error: string;
12
+ };
13
+ };
14
+ interface IFrameProviderProps {
15
+ children: React.ReactNode;
16
+ authUrl: string;
17
+ }
18
+ type IFrameProviderType = {
19
+ ref: RefObject<HTMLIFrameElement | null>;
20
+ iframeSrc: string;
21
+ };
22
+ export declare function IFrameProvider({ children, authUrl }: IFrameProviderProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function useIFrameContext(): IFrameProviderType;
24
+ export {};
@@ -14,12 +14,14 @@ export interface UseToolbarStateReturn {
14
14
  hasBeenExpanded: boolean;
15
15
  reloadOnFlagChangeIsEnabled: boolean;
16
16
  isAutoCollapseEnabled: boolean;
17
+ optInToNewFeatures: boolean;
17
18
  toolbarRef: React.RefObject<HTMLDivElement | null>;
18
19
  handleTabChange: (tabId: string) => void;
19
20
  handleClose: () => void;
20
21
  handleSearch: (newSearchTerm: string) => void;
21
22
  handleToggleReloadOnFlagChange: () => void;
22
23
  handleToggleAutoCollapse: () => void;
24
+ handleToggleOptInToNewFeatures: () => void;
23
25
  handleCircleClick: () => void;
24
26
  setIsAnimating: Dispatch<SetStateAction<boolean>>;
25
27
  setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
@@ -3,12 +3,14 @@ export declare const TOOLBAR_STORAGE_KEYS: {
3
3
  readonly SETTINGS: "ld-toolbar-settings";
4
4
  readonly DISABLED: "ld-toolbar-disabled";
5
5
  readonly PROJECT: "ld-toolbar-project";
6
+ readonly OPT_IN_TO_NEW_FEATURES: "ld-toolbar-opt-in-to-new-features";
6
7
  readonly STARRED_FLAGS: "ld-toolbar-starred-flags";
7
8
  };
8
9
  export interface ToolbarSettings {
9
10
  position: ToolbarPosition;
10
11
  reloadOnFlagChange: boolean;
11
12
  autoCollapse: boolean;
13
+ optInToNewFeatures: boolean;
12
14
  }
13
15
  export declare const DEFAULT_SETTINGS: ToolbarSettings;
14
16
  export declare function saveToolbarPosition(position: ToolbarPosition): void;
@@ -17,5 +19,7 @@ export declare function saveToolbarAutoCollapse(autoCollapse: boolean): void;
17
19
  export declare function loadToolbarAutoCollapse(): boolean;
18
20
  export declare function saveReloadOnFlagChange(isReloadOnFlagChange: boolean): void;
19
21
  export declare function loadReloadOnFlagChange(): boolean;
22
+ export declare function saveOptInToNewFeatures(optInToNewFeatures: boolean): void;
23
+ export declare function loadOptInToNewFeatures(): boolean;
20
24
  export declare function loadStarredFlags(): Set<string>;
21
25
  export declare function saveStarredFlags(starredFlags: Set<string>): void;
@@ -0,0 +1,4 @@
1
+ export interface OAuthPopupOptions {
2
+ url: string;
3
+ }
4
+ export declare function openOAuthPopup(options: OAuthPopupOptions): Promise<string>;
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.2.0"
556
+ rE: "1.3.1"
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.2.0"
522
+ rE: "1.3.1"
523
523
  };
524
524
  function useLaunchDarklyToolbar(args) {
525
525
  const { toolbarBundleUrl, enabled, ...initConfig } = args;
@@ -7,6 +7,12 @@ export interface ToolbarConfig {
7
7
  * Default `https://app.launchdarkly.com`
8
8
  */
9
9
  baseUrl?: string;
10
+ /**
11
+ * The LaunchDarkly Auth URL the toolbar should use when authenticating.
12
+ *
13
+ * Default `https://integrations.launchdarkly.com`
14
+ */
15
+ authUrl?: string;
10
16
  /**
11
17
  * The Dev Server URL (if you have a local instance of LaunchDarkly running). If
12
18
  * provided, will set the toolbar to run in Dev Server mode.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@launchdarkly/toolbar",
4
- "version": "1.2.0",
4
+ "version": "1.3.1",
5
5
  "description": "A React component that provides a developer-friendly toolbar for interacting with LaunchDarkly during development",
6
6
  "keywords": [
7
7
  "launchdarkly",
@@ -57,28 +57,28 @@
57
57
  "@lezer/highlight": "^1.2.3",
58
58
  "@react-aria/focus": "^3.21.2",
59
59
  "@react-stately/flags": "^3.1.2",
60
- "@rsbuild/core": "^1.6.3",
60
+ "@rsbuild/core": "^1.6.6",
61
61
  "@rsbuild/plugin-react": "^1.4.2",
62
62
  "@rslib/core": "^0.17.0",
63
63
  "@storybook/addon-docs": "^10.0.7",
64
64
  "@storybook/addon-essentials": "^9.0.0-alpha.12",
65
65
  "@storybook/addon-interactions": "^9.0.0-alpha.10",
66
- "@storybook/addon-links": "^10.0.2",
67
- "@storybook/addon-onboarding": "^10.0.6",
66
+ "@storybook/addon-links": "^10.0.7",
67
+ "@storybook/addon-onboarding": "^10.0.7",
68
68
  "@storybook/blocks": "^9.0.0-alpha.17",
69
- "@storybook/react": "^10.0.4",
69
+ "@storybook/react": "^10.0.7",
70
70
  "@storybook/react-vite": "^9.0.5",
71
71
  "@storybook/test": "^9.0.0-alpha.2",
72
72
  "@tanstack/react-virtual": "^3.13.12",
73
73
  "@testing-library/jest-dom": "^6.9.1",
74
74
  "@testing-library/react": "^16.3.0",
75
- "@types/node": "^24.9.1",
76
- "@types/react": "19.2.2",
75
+ "@types/node": "^24.10.1",
76
+ "@types/react": "19.2.4",
77
77
  "@types/react-dom": "19.2.2",
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.5",
81
+ "@vitest/coverage-v8": "4.0.8",
82
82
  "css-loader": "^7.1.2",
83
83
  "jsdom": "^27.2.0",
84
84
  "launchdarkly-js-client-sdk": "^3.9.0",
@@ -88,7 +88,7 @@
88
88
  "react-dom": "^19.2.0",
89
89
  "storybook": "^9.1.16",
90
90
  "storybook-addon-rslib": "^2.1.4",
91
- "storybook-react-rsbuild": "^2.1.2",
91
+ "storybook-react-rsbuild": "^2.1.4",
92
92
  "typescript": "^5.9.3",
93
93
  "vitest": "^4.0.8"
94
94
  },