@launchdarkly/toolbar 0.19.0-beta.1 → 0.22.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.
Files changed (31) hide show
  1. package/README.md +8 -8
  2. package/dist/index.d.ts +1 -0
  3. package/dist/js/index.js +790 -535
  4. package/dist/js/plugins/index.js +13 -1
  5. package/dist/plugins/EventInterceptionPlugin.d.ts +4 -1
  6. package/dist/tests/plugins/EventInterceptionPlugin.test.d.ts +1 -0
  7. package/dist/types/plugin.d.ts +5 -0
  8. package/dist/ui/Toolbar/Header/Header.d.ts +1 -0
  9. package/dist/ui/Toolbar/Header/components/LogoSection.d.ts +6 -1
  10. package/dist/ui/Toolbar/LaunchDarklyToolbar.css.d.ts +4 -2
  11. package/dist/ui/Toolbar/TabContent/SettingsTab.css.d.ts +1 -0
  12. package/dist/ui/Toolbar/components/CircleLogo.d.ts +3 -2
  13. package/dist/ui/Toolbar/components/ExpandedToolbarContent.d.ts +4 -3
  14. package/dist/ui/Toolbar/components/icons/ChevronUpIcon.d.ts +5 -0
  15. package/dist/ui/Toolbar/components/icons/LaunchDarklyLogo.d.ts +6 -0
  16. package/dist/ui/Toolbar/components/icons/index.d.ts +1 -0
  17. package/dist/ui/Toolbar/constants/animations.d.ts +68 -26
  18. package/dist/ui/Toolbar/context/AnalyticsProvider.d.ts +9 -0
  19. package/dist/ui/Toolbar/context/DevServerProvider.d.ts +0 -4
  20. package/dist/ui/Toolbar/context/ToolbarUIProvider.d.ts +13 -0
  21. package/dist/ui/Toolbar/context/index.d.ts +2 -0
  22. package/dist/ui/Toolbar/hooks/index.d.ts +0 -1
  23. package/dist/ui/Toolbar/hooks/useToolbarAnimations.d.ts +6 -3
  24. package/dist/ui/Toolbar/hooks/useToolbarDrag.d.ts +2 -1
  25. package/dist/ui/Toolbar/hooks/useToolbarState.d.ts +5 -6
  26. package/dist/ui/Toolbar/types/toolbar.d.ts +1 -1
  27. package/dist/utils/analytics.d.ts +54 -0
  28. package/package.json +1 -1
  29. package/dist/static/font/Audimat3000-Regulier.var-subset.woff2 +0 -0
  30. package/dist/static/font/Inter.var-subset.woff2 +0 -0
  31. package/dist/ui/Toolbar/hooks/useKeyPressed.d.ts +0 -1
package/dist/js/index.js CHANGED
@@ -1,46 +1,9 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { AnimatePresence, motion } from "motion/react";
3
- import react, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
3
+ import react, { createContext, forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
4
4
  import { Button, Group, Input, ListBox, ListBoxItem, Popover, SearchField, Select, SelectValue, Switch, TextField } from "@launchpad-ui/components";
5
5
  import { useVirtualizer } from "@tanstack/react-virtual";
6
6
  var __webpack_modules__ = {
7
- "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@launchpad-ui+tokens@0.15.0/node_modules/@launchpad-ui/tokens/dist/fonts.css": function(module, __webpack_exports__, __webpack_require__) {
8
- __webpack_require__.d(__webpack_exports__, {
9
- A: ()=>__WEBPACK_DEFAULT_EXPORT__
10
- });
11
- var _rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
12
- var _rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
13
- var _rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/api.js");
14
- var _rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
15
- var _rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/getUrl.js");
16
- var _rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/ __webpack_require__.n(_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
17
- var ___CSS_LOADER_URL_IMPORT_0___ = new URL(__webpack_require__("../../node_modules/.pnpm/@launchpad-ui+tokens@0.15.0/node_modules/@launchpad-ui/tokens/dist/assets/Audimat3000-Regulier.var-subset.woff2"), __webpack_require__.b);
18
- var ___CSS_LOADER_URL_IMPORT_1___ = new URL(__webpack_require__("../../node_modules/.pnpm/@launchpad-ui+tokens@0.15.0/node_modules/@launchpad-ui/tokens/dist/assets/Inter.var-subset.woff2"), __webpack_require__.b);
19
- var ___CSS_LOADER_EXPORT___ = _rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
20
- var ___CSS_LOADER_URL_REPLACEMENT_0___ = _rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
21
- var ___CSS_LOADER_URL_REPLACEMENT_1___ = _rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___);
22
- ___CSS_LOADER_EXPORT___.push([
23
- module.id,
24
- `@font-face {
25
- font-family: "Audimat 3000 Regulier";
26
- font-style: normal;
27
- font-weight: 400;
28
- src: url(${___CSS_LOADER_URL_REPLACEMENT_0___}) format("woff2");
29
- font-display: swap;
30
- }
31
-
32
- @font-face {
33
- font-family: Inter;
34
- font-style: normal;
35
- font-weight: 300 800;
36
- src: url(${___CSS_LOADER_URL_REPLACEMENT_1___}) format("woff2");
37
- font-display: swap;
38
- }
39
- `,
40
- ""
41
- ]);
42
- const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
43
- },
44
7
  "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@launchpad-ui+tokens@0.15.0/node_modules/@launchpad-ui/tokens/dist/index.css": function(module, __webpack_exports__, __webpack_require__) {
45
8
  __webpack_require__.d(__webpack_exports__, {
46
9
  A: ()=>__WEBPACK_DEFAULT_EXPORT__
@@ -629,7 +592,7 @@ var __webpack_modules__ = {
629
592
  ]);
630
593
  const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
631
594
  },
632
- "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/Header/Header.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA61V227jIBB9z1eMKq2USEuF0zRNyON+yArb2KbFgAA3zq767yuwvdiJm6ZqX5LAHOZyZubk/ve+qfb0GcPfBUDOrRb0RKA0PD8sIHwjx2otqGMoU6KppSVAG6cgKUz4cYmjhlFL4E6oUkHGpGMGaOa4kvbOo6ngpUTcsdqS3u6vNc1zLksCGHa6BQzJVrfekNLspTSqkblPQRkCr9QsERK6O6PS0BPaY7wKaGVyZlCqnFM1gUS3YJXg+eyjp+kjQ3PeWALJWrfdBwbs7TWXqGK8rByBxz6tkuoOeVi8Le57IpNAZODD00DAk3AYc1sI1l5hIXjdTZ2ug9Mjz11FYP3YhR/SGXqg0meWOVRwRyBT0lEu/XXBhWOGQGo8XDJrl3gFXL4y45bJahzmIYQplHTI8j+MQLLpQoWrYx9viwMjVzqx6UkNzwpac3EaAUe3KKWWBeix4o4hq2nGCEh1NFSPM9ucsxr5uuD1ubGOFyfkOWDSjbHvUO6b25PbNZu2wznB+Mc4kceQyG0DuZufrb598w9TQ73TE5WRm/8VpkJlL7cRWyupApuxEX1LcRdevTJTCHUkUPE8Z3KygBvddiMI4FjrUAQzIbi23L7bsxn2eieB/Eh75HR73txeKz69NXi6NU9TTfvAw7tjEx3uvtvh/myaPI2SxZmJ56wx1o+LVvxCLgeVnI5Zf/vlbAGcodJy3xLSTS3g+7UFRi37ebEK0TYplFR+hkK5VzZmPWzMJ/YrBqGdfHEhrslSxKcBP8jow3Y6PVmw9iQj04HwV5U8Hyv5sB4fSml8z26qMUbYTv8rkrMii8t0orGcy3Vmu+ek5HZVjvGqSbzZzIfSs8YYJt0vX/hh8fYPBfEjJ8YIAAA=\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js": function(module, __webpack_exports__, __webpack_require__) {
595
+ "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/Header/Header.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA62V227jIBBA3/MVo0ortdJS4TRJE/K4H7LCNrZpMSDAjbOr/vsKbC924qSp2pckMMNczlzy+HvXVDv6guHvAiDnVgt6JFAanu8XEL6RY7UW1DGUKdHU0hKgjVOQFCb8ONejhlFL4E6oUkHGpGMGaOa4kvbOa1PBS4m4Y7Ulvdxfa5rnXJYEMGx1CxiSjW69IKXZa2lUI3MfgjIE3qi5R0jo7oxKQ49oh/FD0FYmZwalyjlVE0h0C1YJns8+ep4+MjTnjSWQLHXbfWDAXl5ziSrGy8oRWPdhlVR3mvvF++KxB5kEkIGHx0DAQ9iP2RaCtVcoBKvbqdFlMHrguasIJOtV53+IZyiCSl9Y5lDBHYFMSUe59NcFF44ZAqnx6pJZe48fgMs3Ztx98jD28xT8FEo6ZPkfRiDpXYWrQ+9vgwOSK6VY9VTDs4LWXBxHiqNblFLLguqh4o4hq2nGCEh1MFSPI1udYo3AzsC+NNbx4og8AybdWPcCc1/dnm5XbdoO5wTjH+NA1iGQ2zpyO99c647p/MPUUG/0SGVk8z/DVKjs9TawtZIq0IyF6EuKO/fqjZlCqAOBiuc5k5MJXOm260EAx1qHojITgmvL7cWazdDrjQT4EXtkujktbr8sPj02eDo2z9Ol9oGFi20TDW6/2+DupJs8Rsliz8Rz1hjr20UrfrYvhzU5bbP+9svRAjhDpeW+JKTrWsCPSwuMWvbzbBSibJIoqXwPhXSvTMxymJhPzFd0Qrv1xYW4tpaifhr0hzX6tJl2TxakPWRkOiX81VWeT1Z5Px4frtL4nt2UY/Swmf5XJCdJFufhRGE5F+vMdM+tktu3cvRXTfzNRj6knjXGMOl++cT3i/d/eH3aB8cIAAA=\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js": function(module, __webpack_exports__, __webpack_require__) {
633
596
  __webpack_require__.d(__webpack_exports__, {
634
597
  A: ()=>__WEBPACK_DEFAULT_EXPORT__
635
598
  });
@@ -663,7 +626,7 @@ var __webpack_modules__ = {
663
626
  ._9uh9aj2 {
664
627
  object-fit: contain;
665
628
  filter: brightness(0) invert();
666
- width: 25px;
629
+ width: 154px;
667
630
  height: auto;
668
631
  }
669
632
 
@@ -777,7 +740,7 @@ var __webpack_modules__ = {
777
740
  ]);
778
741
  const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
779
742
  },
780
- "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/LaunchDarklyToolbar.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA61U227jIBB9z1fMy0rJAxVOk17Ix1QYsD0NBgQ4tbvqv6/AdhJvslJ3tQ+2NPjMzDlnGD+8FWYncBgo/FwBOBswojUMKuyVPKwAShujbRlsqetT/EnQSNUzKCilGcDFsfa2M5IIq61ncOJ+TYh2Y0xqzwfySulmLOel8gwK10OwGuVd9POEtiflK20/GDQopTLpTHQ+pC7OoonKpyOJwWk+MKi0yiS5xtoQjKoNDISace9diFgNRFgTlYmXT1+rh9mIIhvhsW7iRXT03ITK+pZYjzUaNtky4hb525yvVfWd9ARbZD/m7BuJV4jdAiFVxTsdU5OknUj0SowTFFZ3rblxI0Svomju2pFLhMj9ktT+t7vBy2B1F1WWZh2DPf1xOIuegg+UsWHwNFnQqNHROf6fI3vK/KaGj7tlwzm25bsSkVSYalgTOWZvKtQx3ccyT9KoENZ0A2hOysd1sTkbGxqP5siALsiX2orjgsvzNZeCjl7ciP3TrK4KveRCf7dc99ZlXDjiucQuMCi2rh9fNGm5aviaG7ZoyGzdbp+HdYXhGfPd2TkuJZqawYvr0/Ovf4szeQr0ImBBrMzEEh8GxWH19QulZ2na2AQAAA==\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js": function(module, __webpack_exports__, __webpack_require__) {
743
+ "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/LaunchDarklyToolbar.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA61UwY7aMBC98xW+VIKDVw6FwpqPqRzbSWYxnsiesKHV/ntlB1gC2Wq76nHGz2/ezBv76WfhVxpOJ8F+zxhrMQIBeskq6K3ZzRj7xcEb20u2LFablRCFECldKr2vA3becI0Og2RHFeacu3aIeR3UiT8LschoDMYGyYq2ZxEdmEn05ozGow2Vw1fJGjDG+pTTXYipSovgyYaUMhBbp06SVc72KaEc1J4D2UOUTNsL7qWLBNWJa/RkPb0fvc2eLu0Xuf0AdUOSLUXbD6qJ8PAeU1A+VhgOHAPU4OUZMdwb8S0zn7PVV+jStRHb9yl1hO3fuAjbCV2rCV2fIHpQtM48D6bcIH6MEMZWqnOUKiS3uIFg9bBpGl138A/+RQqWdDNpYKaIpMJY1OZuh1UZ0XVkr02uxbfdtf1z8AqGGslW26H/xg5TvsT/c8m2Wd+54PKu4CXG8sVq4hUkDvSkIM+mAkfpBZXZU29jnIsFA3+0gebF4jrY2ATwe8nESHzpUO9HWp5vtRRimMVDsx95dUOkMtG/fQdTD3z4InhQBrooWbFM47ipU+Y6B/D8atFa3GF0xnzWslYZA76WbNv27Dz9r3xrH2s2WU+SIVmxm739AZDPMzZuBQAA\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js": function(module, __webpack_exports__, __webpack_require__) {
781
744
  __webpack_require__.d(__webpack_exports__, {
782
745
  A: ()=>__WEBPACK_DEFAULT_EXPORT__
783
746
  });
@@ -789,7 +752,7 @@ var __webpack_modules__ = {
789
752
  ___CSS_LOADER_EXPORT___.push([
790
753
  module.id,
791
754
  `._1n4ciyy0 {
792
- z-index: 1000;
755
+ z-index: 2147400100;
793
756
  background-color: var(--lp-color-gray-900);
794
757
  border: 1px solid var(--lp-color-gray-700);
795
758
  cursor: pointer;
@@ -797,76 +760,89 @@ var __webpack_modules__ = {
797
760
  align-items: center;
798
761
  display: flex;
799
762
  position: fixed;
800
- bottom: 20px;
801
763
  overflow: hidden;
802
764
  }
803
765
 
804
766
  ._1n4ciyy1 {
805
767
  transform-origin: 100% 100%;
768
+ bottom: 20px;
806
769
  right: 20px;
807
770
  }
808
771
 
809
772
  ._1n4ciyy2 {
810
773
  transform-origin: 0 100%;
774
+ bottom: 20px;
811
775
  left: 20px;
812
776
  }
813
777
 
814
778
  ._1n4ciyy3 {
815
- cursor: pointer;
779
+ transform-origin: 100% 0;
780
+ top: 20px;
781
+ right: 20px;
816
782
  }
817
783
 
818
784
  ._1n4ciyy4 {
785
+ transform-origin: 0 0;
786
+ top: 20px;
787
+ left: 20px;
788
+ }
789
+
790
+ ._1n4ciyy5 {
791
+ cursor: pointer;
792
+ }
793
+
794
+ ._1n4ciyy6 {
819
795
  cursor: default;
820
796
  flex-direction: column;
821
797
  justify-content: flex-start;
822
798
  align-items: stretch;
823
799
  }
824
800
 
825
- ._1n4ciyy5 {
801
+ ._1n4ciyy7 {
826
802
  justify-content: center;
827
803
  align-items: center;
828
- width: 60px;
829
- height: 60px;
804
+ width: 48px;
805
+ height: 48px;
830
806
  display: flex;
831
807
  position: absolute;
832
808
  top: 50%;
833
809
  left: 50%;
834
810
  }
835
811
 
836
- ._1n4ciyy6 {
812
+ ._1n4ciyy8 {
837
813
  object-fit: contain;
838
814
  filter: brightness(0) invert();
839
815
  flex-shrink: 0;
840
- width: 34px;
841
- height: 34px;
816
+ width: 28px;
817
+ height: 28px;
842
818
  display: block;
843
819
  }
844
820
 
845
- ._1n4ciyy7 {
821
+ ._1n4ciyy9 {
846
822
  flex-direction: column;
847
823
  width: 100%;
848
824
  display: flex;
849
825
  }
850
826
 
851
- ._1n4ciyy8 {
827
+ ._1n4ciyya {
852
828
  background-color: var(--lp-color-gray-900);
853
- border-radius: 12px 12px 0 0;
829
+ border-radius: 12px;
854
830
  overflow: hidden;
855
831
  }
856
832
 
857
- ._1n4ciyy9 {
833
+ ._1n4ciyyb {
858
834
  min-height: 450px;
859
835
  }
860
836
 
861
- ._1n4ciyya {
837
+ ._1n4ciyyc {
862
838
  background-color: var(--lp-color-gray-900);
863
- border-radius: 0 0 12px 12px;
839
+ border-radius: 12px;
864
840
  align-items: center;
865
841
  padding: 8px;
866
842
  display: flex;
867
843
  }
868
844
 
869
- ._1n4ciyyb {
845
+ ._1n4ciyyd {
870
846
  flex: 1;
871
847
  }
872
848
  `,
@@ -1203,7 +1179,7 @@ var __webpack_modules__ = {
1203
1179
  ]);
1204
1180
  const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
1205
1181
  },
1206
- "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/TabContent/SettingsTab.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA6VUQXLbMAy8+xU4Ngd6JMVxXPrYh2RoEZLQUCSHhCy5nfw9Q9pO5NhpM+3JowWxCywAL5/KsmEb9wX8XgDsXNAYxM4xu15C6SeIzpCGvQrfhDBe1M64INqgDmJTFHfbxcti+cYhjYos6o6MvkVnncWLhDK/6lVoyUootgsAr7Qm20oo136CqvATbPyUIo2zLCL9QgllNYNGpLZjCesiE+QC5c2CV7lgAMaJBQdlY+NCL2HwHkOtIqagQWYMInpV5zqK5UMSm1Vd5aobg5OEMqVoit6og8xYApSh1gpi7KOEGi1jSPDPITI1B1E7y2hZQhJBsUMeEW160Sp/7m4meJ8Fr1TSr9AUsGZyVqbOh/6d5iPL6lj2zMXVDRdXf3Wx+jj2hyvi03i+MIqc1aiezGH2cIaK3lmXfboUXd/25BPnsyGnPbqaQvYRrb7gf/yHpu7/t6lNFh1Jc3c8gMTWnSZz/m7IGAn1EAJa/pHU35YhdoHsc76kGev34y2q+rkNbrBaQt59rxJByu3JirNouriMqemMVcUJ+4OGyhpuj6ExbpTQkdbHlc7H9h5AY8hHiik0dsSYLw3Tn8MYlN/OL+vlFZtcuVWeBAAA\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js": function(module, __webpack_exports__, __webpack_require__) {
1182
+ "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/TabContent/SettingsTab.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA6VUy3LbMAy8+ytwbA/0SIrjOvSxH5KhRUhCQ5EcErbkdPLvHdKPyI+kmfakEUDurhZYzZ/LsmEbdwX8ngFsXNAYxMYxu15C6UeIzpCGnQrfhDBe1M64INqg9mJVFN/Xs7fZ/IwhjYos6o6MvgdnncWLC2U+1avQkpVQrGcAXmlNtpVQLv0IVeFHWPkxdRpnWUR6RQllNSkNSG3HEpZFBsgC5V3BiywYgHFkwUHZ2LjQS9h6j6FWEVPTIDMGEb2qs45i/pjIJqqrrPqOnI2qX9rgtlaLT1Q8Xdv2cMAzOEooE46m6I3ay1xLBWWotYIY+yihRssYUvnXNjI1e1E7y2hZQhKNYoM8INp0olX+JG9CuMiENyzpKTQFrJmclcnJbf8Oc43yeGPD4s5UFn+dSnXtx/Ijf78w2nyrUT2Z/eTgpCp6Z1326ZL0x31PPnA+G3Lcy5spZB/R6gv81T981MP/ftRTJh1Ic3cIVELrjpM5vTdkjIR6GwJa/pnYz8sQu0D2JSdzgqoO2T4vu4ScJa8SQLrbkxUn0pTgXFPjqVYVx9onHJvM4XYYGuMGCR1pfVjpHN73BhpDPlJMraEjxpxcTD+bISi/nibr7Q/GMgCb7gQAAA==\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js": function(module, __webpack_exports__, __webpack_require__) {
1207
1183
  __webpack_require__.d(__webpack_exports__, {
1208
1184
  A: ()=>__WEBPACK_DEFAULT_EXPORT__
1209
1185
  });
@@ -1233,6 +1209,11 @@ var __webpack_modules__ = {
1233
1209
  }
1234
1210
 
1235
1211
  ._11ftnsv2 {
1212
+ background-color: var(--lp-color-gray-900);
1213
+ font-size: 12px;
1214
+ }
1215
+
1216
+ ._11ftnsv3 {
1236
1217
  flex: 1;
1237
1218
  justify-content: space-between;
1238
1219
  align-items: center;
@@ -1240,52 +1221,52 @@ var __webpack_modules__ = {
1240
1221
  display: flex;
1241
1222
  }
1242
1223
 
1243
- ._11ftnsv3 {
1224
+ ._11ftnsv4 {
1244
1225
  flex-direction: column;
1245
1226
  gap: 2px;
1246
1227
  display: flex;
1247
1228
  }
1248
1229
 
1249
- ._11ftnsv4 {
1230
+ ._11ftnsv5 {
1250
1231
  color: var(--lp-color-gray-200);
1251
1232
  font-size: 14px;
1252
1233
  font-weight: 400;
1253
1234
  }
1254
1235
 
1255
- ._11ftnsv5 {
1236
+ ._11ftnsv6 {
1256
1237
  color: var(--lp-color-gray-400);
1257
1238
  font-size: 12px;
1258
1239
  font-family: var(--lp-font-family-monospace);
1259
1240
  }
1260
1241
 
1261
- ._11ftnsv6 {
1242
+ ._11ftnsv7 {
1262
1243
  justify-content: flex-end;
1263
1244
  align-items: center;
1264
1245
  gap: 8px;
1265
1246
  display: flex;
1266
1247
  }
1267
1248
 
1268
- ._11ftnsv7 {
1249
+ ._11ftnsv8 {
1269
1250
  color: var(--lp-color-gray-300);
1270
1251
  font-size: 12px;
1271
1252
  font-family: var(--lp-font-family-monospace);
1272
1253
  }
1273
1254
 
1274
- ._11ftnsv8 {
1255
+ ._11ftnsv9 {
1275
1256
  fill: currentColor;
1276
1257
  flex-shrink: 0;
1277
1258
  width: 16px;
1278
1259
  height: 16px;
1279
1260
  }
1280
1261
 
1281
- ._11ftnsv9 {
1262
+ ._11ftnsva {
1282
1263
  background: none;
1283
1264
  flex-shrink: 0;
1284
1265
  min-width: 120px;
1285
1266
  max-width: 200px;
1286
1267
  }
1287
1268
 
1288
- ._11ftnsva {
1269
+ ._11ftnsvb {
1289
1270
  text-overflow: ellipsis;
1290
1271
  white-space: nowrap;
1291
1272
  flex: 1;
@@ -1880,14 +1861,27 @@ var __webpack_modules__ = {
1880
1861
  var _node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
1881
1862
  var _node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_index_js_ruleSet_1_rules_2_use_1_builtin_lightningcss_loader_ruleSet_1_rules_2_use_2_node_modules_pnpm_launchpad_ui_tokens_0_15_0_node_modules_launchpad_ui_tokens_dist_index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@launchpad-ui+tokens@0.15.0/node_modules/@launchpad-ui/tokens/dist/index.css");
1882
1863
  var _node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_index_js_ruleSet_1_rules_2_use_1_builtin_lightningcss_loader_ruleSet_1_rules_2_use_2_node_modules_pnpm_launchpad_ui_tokens_0_15_0_node_modules_launchpad_ui_tokens_dist_themes_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@launchpad-ui+tokens@0.15.0/node_modules/@launchpad-ui/tokens/dist/themes.css");
1883
- var _node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_index_js_ruleSet_1_rules_2_use_1_builtin_lightningcss_loader_ruleSet_1_rules_2_use_2_node_modules_pnpm_launchpad_ui_tokens_0_15_0_node_modules_launchpad_ui_tokens_dist_fonts_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@launchpad-ui+tokens@0.15.0/node_modules/@launchpad-ui/tokens/dist/fonts.css");
1884
1864
  var ___CSS_LOADER_EXPORT___ = _node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
1885
1865
  ___CSS_LOADER_EXPORT___.i(_node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_index_js_ruleSet_1_rules_2_use_1_builtin_lightningcss_loader_ruleSet_1_rules_2_use_2_node_modules_pnpm_launchpad_ui_tokens_0_15_0_node_modules_launchpad_ui_tokens_dist_index_css__WEBPACK_IMPORTED_MODULE_2__.A);
1886
1866
  ___CSS_LOADER_EXPORT___.i(_node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_index_js_ruleSet_1_rules_2_use_1_builtin_lightningcss_loader_ruleSet_1_rules_2_use_2_node_modules_pnpm_launchpad_ui_tokens_0_15_0_node_modules_launchpad_ui_tokens_dist_themes_css__WEBPACK_IMPORTED_MODULE_3__.A);
1887
- ___CSS_LOADER_EXPORT___.i(_node_modules_pnpm_rsbuild_core_1_5_4_node_modules_rsbuild_core_compiled_css_loader_index_js_ruleSet_1_rules_2_use_1_builtin_lightningcss_loader_ruleSet_1_rules_2_use_2_node_modules_pnpm_launchpad_ui_tokens_0_15_0_node_modules_launchpad_ui_tokens_dist_fonts_css__WEBPACK_IMPORTED_MODULE_4__.A);
1888
1867
  ___CSS_LOADER_EXPORT___.push([
1889
1868
  module.id,
1890
- `body {
1869
+ `@font-face {
1870
+ font-family: inter;
1871
+ src: url("https://static.launchdarkly.com/app/s/ld/inter.var-subset.woff2") format("woff2");
1872
+ font-display: swap;
1873
+ font-weight: 300 700;
1874
+ }
1875
+
1876
+ @font-face {
1877
+ font-family: "Audimat 3000 Regulier";
1878
+ src: url("https://static.launchdarkly.com/app/s/ld/Audimat3000-Regulier.var-subset.woff2") format("woff2");
1879
+ font-display: swap;
1880
+ font-weight: 400;
1881
+ -webkit-font-smoothing: antialiased;
1882
+ }
1883
+
1884
+ body {
1891
1885
  font-family: var(--lp-font-family-base);
1892
1886
  color: var(--lp-color-text-ui-primary-base);
1893
1887
  margin: 0;
@@ -1897,12 +1891,6 @@ var __webpack_modules__ = {
1897
1891
  ]);
1898
1892
  const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
1899
1893
  },
1900
- "../../node_modules/.pnpm/@launchpad-ui+tokens@0.15.0/node_modules/@launchpad-ui/tokens/dist/assets/Audimat3000-Regulier.var-subset.woff2": function(module, __unused_webpack_exports, __webpack_require__) {
1901
- module.exports = __webpack_require__.p + "static/font/Audimat3000-Regulier.var-subset.woff2";
1902
- },
1903
- "../../node_modules/.pnpm/@launchpad-ui+tokens@0.15.0/node_modules/@launchpad-ui/tokens/dist/assets/Inter.var-subset.woff2": function(module, __unused_webpack_exports, __webpack_require__) {
1904
- module.exports = __webpack_require__.p + "static/font/Inter.var-subset.woff2";
1905
- },
1906
1894
  "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module) {
1907
1895
  module.exports = function(cssWithMappingToString) {
1908
1896
  var list = [];
@@ -1956,17 +1944,6 @@ var __webpack_modules__ = {
1956
1944
  return list;
1957
1945
  };
1958
1946
  },
1959
- "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/getUrl.js": function(module) {
1960
- module.exports = function(url, options) {
1961
- if (!options) options = {};
1962
- if (!url) return url;
1963
- url = String(url.__esModule ? url.default : url);
1964
- if (/^['"].*['"]$/.test(url)) url = url.slice(1, -1);
1965
- if (options.hash) url += options.hash;
1966
- if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
1967
- return url;
1968
- };
1969
- },
1970
1947
  "../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js": function(module) {
1971
1948
  module.exports = function(i) {
1972
1949
  return i[1];
@@ -2145,7 +2122,6 @@ function __webpack_require__(moduleId) {
2145
2122
  __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2146
2123
  return module.exports;
2147
2124
  }
2148
- __webpack_require__.m = __webpack_modules__;
2149
2125
  (()=>{
2150
2126
  __webpack_require__.n = (module)=>{
2151
2127
  var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
@@ -2163,32 +2139,12 @@ __webpack_require__.m = __webpack_modules__;
2163
2139
  });
2164
2140
  };
2165
2141
  })();
2166
- (()=>{
2167
- __webpack_require__.g = (()=>{
2168
- if ('object' == typeof globalThis) return globalThis;
2169
- try {
2170
- return this || new Function('return this')();
2171
- } catch (e) {
2172
- if ('object' == typeof window) return window;
2173
- }
2174
- })();
2175
- })();
2176
2142
  (()=>{
2177
2143
  __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
2178
2144
  })();
2179
2145
  (()=>{
2180
2146
  __webpack_require__.nc = void 0;
2181
2147
  })();
2182
- (()=>{
2183
- var scriptUrl;
2184
- if ("string" == typeof import.meta.url) scriptUrl = import.meta.url;
2185
- if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
2186
- scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
2187
- __webpack_require__.p = scriptUrl + '../';
2188
- })();
2189
- (()=>{
2190
- // __webpack_require__.b = new URL("../", import.meta.url);
2191
- })();
2192
2148
  var injectStylesIntoStyleTag = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
2193
2149
  var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
2194
2150
  var styleDomAPI = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
@@ -2229,6 +2185,127 @@ function useSearchContext() {
2229
2185
  if (!context) throw new Error('useSearchContext must be used within a SearchProvider');
2230
2186
  return context;
2231
2187
  }
2188
+ function isDoNotTrackEnabled() {
2189
+ let flag;
2190
+ if ('undefined' != typeof window && window.navigator) flag = void 0 !== window.navigator.doNotTrack ? window.navigator.doNotTrack : void 0 !== window.navigator.msDoNotTrack ? window.navigator.msDoNotTrack : window.doNotTrack;
2191
+ return 1 === flag || true === flag || '1' === flag || 'yes' === flag;
2192
+ }
2193
+ const ANALYTICS_EVENT_PREFIX = 'ld.toolbar';
2194
+ const EVENTS = {
2195
+ INITIALIZED: 'initialized',
2196
+ POSITION_CHANGED: 'position.changed',
2197
+ PIN_TOGGLED: 'pin.toggled',
2198
+ TAB_CHANGED: 'tab.changed',
2199
+ SEARCH: 'search',
2200
+ TOGGLE: 'toggle',
2201
+ TOGGLE_FLAG: 'toggle.flag',
2202
+ OPEN_FLAG_DEEPLINK: 'open.flag.deeplink',
2203
+ SHOW_OVERRIDES_ONLY: 'show.overrides.only',
2204
+ EVENT_CLICK: 'event.click'
2205
+ };
2206
+ class ToolbarAnalytics {
2207
+ ldClient = null;
2208
+ searchDebounceTimer = null;
2209
+ constructor(ldClient){
2210
+ this.ldClient = ldClient || null;
2211
+ }
2212
+ track(eventName, properties) {
2213
+ const fullEventName = `${ANALYTICS_EVENT_PREFIX}.${eventName}`;
2214
+ if (!this.ldClient) return void console.debug('ToolbarAnalytics: LDClient not available, skipping track event:', fullEventName);
2215
+ if (isDoNotTrackEnabled()) return;
2216
+ try {
2217
+ this.ldClient.track(fullEventName, properties);
2218
+ } catch (error) {
2219
+ console.error('ToolbarAnalytics: Failed to track event:', fullEventName, error);
2220
+ }
2221
+ }
2222
+ trackInitialization() {
2223
+ this.track(EVENTS.INITIALIZED, {});
2224
+ }
2225
+ trackPositionChange(oldPosition, newPosition, source) {
2226
+ this.track(EVENTS.POSITION_CHANGED, {
2227
+ oldPosition,
2228
+ newPosition,
2229
+ source
2230
+ });
2231
+ }
2232
+ trackPinToggle(action) {
2233
+ this.track(EVENTS.PIN_TOGGLED, {
2234
+ action
2235
+ });
2236
+ }
2237
+ trackTabChange(fromTab, toTab) {
2238
+ this.track(EVENTS.TAB_CHANGED, {
2239
+ fromTab,
2240
+ toTab
2241
+ });
2242
+ }
2243
+ trackSearch(query) {
2244
+ if (this.searchDebounceTimer) clearTimeout(this.searchDebounceTimer);
2245
+ this.searchDebounceTimer = setTimeout(()=>{
2246
+ if (!query) return;
2247
+ this.track(EVENTS.SEARCH, {
2248
+ query
2249
+ });
2250
+ this.searchDebounceTimer = null;
2251
+ }, 1000);
2252
+ }
2253
+ trackToolbarToggle(action, trigger) {
2254
+ this.track(EVENTS.TOGGLE, {
2255
+ action,
2256
+ trigger
2257
+ });
2258
+ }
2259
+ trackFlagOverride(flagKey, value, action) {
2260
+ this.track(EVENTS.TOGGLE_FLAG, {
2261
+ flagKey,
2262
+ value: 'remove' === action ? null : value,
2263
+ action
2264
+ });
2265
+ }
2266
+ trackOpenFlagDeeplink(flagKey, baseUrl) {
2267
+ this.track(EVENTS.OPEN_FLAG_DEEPLINK, {
2268
+ flagKey,
2269
+ baseUrl
2270
+ });
2271
+ }
2272
+ trackShowOverridesOnlyClick(enabled) {
2273
+ this.track(EVENTS.SHOW_OVERRIDES_ONLY, {
2274
+ enabled
2275
+ });
2276
+ }
2277
+ trackEventClick(eventName) {
2278
+ this.track(EVENTS.EVENT_CLICK, {
2279
+ eventName
2280
+ });
2281
+ }
2282
+ }
2283
+ const AnalyticsContext = /*#__PURE__*/ createContext(null);
2284
+ function AnalyticsProvider({ children, ldClient }) {
2285
+ const analytics = useMemo(()=>new ToolbarAnalytics(ldClient), [
2286
+ ldClient
2287
+ ]);
2288
+ const hasInitialized = useRef(false);
2289
+ useEffect(()=>{
2290
+ if (!hasInitialized.current) {
2291
+ analytics.trackInitialization();
2292
+ hasInitialized.current = true;
2293
+ }
2294
+ }, [
2295
+ analytics
2296
+ ]);
2297
+ return /*#__PURE__*/ jsx(AnalyticsContext.Provider, {
2298
+ value: {
2299
+ analytics
2300
+ },
2301
+ children: children
2302
+ });
2303
+ }
2304
+ function useAnalytics() {
2305
+ const context = useContext(AnalyticsContext);
2306
+ if (!context) throw new Error('useAnalytics must be used within an AnalyticsProvider');
2307
+ return context.analytics;
2308
+ }
2232
2309
  const EASING = {
2233
2310
  bounce: [
2234
2311
  0.34,
@@ -2250,60 +2327,98 @@ const EASING = {
2250
2327
  ]
2251
2328
  };
2252
2329
  const ANIMATION_CONFIG = {
2330
+ containerExpand: {
2331
+ width: {
2332
+ duration: 0.25,
2333
+ ease: EASING.smooth
2334
+ },
2335
+ height: {
2336
+ duration: 0.25,
2337
+ ease: EASING.smooth
2338
+ },
2339
+ borderRadius: {
2340
+ duration: 0.2,
2341
+ ease: EASING.smooth
2342
+ },
2343
+ boxShadow: {
2344
+ duration: 0.2,
2345
+ ease: 'easeInOut'
2346
+ }
2347
+ },
2348
+ containerCollapse: {
2349
+ width: {
2350
+ duration: 0.35,
2351
+ ease: EASING.elastic
2352
+ },
2353
+ height: {
2354
+ duration: 0.35,
2355
+ ease: EASING.elastic
2356
+ },
2357
+ borderRadius: {
2358
+ duration: 0.25,
2359
+ ease: EASING.smooth
2360
+ },
2361
+ boxShadow: {
2362
+ duration: 0.25,
2363
+ ease: 'easeInOut'
2364
+ }
2365
+ },
2253
2366
  container: {
2254
2367
  width: {
2255
- duration: 0.5,
2256
- ease: EASING.bounce
2368
+ duration: 0.25,
2369
+ ease: EASING.smooth
2257
2370
  },
2258
2371
  height: {
2259
- duration: 0.5,
2260
- ease: EASING.bounce
2372
+ duration: 0.25,
2373
+ ease: EASING.smooth
2261
2374
  },
2262
2375
  borderRadius: {
2263
- duration: 0.4,
2376
+ duration: 0.2,
2264
2377
  ease: EASING.smooth
2265
2378
  },
2266
2379
  boxShadow: {
2267
- duration: 0.3,
2380
+ duration: 0.2,
2268
2381
  ease: 'easeInOut'
2269
2382
  }
2270
2383
  },
2271
2384
  circleLogo: {
2272
2385
  opacity: {
2273
- duration: 0.25,
2386
+ duration: 0.15,
2274
2387
  ease: 'easeOut'
2275
2388
  },
2276
2389
  scale: {
2277
- duration: 0.3,
2390
+ duration: 0.2,
2278
2391
  ease: EASING.smooth
2279
2392
  },
2280
2393
  rotate: {
2281
- duration: 0.3,
2394
+ duration: 0.2,
2282
2395
  ease: EASING.smooth
2283
2396
  }
2284
2397
  },
2285
2398
  toolbarContent: {
2286
2399
  opacity: {
2287
- duration: 0.4,
2400
+ duration: 0.2,
2288
2401
  ease: EASING.smooth
2289
2402
  },
2290
2403
  y: {
2291
- duration: 0.5,
2292
- ease: EASING.bounce
2404
+ duration: 0.25,
2405
+ ease: EASING.smooth
2293
2406
  },
2294
2407
  scale: {
2295
- duration: 0.5,
2296
- ease: EASING.bounce
2408
+ duration: 0.25,
2409
+ ease: EASING.smooth
2297
2410
  }
2298
2411
  },
2299
2412
  contentArea: {
2300
2413
  opacity: {
2301
- duration: 0.4,
2302
- ease: 'easeInOut'
2414
+ duration: 0.2,
2415
+ ease: 'easeInOut',
2416
+ delay: 0.1
2303
2417
  },
2304
- maxHeight: {
2305
- duration: 0.5,
2306
- ease: EASING.elastic
2418
+ y: {
2419
+ duration: 0.25,
2420
+ ease: EASING.smooth,
2421
+ delay: 0.1
2307
2422
  }
2308
2423
  },
2309
2424
  tabContent: {
@@ -2312,14 +2427,14 @@ const ANIMATION_CONFIG = {
2312
2427
  },
2313
2428
  tabsContainer: {
2314
2429
  opacity: {
2315
- duration: 0.5,
2316
- ease: EASING.bounce
2430
+ duration: 0.2,
2431
+ ease: EASING.smooth
2317
2432
  },
2318
2433
  y: {
2319
- duration: 0.5,
2320
- ease: EASING.bounce
2434
+ duration: 0.2,
2435
+ ease: EASING.smooth
2321
2436
  },
2322
- delay: 0.3
2437
+ delay: 0.05
2323
2438
  },
2324
2439
  eventList: {
2325
2440
  liveTail: {
@@ -2359,9 +2474,9 @@ const ANIMATION_CONFIG = {
2359
2474
  };
2360
2475
  const DIMENSIONS = {
2361
2476
  collapsed: {
2362
- width: 60,
2363
- height: 60,
2364
- borderRadius: 30
2477
+ width: 48,
2478
+ height: 48,
2479
+ borderRadius: 24
2365
2480
  },
2366
2481
  expanded: {
2367
2482
  width: 400,
@@ -2378,21 +2493,25 @@ const SHADOWS = {
2378
2493
  hoveredCollapsed: '0 8px 40px rgba(0, 0, 0, 0.4)',
2379
2494
  collapsed: '0 4px 16px rgba(0, 0, 0, 0.3)'
2380
2495
  };
2496
+ const DRAG_CONSTANTS = {
2497
+ THRESHOLD_PIXELS: 3,
2498
+ CLICK_RESET_DELAY_MS: 50
2499
+ };
2381
2500
  function LaunchDarklyIcon({ className }) {
2382
2501
  return /*#__PURE__*/ jsx("svg", {
2383
2502
  className: className,
2384
2503
  fill: "currentColor",
2385
2504
  preserveAspectRatio: "xMidYMid",
2386
- viewBox: "-.00348466 0 256.88728835 255.31014671",
2505
+ viewBox: "0 0 64 64",
2387
2506
  xmlns: "http://www.w3.org/2000/svg",
2388
2507
  role: "img",
2389
2508
  "aria-label": "LaunchDarkly",
2390
2509
  children: /*#__PURE__*/ jsx("path", {
2391
- d: "m129.865 255.306a5.637 5.637 0 0 1 -5.073-3.157 5.355 5.355 0 0 1 .507-5.637l59.98-82.584-105.02 42.899a5.778 5.778 0 0 1 -2.255.479 5.637 5.637 0 0 1 -5.384-4.059 5.412 5.412 0 0 1 2.311-6.172l92.365-54.54-162.632-9.357a5.637 5.637 0 0 1 0-11.106l162.717-9.33-92.393-54.538a5.412 5.412 0 0 1 -2.311-6.173 5.637 5.637 0 0 1 5.355-4.059c.78-.003 1.55.17 2.255.507l105.048 42.955-59.98-82.555a5.355 5.355 0 0 1 -.507-5.638 5.637 5.637 0 0 1 5.046-3.241c1.48.01 2.894.62 3.917 1.691l119.536 119.509a9.076 9.076 0 0 1 0 12.824l-119.592 119.648a5.442 5.442 0 0 1 -3.89 1.634z"
2510
+ d: "M32.62 60.61c-.445 0-.892-.254-1.147-.7-.191-.444-.191-.889.128-1.27l13.582-18.62-23.785 9.66c-.191.063-.319.126-.51.126-.574 0-1.084-.381-1.212-.89-.191-.508.064-1.08.51-1.397l20.916-12.266-36.794-2.097c-.765-.063-1.211-.635-1.211-1.27 0-.573.382-1.208 1.211-1.272l36.794-2.097-20.916-12.265c-.446-.318-.701-.89-.51-1.398.192-.509.638-.89 1.212-.89.191 0 .319.063.51.127l23.785 9.66L31.601 5.067c-.255-.381-.32-.89-.128-1.271.191-.445.638-.7 1.148-.7.319 0 .638.128.893.382L60.55 30.36c.383.381.574.953.574 1.462 0 .508-.191 1.016-.574 1.461L33.514 60.23a1.26 1.26 0 0 1-.893.38Z"
2392
2511
  })
2393
2512
  });
2394
2513
  }
2395
- var extracted = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/LaunchDarklyToolbar.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA61U227jIBB9z1fMy0rJAxVOk17Ix1QYsD0NBgQ4tbvqv6/AdhJvslJ3tQ+2NPjMzDlnGD+8FWYncBgo/FwBOBswojUMKuyVPKwAShujbRlsqetT/EnQSNUzKCilGcDFsfa2M5IIq61ncOJ+TYh2Y0xqzwfySulmLOel8gwK10OwGuVd9POEtiflK20/GDQopTLpTHQ+pC7OoonKpyOJwWk+MKi0yiS5xtoQjKoNDISace9diFgNRFgTlYmXT1+rh9mIIhvhsW7iRXT03ITK+pZYjzUaNtky4hb525yvVfWd9ARbZD/m7BuJV4jdAiFVxTsdU5OknUj0SowTFFZ3rblxI0Svomju2pFLhMj9ktT+t7vBy2B1F1WWZh2DPf1xOIuegg+UsWHwNFnQqNHROf6fI3vK/KaGj7tlwzm25bsSkVSYalgTOWZvKtQx3ccyT9KoENZ0A2hOysd1sTkbGxqP5siALsiX2orjgsvzNZeCjl7ciP3TrK4KveRCf7dc99ZlXDjiucQuMCi2rh9fNGm5aviaG7ZoyGzdbp+HdYXhGfPd2TkuJZqawYvr0/Ovf4szeQr0ImBBrMzEEh8GxWH19QulZ2na2AQAAA==\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2514
+ var extracted = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/LaunchDarklyToolbar.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA61UwY7aMBC98xW+VIKDVw6FwpqPqRzbSWYxnsiesKHV/ntlB1gC2Wq76nHGz2/ezBv76WfhVxpOJ8F+zxhrMQIBeskq6K3ZzRj7xcEb20u2LFablRCFECldKr2vA3becI0Og2RHFeacu3aIeR3UiT8LschoDMYGyYq2ZxEdmEn05ozGow2Vw1fJGjDG+pTTXYipSovgyYaUMhBbp06SVc72KaEc1J4D2UOUTNsL7qWLBNWJa/RkPb0fvc2eLu0Xuf0AdUOSLUXbD6qJ8PAeU1A+VhgOHAPU4OUZMdwb8S0zn7PVV+jStRHb9yl1hO3fuAjbCV2rCV2fIHpQtM48D6bcIH6MEMZWqnOUKiS3uIFg9bBpGl138A/+RQqWdDNpYKaIpMJY1OZuh1UZ0XVkr02uxbfdtf1z8AqGGslW26H/xg5TvsT/c8m2Wd+54PKu4CXG8sVq4hUkDvSkIM+mAkfpBZXZU29jnIsFA3+0gebF4jrY2ATwe8nESHzpUO9HWp5vtRRimMVDsx95dUOkMtG/fQdTD3z4InhQBrooWbFM47ipU+Y6B/D8atFa3GF0xnzWslYZA76WbNv27Dz9r3xrH2s2WU+SIVmxm739AZDPMzZuBQAA\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2396
2515
  var extracted_options = {};
2397
2516
  extracted_options.styleTagTransform = styleTagTransform_default();
2398
2517
  extracted_options.setAttributes = setAttributesWithoutAttributes_default();
@@ -2401,21 +2520,27 @@ extracted_options.domAPI = styleDomAPI_default();
2401
2520
  extracted_options.insertStyleElement = insertStyleElement_default();
2402
2521
  injectStylesIntoStyleTag_default()(extracted.A, extracted_options);
2403
2522
  extracted.A && extracted.A.locals && extracted.A.locals;
2404
- var contentArea = '_1n4ciyy8';
2405
- var tabsContainer = '_1n4ciyya';
2406
- var scrollableContent = '_1n4ciyy9';
2407
- var toolbarContent = '_1n4ciyy7';
2408
- var positionRight = '_1n4ciyy1';
2409
- var circleLogo = '_1n4ciyy6';
2410
- var positionLeft = '_1n4ciyy2';
2411
- var toolbarCircle = '_1n4ciyy3';
2412
- var circleContent = '_1n4ciyy5';
2523
+ var contentArea = '_1n4ciyya';
2524
+ var positionBottomLeft = '_1n4ciyy2';
2525
+ var scrollableContent = '_1n4ciyyb';
2526
+ var tabsContainer = '_1n4ciyyc';
2527
+ var toolbarContent = '_1n4ciyy9';
2528
+ var circleLogo = '_1n4ciyy8';
2529
+ var positionTopLeft = '_1n4ciyy4';
2530
+ var circleContent = '_1n4ciyy7';
2531
+ var positionTopRight = '_1n4ciyy3';
2532
+ var toolbarCircle = '_1n4ciyy5';
2533
+ var positionBottomRight = '_1n4ciyy1';
2413
2534
  var toolbarContainer = '_1n4ciyy0';
2414
- var toolbarExpanded = '_1n4ciyy4';
2415
- function CircleLogo(props) {
2416
- const { hasBeenExpanded } = props;
2417
- return /*#__PURE__*/ jsx(motion.div, {
2535
+ var toolbarExpanded = '_1n4ciyy6';
2536
+ const CircleLogo = /*#__PURE__*/ forwardRef((props, ref)=>{
2537
+ const { onClick, onMouseDown } = props;
2538
+ return /*#__PURE__*/ jsx(motion.button, {
2539
+ ref: ref,
2418
2540
  className: circleContent,
2541
+ onClick: onClick,
2542
+ onMouseDown: onMouseDown,
2543
+ "aria-label": "Open LaunchDarkly toolbar",
2419
2544
  initial: {
2420
2545
  opacity: 0,
2421
2546
  x: '-50%',
@@ -2441,7 +2566,7 @@ function CircleLogo(props) {
2441
2566
  ...ANIMATION_CONFIG.circleLogo,
2442
2567
  opacity: {
2443
2568
  ...ANIMATION_CONFIG.circleLogo.opacity,
2444
- delay: hasBeenExpanded ? 0.3 : 0
2569
+ delay: 0
2445
2570
  }
2446
2571
  },
2447
2572
  children: /*#__PURE__*/ jsx(motion.div, {
@@ -2453,12 +2578,13 @@ function CircleLogo(props) {
2453
2578
  ease: 'easeInOut'
2454
2579
  },
2455
2580
  children: /*#__PURE__*/ jsx(LaunchDarklyIcon, {
2456
- className: circleLogo
2581
+ className: circleLogo,
2582
+ "aria-hidden": "true"
2457
2583
  })
2458
2584
  })
2459
2585
  }, "circle-logo");
2460
- }
2461
- var _vanilla_extract_webpack_plugin_extracted = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/Header/Header.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA61V227jIBB9z1eMKq2USEuF0zRNyON+yArb2KbFgAA3zq767yuwvdiJm6ZqX5LAHOZyZubk/ve+qfb0GcPfBUDOrRb0RKA0PD8sIHwjx2otqGMoU6KppSVAG6cgKUz4cYmjhlFL4E6oUkHGpGMGaOa4kvbOo6ngpUTcsdqS3u6vNc1zLksCGHa6BQzJVrfekNLspTSqkblPQRkCr9QsERK6O6PS0BPaY7wKaGVyZlCqnFM1gUS3YJXg+eyjp+kjQ3PeWALJWrfdBwbs7TWXqGK8rByBxz6tkuoOeVi8Le57IpNAZODD00DAk3AYc1sI1l5hIXjdTZ2ug9Mjz11FYP3YhR/SGXqg0meWOVRwRyBT0lEu/XXBhWOGQGo8XDJrl3gFXL4y45bJahzmIYQplHTI8j+MQLLpQoWrYx9viwMjVzqx6UkNzwpac3EaAUe3KKWWBeix4o4hq2nGCEh1NFSPM9ucsxr5uuD1ubGOFyfkOWDSjbHvUO6b25PbNZu2wznB+Mc4kceQyG0DuZufrb598w9TQ73TE5WRm/8VpkJlL7cRWyupApuxEX1LcRdevTJTCHUkUPE8Z3KygBvddiMI4FjrUAQzIbi23L7bsxn2eieB/Eh75HR73txeKz69NXi6NU9TTfvAw7tjEx3uvtvh/myaPI2SxZmJ56wx1o+LVvxCLgeVnI5Zf/vlbAGcodJy3xLSTS3g+7UFRi37ebEK0TYplFR+hkK5VzZmPWzMJ/YrBqGdfHEhrslSxKcBP8jow3Y6PVmw9iQj04HwV5U8Hyv5sB4fSml8z26qMUbYTv8rkrMii8t0orGcy3Vmu+ek5HZVjvGqSbzZzIfSs8YYJt0vX/hh8fYPBfEjJ8YIAAA=\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2586
+ });
2587
+ var _vanilla_extract_webpack_plugin_extracted = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/Header/Header.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA62V227jIBBA3/MVo0ortdJS4TRJE/K4H7LCNrZpMSDAjbOr/vsKbC924qSp2pckMMNczlzy+HvXVDv6guHvAiDnVgt6JFAanu8XEL6RY7UW1DGUKdHU0hKgjVOQFCb8ONejhlFL4E6oUkHGpGMGaOa4kvbOa1PBS4m4Y7Ulvdxfa5rnXJYEMGx1CxiSjW69IKXZa2lUI3MfgjIE3qi5R0jo7oxKQ49oh/FD0FYmZwalyjlVE0h0C1YJns8+ep4+MjTnjSWQLHXbfWDAXl5ziSrGy8oRWPdhlVR3mvvF++KxB5kEkIGHx0DAQ9iP2RaCtVcoBKvbqdFlMHrguasIJOtV53+IZyiCSl9Y5lDBHYFMSUe59NcFF44ZAqnx6pJZe48fgMs3Ztx98jD28xT8FEo6ZPkfRiDpXYWrQ+9vgwOSK6VY9VTDs4LWXBxHiqNblFLLguqh4o4hq2nGCEh1MFSPI1udYo3AzsC+NNbx4og8AybdWPcCc1/dnm5XbdoO5wTjH+NA1iGQ2zpyO99c647p/MPUUG/0SGVk8z/DVKjs9TawtZIq0IyF6EuKO/fqjZlCqAOBiuc5k5MJXOm260EAx1qHojITgmvL7cWazdDrjQT4EXtkujktbr8sPj02eDo2z9Ol9oGFi20TDW6/2+DupJs8Rsliz8Rz1hjr20UrfrYvhzU5bbP+9svRAjhDpeW+JKTrWsCPSwuMWvbzbBSibJIoqXwPhXSvTMxymJhPzFd0Qrv1xYW4tpaifhr0hzX6tJl2TxakPWRkOiX81VWeT1Z5Px4frtL4nt2UY/Swmf5XJCdJFufhRGE5F+vMdM+tktu3cvRXTfzNRj6knjXGMOl++cT3i/d/eH3aB8cIAAA=\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2462
2588
  var webpack_plugin_extracted_options = {};
2463
2589
  webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2464
2590
  webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
@@ -2473,7 +2599,6 @@ var searchButtonArea = '_9uh9aj7';
2473
2599
  var closeButtonArea = '_9uh9aj8';
2474
2600
  var rightSection = '_9uh9aj6';
2475
2601
  var environmentWrapper = '_9uh9ajg';
2476
- var headerTitle = '_9uh9aj3';
2477
2602
  var logo = '_9uh9aj2';
2478
2603
  var environmentLabel = '_9uh9aj5';
2479
2604
  var searchWrapper = '_9uh9ajf';
@@ -2482,18 +2607,34 @@ var header = '_9uh9aj0';
2482
2607
  var actionButton = '_9uh9aj9';
2483
2608
  var searchGroup = '_9uh9ajc';
2484
2609
  var leftSection = '_9uh9aj1';
2485
- function LogoSection() {
2486
- return /*#__PURE__*/ jsxs("div", {
2610
+ function LaunchDarklyLogo(props) {
2611
+ const { className, onMouseDown } = props;
2612
+ return /*#__PURE__*/ jsx("svg", {
2613
+ className: className,
2614
+ fill: "currentColor",
2615
+ preserveAspectRatio: "xMidYMid",
2616
+ viewBox: "0 0 156 24",
2617
+ xmlns: "http://www.w3.org/2000/svg",
2618
+ role: "img",
2619
+ "aria-label": "LaunchDarkly",
2620
+ onMouseDown: onMouseDown,
2621
+ style: onMouseDown ? {
2622
+ cursor: 'grab'
2623
+ } : void 0,
2624
+ children: /*#__PURE__*/ jsx("path", {
2625
+ d: "M9.33 18.729V16.45H2.578V5.272H0v13.457h9.33Zm6.485-.424a4.01 4.01 0 0 0 1.276-1.67v2.093h2.472v-6.49c0-.688-.16-1.324-.505-1.854s-.85-.954-1.488-1.245c-.638-.291-1.41-.45-2.286-.45a8.26 8.26 0 0 0-1.41.132c-.45.08-.876.212-1.275.371-.399.159-.77.344-1.09.556l.08 2.305a8.662 8.662 0 0 1 1.78-.9 5.624 5.624 0 0 1 1.941-.319c.558 0 1.01.133 1.33.398.318.265.478.609.478 1.033v.662h-2.233c-1.329 0-2.366.265-3.136.821-.771.557-1.143 1.325-1.143 2.305 0 .556.133 1.033.372 1.483.265.45.611.795 1.09 1.034.478.264 1.036.37 1.648.37.85 0 1.541-.212 2.1-.635Zm-2.232-1.67a1.078 1.078 0 0 1-.426-.873c0-.45.186-.795.585-1.034.372-.238.957-.37 1.701-.37h1.595v.37c0 .318-.08.636-.266.98a2.349 2.349 0 0 1-.824.875c-.372.238-.797.37-1.276.37-.452 0-.824-.105-1.09-.317Zm13.848 1.643c.585-.503 1.01-1.192 1.276-2.04v2.49h2.498V8.98h-2.498v4.556c0 .663-.107 1.245-.32 1.749-.212.503-.504.927-.903 1.192a2.23 2.23 0 0 1-1.356.424c-.558 0-.983-.16-1.302-.477-.292-.318-.452-.795-.452-1.404V8.98h-2.498v6.093c0 1.271.292 2.225.903 2.914.612.689 1.41 1.033 2.446 1.033.903 0 1.621-.239 2.206-.742Zm9.01-4.106c0-.662.107-1.245.32-1.748.212-.503.505-.927.877-1.192.372-.292.824-.424 1.329-.424.558 0 .983.159 1.302.477.293.318.452.794.452 1.404v6.066h2.525v-6.093c0-1.271-.292-2.225-.904-2.914-.61-.688-1.408-1.033-2.445-1.033-.877 0-1.595.265-2.18.742-.558.503-.983 1.192-1.275 2.04v-2.49h-2.499v9.748h2.499v-4.583ZM51.7 18.94c.319-.053.638-.132.904-.212.292-.079.531-.185.797-.264l.026-2.358c-.398.212-.824.344-1.275.45a5.923 5.923 0 0 1-1.356.16c-.665 0-1.25-.133-1.701-.372a2.24 2.24 0 0 1-1.01-1.033 3.26 3.26 0 0 1-.32-1.457c0-.53.107-1.006.32-1.457.212-.424.558-.768 1.01-1.033.452-.265 1.01-.37 1.648-.37.505 0 .957.052 1.409.158.451.106.85.265 1.249.45l-.027-2.436c-.292-.106-.558-.212-.824-.265a4.252 4.252 0 0 0-.903-.16 6.336 6.336 0 0 0-1.037-.079c-1.116 0-2.073.239-2.897.689a4.949 4.949 0 0 0-1.914 1.854c-.452.795-.665 1.67-.665 2.676 0 .98.24 1.88.691 2.649a4.646 4.646 0 0 0 1.914 1.801c.824.424 1.781.662 2.871.662.399.027.77 0 1.09-.053Zm6.459-.212v-4.556c0-.662.106-1.245.319-1.748.212-.503.505-.927.904-1.192a2.15 2.15 0 0 1 1.328-.424c.585 0 1.01.159 1.303.477.292.318.452.794.452 1.404v6.066h2.498v-6.093c0-1.271-.292-2.225-.903-2.914-.612-.688-1.41-1.033-2.446-1.033-.877 0-1.621.265-2.18.742-.584.503-1.01 1.192-1.275 2.04V5.27h-2.472v13.457h2.472Zm14.885 0c1.435 0 2.658-.264 3.668-.82 1.01-.557 1.78-1.325 2.312-2.332.532-1.007.798-2.199.798-3.55 0-1.35-.266-2.543-.798-3.55a5.657 5.657 0 0 0-2.312-2.357c-1.01-.556-2.233-.821-3.668-.821H67.86v13.457h5.183v-.026Zm-2.605-2.278v-8.9h2.578c1.303 0 2.313.397 3.03 1.165.745.795 1.09 1.881 1.09 3.285 0 1.404-.372 2.517-1.09 3.285-.744.768-1.754 1.165-3.03 1.165h-2.578Zm15.921 1.855a4.01 4.01 0 0 0 1.276-1.67v2.093h2.472v-6.49c0-.688-.16-1.324-.505-1.854s-.85-.954-1.488-1.245c-.638-.291-1.409-.45-2.286-.45-.479 0-.957.053-1.409.132-.452.08-.877.212-1.276.371-.398.159-.77.344-1.09.556l.08 2.305a8.662 8.662 0 0 1 1.781-.9 5.624 5.624 0 0 1 1.94-.319c.559 0 1.01.133 1.33.398.319.265.478.609.478 1.033v.662h-2.18c-1.329 0-2.365.265-3.136.821-.771.557-1.143 1.325-1.143 2.305 0 .556.133 1.033.372 1.483.266.45.611.795 1.09 1.034.478.264 1.036.37 1.648.37.824 0 1.488-.212 2.046-.635Zm-2.232-1.67a1.078 1.078 0 0 1-.425-.873c0-.45.186-.795.584-1.034.372-.238.957-.37 1.701-.37h1.595v.37c0 .318-.08.636-.266.98a2.349 2.349 0 0 1-.824.875c-.372.238-.77.344-1.249.344-.452.027-.824-.08-1.116-.291Zm11.03 2.093V14.57c0-1.086.24-1.907.692-2.463.452-.556 1.09-.848 1.86-.848.372 0 .718.053 1.037.16V9.006a3.096 3.096 0 0 0-.478-.106c-.16-.027-.346-.027-.532-.027a2.15 2.15 0 0 0-1.568.636c-.426.424-.771 1.033-.984 1.775v-2.33h-2.498v9.748h2.472v.026Zm7.682 0v-3.152l.904-.848 2.924 4h2.977l-4.173-5.695 4.093-4.053h-3.136l-3.562 3.444V5.272h-2.472v13.457h2.445Zm10.819 0V5.271h-2.499v13.457h2.499Zm3.827 3.63c.93 0 1.675-.186 2.259-.557.585-.37 1.064-1.033 1.462-1.96l4.492-10.86h-2.578l-2.631 6.807-2.712-6.808H115.2l4.014 9.722-.213.503c-.133.318-.292.583-.531.716-.213.158-.559.238-1.011.238h-2.073v2.199h2.1ZM144.092 24a.56.56 0 0 1-.478-.291c-.08-.186-.08-.371.053-.53l5.661-7.762-9.914 4.027c-.08.026-.133.053-.213.053a.518.518 0 0 1-.505-.371c-.079-.212.027-.45.213-.583l8.718-5.112-15.337-.875a.525.525 0 0 1-.505-.53c0-.238.16-.503.505-.53l15.337-.873-8.718-5.113c-.186-.133-.292-.37-.213-.583a.544.544 0 0 1 .505-.37c.08 0 .133.026.213.052l9.914 4.027-5.661-7.788c-.106-.16-.133-.371-.053-.53.079-.186.265-.292.478-.292.133 0 .266.053.372.16l11.27 11.205a.88.88 0 0 1 .24.609.93.93 0 0 1-.24.61l-11.27 11.231a.525.525 0 0 1-.372.159Z"
2626
+ })
2627
+ });
2628
+ }
2629
+ function LogoSection(props) {
2630
+ const { onMouseDown } = props;
2631
+ return /*#__PURE__*/ jsx("div", {
2487
2632
  className: leftSection,
2488
- children: [
2489
- /*#__PURE__*/ jsx(LaunchDarklyIcon, {
2490
- className: logo
2491
- }),
2492
- /*#__PURE__*/ jsx("span", {
2493
- className: headerTitle,
2494
- children: "Developers"
2495
- })
2496
- ]
2633
+ "aria-hidden": "true",
2634
+ children: /*#__PURE__*/ jsx(LaunchDarklyLogo, {
2635
+ className: logo,
2636
+ onMouseDown: onMouseDown
2637
+ })
2497
2638
  });
2498
2639
  }
2499
2640
  function EnvironmentLabel(props) {
@@ -2627,6 +2768,19 @@ function SyncIcon({ className }) {
2627
2768
  })
2628
2769
  });
2629
2770
  }
2771
+ function ChevronUpIcon({ className }) {
2772
+ return /*#__PURE__*/ jsx("svg", {
2773
+ className: `${Icon_css_icon} ${className}`,
2774
+ fill: "currentColor",
2775
+ viewBox: "0 0 20 20",
2776
+ xmlns: "http://www.w3.org/2000/svg",
2777
+ children: /*#__PURE__*/ jsx("path", {
2778
+ fillRule: "evenodd",
2779
+ d: "M9.47 6.97a.75.75 0 0 1 1.06 0l5 5a.75.75 0 0 1-1.06 1.06L10 8.56l-4.47 4.47a.75.75 0 1 1-1.06-1.06z",
2780
+ clipRule: "evenodd"
2781
+ })
2782
+ });
2783
+ }
2630
2784
  function ChevronDownIcon({ className }) {
2631
2785
  return /*#__PURE__*/ jsx("svg", {
2632
2786
  className: `${Icon_css_icon} ${className}`,
@@ -2634,14 +2788,132 @@ function ChevronDownIcon({ className }) {
2634
2788
  viewBox: "0 0 24 24",
2635
2789
  xmlns: "http://www.w3.org/2000/svg",
2636
2790
  children: /*#__PURE__*/ jsx("path", {
2637
- d: "M12 15.5l-6-6 1.41-1.41L12 12.67l4.59-4.58L18 9.5z"
2791
+ "fill-rule": "evenodd",
2792
+ d: "M4.47 6.97a.75.75 0 0 1 1.06 0L10 11.44l4.47-4.47a.75.75 0 1 1 1.06 1.06l-5 5a.75.75 0 0 1-1.06 0l-5-5a.75.75 0 0 1 0-1.06",
2793
+ "clip-rule": "evenodd"
2638
2794
  })
2639
2795
  });
2640
2796
  }
2797
+ const TAB_ORDER = [
2798
+ 'flag-sdk',
2799
+ 'flag-dev-server',
2800
+ 'events',
2801
+ 'settings'
2802
+ ];
2803
+ function getToolbarMode(devServerUrl) {
2804
+ return devServerUrl ? 'dev-server' : 'sdk';
2805
+ }
2806
+ function getTabsForMode(mode, hasFlagOverridePlugin, hasEventInterceptionPlugin) {
2807
+ if ('dev-server' === mode) {
2808
+ const tabs = [
2809
+ 'flag-dev-server'
2810
+ ];
2811
+ tabs.push('settings');
2812
+ return tabs;
2813
+ }
2814
+ const tabs = [];
2815
+ if (hasFlagOverridePlugin) tabs.push('flag-sdk');
2816
+ if (hasEventInterceptionPlugin) tabs.push('events');
2817
+ tabs.push('settings');
2818
+ return tabs;
2819
+ }
2820
+ function getDefaultActiveTab(mode, hasFlagOverridePlugin, hasEventInterceptionPlugin) {
2821
+ if ('dev-server' === mode) return 'flag-dev-server';
2822
+ if ('sdk' === mode) {
2823
+ if (hasFlagOverridePlugin) return 'flag-sdk';
2824
+ if (hasEventInterceptionPlugin) return 'events';
2825
+ }
2826
+ return 'settings';
2827
+ }
2828
+ const TOOLBAR_POSITIONS = [
2829
+ 'top-left',
2830
+ 'top-right',
2831
+ 'bottom-left',
2832
+ 'bottom-right'
2833
+ ];
2834
+ const TOOLBAR_STORAGE_KEYS = {
2835
+ SETTINGS: 'ld-toolbar-settings',
2836
+ DISABLED: 'ld-toolbar-disabled',
2837
+ PROJECT: 'ld-toolbar-project'
2838
+ };
2839
+ const DEFAULT_SETTINGS = {
2840
+ position: 'bottom-right',
2841
+ pinned: false
2842
+ };
2843
+ function updateSetting(key, value) {
2844
+ try {
2845
+ const stored = localStorage.getItem(TOOLBAR_STORAGE_KEYS.SETTINGS);
2846
+ let currentSettings = {};
2847
+ if (stored) currentSettings = JSON.parse(stored);
2848
+ const newSettings = {
2849
+ ...currentSettings,
2850
+ [key]: value
2851
+ };
2852
+ localStorage.setItem(TOOLBAR_STORAGE_KEYS.SETTINGS, JSON.stringify(newSettings));
2853
+ } catch (error) {
2854
+ console.warn(`Failed to save toolbar ${key} to localStorage:`, error);
2855
+ }
2856
+ }
2857
+ function saveToolbarPosition(position) {
2858
+ updateSetting('position', position);
2859
+ }
2860
+ function loadToolbarPosition() {
2861
+ try {
2862
+ const stored = localStorage.getItem(TOOLBAR_STORAGE_KEYS.SETTINGS);
2863
+ if (!stored) return null;
2864
+ const parsed = JSON.parse(stored);
2865
+ if (!parsed.position) return null;
2866
+ return TOOLBAR_POSITIONS.includes(parsed.position) ? parsed.position : null;
2867
+ } catch (error) {
2868
+ console.warn('Failed to load toolbar position from localStorage:', error);
2869
+ return null;
2870
+ }
2871
+ }
2872
+ function saveToolbarPinned(isPinned) {
2873
+ updateSetting('pinned', isPinned);
2874
+ }
2875
+ function loadToolbarPinned() {
2876
+ try {
2877
+ const stored = localStorage.getItem(TOOLBAR_STORAGE_KEYS.SETTINGS);
2878
+ if (!stored) return DEFAULT_SETTINGS.pinned;
2879
+ const parsed = JSON.parse(stored);
2880
+ return 'boolean' == typeof parsed.pinned ? parsed.pinned : DEFAULT_SETTINGS.pinned;
2881
+ } catch (error) {
2882
+ console.warn('Failed to load toolbar pinned state from localStorage:', error);
2883
+ return false;
2884
+ }
2885
+ }
2886
+ const ToolbarUIContext = /*#__PURE__*/ createContext(null);
2887
+ const useToolbarUIContext = ()=>{
2888
+ const context = useContext(ToolbarUIContext);
2889
+ if (!context) throw new Error('useToolbarUIContext must be used within ToolbarUIProvider');
2890
+ return context;
2891
+ };
2892
+ const ToolbarUIProvider = ({ children, initialPosition })=>{
2893
+ const initialValidPosition = initialPosition && TOOLBAR_POSITIONS.includes(initialPosition) ? initialPosition : void 0;
2894
+ const [position, setPosition] = useState(()=>loadToolbarPosition() || initialValidPosition || DEFAULT_SETTINGS.position);
2895
+ const handlePositionChange = useCallback((newPosition)=>{
2896
+ setPosition(newPosition);
2897
+ saveToolbarPosition(newPosition);
2898
+ }, []);
2899
+ const value = useMemo(()=>({
2900
+ position,
2901
+ handlePositionChange
2902
+ }), [
2903
+ position,
2904
+ handlePositionChange
2905
+ ]);
2906
+ return /*#__PURE__*/ jsx(ToolbarUIContext.Provider, {
2907
+ value: value,
2908
+ children: children
2909
+ });
2910
+ };
2641
2911
  function ActionButtons(props) {
2642
2912
  const { searchIsExpanded, setSearchIsExpanded, onClose, onRefresh, showSearchButton, showRefreshButton } = props;
2643
2913
  const [isSpinning, setIsSpinning] = useState(false);
2644
2914
  const [rotationCount, setRotationCount] = useState(0);
2915
+ const { position } = useToolbarUIContext();
2916
+ const isTop = position.startsWith('top-');
2645
2917
  const handleRefreshClick = useCallback(()=>{
2646
2918
  if (isSpinning) return;
2647
2919
  setIsSpinning(true);
@@ -2719,7 +2991,7 @@ function ActionButtons(props) {
2719
2991
  duration: 0.1
2720
2992
  },
2721
2993
  children: /*#__PURE__*/ jsx(IconButton, {
2722
- icon: /*#__PURE__*/ jsx(ChevronDownIcon, {}),
2994
+ icon: isTop ? /*#__PURE__*/ jsx(ChevronUpIcon, {}) : /*#__PURE__*/ jsx(ChevronDownIcon, {}),
2723
2995
  label: "Close toolbar",
2724
2996
  onClick: onClose,
2725
2997
  className: actionButton
@@ -2838,110 +3110,24 @@ class FlagStateManager {
2838
3110
  await this.devServerClient.setOverride(flagKey, value);
2839
3111
  await this.notifyListeners();
2840
3112
  }
2841
- async clearOverride(flagKey) {
2842
- await this.devServerClient.clearOverride(flagKey);
2843
- await this.notifyListeners();
2844
- }
2845
- subscribe(listener) {
2846
- this.listeners.add(listener);
2847
- return ()=>this.listeners.delete(listener);
2848
- }
2849
- async notifyListeners() {
2850
- try {
2851
- const flags = await this.getEnhancedFlags();
2852
- this.listeners.forEach((listener)=>listener(flags));
2853
- } catch (error) {
2854
- console.error('Error notifying listeners:', error);
2855
- }
2856
- }
2857
- destroy() {
2858
- this.listeners.clear();
2859
- }
2860
- }
2861
- const TAB_ORDER = [
2862
- 'flag-sdk',
2863
- 'flag-dev-server',
2864
- 'events',
2865
- 'settings'
2866
- ];
2867
- function getToolbarMode(devServerUrl) {
2868
- return devServerUrl ? 'dev-server' : 'sdk';
2869
- }
2870
- function getTabsForMode(mode, hasFlagOverridePlugin, hasEventInterceptionPlugin) {
2871
- if ('dev-server' === mode) {
2872
- const tabs = [
2873
- 'flag-dev-server'
2874
- ];
2875
- tabs.push('settings');
2876
- return tabs;
2877
- }
2878
- const tabs = [];
2879
- if (hasFlagOverridePlugin) tabs.push('flag-sdk');
2880
- if (hasEventInterceptionPlugin) tabs.push('events');
2881
- tabs.push('settings');
2882
- return tabs;
2883
- }
2884
- function getDefaultActiveTab(mode, hasFlagOverridePlugin, hasEventInterceptionPlugin) {
2885
- if ('dev-server' === mode) return 'flag-dev-server';
2886
- if ('sdk' === mode) {
2887
- if (hasFlagOverridePlugin) return 'flag-sdk';
2888
- if (hasEventInterceptionPlugin) return 'events';
3113
+ async clearOverride(flagKey) {
3114
+ await this.devServerClient.clearOverride(flagKey);
3115
+ await this.notifyListeners();
2889
3116
  }
2890
- return 'settings';
2891
- }
2892
- const TOOLBAR_POSITIONS = [
2893
- 'left',
2894
- 'right'
2895
- ];
2896
- const TOOLBAR_STORAGE_KEYS = {
2897
- SETTINGS: 'ld-toolbar-settings',
2898
- DISABLED: 'ld-toolbar-disabled',
2899
- PROJECT: 'ld-toolbar-project'
2900
- };
2901
- const DEFAULT_SETTINGS = {
2902
- position: 'right',
2903
- pinned: false
2904
- };
2905
- function updateSetting(key, value) {
2906
- try {
2907
- const stored = localStorage.getItem(TOOLBAR_STORAGE_KEYS.SETTINGS);
2908
- let currentSettings = {};
2909
- if (stored) currentSettings = JSON.parse(stored);
2910
- const newSettings = {
2911
- ...currentSettings,
2912
- [key]: value
2913
- };
2914
- localStorage.setItem(TOOLBAR_STORAGE_KEYS.SETTINGS, JSON.stringify(newSettings));
2915
- } catch (error) {
2916
- console.warn(`Failed to save toolbar ${key} to localStorage:`, error);
3117
+ subscribe(listener) {
3118
+ this.listeners.add(listener);
3119
+ return ()=>this.listeners.delete(listener);
2917
3120
  }
2918
- }
2919
- function saveToolbarPosition(position) {
2920
- updateSetting('position', position);
2921
- }
2922
- function loadToolbarPosition() {
2923
- try {
2924
- const stored = localStorage.getItem(TOOLBAR_STORAGE_KEYS.SETTINGS);
2925
- if (!stored) return null;
2926
- const parsed = JSON.parse(stored);
2927
- return parsed.position && TOOLBAR_POSITIONS.includes(parsed.position) ? parsed.position : null;
2928
- } catch (error) {
2929
- console.warn('Failed to load toolbar position from localStorage:', error);
2930
- return null;
3121
+ async notifyListeners() {
3122
+ try {
3123
+ const flags = await this.getEnhancedFlags();
3124
+ this.listeners.forEach((listener)=>listener(flags));
3125
+ } catch (error) {
3126
+ console.error('Error notifying listeners:', error);
3127
+ }
2931
3128
  }
2932
- }
2933
- function saveToolbarPinned(isPinned) {
2934
- updateSetting('pinned', isPinned);
2935
- }
2936
- function loadToolbarPinned() {
2937
- try {
2938
- const stored = localStorage.getItem(TOOLBAR_STORAGE_KEYS.SETTINGS);
2939
- if (!stored) return DEFAULT_SETTINGS.pinned;
2940
- const parsed = JSON.parse(stored);
2941
- return 'boolean' == typeof parsed.pinned ? parsed.pinned : DEFAULT_SETTINGS.pinned;
2942
- } catch (error) {
2943
- console.warn('Failed to load toolbar pinned state from localStorage:', error);
2944
- return false;
3129
+ destroy() {
3130
+ this.listeners.clear();
2945
3131
  }
2946
3132
  }
2947
3133
  const STORAGE_KEY = TOOLBAR_STORAGE_KEYS.PROJECT;
@@ -2951,10 +3137,8 @@ const useDevServerContext = ()=>{
2951
3137
  if (!context) throw new Error('useDevServerContext must be used within DevServerProvider');
2952
3138
  return context;
2953
3139
  };
2954
- const DevServerProvider = ({ children, config, initialPosition })=>{
2955
- const [toolbarState, setToolbarState] = useState(()=>{
2956
- const savedPosition = loadToolbarPosition();
2957
- return {
3140
+ const DevServerProvider = ({ children, config })=>{
3141
+ const [toolbarState, setToolbarState] = useState(()=>({
2958
3142
  flags: {},
2959
3143
  connectionStatus: 'disconnected',
2960
3144
  lastSyncTime: 0,
@@ -2962,10 +3146,8 @@ const DevServerProvider = ({ children, config, initialPosition })=>{
2962
3146
  error: null,
2963
3147
  sourceEnvironmentKey: null,
2964
3148
  availableProjects: [],
2965
- currentProjectKey: null,
2966
- position: savedPosition || initialPosition || DEFAULT_SETTINGS.position
2967
- };
2968
- });
3149
+ currentProjectKey: null
3150
+ }));
2969
3151
  const devServerClient = useMemo(()=>{
2970
3152
  if (config.devServerUrl) return new DevServerClient(config.devServerUrl, config.projectKey);
2971
3153
  return null;
@@ -3309,29 +3491,20 @@ const DevServerProvider = ({ children, config, initialPosition })=>{
3309
3491
  flagStateManager,
3310
3492
  toolbarState.availableProjects
3311
3493
  ]);
3312
- const handlePositionChange = useCallback((newPosition)=>{
3313
- setToolbarState((prev)=>({
3314
- ...prev,
3315
- position: newPosition
3316
- }));
3317
- saveToolbarPosition(newPosition);
3318
- }, []);
3319
3494
  const value = useMemo(()=>({
3320
3495
  state: toolbarState,
3321
3496
  setOverride,
3322
3497
  clearOverride,
3323
3498
  clearAllOverrides,
3324
3499
  refresh,
3325
- switchProject,
3326
- handlePositionChange
3500
+ switchProject
3327
3501
  }), [
3328
3502
  toolbarState,
3329
3503
  setOverride,
3330
3504
  clearOverride,
3331
3505
  clearAllOverrides,
3332
3506
  refresh,
3333
- switchProject,
3334
- handlePositionChange
3507
+ switchProject
3335
3508
  ]);
3336
3509
  return /*#__PURE__*/ jsx(DevServerContext.Provider, {
3337
3510
  value: value,
@@ -3418,21 +3591,28 @@ function ConnectionStatus(props) {
3418
3591
  });
3419
3592
  }
3420
3593
  function Header(props) {
3421
- const { onClose, onSearch, searchTerm, searchIsExpanded, setSearchIsExpanded, label, mode } = props;
3594
+ const { onClose, onSearch, searchTerm, searchIsExpanded, setSearchIsExpanded, label, mode, onMouseDown } = props;
3422
3595
  const { state, refresh } = useDevServerContext();
3423
3596
  const { connectionStatus } = state;
3424
3597
  const isConnected = 'connected' === connectionStatus;
3598
+ const analytics = useAnalytics();
3425
3599
  const isDevServer = 'dev-server' === mode;
3426
3600
  const showEnvironment = isDevServer && isConnected;
3427
3601
  const showSearch = isDevServer ? isConnected : true;
3428
3602
  const showRefresh = isDevServer;
3429
3603
  const showConnectionStatus = isDevServer;
3604
+ const handleSearch = (term)=>{
3605
+ onSearch(term);
3606
+ analytics.trackSearch(term);
3607
+ };
3430
3608
  return /*#__PURE__*/ jsxs(Fragment, {
3431
3609
  children: [
3432
3610
  /*#__PURE__*/ jsxs("div", {
3433
3611
  className: header,
3434
3612
  children: [
3435
- /*#__PURE__*/ jsx(LogoSection, {}),
3613
+ /*#__PURE__*/ jsx(LogoSection, {
3614
+ onMouseDown: onMouseDown
3615
+ }),
3436
3616
  /*#__PURE__*/ jsx("div", {
3437
3617
  className: centerSection,
3438
3618
  children: (showEnvironment || showSearch) && /*#__PURE__*/ jsx(AnimatePresence, {
@@ -3456,7 +3636,7 @@ function Header(props) {
3456
3636
  },
3457
3637
  children: /*#__PURE__*/ jsx(SearchSection, {
3458
3638
  searchTerm: searchTerm,
3459
- onSearch: onSearch,
3639
+ onSearch: handleSearch,
3460
3640
  setSearchIsExpanded: setSearchIsExpanded
3461
3641
  })
3462
3642
  }, "search") : showEnvironment ? /*#__PURE__*/ jsx(motion.div, {
@@ -3547,7 +3727,7 @@ const Tabs_Tabs = /*#__PURE__*/ react.forwardRef(function(props, ref) {
3547
3727
  }, []);
3548
3728
  useEffect(()=>{
3549
3729
  updateIndicatorPosition();
3550
- const timeoutId = setTimeout(updateIndicatorPosition, 200);
3730
+ const timeoutId = setTimeout(updateIndicatorPosition, 250);
3551
3731
  return ()=>clearTimeout(timeoutId);
3552
3732
  }, [
3553
3733
  currentActiveTab,
@@ -4367,17 +4547,26 @@ function LocalObjectFlagControl(props) {
4367
4547
  function FlagSdkOverrideTabContentInner(props) {
4368
4548
  const { flagOverridePlugin } = props;
4369
4549
  const { searchTerm } = useSearchContext();
4550
+ const analytics = useAnalytics();
4370
4551
  const { flags, isLoading } = useFlagSdkOverrideContext();
4371
4552
  const [showOverriddenOnly, setShowOverriddenOnly] = useState(false);
4372
4553
  const parentRef = useRef(null);
4373
4554
  const handleClearOverride = useCallback((flagKey)=>{
4374
- if (flagOverridePlugin) flagOverridePlugin.removeOverride(flagKey);
4555
+ if (flagOverridePlugin) {
4556
+ flagOverridePlugin.removeOverride(flagKey);
4557
+ analytics.trackFlagOverride(flagKey, null, 'remove');
4558
+ }
4375
4559
  }, [
4376
- flagOverridePlugin
4560
+ flagOverridePlugin,
4561
+ analytics
4377
4562
  ]);
4378
4563
  const totalOverriddenFlags = useMemo(()=>Object.values(flags).filter((flag)=>flag.isOverridden).length, [
4379
4564
  flags
4380
4565
  ]);
4566
+ const showOverridesOnlyChanged = (enabled)=>{
4567
+ setShowOverriddenOnly(enabled);
4568
+ analytics.trackShowOverridesOnlyClick(enabled);
4569
+ };
4381
4570
  const flagEntries = Object.entries(flags);
4382
4571
  const filteredFlags = flagEntries.filter(([flagKey, flag])=>{
4383
4572
  const matchesSearch = flag.name.toLowerCase().includes(searchTerm.toLowerCase()) || flagKey.toLowerCase().includes(searchTerm.trim().toLowerCase());
@@ -4397,9 +4586,15 @@ function FlagSdkOverrideTabContentInner(props) {
4397
4586
  const ldClient = flagOverridePlugin.getClient();
4398
4587
  const handleSetOverride = (flagKey, value)=>{
4399
4588
  flagOverridePlugin.setOverride(flagKey, value);
4589
+ analytics.trackFlagOverride(flagKey, value, 'set');
4400
4590
  };
4401
4591
  const handleClearAllOverrides = ()=>{
4592
+ const currentOverrides = flagOverridePlugin.getAllOverrides();
4593
+ const overrideCount = Object.keys(currentOverrides).length;
4402
4594
  flagOverridePlugin.clearAllOverrides();
4595
+ analytics.trackFlagOverride('*', {
4596
+ count: overrideCount
4597
+ }, 'clear_all');
4403
4598
  };
4404
4599
  const renderFlagControl = (flag)=>{
4405
4600
  const handleOverride = (value)=>handleSetOverride(flag.key, value);
@@ -4449,7 +4644,7 @@ function FlagSdkOverrideTabContentInner(props) {
4449
4644
  children: [
4450
4645
  /*#__PURE__*/ jsx("button", {
4451
4646
  className: `${toggleButton} ${showOverriddenOnly ? active : ''}`,
4452
- onClick: ()=>setShowOverriddenOnly((prev)=>!prev),
4647
+ onClick: ()=>showOverridesOnlyChanged(!showOverriddenOnly),
4453
4648
  "data-testid": "show-overrides-only-button",
4454
4649
  "aria-label": showOverriddenOnly ? 'Show all flags' : 'Show only overridden flags',
4455
4650
  children: "Show overrides only"
@@ -4579,11 +4774,6 @@ function DoNotTrackWarning() {
4579
4774
  })
4580
4775
  });
4581
4776
  }
4582
- function isDoNotTrackEnabled() {
4583
- let flag;
4584
- if ('undefined' != typeof window && window.navigator) flag = void 0 !== window.navigator.doNotTrack ? window.navigator.doNotTrack : void 0 !== window.navigator.msDoNotTrack ? window.navigator.msDoNotTrack : window.doNotTrack;
4585
- return 1 === flag || true === flag || '1' === flag || 'yes' === flag;
4586
- }
4587
4777
  var HPD5XNmW7Wxmjh37F_nCHZ6uCwAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/TabContent/EventsTabContent.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA6VW247bIBB9369AqiptH4jwNQn70l/B9hCzwWAB3iSt+u+VsdfBa3sv7VMuwzlnbszw8ww3blgDFvFYxc83iX4/IES++w+EdMtK4W4URU/+tzNMWa5NQ5EtmYTH6Edv+POAULYEkV2yBdvFEzAiX5f787Ab/CUe2bKqEupE0aG9opi01/5UoU0FBhfaOd1QFLVXZLUUFXph5hFj2eJSS23wybAb3hPiqQtWnk9Gd6oarHT19MGfnpyIvBNcK4et+AUURfHgwjsU6SjoURcQp9pRlBES0MYDrYTrmJBK2FayG/X/PY02XAkDpRNa0V6va1RvObGWonTwohEKX0TlaopI/1u/gOFSXyiqRVWBP98wcxIKm8GPKO+RkyPJIr6ReeZ8SsgHMcdjzGsOOLg6fDeAlKK1wvamSy0cYNuyEihS+mJYuwxrcjb952JMFNmCIlqJNxvinXovbq8on7WeYZXo7FQHH2LQ0l3bgimZhd4owTkwPkrPRnbZrAa592nZnt9InvE0DwL8VkWcQRZg91tYDjwp9yH2GKeEQIA9eOzYHhK485dstRuZFCeFhYPGUlSCcmACoqMnmkCF1OU5NNO6rz5V2j3SSlhWSKh+eMwnOupz1zafl5ltpSWChB3YLKUFMB6mpdjCpkWW5UmI5QlPeR5gyy3s8RgVUTHDQslKFmCrLWx2iMrDrJRwrDLOAyxs6rIkjeK5brVnoS7fwib7NMqimW4GeygC7Mlj6/uYGPrnftlZ53T/jy2NlrJg5qPZOyyGlhlQbg4cB4KrhQo9GJrL+/Epkf1CJOCi+ALFWTg8UXniUXq8HfdU0S8QYVd3zdveem8Hrc+at4H/n9L+c0prGoaV54XGejrqMIn9m8APV23FsNoMSObES3gHxbD7pyOssFp2zo9Tp9tx2w0zy3+dkd9pgub4yvofnyej+FskIrvYIvDTfZJ6ns/Aj9f46khF6LmzTvAbLrVyoFxoWlwz/xL4+g48r7u64VAgMjE0K7fi1bvD6p7MhqKvTWRSHA9+yjAlGjak6fXFGu2yIdNYKKw7h4TiQgkXZl4tVnq+vdLfyVIyz5Leehm9Q5G9dk//HPD5XNmW7Wxmjh37F+nCHZ6uCwAA\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
4588
4778
  var HPD5XNmW7Wxmjh37F_nCHZ6uCwAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
4589
4779
  HPD5XNmW7Wxmjh37F_nCHZ6uCwAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
@@ -4598,7 +4788,7 @@ var addButtonContainer = 'f2n2jy8';
4598
4788
  var eventListItem = 'f2n2jyp';
4599
4789
  var eventMeta = 'f2n2jy4';
4600
4790
  var eventBadgeIdentify = 'f2n2jya f2n2jy5';
4601
- var eventName = 'f2n2jy3';
4791
+ var EventsTabContent_css_eventName = 'f2n2jy3';
4602
4792
  var liveTailText = 'f2n2jyn';
4603
4793
  var eventBadgeFeature = 'f2n2jy6 f2n2jy5';
4604
4794
  var eventBadgeCustom = 'f2n2jyb f2n2jy5';
@@ -4699,6 +4889,7 @@ function formatTimeAgo(timestamp, currentDate) {
4699
4889
  function EventsTabContent(props) {
4700
4890
  const { eventInterceptionPlugin, baseUrl } = props;
4701
4891
  const { searchTerm } = useSearchContext();
4892
+ const analytics = useAnalytics();
4702
4893
  const { events, eventStats } = useEvents(eventInterceptionPlugin, searchTerm);
4703
4894
  const currentDate = useCurrentDate();
4704
4895
  const parentRef = useRef(null);
@@ -4706,8 +4897,15 @@ function EventsTabContent(props) {
4706
4897
  const handleClearEvents = ()=>{
4707
4898
  if (eventInterceptionPlugin) eventInterceptionPlugin.clearEvents();
4708
4899
  };
4900
+ const handleEventClick = (event)=>{
4901
+ analytics.trackEventClick(event?.key ?? event.displayName);
4902
+ console.group(`\u{1F4DD} Event Details: [kind: ${event.kind}, displayName: ${event.displayName}]`);
4903
+ console.table(event);
4904
+ console.groupEnd();
4905
+ };
4709
4906
  const handleAddFeatureFlag = (flagKey)=>{
4710
4907
  const url = createFlagDeeplinkUrl(flagKey);
4908
+ analytics.trackOpenFlagDeeplink(flagKey, baseUrl);
4711
4909
  window.open(url, '_blank');
4712
4910
  };
4713
4911
  const createFlagDeeplinkUrl = (flagKey)=>`${baseUrl}/flags/new?selectProject=1&flagKey=${flagKey}`;
@@ -4822,17 +5020,13 @@ function EventsTabContent(props) {
4822
5020
  },
4823
5021
  children: /*#__PURE__*/ jsxs(ListItem, {
4824
5022
  className: eventListItem,
4825
- onClick: ()=>{
4826
- console.group(`\u{1F4DD} Event Details: [kind: ${event.kind}, displayName: ${event.displayName}]`);
4827
- console.table(event);
4828
- console.groupEnd();
4829
- },
5023
+ onClick: ()=>handleEventClick(event),
4830
5024
  children: [
4831
5025
  /*#__PURE__*/ jsxs("div", {
4832
5026
  className: eventInfo,
4833
5027
  children: [
4834
5028
  /*#__PURE__*/ jsx("span", {
4835
- className: eventName,
5029
+ className: EventsTabContent_css_eventName,
4836
5030
  children: event.displayName
4837
5031
  }),
4838
5032
  /*#__PURE__*/ jsx("span", {
@@ -4866,25 +5060,26 @@ function EventsTabContent(props) {
4866
5060
  ]
4867
5061
  });
4868
5062
  }
4869
- var OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/TabContent/SettingsTab.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA6VUQXLbMAy8+xU4Ngd6JMVxXPrYh2RoEZLQUCSHhCy5nfw9Q9pO5NhpM+3JowWxCywAL5/KsmEb9wX8XgDsXNAYxM4xu15C6SeIzpCGvQrfhDBe1M64INqgDmJTFHfbxcti+cYhjYos6o6MvkVnncWLhDK/6lVoyUootgsAr7Qm20oo136CqvATbPyUIo2zLCL9QgllNYNGpLZjCesiE+QC5c2CV7lgAMaJBQdlY+NCL2HwHkOtIqagQWYMInpV5zqK5UMSm1Vd5aobg5OEMqVoit6og8xYApSh1gpi7KOEGi1jSPDPITI1B1E7y2hZQhJBsUMeEW160Sp/7m4meJ8Fr1TSr9AUsGZyVqbOh/6d5iPL6lj2zMXVDRdXf3Wx+jj2hyvi03i+MIqc1aiezGH2cIaK3lmXfboUXd/25BPnsyGnPbqaQvYRrb7gf/yHpu7/t6lNFh1Jc3c8gMTWnSZz/m7IGAn1EAJa/pHU35YhdoHsc76kGev34y2q+rkNbrBaQt59rxJByu3JirNouriMqemMVcUJ+4OGyhpuj6ExbpTQkdbHlc7H9h5AY8hHiik0dsSYLw3Tn8MYlN/OL+vlFZtcuVWeBAAA\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
4870
- var OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
4871
- OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
4872
- OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
4873
- OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.insert = insertBySelector_default().bind(null, "head");
4874
- OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
4875
- OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
4876
- injectStylesIntoStyleTag_default()(OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.A, OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
4877
- OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.A && OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.A.locals && OL_vlFZtcuVWeBAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.A.locals;
4878
- var settingName = '_11ftnsv4';
4879
- var settingInfo = '_11ftnsv2';
4880
- var SettingsTab_css_icon = '_11ftnsv8';
4881
- var settingDetails = '_11ftnsv3';
5063
+ var GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.5.4/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/TabContent/SettingsTab.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA6VUy3LbMAy8+ytwbA/0SIrjOvSxH5KhRUhCQ5EcErbkdPLvHdKPyI+kmfakEUDurhZYzZ/LsmEbdwX8ngFsXNAYxMYxu15C6UeIzpCGnQrfhDBe1M64INqg9mJVFN/Xs7fZ/IwhjYos6o6MvgdnncWLC2U+1avQkpVQrGcAXmlNtpVQLv0IVeFHWPkxdRpnWUR6RQllNSkNSG3HEpZFBsgC5V3BiywYgHFkwUHZ2LjQS9h6j6FWEVPTIDMGEb2qs45i/pjIJqqrrPqOnI2qX9rgtlaLT1Q8Xdv2cMAzOEooE46m6I3ay1xLBWWotYIY+yihRssYUvnXNjI1e1E7y2hZQhKNYoM8INp0olX+JG9CuMiENyzpKTQFrJmclcnJbf8Oc43yeGPD4s5UFn+dSnXtx/Ijf78w2nyrUT2Z/eTgpCp6Z1326ZL0x31PPnA+G3Lcy5spZB/R6gv81T981MP/ftRTJh1Ic3cIVELrjpM5vTdkjIR6GwJa/pnYz8sQu0D2JSdzgqoO2T4vu4ScJa8SQLrbkxUn0pTgXFPjqVYVx9onHJvM4XYYGuMGCR1pfVjpHN73BhpDPlJMraEjxpxcTD+bISi/nibr7Q/GMgCb7gQAAA==\"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
5064
+ var GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
5065
+ GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
5066
+ GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
5067
+ GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.insert = insertBySelector_default().bind(null, "head");
5068
+ GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
5069
+ GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
5070
+ injectStylesIntoStyleTag_default()(GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.A, GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
5071
+ GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.A && GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.A.locals && GMgCb7gQAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.A.locals;
5072
+ var settingName = '_11ftnsv5';
5073
+ var SettingsTab_css_switch_ = '_11ftnsv2';
5074
+ var settingInfo = '_11ftnsv3';
5075
+ var SettingsTab_css_icon = '_11ftnsv9';
5076
+ var settingDetails = '_11ftnsv4';
4882
5077
  var settingsGroup = '_11ftnsv0';
4883
- var SettingsTab_css_statusText = '_11ftnsv7';
5078
+ var SettingsTab_css_statusText = '_11ftnsv8';
4884
5079
  var settingsGroupTitle = '_11ftnsv1';
4885
- var settingValue = '_11ftnsv5';
4886
- var SettingsTab_css_statusIndicator = '_11ftnsv6';
4887
- var SettingsTab_css_select = '_11ftnsv9';
5080
+ var settingValue = '_11ftnsv6';
5081
+ var SettingsTab_css_statusIndicator = '_11ftnsv7';
5082
+ var SettingsTab_css_select = '_11ftnsva';
4888
5083
  function ProjectSelector(props) {
4889
5084
  const { availableProjects, currentProject, onProjectChange, isLoading } = props;
4890
5085
  const handleProjectSelect = (key)=>{
@@ -4925,7 +5120,7 @@ function ProjectSelector(props) {
4925
5120
  function PositionSelector(props) {
4926
5121
  const { currentPosition, onPositionChange } = props;
4927
5122
  function getPositionsDisplayName(position) {
4928
- return position.charAt(0).toUpperCase() + position.slice(1);
5123
+ return position.split('-').map((part)=>part.charAt(0).toUpperCase() + part.slice(1)).join(' ');
4929
5124
  }
4930
5125
  const handlePositionSelect = (key)=>{
4931
5126
  if (key && 'string' == typeof key) {
@@ -4963,10 +5158,16 @@ function PositionSelector(props) {
4963
5158
  }
4964
5159
  function PinToggle(props) {
4965
5160
  const { isPinned, onTogglePin } = props;
5161
+ const analytics = useAnalytics();
5162
+ const handleToggle = (isSelected)=>{
5163
+ analytics.trackPinToggle(isSelected ? 'pin' : 'unpin');
5164
+ onTogglePin();
5165
+ };
4966
5166
  return /*#__PURE__*/ jsx(Switch, {
5167
+ className: SettingsTab_css_switch_,
4967
5168
  "data-theme": "dark",
4968
5169
  isSelected: isPinned,
4969
- onChange: onTogglePin,
5170
+ onChange: handleToggle,
4970
5171
  "aria-label": "Pin toolbar"
4971
5172
  });
4972
5173
  }
@@ -4997,9 +5198,10 @@ function ConnectionStatusDisplay(props) {
4997
5198
  }
4998
5199
  function SettingsTabContent(props) {
4999
5200
  const { mode, isPinned, onTogglePin } = props;
5000
- const { state, switchProject, handlePositionChange } = useDevServerContext();
5201
+ const { state, switchProject } = useDevServerContext();
5202
+ const { position, handlePositionChange } = useToolbarUIContext();
5001
5203
  const { searchTerm } = useSearchContext();
5002
- const position = state.position;
5204
+ const analytics = useAnalytics();
5003
5205
  const handleProjectSwitch = async (projectKey)=>{
5004
5206
  try {
5005
5207
  await switchProject(projectKey);
@@ -5008,6 +5210,7 @@ function SettingsTabContent(props) {
5008
5210
  }
5009
5211
  };
5010
5212
  const handlePositionSelect = (newPosition)=>{
5213
+ analytics.trackPositionChange(position, newPosition, 'settings');
5011
5214
  handlePositionChange(newPosition);
5012
5215
  };
5013
5216
  const getSettingsGroups = ()=>{
@@ -5243,16 +5446,19 @@ function getHeaderLabel(currentProjectKey, sourceEnvironmentKey) {
5243
5446
  if (currentProjectKey && sourceEnvironmentKey) label = `${currentProjectKey} - ${sourceEnvironmentKey}`;
5244
5447
  return label;
5245
5448
  }
5246
- function ExpandedToolbarContent(props) {
5247
- const { isExpanded, activeTab, slideDirection, searchTerm, searchIsExpanded, onSearch, onClose, onTogglePin, isPinned, onTabChange, setSearchIsExpanded, mode, flagOverridePlugin, eventInterceptionPlugin, baseUrl } = props;
5449
+ const ExpandedToolbarContent = /*#__PURE__*/ react.forwardRef((props, ref)=>{
5450
+ const { activeTab, slideDirection, searchTerm, searchIsExpanded, onSearch, onClose, onTogglePin, isPinned, onTabChange, setSearchIsExpanded, mode, flagOverridePlugin, eventInterceptionPlugin, baseUrl, defaultActiveTab, onHeaderMouseDown } = props;
5248
5451
  const { state } = useDevServerContext();
5249
5452
  const headerLabel = getHeaderLabel(state.currentProjectKey, state.sourceEnvironmentKey);
5250
5453
  const { error } = state;
5251
5454
  const availableTabs = getTabsForMode(mode, !!flagOverridePlugin, !!eventInterceptionPlugin);
5252
- const defaultActiveTab = getDefaultActiveTab(mode, !!flagOverridePlugin, !!eventInterceptionPlugin);
5253
5455
  const shouldShowError = error && 'dev-server' === mode && 'error' === state.connectionStatus;
5254
5456
  return /*#__PURE__*/ jsxs(motion.div, {
5457
+ ref: ref,
5255
5458
  className: toolbarContent,
5459
+ tabIndex: 0,
5460
+ role: "group",
5461
+ "aria-label": "LaunchDarkly developer toolbar content",
5256
5462
  initial: {
5257
5463
  opacity: 0,
5258
5464
  y: 10,
@@ -5270,66 +5476,65 @@ function ExpandedToolbarContent(props) {
5270
5476
  },
5271
5477
  transition: ANIMATION_CONFIG.toolbarContent,
5272
5478
  children: [
5273
- /*#__PURE__*/ jsx(AnimatePresence, {
5274
- children: isExpanded && /*#__PURE__*/ jsxs(motion.div, {
5275
- className: contentArea,
5276
- initial: {
5277
- opacity: 0,
5278
- maxHeight: 0
5279
- },
5280
- animate: {
5281
- opacity: 1,
5282
- maxHeight: 600
5283
- },
5284
- exit: {
5285
- opacity: 0,
5286
- maxHeight: 0
5287
- },
5288
- transition: ANIMATION_CONFIG.contentArea,
5289
- children: [
5290
- /*#__PURE__*/ jsx(Header, {
5291
- onSearch: onSearch,
5292
- searchTerm: searchTerm,
5293
- onClose: onClose,
5294
- searchIsExpanded: searchIsExpanded,
5295
- setSearchIsExpanded: setSearchIsExpanded,
5296
- label: headerLabel,
5297
- mode: mode
5298
- }),
5299
- shouldShowError && /*#__PURE__*/ jsx(ErrorMessage, {
5300
- error: error
5301
- }),
5302
- !shouldShowError && /*#__PURE__*/ jsx(motion.div, {
5303
- className: scrollableContent,
5304
- initial: {
5305
- opacity: 0,
5306
- y: -10
5307
- },
5308
- animate: {
5309
- opacity: 1,
5310
- y: 0
5311
- },
5312
- transition: {
5313
- duration: 0.3,
5314
- ease: EASING.elastic,
5315
- delay: 0.1
5316
- },
5317
- children: /*#__PURE__*/ jsx(AnimatePresence, {
5318
- mode: "wait",
5319
- children: activeTab && /*#__PURE__*/ jsx(TabContentRenderer, {
5320
- activeTab: activeTab,
5321
- baseUrl: baseUrl,
5322
- slideDirection: slideDirection,
5323
- mode: mode,
5324
- flagOverridePlugin: flagOverridePlugin,
5325
- eventInterceptionPlugin: eventInterceptionPlugin,
5326
- isPinned: isPinned,
5327
- onTogglePin: onTogglePin
5328
- })
5479
+ /*#__PURE__*/ jsxs(motion.div, {
5480
+ className: contentArea,
5481
+ initial: {
5482
+ opacity: 0,
5483
+ y: -10
5484
+ },
5485
+ animate: {
5486
+ opacity: 1,
5487
+ y: 0
5488
+ },
5489
+ exit: {
5490
+ opacity: 0,
5491
+ y: -10
5492
+ },
5493
+ transition: ANIMATION_CONFIG.contentArea,
5494
+ children: [
5495
+ /*#__PURE__*/ jsx(Header, {
5496
+ onSearch: onSearch,
5497
+ searchTerm: searchTerm,
5498
+ onClose: onClose,
5499
+ searchIsExpanded: searchIsExpanded,
5500
+ setSearchIsExpanded: setSearchIsExpanded,
5501
+ label: headerLabel,
5502
+ mode: mode,
5503
+ onMouseDown: onHeaderMouseDown
5504
+ }),
5505
+ shouldShowError && /*#__PURE__*/ jsx(ErrorMessage, {
5506
+ error: error
5507
+ }),
5508
+ !shouldShowError && /*#__PURE__*/ jsx(motion.div, {
5509
+ className: scrollableContent,
5510
+ initial: {
5511
+ opacity: 0,
5512
+ y: -10
5513
+ },
5514
+ animate: {
5515
+ opacity: 1,
5516
+ y: 0
5517
+ },
5518
+ transition: {
5519
+ duration: 0.25,
5520
+ ease: EASING.smooth,
5521
+ delay: 0.05
5522
+ },
5523
+ children: /*#__PURE__*/ jsx(AnimatePresence, {
5524
+ mode: "wait",
5525
+ children: activeTab && /*#__PURE__*/ jsx(TabContentRenderer, {
5526
+ activeTab: activeTab,
5527
+ baseUrl: baseUrl,
5528
+ slideDirection: slideDirection,
5529
+ mode: mode,
5530
+ flagOverridePlugin: flagOverridePlugin,
5531
+ eventInterceptionPlugin: eventInterceptionPlugin,
5532
+ isPinned: isPinned,
5533
+ onTogglePin: onTogglePin
5329
5534
  })
5330
5535
  })
5331
- ]
5332
- })
5536
+ })
5537
+ ]
5333
5538
  }),
5334
5539
  /*#__PURE__*/ jsx(motion.div, {
5335
5540
  className: tabsContainer,
@@ -5380,44 +5585,12 @@ function ExpandedToolbarContent(props) {
5380
5585
  })
5381
5586
  ]
5382
5587
  }, "toolbar-content");
5383
- }
5384
- function useKeyPressed(targetKey) {
5385
- const [keyPressed, setKeyPressed] = useState(false);
5386
- useEffect(()=>{
5387
- const downHandler = (event)=>{
5388
- if (event.key === targetKey) setKeyPressed(true);
5389
- };
5390
- const upHandler = (event)=>{
5391
- if (event.key === targetKey) setKeyPressed(false);
5392
- };
5393
- const resetKeyState = ()=>{
5394
- setKeyPressed(false);
5395
- };
5396
- const visibilityChangeHandler = ()=>{
5397
- if (document.hidden) resetKeyState();
5398
- };
5399
- window.addEventListener('keydown', downHandler);
5400
- window.addEventListener('keyup', upHandler);
5401
- window.addEventListener('blur', resetKeyState);
5402
- window.addEventListener('focusout', resetKeyState);
5403
- document.addEventListener('visibilitychange', visibilityChangeHandler);
5404
- window.addEventListener('focus', resetKeyState);
5405
- return ()=>{
5406
- window.removeEventListener('keydown', downHandler);
5407
- window.removeEventListener('keyup', upHandler);
5408
- window.removeEventListener('blur', resetKeyState);
5409
- window.removeEventListener('focusout', resetKeyState);
5410
- document.removeEventListener('visibilitychange', visibilityChangeHandler);
5411
- window.removeEventListener('focus', resetKeyState);
5412
- };
5413
- }, [
5414
- targetKey
5415
- ]);
5416
- return keyPressed;
5417
- }
5418
- function useToolbarState() {
5588
+ });
5589
+ function useToolbarState(props) {
5590
+ const { defaultActiveTab } = props;
5591
+ const { setSearchTerm } = useSearchContext();
5592
+ const analytics = useAnalytics();
5419
5593
  const [isExpanded, setIsExpanded] = useState(false);
5420
- const [isHovered, setIsHovered] = useState(false);
5421
5594
  const [activeTab, setActiveTab] = useState();
5422
5595
  const [previousTab, setPreviousTab] = useState();
5423
5596
  const [isAnimating, setIsAnimating] = useState(false);
@@ -5425,15 +5598,6 @@ function useToolbarState() {
5425
5598
  const [isPinned, setIsPinned] = useState(()=>loadToolbarPinned());
5426
5599
  const hasBeenExpandedRef = useRef(false);
5427
5600
  const toolbarRef = useRef(null);
5428
- const isMetaPressed = useKeyPressed('Meta');
5429
- const isControlPressed = useKeyPressed('Control');
5430
- const isDragModifierPressed = isMetaPressed || isControlPressed;
5431
- const { setSearchTerm } = useSearchContext();
5432
- const showFullToolbar = useMemo(()=>isExpanded || isHovered && !isExpanded && !isDragModifierPressed, [
5433
- isExpanded,
5434
- isHovered,
5435
- isDragModifierPressed
5436
- ]);
5437
5601
  const slideDirection = useMemo(()=>{
5438
5602
  if (!activeTab || !previousTab) return 1;
5439
5603
  const currentIndex = TAB_ORDER.indexOf(activeTab);
@@ -5448,7 +5612,12 @@ function useToolbarState() {
5448
5612
  setSearchIsExpanded(false);
5449
5613
  setSearchTerm('');
5450
5614
  const newTabId = tabId;
5451
- if (newTabId === activeTab && isExpanded) return void setIsExpanded(false);
5615
+ if (newTabId === activeTab && isExpanded) {
5616
+ analytics.trackToolbarToggle('collapse', 'tab_toggle');
5617
+ setIsExpanded(false);
5618
+ return;
5619
+ }
5620
+ analytics.trackTabChange(activeTab || null, newTabId);
5452
5621
  setPreviousTab(activeTab);
5453
5622
  setActiveTab(newTabId);
5454
5623
  if (!isExpanded) setIsExpanded(true);
@@ -5456,19 +5625,17 @@ function useToolbarState() {
5456
5625
  activeTab,
5457
5626
  isExpanded,
5458
5627
  setSearchTerm,
5459
- isAnimating
5628
+ isAnimating,
5629
+ analytics
5460
5630
  ]);
5461
- const handleMouseEnter = useCallback(()=>{
5462
- setIsHovered(true);
5463
- }, []);
5464
- const handleMouseLeave = useCallback(()=>{
5465
- setIsHovered(false);
5466
- }, []);
5467
5631
  const handleClose = useCallback(()=>{
5632
+ analytics.trackToolbarToggle('collapse', 'close_button');
5468
5633
  setIsExpanded(false);
5469
5634
  setIsPinned(false);
5470
5635
  saveToolbarPinned(false);
5471
- }, []);
5636
+ }, [
5637
+ analytics
5638
+ ]);
5472
5639
  const handleSearch = useCallback((newSearchTerm)=>{
5473
5640
  setSearchTerm(newSearchTerm);
5474
5641
  }, [
@@ -5481,22 +5648,27 @@ function useToolbarState() {
5481
5648
  return newValue;
5482
5649
  });
5483
5650
  }, []);
5484
- useEffect(()=>{
5485
- if (showFullToolbar) hasBeenExpandedRef.current = true;
5651
+ const handleCircleClick = useCallback(()=>{
5652
+ if (!isExpanded) {
5653
+ if (!activeTab) setActiveTab(defaultActiveTab);
5654
+ setIsExpanded(true);
5655
+ }
5486
5656
  }, [
5487
- showFullToolbar
5657
+ isExpanded,
5658
+ activeTab,
5659
+ defaultActiveTab
5488
5660
  ]);
5489
5661
  useEffect(()=>{
5490
- if (!isExpanded) {
5491
- setActiveTab(void 0);
5492
- setPreviousTab(void 0);
5493
- }
5662
+ if (isExpanded) hasBeenExpandedRef.current = true;
5494
5663
  }, [
5495
5664
  isExpanded
5496
5665
  ]);
5497
5666
  useEffect(()=>{
5498
5667
  const handleClickOutside = (event)=>{
5499
- if (isExpanded && !isPinned && toolbarRef.current && !toolbarRef.current.contains(event.target)) setIsExpanded(false);
5668
+ if (isExpanded && !isPinned && toolbarRef.current && !toolbarRef.current.contains(event.target)) {
5669
+ analytics.trackToolbarToggle('collapse', 'click_outside');
5670
+ setIsExpanded(false);
5671
+ }
5500
5672
  };
5501
5673
  document.addEventListener('mousedown', handleClickOutside);
5502
5674
  return ()=>{
@@ -5504,64 +5676,32 @@ function useToolbarState() {
5504
5676
  };
5505
5677
  }, [
5506
5678
  isExpanded,
5507
- isPinned
5679
+ isPinned,
5680
+ analytics
5508
5681
  ]);
5509
5682
  return {
5510
5683
  isExpanded,
5511
- isHovered,
5512
5684
  activeTab,
5513
5685
  previousTab,
5514
5686
  isAnimating,
5515
5687
  searchIsExpanded,
5516
- showFullToolbar,
5517
5688
  slideDirection,
5518
5689
  hasBeenExpanded: hasBeenExpandedRef.current,
5519
- isDragModifierPressed,
5520
5690
  isPinned,
5521
5691
  toolbarRef,
5522
5692
  handleTabChange,
5523
- handleMouseEnter,
5524
- handleMouseLeave,
5525
5693
  handleClose,
5526
5694
  handleSearch,
5527
5695
  handleTogglePin,
5696
+ handleCircleClick,
5528
5697
  setIsAnimating,
5529
5698
  setSearchIsExpanded
5530
5699
  };
5531
5700
  }
5532
- function useToolbarAnimations(props) {
5533
- const { showFullToolbar, isHovered, setIsAnimating } = props;
5534
- const containerAnimations = useMemo(()=>({
5535
- width: showFullToolbar ? DIMENSIONS.expanded.width : DIMENSIONS.collapsed.width,
5536
- height: showFullToolbar ? 'auto' : DIMENSIONS.collapsed.height,
5537
- borderRadius: showFullToolbar ? DIMENSIONS.expanded.borderRadius : DIMENSIONS.collapsed.borderRadius,
5538
- scale: showFullToolbar ? DIMENSIONS.scale.expanded : DIMENSIONS.scale.collapsed,
5539
- boxShadow: showFullToolbar ? SHADOWS.expanded : isHovered ? SHADOWS.hoveredCollapsed : SHADOWS.collapsed
5540
- }), [
5541
- showFullToolbar,
5542
- isHovered
5543
- ]);
5544
- const handleAnimationStart = useCallback(()=>{
5545
- setIsAnimating(true);
5546
- }, [
5547
- setIsAnimating
5548
- ]);
5549
- const handleAnimationComplete = useCallback(()=>{
5550
- setIsAnimating(false);
5551
- }, [
5552
- setIsAnimating
5553
- ]);
5554
- return {
5555
- containerAnimations,
5556
- animationConfig: ANIMATION_CONFIG.container,
5557
- handleAnimationStart,
5558
- handleAnimationComplete
5559
- };
5560
- }
5561
5701
  function useToolbarDrag({ enabled, onDragEnd, elementRef }) {
5702
+ const draggedRef = useRef(false);
5562
5703
  const handleMouseDown = useCallback((event)=>{
5563
5704
  if (!enabled || !elementRef.current) return;
5564
- event.preventDefault();
5565
5705
  const startPosition = {
5566
5706
  x: event.clientX,
5567
5707
  y: event.clientY
@@ -5577,13 +5717,21 @@ function useToolbarDrag({ enabled, onDragEnd, elementRef }) {
5577
5717
  x: mouseEvent.clientX - startPosition.x,
5578
5718
  y: mouseEvent.clientY - startPosition.y
5579
5719
  };
5580
- const newPosition = {
5581
- x: initialPosition.x + offset.x,
5582
- y: initialPosition.y + offset.y
5583
- };
5584
- elementRef.current.style.left = `${newPosition.x}px`;
5585
- elementRef.current.style.top = `${newPosition.y}px`;
5720
+ const distance = Math.sqrt(offset.x * offset.x + offset.y * offset.y);
5721
+ if (distance > DRAG_CONSTANTS.THRESHOLD_PIXELS && !draggedRef.current) {
5722
+ draggedRef.current = true;
5723
+ document.addEventListener('selectstart', preventDefault);
5724
+ }
5725
+ if (draggedRef.current) {
5726
+ const newPosition = {
5727
+ x: initialPosition.x + offset.x,
5728
+ y: initialPosition.y + offset.y
5729
+ };
5730
+ elementRef.current.style.left = `${newPosition.x}px`;
5731
+ elementRef.current.style.top = `${newPosition.y}px`;
5732
+ }
5586
5733
  };
5734
+ const preventDefault = (e)=>e.preventDefault();
5587
5735
  const resetElementStyles = ()=>{
5588
5736
  if (elementRef.current) {
5589
5737
  elementRef.current.style.left = '';
@@ -5597,8 +5745,12 @@ function useToolbarDrag({ enabled, onDragEnd, elementRef }) {
5597
5745
  const handleDragComplete = (upEvent)=>{
5598
5746
  document.removeEventListener('mousemove', updateElementPosition);
5599
5747
  document.removeEventListener('mouseup', handleDragComplete);
5748
+ document.removeEventListener('selectstart', preventDefault);
5600
5749
  resetElementStyles();
5601
- onDragEnd(upEvent.clientX);
5750
+ if (draggedRef.current) onDragEnd(upEvent.clientX, upEvent.clientY);
5751
+ setTimeout(()=>{
5752
+ draggedRef.current = false;
5753
+ }, DRAG_CONSTANTS.CLICK_RESET_DELAY_MS);
5602
5754
  };
5603
5755
  document.addEventListener('mousemove', updateElementPosition);
5604
5756
  document.addEventListener('mouseup', handleDragComplete);
@@ -5607,8 +5759,54 @@ function useToolbarDrag({ enabled, onDragEnd, elementRef }) {
5607
5759
  onDragEnd,
5608
5760
  elementRef
5609
5761
  ]);
5762
+ const isDragging = useCallback(()=>draggedRef.current, []);
5763
+ return {
5764
+ handleMouseDown,
5765
+ isDragging
5766
+ };
5767
+ }
5768
+ function useToolbarAnimations(props) {
5769
+ const { isExpanded, setIsAnimating, onExpandComplete, onCollapseComplete } = props;
5770
+ const previousIsExpanded = useRef(isExpanded);
5771
+ const containerAnimations = useMemo(()=>({
5772
+ width: isExpanded ? DIMENSIONS.expanded.width : DIMENSIONS.collapsed.width,
5773
+ height: isExpanded ? 'fit-content' : DIMENSIONS.collapsed.height,
5774
+ borderRadius: isExpanded ? DIMENSIONS.expanded.borderRadius : DIMENSIONS.collapsed.borderRadius,
5775
+ scale: isExpanded ? DIMENSIONS.scale.expanded : DIMENSIONS.scale.collapsed,
5776
+ boxShadow: isExpanded ? SHADOWS.expanded : SHADOWS.collapsed
5777
+ }), [
5778
+ isExpanded
5779
+ ]);
5780
+ const animationConfig = useMemo(()=>{
5781
+ const wasExpanded = previousIsExpanded.current;
5782
+ const currentlyExpanded = isExpanded;
5783
+ previousIsExpanded.current = isExpanded;
5784
+ if (!wasExpanded && currentlyExpanded) return ANIMATION_CONFIG.containerExpand;
5785
+ if (wasExpanded && !currentlyExpanded) return ANIMATION_CONFIG.containerCollapse;
5786
+ return ANIMATION_CONFIG.containerExpand;
5787
+ }, [
5788
+ isExpanded
5789
+ ]);
5790
+ const handleAnimationStart = useCallback(()=>{
5791
+ setIsAnimating(true);
5792
+ }, [
5793
+ setIsAnimating
5794
+ ]);
5795
+ const handleAnimationComplete = useCallback(()=>{
5796
+ setIsAnimating(false);
5797
+ if (isExpanded && onExpandComplete) onExpandComplete();
5798
+ else if (!isExpanded && onCollapseComplete) onCollapseComplete();
5799
+ }, [
5800
+ setIsAnimating,
5801
+ isExpanded,
5802
+ onExpandComplete,
5803
+ onCollapseComplete
5804
+ ]);
5610
5805
  return {
5611
- handleMouseDown
5806
+ containerAnimations,
5807
+ animationConfig,
5808
+ handleAnimationStart,
5809
+ handleAnimationComplete
5612
5810
  };
5613
5811
  }
5614
5812
  const useToolbarVisibility_STORAGE_KEY = TOOLBAR_STORAGE_KEYS.DISABLED;
@@ -5660,52 +5858,91 @@ function useToolbarVisibility() {
5660
5858
  function LdToolbar(props) {
5661
5859
  const { mode, flagOverridePlugin, eventInterceptionPlugin, baseUrl } = props;
5662
5860
  const { searchTerm } = useSearchContext();
5663
- const { state, handlePositionChange } = useDevServerContext();
5664
- const toolbarState = useToolbarState();
5665
- const position = state.position;
5666
- const { isExpanded, activeTab, slideDirection, searchIsExpanded, showFullToolbar, hasBeenExpanded, toolbarRef, handleTabChange, handleMouseEnter, handleMouseLeave, handleClose, handleSearch, handleTogglePin, isPinned, setSearchIsExpanded, setIsAnimating, isHovered, isDragModifierPressed } = toolbarState;
5667
- const toolbarAnimations = useToolbarAnimations({
5668
- showFullToolbar,
5669
- isHovered,
5670
- setIsAnimating
5861
+ const { position, handlePositionChange } = useToolbarUIContext();
5862
+ const analytics = useAnalytics();
5863
+ const defaultActiveTab = getDefaultActiveTab(mode, !!flagOverridePlugin, !!eventInterceptionPlugin);
5864
+ const toolbarState = useToolbarState({
5865
+ defaultActiveTab
5671
5866
  });
5672
- const { containerAnimations, animationConfig, handleAnimationStart, handleAnimationComplete } = toolbarAnimations;
5673
- const isDragEnabled = !showFullToolbar && isHovered && isDragModifierPressed;
5674
- const handleDragEnd = useCallback((clientX)=>{
5867
+ const circleButtonRef = useRef(null);
5868
+ const expandedContentRef = useRef(null);
5869
+ const { activeTab, slideDirection, searchIsExpanded, isExpanded, toolbarRef, handleTabChange, handleClose, handleSearch, handleTogglePin, handleCircleClick, isPinned, setSearchIsExpanded, setIsAnimating } = toolbarState;
5870
+ const focusExpandedToolbar = useCallback(()=>{
5871
+ if (expandedContentRef.current) expandedContentRef.current.focus();
5872
+ }, [
5873
+ expandedContentRef
5874
+ ]);
5875
+ const focusCollapsedToolbar = useCallback(()=>{
5876
+ if (circleButtonRef.current) circleButtonRef.current.focus();
5877
+ }, [
5878
+ circleButtonRef
5879
+ ]);
5880
+ const handleDragEnd = useCallback((clientX, clientY)=>{
5675
5881
  const screenWidth = window.innerWidth;
5676
- const newPosition = clientX < screenWidth / 2 ? 'left' : 'right';
5882
+ const screenHeight = window.innerHeight;
5883
+ const isLeft = clientX < screenWidth / 2;
5884
+ const isTop = clientY < screenHeight / 2;
5885
+ const newPosition = isTop ? isLeft ? 'top-left' : 'top-right' : isLeft ? 'bottom-left' : 'bottom-right';
5886
+ if (newPosition !== position) analytics.trackPositionChange(position, newPosition, 'drag');
5677
5887
  handlePositionChange(newPosition);
5678
5888
  }, [
5679
- handlePositionChange
5889
+ handlePositionChange,
5890
+ position,
5891
+ analytics
5680
5892
  ]);
5681
- const { handleMouseDown } = useToolbarDrag({
5682
- enabled: isDragEnabled,
5893
+ const { handleMouseDown, isDragging } = useToolbarDrag({
5894
+ enabled: true,
5683
5895
  onDragEnd: handleDragEnd,
5684
5896
  elementRef: toolbarRef
5685
5897
  });
5898
+ const { containerAnimations, animationConfig, handleAnimationStart, handleAnimationComplete } = useToolbarAnimations({
5899
+ isExpanded,
5900
+ setIsAnimating,
5901
+ onExpandComplete: focusExpandedToolbar,
5902
+ onCollapseComplete: focusCollapsedToolbar
5903
+ });
5904
+ const handleCircleClickWithDragCheck = useCallback(()=>{
5905
+ if (!isDragging()) handleCircleClick();
5906
+ }, [
5907
+ handleCircleClick,
5908
+ isDragging
5909
+ ]);
5910
+ const positionClassMap = {
5911
+ 'bottom-left': positionBottomLeft,
5912
+ 'bottom-right': positionBottomRight,
5913
+ 'top-left': positionTopLeft,
5914
+ 'top-right': positionTopRight
5915
+ };
5686
5916
  return /*#__PURE__*/ jsxs(motion.div, {
5687
5917
  ref: toolbarRef,
5688
- className: `${toolbarContainer} ${'left' === position ? positionLeft : positionRight} ${showFullToolbar ? toolbarExpanded : toolbarCircle}`,
5689
- onMouseEnter: handleMouseEnter,
5690
- onMouseLeave: handleMouseLeave,
5691
- onMouseDown: handleMouseDown,
5918
+ className: `${toolbarContainer} ${positionClassMap[position]} ${isExpanded ? toolbarExpanded : toolbarCircle}`,
5692
5919
  initial: false,
5693
5920
  animate: containerAnimations,
5694
5921
  transition: animationConfig,
5695
5922
  onAnimationStart: handleAnimationStart,
5696
5923
  onAnimationComplete: handleAnimationComplete,
5924
+ onKeyDown: (e)=>{
5925
+ if (isExpanded) return;
5926
+ if ('Enter' === e.key || ' ' === e.key) {
5927
+ e.preventDefault();
5928
+ handleCircleClickWithDragCheck();
5929
+ }
5930
+ },
5697
5931
  "data-testid": "launchdarkly-toolbar",
5698
- role: "toolbar",
5699
- "aria-label": "LaunchDarkly Developer Toolbar",
5932
+ role: isExpanded ? 'toolbar' : 'button',
5933
+ "aria-label": isExpanded ? 'LaunchDarkly toolbar' : 'Open LaunchDarkly toolbar',
5934
+ tabIndex: isExpanded ? -1 : 0,
5700
5935
  children: [
5701
5936
  /*#__PURE__*/ jsx(AnimatePresence, {
5702
- children: !showFullToolbar && /*#__PURE__*/ jsx(CircleLogo, {
5703
- hasBeenExpanded: hasBeenExpanded
5937
+ children: !isExpanded && /*#__PURE__*/ jsx(CircleLogo, {
5938
+ ref: circleButtonRef,
5939
+ onClick: handleCircleClickWithDragCheck,
5940
+ onMouseDown: handleMouseDown
5704
5941
  })
5705
5942
  }),
5706
5943
  /*#__PURE__*/ jsx(AnimatePresence, {
5707
- children: showFullToolbar && /*#__PURE__*/ jsx(ExpandedToolbarContent, {
5708
- isExpanded: isExpanded,
5944
+ children: isExpanded && /*#__PURE__*/ jsx(ExpandedToolbarContent, {
5945
+ ref: expandedContentRef,
5709
5946
  activeTab: activeTab,
5710
5947
  slideDirection: slideDirection,
5711
5948
  searchTerm: searchTerm,
@@ -5719,7 +5956,9 @@ function LdToolbar(props) {
5719
5956
  flagOverridePlugin: flagOverridePlugin,
5720
5957
  eventInterceptionPlugin: eventInterceptionPlugin,
5721
5958
  mode: mode,
5722
- baseUrl: baseUrl
5959
+ baseUrl: baseUrl,
5960
+ defaultActiveTab: defaultActiveTab,
5961
+ onHeaderMouseDown: handleMouseDown
5723
5962
  })
5724
5963
  })
5725
5964
  ]
@@ -5730,19 +5969,24 @@ function LaunchDarklyToolbar(props) {
5730
5969
  const isVisible = useToolbarVisibility();
5731
5970
  if (!isVisible) return null;
5732
5971
  const mode = getToolbarMode(devServerUrl);
5733
- return /*#__PURE__*/ jsx(DevServerProvider, {
5734
- config: {
5735
- projectKey,
5736
- devServerUrl,
5737
- pollIntervalInMs
5738
- },
5972
+ return /*#__PURE__*/ jsx(ToolbarUIProvider, {
5739
5973
  initialPosition: position,
5740
- children: /*#__PURE__*/ jsx(SearchProvider, {
5741
- children: /*#__PURE__*/ jsx(LdToolbar, {
5742
- mode: mode,
5743
- baseUrl: baseUrl,
5744
- flagOverridePlugin: flagOverridePlugin,
5745
- eventInterceptionPlugin: eventInterceptionPlugin
5974
+ children: /*#__PURE__*/ jsx(DevServerProvider, {
5975
+ config: {
5976
+ projectKey,
5977
+ devServerUrl,
5978
+ pollIntervalInMs
5979
+ },
5980
+ children: /*#__PURE__*/ jsx(AnalyticsProvider, {
5981
+ ldClient: flagOverridePlugin?.getClient() ?? eventInterceptionPlugin?.getClient(),
5982
+ children: /*#__PURE__*/ jsx(SearchProvider, {
5983
+ children: /*#__PURE__*/ jsx(LdToolbar, {
5984
+ mode: mode,
5985
+ baseUrl: baseUrl,
5986
+ flagOverridePlugin: flagOverridePlugin,
5987
+ eventInterceptionPlugin: eventInterceptionPlugin
5988
+ })
5989
+ })
5746
5990
  })
5747
5991
  })
5748
5992
  });
@@ -6121,6 +6365,7 @@ class EventInterceptionPlugin {
6121
6365
  afterEvaluationHook;
6122
6366
  eventStore;
6123
6367
  config;
6368
+ ldClient = null;
6124
6369
  constructor(config = {}){
6125
6370
  this.config = {
6126
6371
  enableLogging: false,
@@ -6131,6 +6376,8 @@ class EventInterceptionPlugin {
6131
6376
  maxEvents: this.config.eventCapacity
6132
6377
  });
6133
6378
  const onNewEvent = (event)=>{
6379
+ const isToolbarEvent = this.isToolbarEvent(event);
6380
+ if (isToolbarEvent) return;
6134
6381
  if (this.config.enableLogging) console.log("\uD83C\uDFAF Event intercepted:", {
6135
6382
  kind: event.kind,
6136
6383
  key: event.key,
@@ -6152,6 +6399,9 @@ class EventInterceptionPlugin {
6152
6399
  onNewEvent
6153
6400
  });
6154
6401
  }
6402
+ isToolbarEvent(event) {
6403
+ return event.key?.startsWith(ANALYTICS_EVENT_PREFIX) ?? false;
6404
+ }
6155
6405
  getMetadata() {
6156
6406
  return {
6157
6407
  name: 'EventInterceptionPlugin'
@@ -6164,7 +6414,12 @@ class EventInterceptionPlugin {
6164
6414
  this.afterEvaluationHook
6165
6415
  ];
6166
6416
  }
6167
- register(_client) {}
6417
+ register(ldClient) {
6418
+ this.ldClient = ldClient;
6419
+ }
6420
+ getClient() {
6421
+ return this.ldClient;
6422
+ }
6168
6423
  getEvents() {
6169
6424
  return this.eventStore.getEvents();
6170
6425
  }