@launchdarkly/toolbar 0.10.1 → 0.11.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 (30) hide show
  1. package/README.md +48 -132
  2. package/dist/index.d.ts +3 -0
  3. package/dist/js/index.js +1730 -994
  4. package/dist/plugins/FlagOverridePlugin.d.ts +57 -0
  5. package/dist/plugins/index.d.ts +2 -0
  6. package/dist/tests/DevServerProvider.test.d.ts +1 -0
  7. package/dist/tests/ExpandedToolbarContent.test.d.ts +1 -0
  8. package/dist/tests/FlagSdkOverrideProvider.test.d.ts +1 -0
  9. package/dist/types/devServer.d.ts +2 -2
  10. package/dist/types/plugin.d.ts +31 -0
  11. package/dist/ui/Toolbar/Header/Header.d.ts +2 -0
  12. package/dist/ui/Toolbar/Header/components/ActionButtons.d.ts +1 -0
  13. package/dist/ui/Toolbar/LaunchDarklyToolbar.d.ts +8 -2
  14. package/dist/ui/Toolbar/TabContent/FlagDevServerTabContent.d.ts +1 -0
  15. package/dist/ui/Toolbar/TabContent/FlagSdkOverrideTabContent.d.ts +6 -0
  16. package/dist/ui/Toolbar/TabContent/SettingsTabContent.d.ts +6 -1
  17. package/dist/ui/Toolbar/components/ExpandedToolbarContent.d.ts +4 -1
  18. package/dist/ui/Toolbar/components/LocalFlagControls.css.d.ts +4 -0
  19. package/dist/ui/Toolbar/components/LocalFlagControls.d.ts +20 -0
  20. package/dist/ui/Toolbar/components/TabContentRenderer.d.ts +4 -1
  21. package/dist/ui/Toolbar/constants/index.d.ts +1 -1
  22. package/dist/ui/Toolbar/constants/virtualization.d.ts +4 -0
  23. package/dist/ui/Toolbar/context/{LaunchDarklyToolbarProvider.d.ts → DevServerProvider.d.ts} +6 -6
  24. package/dist/ui/Toolbar/context/FlagSdkOverrideProvider.d.ts +19 -0
  25. package/dist/ui/Toolbar/context/index.d.ts +3 -0
  26. package/dist/ui/Toolbar/types/toolbar.d.ts +7 -1
  27. package/package.json +5 -3
  28. package/dist/ui/Toolbar/TabContent/FlagTabContent.d.ts +0 -1
  29. package/dist/ui/Toolbar/constants/config.d.ts +0 -3
  30. /package/dist/ui/Toolbar/TabContent/{FlagTabContent.css.d.ts → FlagDevServerTabContent.css.d.ts} +0 -0
package/dist/js/index.js CHANGED
@@ -880,7 +880,7 @@ var __webpack_modules__ = {
880
880
  ]);
881
881
  const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
882
882
  },
883
- "./node_modules/.pnpm/@rsbuild+core@1.4.12/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/FlagTabContent.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA62T0XKbMBBF3/0VeulM/CCPcJ04Vb5mgQV2LCRVEgYn03/vSGBMQpom0z7ZLLv3XF1WO2jVefgp2MuGscrowD09o2TZwQ5P11KPVDdBsnshYq0wyjjJzuDuOFeWp2deO7jwvRDb2FKStwouklUKkw4oqjWngK2XrEAd0MVyDVayxxHVkuY9laGRLGHiqGTZ0+bXZje6zJJLc0ZXKdNL1lBZoo69AYfAby9QKbKefHzVNxSQewsFSqZN78CuaTNinxAr+/GXl+SwCGS0jBF0rZ5PcA3r6nh9mBaG63MBqrjLhPjGOPsh7LBd4L+vvsN+lP4g88OUeZqqoCV1WTQuqrw12qQgUv//yHE2fkjGW3A1aa6wCpJlD6P1r+/CrHqfVJtp/Q5CjIo3g9AFEyu+cEapHBz/IKhHIbYsONDegkMdXg9OXyc0pJcOZBNpycenIMcVZKEleY/5iQKfpZLwhJ7uQQ7FqXam06X8ghAPTdfmSW4p8KccEsi4Eh13UFLnpyV+e/B/Ix0/R3qP4aA4rRjvx/GwDDFerIi0xtN4Vx0qCHTGxcQxTdxaIPdGdQHTFTB2urPjGqe/r8RvMovluNn82womSDzIBH87ycRu7xmCj45/A/2qaMCgBQAA\"}!./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__) {
883
+ "./node_modules/.pnpm/@rsbuild+core@1.4.12/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/FlagDevServerTabContent.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA62T0XKbMBBF3/0VeulM/CCPcJ3YVb5mgQV2LCSNJIzdTv+9I4GBhDRNJn2yWXbvubqsdp062bwT7NeGscrowD39RMmyg70+30s9Ut0EyR6FiLXCKOMku4B74FxZnp557eDG90JsY0tJ3iq4SVYpTDqgqNacArZesgJ1QBfLNVjJTgOqJc17KkMjWcLEUcmy583vzW5wmSWX5oKuUqaXrKGyRB17A14Dn1+gUmQ9+fiqbygg9xYKlEyb3oFd0ybEPiFW9uMvL8lhEchoGSPoWj2d4B7W3fH6MC1c788FqOIhE+Ib4+yHsNftAv999R32g/Q7mR/GzNNUBS2p26JxUeWt0SYFkfr/R46T8UMy3oKrSXOFVZAsexqsf34XJtXHpNqM63cQYlCcDUIXTKz4whmlcnD8naBOQmxZcKC9BYc6vBwcv05oSC8dyCbSko8PQY4ryEJL8h7zMwU+SSXhET3egxyKc+1Mp0v5CSEemq7Nk9xS4G85JJBxJTruoKTOj0v8+uBfIx0/RnqL4aA4rxhvx/G0DDFerIi0xtNwVx0qCHTBxcQxTcwtkHujuoDpChg73tlhjdPfF+KzzGI5Zpv/WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA=\"}!./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__) {
884
884
  __webpack_require__.d(__webpack_exports__, {
885
885
  Z: ()=>__WEBPACK_DEFAULT_EXPORT__
886
886
  });
@@ -891,7 +891,7 @@ var __webpack_modules__ = {
891
891
  var ___CSS_LOADER_EXPORT___ = _rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
892
892
  ___CSS_LOADER_EXPORT___.push([
893
893
  module.id,
894
- `.amlvxq0 {
894
+ `.ul8pbu0 {
895
895
  color: var(--lp-color-gray-200);
896
896
  flex: 1;
897
897
  align-items: center;
@@ -902,14 +902,14 @@ var __webpack_modules__ = {
902
902
  display: flex;
903
903
  }
904
904
 
905
- .amlvxq1 {
905
+ .ul8pbu1 {
906
906
  text-overflow: ellipsis;
907
907
  white-space: nowrap;
908
908
  min-width: 0;
909
909
  overflow: hidden;
910
910
  }
911
911
 
912
- .amlvxq2 {
912
+ .ul8pbu2 {
913
913
  flex-direction: column;
914
914
  flex: 1;
915
915
  gap: 4px;
@@ -918,7 +918,7 @@ var __webpack_modules__ = {
918
918
  display: flex;
919
919
  }
920
920
 
921
- .amlvxq3 {
921
+ .ul8pbu3 {
922
922
  color: var(--lp-color-gray-400);
923
923
  font-size: 12px;
924
924
  font-family: var(--lp-font-family-monospace);
@@ -927,56 +927,56 @@ var __webpack_modules__ = {
927
927
  overflow: hidden;
928
928
  }
929
929
 
930
- .amlvxq4 {
930
+ .ul8pbu4 {
931
931
  align-items: center;
932
932
  gap: 8px;
933
933
  margin-left: 16px;
934
934
  display: flex;
935
935
  }
936
936
 
937
- .amlvxq5 {
937
+ .ul8pbu5 {
938
938
  scrollbar-color: var(--lp-color-gray-800) transparent;
939
939
  scrollbar-width: thin;
940
940
  height: 400px;
941
941
  overflow: auto;
942
942
  }
943
943
 
944
- .amlvxq5:hover {
944
+ .ul8pbu5:hover {
945
945
  scrollbar-color: var(--lp-color-gray-700) transparent;
946
946
  }
947
947
 
948
- .amlvxq5::-webkit-scrollbar {
948
+ .ul8pbu5::-webkit-scrollbar {
949
949
  background: none;
950
950
  width: 8px;
951
951
  }
952
952
 
953
- .amlvxq5::-webkit-scrollbar-thumb {
953
+ .ul8pbu5::-webkit-scrollbar-thumb {
954
954
  background: var(--lp-color-gray-800);
955
955
  border-radius: 4px;
956
956
  }
957
957
 
958
- .amlvxq5:hover::-webkit-scrollbar-thumb {
958
+ .ul8pbu5:hover::-webkit-scrollbar-thumb {
959
959
  background: var(--lp-color-gray-700);
960
960
  border-radius: 4px;
961
961
  }
962
962
 
963
- .amlvxq5::-webkit-scrollbar-track {
963
+ .ul8pbu5::-webkit-scrollbar-track {
964
964
  background: none;
965
965
  }
966
966
 
967
- .amlvxq6 {
967
+ .ul8pbu6 {
968
968
  width: 100%;
969
969
  position: relative;
970
970
  }
971
971
 
972
- .amlvxq7 {
972
+ .ul8pbu7 {
973
973
  width: 100%;
974
974
  position: absolute;
975
975
  top: 0;
976
976
  left: 0;
977
977
  }
978
978
 
979
- .amlvxq7:hover {
979
+ .ul8pbu7:hover {
980
980
  background-color: var(--lp-color-gray-800);
981
981
  transition: background-color .2s;
982
982
  }
@@ -1449,6 +1449,48 @@ var __webpack_modules__ = {
1449
1449
  width: 40px;
1450
1450
  height: 40px;
1451
1451
  }
1452
+ `,
1453
+ ""
1454
+ ]);
1455
+ const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
1456
+ },
1457
+ "./node_modules/.pnpm/@rsbuild+core@1.4.12/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/components/LocalFlagControls.css.ts.vanilla.css\",\"source\":\"Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9\"}!./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__) {
1458
+ __webpack_require__.d(__webpack_exports__, {
1459
+ Z: ()=>__WEBPACK_DEFAULT_EXPORT__
1460
+ });
1461
+ var _rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.4.12/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
1462
+ var _rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
1463
+ var _rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.4.12/node_modules/@rsbuild/core/compiled/css-loader/api.js");
1464
+ var _rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
1465
+ var ___CSS_LOADER_EXPORT___ = _rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_rsbuild_core_1_4_12_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
1466
+ ___CSS_LOADER_EXPORT___.push([
1467
+ module.id,
1468
+ `._7ek4sn0 {
1469
+ color: #fff;
1470
+ background-color: #2a2a2a;
1471
+ border: 1px solid #ccc;
1472
+ border-radius: 4px;
1473
+ width: 100%;
1474
+ padding: 8px;
1475
+ font-family: monospace;
1476
+ font-size: 12px;
1477
+ }
1478
+
1479
+ ._7ek4sn1 {
1480
+ border: 1px solid red;
1481
+ }
1482
+
1483
+ ._7ek4sn2 {
1484
+ gap: 4px;
1485
+ margin-top: 4px;
1486
+ display: flex;
1487
+ }
1488
+
1489
+ ._7ek4sn3 {
1490
+ color: red;
1491
+ margin-top: 4px;
1492
+ font-size: 12px;
1493
+ }
1452
1494
  `,
1453
1495
  ""
1454
1496
  ]);
@@ -1891,831 +1933,224 @@ options.domAPI = styleDomAPI_default();
1891
1933
  options.insertStyleElement = insertStyleElement_default();
1892
1934
  injectStylesIntoStyleTag_default()(globals.Z, options);
1893
1935
  globals.Z && globals.Z.locals && globals.Z.locals;
1894
- const SearchContext = /*#__PURE__*/ createContext({
1895
- searchTerm: '',
1896
- setSearchTerm: ()=>{}
1897
- });
1898
- function SearchProvider({ children }) {
1899
- const [searchTerm, setSearchTerm] = useState('');
1900
- return /*#__PURE__*/ jsx(SearchContext.Provider, {
1901
- value: {
1902
- searchTerm,
1903
- setSearchTerm
1904
- },
1905
- children: children
1906
- });
1907
- }
1908
- function useSearchContext() {
1909
- const context = useContext(SearchContext);
1910
- if (!context) throw new Error('useSearchContext must be used within a SearchProvider');
1911
- return context;
1912
- }
1913
- var extracted = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.4.12/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/components/ActionButtonsContainer.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA+1Ty27bMBC8+yv2aB/o0krsuszHFEuRkgjRJLGkI6lF/72grLpWHk7iFuilN2G0OzM7u1x//TK0/TBw+L4ACKiUcbWADQ898IcFgPSkNDHpU/IHAZvQQ/TWKHhEWjJmAyu99cRqwoHtOV/lJv+oqbK+Y70APCafMWVisDgIqKzuM1BjELAP4/ckzKyukoCCz1EydXMBx5K8tRLpJC1etPKZ8xUkQhcDknZp3tgZlRoBqTHuYfFjsf6VghCs07I1iZ1rx2AafbJwf3IgsWxr8kenxFzjOhVLzfEgR8JLhtfsX8RPqMwxCiiy/lsihGX7TOQVm5t3udnP3Lx1Bbup+sp2iqnkfHC70MOmmNKdz7w7oZV3iUXzTYtz4Qh102q2fLzX8kgxqwZvXNKUoXF0k4x3AtBa4Osigsao88+uMUmzGLDUApzvCMNIbXXPYkPGtSI/hIvEhDIRpdVqjM4HLE0aBPD19lLf+cTQWt9pNe9u8uMQzqflmWh1y0lcSXc7Vv4WLf4v+YNLLv5oycW/WPLdM36qJS4r8oen/ZLQKVYO6JjEqFdAUIOET8DXmxfUb+G5u3IcT9tmU7wvuptG2/6l2e6z45832tTkOQcAAA==\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
1914
- var extracted_options = {};
1915
- extracted_options.styleTagTransform = styleTagTransform_default();
1916
- extracted_options.setAttributes = setAttributesWithoutAttributes_default();
1917
- extracted_options.insert = insertBySelector_default().bind(null, "head");
1918
- extracted_options.domAPI = styleDomAPI_default();
1919
- extracted_options.insertStyleElement = insertStyleElement_default();
1920
- injectStylesIntoStyleTag_default()(extracted.Z, extracted_options);
1921
- extracted.Z && extracted.Z.locals && extracted.Z.locals;
1922
- var container = '_9ykxyy0';
1923
- var toggleButton = '_9ykxyy2';
1924
- var actionButton = '_9ykxyy1';
1925
- var active = '_9ykxyy3';
1926
- const ActionButtonsContainer = ({ children })=>/*#__PURE__*/ jsx("div", {
1927
- className: container,
1928
- children: children
1929
- });
1930
- const EASING = {
1931
- bounce: [
1932
- 0.34,
1933
- 1.56,
1934
- 0.64,
1935
- 1
1936
- ],
1937
- smooth: [
1938
- 0.25,
1939
- 0.46,
1940
- 0.45,
1941
- 0.94
1942
- ],
1943
- elastic: [
1944
- 0.22,
1945
- 1,
1946
- 0.36,
1947
- 1
1948
- ]
1949
- };
1950
- const ANIMATION_CONFIG = {
1951
- container: {
1952
- width: {
1953
- duration: 0.5,
1954
- ease: EASING.bounce
1955
- },
1956
- height: {
1957
- duration: 0.5,
1958
- ease: EASING.bounce
1959
- },
1960
- borderRadius: {
1961
- duration: 0.4,
1962
- ease: EASING.smooth
1963
- },
1964
- boxShadow: {
1965
- duration: 0.3,
1966
- ease: 'easeInOut'
1936
+ class DevServerClient {
1937
+ baseUrl;
1938
+ projectKey = null;
1939
+ constructor(baseUrl, projectKey){
1940
+ this.baseUrl = baseUrl;
1941
+ this.projectKey = projectKey || null;
1942
+ }
1943
+ setProjectKey(projectKey) {
1944
+ this.projectKey = projectKey;
1945
+ }
1946
+ getProjectKey() {
1947
+ return this.projectKey;
1948
+ }
1949
+ async getProjectData() {
1950
+ if (!this.projectKey) throw new Error('No project key set. Call setProjectKey() first.');
1951
+ const url = `${this.baseUrl}/dev/projects/${this.projectKey}?expand=overrides&expand=availableVariations`;
1952
+ try {
1953
+ const response = await fetch(url);
1954
+ if (!response.ok) throw new Error(`Dev server error: ${response.status} ${response.statusText}`);
1955
+ return await response.json();
1956
+ } catch (error) {
1957
+ if (error instanceof TypeError) throw new Error(`Failed to connect to dev server at ${this.baseUrl}. Is ldcli dev-server running?`);
1958
+ throw error;
1967
1959
  }
1968
- },
1969
- circleLogo: {
1970
- opacity: {
1971
- duration: 0.25,
1972
- ease: 'easeOut'
1973
- },
1974
- scale: {
1975
- duration: 0.3,
1976
- ease: EASING.smooth
1977
- },
1978
- rotate: {
1979
- duration: 0.3,
1980
- ease: EASING.smooth
1960
+ }
1961
+ async setOverride(flagKey, value) {
1962
+ if (!this.projectKey) throw new Error('No project key set. Call setProjectKey() first.');
1963
+ const url = `${this.baseUrl}/dev/projects/${this.projectKey}/overrides/${flagKey}`;
1964
+ try {
1965
+ const response = await fetch(url, {
1966
+ method: 'PUT',
1967
+ headers: {
1968
+ 'Content-Type': 'application/json'
1969
+ },
1970
+ body: JSON.stringify(value)
1971
+ });
1972
+ if (!response.ok) throw new Error(`Failed to set override: ${response.status} ${response.statusText}`);
1973
+ return await response.json();
1974
+ } catch (error) {
1975
+ if (error instanceof TypeError) throw new Error(`Failed to connect to dev server at ${this.baseUrl}`);
1976
+ throw error;
1981
1977
  }
1982
- },
1983
- toolbarContent: {
1984
- opacity: {
1985
- duration: 0.4,
1986
- ease: EASING.smooth
1987
- },
1988
- y: {
1989
- duration: 0.5,
1990
- ease: EASING.bounce
1991
- },
1992
- scale: {
1993
- duration: 0.5,
1994
- ease: EASING.bounce
1978
+ }
1979
+ async clearOverride(flagKey) {
1980
+ if (!this.projectKey) throw new Error('No project key set. Call setProjectKey() first.');
1981
+ const url = `${this.baseUrl}/dev/projects/${this.projectKey}/overrides/${flagKey}`;
1982
+ try {
1983
+ const response = await fetch(url, {
1984
+ method: 'DELETE'
1985
+ });
1986
+ if (!response.ok) throw new Error(`Failed to clear override: ${response.status} ${response.statusText}`);
1987
+ } catch (error) {
1988
+ if (error instanceof TypeError) throw new Error(`Failed to connect to dev server at ${this.baseUrl}`);
1989
+ throw error;
1995
1990
  }
1996
- },
1997
- contentArea: {
1998
- opacity: {
1999
- duration: 0.4,
2000
- ease: 'easeInOut'
2001
- },
2002
- maxHeight: {
2003
- duration: 0.5,
2004
- ease: EASING.elastic
1991
+ }
1992
+ async getAvailableProjects() {
1993
+ try {
1994
+ const response = await fetch(`${this.baseUrl}/dev/projects`);
1995
+ if (!response.ok) throw new Error(`Failed to fetch projects: ${response.status} ${response.statusText}`);
1996
+ return await response.json();
1997
+ } catch (error) {
1998
+ if (error instanceof TypeError) throw new Error(`Failed to connect to dev server at ${this.baseUrl}. Is ldcli dev-server running?`);
1999
+ throw error;
2005
2000
  }
2006
- },
2007
- tabContent: {
2008
- duration: 0.3,
2009
- ease: EASING.smooth
2010
- },
2011
- tabsContainer: {
2012
- opacity: {
2013
- duration: 0.5,
2014
- ease: EASING.bounce
2015
- },
2016
- y: {
2017
- duration: 0.5,
2018
- ease: EASING.bounce
2019
- },
2020
- delay: 0.3
2021
2001
  }
2022
- };
2023
- const DIMENSIONS = {
2024
- collapsed: {
2025
- width: 60,
2026
- height: 60,
2027
- borderRadius: 30
2028
- },
2029
- expanded: {
2030
- width: 400,
2031
- borderRadius: 12
2032
- },
2033
- scale: {
2034
- expanded: 1.02,
2035
- collapsed: 1
2036
- },
2037
- slideDistance: 30
2038
- };
2039
- const SHADOWS = {
2040
- expanded: '0 12px 48px rgba(0, 0, 0, 0.5)',
2041
- hoveredCollapsed: '0 8px 40px rgba(0, 0, 0, 0.4)',
2042
- collapsed: '0 4px 16px rgba(0, 0, 0, 0.3)'
2043
- };
2044
- function LaunchDarklyIcon({ className }) {
2045
- return /*#__PURE__*/ jsx("svg", {
2046
- className: className,
2047
- fill: "currentColor",
2048
- preserveAspectRatio: "xMidYMid",
2049
- viewBox: "-.00348466 0 256.88728835 255.31014671",
2050
- xmlns: "http://www.w3.org/2000/svg",
2051
- role: "img",
2052
- "aria-label": "LaunchDarkly",
2053
- children: /*#__PURE__*/ jsx("path", {
2054
- 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"
2055
- })
2056
- });
2057
2002
  }
2058
- var _vanilla_extract_webpack_plugin_extracted = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.4.12/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");
2059
- var webpack_plugin_extracted_options = {};
2060
- webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2061
- webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2062
- webpack_plugin_extracted_options.insert = insertBySelector_default().bind(null, "head");
2063
- webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2064
- webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2065
- injectStylesIntoStyleTag_default()(_vanilla_extract_webpack_plugin_extracted.Z, webpack_plugin_extracted_options);
2066
- _vanilla_extract_webpack_plugin_extracted.Z && _vanilla_extract_webpack_plugin_extracted.Z.locals && _vanilla_extract_webpack_plugin_extracted.Z.locals;
2067
- var contentArea = '_1n4ciyy8';
2068
- var tabsContainer = '_1n4ciyya';
2069
- var scrollableContent = '_1n4ciyy9';
2070
- var toolbarContent = '_1n4ciyy7';
2071
- var positionRight = '_1n4ciyy1';
2072
- var circleLogo = '_1n4ciyy6';
2073
- var positionLeft = '_1n4ciyy2';
2074
- var toolbarCircle = '_1n4ciyy3';
2075
- var circleContent = '_1n4ciyy5';
2076
- var toolbarContainer = '_1n4ciyy0';
2077
- var toolbarExpanded = '_1n4ciyy4';
2078
- function CircleLogo(props) {
2079
- const { hasBeenExpanded } = props;
2080
- return /*#__PURE__*/ jsx(motion.div, {
2081
- className: circleContent,
2082
- initial: {
2083
- opacity: 0,
2084
- x: '-50%',
2085
- y: '-50%',
2086
- scale: 0.9,
2087
- rotate: 90
2088
- },
2089
- animate: {
2090
- opacity: 1,
2091
- x: '-50%',
2092
- y: '-50%',
2093
- scale: 1,
2094
- rotate: 0
2095
- },
2096
- exit: {
2097
- opacity: 0,
2098
- x: '-50%',
2099
- y: '-50%',
2100
- scale: 0.9,
2101
- rotate: 90
2102
- },
2103
- transition: {
2104
- ...ANIMATION_CONFIG.circleLogo,
2105
- opacity: {
2106
- ...ANIMATION_CONFIG.circleLogo.opacity,
2107
- delay: hasBeenExpanded ? 0.3 : 0
2108
- }
2109
- },
2110
- children: /*#__PURE__*/ jsx(motion.div, {
2111
- whileHover: {
2112
- scale: 1.1
2113
- },
2114
- transition: {
2115
- duration: 0.2,
2116
- ease: 'easeInOut'
2117
- },
2118
- children: /*#__PURE__*/ jsx(LaunchDarklyIcon, {
2119
- className: circleLogo
2120
- })
2121
- })
2122
- }, "circle-logo");
2123
- }
2124
- var _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.4.12/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/components/StatusDot.css.ts.vanilla.css\",\"source\":\"Ll8xd3ZvZHZxMCB7CiAgd2lkdGg6IDhweDsKICBoZWlnaHQ6IDhweDsKICBib3JkZXItcmFkaXVzOiA1MCU7Cn0=\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2125
- var _vanilla_extract_webpack_plugin_extracted_options = {};
2126
- _vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2127
- _vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2128
- _vanilla_extract_webpack_plugin_extracted_options.insert = insertBySelector_default().bind(null, "head");
2129
- _vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2130
- _vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2131
- injectStylesIntoStyleTag_default()(_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, _vanilla_extract_webpack_plugin_extracted_options);
2132
- _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
2133
- var statusDot = '_1wvodvq0';
2134
- function StatusDot(props) {
2135
- const { status } = props;
2136
- const getStatusColor = ()=>{
2137
- switch(status){
2138
- case 'connected':
2139
- return 'var(--lp-color-green-500)';
2140
- case 'disconnected':
2141
- return 'var(--lp-color-orange-500)';
2142
- case 'error':
2143
- return 'var(--lp-color-red-500)';
2144
- }
2145
- };
2146
- return /*#__PURE__*/ jsx("div", {
2147
- className: `${statusDot}`,
2148
- style: {
2149
- backgroundColor: getStatusColor()
2003
+ class FlagStateManager {
2004
+ devServerClient;
2005
+ listeners = new Set();
2006
+ constructor(devServerClient){
2007
+ this.devServerClient = devServerClient;
2008
+ }
2009
+ async getEnhancedFlags() {
2010
+ const devServerData = await this.devServerClient.getProjectData();
2011
+ const enhancedFlags = {};
2012
+ Object.keys(devServerData.flagsState).forEach((flagKey)=>{
2013
+ const flagState = devServerData.flagsState[flagKey];
2014
+ const override = devServerData.overrides[flagKey];
2015
+ const variations = devServerData.availableVariations[flagKey] || [];
2016
+ const currentValue = override ? override.value : flagState.value;
2017
+ enhancedFlags[flagKey] = {
2018
+ key: flagKey,
2019
+ name: this.formatFlagName(flagKey),
2020
+ currentValue,
2021
+ isOverridden: !!override,
2022
+ originalValue: flagState.value,
2023
+ availableVariations: variations,
2024
+ type: this.determineFlagType(variations, currentValue),
2025
+ sourceEnvironment: devServerData.sourceEnvironmentKey,
2026
+ enabled: null !== flagState.value && void 0 !== flagState.value
2027
+ };
2028
+ });
2029
+ return enhancedFlags;
2030
+ }
2031
+ formatFlagName(flagKey) {
2032
+ return flagKey.split('-').map((word)=>word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
2033
+ }
2034
+ determineFlagType(variations, currentValue) {
2035
+ if (2 === variations.length && variations.every((v)=>'boolean' == typeof v.value)) return 'boolean';
2036
+ if (variations.length > 2) return 'multivariate';
2037
+ if ('string' == typeof currentValue) return 'string';
2038
+ if ('number' == typeof currentValue) return 'number';
2039
+ return 'boolean';
2040
+ }
2041
+ async setOverride(flagKey, value) {
2042
+ await this.devServerClient.setOverride(flagKey, value);
2043
+ await this.notifyListeners();
2044
+ }
2045
+ async clearOverride(flagKey) {
2046
+ await this.devServerClient.clearOverride(flagKey);
2047
+ await this.notifyListeners();
2048
+ }
2049
+ subscribe(listener) {
2050
+ this.listeners.add(listener);
2051
+ return ()=>this.listeners.delete(listener);
2052
+ }
2053
+ async notifyListeners() {
2054
+ try {
2055
+ const flags = await this.getEnhancedFlags();
2056
+ this.listeners.forEach((listener)=>listener(flags));
2057
+ } catch (error) {
2058
+ console.error('Error notifying listeners:', error);
2150
2059
  }
2151
- });
2060
+ }
2061
+ destroy() {
2062
+ this.listeners.clear();
2063
+ }
2152
2064
  }
2153
- var ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_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.4.12/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/components/ConnectionStatus.css.ts.vanilla.css\",\"source\":\"Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2154
- var node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
2155
- node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2156
- node_modules_vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2157
- node_modules_vanilla_extract_webpack_plugin_extracted_options.insert = insertBySelector_default().bind(null, "head");
2158
- node_modules_vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2159
- node_modules_vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2160
- injectStylesIntoStyleTag_default()(ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, node_modules_vanilla_extract_webpack_plugin_extracted_options);
2161
- ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
2162
- var lastSync = '_16sng783';
2163
- var statusText = '_16sng782';
2164
- var statusIndicator = '_16sng781';
2165
- var ConnectionStatus_css_connectionStatus = '_16sng780';
2166
- function ConnectionStatus(props) {
2167
- const { status, lastSyncTime } = props;
2168
- const getStatusText = ()=>{
2169
- switch(status){
2170
- case 'connected':
2171
- return 'Connected to dev server';
2172
- case 'disconnected':
2173
- return 'Disconnected from dev server';
2174
- case 'error':
2175
- return 'Error connecting to dev server';
2176
- }
2177
- };
2178
- return /*#__PURE__*/ jsxs("div", {
2179
- className: ConnectionStatus_css_connectionStatus,
2180
- children: [
2181
- /*#__PURE__*/ jsxs("div", {
2182
- className: statusIndicator,
2183
- children: [
2184
- /*#__PURE__*/ jsx(StatusDot, {
2185
- status: status
2186
- }),
2187
- /*#__PURE__*/ jsx("span", {
2188
- className: statusText,
2189
- children: getStatusText()
2190
- })
2191
- ]
2192
- }),
2193
- lastSyncTime > 0 && /*#__PURE__*/ jsxs("span", {
2194
- className: lastSync,
2195
- children: [
2196
- "Last sync: ",
2197
- new Date(lastSyncTime).toLocaleTimeString()
2198
- ]
2199
- })
2200
- ]
2201
- });
2065
+ const TAB_ORDER = [
2066
+ 'flag-sdk',
2067
+ 'flag-dev-server',
2068
+ 'settings'
2069
+ ];
2070
+ const DEV_SERVER_TABS = [
2071
+ 'flag-dev-server',
2072
+ 'settings'
2073
+ ];
2074
+ const SDK_MODE_TABS = [
2075
+ 'flag-sdk',
2076
+ 'settings'
2077
+ ];
2078
+ function getToolbarMode(devServerUrl) {
2079
+ return devServerUrl ? 'dev-server' : 'sdk';
2202
2080
  }
2203
- var hh8fYPBfEjJ8YIAAA_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.4.12/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");
2204
- var _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
2205
- _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2206
- _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2207
- _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");
2208
- _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2209
- _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2210
- injectStylesIntoStyleTag_default()(hh8fYPBfEjJ8YIAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
2211
- hh8fYPBfEjJ8YIAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && hh8fYPBfEjJ8YIAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && hh8fYPBfEjJ8YIAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
2212
- var centerSection = '_9uh9aj4';
2213
- var searchFieldWrapper = '_9uh9ajd';
2214
- var searchButtonArea = '_9uh9aj7';
2215
- var closeButtonArea = '_9uh9aj8';
2216
- var rightSection = '_9uh9aj6';
2217
- var environmentWrapper = '_9uh9ajg';
2218
- var headerTitle = '_9uh9aj3';
2219
- var logo = '_9uh9aj2';
2220
- var environmentLabel = '_9uh9aj5';
2221
- var searchWrapper = '_9uh9ajf';
2222
- var searchField = '_9uh9ajb';
2223
- var header = '_9uh9aj0';
2224
- var Header_css_actionButton = '_9uh9aj9';
2225
- var searchGroup = '_9uh9ajc';
2226
- var leftSection = '_9uh9aj1';
2227
- function LogoSection() {
2228
- return /*#__PURE__*/ jsxs("div", {
2229
- className: leftSection,
2230
- children: [
2231
- /*#__PURE__*/ jsx(LaunchDarklyIcon, {
2232
- className: logo
2233
- }),
2234
- /*#__PURE__*/ jsx("span", {
2235
- className: headerTitle,
2236
- children: "Developers"
2237
- })
2238
- ]
2239
- });
2081
+ function getTabsForMode(mode, hasFlagOverridePlugin) {
2082
+ if ('dev-server' === mode) return DEV_SERVER_TABS;
2083
+ return hasFlagOverridePlugin ? SDK_MODE_TABS : [
2084
+ 'settings'
2085
+ ];
2240
2086
  }
2241
- function EnvironmentLabel(props) {
2242
- const { label } = props;
2243
- return /*#__PURE__*/ jsx("div", {
2244
- className: centerSection,
2245
- children: /*#__PURE__*/ jsx("span", {
2246
- className: environmentLabel,
2247
- children: label
2248
- })
2249
- });
2087
+ function getDefaultActiveTab(mode) {
2088
+ if ('dev-server' === mode) return 'flag-dev-server';
2089
+ if ('sdk' === mode) return 'flag-sdk';
2090
+ return 'settings';
2250
2091
  }
2251
- var IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_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.4.12/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/components/IconButton.css.ts.vanilla.css\",\"source\":\"LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ==\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2252
- var _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
2253
- _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2254
- _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2255
- _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");
2256
- _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2257
- _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2258
- injectStylesIntoStyleTag_default()(IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
2259
- IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
2260
- var medium = 'i03vv32 i03vv30';
2261
- var small = 'i03vv31 i03vv30';
2262
- var large = 'i03vv33 i03vv30';
2263
- function IconButton(props) {
2264
- const { icon, label, onClick, disabled = false, className, size = 'large' } = props;
2265
- const getSizeClass = ()=>{
2266
- switch(size){
2267
- case 'small':
2268
- return small;
2269
- case 'medium':
2270
- return medium;
2271
- case 'large':
2272
- return large;
2273
- default:
2274
- return large;
2275
- }
2276
- };
2277
- return /*#__PURE__*/ jsx("button", {
2278
- className: `${getSizeClass()} ${className || ''}`,
2279
- onClick: onClick,
2280
- disabled: disabled,
2281
- "aria-label": label,
2282
- children: icon
2283
- });
2284
- }
2285
- var Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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.4.12/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/components/icons/Icon.css.ts.vanilla.css\",\"source\":\"LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0=\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2286
- var Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
2287
- Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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();
2288
- Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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();
2289
- Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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");
2290
- Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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();
2291
- Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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();
2292
- injectStylesIntoStyleTag_default()(Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
2293
- Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
2294
- var Icon_css_icon = 'rj9f6c0';
2295
- function SearchIcon({ className }) {
2296
- return /*#__PURE__*/ jsx("svg", {
2297
- className: `${Icon_css_icon} ${className}`,
2298
- fill: "currentColor",
2299
- viewBox: "0 0 24 24",
2300
- xmlns: "http://www.w3.org/2000/svg",
2301
- children: /*#__PURE__*/ jsx("path", {
2302
- d: "M10 2a8 8 0 1 0 5.29 14.29l4.3 4.3a1 1 0 0 0 1.42-1.42l-4.3-4.3A8 8 0 0 0 10 2zm0 2a6 6 0 1 1 0 12 6 6 0 0 1 0-12z"
2303
- })
2304
- });
2305
- }
2306
- function ChevronDownIcon({ className }) {
2307
- return /*#__PURE__*/ jsx("svg", {
2308
- className: `${Icon_css_icon} ${className}`,
2309
- fill: "currentColor",
2310
- viewBox: "0 0 24 24",
2311
- xmlns: "http://www.w3.org/2000/svg",
2312
- children: /*#__PURE__*/ jsx("path", {
2313
- d: "M12 15.5l-6-6 1.41-1.41L12 12.67l4.59-4.58L18 9.5z"
2314
- })
2315
- });
2316
- }
2317
- function EditIcon({ className }) {
2318
- return /*#__PURE__*/ jsx("svg", {
2319
- className: `${Icon_css_icon} ${className}`,
2320
- fill: "currentColor",
2321
- viewBox: "0 0 24 24",
2322
- xmlns: "http://www.w3.org/2000/svg",
2323
- children: /*#__PURE__*/ jsx("path", {
2324
- d: "M3 17.25V21h3.75l11.06-11.06-3.75-3.75L3 17.25zm2.92-1.42L14.06 7.69l1.42 1.42-8.14 8.14H5.92v-1.42zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"
2325
- })
2326
- });
2327
- }
2328
- function SyncIcon({ className }) {
2329
- return /*#__PURE__*/ jsx("svg", {
2330
- className: `${Icon_css_icon} ${className}`,
2331
- fill: "currentColor",
2332
- viewBox: "0 0 24 24",
2333
- xmlns: "http://www.w3.org/2000/svg",
2334
- children: /*#__PURE__*/ jsx("path", {
2335
- d: "M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.1-.3 2.13-.82 3.02l1.46 1.46A7.92 7.92 0 0 0 20 12c0-4.42-3.58-8-8-8zm-6 8c0-1.1.3-2.13.82-3.02L5.36 7.52A7.92 7.92 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3c-3.31 0-6-2.69-6-6z"
2336
- })
2337
- });
2338
- }
2339
- function CheckIcon({ className }) {
2340
- return /*#__PURE__*/ jsx("svg", {
2341
- className: `${Icon_css_icon} ${className}`,
2342
- fill: "currentColor",
2343
- viewBox: "0 0 24 24",
2344
- xmlns: "http://www.w3.org/2000/svg",
2345
- children: /*#__PURE__*/ jsx("path", {
2346
- d: "M9 16.17l-3.88-3.88L4 13.41l5 5 12-12-1.41-1.41z"
2347
- })
2348
- });
2349
- }
2350
- function ToggleOffIcon({ className }) {
2351
- return /*#__PURE__*/ jsx("svg", {
2352
- className: `${Icon_css_icon} ${className}`,
2353
- fill: "currentColor",
2354
- viewBox: "0 0 24 24",
2355
- xmlns: "http://www.w3.org/2000/svg",
2356
- children: /*#__PURE__*/ jsx("path", {
2357
- d: "M17 7H7a5 5 0 0 0 0 10h10a5 5 0 0 0 0-10zm0 8H7a3 3 0 0 1 0-6h10a3 3 0 0 1 0 6zM7 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z"
2358
- })
2359
- });
2360
- }
2361
- function GearIcon({ className }) {
2362
- return /*#__PURE__*/ jsx("svg", {
2363
- className: `${Icon_css_icon} ${className}`,
2364
- fill: "currentColor",
2365
- viewBox: "0 0 24 24",
2366
- xmlns: "http://www.w3.org/2000/svg",
2367
- children: /*#__PURE__*/ jsx("path", {
2368
- d: "M19.43 12.98c.04-.32.07-.66.07-1s-.03-.68-.07-1l2.11-1.65a.5.5 0 0 0 .11-.63l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1a7.07 7.07 0 0 0-1.5-.87l-.38-2.65A.5.5 0 0 0 14 3h-4a.5.5 0 0 0-.5.42l-.38 2.65c-.53.2-1.03.48-1.5.87l-2.49-1a.5.5 0 0 0-.61.22l-2 3.46a.5.5 0 0 0 .11.63l2.11 1.65c-.04.32-.07.66-.07 1s.03.68.07 1L2.57 14.63a.5.5 0 0 0-.11.63l2 3.46c.14.24.44.33.68.22l2.49-1c.47.39.97.67 1.5.87l.38 2.65c.05.28.28.48.5.48h4c.22 0 .45-.2.5-.48l.38-2.65c.53-.2 1.03-.48 1.5-.87l2.49 1c.24.11.54.02.68-.22l2-3.46a.5.5 0 0 0-.11-.63l-2.11-1.65zM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7z"
2369
- })
2370
- });
2371
- }
2372
- function CancelCircleIcon({ className }) {
2373
- return /*#__PURE__*/ jsx("svg", {
2374
- className: `${Icon_css_icon} ${className}`,
2375
- fill: "currentColor",
2376
- viewBox: "0 0 24 24",
2377
- xmlns: "http://www.w3.org/2000/svg",
2378
- children: /*#__PURE__*/ jsx("path", {
2379
- d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
2380
- })
2381
- });
2092
+ const TOOLBAR_POSITIONS = [
2093
+ 'left',
2094
+ 'right'
2095
+ ];
2096
+ const TOOLBAR_STORAGE_KEYS = {
2097
+ POSITION: 'ld-toolbar-position',
2098
+ DISABLED: 'ld-toolbar-disabled',
2099
+ PROJECT: 'ld-toolbar-project'
2100
+ };
2101
+ function saveToolbarPosition(position) {
2102
+ try {
2103
+ localStorage.setItem(TOOLBAR_STORAGE_KEYS.POSITION, position);
2104
+ } catch (error) {
2105
+ console.warn('Failed to save toolbar position to localStorage:', error);
2106
+ }
2382
2107
  }
2383
- function XIcon({ className }) {
2384
- return /*#__PURE__*/ jsx("svg", {
2385
- className: `${Icon_css_icon} ${className}`,
2386
- fill: "currentColor",
2387
- viewBox: "0 0 20 20",
2388
- xmlns: "http://www.w3.org/2000/svg",
2389
- children: /*#__PURE__*/ jsx("path", {
2390
- fillRule: "evenodd",
2391
- d: "M4.47 4.47a.75.75 0 0 1 1.06 0L10 8.94l4.47-4.47a.75.75 0 1 1 1.06 1.06L11.062 10l4.47 4.47a.75.75 0 0 1-1.06 1.06L10 11.06l-4.47 4.47a.75.75 0 1 1-1.06-1.06L8.94 10 4.47 5.53a.75.75 0 0 1 0-1.06Z",
2392
- clipRule: "evenodd"
2393
- })
2394
- });
2108
+ function loadToolbarPosition() {
2109
+ try {
2110
+ const position = localStorage.getItem(TOOLBAR_STORAGE_KEYS.POSITION);
2111
+ return position && TOOLBAR_POSITIONS.includes(position) ? position : null;
2112
+ } catch (error) {
2113
+ console.warn('Failed to load toolbar position from localStorage:', error);
2114
+ return null;
2115
+ }
2395
2116
  }
2396
- function SearchSection(props) {
2397
- const { searchTerm, onSearch, setSearchIsExpanded } = props;
2398
- const handleBlur = ()=>{
2399
- if (!searchTerm.trim()) setSearchIsExpanded(false);
2400
- };
2401
- return /*#__PURE__*/ jsx(motion.div, {
2402
- className: searchFieldWrapper,
2403
- initial: {
2404
- scale: 0.95
2405
- },
2406
- animate: {
2407
- scale: 1
2408
- },
2409
- transition: {
2410
- duration: 0.2,
2411
- ease: 'easeOut'
2412
- },
2413
- children: /*#__PURE__*/ jsx(SearchField, {
2414
- "aria-label": "Search",
2415
- "data-theme": "dark",
2416
- onBlur: handleBlur,
2417
- className: searchField,
2418
- children: /*#__PURE__*/ jsxs(Group, {
2419
- className: searchGroup,
2420
- children: [
2421
- /*#__PURE__*/ jsx(Input, {
2422
- autoFocus: true,
2423
- placeholder: "Search",
2424
- value: searchTerm,
2425
- onChange: (e)=>{
2426
- onSearch(e.target.value);
2427
- }
2428
- }),
2429
- /*#__PURE__*/ jsx(IconButton, {
2430
- icon: /*#__PURE__*/ jsx(CancelCircleIcon, {}),
2431
- label: "Clear",
2432
- onClick: ()=>onSearch(''),
2433
- size: "medium"
2434
- })
2435
- ]
2436
- })
2437
- })
2117
+ const STORAGE_KEY = TOOLBAR_STORAGE_KEYS.PROJECT;
2118
+ const DevServerContext = /*#__PURE__*/ createContext(null);
2119
+ const useDevServerContext = ()=>{
2120
+ const context = useContext(DevServerContext);
2121
+ if (!context) throw new Error('useDevServerContext must be used within DevServerProvider');
2122
+ return context;
2123
+ };
2124
+ const DevServerProvider = ({ children, config, initialPosition })=>{
2125
+ const [toolbarState, setToolbarState] = useState(()=>{
2126
+ const savedPosition = loadToolbarPosition();
2127
+ return {
2128
+ flags: {},
2129
+ connectionStatus: 'disconnected',
2130
+ lastSyncTime: 0,
2131
+ isLoading: true,
2132
+ error: null,
2133
+ sourceEnvironmentKey: null,
2134
+ availableProjects: [],
2135
+ currentProjectKey: null,
2136
+ position: savedPosition || initialPosition || 'right'
2137
+ };
2438
2138
  });
2439
- }
2440
- function ActionButtons(props) {
2441
- const { searchIsExpanded, setSearchIsExpanded, onClose, onRefresh, showSearchButton } = props;
2442
- const [isSpinning, setIsSpinning] = useState(false);
2443
- const [rotationCount, setRotationCount] = useState(0);
2444
- const handleRefreshClick = useCallback(()=>{
2445
- if (isSpinning) return;
2446
- setIsSpinning(true);
2447
- setRotationCount((prev)=>prev + 360);
2448
- setTimeout(()=>{
2449
- setIsSpinning(false);
2450
- }, 1000);
2451
- onRefresh();
2139
+ const devServerClient = useMemo(()=>{
2140
+ if (config.devServerUrl) return new DevServerClient(config.devServerUrl, config.projectKey);
2141
+ return null;
2452
2142
  }, [
2453
- onRefresh,
2454
- isSpinning
2143
+ config.devServerUrl,
2144
+ config.projectKey
2455
2145
  ]);
2456
- return /*#__PURE__*/ jsxs("div", {
2457
- className: rightSection,
2458
- children: [
2459
- showSearchButton && /*#__PURE__*/ jsx(AnimatePresence, {
2460
- children: !searchIsExpanded && /*#__PURE__*/ jsx(motion.div, {
2461
- className: searchButtonArea,
2462
- initial: {
2463
- opacity: 0,
2464
- scale: 0.8,
2465
- x: 10
2466
- },
2467
- animate: {
2468
- opacity: 1,
2469
- scale: 1,
2470
- x: 0
2471
- },
2472
- exit: {
2473
- opacity: 0,
2474
- scale: 0.8,
2475
- x: 10
2476
- },
2477
- transition: {
2478
- duration: 0.2,
2479
- ease: 'easeInOut'
2480
- },
2481
- children: /*#__PURE__*/ jsx(IconButton, {
2482
- icon: /*#__PURE__*/ jsx(SearchIcon, {}),
2483
- label: "Search",
2484
- onClick: ()=>setSearchIsExpanded(true),
2485
- className: Header_css_actionButton
2486
- })
2487
- }, "search-button")
2488
- }),
2489
- /*#__PURE__*/ jsx(IconButton, {
2490
- icon: /*#__PURE__*/ jsx(motion.span, {
2491
- animate: {
2492
- rotate: rotationCount
2493
- },
2494
- transition: {
2495
- duration: 1,
2496
- ease: 'linear'
2497
- },
2498
- style: {
2499
- display: 'inline-flex',
2500
- alignItems: 'center'
2501
- },
2502
- children: /*#__PURE__*/ jsx(SyncIcon, {})
2503
- }),
2504
- label: "Refresh",
2505
- onClick: handleRefreshClick,
2506
- className: Header_css_actionButton
2507
- }),
2508
- /*#__PURE__*/ jsx("div", {
2509
- className: closeButtonArea,
2510
- children: /*#__PURE__*/ jsx(motion.div, {
2511
- whileHover: {
2512
- scale: 1.05
2513
- },
2514
- whileTap: {
2515
- scale: 0.95
2516
- },
2517
- transition: {
2518
- duration: 0.1
2519
- },
2520
- children: /*#__PURE__*/ jsx(IconButton, {
2521
- icon: /*#__PURE__*/ jsx(ChevronDownIcon, {}),
2522
- label: "Close toolbar",
2523
- onClick: onClose,
2524
- className: Header_css_actionButton
2525
- })
2526
- })
2527
- })
2528
- ]
2529
- });
2530
- }
2531
- class DevServerClient {
2532
- baseUrl;
2533
- projectKey = null;
2534
- constructor(baseUrl, projectKey){
2535
- this.baseUrl = baseUrl;
2536
- this.projectKey = projectKey || null;
2537
- }
2538
- setProjectKey(projectKey) {
2539
- this.projectKey = projectKey;
2540
- }
2541
- getProjectKey() {
2542
- return this.projectKey;
2543
- }
2544
- async getProjectData() {
2545
- if (!this.projectKey) throw new Error('No project key set. Call setProjectKey() first.');
2546
- const url = `${this.baseUrl}/dev/projects/${this.projectKey}?expand=overrides&expand=availableVariations`;
2547
- try {
2548
- const response = await fetch(url);
2549
- if (!response.ok) throw new Error(`Dev server error: ${response.status} ${response.statusText}`);
2550
- return await response.json();
2551
- } catch (error) {
2552
- if (error instanceof TypeError) throw new Error(`Failed to connect to dev server at ${this.baseUrl}. Is ldcli dev-server running?`);
2553
- throw error;
2554
- }
2555
- }
2556
- async setOverride(flagKey, value) {
2557
- if (!this.projectKey) throw new Error('No project key set. Call setProjectKey() first.');
2558
- const url = `${this.baseUrl}/dev/projects/${this.projectKey}/overrides/${flagKey}`;
2559
- try {
2560
- const response = await fetch(url, {
2561
- method: 'PUT',
2562
- headers: {
2563
- 'Content-Type': 'application/json'
2564
- },
2565
- body: JSON.stringify(value)
2566
- });
2567
- if (!response.ok) throw new Error(`Failed to set override: ${response.status} ${response.statusText}`);
2568
- return await response.json();
2569
- } catch (error) {
2570
- if (error instanceof TypeError) throw new Error(`Failed to connect to dev server at ${this.baseUrl}`);
2571
- throw error;
2572
- }
2573
- }
2574
- async clearOverride(flagKey) {
2575
- if (!this.projectKey) throw new Error('No project key set. Call setProjectKey() first.');
2576
- const url = `${this.baseUrl}/dev/projects/${this.projectKey}/overrides/${flagKey}`;
2577
- try {
2578
- const response = await fetch(url, {
2579
- method: 'DELETE'
2580
- });
2581
- if (!response.ok) throw new Error(`Failed to clear override: ${response.status} ${response.statusText}`);
2582
- } catch (error) {
2583
- if (error instanceof TypeError) throw new Error(`Failed to connect to dev server at ${this.baseUrl}`);
2584
- throw error;
2585
- }
2586
- }
2587
- async getAvailableProjects() {
2588
- try {
2589
- const response = await fetch(`${this.baseUrl}/dev/projects`);
2590
- if (!response.ok) throw new Error(`Failed to fetch projects: ${response.status} ${response.statusText}`);
2591
- return await response.json();
2592
- } catch (error) {
2593
- if (error instanceof TypeError) throw new Error(`Failed to connect to dev server at ${this.baseUrl}. Is ldcli dev-server running?`);
2594
- throw error;
2595
- }
2596
- }
2597
- }
2598
- class FlagStateManager {
2599
- devServerClient;
2600
- listeners = new Set();
2601
- constructor(devServerClient){
2602
- this.devServerClient = devServerClient;
2603
- }
2604
- async getEnhancedFlags() {
2605
- const devServerData = await this.devServerClient.getProjectData();
2606
- const enhancedFlags = {};
2607
- Object.keys(devServerData.flagsState).forEach((flagKey)=>{
2608
- const flagState = devServerData.flagsState[flagKey];
2609
- const override = devServerData.overrides[flagKey];
2610
- const variations = devServerData.availableVariations[flagKey] || [];
2611
- const currentValue = override ? override.value : flagState.value;
2612
- enhancedFlags[flagKey] = {
2613
- key: flagKey,
2614
- name: this.formatFlagName(flagKey),
2615
- currentValue,
2616
- isOverridden: !!override,
2617
- originalValue: flagState.value,
2618
- availableVariations: variations,
2619
- type: this.determineFlagType(variations, currentValue),
2620
- sourceEnvironment: devServerData.sourceEnvironmentKey,
2621
- enabled: null !== flagState.value && void 0 !== flagState.value
2622
- };
2623
- });
2624
- return enhancedFlags;
2625
- }
2626
- formatFlagName(flagKey) {
2627
- return flagKey.split('-').map((word)=>word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
2628
- }
2629
- determineFlagType(variations, currentValue) {
2630
- if (2 === variations.length && variations.every((v)=>'boolean' == typeof v.value)) return 'boolean';
2631
- if (variations.length > 2) return 'multivariate';
2632
- if ('string' == typeof currentValue) return 'string';
2633
- if ('number' == typeof currentValue) return 'number';
2634
- return 'boolean';
2635
- }
2636
- async setOverride(flagKey, value) {
2637
- await this.devServerClient.setOverride(flagKey, value);
2638
- await this.notifyListeners();
2639
- }
2640
- async clearOverride(flagKey) {
2641
- await this.devServerClient.clearOverride(flagKey);
2642
- await this.notifyListeners();
2643
- }
2644
- subscribe(listener) {
2645
- this.listeners.add(listener);
2646
- return ()=>this.listeners.delete(listener);
2647
- }
2648
- async notifyListeners() {
2649
- try {
2650
- const flags = await this.getEnhancedFlags();
2651
- this.listeners.forEach((listener)=>listener(flags));
2652
- } catch (error) {
2653
- console.error('Error notifying listeners:', error);
2654
- }
2655
- }
2656
- destroy() {
2657
- this.listeners.clear();
2658
- }
2659
- }
2660
- const TAB_ORDER = [
2661
- 'flags',
2662
- 'settings'
2663
- ];
2664
- const TOOLBAR_POSITIONS = [
2665
- 'left',
2666
- 'right'
2667
- ];
2668
- const TOOLBAR_STORAGE_KEYS = {
2669
- POSITION: 'ld-toolbar-position',
2670
- DISABLED: 'ld-toolbar-disabled',
2671
- PROJECT: 'ld-toolbar-project'
2672
- };
2673
- function saveToolbarPosition(position) {
2674
- try {
2675
- localStorage.setItem(TOOLBAR_STORAGE_KEYS.POSITION, position);
2676
- } catch (error) {
2677
- console.warn('Failed to save toolbar position to localStorage:', error);
2678
- }
2679
- }
2680
- function loadToolbarPosition() {
2681
- try {
2682
- const position = localStorage.getItem(TOOLBAR_STORAGE_KEYS.POSITION);
2683
- return position && TOOLBAR_POSITIONS.includes(position) ? position : null;
2684
- } catch (error) {
2685
- console.warn('Failed to load toolbar position from localStorage:', error);
2146
+ const flagStateManager = useMemo(()=>{
2147
+ if (devServerClient) return new FlagStateManager(devServerClient);
2686
2148
  return null;
2687
- }
2688
- }
2689
- const STORAGE_KEY = TOOLBAR_STORAGE_KEYS.PROJECT;
2690
- const LaunchDarklyToolbarContext = /*#__PURE__*/ createContext(null);
2691
- const useToolbarContext = ()=>{
2692
- const context = useContext(LaunchDarklyToolbarContext);
2693
- if (!context) throw new Error('useToolbarContext must be used within LaunchDarklyToolbarProvider');
2694
- return context;
2695
- };
2696
- const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2697
- const [toolbarState, setToolbarState] = useState(()=>{
2698
- const savedPosition = loadToolbarPosition();
2699
- return {
2700
- flags: {},
2701
- connectionStatus: 'disconnected',
2702
- lastSyncTime: 0,
2703
- isLoading: true,
2704
- error: null,
2705
- sourceEnvironmentKey: null,
2706
- availableProjects: [],
2707
- currentProjectKey: null,
2708
- position: savedPosition || initialPosition || 'right'
2709
- };
2710
- });
2711
- const devServerClient = useMemo(()=>new DevServerClient(config.devServerUrl, config.projectKey), [
2712
- config.devServerUrl,
2713
- config.projectKey
2714
- ]);
2715
- const flagStateManager = useMemo(()=>new FlagStateManager(devServerClient), [
2149
+ }, [
2716
2150
  devServerClient
2717
2151
  ]);
2718
2152
  const initializeProjectSelection = useCallback(async ()=>{
2153
+ if (!devServerClient) throw new Error('DevServerClient not available - not in dev-server mode');
2719
2154
  const availableProjects = await devServerClient.getAvailableProjects();
2720
2155
  if (0 === availableProjects.length) throw new Error('No projects found on dev server');
2721
2156
  let projectKeyToUse;
@@ -2737,6 +2172,12 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2737
2172
  ]);
2738
2173
  useEffect(()=>{
2739
2174
  const setupProjectConnection = async ()=>{
2175
+ if (!config.devServerUrl) return void setToolbarState((prev)=>({
2176
+ ...prev,
2177
+ connectionStatus: 'disconnected',
2178
+ isLoading: false,
2179
+ error: null
2180
+ }));
2740
2181
  try {
2741
2182
  setToolbarState((prev)=>({
2742
2183
  ...prev,
@@ -2762,11 +2203,12 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2762
2203
  };
2763
2204
  setupProjectConnection();
2764
2205
  }, [
2765
- initializeProjectSelection
2206
+ initializeProjectSelection,
2207
+ config.devServerUrl
2766
2208
  ]);
2767
2209
  useEffect(()=>{
2768
2210
  const loadProjectData = async ()=>{
2769
- if (!toolbarState.currentProjectKey || 'connected' !== toolbarState.connectionStatus) return;
2211
+ if (!toolbarState.currentProjectKey || 'connected' !== toolbarState.connectionStatus || !devServerClient || !flagStateManager) return;
2770
2212
  try {
2771
2213
  setToolbarState((prev)=>({
2772
2214
  ...prev,
@@ -2800,7 +2242,7 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2800
2242
  flagStateManager
2801
2243
  ]);
2802
2244
  useEffect(()=>{
2803
- if ('connected' !== toolbarState.connectionStatus) return;
2245
+ if ('connected' !== toolbarState.connectionStatus || !flagStateManager) return;
2804
2246
  const unsubscribe = flagStateManager.subscribe((flags)=>{
2805
2247
  setToolbarState((prev)=>({
2806
2248
  ...prev,
@@ -2814,6 +2256,7 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2814
2256
  toolbarState.connectionStatus
2815
2257
  ]);
2816
2258
  useEffect(()=>{
2259
+ if (!config.devServerUrl || !devServerClient || !flagStateManager) return;
2817
2260
  const pollInterval = config.pollIntervalInMs;
2818
2261
  const checkConnectionAndRecover = async ()=>{
2819
2262
  try {
@@ -2850,16 +2293,26 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2850
2293
  devServerClient,
2851
2294
  flagStateManager,
2852
2295
  config.pollIntervalInMs,
2853
- initializeProjectSelection
2296
+ initializeProjectSelection,
2297
+ config.devServerUrl
2854
2298
  ]);
2855
2299
  const setOverride = useCallback(async (flagKey, value)=>{
2300
+ if (!flagStateManager) {
2301
+ const errorMessage = 'Flag state manager not available - not in dev-server mode';
2302
+ config.onError?.(errorMessage);
2303
+ setToolbarState((prev)=>({
2304
+ ...prev,
2305
+ error: errorMessage
2306
+ }));
2307
+ return;
2308
+ }
2856
2309
  try {
2857
2310
  setToolbarState((prev)=>({
2858
2311
  ...prev,
2859
2312
  isLoading: true
2860
2313
  }));
2861
2314
  await flagStateManager.setOverride(flagKey, value);
2862
- config.onFlagOverride?.(flagKey, value, true);
2315
+ config.onDebugOverride?.(flagKey, value, true);
2863
2316
  } catch (error) {
2864
2317
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
2865
2318
  config.onError?.(errorMessage);
@@ -2878,13 +2331,22 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2878
2331
  config
2879
2332
  ]);
2880
2333
  const clearOverride = useCallback(async (flagKey)=>{
2334
+ if (!flagStateManager) {
2335
+ const errorMessage = 'Flag state manager not available - not in dev-server mode';
2336
+ config.onError?.(errorMessage);
2337
+ setToolbarState((prev)=>({
2338
+ ...prev,
2339
+ error: errorMessage
2340
+ }));
2341
+ return;
2342
+ }
2881
2343
  try {
2882
2344
  setToolbarState((prev)=>({
2883
2345
  ...prev,
2884
2346
  isLoading: true
2885
2347
  }));
2886
2348
  await flagStateManager.clearOverride(flagKey);
2887
- config.onFlagOverride?.(flagKey, null, false);
2349
+ config.onDebugOverride?.(flagKey, null, false);
2888
2350
  } catch (error) {
2889
2351
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
2890
2352
  config.onError?.(errorMessage);
@@ -2903,6 +2365,15 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2903
2365
  config
2904
2366
  ]);
2905
2367
  const clearAllOverrides = useCallback(async ()=>{
2368
+ if (!flagStateManager) {
2369
+ const errorMessage = 'Flag state manager not available - not in dev-server mode';
2370
+ config.onError?.(errorMessage);
2371
+ setToolbarState((prev)=>({
2372
+ ...prev,
2373
+ error: errorMessage
2374
+ }));
2375
+ return;
2376
+ }
2906
2377
  try {
2907
2378
  setToolbarState((prev)=>({
2908
2379
  ...prev,
@@ -2911,7 +2382,7 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2911
2382
  const overriddenFlags = Object.entries(toolbarState.flags).filter(([_, flag])=>flag.isOverridden);
2912
2383
  await Promise.all(overriddenFlags.map(([flagKey])=>flagStateManager.clearOverride(flagKey)));
2913
2384
  overriddenFlags.forEach(([flagKey])=>{
2914
- config.onFlagOverride?.(flagKey, null, false);
2385
+ config.onDebugOverride?.(flagKey, null, false);
2915
2386
  });
2916
2387
  } catch (error) {
2917
2388
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
@@ -2933,7 +2404,7 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2933
2404
  ]);
2934
2405
  const refresh = useCallback(async ()=>{
2935
2406
  try {
2936
- if (!toolbarState.currentProjectKey || 'connected' !== toolbarState.connectionStatus) return;
2407
+ if (!toolbarState.currentProjectKey || 'connected' !== toolbarState.connectionStatus || !devServerClient || !flagStateManager) return;
2937
2408
  setToolbarState((prev)=>({
2938
2409
  ...prev,
2939
2410
  isLoading: true
@@ -2965,6 +2436,16 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
2965
2436
  toolbarState.connectionStatus
2966
2437
  ]);
2967
2438
  const switchProject = useCallback(async (projectKey)=>{
2439
+ if (!devServerClient || !flagStateManager) {
2440
+ const errorMessage = 'Dev server client and flag state manager not available - not in dev-server mode';
2441
+ setToolbarState((prev)=>({
2442
+ ...prev,
2443
+ connectionStatus: 'error',
2444
+ error: errorMessage,
2445
+ isLoading: false
2446
+ }));
2447
+ return;
2448
+ }
2968
2449
  try {
2969
2450
  setToolbarState((prev)=>({
2970
2451
  ...prev,
@@ -3022,16 +2503,747 @@ const LaunchDarklyToolbarProvider = ({ children, config, initialPosition })=>{
3022
2503
  switchProject,
3023
2504
  handlePositionChange
3024
2505
  ]);
3025
- return /*#__PURE__*/ jsx(LaunchDarklyToolbarContext.Provider, {
2506
+ return /*#__PURE__*/ jsx(DevServerContext.Provider, {
3026
2507
  value: value,
3027
2508
  children: children
3028
2509
  });
3029
- };
2510
+ };
2511
+ const SearchContext = /*#__PURE__*/ createContext({
2512
+ searchTerm: '',
2513
+ setSearchTerm: ()=>{}
2514
+ });
2515
+ function SearchProvider({ children }) {
2516
+ const [searchTerm, setSearchTerm] = useState('');
2517
+ return /*#__PURE__*/ jsx(SearchContext.Provider, {
2518
+ value: {
2519
+ searchTerm,
2520
+ setSearchTerm
2521
+ },
2522
+ children: children
2523
+ });
2524
+ }
2525
+ function useSearchContext() {
2526
+ const context = useContext(SearchContext);
2527
+ if (!context) throw new Error('useSearchContext must be used within a SearchProvider');
2528
+ return context;
2529
+ }
2530
+ const FlagSdkOverrideContext = /*#__PURE__*/ createContext(null);
2531
+ function FlagSdkOverrideProvider({ children, flagOverridePlugin }) {
2532
+ const [flags, setFlags] = useState({});
2533
+ const [isLoading, setIsLoading] = useState(true);
2534
+ const ldClient = flagOverridePlugin.getClient();
2535
+ const formatFlagName = useCallback((flagKey)=>flagKey.split('-').map((word)=>word.charAt(0).toUpperCase() + word.slice(1)).join(' '), []);
2536
+ const inferFlagType = useCallback((value)=>{
2537
+ if ('boolean' == typeof value) return 'boolean';
2538
+ if ('string' == typeof value) return 'string';
2539
+ if ('number' == typeof value) return 'number';
2540
+ return 'object';
2541
+ }, []);
2542
+ const buildFlags = useCallback((allFlags)=>{
2543
+ const overrides = flagOverridePlugin.getAllOverrides();
2544
+ const result = {};
2545
+ Object.keys(allFlags).sort().forEach((flagKey)=>{
2546
+ const currentValue = allFlags[flagKey];
2547
+ result[flagKey] = {
2548
+ key: flagKey,
2549
+ name: formatFlagName(flagKey),
2550
+ currentValue,
2551
+ isOverridden: flagKey in overrides,
2552
+ type: inferFlagType(currentValue)
2553
+ };
2554
+ });
2555
+ return result;
2556
+ }, [
2557
+ flagOverridePlugin,
2558
+ formatFlagName,
2559
+ inferFlagType
2560
+ ]);
2561
+ useEffect(()=>{
2562
+ if (!ldClient) {
2563
+ setFlags({});
2564
+ setIsLoading(false);
2565
+ return;
2566
+ }
2567
+ const initialFlags = ldClient.allFlags();
2568
+ const initialFlagState = buildFlags(initialFlags);
2569
+ setFlags(initialFlagState);
2570
+ setIsLoading(false);
2571
+ const handleChange = (changes)=>{
2572
+ setFlags((prevFlags)=>{
2573
+ const updatedRawFlags = ldClient.allFlags();
2574
+ const newFlags = buildFlags(updatedRawFlags);
2575
+ const updatedFlags = {
2576
+ ...prevFlags
2577
+ };
2578
+ let hasChanges = false;
2579
+ Object.keys(changes).forEach((flagKey)=>{
2580
+ if (newFlags[flagKey]) {
2581
+ updatedFlags[flagKey] = newFlags[flagKey];
2582
+ hasChanges = true;
2583
+ }
2584
+ });
2585
+ Object.keys(newFlags).forEach((flagKey)=>{
2586
+ if (!prevFlags[flagKey]) {
2587
+ updatedFlags[flagKey] = newFlags[flagKey];
2588
+ hasChanges = true;
2589
+ }
2590
+ });
2591
+ return hasChanges ? updatedFlags : prevFlags;
2592
+ });
2593
+ };
2594
+ ldClient.on('change', handleChange);
2595
+ return ()=>{
2596
+ ldClient.off('change', handleChange);
2597
+ };
2598
+ }, [
2599
+ ldClient,
2600
+ buildFlags
2601
+ ]);
2602
+ return /*#__PURE__*/ jsx(FlagSdkOverrideContext.Provider, {
2603
+ value: {
2604
+ flags,
2605
+ isLoading
2606
+ },
2607
+ children: children
2608
+ });
2609
+ }
2610
+ function useFlagSdkOverrideContext() {
2611
+ const context = useContext(FlagSdkOverrideContext);
2612
+ if (!context) throw new Error('useFlagSdkOverrideContext must be used within a FlagSdkOverrideProvider');
2613
+ return context;
2614
+ }
2615
+ var extracted = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.4.12/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/components/ActionButtonsContainer.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA+1Ty27bMBC8+yv2aB/o0krsuszHFEuRkgjRJLGkI6lF/72grLpWHk7iFuilN2G0OzM7u1x//TK0/TBw+L4ACKiUcbWADQ898IcFgPSkNDHpU/IHAZvQQ/TWKHhEWjJmAyu99cRqwoHtOV/lJv+oqbK+Y70APCafMWVisDgIqKzuM1BjELAP4/ckzKyukoCCz1EydXMBx5K8tRLpJC1etPKZ8xUkQhcDknZp3tgZlRoBqTHuYfFjsf6VghCs07I1iZ1rx2AafbJwf3IgsWxr8kenxFzjOhVLzfEgR8JLhtfsX8RPqMwxCiiy/lsihGX7TOQVm5t3udnP3Lx1Bbup+sp2iqnkfHC70MOmmNKdz7w7oZV3iUXzTYtz4Qh102q2fLzX8kgxqwZvXNKUoXF0k4x3AtBa4Osigsao88+uMUmzGLDUApzvCMNIbXXPYkPGtSI/hIvEhDIRpdVqjM4HLE0aBPD19lLf+cTQWt9pNe9u8uMQzqflmWh1y0lcSXc7Vv4WLf4v+YNLLv5oycW/WPLdM36qJS4r8oen/ZLQKVYO6JjEqFdAUIOET8DXmxfUb+G5u3IcT9tmU7wvuptG2/6l2e6z45832tTkOQcAAA==\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2616
+ var extracted_options = {};
2617
+ extracted_options.styleTagTransform = styleTagTransform_default();
2618
+ extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2619
+ extracted_options.insert = insertBySelector_default().bind(null, "head");
2620
+ extracted_options.domAPI = styleDomAPI_default();
2621
+ extracted_options.insertStyleElement = insertStyleElement_default();
2622
+ injectStylesIntoStyleTag_default()(extracted.Z, extracted_options);
2623
+ extracted.Z && extracted.Z.locals && extracted.Z.locals;
2624
+ var container = '_9ykxyy0';
2625
+ var toggleButton = '_9ykxyy2';
2626
+ var actionButton = '_9ykxyy1';
2627
+ var active = '_9ykxyy3';
2628
+ const ActionButtonsContainer = ({ children })=>/*#__PURE__*/ jsx("div", {
2629
+ className: container,
2630
+ children: children
2631
+ });
2632
+ const EASING = {
2633
+ bounce: [
2634
+ 0.34,
2635
+ 1.56,
2636
+ 0.64,
2637
+ 1
2638
+ ],
2639
+ smooth: [
2640
+ 0.25,
2641
+ 0.46,
2642
+ 0.45,
2643
+ 0.94
2644
+ ],
2645
+ elastic: [
2646
+ 0.22,
2647
+ 1,
2648
+ 0.36,
2649
+ 1
2650
+ ]
2651
+ };
2652
+ const ANIMATION_CONFIG = {
2653
+ container: {
2654
+ width: {
2655
+ duration: 0.5,
2656
+ ease: EASING.bounce
2657
+ },
2658
+ height: {
2659
+ duration: 0.5,
2660
+ ease: EASING.bounce
2661
+ },
2662
+ borderRadius: {
2663
+ duration: 0.4,
2664
+ ease: EASING.smooth
2665
+ },
2666
+ boxShadow: {
2667
+ duration: 0.3,
2668
+ ease: 'easeInOut'
2669
+ }
2670
+ },
2671
+ circleLogo: {
2672
+ opacity: {
2673
+ duration: 0.25,
2674
+ ease: 'easeOut'
2675
+ },
2676
+ scale: {
2677
+ duration: 0.3,
2678
+ ease: EASING.smooth
2679
+ },
2680
+ rotate: {
2681
+ duration: 0.3,
2682
+ ease: EASING.smooth
2683
+ }
2684
+ },
2685
+ toolbarContent: {
2686
+ opacity: {
2687
+ duration: 0.4,
2688
+ ease: EASING.smooth
2689
+ },
2690
+ y: {
2691
+ duration: 0.5,
2692
+ ease: EASING.bounce
2693
+ },
2694
+ scale: {
2695
+ duration: 0.5,
2696
+ ease: EASING.bounce
2697
+ }
2698
+ },
2699
+ contentArea: {
2700
+ opacity: {
2701
+ duration: 0.4,
2702
+ ease: 'easeInOut'
2703
+ },
2704
+ maxHeight: {
2705
+ duration: 0.5,
2706
+ ease: EASING.elastic
2707
+ }
2708
+ },
2709
+ tabContent: {
2710
+ duration: 0.3,
2711
+ ease: EASING.smooth
2712
+ },
2713
+ tabsContainer: {
2714
+ opacity: {
2715
+ duration: 0.5,
2716
+ ease: EASING.bounce
2717
+ },
2718
+ y: {
2719
+ duration: 0.5,
2720
+ ease: EASING.bounce
2721
+ },
2722
+ delay: 0.3
2723
+ }
2724
+ };
2725
+ const DIMENSIONS = {
2726
+ collapsed: {
2727
+ width: 60,
2728
+ height: 60,
2729
+ borderRadius: 30
2730
+ },
2731
+ expanded: {
2732
+ width: 400,
2733
+ borderRadius: 12
2734
+ },
2735
+ scale: {
2736
+ expanded: 1.02,
2737
+ collapsed: 1
2738
+ },
2739
+ slideDistance: 30
2740
+ };
2741
+ const SHADOWS = {
2742
+ expanded: '0 12px 48px rgba(0, 0, 0, 0.5)',
2743
+ hoveredCollapsed: '0 8px 40px rgba(0, 0, 0, 0.4)',
2744
+ collapsed: '0 4px 16px rgba(0, 0, 0, 0.3)'
2745
+ };
2746
+ const VIRTUALIZATION = {
2747
+ ITEM_HEIGHT: 85,
2748
+ OVERSCAN: 5
2749
+ };
2750
+ function LaunchDarklyIcon({ className }) {
2751
+ return /*#__PURE__*/ jsx("svg", {
2752
+ className: className,
2753
+ fill: "currentColor",
2754
+ preserveAspectRatio: "xMidYMid",
2755
+ viewBox: "-.00348466 0 256.88728835 255.31014671",
2756
+ xmlns: "http://www.w3.org/2000/svg",
2757
+ role: "img",
2758
+ "aria-label": "LaunchDarkly",
2759
+ children: /*#__PURE__*/ jsx("path", {
2760
+ 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"
2761
+ })
2762
+ });
2763
+ }
2764
+ var _vanilla_extract_webpack_plugin_extracted = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.4.12/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");
2765
+ var webpack_plugin_extracted_options = {};
2766
+ webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2767
+ webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2768
+ webpack_plugin_extracted_options.insert = insertBySelector_default().bind(null, "head");
2769
+ webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2770
+ webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2771
+ injectStylesIntoStyleTag_default()(_vanilla_extract_webpack_plugin_extracted.Z, webpack_plugin_extracted_options);
2772
+ _vanilla_extract_webpack_plugin_extracted.Z && _vanilla_extract_webpack_plugin_extracted.Z.locals && _vanilla_extract_webpack_plugin_extracted.Z.locals;
2773
+ var contentArea = '_1n4ciyy8';
2774
+ var tabsContainer = '_1n4ciyya';
2775
+ var scrollableContent = '_1n4ciyy9';
2776
+ var toolbarContent = '_1n4ciyy7';
2777
+ var positionRight = '_1n4ciyy1';
2778
+ var circleLogo = '_1n4ciyy6';
2779
+ var positionLeft = '_1n4ciyy2';
2780
+ var toolbarCircle = '_1n4ciyy3';
2781
+ var circleContent = '_1n4ciyy5';
2782
+ var toolbarContainer = '_1n4ciyy0';
2783
+ var toolbarExpanded = '_1n4ciyy4';
2784
+ function CircleLogo(props) {
2785
+ const { hasBeenExpanded } = props;
2786
+ return /*#__PURE__*/ jsx(motion.div, {
2787
+ className: circleContent,
2788
+ initial: {
2789
+ opacity: 0,
2790
+ x: '-50%',
2791
+ y: '-50%',
2792
+ scale: 0.9,
2793
+ rotate: 90
2794
+ },
2795
+ animate: {
2796
+ opacity: 1,
2797
+ x: '-50%',
2798
+ y: '-50%',
2799
+ scale: 1,
2800
+ rotate: 0
2801
+ },
2802
+ exit: {
2803
+ opacity: 0,
2804
+ x: '-50%',
2805
+ y: '-50%',
2806
+ scale: 0.9,
2807
+ rotate: 90
2808
+ },
2809
+ transition: {
2810
+ ...ANIMATION_CONFIG.circleLogo,
2811
+ opacity: {
2812
+ ...ANIMATION_CONFIG.circleLogo.opacity,
2813
+ delay: hasBeenExpanded ? 0.3 : 0
2814
+ }
2815
+ },
2816
+ children: /*#__PURE__*/ jsx(motion.div, {
2817
+ whileHover: {
2818
+ scale: 1.1
2819
+ },
2820
+ transition: {
2821
+ duration: 0.2,
2822
+ ease: 'easeInOut'
2823
+ },
2824
+ children: /*#__PURE__*/ jsx(LaunchDarklyIcon, {
2825
+ className: circleLogo
2826
+ })
2827
+ })
2828
+ }, "circle-logo");
2829
+ }
2830
+ var _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.4.12/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/components/StatusDot.css.ts.vanilla.css\",\"source\":\"Ll8xd3ZvZHZxMCB7CiAgd2lkdGg6IDhweDsKICBoZWlnaHQ6IDhweDsKICBib3JkZXItcmFkaXVzOiA1MCU7Cn0=\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2831
+ var _vanilla_extract_webpack_plugin_extracted_options = {};
2832
+ _vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2833
+ _vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2834
+ _vanilla_extract_webpack_plugin_extracted_options.insert = insertBySelector_default().bind(null, "head");
2835
+ _vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2836
+ _vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2837
+ injectStylesIntoStyleTag_default()(_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, _vanilla_extract_webpack_plugin_extracted_options);
2838
+ _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
2839
+ var statusDot = '_1wvodvq0';
2840
+ function StatusDot(props) {
2841
+ const { status } = props;
2842
+ const getStatusColor = ()=>{
2843
+ switch(status){
2844
+ case 'connected':
2845
+ return 'var(--lp-color-green-500)';
2846
+ case 'disconnected':
2847
+ return 'var(--lp-color-orange-500)';
2848
+ case 'error':
2849
+ return 'var(--lp-color-red-500)';
2850
+ }
2851
+ };
2852
+ return /*#__PURE__*/ jsx("div", {
2853
+ className: `${statusDot}`,
2854
+ style: {
2855
+ backgroundColor: getStatusColor()
2856
+ }
2857
+ });
2858
+ }
2859
+ var ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_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.4.12/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/components/ConnectionStatus.css.ts.vanilla.css\",\"source\":\"Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2860
+ var node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
2861
+ node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2862
+ node_modules_vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2863
+ node_modules_vanilla_extract_webpack_plugin_extracted_options.insert = insertBySelector_default().bind(null, "head");
2864
+ node_modules_vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2865
+ node_modules_vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2866
+ injectStylesIntoStyleTag_default()(ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, node_modules_vanilla_extract_webpack_plugin_extracted_options);
2867
+ ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && ConnectionStatus_css_ts_vanilla_css_source_Ll8xNnNuZzc4MCB7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKICBwYWRkaW5nOiA4cHggMTZweDsKICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbHAtY29sb3ItZ3JheS04MDApOwp9Ci5fMTZzbmc3ODEgewogIGRpc3BsYXk6IGZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBnYXA6IDhweDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwp9Ci5fMTZzbmc3ODIgewogIGZvbnQtc2l6ZTogMTJweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0zMDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9Ci5fMTZzbmc3ODMgewogIGZvbnQtc2l6ZTogMTBweDsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS00MDApOwogIGZvbnQtZmFtaWx5OiB2YXIoLS1scC1mb250LWZhbWlseS1tb25vc3BhY2UpOwp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
2868
+ var lastSync = '_16sng783';
2869
+ var statusText = '_16sng782';
2870
+ var statusIndicator = '_16sng781';
2871
+ var ConnectionStatus_css_connectionStatus = '_16sng780';
2872
+ function ConnectionStatus(props) {
2873
+ const { status, lastSyncTime } = props;
2874
+ const getStatusText = ()=>{
2875
+ switch(status){
2876
+ case 'connected':
2877
+ return 'Connected to dev server';
2878
+ case 'disconnected':
2879
+ return 'Disconnected from dev server';
2880
+ case 'error':
2881
+ return 'Error connecting to dev server';
2882
+ }
2883
+ };
2884
+ return /*#__PURE__*/ jsxs("div", {
2885
+ className: ConnectionStatus_css_connectionStatus,
2886
+ children: [
2887
+ /*#__PURE__*/ jsxs("div", {
2888
+ className: statusIndicator,
2889
+ children: [
2890
+ /*#__PURE__*/ jsx(StatusDot, {
2891
+ status: status
2892
+ }),
2893
+ /*#__PURE__*/ jsx("span", {
2894
+ className: statusText,
2895
+ children: getStatusText()
2896
+ })
2897
+ ]
2898
+ }),
2899
+ lastSyncTime > 0 && /*#__PURE__*/ jsxs("span", {
2900
+ className: lastSync,
2901
+ children: [
2902
+ "Last sync: ",
2903
+ new Date(lastSyncTime).toLocaleTimeString()
2904
+ ]
2905
+ })
2906
+ ]
2907
+ });
2908
+ }
2909
+ var hh8fYPBfEjJ8YIAAA_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.4.12/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");
2910
+ var _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
2911
+ _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2912
+ _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2913
+ _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");
2914
+ _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2915
+ _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2916
+ injectStylesIntoStyleTag_default()(hh8fYPBfEjJ8YIAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, _vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
2917
+ hh8fYPBfEjJ8YIAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && hh8fYPBfEjJ8YIAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && hh8fYPBfEjJ8YIAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
2918
+ var centerSection = '_9uh9aj4';
2919
+ var searchFieldWrapper = '_9uh9ajd';
2920
+ var searchButtonArea = '_9uh9aj7';
2921
+ var closeButtonArea = '_9uh9aj8';
2922
+ var rightSection = '_9uh9aj6';
2923
+ var environmentWrapper = '_9uh9ajg';
2924
+ var headerTitle = '_9uh9aj3';
2925
+ var logo = '_9uh9aj2';
2926
+ var environmentLabel = '_9uh9aj5';
2927
+ var searchWrapper = '_9uh9ajf';
2928
+ var searchField = '_9uh9ajb';
2929
+ var header = '_9uh9aj0';
2930
+ var Header_css_actionButton = '_9uh9aj9';
2931
+ var searchGroup = '_9uh9ajc';
2932
+ var leftSection = '_9uh9aj1';
2933
+ function LogoSection() {
2934
+ return /*#__PURE__*/ jsxs("div", {
2935
+ className: leftSection,
2936
+ children: [
2937
+ /*#__PURE__*/ jsx(LaunchDarklyIcon, {
2938
+ className: logo
2939
+ }),
2940
+ /*#__PURE__*/ jsx("span", {
2941
+ className: headerTitle,
2942
+ children: "Developers"
2943
+ })
2944
+ ]
2945
+ });
2946
+ }
2947
+ function EnvironmentLabel(props) {
2948
+ const { label } = props;
2949
+ return /*#__PURE__*/ jsx("div", {
2950
+ className: centerSection,
2951
+ children: /*#__PURE__*/ jsx("span", {
2952
+ className: environmentLabel,
2953
+ children: label
2954
+ })
2955
+ });
2956
+ }
2957
+ var IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_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.4.12/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/components/IconButton.css.ts.vanilla.css\",\"source\":\"LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ==\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2958
+ var _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
2959
+ _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
2960
+ _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.setAttributes = setAttributesWithoutAttributes_default();
2961
+ _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");
2962
+ _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.domAPI = styleDomAPI_default();
2963
+ _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options.insertStyleElement = insertStyleElement_default();
2964
+ injectStylesIntoStyleTag_default()(IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, _pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
2965
+ IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && IconButton_css_ts_vanilla_css_source_LmkwM3Z2MzAgewogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgYm9yZGVyOiBub25lOwogIGN1cnNvcjogcG9pbnRlcjsKICBwYWRkaW5nOiA4cHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4ycyBlYXNlOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTQwMCk7Cn0KLmkwM3Z2MzA6ZGlzYWJsZWQgewogIGN1cnNvcjogbm90LWFsbG93ZWQ7CiAgb3BhY2l0eTogMC41Owp9Ci5pMDN2djMwOmhvdmVyOm5vdCg6ZGlzYWJsZWQpIHsKICBjb2xvcjogdmFyKC0tbHAtY29sb3ItZ3JheS0yMDApOwogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxwLWNvbG9yLWdyYXktODAwKTsKfQouaTAzdnYzMSB7CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAzMHB4Owp9Ci5pMDN2djMyIHsKICB3aWR0aDogMzZweDsKICBoZWlnaHQ6IDM2cHg7Cn0KLmkwM3Z2MzMgewogIHdpZHRoOiA0MHB4OwogIGhlaWdodDogNDBweDsKfQ_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
2966
+ var medium = 'i03vv32 i03vv30';
2967
+ var small = 'i03vv31 i03vv30';
2968
+ var large = 'i03vv33 i03vv30';
2969
+ function IconButton(props) {
2970
+ const { icon, label, onClick, disabled = false, className, size = 'large' } = props;
2971
+ const getSizeClass = ()=>{
2972
+ switch(size){
2973
+ case 'small':
2974
+ return small;
2975
+ case 'medium':
2976
+ return medium;
2977
+ case 'large':
2978
+ return large;
2979
+ default:
2980
+ return large;
2981
+ }
2982
+ };
2983
+ return /*#__PURE__*/ jsx("button", {
2984
+ className: `${getSizeClass()} ${className || ''}`,
2985
+ onClick: onClick,
2986
+ disabled: disabled,
2987
+ "aria-label": label,
2988
+ children: icon
2989
+ });
2990
+ }
2991
+ var Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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.4.12/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/components/icons/Icon.css.ts.vanilla.css\",\"source\":\"LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0=\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
2992
+ var Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
2993
+ Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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();
2994
+ Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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();
2995
+ Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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");
2996
+ Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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();
2997
+ Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_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();
2998
+ injectStylesIntoStyleTag_default()(Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
2999
+ Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && Icon_css_ts_vanilla_css_source_LnJqOWY2YzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
3000
+ var Icon_css_icon = 'rj9f6c0';
3001
+ function SearchIcon({ className }) {
3002
+ return /*#__PURE__*/ jsx("svg", {
3003
+ className: `${Icon_css_icon} ${className}`,
3004
+ fill: "currentColor",
3005
+ viewBox: "0 0 24 24",
3006
+ xmlns: "http://www.w3.org/2000/svg",
3007
+ children: /*#__PURE__*/ jsx("path", {
3008
+ d: "M10 2a8 8 0 1 0 5.29 14.29l4.3 4.3a1 1 0 0 0 1.42-1.42l-4.3-4.3A8 8 0 0 0 10 2zm0 2a6 6 0 1 1 0 12 6 6 0 0 1 0-12z"
3009
+ })
3010
+ });
3011
+ }
3012
+ function ChevronDownIcon({ className }) {
3013
+ return /*#__PURE__*/ jsx("svg", {
3014
+ className: `${Icon_css_icon} ${className}`,
3015
+ fill: "currentColor",
3016
+ viewBox: "0 0 24 24",
3017
+ xmlns: "http://www.w3.org/2000/svg",
3018
+ children: /*#__PURE__*/ jsx("path", {
3019
+ d: "M12 15.5l-6-6 1.41-1.41L12 12.67l4.59-4.58L18 9.5z"
3020
+ })
3021
+ });
3022
+ }
3023
+ function EditIcon({ className }) {
3024
+ return /*#__PURE__*/ jsx("svg", {
3025
+ className: `${Icon_css_icon} ${className}`,
3026
+ fill: "currentColor",
3027
+ viewBox: "0 0 24 24",
3028
+ xmlns: "http://www.w3.org/2000/svg",
3029
+ children: /*#__PURE__*/ jsx("path", {
3030
+ d: "M3 17.25V21h3.75l11.06-11.06-3.75-3.75L3 17.25zm2.92-1.42L14.06 7.69l1.42 1.42-8.14 8.14H5.92v-1.42zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"
3031
+ })
3032
+ });
3033
+ }
3034
+ function SyncIcon({ className }) {
3035
+ return /*#__PURE__*/ jsx("svg", {
3036
+ className: `${Icon_css_icon} ${className}`,
3037
+ fill: "currentColor",
3038
+ viewBox: "0 0 24 24",
3039
+ xmlns: "http://www.w3.org/2000/svg",
3040
+ children: /*#__PURE__*/ jsx("path", {
3041
+ d: "M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.1-.3 2.13-.82 3.02l1.46 1.46A7.92 7.92 0 0 0 20 12c0-4.42-3.58-8-8-8zm-6 8c0-1.1.3-2.13.82-3.02L5.36 7.52A7.92 7.92 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3c-3.31 0-6-2.69-6-6z"
3042
+ })
3043
+ });
3044
+ }
3045
+ function CheckIcon({ className }) {
3046
+ return /*#__PURE__*/ jsx("svg", {
3047
+ className: `${Icon_css_icon} ${className}`,
3048
+ fill: "currentColor",
3049
+ viewBox: "0 0 24 24",
3050
+ xmlns: "http://www.w3.org/2000/svg",
3051
+ children: /*#__PURE__*/ jsx("path", {
3052
+ d: "M9 16.17l-3.88-3.88L4 13.41l5 5 12-12-1.41-1.41z"
3053
+ })
3054
+ });
3055
+ }
3056
+ function ToggleOffIcon({ className }) {
3057
+ return /*#__PURE__*/ jsx("svg", {
3058
+ className: `${Icon_css_icon} ${className}`,
3059
+ fill: "currentColor",
3060
+ viewBox: "0 0 24 24",
3061
+ xmlns: "http://www.w3.org/2000/svg",
3062
+ children: /*#__PURE__*/ jsx("path", {
3063
+ d: "M17 7H7a5 5 0 0 0 0 10h10a5 5 0 0 0 0-10zm0 8H7a3 3 0 0 1 0-6h10a3 3 0 0 1 0 6zM7 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z"
3064
+ })
3065
+ });
3066
+ }
3067
+ function GearIcon({ className }) {
3068
+ return /*#__PURE__*/ jsx("svg", {
3069
+ className: `${Icon_css_icon} ${className}`,
3070
+ fill: "currentColor",
3071
+ viewBox: "0 0 24 24",
3072
+ xmlns: "http://www.w3.org/2000/svg",
3073
+ children: /*#__PURE__*/ jsx("path", {
3074
+ d: "M19.43 12.98c.04-.32.07-.66.07-1s-.03-.68-.07-1l2.11-1.65a.5.5 0 0 0 .11-.63l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1a7.07 7.07 0 0 0-1.5-.87l-.38-2.65A.5.5 0 0 0 14 3h-4a.5.5 0 0 0-.5.42l-.38 2.65c-.53.2-1.03.48-1.5.87l-2.49-1a.5.5 0 0 0-.61.22l-2 3.46a.5.5 0 0 0 .11.63l2.11 1.65c-.04.32-.07.66-.07 1s.03.68.07 1L2.57 14.63a.5.5 0 0 0-.11.63l2 3.46c.14.24.44.33.68.22l2.49-1c.47.39.97.67 1.5.87l.38 2.65c.05.28.28.48.5.48h4c.22 0 .45-.2.5-.48l.38-2.65c.53-.2 1.03-.48 1.5-.87l2.49 1c.24.11.54.02.68-.22l2-3.46a.5.5 0 0 0-.11-.63l-2.11-1.65zM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7z"
3075
+ })
3076
+ });
3077
+ }
3078
+ function CancelCircleIcon({ className }) {
3079
+ return /*#__PURE__*/ jsx("svg", {
3080
+ className: `${Icon_css_icon} ${className}`,
3081
+ fill: "currentColor",
3082
+ viewBox: "0 0 24 24",
3083
+ xmlns: "http://www.w3.org/2000/svg",
3084
+ children: /*#__PURE__*/ jsx("path", {
3085
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
3086
+ })
3087
+ });
3088
+ }
3089
+ function XIcon({ className }) {
3090
+ return /*#__PURE__*/ jsx("svg", {
3091
+ className: `${Icon_css_icon} ${className}`,
3092
+ fill: "currentColor",
3093
+ viewBox: "0 0 20 20",
3094
+ xmlns: "http://www.w3.org/2000/svg",
3095
+ children: /*#__PURE__*/ jsx("path", {
3096
+ fillRule: "evenodd",
3097
+ d: "M4.47 4.47a.75.75 0 0 1 1.06 0L10 8.94l4.47-4.47a.75.75 0 1 1 1.06 1.06L11.062 10l4.47 4.47a.75.75 0 0 1-1.06 1.06L10 11.06l-4.47 4.47a.75.75 0 1 1-1.06-1.06L8.94 10 4.47 5.53a.75.75 0 0 1 0-1.06Z",
3098
+ clipRule: "evenodd"
3099
+ })
3100
+ });
3101
+ }
3102
+ function SearchSection(props) {
3103
+ const { searchTerm, onSearch, setSearchIsExpanded } = props;
3104
+ const handleBlur = ()=>{
3105
+ if (!searchTerm.trim()) setSearchIsExpanded(false);
3106
+ };
3107
+ return /*#__PURE__*/ jsx(motion.div, {
3108
+ className: searchFieldWrapper,
3109
+ initial: {
3110
+ scale: 0.95
3111
+ },
3112
+ animate: {
3113
+ scale: 1
3114
+ },
3115
+ transition: {
3116
+ duration: 0.2,
3117
+ ease: 'easeOut'
3118
+ },
3119
+ children: /*#__PURE__*/ jsx(SearchField, {
3120
+ "aria-label": "Search",
3121
+ "data-theme": "dark",
3122
+ onBlur: handleBlur,
3123
+ className: searchField,
3124
+ children: /*#__PURE__*/ jsxs(Group, {
3125
+ className: searchGroup,
3126
+ children: [
3127
+ /*#__PURE__*/ jsx(Input, {
3128
+ autoFocus: true,
3129
+ placeholder: "Search",
3130
+ value: searchTerm,
3131
+ onChange: (e)=>{
3132
+ onSearch(e.target.value);
3133
+ }
3134
+ }),
3135
+ /*#__PURE__*/ jsx(IconButton, {
3136
+ icon: /*#__PURE__*/ jsx(CancelCircleIcon, {}),
3137
+ label: "Clear",
3138
+ onClick: ()=>onSearch(''),
3139
+ size: "medium"
3140
+ })
3141
+ ]
3142
+ })
3143
+ })
3144
+ });
3145
+ }
3146
+ function ActionButtons(props) {
3147
+ const { searchIsExpanded, setSearchIsExpanded, onClose, onRefresh, showSearchButton, showRefreshButton } = props;
3148
+ const [isSpinning, setIsSpinning] = useState(false);
3149
+ const [rotationCount, setRotationCount] = useState(0);
3150
+ const handleRefreshClick = useCallback(()=>{
3151
+ if (isSpinning) return;
3152
+ setIsSpinning(true);
3153
+ setRotationCount((prev)=>prev + 360);
3154
+ setTimeout(()=>{
3155
+ setIsSpinning(false);
3156
+ }, 1000);
3157
+ onRefresh();
3158
+ }, [
3159
+ onRefresh,
3160
+ isSpinning
3161
+ ]);
3162
+ return /*#__PURE__*/ jsxs("div", {
3163
+ className: rightSection,
3164
+ children: [
3165
+ showSearchButton && /*#__PURE__*/ jsx(AnimatePresence, {
3166
+ children: !searchIsExpanded && /*#__PURE__*/ jsx(motion.div, {
3167
+ className: searchButtonArea,
3168
+ initial: {
3169
+ opacity: 0,
3170
+ scale: 0.8,
3171
+ x: 10
3172
+ },
3173
+ animate: {
3174
+ opacity: 1,
3175
+ scale: 1,
3176
+ x: 0
3177
+ },
3178
+ exit: {
3179
+ opacity: 0,
3180
+ scale: 0.8,
3181
+ x: 10
3182
+ },
3183
+ transition: {
3184
+ duration: 0.2,
3185
+ ease: 'easeInOut'
3186
+ },
3187
+ children: /*#__PURE__*/ jsx(IconButton, {
3188
+ icon: /*#__PURE__*/ jsx(SearchIcon, {}),
3189
+ label: "Search",
3190
+ onClick: ()=>setSearchIsExpanded(true),
3191
+ className: Header_css_actionButton
3192
+ })
3193
+ }, "search-button")
3194
+ }),
3195
+ showRefreshButton && /*#__PURE__*/ jsx(IconButton, {
3196
+ icon: /*#__PURE__*/ jsx(motion.span, {
3197
+ animate: {
3198
+ rotate: rotationCount
3199
+ },
3200
+ transition: {
3201
+ duration: 1,
3202
+ ease: 'linear'
3203
+ },
3204
+ style: {
3205
+ display: 'inline-flex',
3206
+ alignItems: 'center'
3207
+ },
3208
+ children: /*#__PURE__*/ jsx(SyncIcon, {})
3209
+ }),
3210
+ label: "Refresh",
3211
+ onClick: handleRefreshClick,
3212
+ className: Header_css_actionButton
3213
+ }),
3214
+ /*#__PURE__*/ jsx("div", {
3215
+ className: closeButtonArea,
3216
+ children: /*#__PURE__*/ jsx(motion.div, {
3217
+ whileHover: {
3218
+ scale: 1.05
3219
+ },
3220
+ whileTap: {
3221
+ scale: 0.95
3222
+ },
3223
+ transition: {
3224
+ duration: 0.1
3225
+ },
3226
+ children: /*#__PURE__*/ jsx(IconButton, {
3227
+ icon: /*#__PURE__*/ jsx(ChevronDownIcon, {}),
3228
+ label: "Close toolbar",
3229
+ onClick: onClose,
3230
+ className: Header_css_actionButton
3231
+ })
3232
+ })
3233
+ })
3234
+ ]
3235
+ });
3236
+ }
3030
3237
  function Header(props) {
3031
- const { onClose, onSearch, searchTerm, searchIsExpanded, setSearchIsExpanded, label } = props;
3032
- const { state, refresh } = useToolbarContext();
3238
+ const { onClose, onSearch, searchTerm, searchIsExpanded, setSearchIsExpanded, label, mode } = props;
3239
+ const { state, refresh } = useDevServerContext();
3033
3240
  const { connectionStatus } = state;
3034
3241
  const isConnected = 'connected' === connectionStatus;
3242
+ const isDevServer = 'dev-server' === mode;
3243
+ const showEnvironment = isDevServer && isConnected;
3244
+ const showSearch = isDevServer ? isConnected : true;
3245
+ const showRefresh = isDevServer;
3246
+ const showConnectionStatus = isDevServer;
3035
3247
  return /*#__PURE__*/ jsxs(Fragment, {
3036
3248
  children: [
3037
3249
  /*#__PURE__*/ jsxs("div", {
@@ -3040,7 +3252,7 @@ function Header(props) {
3040
3252
  /*#__PURE__*/ jsx(LogoSection, {}),
3041
3253
  /*#__PURE__*/ jsx("div", {
3042
3254
  className: centerSection,
3043
- children: isConnected && /*#__PURE__*/ jsx(AnimatePresence, {
3255
+ children: (showEnvironment || showSearch) && /*#__PURE__*/ jsx(AnimatePresence, {
3044
3256
  mode: "wait",
3045
3257
  children: searchIsExpanded ? /*#__PURE__*/ jsx(motion.div, {
3046
3258
  className: searchWrapper,
@@ -3064,7 +3276,7 @@ function Header(props) {
3064
3276
  onSearch: onSearch,
3065
3277
  setSearchIsExpanded: setSearchIsExpanded
3066
3278
  })
3067
- }, "search") : /*#__PURE__*/ jsx(motion.div, {
3279
+ }, "search") : showEnvironment ? /*#__PURE__*/ jsx(motion.div, {
3068
3280
  className: environmentWrapper,
3069
3281
  initial: {
3070
3282
  opacity: 0,
@@ -3084,7 +3296,7 @@ function Header(props) {
3084
3296
  children: /*#__PURE__*/ jsx(EnvironmentLabel, {
3085
3297
  label: label
3086
3298
  })
3087
- }, "environment")
3299
+ }, "environment") : null
3088
3300
  })
3089
3301
  }),
3090
3302
  /*#__PURE__*/ jsx(ActionButtons, {
@@ -3092,11 +3304,12 @@ function Header(props) {
3092
3304
  setSearchIsExpanded: setSearchIsExpanded,
3093
3305
  onClose: onClose,
3094
3306
  onRefresh: refresh,
3095
- showSearchButton: isConnected
3307
+ showSearchButton: showSearch,
3308
+ showRefreshButton: showRefresh
3096
3309
  })
3097
3310
  ]
3098
3311
  }),
3099
- /*#__PURE__*/ jsx(ConnectionStatus, {
3312
+ showConnectionStatus && /*#__PURE__*/ jsx(ConnectionStatus, {
3100
3313
  status: connectionStatus,
3101
3314
  lastSyncTime: state.lastSyncTime
3102
3315
  })
@@ -3473,26 +3686,26 @@ function OverrideIndicator(props) {
3473
3686
  ]
3474
3687
  });
3475
3688
  }
3476
- var _2qaMCgBQAA_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.4.12/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/FlagTabContent.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA62T0XKbMBBF3/0VeulM/CCPcJ04Vb5mgQV2LCRVEgYn03/vSGBMQpom0z7ZLLv3XF1WO2jVefgp2MuGscrowD09o2TZwQ5P11KPVDdBsnshYq0wyjjJzuDuOFeWp2deO7jwvRDb2FKStwouklUKkw4oqjWngK2XrEAd0MVyDVayxxHVkuY9laGRLGHiqGTZ0+bXZje6zJJLc0ZXKdNL1lBZoo69AYfAby9QKbKefHzVNxSQewsFSqZN78CuaTNinxAr+/GXl+SwCGS0jBF0rZ5PcA3r6nh9mBaG63MBqrjLhPjGOPsh7LBd4L+vvsN+lP4g88OUeZqqoCV1WTQuqrw12qQgUv//yHE2fkjGW3A1aa6wCpJlD6P1r+/CrHqfVJtp/Q5CjIo3g9AFEyu+cEapHBz/IKhHIbYsONDegkMdXg9OXyc0pJcOZBNpycenIMcVZKEleY/5iQKfpZLwhJ7uQQ7FqXam06X8ghAPTdfmSW4p8KccEsi4Eh13UFLnpyV+e/B/Ix0/R3qP4aA4rRjvx/GwDDFerIi0xtN4Vx0qCHTGxcQxTdxaIPdGdQHTFTB2urPjGqe/r8RvMovluNn82womSDzIBH87ycRu7xmCj45/A/2qaMCgBQAA\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
3477
- var _2qaMCgBQAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
3478
- _2qaMCgBQAA_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();
3479
- _2qaMCgBQAA_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();
3480
- _2qaMCgBQAA_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");
3481
- _2qaMCgBQAA_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();
3482
- _2qaMCgBQAA_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();
3483
- injectStylesIntoStyleTag_default()(_2qaMCgBQAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, _2qaMCgBQAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
3484
- _2qaMCgBQAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && _2qaMCgBQAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && _2qaMCgBQAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
3485
- var flagName = 'amlvxq0';
3486
- var virtualContainer = 'amlvxq5';
3487
- var flagHeader = 'amlvxq2';
3488
- var FlagTabContent_css_flagKey = 'amlvxq3';
3489
- var flagOptions = 'amlvxq4';
3490
- var virtualInner = 'amlvxq6';
3491
- var FlagTabContent_css_virtualItem = 'amlvxq7';
3492
- var flagNameText = 'amlvxq1';
3493
- function FlagTabContent() {
3689
+ var WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_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.4.12/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/FlagDevServerTabContent.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA62T0XKbMBBF3/0VeulM/CCPcJ3YVb5mgQV2LCSNJIzdTv+9I4GBhDRNJn2yWXbvubqsdp062bwT7NeGscrowD39RMmyg70+30s9Ut0EyR6FiLXCKOMku4B74FxZnp557eDG90JsY0tJ3iq4SVYpTDqgqNacArZesgJ1QBfLNVjJTgOqJc17KkMjWcLEUcmy583vzW5wmSWX5oKuUqaXrKGyRB17A14Dn1+gUmQ9+fiqbygg9xYKlEyb3oFd0ybEPiFW9uMvL8lhEchoGSPoWj2d4B7W3fH6MC1c788FqOIhE+Ib4+yHsNftAv999R32g/Q7mR/GzNNUBS2p26JxUeWt0SYFkfr/R46T8UMy3oKrSXOFVZAsexqsf34XJtXHpNqM63cQYlCcDUIXTKz4whmlcnD8naBOQmxZcKC9BYc6vBwcv05oSC8dyCbSko8PQY4ryEJL8h7zMwU+SSXhET3egxyKc+1Mp0v5CSEemq7Nk9xS4G85JJBxJTruoKTOj0v8+uBfIx0/RnqL4aA4rxhvx/G0DDFerIi0xtNwVx0qCHTBxcQxTcwtkHujuoDpChg73tlhjdPfF+KzzGI5Zpv/WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA=\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
3690
+ var WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
3691
+ WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_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();
3692
+ WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_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();
3693
+ WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_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");
3694
+ WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_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();
3695
+ WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_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();
3696
+ injectStylesIntoStyleTag_default()(WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
3697
+ WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && WsEEiQcZ4a8nmdjtPUPw0fEfr2SBGKAFAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
3698
+ var flagName = 'ul8pbu0';
3699
+ var virtualContainer = 'ul8pbu5';
3700
+ var flagHeader = 'ul8pbu2';
3701
+ var FlagDevServerTabContent_css_flagKey = 'ul8pbu3';
3702
+ var flagOptions = 'ul8pbu4';
3703
+ var virtualInner = 'ul8pbu6';
3704
+ var FlagDevServerTabContent_css_virtualItem = 'ul8pbu7';
3705
+ var flagNameText = 'ul8pbu1';
3706
+ function FlagDevServerTabContent() {
3494
3707
  const { searchTerm } = useSearchContext();
3495
- const { state, setOverride, clearOverride, clearAllOverrides } = useToolbarContext();
3708
+ const { state, setOverride, clearOverride, clearAllOverrides } = useDevServerContext();
3496
3709
  const { flags } = state;
3497
3710
  const [showOverriddenOnly, setShowOverriddenOnly] = useState(false);
3498
3711
  const parentRef = useRef(null);
@@ -3505,10 +3718,12 @@ function FlagTabContent() {
3505
3718
  const virtualizer = useVirtualizer({
3506
3719
  count: filteredFlags.length,
3507
3720
  getScrollElement: ()=>parentRef.current,
3508
- estimateSize: ()=>85,
3509
- overscan: 5
3721
+ estimateSize: ()=>VIRTUALIZATION.ITEM_HEIGHT,
3722
+ overscan: VIRTUALIZATION.OVERSCAN
3510
3723
  });
3511
- const totalOverriddenFlags = Object.values(flags).filter((flag)=>flag.isOverridden).length;
3724
+ const totalOverriddenFlags = useMemo(()=>Object.values(flags).filter((flag)=>flag.isOverridden).length, [
3725
+ flags
3726
+ ]);
3512
3727
  const renderFlagControl = (flag)=>{
3513
3728
  const handleOverride = (value)=>setOverride(flag.key, value);
3514
3729
  switch(flag.type){
@@ -3544,14 +3759,18 @@ function FlagTabContent() {
3544
3759
  clearAllOverrides();
3545
3760
  setShowOverriddenOnly(false);
3546
3761
  };
3547
- const onClearOverride = (flagKey)=>{
3762
+ const onClearOverride = useCallback((flagKey)=>{
3548
3763
  if (totalOverriddenFlags <= 1) setShowOverriddenOnly(false);
3549
3764
  clearOverride(flagKey);
3550
- };
3765
+ }, [
3766
+ totalOverriddenFlags,
3767
+ setShowOverriddenOnly,
3768
+ clearOverride
3769
+ ]);
3551
3770
  const genericHelpTitle = showOverriddenOnly ? 'No overrides found' : 'No flags found';
3552
3771
  const genericHelpSubtitle = showOverriddenOnly ? 'You have not set any overrides yet' : 'Try adjusting your search';
3553
3772
  return /*#__PURE__*/ jsx("div", {
3554
- "data-testid": "flag-tab-content",
3773
+ "data-testid": "flag-dev-server-tab-content",
3555
3774
  children: /*#__PURE__*/ jsxs(Fragment, {
3556
3775
  children: [
3557
3776
  /*#__PURE__*/ jsxs(ActionButtonsContainer, {
@@ -3589,7 +3808,7 @@ function FlagTabContent() {
3589
3808
  children: virtualizer.getVirtualItems().map((virtualItem)=>{
3590
3809
  const [_, flag] = filteredFlags[virtualItem.index];
3591
3810
  return /*#__PURE__*/ jsx("div", {
3592
- className: FlagTabContent_css_virtualItem,
3811
+ className: FlagDevServerTabContent_css_virtualItem,
3593
3812
  style: {
3594
3813
  height: `${virtualItem.size}px`,
3595
3814
  transform: `translateY(${virtualItem.start}px)`,
@@ -3613,7 +3832,7 @@ function FlagTabContent() {
3613
3832
  ]
3614
3833
  }),
3615
3834
  /*#__PURE__*/ jsx("span", {
3616
- className: FlagTabContent_css_flagKey,
3835
+ className: FlagDevServerTabContent_css_flagKey,
3617
3836
  children: flag.key
3618
3837
  })
3619
3838
  ]
@@ -3750,133 +3969,502 @@ function ConnectionStatusDisplay(props) {
3750
3969
  /*#__PURE__*/ jsx(StatusDot, {
3751
3970
  status: status
3752
3971
  })
3753
- ]
3972
+ ]
3973
+ });
3974
+ }
3975
+ function SettingsTabContent(props) {
3976
+ const { mode } = props;
3977
+ const { state, switchProject, handlePositionChange } = useDevServerContext();
3978
+ const { searchTerm } = useSearchContext();
3979
+ const position = state.position;
3980
+ const handleProjectSwitch = async (projectKey)=>{
3981
+ try {
3982
+ await switchProject(projectKey);
3983
+ } catch (error) {
3984
+ console.error('Failed to switch project:', error);
3985
+ }
3986
+ };
3987
+ const handlePositionSelect = (newPosition)=>{
3988
+ handlePositionChange(newPosition);
3989
+ };
3990
+ const getSettingsGroups = ()=>{
3991
+ if ('dev-server' === mode) return [
3992
+ {
3993
+ title: 'Dev Server Configuration',
3994
+ items: [
3995
+ {
3996
+ id: 'project',
3997
+ name: 'Project',
3998
+ icon: 'folder',
3999
+ isProjectSelector: true
4000
+ },
4001
+ {
4002
+ id: 'environment',
4003
+ name: 'Environment',
4004
+ icon: 'globe',
4005
+ value: state.sourceEnvironmentKey || 'Unknown'
4006
+ },
4007
+ {
4008
+ id: 'connection',
4009
+ name: 'Connection status',
4010
+ icon: 'link',
4011
+ isConnectionStatus: true
4012
+ }
4013
+ ]
4014
+ },
4015
+ {
4016
+ title: 'Toolbar Settings',
4017
+ items: [
4018
+ {
4019
+ id: 'position',
4020
+ name: 'Position',
4021
+ icon: 'move',
4022
+ isPositionSelector: true
4023
+ }
4024
+ ]
4025
+ }
4026
+ ];
4027
+ return [
4028
+ {
4029
+ title: 'Toolbar Settings',
4030
+ items: [
4031
+ {
4032
+ id: 'position',
4033
+ name: 'Position',
4034
+ icon: 'move',
4035
+ isPositionSelector: true
4036
+ }
4037
+ ]
4038
+ }
4039
+ ];
4040
+ };
4041
+ const settingsGroups = getSettingsGroups();
4042
+ const hasResults = settingsGroups.some((group)=>group.items.some((item)=>item.name.toLowerCase().includes(searchTerm.toLowerCase()) || item.id.toLowerCase().includes(searchTerm.trim().toLowerCase())));
4043
+ if (!hasResults && searchTerm.trim()) return /*#__PURE__*/ jsx(GenericHelpText, {
4044
+ title: "No settings found",
4045
+ subtitle: "Try adjusting your search"
4046
+ });
4047
+ return /*#__PURE__*/ jsx("div", {
4048
+ "data-testid": "settings-tab-content",
4049
+ children: settingsGroups.map((group)=>{
4050
+ const groupResults = group.items.filter((item)=>item.name.toLowerCase().includes(searchTerm.toLowerCase()) || item.id.toLowerCase().includes(searchTerm.trim().toLowerCase()));
4051
+ if (0 === groupResults.length) return null;
4052
+ return /*#__PURE__*/ jsxs("div", {
4053
+ className: settingsGroup,
4054
+ children: [
4055
+ /*#__PURE__*/ jsx("h4", {
4056
+ className: settingsGroupTitle,
4057
+ children: group.title
4058
+ }),
4059
+ /*#__PURE__*/ jsx(List, {
4060
+ children: group.items.filter((item)=>item.name.toLowerCase().includes(searchTerm.toLowerCase()) || item.id.toLowerCase().includes(searchTerm.trim().toLowerCase())).map((item)=>{
4061
+ if (item.isConnectionStatus) return /*#__PURE__*/ jsx(ListItem, {
4062
+ onClick: void 0,
4063
+ children: /*#__PURE__*/ jsxs("div", {
4064
+ className: settingInfo,
4065
+ children: [
4066
+ /*#__PURE__*/ jsx("div", {
4067
+ className: settingDetails,
4068
+ children: /*#__PURE__*/ jsx("span", {
4069
+ className: settingName,
4070
+ children: item.name
4071
+ })
4072
+ }),
4073
+ /*#__PURE__*/ jsx(ConnectionStatusDisplay, {
4074
+ status: state.connectionStatus
4075
+ })
4076
+ ]
4077
+ })
4078
+ }, item.id);
4079
+ return /*#__PURE__*/ jsx(ListItem, {
4080
+ onClick: void 0,
4081
+ children: /*#__PURE__*/ jsxs("div", {
4082
+ className: settingInfo,
4083
+ children: [
4084
+ /*#__PURE__*/ jsx("div", {
4085
+ className: settingDetails,
4086
+ children: /*#__PURE__*/ jsx("span", {
4087
+ className: settingName,
4088
+ children: item.name
4089
+ })
4090
+ }),
4091
+ item.isProjectSelector ? /*#__PURE__*/ jsx(ProjectSelector, {
4092
+ availableProjects: state.availableProjects,
4093
+ currentProject: state.currentProjectKey,
4094
+ onProjectChange: handleProjectSwitch,
4095
+ isLoading: state.isLoading
4096
+ }) : item.isPositionSelector ? /*#__PURE__*/ jsx(PositionSelector, {
4097
+ currentPosition: position,
4098
+ onPositionChange: handlePositionSelect
4099
+ }) : /*#__PURE__*/ jsx("span", {
4100
+ className: settingValue,
4101
+ children: item.value
4102
+ })
4103
+ ]
4104
+ })
4105
+ }, item.id);
4106
+ })
4107
+ })
4108
+ ]
4109
+ }, group.title);
4110
+ })
4111
+ });
4112
+ }
4113
+ var LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_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.4.12/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/components/LocalFlagControls.css.ts.vanilla.css\",\"source\":\"Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
4114
+ var LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
4115
+ LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_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();
4116
+ LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_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();
4117
+ LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_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");
4118
+ LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_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();
4119
+ LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_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();
4120
+ injectStylesIntoStyleTag_default()(LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z, LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted_options);
4121
+ LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z && LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals && LocalFlagControls_css_ts_vanilla_css_source_Ll83ZWs0c24wIHsKICB3aWR0aDogMTAwJTsKICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogIGZvbnQtc2l6ZTogMTJweDsKICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBwYWRkaW5nOiA4cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogIzJhMmEyYTsKICBjb2xvcjogI2ZmZjsKfQouXzdlazRzbjEgewogIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKfQouXzdlazRzbjIgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA0cHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9Ci5fN2VrNHNuMyB7CiAgY29sb3I6IHJlZDsKICBmb250LXNpemU6IDEycHg7CiAgbWFyZ2luLXRvcDogNHB4Owp9_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_101_3_node_modules_vanilla_extract_webpack_plugin_extracted.Z.locals;
4122
+ var jsonButtonGroup = '_7ek4sn2';
4123
+ var jsonParseError = '_7ek4sn3';
4124
+ var jsonTextareaError = '_7ek4sn1';
4125
+ var jsonTextarea = '_7ek4sn0';
4126
+ function LocalBooleanFlagControl(props) {
4127
+ const { flag, onOverride, disabled = false } = props;
4128
+ return /*#__PURE__*/ jsx("div", {
4129
+ className: switchContainer,
4130
+ children: /*#__PURE__*/ jsx(Switch, {
4131
+ "data-theme": "dark",
4132
+ isSelected: flag.currentValue,
4133
+ onChange: onOverride,
4134
+ isDisabled: disabled,
4135
+ className: switch_
4136
+ })
4137
+ });
4138
+ }
4139
+ function LocalStringNumberFlagControl(props) {
4140
+ const { flag, onOverride, disabled = false } = props;
4141
+ const [isEditing, setIsEditing] = useState(false);
4142
+ const [tempValue, setTempValue] = useState(String(flag.currentValue));
4143
+ const handleConfirm = ()=>{
4144
+ let finalValue;
4145
+ if ('number' === flag.type) {
4146
+ finalValue = parseFloat(tempValue);
4147
+ if (isNaN(finalValue)) return;
4148
+ } else finalValue = tempValue;
4149
+ onOverride(finalValue);
4150
+ setIsEditing(false);
4151
+ };
4152
+ const handleCancel = ()=>{
4153
+ setTempValue(String(flag.currentValue));
4154
+ setIsEditing(false);
4155
+ };
4156
+ return /*#__PURE__*/ jsx("div", {
4157
+ className: customVariantContainer,
4158
+ children: isEditing ? /*#__PURE__*/ jsx(TextField, {
4159
+ "aria-label": `Enter ${flag.type} value`,
4160
+ className: customVariantField,
4161
+ "data-theme": "dark",
4162
+ children: /*#__PURE__*/ jsxs(Group, {
4163
+ className: customVariantFieldGroup,
4164
+ children: [
4165
+ /*#__PURE__*/ jsx(Input, {
4166
+ placeholder: `Enter ${flag.type} value`,
4167
+ value: tempValue,
4168
+ onChange: (e)=>setTempValue(e.target.value),
4169
+ type: 'number' === flag.type ? 'number' : 'text'
4170
+ }),
4171
+ /*#__PURE__*/ jsx(IconButton, {
4172
+ icon: /*#__PURE__*/ jsx(CheckIcon, {}),
4173
+ label: "Confirm",
4174
+ onClick: handleConfirm
4175
+ }),
4176
+ /*#__PURE__*/ jsx(IconButton, {
4177
+ icon: /*#__PURE__*/ jsx(XIcon, {}),
4178
+ label: "Cancel",
4179
+ onClick: handleCancel
4180
+ })
4181
+ ]
4182
+ })
4183
+ }) : /*#__PURE__*/ jsxs("div", {
4184
+ className: currentValueGroup,
4185
+ children: [
4186
+ /*#__PURE__*/ jsx("div", {
4187
+ className: currentValueText,
4188
+ children: String(flag.currentValue)
4189
+ }),
4190
+ /*#__PURE__*/ jsx(IconButton, {
4191
+ icon: /*#__PURE__*/ jsx(EditIcon, {}),
4192
+ label: "Edit",
4193
+ onClick: ()=>setIsEditing(true),
4194
+ disabled: disabled
4195
+ })
4196
+ ]
4197
+ })
4198
+ });
4199
+ }
4200
+ function LocalObjectFlagControl(props) {
4201
+ const { flag, onOverride, disabled = false } = props;
4202
+ const [isEditing, setIsEditing] = useState(false);
4203
+ const [tempValue, setTempValue] = useState(()=>JSON.stringify(flag.currentValue, null, 2));
4204
+ const [parseError, setParseError] = useState(null);
4205
+ const displayValue = useMemo(()=>JSON.stringify(flag.currentValue), [
4206
+ flag.currentValue
4207
+ ]);
4208
+ const handleConfirm = ()=>{
4209
+ try {
4210
+ const parsedValue = JSON.parse(tempValue);
4211
+ onOverride(parsedValue);
4212
+ setIsEditing(false);
4213
+ setParseError(null);
4214
+ } catch {
4215
+ setParseError('Invalid JSON format');
4216
+ }
4217
+ };
4218
+ const handleCancel = ()=>{
4219
+ setTempValue(JSON.stringify(flag.currentValue, null, 2));
4220
+ setIsEditing(false);
4221
+ setParseError(null);
4222
+ };
4223
+ const handleValueChange = (value)=>{
4224
+ setTempValue(value);
4225
+ setParseError(null);
4226
+ };
4227
+ return /*#__PURE__*/ jsx("div", {
4228
+ className: customVariantContainer,
4229
+ children: isEditing ? /*#__PURE__*/ jsx(TextField, {
4230
+ "aria-label": "Enter JSON value",
4231
+ className: customVariantField,
4232
+ "data-theme": "dark",
4233
+ children: /*#__PURE__*/ jsxs(Group, {
4234
+ className: customVariantFieldGroup,
4235
+ children: [
4236
+ /*#__PURE__*/ jsx("textarea", {
4237
+ placeholder: "Enter valid JSON",
4238
+ value: tempValue,
4239
+ onChange: (e)=>handleValueChange(e.target.value),
4240
+ rows: 4,
4241
+ className: parseError ? `${jsonTextarea} ${jsonTextareaError}` : jsonTextarea
4242
+ }),
4243
+ /*#__PURE__*/ jsxs("div", {
4244
+ className: jsonButtonGroup,
4245
+ children: [
4246
+ /*#__PURE__*/ jsx(IconButton, {
4247
+ icon: /*#__PURE__*/ jsx(CheckIcon, {}),
4248
+ label: "Confirm",
4249
+ onClick: handleConfirm
4250
+ }),
4251
+ /*#__PURE__*/ jsx(IconButton, {
4252
+ icon: /*#__PURE__*/ jsx(XIcon, {}),
4253
+ label: "Cancel",
4254
+ onClick: handleCancel
4255
+ })
4256
+ ]
4257
+ }),
4258
+ parseError && /*#__PURE__*/ jsx("div", {
4259
+ className: jsonParseError,
4260
+ children: parseError
4261
+ })
4262
+ ]
4263
+ })
4264
+ }) : /*#__PURE__*/ jsxs("div", {
4265
+ className: currentValueGroup,
4266
+ children: [
4267
+ /*#__PURE__*/ jsx("div", {
4268
+ className: currentValueText,
4269
+ children: displayValue
4270
+ }),
4271
+ /*#__PURE__*/ jsx(IconButton, {
4272
+ icon: /*#__PURE__*/ jsx(EditIcon, {}),
4273
+ label: "Edit JSON",
4274
+ onClick: ()=>setIsEditing(true),
4275
+ disabled: disabled
4276
+ })
4277
+ ]
4278
+ })
3754
4279
  });
3755
4280
  }
3756
- function SettingsTabContent() {
3757
- const { state, switchProject, handlePositionChange } = useToolbarContext();
4281
+ function FlagSdkOverrideTabContentInner(props) {
4282
+ const { flagOverridePlugin } = props;
3758
4283
  const { searchTerm } = useSearchContext();
3759
- const position = state.position;
3760
- const handleProjectSwitch = async (projectKey)=>{
3761
- try {
3762
- await switchProject(projectKey);
3763
- } catch (error) {
3764
- console.error('Failed to switch project:', error);
3765
- }
4284
+ const { flags, isLoading } = useFlagSdkOverrideContext();
4285
+ const ldClient = flagOverridePlugin?.getClient();
4286
+ const [showOverriddenOnly, setShowOverriddenOnly] = useState(false);
4287
+ const parentRef = useRef(null);
4288
+ const flagEntries = Object.entries(flags);
4289
+ const filteredFlags = flagEntries.filter(([flagKey, flag])=>{
4290
+ const matchesSearch = flag.name.toLowerCase().includes(searchTerm.toLowerCase()) || flagKey.toLowerCase().includes(searchTerm.trim().toLowerCase());
4291
+ const matchesOverrideFilter = showOverriddenOnly ? flag.isOverridden : true;
4292
+ return matchesSearch && matchesOverrideFilter;
4293
+ });
4294
+ const virtualizer = useVirtualizer({
4295
+ count: filteredFlags.length,
4296
+ getScrollElement: ()=>parentRef.current,
4297
+ estimateSize: ()=>VIRTUALIZATION.ITEM_HEIGHT,
4298
+ overscan: VIRTUALIZATION.OVERSCAN
4299
+ });
4300
+ if (!ldClient) return /*#__PURE__*/ jsx(GenericHelpText, {
4301
+ title: "LaunchDarkly client is not available",
4302
+ subtitle: "To use local flag overrides, ensure the LaunchDarkly client is initialized and available."
4303
+ });
4304
+ if (isLoading) return /*#__PURE__*/ jsx(GenericHelpText, {
4305
+ title: "Loading flags...",
4306
+ subtitle: "Please wait while we load your feature flags"
4307
+ });
4308
+ const handleSetOverride = (flagKey, value)=>{
4309
+ flagOverridePlugin.setOverride(flagKey, value);
3766
4310
  };
3767
- const handlePositionSelect = (newPosition)=>{
3768
- handlePositionChange(newPosition);
4311
+ const handleClearOverride = useCallback((flagKey)=>{
4312
+ flagOverridePlugin.removeOverride(flagKey);
4313
+ }, [
4314
+ flagOverridePlugin
4315
+ ]);
4316
+ const handleClearAllOverrides = ()=>{
4317
+ flagOverridePlugin.clearAllOverrides();
3769
4318
  };
3770
- const settingsGroups = [
3771
- {
3772
- title: 'Configuration',
3773
- items: [
3774
- {
3775
- id: 'project',
3776
- name: 'Project',
3777
- icon: 'folder',
3778
- isProjectSelector: true
3779
- },
3780
- {
3781
- id: 'position',
3782
- name: 'Position',
3783
- icon: 'move',
3784
- isPositionSelector: true
3785
- },
3786
- {
3787
- id: 'environment',
3788
- name: 'Environment',
3789
- icon: 'globe',
3790
- value: state.sourceEnvironmentKey || 'Unknown'
3791
- },
3792
- {
3793
- id: 'connection',
3794
- name: 'Connection status',
3795
- icon: 'link',
3796
- isConnectionStatus: true
3797
- }
3798
- ]
4319
+ const totalOverriddenFlags = useMemo(()=>Object.values(flags).filter((flag)=>flag.isOverridden).length, [
4320
+ flags
4321
+ ]);
4322
+ const renderFlagControl = (flag)=>{
4323
+ const handleOverride = (value)=>handleSetOverride(flag.key, value);
4324
+ switch(flag.type){
4325
+ case 'boolean':
4326
+ return /*#__PURE__*/ jsx(LocalBooleanFlagControl, {
4327
+ flag: flag,
4328
+ onOverride: handleOverride
4329
+ });
4330
+ case 'string':
4331
+ case 'number':
4332
+ return /*#__PURE__*/ jsx(LocalStringNumberFlagControl, {
4333
+ flag: flag,
4334
+ onOverride: handleOverride
4335
+ });
4336
+ case 'object':
4337
+ return /*#__PURE__*/ jsx(LocalObjectFlagControl, {
4338
+ flag: flag,
4339
+ onOverride: handleOverride
4340
+ });
4341
+ default:
4342
+ return /*#__PURE__*/ jsx(LocalObjectFlagControl, {
4343
+ flag: flag,
4344
+ onOverride: handleOverride
4345
+ });
3799
4346
  }
3800
- ];
3801
- const hasResults = settingsGroups.some((group)=>group.items.some((item)=>item.name.toLowerCase().includes(searchTerm.toLowerCase()) || item.id.toLowerCase().includes(searchTerm.trim().toLowerCase())));
3802
- if (!hasResults && searchTerm.trim()) return /*#__PURE__*/ jsx(GenericHelpText, {
3803
- title: "No settings found",
3804
- subtitle: "Try adjusting your search"
4347
+ };
4348
+ if (0 === flagEntries.length) return /*#__PURE__*/ jsx(GenericHelpText, {
4349
+ title: "No flags available",
4350
+ subtitle: "Make sure your LaunchDarkly client is properly initialized with flags"
3805
4351
  });
4352
+ const genericHelpTitle = showOverriddenOnly ? 'No overridden flags found' : 'No results found';
4353
+ const genericHelpSubtitle = showOverriddenOnly ? 'No overridden flags match your search' : 'Try adjusting your search or check if flags are available';
3806
4354
  return /*#__PURE__*/ jsx("div", {
3807
- "data-testid": "settings-tab-content",
3808
- children: settingsGroups.map((group)=>{
3809
- const groupResults = group.items.filter((item)=>item.name.toLowerCase().includes(searchTerm.toLowerCase()) || item.id.toLowerCase().includes(searchTerm.trim().toLowerCase()));
3810
- if (0 === groupResults.length) return null;
3811
- return /*#__PURE__*/ jsxs("div", {
3812
- className: settingsGroup,
3813
- children: [
3814
- /*#__PURE__*/ jsx("h4", {
3815
- className: settingsGroupTitle,
3816
- children: group.title
3817
- }),
3818
- /*#__PURE__*/ jsx(List, {
3819
- children: group.items.filter((item)=>item.name.toLowerCase().includes(searchTerm.toLowerCase()) || item.id.toLowerCase().includes(searchTerm.trim().toLowerCase())).map((item)=>{
3820
- if (item.isConnectionStatus) return /*#__PURE__*/ jsx(ListItem, {
3821
- onClick: void 0,
3822
- children: /*#__PURE__*/ jsxs("div", {
3823
- className: settingInfo,
3824
- children: [
3825
- /*#__PURE__*/ jsx("div", {
3826
- className: settingDetails,
3827
- children: /*#__PURE__*/ jsx("span", {
3828
- className: settingName,
3829
- children: item.name
3830
- })
3831
- }),
3832
- /*#__PURE__*/ jsx(ConnectionStatusDisplay, {
3833
- status: state.connectionStatus
3834
- })
3835
- ]
3836
- })
3837
- }, item.id);
3838
- return /*#__PURE__*/ jsx(ListItem, {
3839
- onClick: void 0,
3840
- children: /*#__PURE__*/ jsxs("div", {
3841
- className: settingInfo,
3842
- children: [
3843
- /*#__PURE__*/ jsx("div", {
3844
- className: settingDetails,
3845
- children: /*#__PURE__*/ jsx("span", {
3846
- className: settingName,
3847
- children: item.name
4355
+ "data-testid": "flag-sdk-tab-content",
4356
+ children: /*#__PURE__*/ jsxs(Fragment, {
4357
+ children: [
4358
+ /*#__PURE__*/ jsxs(ActionButtonsContainer, {
4359
+ children: [
4360
+ /*#__PURE__*/ jsx("button", {
4361
+ className: `${toggleButton} ${showOverriddenOnly ? active : ''}`,
4362
+ onClick: ()=>setShowOverriddenOnly((prev)=>!prev),
4363
+ children: "Show overrides only"
4364
+ }),
4365
+ /*#__PURE__*/ jsxs("button", {
4366
+ className: actionButton,
4367
+ onClick: handleClearAllOverrides,
4368
+ disabled: 0 === totalOverriddenFlags,
4369
+ children: [
4370
+ "Clear all overrides (",
4371
+ totalOverriddenFlags,
4372
+ ")"
4373
+ ]
4374
+ })
4375
+ ]
4376
+ }),
4377
+ 0 === filteredFlags.length && (searchTerm.trim() || showOverriddenOnly) ? /*#__PURE__*/ jsx(GenericHelpText, {
4378
+ title: genericHelpTitle,
4379
+ subtitle: genericHelpSubtitle
4380
+ }) : /*#__PURE__*/ jsx("div", {
4381
+ ref: parentRef,
4382
+ className: virtualContainer,
4383
+ children: /*#__PURE__*/ jsx(List, {
4384
+ children: /*#__PURE__*/ jsx("div", {
4385
+ className: virtualInner,
4386
+ style: {
4387
+ height: virtualizer.getTotalSize()
4388
+ },
4389
+ children: virtualizer.getVirtualItems().map((virtualItem)=>{
4390
+ const [flagKey, flag] = filteredFlags[virtualItem.index];
4391
+ return /*#__PURE__*/ jsx("div", {
4392
+ className: FlagDevServerTabContent_css_virtualItem,
4393
+ style: {
4394
+ height: `${virtualItem.size}px`,
4395
+ transform: `translateY(${virtualItem.start}px)`,
4396
+ borderBottom: '1px solid var(--lp-color-gray-800)'
4397
+ },
4398
+ children: /*#__PURE__*/ jsxs(ListItem, {
4399
+ children: [
4400
+ /*#__PURE__*/ jsxs("div", {
4401
+ className: flagHeader,
4402
+ children: [
4403
+ /*#__PURE__*/ jsxs("span", {
4404
+ className: flagName,
4405
+ children: [
4406
+ /*#__PURE__*/ jsx("span", {
4407
+ className: flagNameText,
4408
+ children: flag.name
4409
+ }),
4410
+ flag.isOverridden && /*#__PURE__*/ jsx(OverrideIndicator, {
4411
+ onClear: ()=>handleClearOverride(flagKey)
4412
+ })
4413
+ ]
4414
+ }),
4415
+ /*#__PURE__*/ jsx("span", {
4416
+ className: FlagDevServerTabContent_css_flagKey,
4417
+ children: flagKey
4418
+ })
4419
+ ]
4420
+ }),
4421
+ /*#__PURE__*/ jsx("div", {
4422
+ className: flagOptions,
4423
+ children: renderFlagControl(flag)
3848
4424
  })
3849
- }),
3850
- item.isProjectSelector ? /*#__PURE__*/ jsx(ProjectSelector, {
3851
- availableProjects: state.availableProjects,
3852
- currentProject: state.currentProjectKey,
3853
- onProjectChange: handleProjectSwitch,
3854
- isLoading: state.isLoading
3855
- }) : item.isPositionSelector ? /*#__PURE__*/ jsx(PositionSelector, {
3856
- currentPosition: position,
3857
- onPositionChange: handlePositionSelect
3858
- }) : /*#__PURE__*/ jsx("span", {
3859
- className: settingValue,
3860
- children: item.value
3861
- })
3862
- ]
3863
- })
3864
- }, item.id);
4425
+ ]
4426
+ })
4427
+ }, virtualItem.key);
4428
+ })
3865
4429
  })
3866
4430
  })
3867
- ]
3868
- }, group.title);
4431
+ })
4432
+ ]
4433
+ })
4434
+ });
4435
+ }
4436
+ function FlagSdkOverrideTabContent(props) {
4437
+ if (!props.flagOverridePlugin) return /*#__PURE__*/ jsx(GenericHelpText, {
4438
+ title: "Flag override plugin is not available",
4439
+ subtitle: "To use local flag overrides, ensure the flag override plugin is added to your LaunchDarkly client configuration."
4440
+ });
4441
+ return /*#__PURE__*/ jsx(FlagSdkOverrideProvider, {
4442
+ flagOverridePlugin: props.flagOverridePlugin,
4443
+ children: /*#__PURE__*/ jsx(FlagSdkOverrideTabContentInner, {
4444
+ flagOverridePlugin: props.flagOverridePlugin
3869
4445
  })
3870
4446
  });
3871
4447
  }
3872
- const TAB_CONTENT_MAP = {
3873
- flags: FlagTabContent,
3874
- settings: SettingsTabContent
3875
- };
3876
4448
  function TabContentRenderer(props) {
3877
- const { activeTab, slideDirection } = props;
3878
- const ContentComponent = TAB_CONTENT_MAP[activeTab];
3879
- if (!ContentComponent) return null;
4449
+ const { activeTab, slideDirection, flagOverridePlugin, mode } = props;
4450
+ const renderContent = ()=>{
4451
+ switch(activeTab){
4452
+ case 'flag-sdk':
4453
+ return /*#__PURE__*/ jsx(FlagSdkOverrideTabContent, {
4454
+ flagOverridePlugin: flagOverridePlugin
4455
+ });
4456
+ case 'flag-dev-server':
4457
+ return /*#__PURE__*/ jsx(FlagDevServerTabContent, {});
4458
+ case 'settings':
4459
+ return /*#__PURE__*/ jsx(SettingsTabContent, {
4460
+ mode: mode
4461
+ });
4462
+ default:
4463
+ return null;
4464
+ }
4465
+ };
4466
+ const content = renderContent();
4467
+ if (!content) return null;
3880
4468
  return /*#__PURE__*/ jsx(motion.div, {
3881
4469
  initial: {
3882
4470
  opacity: 0,
@@ -3894,7 +4482,7 @@ function TabContentRenderer(props) {
3894
4482
  scale: 0.95
3895
4483
  },
3896
4484
  transition: ANIMATION_CONFIG.tabContent,
3897
- children: /*#__PURE__*/ jsx(ContentComponent, {})
4485
+ children: content
3898
4486
  }, activeTab);
3899
4487
  }
3900
4488
  var ErrorMessage_css_ts_vanilla_css_source_Lml3dnBjeTAgewogIGhlaWdodDogNDAwcHg7Cn0KLml3dnBjeTEgewogIGJhY2tncm91bmQ6IHZhcigtLWxwLWNvbG9yLXJlZC05MDApOwogIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWxwLWNvbG9yLXJlZC02MDApOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1yZWQtMjAwKTsKICBwYWRkaW5nOiA4cHggMTJweDsKICBtYXJnaW46IDEycHggMjBweDsKICBib3JkZXItcmFkaXVzOiA2cHg7CiAgZm9udC1zaXplOiAxMnB4Owp9_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.4.12/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/components/ErrorMessage.css.ts.vanilla.css\",\"source\":\"Lml3dnBjeTAgewogIGhlaWdodDogNDAwcHg7Cn0KLml3dnBjeTEgewogIGJhY2tncm91bmQ6IHZhcigtLWxwLWNvbG9yLXJlZC05MDApOwogIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWxwLWNvbG9yLXJlZC02MDApOwogIGNvbG9yOiB2YXIoLS1scC1jb2xvci1yZWQtMjAwKTsKICBwYWRkaW5nOiA4cHggMTJweDsKICBtYXJnaW46IDEycHggMjBweDsKICBib3JkZXItcmFkaXVzOiA2cHg7CiAgZm9udC1zaXplOiAxMnB4Owp9\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.101.3/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
@@ -3924,10 +4512,13 @@ function getHeaderLabel(currentProjectKey, sourceEnvironmentKey) {
3924
4512
  return label;
3925
4513
  }
3926
4514
  function ExpandedToolbarContent(props) {
3927
- const { isExpanded, activeTab, slideDirection, searchTerm, searchIsExpanded, onSearch, onClose, onTabChange, setSearchIsExpanded } = props;
3928
- const { state } = useToolbarContext();
4515
+ const { isExpanded, activeTab, slideDirection, searchTerm, searchIsExpanded, onSearch, onClose, onTabChange, setSearchIsExpanded, flagOverridePlugin, mode } = props;
4516
+ const { state } = useDevServerContext();
3929
4517
  const headerLabel = getHeaderLabel(state.currentProjectKey, state.sourceEnvironmentKey);
3930
4518
  const { error } = state;
4519
+ const availableTabs = getTabsForMode(mode, !!flagOverridePlugin);
4520
+ const defaultActiveTab = getDefaultActiveTab(mode);
4521
+ const shouldShowError = error && 'dev-server' === mode && 'error' === state.connectionStatus;
3931
4522
  return /*#__PURE__*/ jsxs(motion.div, {
3932
4523
  className: toolbarContent,
3933
4524
  initial: {
@@ -3970,12 +4561,13 @@ function ExpandedToolbarContent(props) {
3970
4561
  onClose: onClose,
3971
4562
  searchIsExpanded: searchIsExpanded,
3972
4563
  setSearchIsExpanded: setSearchIsExpanded,
3973
- label: headerLabel
4564
+ label: headerLabel,
4565
+ mode: mode
3974
4566
  }),
3975
- error && /*#__PURE__*/ jsx(ErrorMessage, {
4567
+ shouldShowError && /*#__PURE__*/ jsx(ErrorMessage, {
3976
4568
  error: error
3977
4569
  }),
3978
- !error && /*#__PURE__*/ jsx(motion.div, {
4570
+ !shouldShowError && /*#__PURE__*/ jsx(motion.div, {
3979
4571
  className: scrollableContent,
3980
4572
  initial: {
3981
4573
  opacity: 0,
@@ -3994,7 +4586,9 @@ function ExpandedToolbarContent(props) {
3994
4586
  mode: "wait",
3995
4587
  children: activeTab && /*#__PURE__*/ jsx(TabContentRenderer, {
3996
4588
  activeTab: activeTab,
3997
- slideDirection: slideDirection
4589
+ slideDirection: slideDirection,
4590
+ flagOverridePlugin: flagOverridePlugin,
4591
+ mode: mode
3998
4592
  })
3999
4593
  })
4000
4594
  })
@@ -4013,15 +4607,21 @@ function ExpandedToolbarContent(props) {
4013
4607
  },
4014
4608
  transition: ANIMATION_CONFIG.tabsContainer,
4015
4609
  children: /*#__PURE__*/ jsxs(Tabs_Tabs, {
4016
- activeTab: activeTab || void 0,
4610
+ defaultActiveTab: defaultActiveTab,
4611
+ activeTab: activeTab,
4017
4612
  onTabChange: onTabChange,
4018
4613
  children: [
4019
- /*#__PURE__*/ jsx(TabButton_TabButton, {
4020
- id: "flags",
4614
+ availableTabs.includes('flag-sdk') && /*#__PURE__*/ jsx(TabButton_TabButton, {
4615
+ id: "flag-sdk",
4616
+ label: "Flags",
4617
+ icon: ToggleOffIcon
4618
+ }),
4619
+ availableTabs.includes('flag-dev-server') && /*#__PURE__*/ jsx(TabButton_TabButton, {
4620
+ id: "flag-dev-server",
4021
4621
  label: "Flags",
4022
4622
  icon: ToggleOffIcon
4023
4623
  }),
4024
- /*#__PURE__*/ jsx(TabButton_TabButton, {
4624
+ availableTabs.includes('settings') && /*#__PURE__*/ jsx(TabButton_TabButton, {
4025
4625
  id: "settings",
4026
4626
  label: "Settings",
4027
4627
  icon: GearIcon
@@ -4286,9 +4886,10 @@ function useToolbarDrag({ enabled, onDragEnd, elementRef }) {
4286
4886
  handleMouseDown
4287
4887
  };
4288
4888
  }
4289
- function LdToolbar() {
4889
+ function LdToolbar(props) {
4890
+ const { flagOverridePlugin, mode } = props;
4290
4891
  const { searchTerm } = useSearchContext();
4291
- const { state, handlePositionChange } = useToolbarContext();
4892
+ const { state, handlePositionChange } = useDevServerContext();
4292
4893
  const toolbarState = useToolbarState();
4293
4894
  const position = state.position;
4294
4895
  const { isExpanded, activeTab, slideDirection, searchIsExpanded, showFullToolbar, hasBeenExpanded, toolbarRef, handleTabChange, handleMouseEnter, handleMouseLeave, handleClose, handleSearch, setSearchIsExpanded, setIsAnimating, isHovered, isDragModifierPressed } = toolbarState;
@@ -4341,17 +4942,20 @@ function LdToolbar() {
4341
4942
  onSearch: handleSearch,
4342
4943
  onClose: handleClose,
4343
4944
  onTabChange: handleTabChange,
4344
- setSearchIsExpanded: setSearchIsExpanded
4945
+ setSearchIsExpanded: setSearchIsExpanded,
4946
+ flagOverridePlugin: flagOverridePlugin,
4947
+ mode: mode
4345
4948
  })
4346
4949
  })
4347
4950
  ]
4348
4951
  });
4349
4952
  }
4350
4953
  function LaunchDarklyToolbar(props) {
4351
- const { projectKey, position, devServerUrl = 'http://localhost:8765', pollIntervalInMs = 5000 } = props;
4954
+ const { projectKey, position, devServerUrl, pollIntervalInMs = 5000, flagOverridePlugin } = props;
4352
4955
  const isVisible = useToolbarVisibility();
4353
4956
  if (!isVisible) return null;
4354
- return /*#__PURE__*/ jsx(LaunchDarklyToolbarProvider, {
4957
+ const mode = getToolbarMode(devServerUrl);
4958
+ return /*#__PURE__*/ jsx(DevServerProvider, {
4355
4959
  config: {
4356
4960
  projectKey,
4357
4961
  devServerUrl,
@@ -4359,8 +4963,140 @@ function LaunchDarklyToolbar(props) {
4359
4963
  },
4360
4964
  initialPosition: position,
4361
4965
  children: /*#__PURE__*/ jsx(SearchProvider, {
4362
- children: /*#__PURE__*/ jsx(LdToolbar, {})
4966
+ children: /*#__PURE__*/ jsx(LdToolbar, {
4967
+ flagOverridePlugin: flagOverridePlugin,
4968
+ mode: mode
4969
+ })
4363
4970
  })
4364
4971
  });
4365
4972
  }
4366
- export { LaunchDarklyToolbar };
4973
+ const DEFAULT_STORAGE_NAMESPACE = 'ld-flag-override';
4974
+ class FlagOverridePlugin {
4975
+ debugOverride;
4976
+ config;
4977
+ ldClient = null;
4978
+ constructor(config = {}){
4979
+ this.config = {
4980
+ storageNamespace: config.storageNamespace ?? DEFAULT_STORAGE_NAMESPACE
4981
+ };
4982
+ }
4983
+ getMetadata() {
4984
+ return {
4985
+ name: 'FlagOverridePlugin'
4986
+ };
4987
+ }
4988
+ register(ldClient) {
4989
+ this.ldClient = ldClient;
4990
+ }
4991
+ registerDebug(debugOverride) {
4992
+ this.debugOverride = debugOverride;
4993
+ this.loadExistingOverrides();
4994
+ }
4995
+ loadExistingOverrides() {
4996
+ if (!this.debugOverride) return;
4997
+ const storage = this.getStorage();
4998
+ if (!storage) return;
4999
+ try {
5000
+ for(let i = 0; i < storage.length; i++){
5001
+ const key = storage.key(i);
5002
+ if (!key?.startsWith(this.config.storageNamespace + ':')) continue;
5003
+ const storedValue = storage.getItem(key);
5004
+ if (storedValue) try {
5005
+ const value = JSON.parse(storedValue);
5006
+ const flagKey = key.replace(this.config.storageNamespace + ':', '');
5007
+ this.debugOverride.setOverride(flagKey, value);
5008
+ } catch {
5009
+ console.warn('flagOverridePlugin: Invalid stored value for', key);
5010
+ storage.removeItem(key);
5011
+ }
5012
+ }
5013
+ } catch (error) {
5014
+ console.error('flagOverridePlugin: Error loading existing overrides:', error);
5015
+ }
5016
+ }
5017
+ setOverride(flagKey, value) {
5018
+ if (!this.debugOverride) return void console.warn('flagOverridePlugin: Debug interface not available');
5019
+ if (!flagKey || 'string' != typeof flagKey) return void console.error('flagOverridePlugin: Invalid flag key:', flagKey);
5020
+ if (void 0 === value) return void console.error('flagOverridePlugin: Cannot set undefined value for flag override');
5021
+ try {
5022
+ this.persistOverride(flagKey, value);
5023
+ this.debugOverride.setOverride(flagKey, value);
5024
+ } catch (error) {
5025
+ console.error('flagOverridePlugin: Failed to set override:', error);
5026
+ }
5027
+ }
5028
+ removeOverride(flagKey) {
5029
+ if (!this.debugOverride) return void console.warn('flagOverridePlugin: Debug interface not available');
5030
+ if (!flagKey || 'string' != typeof flagKey) return void console.error('flagOverridePlugin: Invalid flag key:', flagKey);
5031
+ try {
5032
+ this.removePersistedOverride(flagKey);
5033
+ this.debugOverride.removeOverride(flagKey);
5034
+ } catch (error) {
5035
+ console.error('flagOverridePlugin: Failed to remove override:', error);
5036
+ }
5037
+ }
5038
+ clearAllOverrides() {
5039
+ if (!this.debugOverride) return void console.warn('flagOverridePlugin: Debug interface not available');
5040
+ try {
5041
+ this.clearPersistedOverrides();
5042
+ this.debugOverride.clearAllOverrides();
5043
+ } catch (error) {
5044
+ console.error('flagOverridePlugin: Failed to clear overrides:', error);
5045
+ }
5046
+ }
5047
+ getAllOverrides() {
5048
+ if (!this.debugOverride) {
5049
+ console.warn('flagOverridePlugin: Debug interface not available');
5050
+ return {};
5051
+ }
5052
+ try {
5053
+ return this.debugOverride.getAllOverrides();
5054
+ } catch (error) {
5055
+ console.error('flagOverridePlugin: Failed to get overrides:', error);
5056
+ return {};
5057
+ }
5058
+ }
5059
+ getClient() {
5060
+ return this.ldClient;
5061
+ }
5062
+ getStorage() {
5063
+ if ('undefined' == typeof window) return null;
5064
+ return window.localStorage;
5065
+ }
5066
+ persistOverride(flagKey, value) {
5067
+ const storage = this.getStorage();
5068
+ if (!storage) return;
5069
+ try {
5070
+ const storageKey = `${this.config.storageNamespace}:${flagKey}`;
5071
+ storage.setItem(storageKey, JSON.stringify(value));
5072
+ } catch (error) {
5073
+ console.error('flagOverridePlugin: Failed to persist override:', error);
5074
+ }
5075
+ }
5076
+ removePersistedOverride(flagKey) {
5077
+ const storage = this.getStorage();
5078
+ if (!storage) return;
5079
+ try {
5080
+ const storageKey = `${this.config.storageNamespace}:${flagKey}`;
5081
+ storage.removeItem(storageKey);
5082
+ } catch (error) {
5083
+ console.error('flagOverridePlugin: Failed to remove persisted override:', error);
5084
+ }
5085
+ }
5086
+ clearPersistedOverrides() {
5087
+ const storage = this.getStorage();
5088
+ if (!storage) return;
5089
+ try {
5090
+ const keysToRemove = [];
5091
+ const prefix = this.config.storageNamespace + ':';
5092
+ for(let i = 0; i < storage.length; i++){
5093
+ const key = storage.key(i);
5094
+ if (key?.startsWith(prefix)) keysToRemove.push(key);
5095
+ }
5096
+ keysToRemove.forEach((key)=>storage.removeItem(key));
5097
+ } catch (error) {
5098
+ console.error('flagOverridePlugin: Failed to clear persisted overrides:', error);
5099
+ }
5100
+ }
5101
+ }
5102
+ export { FlagOverridePlugin, LaunchDarklyToolbar };