@launchdarkly/toolbar 0.24.0-beta.1 → 0.26.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.
- package/LICENSE +1 -1
- package/README.md +0 -2
- package/dist/js/index.js +671 -538
- package/dist/ui/Toolbar/TabContent/EventsTabContent.css.d.ts +0 -1
- package/dist/ui/Toolbar/TabContent/FlagDevServerTabContent.d.ts +5 -1
- package/dist/ui/Toolbar/TabContent/FlagSdkOverrideTabContent.d.ts +1 -0
- package/dist/ui/Toolbar/TabContent/SettingsTab.css.d.ts +1 -0
- package/dist/ui/Toolbar/TabContent/SettingsTabContent.d.ts +4 -2
- package/dist/ui/Toolbar/components/ExpandedToolbarContent.d.ts +4 -2
- package/dist/ui/Toolbar/components/IconLinkButton.d.ts +11 -0
- package/dist/ui/Toolbar/components/TabContentRenderer.d.ts +4 -2
- package/dist/ui/Toolbar/hooks/useToolbarState.d.ts +4 -2
- package/dist/ui/Toolbar/utils/localStorage.d.ts +6 -3
- package/dist/utils/analytics.d.ts +7 -3
- package/package.json +15 -15
|
@@ -5,7 +5,6 @@ export declare const eventName: string;
|
|
|
5
5
|
export declare const eventMeta: string;
|
|
6
6
|
export declare const eventBadge: string;
|
|
7
7
|
export declare const eventBadgeFeature: string;
|
|
8
|
-
export declare const eventBadgeFeatureNotFound: string;
|
|
9
8
|
export declare const addButtonContainer: string;
|
|
10
9
|
export declare const addButton: string;
|
|
11
10
|
export declare const eventBadgeIdentify: string;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
interface FlagDevServerTabContentProps {
|
|
2
|
+
reloadOnFlagChangeIsEnabled: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function FlagDevServerTabContent(props: FlagDevServerTabContentProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IFlagOverridePlugin } from '../../../types/plugin';
|
|
2
2
|
interface FlagSdkOverrideTabContentProps {
|
|
3
3
|
flagOverridePlugin?: IFlagOverridePlugin;
|
|
4
|
+
reloadOnFlagChangeIsEnabled: boolean;
|
|
4
5
|
}
|
|
5
6
|
export declare function FlagSdkOverrideTabContent(props: FlagSdkOverrideTabContentProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -4,6 +4,7 @@ export declare const switch_: string;
|
|
|
4
4
|
export declare const settingInfo: string;
|
|
5
5
|
export declare const settingDetails: string;
|
|
6
6
|
export declare const settingName: string;
|
|
7
|
+
export declare const settingDescription: string;
|
|
7
8
|
export declare const settingValue: string;
|
|
8
9
|
export declare const statusIndicator: string;
|
|
9
10
|
export declare const statusText: string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type ToolbarMode } from '../types/toolbar';
|
|
2
2
|
interface SettingsTabContentProps {
|
|
3
3
|
mode: ToolbarMode;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
reloadOnFlagChangeIsEnabled: boolean;
|
|
5
|
+
onToggleReloadOnFlagChange: () => void;
|
|
6
|
+
isAutoCollapseEnabled: boolean;
|
|
7
|
+
onToggleAutoCollapse: () => void;
|
|
6
8
|
}
|
|
7
9
|
export declare function SettingsTabContent(props: SettingsTabContentProps): import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -8,8 +8,8 @@ interface ExpandedToolbarContentProps {
|
|
|
8
8
|
searchIsExpanded: boolean;
|
|
9
9
|
onSearch: (searchTerm: string) => void;
|
|
10
10
|
onClose: () => void;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
onToggleAutoCollapse: () => void;
|
|
12
|
+
isAutoCollapseEnabled: boolean;
|
|
13
13
|
onTabChange: (tabId: string) => void;
|
|
14
14
|
setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
|
|
15
15
|
mode: ToolbarMode;
|
|
@@ -18,6 +18,8 @@ interface ExpandedToolbarContentProps {
|
|
|
18
18
|
flagOverridePlugin?: IFlagOverridePlugin;
|
|
19
19
|
eventInterceptionPlugin?: IEventInterceptionPlugin;
|
|
20
20
|
onHeaderMouseDown?: (event: React.MouseEvent) => void;
|
|
21
|
+
reloadOnFlagChangeIsEnabled: boolean;
|
|
22
|
+
onToggleReloadOnFlagChange: () => void;
|
|
21
23
|
}
|
|
22
24
|
export declare const ExpandedToolbarContent: React.ForwardRefExoticComponent<ExpandedToolbarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
25
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IconLinkButtonProps {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
label: string;
|
|
5
|
+
href: string;
|
|
6
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
7
|
+
className?: string;
|
|
8
|
+
size?: 'small' | 'medium' | 'large';
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function IconLinkButton(props: IconLinkButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,8 +7,10 @@ interface TabContentRendererProps {
|
|
|
7
7
|
mode: ToolbarMode;
|
|
8
8
|
flagOverridePlugin?: IFlagOverridePlugin;
|
|
9
9
|
eventInterceptionPlugin?: IEventInterceptionPlugin;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
reloadOnFlagChangeIsEnabled: boolean;
|
|
11
|
+
onToggleReloadOnFlagChange: () => void;
|
|
12
|
+
isAutoCollapseEnabled: boolean;
|
|
13
|
+
onToggleAutoCollapse: () => void;
|
|
12
14
|
}
|
|
13
15
|
export declare function TabContentRenderer(props: TabContentRendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
16
|
export {};
|
|
@@ -11,12 +11,14 @@ export interface UseToolbarStateReturn {
|
|
|
11
11
|
searchIsExpanded: boolean;
|
|
12
12
|
slideDirection: number;
|
|
13
13
|
hasBeenExpanded: boolean;
|
|
14
|
-
|
|
14
|
+
reloadOnFlagChangeIsEnabled: boolean;
|
|
15
|
+
isAutoCollapseEnabled: boolean;
|
|
15
16
|
toolbarRef: React.RefObject<HTMLDivElement | null>;
|
|
16
17
|
handleTabChange: (tabId: string) => void;
|
|
17
18
|
handleClose: () => void;
|
|
18
19
|
handleSearch: (newSearchTerm: string) => void;
|
|
19
|
-
|
|
20
|
+
handleToggleReloadOnFlagChange: () => void;
|
|
21
|
+
handleToggleAutoCollapse: () => void;
|
|
20
22
|
handleCircleClick: () => void;
|
|
21
23
|
setIsAnimating: Dispatch<SetStateAction<boolean>>;
|
|
22
24
|
setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
|
|
@@ -6,10 +6,13 @@ export declare const TOOLBAR_STORAGE_KEYS: {
|
|
|
6
6
|
};
|
|
7
7
|
export interface ToolbarSettings {
|
|
8
8
|
position: ToolbarPosition;
|
|
9
|
-
|
|
9
|
+
reloadOnFlagChange: boolean;
|
|
10
|
+
autoCollapse: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare const DEFAULT_SETTINGS: ToolbarSettings;
|
|
12
13
|
export declare function saveToolbarPosition(position: ToolbarPosition): void;
|
|
13
14
|
export declare function loadToolbarPosition(): ToolbarPosition | null;
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function saveToolbarAutoCollapse(autoCollapse: boolean): void;
|
|
16
|
+
export declare function loadToolbarAutoCollapse(): boolean;
|
|
17
|
+
export declare function saveReloadOnFlagChange(isReloadOnFlagChange: boolean): void;
|
|
18
|
+
export declare function loadReloadOnFlagChange(): boolean;
|
|
@@ -20,9 +20,9 @@ export declare class ToolbarAnalytics {
|
|
|
20
20
|
*/
|
|
21
21
|
trackPositionChange(oldPosition: string, newPosition: string, source: 'drag' | 'settings'): void;
|
|
22
22
|
/**
|
|
23
|
-
* Track toolbar
|
|
23
|
+
* Track toolbar auto-collapse toggle
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
trackAutoCollapseToggle(action: 'enable' | 'disable'): void;
|
|
26
26
|
/**
|
|
27
27
|
* Track toolbar tab navigation
|
|
28
28
|
*/
|
|
@@ -34,7 +34,7 @@ export declare class ToolbarAnalytics {
|
|
|
34
34
|
/**
|
|
35
35
|
* Track toolbar expand/collapse events
|
|
36
36
|
*/
|
|
37
|
-
trackToolbarToggle(action: 'expand' | 'collapse', trigger: 'close_button' | 'click_outside' | 'tab_toggle'): void;
|
|
37
|
+
trackToolbarToggle(action: 'expand' | 'collapse', trigger: 'close_button' | 'click_outside' | 'tab_toggle' | 'focus_lost'): void;
|
|
38
38
|
/**
|
|
39
39
|
* Track flag override events
|
|
40
40
|
*/
|
|
@@ -51,4 +51,8 @@ export declare class ToolbarAnalytics {
|
|
|
51
51
|
* Track Event clicks
|
|
52
52
|
*/
|
|
53
53
|
trackEventClick(eventName: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Track Reload on Flag Change toggles
|
|
56
|
+
*/
|
|
57
|
+
trackReloadOnFlagChangeToggle(enabled: boolean): void;
|
|
54
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@launchdarkly/toolbar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "A React component that provides a developer-friendly toolbar for interacting with LaunchDarkly during development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"launchdarkly",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"not IE 11"
|
|
48
48
|
],
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@rsbuild/core": "^1.5.
|
|
50
|
+
"@rsbuild/core": "^1.5.17",
|
|
51
51
|
"@rsbuild/plugin-react": "^1.4.1",
|
|
52
|
-
"@rslib/core": "^0.15.
|
|
52
|
+
"@rslib/core": "^0.15.1",
|
|
53
53
|
"@storybook/addon-docs": "^9.0.5",
|
|
54
54
|
"@storybook/addon-essentials": "^9.0.0-alpha.12",
|
|
55
55
|
"@storybook/addon-interactions": "^9.0.0-alpha.10",
|
|
@@ -58,22 +58,22 @@
|
|
|
58
58
|
"@storybook/blocks": "^9.0.0-alpha.17",
|
|
59
59
|
"@storybook/react": "^9.0.5",
|
|
60
60
|
"@storybook/test": "^9.0.0-alpha.2",
|
|
61
|
-
"@testing-library/jest-dom": "^6.
|
|
61
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
62
62
|
"@testing-library/react": "^16.3.0",
|
|
63
|
-
"@types/node": "^24.
|
|
63
|
+
"@types/node": "^24.7.2",
|
|
64
64
|
"@types/react": "^19.1.13",
|
|
65
65
|
"@vanilla-extract/vite-plugin": "^5.1.1",
|
|
66
66
|
"@vitest/coverage-v8": "3.2.4",
|
|
67
|
-
"jsdom": "^
|
|
67
|
+
"jsdom": "^27.0.0",
|
|
68
68
|
"launchdarkly-js-client-sdk": "^3.9.0",
|
|
69
|
-
"oxlint": "^1.
|
|
69
|
+
"oxlint": "^1.23.0",
|
|
70
70
|
"react": "^19.1.1",
|
|
71
|
-
"storybook": "^9.
|
|
71
|
+
"storybook": "^9.1.12",
|
|
72
72
|
"storybook-addon-rslib": "^2.0.0",
|
|
73
73
|
"storybook-react-rsbuild": "^2.0.0",
|
|
74
74
|
"typescript": "^5.8.3",
|
|
75
75
|
"vitest": "^3.2.2",
|
|
76
|
-
"webpack": "5.
|
|
76
|
+
"webpack": "5.102.1"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"launchdarkly-js-client-sdk": "^3.9.0",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@react-aria/focus": "3.21.
|
|
87
|
-
"@react-aria/interactions": "3.25.
|
|
86
|
+
"@react-aria/focus": "3.21.2",
|
|
87
|
+
"@react-aria/interactions": "3.25.6",
|
|
88
88
|
"@react-aria/utils": "3.30.1",
|
|
89
89
|
"@react-stately/utils": "3.10.8",
|
|
90
90
|
"@react-types/shared": "3.32.0",
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
"@vanilla-extract/css": "^1.17.4",
|
|
93
93
|
"@vanilla-extract/webpack-plugin": "^2.3.22",
|
|
94
94
|
"class-variance-authority": "^0.7.1",
|
|
95
|
-
"motion": "^12.
|
|
96
|
-
"react-aria": "3.
|
|
97
|
-
"react-aria-components": "1.
|
|
95
|
+
"motion": "^12.23.24",
|
|
96
|
+
"react-aria": "3.44.0",
|
|
97
|
+
"react-aria-components": "1.13.0",
|
|
98
98
|
"react-hook-form": "7.59.0",
|
|
99
|
-
"react-router": "7.
|
|
99
|
+
"react-router": "7.9.4"
|
|
100
100
|
},
|
|
101
101
|
"scripts": {
|
|
102
102
|
"build": "rslib build && node ../../scripts/fix-base-url.cjs dist/js/index.js",
|