@opentabs-dev/browser-extension 0.0.56 → 0.0.58

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.
@@ -72708,16 +72708,18 @@ var TooltipProvider2 = Provider;
72708
72708
  var Tooltip2 = Root33;
72709
72709
  var TooltipTrigger2 = Trigger4;
72710
72710
  var TooltipContent2 = (t0) => {
72711
- const $2 = (0, import_compiler_runtime9.c)(14);
72711
+ const $2 = (0, import_compiler_runtime9.c)(16);
72712
72712
  let className;
72713
72713
  let props;
72714
72714
  let ref;
72715
72715
  let t1;
72716
+ let t2;
72716
72717
  let variant;
72717
72718
  if ($2[0] !== t0) {
72718
72719
  ({
72719
72720
  className,
72720
72721
  sideOffset: t1,
72722
+ collisionPadding: t2,
72721
72723
  variant,
72722
72724
  ref,
72723
72725
  ...props
@@ -72727,46 +72729,51 @@ var TooltipContent2 = (t0) => {
72727
72729
  $2[2] = props;
72728
72730
  $2[3] = ref;
72729
72731
  $2[4] = t1;
72730
- $2[5] = variant;
72732
+ $2[5] = t2;
72733
+ $2[6] = variant;
72731
72734
  } else {
72732
72735
  className = $2[1];
72733
72736
  props = $2[2];
72734
72737
  ref = $2[3];
72735
72738
  t1 = $2[4];
72736
- variant = $2[5];
72739
+ t2 = $2[5];
72740
+ variant = $2[6];
72737
72741
  }
72738
72742
  const sideOffset = t1 === void 0 ? 4 : t1;
72739
- let t2;
72740
- if ($2[6] !== className || $2[7] !== variant) {
72741
- t2 = cn(tooltipContentVariants({
72743
+ const collisionPadding = t2 === void 0 ? 8 : t2;
72744
+ let t3;
72745
+ if ($2[7] !== className || $2[8] !== variant) {
72746
+ t3 = cn("max-w-[var(--radix-tooltip-content-available-width)]", tooltipContentVariants({
72742
72747
  variant,
72743
72748
  className
72744
72749
  }));
72745
- $2[6] = className;
72746
- $2[7] = variant;
72747
- $2[8] = t2;
72750
+ $2[7] = className;
72751
+ $2[8] = variant;
72752
+ $2[9] = t3;
72748
72753
  } else {
72749
- t2 = $2[8];
72754
+ t3 = $2[9];
72750
72755
  }
72751
- let t3;
72752
- if ($2[9] !== props || $2[10] !== ref || $2[11] !== sideOffset || $2[12] !== t2) {
72753
- t3 = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Portal3, {
72756
+ let t4;
72757
+ if ($2[10] !== collisionPadding || $2[11] !== props || $2[12] !== ref || $2[13] !== sideOffset || $2[14] !== t3) {
72758
+ t4 = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Portal3, {
72754
72759
  children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Content24, {
72755
72760
  ref,
72756
72761
  sideOffset,
72757
- className: t2,
72762
+ collisionPadding,
72763
+ className: t3,
72758
72764
  ...props
72759
72765
  })
72760
72766
  });
72761
- $2[9] = props;
72762
- $2[10] = ref;
72763
- $2[11] = sideOffset;
72764
- $2[12] = t2;
72765
- $2[13] = t3;
72767
+ $2[10] = collisionPadding;
72768
+ $2[11] = props;
72769
+ $2[12] = ref;
72770
+ $2[13] = sideOffset;
72771
+ $2[14] = t3;
72772
+ $2[15] = t4;
72766
72773
  } else {
72767
- t3 = $2[13];
72774
+ t4 = $2[15];
72768
72775
  }
72769
- return t3;
72776
+ return t4;
72770
72777
  };
72771
72778
  var TooltipObject = Object.assign(Tooltip2, {
72772
72779
  Trigger: TooltipTrigger2,
@@ -74886,7 +74893,7 @@ var ToolIcon = (t0) => {
74886
74893
  // src/side-panel/components/ToolRow.tsx
74887
74894
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
74888
74895
  var ToolRow = (t0) => {
74889
- const $2 = (0, import_compiler_runtime11.c)(24);
74896
+ const $2 = (0, import_compiler_runtime11.c)(29);
74890
74897
  const {
74891
74898
  name,
74892
74899
  displayName,
@@ -74899,7 +74906,7 @@ var ToolRow = (t0) => {
74899
74906
  const t1 = enabled ? "hover:bg-primary/10" : "hover:bg-muted/50";
74900
74907
  let t2;
74901
74908
  if ($2[0] !== t1) {
74902
- t2 = cn("flex items-center gap-2 border-border border-b px-3 py-2 transition-colors last:border-b-0", t1);
74909
+ t2 = cn("flex items-center gap-2 border-border border-b px-3 py-1.5 transition-colors last:border-b-0 even:bg-muted/10", t1);
74903
74910
  $2[0] = t1;
74904
74911
  $2[1] = t2;
74905
74912
  } else {
@@ -74921,15 +74928,9 @@ var ToolRow = (t0) => {
74921
74928
  }
74922
74929
  let t4;
74923
74930
  if ($2[6] !== displayName) {
74924
- t4 = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipObject.Trigger, {
74925
- asChild: true,
74926
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", {
74927
- className: "min-w-0 flex-1",
74928
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", {
74929
- className: "truncate text-foreground text-sm",
74930
- children: displayName
74931
- })
74932
- })
74931
+ t4 = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", {
74932
+ className: "truncate text-foreground text-sm",
74933
+ children: displayName
74933
74934
  });
74934
74935
  $2[6] = displayName;
74935
74936
  $2[7] = t4;
@@ -74938,7 +74939,8 @@ var ToolRow = (t0) => {
74938
74939
  }
74939
74940
  let t5;
74940
74941
  if ($2[8] !== description) {
74941
- t5 = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipObject.Content, {
74942
+ t5 = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", {
74943
+ className: "truncate text-muted-foreground text-xs",
74942
74944
  children: description
74943
74945
  });
74944
74946
  $2[8] = description;
@@ -74948,8 +74950,12 @@ var ToolRow = (t0) => {
74948
74950
  }
74949
74951
  let t6;
74950
74952
  if ($2[10] !== t4 || $2[11] !== t5) {
74951
- t6 = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TooltipObject, {
74952
- children: [t4, t5]
74953
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipObject.Trigger, {
74954
+ asChild: true,
74955
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", {
74956
+ className: "min-w-0 flex-1",
74957
+ children: [t4, t5]
74958
+ })
74953
74959
  });
74954
74960
  $2[10] = t4;
74955
74961
  $2[11] = t5;
@@ -74958,47 +74964,68 @@ var ToolRow = (t0) => {
74958
74964
  t6 = $2[12];
74959
74965
  }
74960
74966
  let t7;
74961
- if ($2[13] !== onToggle) {
74962
- t7 = () => onToggle();
74963
- $2[13] = onToggle;
74967
+ if ($2[13] !== description) {
74968
+ t7 = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipObject.Content, {
74969
+ children: description
74970
+ });
74971
+ $2[13] = description;
74964
74972
  $2[14] = t7;
74965
74973
  } else {
74966
74974
  t7 = $2[14];
74967
74975
  }
74968
- const t8 = `Toggle ${name} tool`;
74976
+ let t8;
74977
+ if ($2[15] !== t6 || $2[16] !== t7) {
74978
+ t8 = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TooltipObject, {
74979
+ children: [t6, t7]
74980
+ });
74981
+ $2[15] = t6;
74982
+ $2[16] = t7;
74983
+ $2[17] = t8;
74984
+ } else {
74985
+ t8 = $2[17];
74986
+ }
74969
74987
  let t9;
74970
- if ($2[15] !== enabled || $2[16] !== t7 || $2[17] !== t8) {
74971
- t9 = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", {
74988
+ if ($2[18] !== onToggle) {
74989
+ t9 = () => onToggle();
74990
+ $2[18] = onToggle;
74991
+ $2[19] = t9;
74992
+ } else {
74993
+ t9 = $2[19];
74994
+ }
74995
+ const t10 = `Toggle ${name} tool`;
74996
+ let t11;
74997
+ if ($2[20] !== enabled || $2[21] !== t10 || $2[22] !== t9) {
74998
+ t11 = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", {
74972
74999
  className: "flex shrink-0 items-center gap-2",
74973
75000
  children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Switch2, {
74974
75001
  checked: enabled,
74975
- onCheckedChange: t7,
75002
+ onCheckedChange: t9,
74976
75003
  onClick: _temp3,
74977
- "aria-label": t8
75004
+ "aria-label": t10
74978
75005
  })
74979
75006
  });
74980
- $2[15] = enabled;
74981
- $2[16] = t7;
74982
- $2[17] = t8;
74983
- $2[18] = t9;
75007
+ $2[20] = enabled;
75008
+ $2[21] = t10;
75009
+ $2[22] = t9;
75010
+ $2[23] = t11;
74984
75011
  } else {
74985
- t9 = $2[18];
75012
+ t11 = $2[23];
74986
75013
  }
74987
- let t10;
74988
- if ($2[19] !== t2 || $2[20] !== t3 || $2[21] !== t6 || $2[22] !== t9) {
74989
- t10 = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", {
75014
+ let t12;
75015
+ if ($2[24] !== t11 || $2[25] !== t2 || $2[26] !== t3 || $2[27] !== t8) {
75016
+ t12 = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", {
74990
75017
  className: t2,
74991
- children: [t3, t6, t9]
75018
+ children: [t3, t8, t11]
74992
75019
  });
74993
- $2[19] = t2;
74994
- $2[20] = t3;
74995
- $2[21] = t6;
74996
- $2[22] = t9;
74997
- $2[23] = t10;
75020
+ $2[24] = t11;
75021
+ $2[25] = t2;
75022
+ $2[26] = t3;
75023
+ $2[27] = t8;
75024
+ $2[28] = t12;
74998
75025
  } else {
74999
- t10 = $2[23];
75026
+ t12 = $2[28];
75000
75027
  }
75001
- return t10;
75028
+ return t12;
75002
75029
  };
75003
75030
  function _temp3(e2) {
75004
75031
  return e2.stopPropagation();
@@ -78282,11 +78309,28 @@ var PluginCard = (t0) => {
78282
78309
  showToggleError(`Failed to toggle ${toolName}`);
78283
78310
  });
78284
78311
  };
78312
+ const handleToggleGroup = (groupTools, checked_0) => {
78313
+ const myVersion_1 = toggleCounter.current = toggleCounter.current + 1;
78314
+ const toolNames = new Set(groupTools.map(_temp27));
78315
+ updatePluginTools((prev_2) => {
78316
+ preToggleRef.current = prev_2;
78317
+ return prev_2.map((t_3) => toolNames.has(t_3.name) ? {
78318
+ ...t_3,
78319
+ enabled: checked_0
78320
+ } : t_3);
78321
+ });
78322
+ Promise.all(groupTools.map((t_4) => setToolEnabled(plugin.name, t_4.name, checked_0))).catch(() => {
78323
+ if (toggleCounter.current === myVersion_1) {
78324
+ updatePluginTools(() => preToggleRef.current);
78325
+ }
78326
+ showToggleError("Failed to toggle group");
78327
+ });
78328
+ };
78285
78329
  const filterLower = toolFilter?.toLowerCase() ?? "";
78286
- const visibleTools = filterLower ? pluginTools.filter((t_2) => matchesTool(t_2, filterLower)) : pluginTools;
78330
+ const visibleTools = filterLower ? pluginTools.filter((t_5) => matchesTool(t_5, filterLower)) : pluginTools;
78287
78331
  let t4;
78288
78332
  if ($2[5] !== activeTools || $2[6] !== plugin.name) {
78289
- t4 = (t_3) => activeTools.has(`${plugin.name}:${t_3.name}`);
78333
+ t4 = (t_6) => activeTools.has(`${plugin.name}:${t_6.name}`);
78290
78334
  $2[5] = activeTools;
78291
78335
  $2[6] = plugin.name;
78292
78336
  $2[7] = t4;
@@ -78294,45 +78338,72 @@ var PluginCard = (t0) => {
78294
78338
  t4 = $2[7];
78295
78339
  }
78296
78340
  const hasActiveTool = pluginTools.some(t4);
78297
- const t5 = plugin.name;
78298
- let t6;
78341
+ const hasAnyGroup = visibleTools.some(_temp35);
78342
+ const toolGroups = [];
78343
+ if (hasAnyGroup) {
78344
+ const groupMap = /* @__PURE__ */ new Map();
78345
+ for (const tool of visibleTools) {
78346
+ const groupName = tool.group ?? "Other";
78347
+ let bucket = groupMap.get(groupName);
78348
+ if (!bucket) {
78349
+ bucket = [];
78350
+ groupMap.set(groupName, bucket);
78351
+ }
78352
+ bucket.push(tool);
78353
+ }
78354
+ const otherBucket = groupMap.get("Other");
78355
+ groupMap.delete("Other");
78356
+ for (const [name, tools] of groupMap) {
78357
+ toolGroups.push({
78358
+ name,
78359
+ tools
78360
+ });
78361
+ }
78362
+ if (otherBucket) {
78363
+ toolGroups.push({
78364
+ name: "Other",
78365
+ tools: otherBucket
78366
+ });
78367
+ }
78368
+ }
78369
+ let t5;
78299
78370
  if ($2[8] !== plugin.update) {
78300
- t6 = plugin.update && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, {
78371
+ t5 = plugin.update && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, {
78301
78372
  children: [" \xB7 Update: ", plugin.update.latestVersion]
78302
78373
  });
78303
78374
  $2[8] = plugin.update;
78304
- $2[9] = t6;
78375
+ $2[9] = t5;
78305
78376
  } else {
78306
- t6 = $2[9];
78377
+ t5 = $2[9];
78307
78378
  }
78308
- let t7;
78309
- if ($2[10] !== plugin.trustTier || $2[11] !== plugin.version || $2[12] !== t6) {
78310
- t7 = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(TooltipObject.Content, {
78311
- children: ["v", plugin.version, " \xB7 ", plugin.trustTier, t6]
78379
+ let t6;
78380
+ if ($2[10] !== plugin.trustTier || $2[11] !== plugin.version || $2[12] !== t5) {
78381
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(TooltipObject.Content, {
78382
+ children: ["v", plugin.version, " \xB7 ", plugin.trustTier, t5]
78312
78383
  });
78313
78384
  $2[10] = plugin.trustTier;
78314
78385
  $2[11] = plugin.version;
78315
- $2[12] = t6;
78316
- $2[13] = t7;
78386
+ $2[12] = t5;
78387
+ $2[13] = t6;
78317
78388
  } else {
78318
- t7 = $2[13];
78389
+ t6 = $2[13];
78319
78390
  }
78320
- let t8;
78391
+ let t7;
78321
78392
  if ($2[14] !== plugin.source) {
78322
- t8 = plugin.source === "local" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Badge2, {
78393
+ t7 = plugin.source === "local" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Badge2, {
78323
78394
  variant: "default",
78324
78395
  size: "sm",
78325
78396
  className: "align-middle",
78326
78397
  children: "DEV"
78327
78398
  });
78328
78399
  $2[14] = plugin.source;
78329
- $2[15] = t8;
78400
+ $2[15] = t7;
78330
78401
  } else {
78331
- t8 = $2[15];
78402
+ t7 = $2[15];
78332
78403
  }
78333
- let t9;
78404
+ let t8;
78334
78405
  if ($2[16] !== plugin.sdkVersion) {
78335
- t9 = !plugin.sdkVersion && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(TooltipObject, {
78406
+ t8 = !plugin.sdkVersion && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(TooltipObject, {
78336
78407
  children: [/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TooltipObject.Trigger, {
78337
78408
  asChild: true,
78338
78409
  children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Badge2, {
@@ -78346,109 +78417,129 @@ var PluginCard = (t0) => {
78346
78417
  })]
78347
78418
  });
78348
78419
  $2[16] = plugin.sdkVersion;
78349
- $2[17] = t9;
78420
+ $2[17] = t8;
78350
78421
  } else {
78351
- t9 = $2[17];
78422
+ t8 = $2[17];
78352
78423
  }
78353
- let t10;
78354
- if ($2[18] !== plugin.displayName || $2[19] !== t8 || $2[20] !== t9) {
78355
- t10 = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", {
78424
+ let t9;
78425
+ if ($2[18] !== plugin.displayName || $2[19] !== t7 || $2[20] !== t8) {
78426
+ t9 = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", {
78356
78427
  className: "flex min-w-0 flex-1 items-center gap-1.5 truncate font-head text-foreground text-sm",
78357
- children: [plugin.displayName, t8, t9]
78428
+ children: [plugin.displayName, t7, t8]
78358
78429
  });
78359
78430
  $2[18] = plugin.displayName;
78360
- $2[19] = t8;
78361
- $2[20] = t9;
78362
- $2[21] = t10;
78431
+ $2[19] = t7;
78432
+ $2[20] = t8;
78433
+ $2[21] = t9;
78363
78434
  } else {
78364
- t10 = $2[21];
78435
+ t9 = $2[21];
78365
78436
  }
78366
- let t11;
78437
+ let t10;
78367
78438
  if ($2[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
78368
- t11 = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronDown, {
78439
+ t10 = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronDown, {
78369
78440
  className: "h-4 w-4 shrink-0 transition-transform duration-200"
78370
78441
  });
78371
- $2[22] = t11;
78442
+ $2[22] = t10;
78372
78443
  } else {
78373
- t11 = $2[22];
78444
+ t10 = $2[22];
78374
78445
  }
78375
- const t12 = onUpdate ?? _temp27;
78376
- const t13 = onRemove ?? _temp35;
78377
- const t14 = updatingPlugin ?? false;
78378
- const t15 = removingPlugin ?? false;
78379
- let t16;
78380
- if ($2[23] !== plugin || $2[24] !== t12 || $2[25] !== t13 || $2[26] !== t14 || $2[27] !== t15) {
78381
- t16 = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PluginMenu, {
78446
+ const t11 = onUpdate ?? _temp42;
78447
+ const t12 = onRemove ?? _temp52;
78448
+ const t13 = updatingPlugin ?? false;
78449
+ const t14 = removingPlugin ?? false;
78450
+ let t15;
78451
+ if ($2[23] !== plugin || $2[24] !== t11 || $2[25] !== t12 || $2[26] !== t13 || $2[27] !== t14) {
78452
+ t15 = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PluginMenu, {
78382
78453
  plugin,
78383
- onUpdate: t12,
78384
- onRemove: t13,
78385
- updating: t14,
78386
- removing: t15,
78454
+ onUpdate: t11,
78455
+ onRemove: t12,
78456
+ updating: t13,
78457
+ removing: t14,
78387
78458
  className: "flex shrink-0 items-center px-1"
78388
78459
  });
78389
78460
  $2[23] = plugin;
78390
- $2[24] = t12;
78391
- $2[25] = t13;
78392
- $2[26] = t14;
78393
- $2[27] = t15;
78394
- $2[28] = t16;
78461
+ $2[24] = t11;
78462
+ $2[25] = t12;
78463
+ $2[26] = t13;
78464
+ $2[27] = t14;
78465
+ $2[28] = t15;
78395
78466
  } else {
78396
- t16 = $2[28];
78467
+ t15 = $2[28];
78397
78468
  }
78398
- let t17;
78469
+ let t16;
78399
78470
  if ($2[29] !== toggleError) {
78400
- t17 = toggleError && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(AlertComponent, {
78471
+ t16 = toggleError && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(AlertComponent, {
78401
78472
  status: "error",
78402
78473
  className: "mx-3 mb-1 px-2 py-1 text-xs",
78403
78474
  children: toggleError
78404
78475
  });
78405
78476
  $2[29] = toggleError;
78406
- $2[30] = t17;
78477
+ $2[30] = t16;
78407
78478
  } else {
78408
- t17 = $2[30];
78479
+ t16 = $2[30];
78409
78480
  }
78410
- let t18;
78481
+ let t17;
78411
78482
  if ($2[31] !== actionError) {
78412
- t18 = actionError && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(AlertComponent, {
78483
+ t17 = actionError && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(AlertComponent, {
78413
78484
  status: "error",
78414
78485
  className: "mx-3 mb-1 px-2 py-1 text-xs",
78415
78486
  children: actionError
78416
78487
  });
78417
78488
  $2[31] = actionError;
78418
- $2[32] = t18;
78489
+ $2[32] = t17;
78419
78490
  } else {
78420
- t18 = $2[32];
78491
+ t17 = $2[32];
78421
78492
  }
78422
- const t19 = AccordionComponent;
78423
- const t20 = "border-border border-t";
78424
- const t21 = toolFilter && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", {
78493
+ const t18 = AccordionComponent;
78494
+ const t19 = "border-border border-t";
78495
+ const t20 = toolFilter && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", {
78425
78496
  className: "mb-1 px-3 pt-2 text-muted-foreground text-xs",
78426
78497
  children: [visibleTools.length, " of ", pluginTools.length, " tools"]
78427
78498
  });
78428
- const t22 = visibleTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ToolRow, {
78429
- name: tool.name,
78430
- displayName: tool.displayName,
78431
- description: tool.description,
78432
- icon: tool.icon,
78433
- enabled: tool.enabled,
78434
- active: activeTools.has(`${plugin.name}:${tool.name}`),
78435
- onToggle: () => handleToggleTool(tool.name, tool.enabled)
78436
- }, tool.name));
78437
- let t23;
78438
- if ($2[33] !== t19.Content || $2[34] !== t21 || $2[35] !== t22) {
78439
- t23 = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(t19.Content, {
78440
- className: t20,
78441
- children: [t21, t22]
78499
+ const t21 = hasAnyGroup ? toolGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", {
78500
+ children: [/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", {
78501
+ className: "flex items-center gap-2 border-border border-b bg-muted/20 px-3 py-1",
78502
+ children: [/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", {
78503
+ className: "flex-1 font-head text-muted-foreground text-xs uppercase tracking-wider",
78504
+ children: group.name
78505
+ }), /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Switch2, {
78506
+ checked: group.tools.every(_temp82),
78507
+ onCheckedChange: (checked_1) => handleToggleGroup(group.tools, checked_1),
78508
+ "aria-label": `Toggle all ${group.name} tools`
78509
+ })]
78510
+ }), group.tools.map((tool_0) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ToolRow, {
78511
+ name: tool_0.name,
78512
+ displayName: tool_0.displayName,
78513
+ description: tool_0.description,
78514
+ icon: tool_0.icon,
78515
+ enabled: tool_0.enabled,
78516
+ active: activeTools.has(`${plugin.name}:${tool_0.name}`),
78517
+ onToggle: () => handleToggleTool(tool_0.name, tool_0.enabled)
78518
+ }, tool_0.name))]
78519
+ }, group.name)) : visibleTools.map((tool_1) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ToolRow, {
78520
+ name: tool_1.name,
78521
+ displayName: tool_1.displayName,
78522
+ description: tool_1.description,
78523
+ icon: tool_1.icon,
78524
+ enabled: tool_1.enabled,
78525
+ active: activeTools.has(`${plugin.name}:${tool_1.name}`),
78526
+ onToggle: () => handleToggleTool(tool_1.name, tool_1.enabled)
78527
+ }, tool_1.name));
78528
+ let t22;
78529
+ if ($2[33] !== t18.Content || $2[34] !== t20 || $2[35] !== t21) {
78530
+ t22 = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(t18.Content, {
78531
+ className: t19,
78532
+ children: [t20, t21]
78442
78533
  });
78443
- $2[33] = t19.Content;
78444
- $2[34] = t21;
78445
- $2[35] = t22;
78446
- $2[36] = t23;
78534
+ $2[33] = t18.Content;
78535
+ $2[34] = t20;
78536
+ $2[35] = t21;
78537
+ $2[36] = t22;
78447
78538
  } else {
78448
- t23 = $2[36];
78539
+ t22 = $2[36];
78449
78540
  }
78450
78541
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(AccordionComponent.Item, {
78451
- value: t5,
78542
+ value: plugin.name,
78452
78543
  className: removingPlugin ? "pointer-events-none opacity-60 transition-opacity" : void 0,
78453
78544
  children: [/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Header, {
78454
78545
  className: "flex",
@@ -78469,12 +78560,12 @@ var PluginCard = (t0) => {
78469
78560
  active: hasActiveTool
78470
78561
  })
78471
78562
  })
78472
- }), t7]
78473
- }), t10, t11]
78474
- }), t16, /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", {
78563
+ }), t6]
78564
+ }), t9, t10]
78565
+ }), t15, /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", {
78475
78566
  className: "flex shrink-0 items-center px-3",
78476
- onClick: _temp42,
78477
- onKeyDown: _temp52,
78567
+ onClick: _temp62,
78568
+ onKeyDown: _temp72,
78478
78569
  role: "presentation",
78479
78570
  children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Switch2, {
78480
78571
  checked: allEnabled,
@@ -78482,24 +78573,33 @@ var PluginCard = (t0) => {
78482
78573
  "aria-label": `Toggle all tools for ${plugin.name}`
78483
78574
  })
78484
78575
  })]
78485
- }), t17, t18, t23]
78576
+ }), t16, t17, t22]
78486
78577
  });
78487
78578
  };
78488
78579
  function _temp10(t2) {
78489
78580
  return t2.enabled;
78490
78581
  }
78491
- function _temp27() {
78582
+ function _temp27(t_2) {
78583
+ return t_2.name;
78492
78584
  }
78493
- function _temp35() {
78585
+ function _temp35(t_7) {
78586
+ return t_7.group;
78494
78587
  }
78495
- function _temp42(e2) {
78588
+ function _temp42() {
78589
+ }
78590
+ function _temp52() {
78591
+ }
78592
+ function _temp62(e2) {
78496
78593
  return e2.stopPropagation();
78497
78594
  }
78498
- function _temp52(e_0) {
78595
+ function _temp72(e_0) {
78499
78596
  if (e_0.key === "Enter" || e_0.key === " ") {
78500
78597
  e_0.stopPropagation();
78501
78598
  }
78502
78599
  }
78600
+ function _temp82(t_8) {
78601
+ return t_8.enabled;
78602
+ }
78503
78603
 
78504
78604
  // src/side-panel/components/PluginList.tsx
78505
78605
  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
@@ -79632,11 +79732,11 @@ var App = () => {
79632
79732
  setConnected(isConnected);
79633
79733
  setDisconnectReason(isConnected ? void 0 : message_0.data.disconnectReason);
79634
79734
  if (isConnected) {
79635
- getFullState().then(applyFullState).catch(_temp62);
79735
+ getFullState().then(applyFullState).catch(_temp63);
79636
79736
  } else {
79637
79737
  setPlugins([]);
79638
79738
  setFailedPlugins([]);
79639
- setBrowserTools(BROWSER_TOOLS_CATALOG.map(_temp72));
79739
+ setBrowserTools(BROWSER_TOOLS_CATALOG.map(_temp73));
79640
79740
  setServerVersion(void 0);
79641
79741
  setActiveTools(/* @__PURE__ */ new Set());
79642
79742
  setPendingConfirmations([]);
@@ -79661,7 +79761,7 @@ var App = () => {
79661
79761
  if (message_0.type === "sp:serverMessage") {
79662
79762
  const data = message_0.data;
79663
79763
  if (data.method === "plugins.changed") {
79664
- getFullState().then(applyFullState).catch(_temp82);
79764
+ getFullState().then(applyFullState).catch(_temp83);
79665
79765
  sendResponse({
79666
79766
  ok: true
79667
79767
  });
@@ -79915,15 +80015,15 @@ function _temp53(p_0) {
79915
80015
  tabState: p_0.tabState
79916
80016
  };
79917
80017
  }
79918
- function _temp62() {
80018
+ function _temp63() {
79919
80019
  }
79920
- function _temp72(t_2) {
80020
+ function _temp73(t_2) {
79921
80021
  return {
79922
80022
  ...t_2,
79923
80023
  enabled: true
79924
80024
  };
79925
80025
  }
79926
- function _temp82() {
80026
+ function _temp83() {
79927
80027
  }
79928
80028
 
79929
80029
  // src/side-panel/components/ErrorBoundary.tsx