@launchdarkly/toolbar 2.2.0-beta.1 → 2.4.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.
@@ -1,3 +1,5 @@
1
+ /*! js-cookie v3.0.5 | MIT */
2
+
1
3
  /**
2
4
  * @license React
3
5
  * react-dom-client.production.js
@@ -56,4 +58,16 @@
56
58
  *
57
59
  * This source code is licensed under the MIT license found in the
58
60
  * LICENSE file in the root directory of this source tree.
61
+ */
62
+
63
+ /**
64
+ * @preserve
65
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
66
+ *
67
+ * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
68
+ * @see http://github.com/homebrewing/brauhaus-diff
69
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
70
+ * @see http://github.com/garycourt/murmurhash-js
71
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
72
+ * @see http://sites.google.com/site/murmurhash/
59
73
  */
@@ -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 {};
@@ -1,3 +1,4 @@
1
+ export declare const container: string;
1
2
  export declare const statsHeader: string;
2
3
  export declare const statsText: string;
3
4
  export declare const eventInfo: string;
@@ -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;
@@ -1,7 +1,6 @@
1
- import { FlagsPaginationParams, FlagsResponse, ApiFlag, ProjectsResponse } from '../../types/ldApi';
1
+ import { FlagsPaginationParams, FlagsResponse, ProjectsResponse } from '../../types/ldApi';
2
2
  interface ApiProviderContextValue {
3
3
  apiReady: boolean;
4
- getFlag: (flagKey: string) => Promise<ApiFlag>;
5
4
  getProjects: () => Promise<ProjectsResponse>;
6
5
  getFlags: (projectKey: string, params?: FlagsPaginationParams) => Promise<FlagsResponse>;
7
6
  }
@@ -4,6 +4,7 @@ interface FlagsContextType {
4
4
  loading: boolean;
5
5
  getProjectFlags: (projectKey: string) => Promise<FlagsResponse>;
6
6
  resetFlags: () => void;
7
+ refreshFlags: () => Promise<void>;
7
8
  }
8
9
  export declare const FlagsProvider: ({ children }: {
9
10
  children: React.ReactNode;
@@ -20,6 +20,10 @@ export interface InternalClientContextValue {
20
20
  * Error during initialization, if any.
21
21
  */
22
22
  error: Error | null;
23
+ /**
24
+ * Update the client context with new member/account information.
25
+ */
26
+ updateContext: (accountId: string, memberId: string) => Promise<void>;
23
27
  }
24
28
  export interface InternalClientProviderProps {
25
29
  children: ReactNode;
@@ -52,6 +56,11 @@ export interface InternalClientProviderProps {
52
56
  * Set this if using a custom LaunchDarkly instance.
53
57
  */
54
58
  eventsUrl?: string;
59
+ /**
60
+ * Backend URL for Observability and Session Replay.
61
+ * Defaults to standard LaunchDarkly observability backend.
62
+ */
63
+ backendUrl?: string;
55
64
  }
56
65
  /**
57
66
  * InternalClientProvider manages the toolbar's internal LaunchDarkly client.
@@ -63,7 +72,7 @@ export interface InternalClientProviderProps {
63
72
  *
64
73
  * The external client (user's app client) is accessed separately via plugins.
65
74
  */
66
- export declare function InternalClientProvider({ children, clientSideId, initialContext, baseUrl, streamUrl, eventsUrl, }: InternalClientProviderProps): import("react/jsx-runtime").JSX.Element;
75
+ export declare function InternalClientProvider({ children, clientSideId, initialContext, baseUrl, streamUrl, eventsUrl, backendUrl, }: InternalClientProviderProps): import("react/jsx-runtime").JSX.Element;
67
76
  /**
68
77
  * Hook to access the internal LaunchDarkly client.
69
78
  */
@@ -5,6 +5,7 @@ interface TelemetryBundleProviderProps {
5
5
  clientSideId?: string;
6
6
  streamUrl?: string;
7
7
  eventsUrl?: string;
8
+ backendUrl?: string;
8
9
  children: React.ReactNode;
9
10
  }
10
11
  export declare function TelemetryBundleProvider(props: TelemetryBundleProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -7,7 +7,9 @@
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 useNewToolbarDesign: () => boolean;
11
- export declare const enableInteractiveIcon: () => boolean;
10
+ export declare const ENABLE_SESSION_REPLAY_FLAG_KEY = "toolbar-enable-session-replay";
12
11
  export declare const enableAiIcon: () => boolean;
12
+ export declare const enableInteractiveIcon: () => boolean;
13
13
  export declare const enableOptimizeIcon: () => boolean;
14
+ export declare const enableSessionReplay: () => boolean;
15
+ export declare const useNewToolbarDesign: () => boolean;
package/dist/index.cjs CHANGED
@@ -552,7 +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 = JSON.parse('{"rE":"2.2.0-beta.1"}');
555
+ var package_namespaceObject = JSON.parse('{"rE":"2.4.0-beta.1"}');
556
556
  function useLaunchDarklyToolbar(args) {
557
557
  const { toolbarBundleUrl, enabled, ...initConfig } = args;
558
558
  const configRef = (0, external_react_namespaceObject.useRef)(null);
@@ -591,7 +591,7 @@ exports.TOOLBAR_POSITIONS = __webpack_exports__.TOOLBAR_POSITIONS;
591
591
  exports.isValidEventCategory = __webpack_exports__.isValidEventCategory;
592
592
  exports.isValidEventKind = __webpack_exports__.isValidEventKind;
593
593
  exports.useLaunchDarklyToolbar = __webpack_exports__.useLaunchDarklyToolbar;
594
- for(var __webpack_i__ in __webpack_exports__)if (-1 === [
594
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
595
595
  "ANALYTICS_EVENT_PREFIX",
596
596
  "EventInterceptionPlugin",
597
597
  "FlagOverridePlugin",
@@ -599,7 +599,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
599
599
  "isValidEventCategory",
600
600
  "isValidEventKind",
601
601
  "useLaunchDarklyToolbar"
602
- ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
602
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
603
603
  Object.defineProperty(exports, '__esModule', {
604
604
  value: true
605
605
  });
package/dist/js/index.js CHANGED
@@ -518,7 +518,7 @@ async function lazyLoad(signal, url) {
518
518
  throw new Error(`Could not load LaunchDarkly developer toolbar bundle from ${url}`);
519
519
  }
520
520
  }
521
- var package_namespaceObject = JSON.parse('{"rE":"2.2.0-beta.1"}');
521
+ var package_namespaceObject = JSON.parse('{"rE":"2.4.0-beta.1"}');
522
522
  function useLaunchDarklyToolbar(args) {
523
523
  const { toolbarBundleUrl, enabled, ...initConfig } = args;
524
524
  const configRef = useRef(null);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@launchdarkly/toolbar",
4
- "version": "2.2.0-beta.1",
4
+ "version": "2.4.0-beta.1",
5
5
  "description": "A framework-agnostic developer toolbar for interacting with LaunchDarkly during development",
6
6
  "keywords": [
7
7
  "launchdarkly",
@@ -54,43 +54,45 @@
54
54
  "@codemirror/lint": "^6.9.2",
55
55
  "@codemirror/state": "^6.5.2",
56
56
  "@codemirror/view": "^6.38.8",
57
+ "@launchdarkly/observability": "^0.4.9",
58
+ "@launchdarkly/session-replay": "^0.4.9",
57
59
  "@launchpad-ui/components": "^0.17.7",
58
60
  "@launchpad-ui/tokens": "^0.15.1",
59
61
  "@lezer/highlight": "^1.2.3",
60
62
  "@react-aria/focus": "^3.21.2",
61
63
  "@react-stately/flags": "^3.1.2",
62
- "@rsbuild/core": "^1.6.9",
64
+ "@rsbuild/core": "^1.6.14",
63
65
  "@rsbuild/plugin-react": "^1.4.2",
64
- "@rslib/core": "^0.18.0",
65
- "@storybook/addon-docs": "^10.0.8",
66
+ "@rslib/core": "^0.18.4",
67
+ "@storybook/addon-docs": "^10.1.5",
66
68
  "@storybook/addon-essentials": "^9.0.0-alpha.12",
67
69
  "@storybook/addon-interactions": "^9.0.0-alpha.10",
68
- "@storybook/addon-links": "^10.0.8",
69
- "@storybook/addon-onboarding": "^10.0.8",
70
+ "@storybook/addon-links": "^10.1.7",
71
+ "@storybook/addon-onboarding": "^10.1.7",
70
72
  "@storybook/blocks": "^9.0.0-alpha.17",
71
73
  "@storybook/react": "^10.0.8",
72
- "@storybook/react-vite": "^10.0.8",
74
+ "@storybook/react-vite": "^10.1.7",
73
75
  "@storybook/test": "^9.0.0-alpha.2",
74
- "@tanstack/react-virtual": "^3.13.12",
76
+ "@tanstack/react-virtual": "^3.13.13",
75
77
  "@testing-library/jest-dom": "^6.9.1",
76
78
  "@testing-library/react": "^16.3.0",
77
- "@types/node": "^24.10.1",
78
- "@types/react": "19.2.6",
79
+ "@types/node": "^25.0.1",
80
+ "@types/react": "19.2.7",
79
81
  "@types/react-dom": "19.2.3",
80
- "@vanilla-extract/css": "^1.17.4",
81
- "@vanilla-extract/vite-plugin": "^5.1.1",
82
+ "@vanilla-extract/css": "^1.17.5",
83
+ "@vanilla-extract/vite-plugin": "^5.1.3",
82
84
  "@vanilla-extract/webpack-plugin": "^2.3.24",
83
85
  "@vitest/coverage-v8": "4.0.15",
84
86
  "css-loader": "^7.1.2",
85
87
  "jsdom": "^27.2.0",
86
88
  "launchdarkly-js-client-sdk": "^3.9.0",
87
- "motion": "^12.23.25",
88
- "oxlint": "^1.30.0",
89
- "react": "^19.2.0",
90
- "react-dom": "^19.2.0",
89
+ "motion": "^12.23.26",
90
+ "oxlint": "^1.32.0",
91
+ "react": "^19.2.1",
92
+ "react-dom": "^19.2.1",
91
93
  "storybook": "^10.1.4",
92
- "storybook-addon-rslib": "^2.1.6",
93
- "storybook-react-rsbuild": "^2.1.6",
94
+ "storybook-addon-rslib": "^3.1.0",
95
+ "storybook-react-rsbuild": "^3.1.0",
94
96
  "typescript": "^5.9.3",
95
97
  "vitest": "^4.0.15"
96
98
  },