@launchdarkly/toolbar 0.16.0-beta.1 → 0.19.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/dist/js/index.js +410 -253
- package/dist/js/plugins/index.js +1 -1
- package/dist/types/events.d.ts +5 -1
- package/dist/ui/Toolbar/LaunchDarklyToolbar.d.ts +2 -0
- package/dist/ui/Toolbar/TabContent/EventsTabContent.css.d.ts +4 -0
- package/dist/ui/Toolbar/TabContent/EventsTabContent.d.ts +1 -0
- package/dist/ui/Toolbar/TabContent/FlagDevServerTabContent.css.d.ts +1 -0
- package/dist/ui/Toolbar/TabContent/SettingsTabContent.d.ts +2 -0
- package/dist/ui/Toolbar/components/ExpandedToolbarContent.d.ts +3 -0
- package/dist/ui/Toolbar/components/TabContentRenderer.d.ts +3 -0
- package/dist/ui/Toolbar/components/icons/AddIcon.d.ts +5 -0
- package/dist/ui/Toolbar/constants/virtualization.d.ts +1 -1
- package/dist/ui/Toolbar/hooks/useToolbarState.d.ts +2 -0
- package/dist/ui/Toolbar/utils/localStorage.d.ts +8 -1
- package/package.json +10 -10
package/dist/js/plugins/index.js
CHANGED
|
@@ -382,7 +382,7 @@ class EventInterceptionPlugin {
|
|
|
382
382
|
maxEvents: this.config.eventCapacity
|
|
383
383
|
});
|
|
384
384
|
const onNewEvent = (event)=>{
|
|
385
|
-
if (this.config.enableLogging) console.log(
|
|
385
|
+
if (this.config.enableLogging) console.log("\uD83C\uDFAF Event intercepted:", {
|
|
386
386
|
kind: event.kind,
|
|
387
387
|
key: event.key,
|
|
388
388
|
category: event.category,
|
package/dist/types/events.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export interface LDEvaluationReason {
|
|
2
|
+
readonly kind?: string;
|
|
3
|
+
readonly errorKind?: string;
|
|
4
|
+
}
|
|
1
5
|
export interface SyntheticEventContext {
|
|
2
6
|
readonly kind: EventKind;
|
|
3
7
|
readonly key?: string;
|
|
@@ -9,7 +13,7 @@ export interface SyntheticEventContext {
|
|
|
9
13
|
readonly value?: any;
|
|
10
14
|
readonly variation?: number | null;
|
|
11
15
|
readonly default?: any;
|
|
12
|
-
readonly reason?:
|
|
16
|
+
readonly reason?: LDEvaluationReason;
|
|
13
17
|
readonly version?: number;
|
|
14
18
|
readonly trackEvents?: boolean;
|
|
15
19
|
readonly debugEventsUntilDate?: number;
|
|
@@ -2,11 +2,13 @@ import { ToolbarMode, ToolbarPosition } from './types/toolbar';
|
|
|
2
2
|
import type { IEventInterceptionPlugin, IFlagOverridePlugin } from '../../types/plugin';
|
|
3
3
|
export interface LdToolbarProps {
|
|
4
4
|
mode: ToolbarMode;
|
|
5
|
+
baseUrl: string;
|
|
5
6
|
flagOverridePlugin?: IFlagOverridePlugin;
|
|
6
7
|
eventInterceptionPlugin?: IEventInterceptionPlugin;
|
|
7
8
|
}
|
|
8
9
|
export declare function LdToolbar(props: LdToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export interface LaunchDarklyToolbarProps {
|
|
11
|
+
baseUrl?: string;
|
|
10
12
|
devServerUrl?: string;
|
|
11
13
|
projectKey?: string;
|
|
12
14
|
flagOverridePlugin?: IFlagOverridePlugin;
|
|
@@ -5,6 +5,9 @@ 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
|
+
export declare const addButtonContainer: string;
|
|
10
|
+
export declare const addButton: string;
|
|
8
11
|
export declare const eventBadgeIdentify: string;
|
|
9
12
|
export declare const eventBadgeCustom: string;
|
|
10
13
|
export declare const eventBadgeDebug: string;
|
|
@@ -19,3 +22,4 @@ export declare const liveTailIndicator: string;
|
|
|
19
22
|
export declare const liveTailDot: string;
|
|
20
23
|
export declare const liveTailText: string;
|
|
21
24
|
export declare const liveTailSubtext: string;
|
|
25
|
+
export declare const eventListItem: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IEventInterceptionPlugin } from '../../../types/plugin';
|
|
2
2
|
interface EventsTabContentProps {
|
|
3
|
+
baseUrl: string;
|
|
3
4
|
eventInterceptionPlugin?: IEventInterceptionPlugin;
|
|
4
5
|
}
|
|
5
6
|
export declare function EventsTabContent(props: EventsTabContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type ToolbarMode } from '../types/toolbar';
|
|
2
2
|
interface SettingsTabContentProps {
|
|
3
3
|
mode: ToolbarMode;
|
|
4
|
+
isPinned: boolean;
|
|
5
|
+
onTogglePin: () => void;
|
|
4
6
|
}
|
|
5
7
|
export declare function SettingsTabContent(props: SettingsTabContentProps): import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export {};
|
|
@@ -9,9 +9,12 @@ interface ExpandedToolbarContentProps {
|
|
|
9
9
|
searchIsExpanded: boolean;
|
|
10
10
|
onSearch: (searchTerm: string) => void;
|
|
11
11
|
onClose: () => void;
|
|
12
|
+
onTogglePin: () => void;
|
|
13
|
+
isPinned: boolean;
|
|
12
14
|
onTabChange: (tabId: string) => void;
|
|
13
15
|
setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
|
|
14
16
|
mode: ToolbarMode;
|
|
17
|
+
baseUrl: string;
|
|
15
18
|
flagOverridePlugin?: IFlagOverridePlugin;
|
|
16
19
|
eventInterceptionPlugin?: IEventInterceptionPlugin;
|
|
17
20
|
}
|
|
@@ -2,10 +2,13 @@ import { TabId, ToolbarMode } from '../types';
|
|
|
2
2
|
import type { IFlagOverridePlugin, IEventInterceptionPlugin } from '../../../types/plugin';
|
|
3
3
|
interface TabContentRendererProps {
|
|
4
4
|
activeTab: TabId;
|
|
5
|
+
baseUrl: string;
|
|
5
6
|
slideDirection: number;
|
|
6
7
|
mode: ToolbarMode;
|
|
7
8
|
flagOverridePlugin?: IFlagOverridePlugin;
|
|
8
9
|
eventInterceptionPlugin?: IEventInterceptionPlugin;
|
|
10
|
+
isPinned: boolean;
|
|
11
|
+
onTogglePin: () => void;
|
|
9
12
|
}
|
|
10
13
|
export declare function TabContentRenderer(props: TabContentRendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
14
|
export {};
|
|
@@ -11,12 +11,14 @@ export interface UseToolbarStateReturn {
|
|
|
11
11
|
slideDirection: number;
|
|
12
12
|
hasBeenExpanded: boolean;
|
|
13
13
|
isDragModifierPressed: boolean;
|
|
14
|
+
isPinned: boolean;
|
|
14
15
|
toolbarRef: React.RefObject<HTMLDivElement | null>;
|
|
15
16
|
handleTabChange: (tabId: string) => void;
|
|
16
17
|
handleMouseEnter: () => void;
|
|
17
18
|
handleMouseLeave: () => void;
|
|
18
19
|
handleClose: () => void;
|
|
19
20
|
handleSearch: (newSearchTerm: string) => void;
|
|
21
|
+
handleTogglePin: () => void;
|
|
20
22
|
setIsAnimating: Dispatch<SetStateAction<boolean>>;
|
|
21
23
|
setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
|
|
22
24
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { ToolbarPosition } from '../types/toolbar';
|
|
2
2
|
export declare const TOOLBAR_STORAGE_KEYS: {
|
|
3
|
-
readonly
|
|
3
|
+
readonly SETTINGS: "ld-toolbar-settings";
|
|
4
4
|
readonly DISABLED: "ld-toolbar-disabled";
|
|
5
5
|
readonly PROJECT: "ld-toolbar-project";
|
|
6
6
|
};
|
|
7
|
+
export interface ToolbarSettings {
|
|
8
|
+
position: ToolbarPosition;
|
|
9
|
+
pinned: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_SETTINGS: ToolbarSettings;
|
|
7
12
|
export declare function saveToolbarPosition(position: ToolbarPosition): void;
|
|
8
13
|
export declare function loadToolbarPosition(): ToolbarPosition | null;
|
|
14
|
+
export declare function saveToolbarPinned(isPinned: boolean): void;
|
|
15
|
+
export declare function loadToolbarPinned(): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@launchdarkly/toolbar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0-beta.1",
|
|
4
4
|
"description": "A React component that provides a developer-friendly toolbar for interacting with LaunchDarkly during development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"launchdarkly",
|
|
@@ -49,7 +49,15 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@rsbuild/core": "1.5.4",
|
|
51
51
|
"@rsbuild/plugin-react": "^1.4.0",
|
|
52
|
-
"@rslib/core": "
|
|
52
|
+
"@rslib/core": "0.13.0",
|
|
53
|
+
"@storybook/addon-docs": "^9.0.5",
|
|
54
|
+
"@storybook/addon-essentials": "^9.0.0-alpha.12",
|
|
55
|
+
"@storybook/addon-interactions": "^9.0.0-alpha.10",
|
|
56
|
+
"@storybook/addon-links": "^9.0.5",
|
|
57
|
+
"@storybook/addon-onboarding": "^9.0.5",
|
|
58
|
+
"@storybook/blocks": "^9.0.0-alpha.17",
|
|
59
|
+
"@storybook/react": "^9.0.5",
|
|
60
|
+
"@storybook/test": "^9.0.0-alpha.2",
|
|
53
61
|
"@testing-library/jest-dom": "^6.6.3",
|
|
54
62
|
"@testing-library/react": "^16.3.0",
|
|
55
63
|
"@types/node": "^24.0.4",
|
|
@@ -63,14 +71,6 @@
|
|
|
63
71
|
"storybook": "^9.0.5",
|
|
64
72
|
"storybook-addon-rslib": "^2.0.0",
|
|
65
73
|
"storybook-react-rsbuild": "^2.0.0",
|
|
66
|
-
"@storybook/addon-docs": "^9.0.5",
|
|
67
|
-
"@storybook/addon-essentials": "^9.0.0-alpha.12",
|
|
68
|
-
"@storybook/addon-interactions": "^9.0.0-alpha.10",
|
|
69
|
-
"@storybook/addon-links": "^9.0.5",
|
|
70
|
-
"@storybook/addon-onboarding": "^9.0.5",
|
|
71
|
-
"@storybook/blocks": "^9.0.0-alpha.17",
|
|
72
|
-
"@storybook/react": "^9.0.5",
|
|
73
|
-
"@storybook/test": "^9.0.0-alpha.2",
|
|
74
74
|
"typescript": "^5.8.3",
|
|
75
75
|
"vitest": "^3.2.2",
|
|
76
76
|
"webpack": "5.101.3"
|