@opentabs-dev/browser-extension 0.0.38 → 0.0.40

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 (36) hide show
  1. package/dist/side-panel/App.d.ts.map +1 -1
  2. package/dist/side-panel/App.js +84 -8
  3. package/dist/side-panel/App.js.map +1 -1
  4. package/dist/side-panel/bridge.d.ts +43 -2
  5. package/dist/side-panel/bridge.d.ts.map +1 -1
  6. package/dist/side-panel/bridge.js +22 -1
  7. package/dist/side-panel/bridge.js.map +1 -1
  8. package/dist/side-panel/components/EmptyStates.js +1 -1
  9. package/dist/side-panel/components/EmptyStates.js.map +1 -1
  10. package/dist/side-panel/components/NpmPluginCard.d.ts +14 -0
  11. package/dist/side-panel/components/NpmPluginCard.d.ts.map +1 -0
  12. package/dist/side-panel/components/NpmPluginCard.js +19 -0
  13. package/dist/side-panel/components/NpmPluginCard.js.map +1 -0
  14. package/dist/side-panel/components/PluginCard.d.ts +5 -1
  15. package/dist/side-panel/components/PluginCard.d.ts.map +1 -1
  16. package/dist/side-panel/components/PluginCard.js +3 -2
  17. package/dist/side-panel/components/PluginCard.js.map +1 -1
  18. package/dist/side-panel/components/PluginList.d.ts +4 -1
  19. package/dist/side-panel/components/PluginList.d.ts.map +1 -1
  20. package/dist/side-panel/components/PluginList.js +2 -2
  21. package/dist/side-panel/components/PluginList.js.map +1 -1
  22. package/dist/side-panel/components/PluginMenu.d.ts +16 -0
  23. package/dist/side-panel/components/PluginMenu.d.ts.map +1 -0
  24. package/dist/side-panel/components/PluginMenu.js +31 -0
  25. package/dist/side-panel/components/PluginMenu.js.map +1 -0
  26. package/dist/side-panel/components/SearchResults.d.ts +24 -0
  27. package/dist/side-panel/components/SearchResults.d.ts.map +1 -0
  28. package/dist/side-panel/components/SearchResults.js +21 -0
  29. package/dist/side-panel/components/SearchResults.js.map +1 -0
  30. package/dist/side-panel/components/retro/Menu.d.ts +1 -0
  31. package/dist/side-panel/components/retro/Menu.d.ts.map +1 -1
  32. package/dist/side-panel/components/retro/Menu.js +4 -1
  33. package/dist/side-panel/components/retro/Menu.js.map +1 -1
  34. package/dist/side-panel/side-panel.js +528 -250
  35. package/dist/side-panel/styles.css +1 -1
  36. package/package.json +3 -1
@@ -51481,6 +51481,10 @@ var require_client = __commonJS({
51481
51481
 
51482
51482
  // src/side-panel/bridge.ts
51483
51483
  var matchesTool = (tool, filterLower) => tool.displayName.toLowerCase().includes(filterLower) || tool.name.toLowerCase().includes(filterLower) || tool.description.toLowerCase().includes(filterLower);
51484
+ var matchesPlugin = (plugin, filterLower) => plugin.displayName.toLowerCase().includes(filterLower) || plugin.name.toLowerCase().includes(filterLower) || plugin.tools.some(
51485
+ (tool) => tool.displayName.toLowerCase().includes(filterLower) || tool.name.toLowerCase().includes(filterLower)
51486
+ );
51487
+ var extractShortName = (name) => (name.split("/").pop() ?? name).replace(/^opentabs-plugin-/, "");
51484
51488
  var REQUEST_TIMEOUT_MS = 3e4;
51485
51489
  var pendingRequests = /* @__PURE__ */ new Map();
51486
51490
  var rejectAllPending = () => {
@@ -51542,6 +51546,10 @@ var getConnectionState = () => new Promise((resolve) => {
51542
51546
  var fetchConfigState = () => sendRequest("config.getState");
51543
51547
  var setToolEnabled = (plugin, tool, enabled) => sendRequest("config.setToolEnabled", { plugin, tool, enabled });
51544
51548
  var setAllToolsEnabled = (plugin, enabled) => sendRequest("config.setAllToolsEnabled", { plugin, enabled });
51549
+ var searchPlugins = (query) => sendRequest("plugin.search", { query });
51550
+ var installPlugin = (name) => sendRequest("plugin.install", { name });
51551
+ var removePlugin = (name) => sendRequest("plugin.remove", { name });
51552
+ var updatePlugin = (name) => sendRequest("plugin.updateFromRegistry", { name });
51545
51553
  var sendConfirmationResponse = (id, decision, scope) => {
51546
51554
  chrome.runtime.sendMessage({
51547
51555
  type: "sp:confirmationResponse",
@@ -59730,6 +59738,7 @@ var Trigger = DropdownMenuTrigger;
59730
59738
  var Portal22 = DropdownMenuPortal;
59731
59739
  var Content22 = DropdownMenuContent;
59732
59740
  var Item22 = DropdownMenuItem;
59741
+ var Separator2 = DropdownMenuSeparator;
59733
59742
 
59734
59743
  // src/side-panel/components/retro/Menu.tsx
59735
59744
  var React37 = __toESM(require_react(), 1);
@@ -59751,17 +59760,20 @@ var MenuItem2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE_
59751
59760
  {
59752
59761
  ref,
59753
59762
  className: cn(
59754
- "hover:bg-accent data-[highlighted]:bg-accent cursor-pointer px-3 py-2 font-sans text-xs outline-none",
59763
+ "text-foreground focus:bg-primary focus:text-primary-foreground data-[highlighted]:bg-primary data-[highlighted]:text-primary-foreground relative flex cursor-pointer items-center gap-2 px-3 py-1.5 font-sans text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4",
59755
59764
  className
59756
59765
  ),
59757
59766
  ...props
59758
59767
  }
59759
59768
  ));
59760
59769
  MenuItem2.displayName = Item22.displayName;
59770
+ var MenuSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Separator2, { ref, className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
59771
+ MenuSeparator2.displayName = Separator2.displayName;
59761
59772
  var MenuObject = Object.assign(Menu2, {
59762
59773
  Trigger: MenuTrigger,
59763
59774
  Content: MenuContent2,
59764
- Item: MenuItem2
59775
+ Item: MenuItem2,
59776
+ Separator: MenuSeparator2
59765
59777
  });
59766
59778
 
59767
59779
  // ../../node_modules/@radix-ui/react-progress/dist/index.mjs
@@ -60005,6 +60017,8 @@ var COUNTDOWN_POLL_INTERVAL_MS = 200;
60005
60017
  var TOOL_INVOCATION_TIMEOUT_MS = 5 * 60 * 1e3;
60006
60018
 
60007
60019
  // ../../node_modules/lucide-react/dist/esm/lucide-react.js
60020
+ init_circle_arrow_up();
60021
+ init_ellipsis();
60008
60022
  init_triangle_alert();
60009
60023
  init_arrow_up();
60010
60024
  init_chevron_down();
@@ -60013,6 +60027,7 @@ init_moon();
60013
60027
  init_search();
60014
60028
  init_shield_alert();
60015
60029
  init_sun();
60030
+ init_trash_2();
60016
60031
  init_wrench();
60017
60032
  init_x();
60018
60033
 
@@ -60268,7 +60283,7 @@ var DisconnectedState = ({ reason }) => {
60268
60283
  var NoPluginsState = () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(EmptyComponent.Content, { children: [
60269
60284
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent.Title, { children: "No Plugins Installed" }),
60270
60285
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent.Separator, {}),
60271
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent.Description, { children: "Manage plugins with:" }),
60286
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent.Description, { children: "Search for plugins above or install via CLI:" }),
60272
60287
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("code", { className: "rounded border-2 px-3 py-2 font-mono text-sm", children: "opentabs plugin" })
60273
60288
  ] }) });
60274
60289
  var LoadingState = () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Loader2, { size: "md" });
@@ -60829,12 +60844,75 @@ var PluginIcon = ({
60829
60844
  ] });
60830
60845
  };
60831
60846
 
60832
- // ../../node_modules/@radix-ui/react-accordion/dist/index.mjs
60847
+ // src/side-panel/components/PluginMenu.tsx
60833
60848
  var import_react14 = __toESM(require_react(), 1);
60849
+ var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
60850
+ var CONFIRM_DURATION_MS = 3e3;
60851
+ var PluginMenu = ({ plugin, onUpdate, onRemove, updating, removing, className }) => {
60852
+ const [confirmPending, setConfirmPending] = (0, import_react14.useState)(false);
60853
+ const confirmTimerRef = (0, import_react14.useRef)(void 0);
60854
+ (0, import_react14.useEffect)(() => () => clearTimeout(confirmTimerRef.current), []);
60855
+ const isLocal = plugin.source === "local";
60856
+ const removeLabel = isLocal ? "Remove" : "Uninstall";
60857
+ const handleRemoveClick = () => {
60858
+ if (confirmPending) {
60859
+ clearTimeout(confirmTimerRef.current);
60860
+ setConfirmPending(false);
60861
+ onRemove();
60862
+ } else {
60863
+ setConfirmPending(true);
60864
+ confirmTimerRef.current = setTimeout(() => setConfirmPending(false), CONFIRM_DURATION_MS);
60865
+ }
60866
+ };
60867
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60868
+ "div",
60869
+ {
60870
+ className,
60871
+ onClick: (e) => e.stopPropagation(),
60872
+ onKeyDown: (e) => {
60873
+ if (e.key === "Enter" || e.key === " ") e.stopPropagation();
60874
+ },
60875
+ role: "presentation",
60876
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(MenuObject, { children: [
60877
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MenuObject.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60878
+ "button",
60879
+ {
60880
+ className: "hover:bg-muted/50 flex h-6 w-6 items-center justify-center rounded",
60881
+ "aria-label": "Plugin options",
60882
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Ellipsis, { className: "h-4 w-4" })
60883
+ }
60884
+ ) }),
60885
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(MenuObject.Content, { align: "end", children: [
60886
+ plugin.update && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(MenuObject.Item, { onClick: onUpdate, children: [
60887
+ updating ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Loader2, { size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CircleArrowUp, { className: "h-3.5 w-3.5" }),
60888
+ "Update to v",
60889
+ plugin.update.latestVersion
60890
+ ] }),
60891
+ plugin.update && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MenuObject.Separator, {}),
60892
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
60893
+ MenuObject.Item,
60894
+ {
60895
+ onClick: handleRemoveClick,
60896
+ className: "text-destructive focus:bg-destructive/10 focus:text-destructive data-[highlighted]:bg-destructive/10 data-[highlighted]:text-destructive",
60897
+ children: [
60898
+ removing ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Loader2, { size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Trash2, { className: "h-3.5 w-3.5" }),
60899
+ confirmPending ? "Confirm?" : removeLabel
60900
+ ]
60901
+ }
60902
+ )
60903
+ ] })
60904
+ ] })
60905
+ }
60906
+ );
60907
+ };
60908
+ PluginMenu.displayName = "PluginMenu";
60909
+
60910
+ // ../../node_modules/@radix-ui/react-accordion/dist/index.mjs
60911
+ var import_react15 = __toESM(require_react(), 1);
60834
60912
 
60835
60913
  // ../../node_modules/@radix-ui/react-collapsible/dist/index.mjs
60836
60914
  var React42 = __toESM(require_react(), 1);
60837
- var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
60915
+ var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
60838
60916
  var COLLAPSIBLE_NAME = "Collapsible";
60839
60917
  var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
60840
60918
  var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
@@ -60854,7 +60932,7 @@ var Collapsible = React42.forwardRef(
60854
60932
  onChange: onOpenChange,
60855
60933
  caller: COLLAPSIBLE_NAME
60856
60934
  });
60857
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60935
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
60858
60936
  CollapsibleProvider,
60859
60937
  {
60860
60938
  scope: __scopeCollapsible,
@@ -60862,7 +60940,7 @@ var Collapsible = React42.forwardRef(
60862
60940
  contentId: useId(),
60863
60941
  open,
60864
60942
  onOpenToggle: React42.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
60865
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60943
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
60866
60944
  Primitive.div,
60867
60945
  {
60868
60946
  "data-state": getState(open),
@@ -60881,7 +60959,7 @@ var CollapsibleTrigger = React42.forwardRef(
60881
60959
  (props, forwardedRef) => {
60882
60960
  const { __scopeCollapsible, ...triggerProps } = props;
60883
60961
  const context = useCollapsibleContext(TRIGGER_NAME2, __scopeCollapsible);
60884
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60962
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
60885
60963
  Primitive.button,
60886
60964
  {
60887
60965
  type: "button",
@@ -60903,7 +60981,7 @@ var CollapsibleContent = React42.forwardRef(
60903
60981
  (props, forwardedRef) => {
60904
60982
  const { forceMount, ...contentProps } = props;
60905
60983
  const context = useCollapsibleContext(CONTENT_NAME4, props.__scopeCollapsible);
60906
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
60984
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
60907
60985
  }
60908
60986
  );
60909
60987
  CollapsibleContent.displayName = CONTENT_NAME4;
@@ -60943,7 +61021,7 @@ var CollapsibleContentImpl = React42.forwardRef((props, forwardedRef) => {
60943
61021
  setIsPresent(present);
60944
61022
  }
60945
61023
  }, [context.open, present]);
60946
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
61024
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
60947
61025
  Primitive.div,
60948
61026
  {
60949
61027
  "data-state": getState(context.open),
@@ -60969,7 +61047,7 @@ var Trigger2 = CollapsibleTrigger;
60969
61047
  var Content3 = CollapsibleContent;
60970
61048
 
60971
61049
  // ../../node_modules/@radix-ui/react-accordion/dist/index.mjs
60972
- var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
61050
+ var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
60973
61051
  var ACCORDION_NAME = "Accordion";
60974
61052
  var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
60975
61053
  var [Collection3, useCollection3, createCollectionScope3] = createCollection(ACCORDION_NAME);
@@ -60978,12 +61056,12 @@ var [createAccordionContext, createAccordionScope] = createContextScope(ACCORDIO
60978
61056
  createCollapsibleScope
60979
61057
  ]);
60980
61058
  var useCollapsibleScope = createCollapsibleScope();
60981
- var Accordion = import_react14.default.forwardRef(
61059
+ var Accordion = import_react15.default.forwardRef(
60982
61060
  (props, forwardedRef) => {
60983
61061
  const { type, ...accordionProps } = props;
60984
61062
  const singleProps = accordionProps;
60985
61063
  const multipleProps = accordionProps;
60986
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Collection3.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });
61064
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Collection3.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });
60987
61065
  }
60988
61066
  );
60989
61067
  Accordion.displayName = ACCORDION_NAME;
@@ -60992,7 +61070,7 @@ var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccor
60992
61070
  ACCORDION_NAME,
60993
61071
  { collapsible: false }
60994
61072
  );
60995
- var AccordionImplSingle = import_react14.default.forwardRef(
61073
+ var AccordionImplSingle = import_react15.default.forwardRef(
60996
61074
  (props, forwardedRef) => {
60997
61075
  const {
60998
61076
  value: valueProp,
@@ -61008,19 +61086,19 @@ var AccordionImplSingle = import_react14.default.forwardRef(
61008
61086
  onChange: onValueChange,
61009
61087
  caller: ACCORDION_NAME
61010
61088
  });
61011
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61089
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61012
61090
  AccordionValueProvider,
61013
61091
  {
61014
61092
  scope: props.__scopeAccordion,
61015
- value: import_react14.default.useMemo(() => value ? [value] : [], [value]),
61093
+ value: import_react15.default.useMemo(() => value ? [value] : [], [value]),
61016
61094
  onItemOpen: setValue,
61017
- onItemClose: import_react14.default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
61018
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
61095
+ onItemClose: import_react15.default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
61096
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
61019
61097
  }
61020
61098
  );
61021
61099
  }
61022
61100
  );
61023
- var AccordionImplMultiple = import_react14.default.forwardRef((props, forwardedRef) => {
61101
+ var AccordionImplMultiple = import_react15.default.forwardRef((props, forwardedRef) => {
61024
61102
  const {
61025
61103
  value: valueProp,
61026
61104
  defaultValue,
@@ -61034,30 +61112,30 @@ var AccordionImplMultiple = import_react14.default.forwardRef((props, forwardedR
61034
61112
  onChange: onValueChange,
61035
61113
  caller: ACCORDION_NAME
61036
61114
  });
61037
- const handleItemOpen = import_react14.default.useCallback(
61115
+ const handleItemOpen = import_react15.default.useCallback(
61038
61116
  (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
61039
61117
  [setValue]
61040
61118
  );
61041
- const handleItemClose = import_react14.default.useCallback(
61119
+ const handleItemClose = import_react15.default.useCallback(
61042
61120
  (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
61043
61121
  [setValue]
61044
61122
  );
61045
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61123
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61046
61124
  AccordionValueProvider,
61047
61125
  {
61048
61126
  scope: props.__scopeAccordion,
61049
61127
  value,
61050
61128
  onItemOpen: handleItemOpen,
61051
61129
  onItemClose: handleItemClose,
61052
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
61130
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
61053
61131
  }
61054
61132
  );
61055
61133
  });
61056
61134
  var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);
61057
- var AccordionImpl = import_react14.default.forwardRef(
61135
+ var AccordionImpl = import_react15.default.forwardRef(
61058
61136
  (props, forwardedRef) => {
61059
61137
  const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
61060
- const accordionRef = import_react14.default.useRef(null);
61138
+ const accordionRef = import_react15.default.useRef(null);
61061
61139
  const composedRefs = useComposedRefs(accordionRef, forwardedRef);
61062
61140
  const getItems = useCollection3(__scopeAccordion);
61063
61141
  const direction = useDirection(dir);
@@ -61124,14 +61202,14 @@ var AccordionImpl = import_react14.default.forwardRef(
61124
61202
  const clampedIndex = nextIndex % triggerCount;
61125
61203
  triggerCollection[clampedIndex].ref.current?.focus();
61126
61204
  });
61127
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61205
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61128
61206
  AccordionImplProvider,
61129
61207
  {
61130
61208
  scope: __scopeAccordion,
61131
61209
  disabled,
61132
61210
  direction: dir,
61133
61211
  orientation,
61134
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Collection3.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61212
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Collection3.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61135
61213
  Primitive.div,
61136
61214
  {
61137
61215
  ...accordionProps,
@@ -61146,7 +61224,7 @@ var AccordionImpl = import_react14.default.forwardRef(
61146
61224
  );
61147
61225
  var ITEM_NAME4 = "AccordionItem";
61148
61226
  var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME4);
61149
- var AccordionItem = import_react14.default.forwardRef(
61227
+ var AccordionItem = import_react15.default.forwardRef(
61150
61228
  (props, forwardedRef) => {
61151
61229
  const { __scopeAccordion, value, ...accordionItemProps } = props;
61152
61230
  const accordionContext = useAccordionContext(ITEM_NAME4, __scopeAccordion);
@@ -61155,14 +61233,14 @@ var AccordionItem = import_react14.default.forwardRef(
61155
61233
  const triggerId = useId();
61156
61234
  const open = value && valueContext.value.includes(value) || false;
61157
61235
  const disabled = accordionContext.disabled || props.disabled;
61158
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61236
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61159
61237
  AccordionItemProvider,
61160
61238
  {
61161
61239
  scope: __scopeAccordion,
61162
61240
  open,
61163
61241
  disabled,
61164
61242
  triggerId,
61165
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61243
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61166
61244
  Root5,
61167
61245
  {
61168
61246
  "data-orientation": accordionContext.orientation,
@@ -61187,12 +61265,12 @@ var AccordionItem = import_react14.default.forwardRef(
61187
61265
  );
61188
61266
  AccordionItem.displayName = ITEM_NAME4;
61189
61267
  var HEADER_NAME = "AccordionHeader";
61190
- var AccordionHeader = import_react14.default.forwardRef(
61268
+ var AccordionHeader = import_react15.default.forwardRef(
61191
61269
  (props, forwardedRef) => {
61192
61270
  const { __scopeAccordion, ...headerProps } = props;
61193
61271
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
61194
61272
  const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
61195
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61273
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61196
61274
  Primitive.h3,
61197
61275
  {
61198
61276
  "data-orientation": accordionContext.orientation,
@@ -61206,14 +61284,14 @@ var AccordionHeader = import_react14.default.forwardRef(
61206
61284
  );
61207
61285
  AccordionHeader.displayName = HEADER_NAME;
61208
61286
  var TRIGGER_NAME3 = "AccordionTrigger";
61209
- var AccordionTrigger = import_react14.default.forwardRef(
61287
+ var AccordionTrigger = import_react15.default.forwardRef(
61210
61288
  (props, forwardedRef) => {
61211
61289
  const { __scopeAccordion, ...triggerProps } = props;
61212
61290
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
61213
61291
  const itemContext = useAccordionItemContext(TRIGGER_NAME3, __scopeAccordion);
61214
61292
  const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME3, __scopeAccordion);
61215
61293
  const collapsibleScope = useCollapsibleScope(__scopeAccordion);
61216
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Collection3.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61294
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Collection3.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61217
61295
  Trigger2,
61218
61296
  {
61219
61297
  "aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
@@ -61228,13 +61306,13 @@ var AccordionTrigger = import_react14.default.forwardRef(
61228
61306
  );
61229
61307
  AccordionTrigger.displayName = TRIGGER_NAME3;
61230
61308
  var CONTENT_NAME5 = "AccordionContent";
61231
- var AccordionContent = import_react14.default.forwardRef(
61309
+ var AccordionContent = import_react15.default.forwardRef(
61232
61310
  (props, forwardedRef) => {
61233
61311
  const { __scopeAccordion, ...contentProps } = props;
61234
61312
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
61235
61313
  const itemContext = useAccordionItemContext(CONTENT_NAME5, __scopeAccordion);
61236
61314
  const collapsibleScope = useCollapsibleScope(__scopeAccordion);
61237
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61315
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61238
61316
  Content3,
61239
61317
  {
61240
61318
  role: "region",
@@ -61264,9 +61342,9 @@ var Content23 = AccordionContent;
61264
61342
 
61265
61343
  // src/side-panel/components/retro/Accordion.tsx
61266
61344
  var React44 = __toESM(require_react(), 1);
61267
- var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
61345
+ var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
61268
61346
  var Accordion2 = Root23;
61269
- var AccordionItem2 = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61347
+ var AccordionItem2 = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
61270
61348
  Item3,
61271
61349
  {
61272
61350
  ref,
@@ -61278,13 +61356,13 @@ var AccordionItem2 = React44.forwardRef(({ className, ...props }, ref) => /* @__
61278
61356
  }
61279
61357
  ));
61280
61358
  AccordionItem2.displayName = Item3.displayName;
61281
- var AccordionContent2 = React44.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61359
+ var AccordionContent2 = React44.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
61282
61360
  Content23,
61283
61361
  {
61284
61362
  ref,
61285
61363
  className: "data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up bg-card text-card-foreground overflow-hidden font-sans",
61286
61364
  ...props,
61287
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn(className), children })
61365
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn(className), children })
61288
61366
  }
61289
61367
  ));
61290
61368
  AccordionContent2.displayName = Content23.displayName;
@@ -61294,7 +61372,7 @@ var AccordionComponent = Object.assign(Accordion2, {
61294
61372
  });
61295
61373
 
61296
61374
  // src/side-panel/components/retro/Alert.tsx
61297
- var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
61375
+ var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
61298
61376
  var alertVariants = cva("relative w-full rounded border-2 p-4", {
61299
61377
  variants: {
61300
61378
  variant: {
@@ -61312,11 +61390,11 @@ var alertVariants = cva("relative w-full rounded border-2 p-4", {
61312
61390
  variant: "default"
61313
61391
  }
61314
61392
  });
61315
- var Alert = ({ className, variant, status, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { role: "alert", className: cn(alertVariants({ variant, status }), className), ...props });
61393
+ var Alert = ({ className, variant, status, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { role: "alert", className: cn(alertVariants({ variant, status }), className), ...props });
61316
61394
  Alert.displayName = "Alert";
61317
- var AlertTitle = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { as: "h5", className: cn(className), ...props });
61395
+ var AlertTitle = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { as: "h5", className: cn(className), ...props });
61318
61396
  AlertTitle.displayName = "AlertTitle";
61319
- var AlertDescription = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("text-muted-foreground", className), ...props });
61397
+ var AlertDescription = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("text-muted-foreground", className), ...props });
61320
61398
  AlertDescription.displayName = "AlertDescription";
61321
61399
  var AlertComponent = Object.assign(Alert, {
61322
61400
  Title: AlertTitle,
@@ -61324,7 +61402,7 @@ var AlertComponent = Object.assign(Alert, {
61324
61402
  });
61325
61403
 
61326
61404
  // src/side-panel/components/retro/Badge.tsx
61327
- var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
61405
+ var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
61328
61406
  var badgeVariants = cva("inline-block rounded font-medium leading-none", {
61329
61407
  variants: {
61330
61408
  variant: {
@@ -61341,7 +61419,7 @@ var badgeVariants = cva("inline-block rounded font-medium leading-none", {
61341
61419
  size: "md"
61342
61420
  }
61343
61421
  });
61344
- var Badge2 = ({ className, variant, size: size4, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: cn(badgeVariants({ variant, size: size4 }), className), ...props });
61422
+ var Badge2 = ({ className, variant, size: size4, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn(badgeVariants({ variant, size: size4 }), className), ...props });
61345
61423
  Badge2.displayName = "Badge";
61346
61424
 
61347
61425
  // ../../node_modules/@radix-ui/react-switch/dist/index.mjs
@@ -61361,7 +61439,7 @@ function usePrevious(value) {
61361
61439
  }
61362
61440
 
61363
61441
  // ../../node_modules/@radix-ui/react-switch/dist/index.mjs
61364
- var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
61442
+ var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
61365
61443
  var SWITCH_NAME = "Switch";
61366
61444
  var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
61367
61445
  var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
@@ -61389,8 +61467,8 @@ var Switch = React46.forwardRef(
61389
61467
  onChange: onCheckedChange,
61390
61468
  caller: SWITCH_NAME
61391
61469
  });
61392
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
61393
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
61470
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
61471
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61394
61472
  Primitive.button,
61395
61473
  {
61396
61474
  type: "button",
@@ -61412,7 +61490,7 @@ var Switch = React46.forwardRef(
61412
61490
  })
61413
61491
  }
61414
61492
  ),
61415
- isFormControl && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
61493
+ isFormControl && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61416
61494
  SwitchBubbleInput,
61417
61495
  {
61418
61496
  control: button,
@@ -61435,7 +61513,7 @@ var SwitchThumb = React46.forwardRef(
61435
61513
  (props, forwardedRef) => {
61436
61514
  const { __scopeSwitch, ...thumbProps } = props;
61437
61515
  const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
61438
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
61516
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61439
61517
  Primitive.span,
61440
61518
  {
61441
61519
  "data-state": getState3(context.checked),
@@ -61475,7 +61553,7 @@ var SwitchBubbleInput = React46.forwardRef(
61475
61553
  input.dispatchEvent(event);
61476
61554
  }
61477
61555
  }, [prevChecked, checked, bubbles]);
61478
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
61556
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61479
61557
  "input",
61480
61558
  {
61481
61559
  type: "checkbox",
@@ -61504,8 +61582,8 @@ var Root6 = Switch;
61504
61582
  var Thumb = SwitchThumb;
61505
61583
 
61506
61584
  // src/side-panel/components/retro/Switch.tsx
61507
- var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
61508
- var Switch2 = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61585
+ var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
61586
+ var Switch2 = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
61509
61587
  Root6,
61510
61588
  {
61511
61589
  className: cn(
@@ -61513,7 +61591,7 @@ var Switch2 = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtim
61513
61591
  className
61514
61592
  ),
61515
61593
  ...props,
61516
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61594
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
61517
61595
  Thumb,
61518
61596
  {
61519
61597
  className: cn(
@@ -61529,12 +61607,12 @@ var React49 = __toESM(require_react(), 1);
61529
61607
 
61530
61608
  // ../../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.mjs
61531
61609
  var React47 = __toESM(require_react(), 1);
61532
- var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
61610
+ var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
61533
61611
  var SLOTTABLE_IDENTIFIER5 = Symbol("radix.slottable");
61534
61612
  // @__NO_SIDE_EFFECTS__
61535
61613
  function createSlottable(ownerName) {
61536
61614
  const Slottable2 = ({ children }) => {
61537
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children });
61615
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children });
61538
61616
  };
61539
61617
  Slottable2.displayName = `${ownerName}.Slottable`;
61540
61618
  Slottable2.__radixId = SLOTTABLE_IDENTIFIER5;
@@ -61543,7 +61621,7 @@ function createSlottable(ownerName) {
61543
61621
 
61544
61622
  // ../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
61545
61623
  var React48 = __toESM(require_react(), 1);
61546
- var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
61624
+ var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
61547
61625
  var VISUALLY_HIDDEN_STYLES = Object.freeze({
61548
61626
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
61549
61627
  position: "absolute",
@@ -61560,7 +61638,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
61560
61638
  var NAME2 = "VisuallyHidden";
61561
61639
  var VisuallyHidden = React48.forwardRef(
61562
61640
  (props, forwardedRef) => {
61563
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
61641
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61564
61642
  Primitive.span,
61565
61643
  {
61566
61644
  ...props,
@@ -61574,7 +61652,7 @@ VisuallyHidden.displayName = NAME2;
61574
61652
  var Root7 = VisuallyHidden;
61575
61653
 
61576
61654
  // ../../node_modules/@radix-ui/react-tooltip/dist/index.mjs
61577
- var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
61655
+ var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
61578
61656
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
61579
61657
  createPopperScope
61580
61658
  ]);
@@ -61598,7 +61676,7 @@ var TooltipProvider = (props) => {
61598
61676
  const skipDelayTimer = skipDelayTimerRef.current;
61599
61677
  return () => window.clearTimeout(skipDelayTimer);
61600
61678
  }, []);
61601
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61679
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
61602
61680
  TooltipProviderContextProvider,
61603
61681
  {
61604
61682
  scope: __scopeTooltip,
@@ -61689,7 +61767,7 @@ var Tooltip = (props) => {
61689
61767
  }
61690
61768
  };
61691
61769
  }, []);
61692
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Root2, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61770
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Root2, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
61693
61771
  TooltipContextProvider,
61694
61772
  {
61695
61773
  scope: __scopeTooltip,
@@ -61733,7 +61811,7 @@ var TooltipTrigger = React49.forwardRef(
61733
61811
  React49.useEffect(() => {
61734
61812
  return () => document.removeEventListener("pointerup", handlePointerUp);
61735
61813
  }, [handlePointerUp]);
61736
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61814
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
61737
61815
  Primitive.button,
61738
61816
  {
61739
61817
  "aria-describedby": context.open ? context.contentId : void 0,
@@ -61775,7 +61853,7 @@ var [PortalProvider2, usePortalContext2] = createTooltipContext(PORTAL_NAME4, {
61775
61853
  var TooltipPortal = (props) => {
61776
61854
  const { __scopeTooltip, forceMount, children, container } = props;
61777
61855
  const context = useTooltipContext(PORTAL_NAME4, __scopeTooltip);
61778
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PortalProvider2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Portal, { asChild: true, container, children }) }) });
61856
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PortalProvider2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Portal, { asChild: true, container, children }) }) });
61779
61857
  };
61780
61858
  TooltipPortal.displayName = PORTAL_NAME4;
61781
61859
  var CONTENT_NAME6 = "TooltipContent";
@@ -61784,7 +61862,7 @@ var TooltipContent = React49.forwardRef(
61784
61862
  const portalContext = usePortalContext2(CONTENT_NAME6, props.__scopeTooltip);
61785
61863
  const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
61786
61864
  const context = useTooltipContext(CONTENT_NAME6, props.__scopeTooltip);
61787
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
61865
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
61788
61866
  }
61789
61867
  );
61790
61868
  var TooltipContentHoverable = React49.forwardRef((props, forwardedRef) => {
@@ -61846,7 +61924,7 @@ var TooltipContentHoverable = React49.forwardRef((props, forwardedRef) => {
61846
61924
  return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
61847
61925
  }
61848
61926
  }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
61849
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContentImpl, { ...props, ref: composedRefs });
61927
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipContentImpl, { ...props, ref: composedRefs });
61850
61928
  });
61851
61929
  var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
61852
61930
  var Slottable = createSlottable("TooltipContent");
@@ -61877,7 +61955,7 @@ var TooltipContentImpl = React49.forwardRef(
61877
61955
  return () => window.removeEventListener("scroll", handleScroll2, { capture: true });
61878
61956
  }
61879
61957
  }, [context.trigger, onClose]);
61880
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61958
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
61881
61959
  DismissableLayer,
61882
61960
  {
61883
61961
  asChild: true,
@@ -61886,7 +61964,7 @@ var TooltipContentImpl = React49.forwardRef(
61886
61964
  onPointerDownOutside,
61887
61965
  onFocusOutside: (event) => event.preventDefault(),
61888
61966
  onDismiss: onClose,
61889
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
61967
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
61890
61968
  Content,
61891
61969
  {
61892
61970
  "data-state": context.stateAttribute,
@@ -61905,8 +61983,8 @@ var TooltipContentImpl = React49.forwardRef(
61905
61983
  }
61906
61984
  },
61907
61985
  children: [
61908
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Slottable, { children }),
61909
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Root7, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
61986
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Slottable, { children }),
61987
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Root7, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
61910
61988
  ]
61911
61989
  }
61912
61990
  )
@@ -61924,7 +62002,7 @@ var TooltipArrow = React49.forwardRef(
61924
62002
  ARROW_NAME4,
61925
62003
  __scopeTooltip
61926
62004
  );
61927
- return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
62005
+ return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
61928
62006
  }
61929
62007
  );
61930
62008
  TooltipArrow.displayName = ARROW_NAME4;
@@ -62051,7 +62129,7 @@ var Content24 = TooltipContent;
62051
62129
 
62052
62130
  // src/side-panel/components/retro/Tooltip.tsx
62053
62131
  var React50 = __toESM(require_react(), 1);
62054
- var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
62132
+ var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
62055
62133
  var tooltipContentVariants = cva(
62056
62134
  "z-50 overflow-hidden rounded border-2 border-border bg-background px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
62057
62135
  {
@@ -62070,7 +62148,7 @@ var tooltipContentVariants = cva(
62070
62148
  var TooltipProvider2 = Provider;
62071
62149
  var Tooltip2 = Root33;
62072
62150
  var TooltipTrigger2 = Trigger3;
62073
- var TooltipContent2 = React50.forwardRef(({ className, sideOffset = 4, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Portal3, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
62151
+ var TooltipContent2 = React50.forwardRef(({ className, sideOffset = 4, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Portal3, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
62074
62152
  Content24,
62075
62153
  {
62076
62154
  ref,
@@ -62092,7 +62170,7 @@ var TooltipObject = Object.assign(Tooltip2, {
62092
62170
  });
62093
62171
 
62094
62172
  // ../../node_modules/lucide-react/dist/esm/DynamicIcon.js
62095
- var import_react15 = __toESM(require_react());
62173
+ var import_react16 = __toESM(require_react());
62096
62174
 
62097
62175
  // ../../node_modules/lucide-react/dist/esm/dynamicIconImports.js
62098
62176
  var dynamicIconImports = {
@@ -64037,10 +64115,10 @@ async function getIconNode(name) {
64037
64115
  const icon = await dynamicIconImports[name]();
64038
64116
  return icon.__iconNode;
64039
64117
  }
64040
- var DynamicIcon = (0, import_react15.forwardRef)(
64118
+ var DynamicIcon = (0, import_react16.forwardRef)(
64041
64119
  ({ name, fallback: Fallback, ...props }, ref) => {
64042
- const [iconNode, setIconNode] = (0, import_react15.useState)();
64043
- (0, import_react15.useEffect)(() => {
64120
+ const [iconNode, setIconNode] = (0, import_react16.useState)();
64121
+ (0, import_react16.useEffect)(() => {
64044
64122
  getIconNode(name).then(setIconNode).catch((error) => {
64045
64123
  console.error(error);
64046
64124
  });
@@ -64049,9 +64127,9 @@ var DynamicIcon = (0, import_react15.forwardRef)(
64049
64127
  if (Fallback == null) {
64050
64128
  return null;
64051
64129
  }
64052
- return (0, import_react15.createElement)(Fallback);
64130
+ return (0, import_react16.createElement)(Fallback);
64053
64131
  }
64054
- return (0, import_react15.createElement)(Icon, {
64132
+ return (0, import_react16.createElement)(Icon, {
64055
64133
  ref,
64056
64134
  ...props,
64057
64135
  iconNode
@@ -64060,19 +64138,19 @@ var DynamicIcon = (0, import_react15.forwardRef)(
64060
64138
  );
64061
64139
 
64062
64140
  // src/side-panel/components/ToolIcon.tsx
64063
- var import_react16 = __toESM(require_react(), 1);
64064
- var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
64065
- var FallbackIcon = () => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Wrench, { className: "text-muted-foreground h-3 w-3" });
64066
- var ToolIcon = ({ icon, className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
64141
+ var import_react17 = __toESM(require_react(), 1);
64142
+ var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
64143
+ var FallbackIcon = () => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Wrench, { className: "text-muted-foreground h-3 w-3" });
64144
+ var ToolIcon = ({ icon, className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
64067
64145
  "div",
64068
64146
  {
64069
64147
  className: `border-border bg-muted/50 flex h-6 w-6 shrink-0 items-center justify-center rounded border-2 ${className}`,
64070
- children: icon ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react16.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FallbackIcon, {}), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DynamicIcon, { name: icon, className: "text-muted-foreground h-3 w-3", fallback: FallbackIcon }) }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FallbackIcon, {})
64148
+ children: icon ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react17.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FallbackIcon, {}), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DynamicIcon, { name: icon, className: "text-muted-foreground h-3 w-3", fallback: FallbackIcon }) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FallbackIcon, {})
64071
64149
  }
64072
64150
  );
64073
64151
 
64074
64152
  // src/side-panel/components/ToolRow.tsx
64075
- var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
64153
+ var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
64076
64154
  var ToolRow = ({
64077
64155
  name,
64078
64156
  displayName,
@@ -64081,19 +64159,19 @@ var ToolRow = ({
64081
64159
  enabled,
64082
64160
  active,
64083
64161
  onToggle
64084
- }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
64162
+ }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
64085
64163
  "div",
64086
64164
  {
64087
64165
  className: `border-border hover:bg-muted/50 flex items-center gap-2 border-b px-3 py-2 transition-colors last:border-b-0 ${active ? "bg-accent/20" : ""}`,
64088
64166
  children: [
64089
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ToolIcon, { icon }),
64090
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(TooltipObject, { children: [
64091
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipObject.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-foreground truncate text-[13px]", children: displayName }) }) }),
64092
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipObject.Content, { children: description })
64167
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ToolIcon, { icon }),
64168
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(TooltipObject, { children: [
64169
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipObject.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-foreground truncate text-[13px]", children: displayName }) }) }),
64170
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipObject.Content, { children: description })
64093
64171
  ] }),
64094
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
64095
- active && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Loader2, { size: "sm", count: 2, duration: 0.4, delayStep: 80 }),
64096
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
64172
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
64173
+ active && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Loader2, { size: "sm", count: 2, duration: 0.4, delayStep: 80 }),
64174
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
64097
64175
  Switch2,
64098
64176
  {
64099
64177
  checked: enabled,
@@ -64108,18 +64186,22 @@ var ToolRow = ({
64108
64186
  );
64109
64187
 
64110
64188
  // src/side-panel/components/PluginCard.tsx
64111
- var import_react17 = __toESM(require_react(), 1);
64112
- var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
64189
+ var import_react18 = __toESM(require_react(), 1);
64190
+ var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
64113
64191
  var PluginCard = ({
64114
64192
  plugin,
64115
64193
  activeTools,
64116
64194
  setPlugins,
64117
- toolFilter
64195
+ toolFilter,
64196
+ onUpdate,
64197
+ onRemove,
64198
+ updatingPlugin,
64199
+ removingPlugin
64118
64200
  }) => {
64119
- const [toggleError, setToggleError] = (0, import_react17.useState)(null);
64120
- const errorTimerRef = (0, import_react17.useRef)(void 0);
64121
- const toggleCounter = (0, import_react17.useRef)(0);
64122
- (0, import_react17.useEffect)(() => () => clearTimeout(errorTimerRef.current), []);
64201
+ const [toggleError, setToggleError] = (0, import_react18.useState)(null);
64202
+ const errorTimerRef = (0, import_react18.useRef)(void 0);
64203
+ const toggleCounter = (0, import_react18.useRef)(0);
64204
+ (0, import_react18.useEffect)(() => () => clearTimeout(errorTimerRef.current), []);
64123
64205
  const showToggleError = (message) => {
64124
64206
  clearTimeout(errorTimerRef.current);
64125
64207
  setToggleError(message);
@@ -64152,124 +64234,148 @@ var PluginCard = ({
64152
64234
  };
64153
64235
  const filterLower = toolFilter?.toLowerCase() ?? "";
64154
64236
  const visibleTools = filterLower ? plugin.tools.filter((t) => matchesTool(t, filterLower)) : plugin.tools;
64155
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(AccordionComponent.Item, { value: plugin.name, children: [
64156
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Header, { className: "flex", children: [
64157
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Trigger22, { className: "font-head flex flex-1 cursor-pointer items-center gap-2 px-3 py-2 focus:outline-hidden [&[data-state=open]>svg]:rotate-180", children: [
64158
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(TooltipObject, { children: [
64159
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipObject.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
64160
- PluginIcon,
64237
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
64238
+ AccordionComponent.Item,
64239
+ {
64240
+ value: plugin.name,
64241
+ className: removingPlugin ? "pointer-events-none opacity-60 transition-opacity" : void 0,
64242
+ children: [
64243
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Header, { className: "flex", children: [
64244
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Trigger22, { className: "font-head flex flex-1 cursor-pointer items-center gap-2 px-3 py-2 focus:outline-hidden [&[data-state=open]>svg]:rotate-180", children: [
64245
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(TooltipObject, { children: [
64246
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipObject.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64247
+ PluginIcon,
64248
+ {
64249
+ pluginName: plugin.name,
64250
+ displayName: plugin.displayName,
64251
+ tabState: plugin.tabState,
64252
+ hasUpdate: !!plugin.update,
64253
+ size: 32,
64254
+ iconSvg: plugin.iconSvg,
64255
+ iconInactiveSvg: plugin.iconInactiveSvg
64256
+ }
64257
+ ) }) }),
64258
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(TooltipObject.Content, { children: [
64259
+ "v",
64260
+ plugin.version,
64261
+ " \xB7 ",
64262
+ plugin.trustTier,
64263
+ plugin.update && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
64264
+ " \xB7 Update: ",
64265
+ plugin.update.latestVersion
64266
+ ] })
64267
+ ] })
64268
+ ] }),
64269
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "font-head text-foreground flex min-w-0 flex-1 items-center gap-1.5 truncate text-sm", children: [
64270
+ plugin.displayName,
64271
+ plugin.source === "local" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge2, { variant: "default", size: "sm", className: "align-middle", children: "DEV" }),
64272
+ !plugin.sdkVersion && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(TooltipObject, { children: [
64273
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipObject.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64274
+ Badge2,
64275
+ {
64276
+ variant: "outline",
64277
+ size: "sm",
64278
+ className: "border-accent bg-accent/10 text-accent-foreground align-middle",
64279
+ children: "SDK"
64280
+ }
64281
+ ) }),
64282
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipObject.Content, { children: "SDK version mismatch \u2014 rebuild plugin" })
64283
+ ] })
64284
+ ] }),
64285
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
64286
+ ] }),
64287
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64288
+ PluginMenu,
64161
64289
  {
64162
- pluginName: plugin.name,
64163
- displayName: plugin.displayName,
64164
- tabState: plugin.tabState,
64165
- hasUpdate: !!plugin.update,
64166
- size: 32,
64167
- iconSvg: plugin.iconSvg,
64168
- iconInactiveSvg: plugin.iconInactiveSvg
64290
+ plugin,
64291
+ onUpdate: onUpdate ?? (() => void 0),
64292
+ onRemove: onRemove ?? (() => void 0),
64293
+ updating: updatingPlugin ?? false,
64294
+ removing: removingPlugin ?? false,
64295
+ className: "flex shrink-0 items-center px-1"
64169
64296
  }
64170
- ) }) }),
64171
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(TooltipObject.Content, { children: [
64172
- "v",
64173
- plugin.version,
64174
- " \xB7 ",
64175
- plugin.trustTier,
64176
- plugin.update && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
64177
- " \xB7 Update: ",
64178
- plugin.update.latestVersion
64179
- ] })
64180
- ] })
64181
- ] }),
64182
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "font-head text-foreground flex min-w-0 flex-1 items-center gap-1.5 truncate text-sm", children: [
64183
- plugin.displayName,
64184
- plugin.source === "local" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Badge2, { variant: "default", size: "sm", className: "align-middle", children: "DEV" }),
64185
- !plugin.sdkVersion && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(TooltipObject, { children: [
64186
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipObject.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
64187
- Badge2,
64188
- {
64189
- variant: "outline",
64190
- size: "sm",
64191
- className: "border-accent bg-accent/10 text-accent-foreground align-middle",
64192
- children: "SDK"
64193
- }
64194
- ) }),
64195
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipObject.Content, { children: "SDK version mismatch \u2014 rebuild plugin" })
64196
- ] })
64197
- ] }),
64198
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
64199
- ] }),
64200
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
64201
- "div",
64202
- {
64203
- className: "flex shrink-0 items-center px-3",
64204
- onClick: (e) => e.stopPropagation(),
64205
- onKeyDown: (e) => {
64206
- if (e.key === "Enter" || e.key === " ") e.stopPropagation();
64207
- },
64208
- role: "presentation",
64209
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
64210
- Switch2,
64297
+ ),
64298
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64299
+ "div",
64211
64300
  {
64212
- checked: allEnabled,
64213
- onCheckedChange: handleToggleAll,
64214
- "aria-label": `Toggle all tools for ${plugin.name}`
64301
+ className: "flex shrink-0 items-center px-3",
64302
+ onClick: (e) => e.stopPropagation(),
64303
+ onKeyDown: (e) => {
64304
+ if (e.key === "Enter" || e.key === " ") e.stopPropagation();
64305
+ },
64306
+ role: "presentation",
64307
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64308
+ Switch2,
64309
+ {
64310
+ checked: allEnabled,
64311
+ onCheckedChange: handleToggleAll,
64312
+ "aria-label": `Toggle all tools for ${plugin.name}`
64313
+ }
64314
+ )
64215
64315
  }
64216
64316
  )
64217
- }
64218
- )
64219
- ] }),
64220
- toggleError && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AlertComponent, { status: "error", className: "mx-3 mb-1 px-2 py-1 text-[11px]", children: toggleError }),
64221
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(AccordionComponent.Content, { className: "border-border border-t", children: [
64222
- toolFilter && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "text-muted-foreground mb-1 px-3 pt-2 text-xs", children: [
64223
- visibleTools.length,
64224
- " of ",
64225
- plugin.tools.length,
64226
- " tools"
64227
- ] }),
64228
- visibleTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
64229
- ToolRow,
64230
- {
64231
- name: tool.name,
64232
- displayName: tool.displayName,
64233
- description: tool.description,
64234
- icon: tool.icon,
64235
- enabled: tool.enabled,
64236
- active: activeTools.has(`${plugin.name}:${tool.name}`),
64237
- onToggle: () => handleToggleTool(tool.name, tool.enabled)
64238
- },
64239
- tool.name
64240
- ))
64241
- ] })
64242
- ] });
64317
+ ] }),
64318
+ toggleError && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AlertComponent, { status: "error", className: "mx-3 mb-1 px-2 py-1 text-[11px]", children: toggleError }),
64319
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(AccordionComponent.Content, { className: "border-border border-t", children: [
64320
+ toolFilter && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "text-muted-foreground mb-1 px-3 pt-2 text-xs", children: [
64321
+ visibleTools.length,
64322
+ " of ",
64323
+ plugin.tools.length,
64324
+ " tools"
64325
+ ] }),
64326
+ visibleTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64327
+ ToolRow,
64328
+ {
64329
+ name: tool.name,
64330
+ displayName: tool.displayName,
64331
+ description: tool.description,
64332
+ icon: tool.icon,
64333
+ enabled: tool.enabled,
64334
+ active: activeTools.has(`${plugin.name}:${tool.name}`),
64335
+ onToggle: () => handleToggleTool(tool.name, tool.enabled)
64336
+ },
64337
+ tool.name
64338
+ ))
64339
+ ] })
64340
+ ]
64341
+ }
64342
+ );
64243
64343
  };
64244
64344
 
64245
64345
  // src/side-panel/components/PluginList.tsx
64246
- var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
64346
+ var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
64247
64347
  var PluginList = ({
64248
64348
  plugins,
64249
64349
  failedPlugins,
64250
64350
  activeTools,
64251
64351
  setPlugins,
64252
- toolFilter
64352
+ toolFilter,
64353
+ onUpdate,
64354
+ onRemove,
64355
+ removingPlugins
64253
64356
  }) => {
64254
64357
  const filterLower = toolFilter.toLowerCase();
64255
64358
  const visiblePlugins = filterLower ? plugins.filter((p) => p.tools.some((t) => matchesTool(t, filterLower))) : plugins;
64256
64359
  const visibleFailed = filterLower ? [] : failedPlugins;
64257
64360
  if (filterLower && visiblePlugins.length === 0) {
64258
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "text-muted-foreground py-8 text-center text-sm", children: [
64361
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-muted-foreground py-8 text-center text-sm", children: [
64259
64362
  "No tools matching \u201C",
64260
64363
  toolFilter,
64261
64364
  "\u201D"
64262
64365
  ] });
64263
64366
  }
64264
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
64265
- visibleFailed.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "mb-3 space-y-2", children: visibleFailed.map((fp) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FailedPluginCard, { plugin: fp }, fp.specifier)) }),
64266
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AccordionComponent, { type: "multiple", className: "space-y-2", children: visiblePlugins.map((plugin) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64367
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
64368
+ visibleFailed.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "mb-3 space-y-2", children: visibleFailed.map((fp) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FailedPluginCard, { plugin: fp }, fp.specifier)) }),
64369
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AccordionComponent, { type: "multiple", className: "space-y-2", children: visiblePlugins.map((plugin) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
64267
64370
  PluginCard,
64268
64371
  {
64269
64372
  plugin,
64270
64373
  activeTools,
64271
64374
  setPlugins,
64272
- toolFilter
64375
+ toolFilter,
64376
+ onUpdate: onUpdate ? () => onUpdate(plugin.name) : void 0,
64377
+ onRemove: onRemove ? () => onRemove(plugin.name) : void 0,
64378
+ removingPlugin: removingPlugins?.has(plugin.name)
64273
64379
  },
64274
64380
  plugin.name
64275
64381
  )) })
@@ -64277,10 +64383,10 @@ var PluginList = ({
64277
64383
  };
64278
64384
 
64279
64385
  // src/side-panel/components/retro/Input.tsx
64280
- var import_react18 = __toESM(require_react(), 1);
64281
- var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
64282
- var Input = (0, import_react18.forwardRef)(
64283
- ({ type = "text", placeholder = "Enter text", className, "aria-invalid": ariaInvalid, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
64386
+ var import_react19 = __toESM(require_react(), 1);
64387
+ var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
64388
+ var Input = (0, import_react19.forwardRef)(
64389
+ ({ type = "text", placeholder = "Enter text", className, "aria-invalid": ariaInvalid, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
64284
64390
  "input",
64285
64391
  {
64286
64392
  ref,
@@ -64298,8 +64404,90 @@ var Input = (0, import_react18.forwardRef)(
64298
64404
  );
64299
64405
  Input.displayName = "Input";
64300
64406
 
64407
+ // src/side-panel/components/NpmPluginCard.tsx
64408
+ var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
64409
+ var deriveDisplayName = (packageName) => (packageName.split("/").pop() ?? packageName).replace(/^opentabs-plugin-/, "");
64410
+ var NpmPluginCard = ({ plugin, installing, error, onInstall }) => {
64411
+ const displayName = deriveDisplayName(plugin.name);
64412
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "border-border bg-card space-y-2 rounded border-2 p-3 shadow-md transition-all hover:shadow-sm", children: [
64413
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2", children: [
64414
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PluginIcon, { pluginName: plugin.name, displayName, tabState: "closed", size: 28 }),
64415
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
64416
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-wrap items-center gap-1", children: [
64417
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "font-head text-foreground truncate text-sm", children: displayName }),
64418
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Badge2, { variant: "default", size: "sm", children: plugin.version }),
64419
+ plugin.isOfficial && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Badge2, { size: "sm", className: "bg-primary/20 text-primary-foreground", children: "OFFICIAL" })
64420
+ ] }),
64421
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-muted-foreground truncate font-mono text-xs", children: plugin.author })
64422
+ ] }),
64423
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Button, { size: "sm", variant: "default", disabled: installing, onClick: onInstall, className: "shrink-0", children: installing ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Loader2, { size: "sm" }) : "Install" })
64424
+ ] }),
64425
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-muted-foreground line-clamp-2 text-xs", children: plugin.description }),
64426
+ error && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AlertComponent, { status: "error", className: "px-3 py-2 text-xs", children: error })
64427
+ ] });
64428
+ };
64429
+ NpmPluginCard.displayName = "NpmPluginCard";
64430
+
64431
+ // src/side-panel/components/SearchResults.tsx
64432
+ var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
64433
+ var SectionHeader = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "font-head text-muted-foreground mb-1.5 text-[10px] tracking-widest uppercase", children });
64434
+ var SearchResults = ({
64435
+ plugins,
64436
+ activeTools,
64437
+ setPlugins,
64438
+ toolFilter,
64439
+ npmResults,
64440
+ npmSearching,
64441
+ installingPlugins,
64442
+ onInstall,
64443
+ installErrors,
64444
+ onUpdate,
64445
+ onRemove,
64446
+ removingPlugins
64447
+ }) => {
64448
+ const filterLower = toolFilter.toLowerCase();
64449
+ const installedMatches = filterLower ? plugins.filter((p) => matchesPlugin(p, filterLower)) : plugins;
64450
+ const installedShortNames = new Set(plugins.map((p) => extractShortName(p.name)));
64451
+ const availableResults = npmResults.filter((r2) => !installedShortNames.has(extractShortName(r2.name)));
64452
+ const hasInstalledResults = installedMatches.length > 0;
64453
+ const showNoResults = toolFilter && !hasInstalledResults && !npmSearching && availableResults.length === 0;
64454
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "space-y-4", children: [
64455
+ hasInstalledResults && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
64456
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SectionHeader, { children: "Installed" }),
64457
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
64458
+ PluginList,
64459
+ {
64460
+ plugins: installedMatches,
64461
+ failedPlugins: [],
64462
+ activeTools,
64463
+ setPlugins,
64464
+ toolFilter: "",
64465
+ onUpdate,
64466
+ onRemove,
64467
+ removingPlugins
64468
+ }
64469
+ )
64470
+ ] }),
64471
+ toolFilter && (npmSearching ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Loader2, { size: "sm" }) }) : availableResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
64472
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SectionHeader, { children: "Available" }),
64473
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-2", children: availableResults.map((result) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
64474
+ NpmPluginCard,
64475
+ {
64476
+ plugin: result,
64477
+ installing: installingPlugins.has(result.name),
64478
+ error: installErrors.get(result.name) ?? null,
64479
+ onInstall: () => onInstall(result.name)
64480
+ },
64481
+ result.name
64482
+ )) })
64483
+ ] })),
64484
+ showNoResults && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "text-muted-foreground py-8 text-center text-sm", children: "No results" })
64485
+ ] });
64486
+ };
64487
+ SearchResults.displayName = "SearchResults";
64488
+
64301
64489
  // src/side-panel/hooks/useServerNotifications.ts
64302
- var import_react19 = __toESM(require_react(), 1);
64490
+ var import_react20 = __toESM(require_react(), 1);
64303
64491
  var validTabStates = /* @__PURE__ */ new Set(["closed", "unavailable", "ready"]);
64304
64492
  var useServerNotifications = ({
64305
64493
  setPlugins,
@@ -64307,9 +64495,9 @@ var useServerNotifications = ({
64307
64495
  setPendingConfirmations,
64308
64496
  pendingTabStates
64309
64497
  }) => {
64310
- const timeoutIds = (0, import_react19.useRef)(/* @__PURE__ */ new Map());
64311
- const invocationTimeoutIds = (0, import_react19.useRef)(/* @__PURE__ */ new Map());
64312
- (0, import_react19.useEffect)(() => {
64498
+ const timeoutIds = (0, import_react20.useRef)(/* @__PURE__ */ new Map());
64499
+ const invocationTimeoutIds = (0, import_react20.useRef)(/* @__PURE__ */ new Map());
64500
+ (0, import_react20.useEffect)(() => {
64313
64501
  const confirmationMap = timeoutIds.current;
64314
64502
  const invocationMap = invocationTimeoutIds.current;
64315
64503
  return () => {
@@ -64323,14 +64511,14 @@ var useServerNotifications = ({
64323
64511
  invocationMap.clear();
64324
64512
  };
64325
64513
  }, []);
64326
- const clearConfirmationTimeout = (0, import_react19.useCallback)((id) => {
64514
+ const clearConfirmationTimeout = (0, import_react20.useCallback)((id) => {
64327
64515
  const tid = timeoutIds.current.get(id);
64328
64516
  if (tid !== void 0) {
64329
64517
  clearTimeout(tid);
64330
64518
  timeoutIds.current.delete(id);
64331
64519
  }
64332
64520
  }, []);
64333
- const handleNotification = (0, import_react19.useCallback)(
64521
+ const handleNotification = (0, import_react20.useCallback)(
64334
64522
  (data) => {
64335
64523
  if (data.method === "confirmation.request" && data.params) {
64336
64524
  const params = data.params;
@@ -64410,28 +64598,34 @@ var useServerNotifications = ({
64410
64598
  };
64411
64599
 
64412
64600
  // src/side-panel/App.tsx
64413
- var import_react20 = __toESM(require_react(), 1);
64414
- var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
64601
+ var import_react21 = __toESM(require_react(), 1);
64602
+ var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
64415
64603
  var App = () => {
64416
- const [connected, setConnected] = (0, import_react20.useState)(false);
64417
- const [disconnectReason, setDisconnectReason] = (0, import_react20.useState)();
64418
- const [plugins, setPlugins] = (0, import_react20.useState)([]);
64419
- const [failedPlugins, setFailedPlugins] = (0, import_react20.useState)([]);
64420
- const [loading, setLoading] = (0, import_react20.useState)(true);
64421
- const [activeTools, setActiveTools] = (0, import_react20.useState)(/* @__PURE__ */ new Set());
64422
- const [toolFilter, setToolFilter] = (0, import_react20.useState)("");
64423
- const [pendingConfirmations, setPendingConfirmations] = (0, import_react20.useState)([]);
64424
- const lastFetchRef = (0, import_react20.useRef)(0);
64425
- const pendingTabStates = (0, import_react20.useRef)(/* @__PURE__ */ new Map());
64426
- const connectedRef = (0, import_react20.useRef)(connected);
64427
- const loadingRef = (0, import_react20.useRef)(loading);
64428
- const pluginsRef = (0, import_react20.useRef)(plugins);
64429
- (0, import_react20.useEffect)(() => {
64604
+ const [connected, setConnected] = (0, import_react21.useState)(false);
64605
+ const [disconnectReason, setDisconnectReason] = (0, import_react21.useState)();
64606
+ const [plugins, setPlugins] = (0, import_react21.useState)([]);
64607
+ const [failedPlugins, setFailedPlugins] = (0, import_react21.useState)([]);
64608
+ const [loading, setLoading] = (0, import_react21.useState)(true);
64609
+ const [activeTools, setActiveTools] = (0, import_react21.useState)(/* @__PURE__ */ new Set());
64610
+ const [searchQuery, setSearchQuery] = (0, import_react21.useState)("");
64611
+ const [pendingConfirmations, setPendingConfirmations] = (0, import_react21.useState)([]);
64612
+ const [npmResults, setNpmResults] = (0, import_react21.useState)([]);
64613
+ const [npmSearching, setNpmSearching] = (0, import_react21.useState)(false);
64614
+ const [installingPlugins, setInstallingPlugins] = (0, import_react21.useState)(/* @__PURE__ */ new Set());
64615
+ const [removingPlugins, setRemovingPlugins] = (0, import_react21.useState)(/* @__PURE__ */ new Set());
64616
+ const [installErrors, setInstallErrors] = (0, import_react21.useState)(/* @__PURE__ */ new Map());
64617
+ const lastFetchRef = (0, import_react21.useRef)(0);
64618
+ const pendingTabStates = (0, import_react21.useRef)(/* @__PURE__ */ new Map());
64619
+ const npmSearchTimer = (0, import_react21.useRef)(void 0);
64620
+ const connectedRef = (0, import_react21.useRef)(connected);
64621
+ const loadingRef = (0, import_react21.useRef)(loading);
64622
+ const pluginsRef = (0, import_react21.useRef)(plugins);
64623
+ (0, import_react21.useEffect)(() => {
64430
64624
  connectedRef.current = connected;
64431
64625
  loadingRef.current = loading;
64432
64626
  pluginsRef.current = plugins;
64433
64627
  }, [connected, loading, plugins]);
64434
- const loadPlugins = (0, import_react20.useCallback)(() => {
64628
+ const loadPlugins = (0, import_react21.useCallback)(() => {
64435
64629
  const now = Date.now();
64436
64630
  if (now - lastFetchRef.current < 200) return;
64437
64631
  lastFetchRef.current = now;
@@ -64464,7 +64658,72 @@ var App = () => {
64464
64658
  setPendingConfirmations,
64465
64659
  pendingTabStates
64466
64660
  });
64467
- (0, import_react20.useEffect)(() => {
64661
+ const handleSearchChange = (0, import_react21.useCallback)((query) => {
64662
+ setSearchQuery(query);
64663
+ clearTimeout(npmSearchTimer.current);
64664
+ if (!query.trim()) {
64665
+ setNpmResults([]);
64666
+ setNpmSearching(false);
64667
+ return;
64668
+ }
64669
+ setNpmSearching(true);
64670
+ npmSearchTimer.current = setTimeout(() => {
64671
+ searchPlugins(query).then((result) => {
64672
+ setNpmResults(result.results);
64673
+ }).catch(() => {
64674
+ setNpmResults([]);
64675
+ }).finally(() => {
64676
+ setNpmSearching(false);
64677
+ });
64678
+ }, 400);
64679
+ }, []);
64680
+ const handleInstall = (0, import_react21.useCallback)(
64681
+ (name) => {
64682
+ setInstallingPlugins((prev) => new Set(prev).add(name));
64683
+ setInstallErrors((prev) => {
64684
+ const next = new Map(prev);
64685
+ next.delete(name);
64686
+ return next;
64687
+ });
64688
+ installPlugin(name).then(() => {
64689
+ setInstallingPlugins((prev) => {
64690
+ const next = new Set(prev);
64691
+ next.delete(name);
64692
+ return next;
64693
+ });
64694
+ handleSearchChange("");
64695
+ }).catch((err) => {
64696
+ setInstallingPlugins((prev) => {
64697
+ const next = new Set(prev);
64698
+ next.delete(name);
64699
+ return next;
64700
+ });
64701
+ setInstallErrors((prev) => new Map(prev).set(name, err instanceof Error ? err.message : String(err)));
64702
+ });
64703
+ },
64704
+ [handleSearchChange]
64705
+ );
64706
+ const handleRemove = (0, import_react21.useCallback)((pluginName) => {
64707
+ setRemovingPlugins((prev) => new Set(prev).add(pluginName));
64708
+ removePlugin(pluginName).then(() => {
64709
+ setRemovingPlugins((prev) => {
64710
+ const next = new Set(prev);
64711
+ next.delete(pluginName);
64712
+ return next;
64713
+ });
64714
+ }).catch(() => {
64715
+ setRemovingPlugins((prev) => {
64716
+ const next = new Set(prev);
64717
+ next.delete(pluginName);
64718
+ return next;
64719
+ });
64720
+ });
64721
+ }, []);
64722
+ const handleUpdate = (0, import_react21.useCallback)((pluginName) => {
64723
+ updatePlugin(pluginName).catch(() => {
64724
+ });
64725
+ }, []);
64726
+ (0, import_react21.useEffect)(() => {
64468
64727
  void getConnectionState().then((result) => {
64469
64728
  setConnected(result.connected);
64470
64729
  setDisconnectReason(result.disconnectReason);
@@ -64502,7 +64761,7 @@ var App = () => {
64502
64761
  setFailedPlugins([]);
64503
64762
  setActiveTools(/* @__PURE__ */ new Set());
64504
64763
  setPendingConfirmations([]);
64505
- setToolFilter("");
64764
+ handleSearchChange("");
64506
64765
  rejectAllPending();
64507
64766
  }
64508
64767
  sendResponse({ ok: true });
@@ -64534,8 +64793,8 @@ var App = () => {
64534
64793
  };
64535
64794
  chrome.runtime.onMessage.addListener(listener);
64536
64795
  return () => chrome.runtime.onMessage.removeListener(listener);
64537
- }, [loadPlugins, handleNotification]);
64538
- const handleConfirmationRespond = (0, import_react20.useCallback)(
64796
+ }, [loadPlugins, handleNotification, handleSearchChange]);
64797
+ const handleConfirmationRespond = (0, import_react21.useCallback)(
64539
64798
  (id, decision, scope) => {
64540
64799
  clearConfirmationTimeout(id);
64541
64800
  sendConfirmationResponse(id, decision, scope);
@@ -64543,19 +64802,18 @@ var App = () => {
64543
64802
  },
64544
64803
  [clearConfirmationTimeout]
64545
64804
  );
64546
- const handleDenyAll = (0, import_react20.useCallback)(() => {
64805
+ const handleDenyAll = (0, import_react21.useCallback)(() => {
64547
64806
  for (const c of pendingConfirmations) {
64548
64807
  clearConfirmationTimeout(c.id);
64549
64808
  sendConfirmationResponse(c.id, "deny");
64550
64809
  }
64551
64810
  setPendingConfirmations([]);
64552
64811
  }, [pendingConfirmations, clearConfirmationTimeout]);
64553
- const totalTools = plugins.reduce((sum, p) => sum + p.tools.length, 0);
64554
64812
  const hasContent = plugins.length > 0 || failedPlugins.length > 0;
64555
- const showPlugins = !loading && connected && hasContent;
64556
- const showSearchBar = connected && !loading && totalTools > 5;
64557
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipObject.Provider, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "text-foreground flex min-h-screen flex-col", children: [
64558
- connected && pendingConfirmations.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
64813
+ const showPlugins = !loading && connected && (hasContent || !!searchQuery);
64814
+ const showSearchBar = connected && !loading;
64815
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TooltipObject.Provider, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "text-foreground flex min-h-screen flex-col", children: [
64816
+ connected && pendingConfirmations.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64559
64817
  ConfirmationDialog,
64560
64818
  {
64561
64819
  confirmations: pendingConfirmations,
@@ -64563,51 +64821,71 @@ var App = () => {
64563
64821
  onDenyAll: handleDenyAll
64564
64822
  }
64565
64823
  ),
64566
- showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pt-4 pr-5 pb-2 pl-4", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative", children: [
64567
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Search, { className: "text-muted-foreground pointer-events-none absolute top-1/2 left-2 h-4 w-4 -translate-y-1/2" }),
64568
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
64824
+ showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "pt-4 pr-5 pb-2 pl-4", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "relative", children: [
64825
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Search, { className: "text-muted-foreground pointer-events-none absolute top-1/2 left-2 h-4 w-4 -translate-y-1/2" }),
64826
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64569
64827
  Input,
64570
64828
  {
64571
- value: toolFilter,
64572
- onChange: (e) => setToolFilter(e.target.value),
64573
- placeholder: "Filter tools...",
64829
+ value: searchQuery,
64830
+ onChange: (e) => handleSearchChange(e.target.value),
64831
+ placeholder: "Search plugins and tools...",
64574
64832
  className: "pr-8 pl-9"
64575
64833
  }
64576
64834
  ),
64577
- toolFilter && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
64835
+ searchQuery && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64578
64836
  "button",
64579
64837
  {
64580
64838
  type: "button",
64581
- onClick: () => setToolFilter(""),
64839
+ onClick: () => handleSearchChange(""),
64582
64840
  className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer",
64583
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(X, { className: "h-4 w-4" })
64841
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(X, { className: "h-4 w-4" })
64584
64842
  }
64585
64843
  )
64586
64844
  ] }) }),
64587
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
64845
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64588
64846
  "main",
64589
64847
  {
64590
64848
  className: `flex-1 pr-5 pb-2 pl-4 ${showSearchBar ? "pt-2" : "pt-4"} ${showPlugins ? "" : "flex items-center justify-center"}`,
64591
- children: loading ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(LoadingState, {}) : !connected ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DisconnectedState, { reason: disconnectReason }) : !hasContent ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NoPluginsState, {}) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
64849
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(LoadingState, {}) : !connected ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DisconnectedState, { reason: disconnectReason }) : !hasContent && !searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(NoPluginsState, {}) : searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64850
+ SearchResults,
64851
+ {
64852
+ plugins,
64853
+ failedPlugins,
64854
+ activeTools,
64855
+ setPlugins,
64856
+ toolFilter: searchQuery,
64857
+ npmResults,
64858
+ npmSearching,
64859
+ installingPlugins,
64860
+ onInstall: handleInstall,
64861
+ installErrors,
64862
+ onUpdate: handleUpdate,
64863
+ onRemove: handleRemove,
64864
+ removingPlugins
64865
+ }
64866
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64592
64867
  PluginList,
64593
64868
  {
64594
64869
  plugins,
64595
64870
  failedPlugins,
64596
64871
  activeTools,
64597
64872
  setPlugins,
64598
- toolFilter
64873
+ toolFilter: "",
64874
+ onUpdate: handleUpdate,
64875
+ onRemove: handleRemove,
64876
+ removingPlugins
64599
64877
  }
64600
64878
  )
64601
64879
  }
64602
64880
  ),
64603
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Footer, {})
64881
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Footer, {})
64604
64882
  ] }) });
64605
64883
  };
64606
64884
 
64607
64885
  // src/side-panel/components/ErrorBoundary.tsx
64608
- var import_react21 = __toESM(require_react(), 1);
64609
- var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
64610
- var ErrorBoundary = class extends import_react21.Component {
64886
+ var import_react22 = __toESM(require_react(), 1);
64887
+ var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
64888
+ var ErrorBoundary = class extends import_react22.Component {
64611
64889
  state = { hasError: false };
64612
64890
  static getDerivedStateFromError() {
64613
64891
  return { hasError: true };
@@ -64617,10 +64895,10 @@ var ErrorBoundary = class extends import_react21.Component {
64617
64895
  }
64618
64896
  render() {
64619
64897
  if (this.state.hasError) {
64620
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex min-h-screen flex-col items-center justify-center px-4 py-16 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(AlertComponent, { status: "error", className: "max-w-xs", children: [
64621
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AlertComponent.Title, { children: "Something went wrong" }),
64622
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AlertComponent.Description, { children: "The side panel encountered an unexpected error." }),
64623
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Button, { variant: "default", size: "sm", className: "mt-4 w-full", onClick: () => window.location.reload(), children: "Reload" })
64898
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex min-h-screen flex-col items-center justify-center px-4 py-16 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(AlertComponent, { status: "error", className: "max-w-xs", children: [
64899
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AlertComponent.Title, { children: "Something went wrong" }),
64900
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AlertComponent.Description, { children: "The side panel encountered an unexpected error." }),
64901
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { variant: "default", size: "sm", className: "mt-4 w-full", onClick: () => window.location.reload(), children: "Reload" })
64624
64902
  ] }) });
64625
64903
  }
64626
64904
  return this.props.children;
@@ -64628,16 +64906,16 @@ var ErrorBoundary = class extends import_react21.Component {
64628
64906
  };
64629
64907
 
64630
64908
  // src/side-panel/index.tsx
64631
- var import_react22 = __toESM(require_react(), 1);
64909
+ var import_react23 = __toESM(require_react(), 1);
64632
64910
  var import_client = __toESM(require_client(), 1);
64633
- var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
64911
+ var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
64634
64912
  var rootEl = document.getElementById("root");
64635
64913
  if (!rootEl) {
64636
64914
  throw new Error("Root element not found");
64637
64915
  }
64638
64916
  var root = (0, import_client.createRoot)(rootEl);
64639
64917
  root.render(
64640
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react22.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(App, {}) }) })
64918
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react23.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(App, {}) }) })
64641
64919
  );
64642
64920
  /*! Bundled license information:
64643
64921