@launchdarkly/toolbar 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/js/index.js CHANGED
@@ -3261,6 +3261,22 @@ function GenericHelpText(props) {
3261
3261
  ]
3262
3262
  });
3263
3263
  }
3264
+ function deepEqual(a, b) {
3265
+ if (a === b) return true;
3266
+ if (null == a || null == b) return false;
3267
+ if (typeof a !== typeof b) return false;
3268
+ if ('object' == typeof a) {
3269
+ const keysA = Object.keys(a);
3270
+ const keysB = Object.keys(b);
3271
+ if (keysA.length !== keysB.length) return false;
3272
+ for (const key of keysA){
3273
+ if (!keysB.includes(key)) return false;
3274
+ if (!deepEqual(a[key], b[key])) return false;
3275
+ }
3276
+ return true;
3277
+ }
3278
+ return a === b;
3279
+ }
3264
3280
  var _3CwGAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_99_9_esbuild_0_25_5_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.99.9_esbuild@0.25.5_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\"fileName\":\"src/ui/Toolbar/components/FlagControls.css.ts.vanilla.css\",\"source\":\"​#H4sIAAAAAAAAA72UzXLCIBCA73mKvXSmPeAk0fqDxz5IhwRMdorAAJrYju/eCUYTrbXqtD2ywMfut8DgdaI3az+O4SMCWGjlicN3QSFJTT2PAHIttaWwZvaREGlIGJPCsg0ZxfHTPNpGg5aRBAZHZyTbUFhIEQhMYqEIerF0FHKhvLBNuGCGwrQ5pE+QLBMycDKWvxVWrxQnbQ7eMuUMs0L5/qb0pmObacLRityjVhSsrg7ZjHYlL1GRCrkvGwtxG2P1ITaOj7Me3pRAV9d5q7NgFSDTlgtLITE1OC2Rn109OVpNLOO4chTGu6xLgUXpKQzbZma6btqLqqD7HZmu91ooJAcV7QbDOEdVELvjpPcJGgVBF7jxBV97aBw/9JnPgdlyQsG7y/S/gvsPZvTjg0lbVs9fqFyvhV1IXVEokXOhmpgXtSfdhJASjUMXjJToBXGG5YKC0pVl5qSF1/f9ulvbaR8H7Uc9OXPc5afbS7UDT77t532Oezb+QneX+PTkt/pS7K2vZRaAv3wnOjw76uDJR7EfL1BKCvnKNkW8NHbn0fYTl/8/3CwGAAA=\"}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.22_webpack@5.99.9_esbuild@0.25.5_/node_modules/@vanilla-extract/webpack-plugin/extracted.js");
3265
3281
  var _3CwGAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_99_9_esbuild_0_25_5_node_modules_vanilla_extract_webpack_plugin_extracted_options = {};
3266
3282
  _3CwGAAA_node_modules_pnpm_vanilla_extract_webpack_plugin_2_3_22_webpack_5_99_9_esbuild_0_25_5_node_modules_vanilla_extract_webpack_plugin_extracted_options.styleTagTransform = styleTagTransform_default();
@@ -3295,7 +3311,7 @@ function BooleanFlagControl(props) {
3295
3311
  }
3296
3312
  function MultivariateFlagControl(props) {
3297
3313
  const { flag, onOverride, disabled = false } = props;
3298
- const currentVariation = flag.availableVariations.find((v)=>v.value === flag.currentValue);
3314
+ const currentVariation = flag.availableVariations.find((v)=>deepEqual(v.value, flag.currentValue));
3299
3315
  return /*#__PURE__*/ jsxs(Select, {
3300
3316
  selectedKey: currentVariation?._id,
3301
3317
  onSelectionChange: (key)=>{
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Performs deep equality comparison for complex values including objects and arrays.
3
+ *
4
+ * @param a - First value to compare
5
+ * @param b - Second value to compare
6
+ * @returns true if values are deeply equal, false otherwise
7
+ */
8
+ export declare function deepEqual(a: any, b: any): boolean;
@@ -0,0 +1 @@
1
+ export { deepEqual } from './deepEqual';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/toolbar",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "A React component that provides a developer-friendly toolbar for interacting with LaunchDarkly during development",
5
5
  "keywords": [
6
6
  "launchdarkly",