@opentabs-dev/browser-extension 0.0.37 → 0.0.39

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 +34 -2
  5. package/dist/side-panel/bridge.d.ts.map +1 -1
  6. package/dist/side-panel/bridge.js +13 -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 +28 -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 +3 -0
  33. package/dist/side-panel/components/retro/Menu.js.map +1 -1
  34. package/dist/side-panel/side-panel.js +522 -249
  35. package/dist/side-panel/styles.css +1 -1
  36. package/package.json +1 -1
@@ -51481,6 +51481,7 @@ 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((tool) => matchesTool(tool, filterLower));
51484
51485
  var REQUEST_TIMEOUT_MS = 3e4;
51485
51486
  var pendingRequests = /* @__PURE__ */ new Map();
51486
51487
  var rejectAllPending = () => {
@@ -51542,6 +51543,10 @@ var getConnectionState = () => new Promise((resolve) => {
51542
51543
  var fetchConfigState = () => sendRequest("config.getState");
51543
51544
  var setToolEnabled = (plugin, tool, enabled) => sendRequest("config.setToolEnabled", { plugin, tool, enabled });
51544
51545
  var setAllToolsEnabled = (plugin, enabled) => sendRequest("config.setAllToolsEnabled", { plugin, enabled });
51546
+ var searchPlugins = (query) => sendRequest("plugin.search", { query });
51547
+ var installPlugin = (name) => sendRequest("plugin.install", { name });
51548
+ var removePlugin = (name) => sendRequest("plugin.remove", { name });
51549
+ var updatePlugin = (name) => sendRequest("plugin.updateFromRegistry", { name });
51545
51550
  var sendConfirmationResponse = (id, decision, scope) => {
51546
51551
  chrome.runtime.sendMessage({
51547
51552
  type: "sp:confirmationResponse",
@@ -59730,6 +59735,7 @@ var Trigger = DropdownMenuTrigger;
59730
59735
  var Portal22 = DropdownMenuPortal;
59731
59736
  var Content22 = DropdownMenuContent;
59732
59737
  var Item22 = DropdownMenuItem;
59738
+ var Separator2 = DropdownMenuSeparator;
59733
59739
 
59734
59740
  // src/side-panel/components/retro/Menu.tsx
59735
59741
  var React37 = __toESM(require_react(), 1);
@@ -59758,10 +59764,13 @@ var MenuItem2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE_
59758
59764
  }
59759
59765
  ));
59760
59766
  MenuItem2.displayName = Item22.displayName;
59767
+ 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 }));
59768
+ MenuSeparator2.displayName = Separator2.displayName;
59761
59769
  var MenuObject = Object.assign(Menu2, {
59762
59770
  Trigger: MenuTrigger,
59763
59771
  Content: MenuContent2,
59764
- Item: MenuItem2
59772
+ Item: MenuItem2,
59773
+ Separator: MenuSeparator2
59765
59774
  });
59766
59775
 
59767
59776
  // ../../node_modules/@radix-ui/react-progress/dist/index.mjs
@@ -60005,6 +60014,7 @@ var COUNTDOWN_POLL_INTERVAL_MS = 200;
60005
60014
  var TOOL_INVOCATION_TIMEOUT_MS = 5 * 60 * 1e3;
60006
60015
 
60007
60016
  // ../../node_modules/lucide-react/dist/esm/lucide-react.js
60017
+ init_ellipsis();
60008
60018
  init_triangle_alert();
60009
60019
  init_arrow_up();
60010
60020
  init_chevron_down();
@@ -60268,7 +60278,7 @@ var DisconnectedState = ({ reason }) => {
60268
60278
  var NoPluginsState = () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(EmptyComponent.Content, { children: [
60269
60279
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent.Title, { children: "No Plugins Installed" }),
60270
60280
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent.Separator, {}),
60271
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent.Description, { children: "Manage plugins with:" }),
60281
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyComponent.Description, { children: "Search for plugins above or install via CLI:" }),
60272
60282
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("code", { className: "rounded border-2 px-3 py-2 font-mono text-sm", children: "opentabs plugin" })
60273
60283
  ] }) });
60274
60284
  var LoadingState = () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Loader2, { size: "md" });
@@ -60829,12 +60839,74 @@ var PluginIcon = ({
60829
60839
  ] });
60830
60840
  };
60831
60841
 
60832
- // ../../node_modules/@radix-ui/react-accordion/dist/index.mjs
60842
+ // src/side-panel/components/PluginMenu.tsx
60833
60843
  var import_react14 = __toESM(require_react(), 1);
60844
+ var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
60845
+ var CONFIRM_DURATION_MS = 3e3;
60846
+ var PluginMenu = ({ plugin, onUpdate, onRemove, updating, removing, className }) => {
60847
+ const [confirmPending, setConfirmPending] = (0, import_react14.useState)(false);
60848
+ const confirmTimerRef = (0, import_react14.useRef)(void 0);
60849
+ (0, import_react14.useEffect)(() => () => clearTimeout(confirmTimerRef.current), []);
60850
+ if (plugin.source === "local") return null;
60851
+ const handleUninstallClick = () => {
60852
+ if (confirmPending) {
60853
+ clearTimeout(confirmTimerRef.current);
60854
+ setConfirmPending(false);
60855
+ onRemove();
60856
+ } else {
60857
+ setConfirmPending(true);
60858
+ confirmTimerRef.current = setTimeout(() => setConfirmPending(false), CONFIRM_DURATION_MS);
60859
+ }
60860
+ };
60861
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60862
+ "div",
60863
+ {
60864
+ className,
60865
+ onClick: (e) => e.stopPropagation(),
60866
+ onKeyDown: (e) => {
60867
+ if (e.key === "Enter" || e.key === " ") e.stopPropagation();
60868
+ },
60869
+ role: "presentation",
60870
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(MenuObject, { children: [
60871
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MenuObject.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60872
+ "button",
60873
+ {
60874
+ className: "hover:bg-muted/50 flex h-6 w-6 items-center justify-center rounded",
60875
+ "aria-label": "Plugin options",
60876
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Ellipsis, { className: "h-4 w-4" })
60877
+ }
60878
+ ) }),
60879
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(MenuObject.Content, { align: "end", children: [
60880
+ plugin.update && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(MenuObject.Item, { onClick: onUpdate, className: "flex items-center gap-2", children: [
60881
+ updating && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Loader2, { size: "sm" }),
60882
+ "Update to v",
60883
+ plugin.update.latestVersion
60884
+ ] }),
60885
+ plugin.update && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MenuObject.Separator, {}),
60886
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
60887
+ MenuObject.Item,
60888
+ {
60889
+ onClick: handleUninstallClick,
60890
+ className: "text-destructive hover:text-destructive data-[highlighted]:text-destructive flex items-center gap-2",
60891
+ children: [
60892
+ removing && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Loader2, { size: "sm" }),
60893
+ confirmPending ? "Confirm?" : "Uninstall"
60894
+ ]
60895
+ }
60896
+ )
60897
+ ] })
60898
+ ] })
60899
+ }
60900
+ );
60901
+ };
60902
+ PluginMenu.displayName = "PluginMenu";
60903
+
60904
+ // ../../node_modules/@radix-ui/react-accordion/dist/index.mjs
60905
+ var import_react15 = __toESM(require_react(), 1);
60834
60906
 
60835
60907
  // ../../node_modules/@radix-ui/react-collapsible/dist/index.mjs
60836
60908
  var React42 = __toESM(require_react(), 1);
60837
- var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
60909
+ var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
60838
60910
  var COLLAPSIBLE_NAME = "Collapsible";
60839
60911
  var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
60840
60912
  var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
@@ -60854,7 +60926,7 @@ var Collapsible = React42.forwardRef(
60854
60926
  onChange: onOpenChange,
60855
60927
  caller: COLLAPSIBLE_NAME
60856
60928
  });
60857
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60929
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
60858
60930
  CollapsibleProvider,
60859
60931
  {
60860
60932
  scope: __scopeCollapsible,
@@ -60862,7 +60934,7 @@ var Collapsible = React42.forwardRef(
60862
60934
  contentId: useId(),
60863
60935
  open,
60864
60936
  onOpenToggle: React42.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
60865
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60937
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
60866
60938
  Primitive.div,
60867
60939
  {
60868
60940
  "data-state": getState(open),
@@ -60881,7 +60953,7 @@ var CollapsibleTrigger = React42.forwardRef(
60881
60953
  (props, forwardedRef) => {
60882
60954
  const { __scopeCollapsible, ...triggerProps } = props;
60883
60955
  const context = useCollapsibleContext(TRIGGER_NAME2, __scopeCollapsible);
60884
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
60956
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
60885
60957
  Primitive.button,
60886
60958
  {
60887
60959
  type: "button",
@@ -60903,7 +60975,7 @@ var CollapsibleContent = React42.forwardRef(
60903
60975
  (props, forwardedRef) => {
60904
60976
  const { forceMount, ...contentProps } = props;
60905
60977
  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 }) });
60978
+ 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
60979
  }
60908
60980
  );
60909
60981
  CollapsibleContent.displayName = CONTENT_NAME4;
@@ -60943,7 +61015,7 @@ var CollapsibleContentImpl = React42.forwardRef((props, forwardedRef) => {
60943
61015
  setIsPresent(present);
60944
61016
  }
60945
61017
  }, [context.open, present]);
60946
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
61018
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
60947
61019
  Primitive.div,
60948
61020
  {
60949
61021
  "data-state": getState(context.open),
@@ -60969,7 +61041,7 @@ var Trigger2 = CollapsibleTrigger;
60969
61041
  var Content3 = CollapsibleContent;
60970
61042
 
60971
61043
  // ../../node_modules/@radix-ui/react-accordion/dist/index.mjs
60972
- var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
61044
+ var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
60973
61045
  var ACCORDION_NAME = "Accordion";
60974
61046
  var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
60975
61047
  var [Collection3, useCollection3, createCollectionScope3] = createCollection(ACCORDION_NAME);
@@ -60978,12 +61050,12 @@ var [createAccordionContext, createAccordionScope] = createContextScope(ACCORDIO
60978
61050
  createCollapsibleScope
60979
61051
  ]);
60980
61052
  var useCollapsibleScope = createCollapsibleScope();
60981
- var Accordion = import_react14.default.forwardRef(
61053
+ var Accordion = import_react15.default.forwardRef(
60982
61054
  (props, forwardedRef) => {
60983
61055
  const { type, ...accordionProps } = props;
60984
61056
  const singleProps = accordionProps;
60985
61057
  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 }) });
61058
+ 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
61059
  }
60988
61060
  );
60989
61061
  Accordion.displayName = ACCORDION_NAME;
@@ -60992,7 +61064,7 @@ var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccor
60992
61064
  ACCORDION_NAME,
60993
61065
  { collapsible: false }
60994
61066
  );
60995
- var AccordionImplSingle = import_react14.default.forwardRef(
61067
+ var AccordionImplSingle = import_react15.default.forwardRef(
60996
61068
  (props, forwardedRef) => {
60997
61069
  const {
60998
61070
  value: valueProp,
@@ -61008,19 +61080,19 @@ var AccordionImplSingle = import_react14.default.forwardRef(
61008
61080
  onChange: onValueChange,
61009
61081
  caller: ACCORDION_NAME
61010
61082
  });
61011
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61083
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61012
61084
  AccordionValueProvider,
61013
61085
  {
61014
61086
  scope: props.__scopeAccordion,
61015
- value: import_react14.default.useMemo(() => value ? [value] : [], [value]),
61087
+ value: import_react15.default.useMemo(() => value ? [value] : [], [value]),
61016
61088
  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 }) })
61089
+ onItemClose: import_react15.default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
61090
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
61019
61091
  }
61020
61092
  );
61021
61093
  }
61022
61094
  );
61023
- var AccordionImplMultiple = import_react14.default.forwardRef((props, forwardedRef) => {
61095
+ var AccordionImplMultiple = import_react15.default.forwardRef((props, forwardedRef) => {
61024
61096
  const {
61025
61097
  value: valueProp,
61026
61098
  defaultValue,
@@ -61034,30 +61106,30 @@ var AccordionImplMultiple = import_react14.default.forwardRef((props, forwardedR
61034
61106
  onChange: onValueChange,
61035
61107
  caller: ACCORDION_NAME
61036
61108
  });
61037
- const handleItemOpen = import_react14.default.useCallback(
61109
+ const handleItemOpen = import_react15.default.useCallback(
61038
61110
  (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
61039
61111
  [setValue]
61040
61112
  );
61041
- const handleItemClose = import_react14.default.useCallback(
61113
+ const handleItemClose = import_react15.default.useCallback(
61042
61114
  (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
61043
61115
  [setValue]
61044
61116
  );
61045
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61117
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61046
61118
  AccordionValueProvider,
61047
61119
  {
61048
61120
  scope: props.__scopeAccordion,
61049
61121
  value,
61050
61122
  onItemOpen: handleItemOpen,
61051
61123
  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 }) })
61124
+ 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
61125
  }
61054
61126
  );
61055
61127
  });
61056
61128
  var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);
61057
- var AccordionImpl = import_react14.default.forwardRef(
61129
+ var AccordionImpl = import_react15.default.forwardRef(
61058
61130
  (props, forwardedRef) => {
61059
61131
  const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
61060
- const accordionRef = import_react14.default.useRef(null);
61132
+ const accordionRef = import_react15.default.useRef(null);
61061
61133
  const composedRefs = useComposedRefs(accordionRef, forwardedRef);
61062
61134
  const getItems = useCollection3(__scopeAccordion);
61063
61135
  const direction = useDirection(dir);
@@ -61124,14 +61196,14 @@ var AccordionImpl = import_react14.default.forwardRef(
61124
61196
  const clampedIndex = nextIndex % triggerCount;
61125
61197
  triggerCollection[clampedIndex].ref.current?.focus();
61126
61198
  });
61127
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61199
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61128
61200
  AccordionImplProvider,
61129
61201
  {
61130
61202
  scope: __scopeAccordion,
61131
61203
  disabled,
61132
61204
  direction: dir,
61133
61205
  orientation,
61134
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Collection3.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61206
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Collection3.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61135
61207
  Primitive.div,
61136
61208
  {
61137
61209
  ...accordionProps,
@@ -61146,7 +61218,7 @@ var AccordionImpl = import_react14.default.forwardRef(
61146
61218
  );
61147
61219
  var ITEM_NAME4 = "AccordionItem";
61148
61220
  var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME4);
61149
- var AccordionItem = import_react14.default.forwardRef(
61221
+ var AccordionItem = import_react15.default.forwardRef(
61150
61222
  (props, forwardedRef) => {
61151
61223
  const { __scopeAccordion, value, ...accordionItemProps } = props;
61152
61224
  const accordionContext = useAccordionContext(ITEM_NAME4, __scopeAccordion);
@@ -61155,14 +61227,14 @@ var AccordionItem = import_react14.default.forwardRef(
61155
61227
  const triggerId = useId();
61156
61228
  const open = value && valueContext.value.includes(value) || false;
61157
61229
  const disabled = accordionContext.disabled || props.disabled;
61158
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61230
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61159
61231
  AccordionItemProvider,
61160
61232
  {
61161
61233
  scope: __scopeAccordion,
61162
61234
  open,
61163
61235
  disabled,
61164
61236
  triggerId,
61165
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61237
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61166
61238
  Root5,
61167
61239
  {
61168
61240
  "data-orientation": accordionContext.orientation,
@@ -61187,12 +61259,12 @@ var AccordionItem = import_react14.default.forwardRef(
61187
61259
  );
61188
61260
  AccordionItem.displayName = ITEM_NAME4;
61189
61261
  var HEADER_NAME = "AccordionHeader";
61190
- var AccordionHeader = import_react14.default.forwardRef(
61262
+ var AccordionHeader = import_react15.default.forwardRef(
61191
61263
  (props, forwardedRef) => {
61192
61264
  const { __scopeAccordion, ...headerProps } = props;
61193
61265
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
61194
61266
  const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
61195
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61267
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61196
61268
  Primitive.h3,
61197
61269
  {
61198
61270
  "data-orientation": accordionContext.orientation,
@@ -61206,14 +61278,14 @@ var AccordionHeader = import_react14.default.forwardRef(
61206
61278
  );
61207
61279
  AccordionHeader.displayName = HEADER_NAME;
61208
61280
  var TRIGGER_NAME3 = "AccordionTrigger";
61209
- var AccordionTrigger = import_react14.default.forwardRef(
61281
+ var AccordionTrigger = import_react15.default.forwardRef(
61210
61282
  (props, forwardedRef) => {
61211
61283
  const { __scopeAccordion, ...triggerProps } = props;
61212
61284
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
61213
61285
  const itemContext = useAccordionItemContext(TRIGGER_NAME3, __scopeAccordion);
61214
61286
  const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME3, __scopeAccordion);
61215
61287
  const collapsibleScope = useCollapsibleScope(__scopeAccordion);
61216
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Collection3.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61288
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Collection3.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61217
61289
  Trigger2,
61218
61290
  {
61219
61291
  "aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
@@ -61228,13 +61300,13 @@ var AccordionTrigger = import_react14.default.forwardRef(
61228
61300
  );
61229
61301
  AccordionTrigger.displayName = TRIGGER_NAME3;
61230
61302
  var CONTENT_NAME5 = "AccordionContent";
61231
- var AccordionContent = import_react14.default.forwardRef(
61303
+ var AccordionContent = import_react15.default.forwardRef(
61232
61304
  (props, forwardedRef) => {
61233
61305
  const { __scopeAccordion, ...contentProps } = props;
61234
61306
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
61235
61307
  const itemContext = useAccordionItemContext(CONTENT_NAME5, __scopeAccordion);
61236
61308
  const collapsibleScope = useCollapsibleScope(__scopeAccordion);
61237
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
61309
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61238
61310
  Content3,
61239
61311
  {
61240
61312
  role: "region",
@@ -61264,9 +61336,9 @@ var Content23 = AccordionContent;
61264
61336
 
61265
61337
  // src/side-panel/components/retro/Accordion.tsx
61266
61338
  var React44 = __toESM(require_react(), 1);
61267
- var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
61339
+ var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
61268
61340
  var Accordion2 = Root23;
61269
- var AccordionItem2 = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61341
+ var AccordionItem2 = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
61270
61342
  Item3,
61271
61343
  {
61272
61344
  ref,
@@ -61278,13 +61350,13 @@ var AccordionItem2 = React44.forwardRef(({ className, ...props }, ref) => /* @__
61278
61350
  }
61279
61351
  ));
61280
61352
  AccordionItem2.displayName = Item3.displayName;
61281
- var AccordionContent2 = React44.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
61353
+ var AccordionContent2 = React44.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
61282
61354
  Content23,
61283
61355
  {
61284
61356
  ref,
61285
61357
  className: "data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up bg-card text-card-foreground overflow-hidden font-sans",
61286
61358
  ...props,
61287
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn(className), children })
61359
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn(className), children })
61288
61360
  }
61289
61361
  ));
61290
61362
  AccordionContent2.displayName = Content23.displayName;
@@ -61294,7 +61366,7 @@ var AccordionComponent = Object.assign(Accordion2, {
61294
61366
  });
61295
61367
 
61296
61368
  // src/side-panel/components/retro/Alert.tsx
61297
- var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
61369
+ var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
61298
61370
  var alertVariants = cva("relative w-full rounded border-2 p-4", {
61299
61371
  variants: {
61300
61372
  variant: {
@@ -61312,11 +61384,11 @@ var alertVariants = cva("relative w-full rounded border-2 p-4", {
61312
61384
  variant: "default"
61313
61385
  }
61314
61386
  });
61315
- var Alert = ({ className, variant, status, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { role: "alert", className: cn(alertVariants({ variant, status }), className), ...props });
61387
+ var Alert = ({ className, variant, status, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { role: "alert", className: cn(alertVariants({ variant, status }), className), ...props });
61316
61388
  Alert.displayName = "Alert";
61317
- var AlertTitle = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { as: "h5", className: cn(className), ...props });
61389
+ var AlertTitle = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { as: "h5", className: cn(className), ...props });
61318
61390
  AlertTitle.displayName = "AlertTitle";
61319
- var AlertDescription = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("text-muted-foreground", className), ...props });
61391
+ var AlertDescription = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("text-muted-foreground", className), ...props });
61320
61392
  AlertDescription.displayName = "AlertDescription";
61321
61393
  var AlertComponent = Object.assign(Alert, {
61322
61394
  Title: AlertTitle,
@@ -61324,7 +61396,7 @@ var AlertComponent = Object.assign(Alert, {
61324
61396
  });
61325
61397
 
61326
61398
  // src/side-panel/components/retro/Badge.tsx
61327
- var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
61399
+ var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
61328
61400
  var badgeVariants = cva("inline-block rounded font-medium leading-none", {
61329
61401
  variants: {
61330
61402
  variant: {
@@ -61341,7 +61413,7 @@ var badgeVariants = cva("inline-block rounded font-medium leading-none", {
61341
61413
  size: "md"
61342
61414
  }
61343
61415
  });
61344
- var Badge2 = ({ className, variant, size: size4, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: cn(badgeVariants({ variant, size: size4 }), className), ...props });
61416
+ var Badge2 = ({ className, variant, size: size4, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn(badgeVariants({ variant, size: size4 }), className), ...props });
61345
61417
  Badge2.displayName = "Badge";
61346
61418
 
61347
61419
  // ../../node_modules/@radix-ui/react-switch/dist/index.mjs
@@ -61361,7 +61433,7 @@ function usePrevious(value) {
61361
61433
  }
61362
61434
 
61363
61435
  // ../../node_modules/@radix-ui/react-switch/dist/index.mjs
61364
- var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
61436
+ var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
61365
61437
  var SWITCH_NAME = "Switch";
61366
61438
  var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
61367
61439
  var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
@@ -61389,8 +61461,8 @@ var Switch = React46.forwardRef(
61389
61461
  onChange: onCheckedChange,
61390
61462
  caller: SWITCH_NAME
61391
61463
  });
61392
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
61393
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
61464
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
61465
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61394
61466
  Primitive.button,
61395
61467
  {
61396
61468
  type: "button",
@@ -61412,7 +61484,7 @@ var Switch = React46.forwardRef(
61412
61484
  })
61413
61485
  }
61414
61486
  ),
61415
- isFormControl && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
61487
+ isFormControl && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61416
61488
  SwitchBubbleInput,
61417
61489
  {
61418
61490
  control: button,
@@ -61435,7 +61507,7 @@ var SwitchThumb = React46.forwardRef(
61435
61507
  (props, forwardedRef) => {
61436
61508
  const { __scopeSwitch, ...thumbProps } = props;
61437
61509
  const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
61438
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
61510
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61439
61511
  Primitive.span,
61440
61512
  {
61441
61513
  "data-state": getState3(context.checked),
@@ -61475,7 +61547,7 @@ var SwitchBubbleInput = React46.forwardRef(
61475
61547
  input.dispatchEvent(event);
61476
61548
  }
61477
61549
  }, [prevChecked, checked, bubbles]);
61478
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
61550
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61479
61551
  "input",
61480
61552
  {
61481
61553
  type: "checkbox",
@@ -61504,8 +61576,8 @@ var Root6 = Switch;
61504
61576
  var Thumb = SwitchThumb;
61505
61577
 
61506
61578
  // 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)(
61579
+ var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
61580
+ var Switch2 = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
61509
61581
  Root6,
61510
61582
  {
61511
61583
  className: cn(
@@ -61513,7 +61585,7 @@ var Switch2 = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtim
61513
61585
  className
61514
61586
  ),
61515
61587
  ...props,
61516
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
61588
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
61517
61589
  Thumb,
61518
61590
  {
61519
61591
  className: cn(
@@ -61529,12 +61601,12 @@ var React49 = __toESM(require_react(), 1);
61529
61601
 
61530
61602
  // ../../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.mjs
61531
61603
  var React47 = __toESM(require_react(), 1);
61532
- var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
61604
+ var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
61533
61605
  var SLOTTABLE_IDENTIFIER5 = Symbol("radix.slottable");
61534
61606
  // @__NO_SIDE_EFFECTS__
61535
61607
  function createSlottable(ownerName) {
61536
61608
  const Slottable2 = ({ children }) => {
61537
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children });
61609
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children });
61538
61610
  };
61539
61611
  Slottable2.displayName = `${ownerName}.Slottable`;
61540
61612
  Slottable2.__radixId = SLOTTABLE_IDENTIFIER5;
@@ -61543,7 +61615,7 @@ function createSlottable(ownerName) {
61543
61615
 
61544
61616
  // ../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
61545
61617
  var React48 = __toESM(require_react(), 1);
61546
- var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
61618
+ var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
61547
61619
  var VISUALLY_HIDDEN_STYLES = Object.freeze({
61548
61620
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
61549
61621
  position: "absolute",
@@ -61560,7 +61632,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
61560
61632
  var NAME2 = "VisuallyHidden";
61561
61633
  var VisuallyHidden = React48.forwardRef(
61562
61634
  (props, forwardedRef) => {
61563
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
61635
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61564
61636
  Primitive.span,
61565
61637
  {
61566
61638
  ...props,
@@ -61574,7 +61646,7 @@ VisuallyHidden.displayName = NAME2;
61574
61646
  var Root7 = VisuallyHidden;
61575
61647
 
61576
61648
  // ../../node_modules/@radix-ui/react-tooltip/dist/index.mjs
61577
- var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
61649
+ var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
61578
61650
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
61579
61651
  createPopperScope
61580
61652
  ]);
@@ -61598,7 +61670,7 @@ var TooltipProvider = (props) => {
61598
61670
  const skipDelayTimer = skipDelayTimerRef.current;
61599
61671
  return () => window.clearTimeout(skipDelayTimer);
61600
61672
  }, []);
61601
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61673
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
61602
61674
  TooltipProviderContextProvider,
61603
61675
  {
61604
61676
  scope: __scopeTooltip,
@@ -61689,7 +61761,7 @@ var Tooltip = (props) => {
61689
61761
  }
61690
61762
  };
61691
61763
  }, []);
61692
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Root2, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61764
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Root2, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
61693
61765
  TooltipContextProvider,
61694
61766
  {
61695
61767
  scope: __scopeTooltip,
@@ -61733,7 +61805,7 @@ var TooltipTrigger = React49.forwardRef(
61733
61805
  React49.useEffect(() => {
61734
61806
  return () => document.removeEventListener("pointerup", handlePointerUp);
61735
61807
  }, [handlePointerUp]);
61736
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61808
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
61737
61809
  Primitive.button,
61738
61810
  {
61739
61811
  "aria-describedby": context.open ? context.contentId : void 0,
@@ -61775,7 +61847,7 @@ var [PortalProvider2, usePortalContext2] = createTooltipContext(PORTAL_NAME4, {
61775
61847
  var TooltipPortal = (props) => {
61776
61848
  const { __scopeTooltip, forceMount, children, container } = props;
61777
61849
  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 }) }) });
61850
+ 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
61851
  };
61780
61852
  TooltipPortal.displayName = PORTAL_NAME4;
61781
61853
  var CONTENT_NAME6 = "TooltipContent";
@@ -61784,7 +61856,7 @@ var TooltipContent = React49.forwardRef(
61784
61856
  const portalContext = usePortalContext2(CONTENT_NAME6, props.__scopeTooltip);
61785
61857
  const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
61786
61858
  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 }) });
61859
+ 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
61860
  }
61789
61861
  );
61790
61862
  var TooltipContentHoverable = React49.forwardRef((props, forwardedRef) => {
@@ -61846,7 +61918,7 @@ var TooltipContentHoverable = React49.forwardRef((props, forwardedRef) => {
61846
61918
  return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
61847
61919
  }
61848
61920
  }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
61849
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContentImpl, { ...props, ref: composedRefs });
61921
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipContentImpl, { ...props, ref: composedRefs });
61850
61922
  });
61851
61923
  var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
61852
61924
  var Slottable = createSlottable("TooltipContent");
@@ -61877,7 +61949,7 @@ var TooltipContentImpl = React49.forwardRef(
61877
61949
  return () => window.removeEventListener("scroll", handleScroll2, { capture: true });
61878
61950
  }
61879
61951
  }, [context.trigger, onClose]);
61880
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
61952
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
61881
61953
  DismissableLayer,
61882
61954
  {
61883
61955
  asChild: true,
@@ -61886,7 +61958,7 @@ var TooltipContentImpl = React49.forwardRef(
61886
61958
  onPointerDownOutside,
61887
61959
  onFocusOutside: (event) => event.preventDefault(),
61888
61960
  onDismiss: onClose,
61889
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
61961
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
61890
61962
  Content,
61891
61963
  {
61892
61964
  "data-state": context.stateAttribute,
@@ -61905,8 +61977,8 @@ var TooltipContentImpl = React49.forwardRef(
61905
61977
  }
61906
61978
  },
61907
61979
  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 }) })
61980
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Slottable, { children }),
61981
+ /* @__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
61982
  ]
61911
61983
  }
61912
61984
  )
@@ -61924,7 +61996,7 @@ var TooltipArrow = React49.forwardRef(
61924
61996
  ARROW_NAME4,
61925
61997
  __scopeTooltip
61926
61998
  );
61927
- return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
61999
+ return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
61928
62000
  }
61929
62001
  );
61930
62002
  TooltipArrow.displayName = ARROW_NAME4;
@@ -62051,7 +62123,7 @@ var Content24 = TooltipContent;
62051
62123
 
62052
62124
  // src/side-panel/components/retro/Tooltip.tsx
62053
62125
  var React50 = __toESM(require_react(), 1);
62054
- var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
62126
+ var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
62055
62127
  var tooltipContentVariants = cva(
62056
62128
  "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
62129
  {
@@ -62070,7 +62142,7 @@ var tooltipContentVariants = cva(
62070
62142
  var TooltipProvider2 = Provider;
62071
62143
  var Tooltip2 = Root33;
62072
62144
  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)(
62145
+ 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
62146
  Content24,
62075
62147
  {
62076
62148
  ref,
@@ -62092,7 +62164,7 @@ var TooltipObject = Object.assign(Tooltip2, {
62092
62164
  });
62093
62165
 
62094
62166
  // ../../node_modules/lucide-react/dist/esm/DynamicIcon.js
62095
- var import_react15 = __toESM(require_react());
62167
+ var import_react16 = __toESM(require_react());
62096
62168
 
62097
62169
  // ../../node_modules/lucide-react/dist/esm/dynamicIconImports.js
62098
62170
  var dynamicIconImports = {
@@ -64037,10 +64109,10 @@ async function getIconNode(name) {
64037
64109
  const icon = await dynamicIconImports[name]();
64038
64110
  return icon.__iconNode;
64039
64111
  }
64040
- var DynamicIcon = (0, import_react15.forwardRef)(
64112
+ var DynamicIcon = (0, import_react16.forwardRef)(
64041
64113
  ({ name, fallback: Fallback, ...props }, ref) => {
64042
- const [iconNode, setIconNode] = (0, import_react15.useState)();
64043
- (0, import_react15.useEffect)(() => {
64114
+ const [iconNode, setIconNode] = (0, import_react16.useState)();
64115
+ (0, import_react16.useEffect)(() => {
64044
64116
  getIconNode(name).then(setIconNode).catch((error) => {
64045
64117
  console.error(error);
64046
64118
  });
@@ -64049,9 +64121,9 @@ var DynamicIcon = (0, import_react15.forwardRef)(
64049
64121
  if (Fallback == null) {
64050
64122
  return null;
64051
64123
  }
64052
- return (0, import_react15.createElement)(Fallback);
64124
+ return (0, import_react16.createElement)(Fallback);
64053
64125
  }
64054
- return (0, import_react15.createElement)(Icon, {
64126
+ return (0, import_react16.createElement)(Icon, {
64055
64127
  ref,
64056
64128
  ...props,
64057
64129
  iconNode
@@ -64060,19 +64132,19 @@ var DynamicIcon = (0, import_react15.forwardRef)(
64060
64132
  );
64061
64133
 
64062
64134
  // 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)(
64135
+ var import_react17 = __toESM(require_react(), 1);
64136
+ var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
64137
+ var FallbackIcon = () => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Wrench, { className: "text-muted-foreground h-3 w-3" });
64138
+ var ToolIcon = ({ icon, className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
64067
64139
  "div",
64068
64140
  {
64069
64141
  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, {})
64142
+ 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
64143
  }
64072
64144
  );
64073
64145
 
64074
64146
  // src/side-panel/components/ToolRow.tsx
64075
- var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
64147
+ var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
64076
64148
  var ToolRow = ({
64077
64149
  name,
64078
64150
  displayName,
@@ -64081,19 +64153,19 @@ var ToolRow = ({
64081
64153
  enabled,
64082
64154
  active,
64083
64155
  onToggle
64084
- }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
64156
+ }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
64085
64157
  "div",
64086
64158
  {
64087
64159
  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
64160
  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 })
64161
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ToolIcon, { icon }),
64162
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(TooltipObject, { children: [
64163
+ /* @__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 }) }) }),
64164
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipObject.Content, { children: description })
64093
64165
  ] }),
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)(
64166
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
64167
+ active && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Loader2, { size: "sm", count: 2, duration: 0.4, delayStep: 80 }),
64168
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
64097
64169
  Switch2,
64098
64170
  {
64099
64171
  checked: enabled,
@@ -64108,18 +64180,22 @@ var ToolRow = ({
64108
64180
  );
64109
64181
 
64110
64182
  // src/side-panel/components/PluginCard.tsx
64111
- var import_react17 = __toESM(require_react(), 1);
64112
- var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
64183
+ var import_react18 = __toESM(require_react(), 1);
64184
+ var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
64113
64185
  var PluginCard = ({
64114
64186
  plugin,
64115
64187
  activeTools,
64116
64188
  setPlugins,
64117
- toolFilter
64189
+ toolFilter,
64190
+ onUpdate,
64191
+ onRemove,
64192
+ updatingPlugin,
64193
+ removingPlugin
64118
64194
  }) => {
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), []);
64195
+ const [toggleError, setToggleError] = (0, import_react18.useState)(null);
64196
+ const errorTimerRef = (0, import_react18.useRef)(void 0);
64197
+ const toggleCounter = (0, import_react18.useRef)(0);
64198
+ (0, import_react18.useEffect)(() => () => clearTimeout(errorTimerRef.current), []);
64123
64199
  const showToggleError = (message) => {
64124
64200
  clearTimeout(errorTimerRef.current);
64125
64201
  setToggleError(message);
@@ -64152,124 +64228,148 @@ var PluginCard = ({
64152
64228
  };
64153
64229
  const filterLower = toolFilter?.toLowerCase() ?? "";
64154
64230
  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,
64231
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
64232
+ AccordionComponent.Item,
64233
+ {
64234
+ value: plugin.name,
64235
+ className: removingPlugin ? "pointer-events-none opacity-60 transition-opacity" : void 0,
64236
+ children: [
64237
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Header, { className: "flex", children: [
64238
+ /* @__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: [
64239
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(TooltipObject, { children: [
64240
+ /* @__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)(
64241
+ PluginIcon,
64242
+ {
64243
+ pluginName: plugin.name,
64244
+ displayName: plugin.displayName,
64245
+ tabState: plugin.tabState,
64246
+ hasUpdate: !!plugin.update,
64247
+ size: 32,
64248
+ iconSvg: plugin.iconSvg,
64249
+ iconInactiveSvg: plugin.iconInactiveSvg
64250
+ }
64251
+ ) }) }),
64252
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(TooltipObject.Content, { children: [
64253
+ "v",
64254
+ plugin.version,
64255
+ " \xB7 ",
64256
+ plugin.trustTier,
64257
+ plugin.update && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
64258
+ " \xB7 Update: ",
64259
+ plugin.update.latestVersion
64260
+ ] })
64261
+ ] })
64262
+ ] }),
64263
+ /* @__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: [
64264
+ plugin.displayName,
64265
+ plugin.source === "local" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge2, { variant: "default", size: "sm", className: "align-middle", children: "DEV" }),
64266
+ !plugin.sdkVersion && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(TooltipObject, { children: [
64267
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipObject.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64268
+ Badge2,
64269
+ {
64270
+ variant: "outline",
64271
+ size: "sm",
64272
+ className: "border-accent bg-accent/10 text-accent-foreground align-middle",
64273
+ children: "SDK"
64274
+ }
64275
+ ) }),
64276
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipObject.Content, { children: "SDK version mismatch \u2014 rebuild plugin" })
64277
+ ] })
64278
+ ] }),
64279
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
64280
+ ] }),
64281
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64282
+ PluginMenu,
64161
64283
  {
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
64284
+ plugin,
64285
+ onUpdate: onUpdate ?? (() => void 0),
64286
+ onRemove: onRemove ?? (() => void 0),
64287
+ updating: updatingPlugin ?? false,
64288
+ removing: removingPlugin ?? false,
64289
+ className: "flex shrink-0 items-center px-1"
64169
64290
  }
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,
64291
+ ),
64292
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64293
+ "div",
64211
64294
  {
64212
- checked: allEnabled,
64213
- onCheckedChange: handleToggleAll,
64214
- "aria-label": `Toggle all tools for ${plugin.name}`
64295
+ className: "flex shrink-0 items-center px-3",
64296
+ onClick: (e) => e.stopPropagation(),
64297
+ onKeyDown: (e) => {
64298
+ if (e.key === "Enter" || e.key === " ") e.stopPropagation();
64299
+ },
64300
+ role: "presentation",
64301
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64302
+ Switch2,
64303
+ {
64304
+ checked: allEnabled,
64305
+ onCheckedChange: handleToggleAll,
64306
+ "aria-label": `Toggle all tools for ${plugin.name}`
64307
+ }
64308
+ )
64215
64309
  }
64216
64310
  )
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
- ] });
64311
+ ] }),
64312
+ toggleError && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AlertComponent, { status: "error", className: "mx-3 mb-1 px-2 py-1 text-[11px]", children: toggleError }),
64313
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(AccordionComponent.Content, { className: "border-border border-t", children: [
64314
+ toolFilter && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "text-muted-foreground mb-1 px-3 pt-2 text-xs", children: [
64315
+ visibleTools.length,
64316
+ " of ",
64317
+ plugin.tools.length,
64318
+ " tools"
64319
+ ] }),
64320
+ visibleTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
64321
+ ToolRow,
64322
+ {
64323
+ name: tool.name,
64324
+ displayName: tool.displayName,
64325
+ description: tool.description,
64326
+ icon: tool.icon,
64327
+ enabled: tool.enabled,
64328
+ active: activeTools.has(`${plugin.name}:${tool.name}`),
64329
+ onToggle: () => handleToggleTool(tool.name, tool.enabled)
64330
+ },
64331
+ tool.name
64332
+ ))
64333
+ ] })
64334
+ ]
64335
+ }
64336
+ );
64243
64337
  };
64244
64338
 
64245
64339
  // src/side-panel/components/PluginList.tsx
64246
- var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
64340
+ var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
64247
64341
  var PluginList = ({
64248
64342
  plugins,
64249
64343
  failedPlugins,
64250
64344
  activeTools,
64251
64345
  setPlugins,
64252
- toolFilter
64346
+ toolFilter,
64347
+ onUpdate,
64348
+ onRemove,
64349
+ removingPlugins
64253
64350
  }) => {
64254
64351
  const filterLower = toolFilter.toLowerCase();
64255
64352
  const visiblePlugins = filterLower ? plugins.filter((p) => p.tools.some((t) => matchesTool(t, filterLower))) : plugins;
64256
64353
  const visibleFailed = filterLower ? [] : failedPlugins;
64257
64354
  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: [
64355
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-muted-foreground py-8 text-center text-sm", children: [
64259
64356
  "No tools matching \u201C",
64260
64357
  toolFilter,
64261
64358
  "\u201D"
64262
64359
  ] });
64263
64360
  }
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)(
64361
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
64362
+ 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)) }),
64363
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AccordionComponent, { type: "multiple", className: "space-y-2", children: visiblePlugins.map((plugin) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
64267
64364
  PluginCard,
64268
64365
  {
64269
64366
  plugin,
64270
64367
  activeTools,
64271
64368
  setPlugins,
64272
- toolFilter
64369
+ toolFilter,
64370
+ onUpdate: onUpdate ? () => onUpdate(plugin.name) : void 0,
64371
+ onRemove: onRemove ? () => onRemove(plugin.name) : void 0,
64372
+ removingPlugin: removingPlugins?.has(plugin.name)
64273
64373
  },
64274
64374
  plugin.name
64275
64375
  )) })
@@ -64277,10 +64377,10 @@ var PluginList = ({
64277
64377
  };
64278
64378
 
64279
64379
  // 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)(
64380
+ var import_react19 = __toESM(require_react(), 1);
64381
+ var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
64382
+ var Input = (0, import_react19.forwardRef)(
64383
+ ({ type = "text", placeholder = "Enter text", className, "aria-invalid": ariaInvalid, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
64284
64384
  "input",
64285
64385
  {
64286
64386
  ref,
@@ -64298,8 +64398,91 @@ var Input = (0, import_react18.forwardRef)(
64298
64398
  );
64299
64399
  Input.displayName = "Input";
64300
64400
 
64401
+ // src/side-panel/components/NpmPluginCard.tsx
64402
+ var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
64403
+ var deriveDisplayName = (packageName) => (packageName.split("/").pop() ?? packageName).replace(/^opentabs-plugin-/, "");
64404
+ var NpmPluginCard = ({ plugin, installing, error, onInstall }) => {
64405
+ const displayName = deriveDisplayName(plugin.name);
64406
+ 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: [
64407
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2", children: [
64408
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PluginIcon, { pluginName: plugin.name, displayName, tabState: "closed", size: 28 }),
64409
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
64410
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-wrap items-center gap-1", children: [
64411
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "font-head text-foreground truncate text-sm", children: displayName }),
64412
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Badge2, { variant: "default", size: "sm", children: plugin.version }),
64413
+ plugin.isOfficial && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Badge2, { size: "sm", className: "bg-primary/20 text-primary-foreground", children: "OFFICIAL" })
64414
+ ] }),
64415
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-muted-foreground truncate font-mono text-xs", children: plugin.author })
64416
+ ] }),
64417
+ /* @__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" })
64418
+ ] }),
64419
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-muted-foreground line-clamp-2 text-xs", children: plugin.description }),
64420
+ error && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AlertComponent, { status: "error", className: "px-3 py-2 text-xs", children: error })
64421
+ ] });
64422
+ };
64423
+ NpmPluginCard.displayName = "NpmPluginCard";
64424
+
64425
+ // src/side-panel/components/SearchResults.tsx
64426
+ var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
64427
+ var extractShortName = (name) => (name.split("/").pop() ?? name).replace(/^opentabs-plugin-/, "");
64428
+ 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 });
64429
+ var SearchResults = ({
64430
+ plugins,
64431
+ activeTools,
64432
+ setPlugins,
64433
+ toolFilter,
64434
+ npmResults,
64435
+ npmSearching,
64436
+ installingPlugins,
64437
+ onInstall,
64438
+ installErrors,
64439
+ onUpdate,
64440
+ onRemove,
64441
+ removingPlugins
64442
+ }) => {
64443
+ const filterLower = toolFilter.toLowerCase();
64444
+ const installedMatches = filterLower ? plugins.filter((p) => matchesPlugin(p, filterLower)) : plugins;
64445
+ const installedShortNames = new Set(plugins.map((p) => extractShortName(p.name)));
64446
+ const availableResults = npmResults.filter((r2) => !installedShortNames.has(extractShortName(r2.name)));
64447
+ const hasInstalledResults = installedMatches.length > 0;
64448
+ const showNoResults = toolFilter && !hasInstalledResults && !npmSearching && availableResults.length === 0;
64449
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "space-y-4", children: [
64450
+ hasInstalledResults && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
64451
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SectionHeader, { children: "Installed" }),
64452
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
64453
+ PluginList,
64454
+ {
64455
+ plugins: installedMatches,
64456
+ failedPlugins: [],
64457
+ activeTools,
64458
+ setPlugins,
64459
+ toolFilter: "",
64460
+ onUpdate,
64461
+ onRemove,
64462
+ removingPlugins
64463
+ }
64464
+ )
64465
+ ] }),
64466
+ 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: [
64467
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SectionHeader, { children: "Available" }),
64468
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-2", children: availableResults.map((result) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
64469
+ NpmPluginCard,
64470
+ {
64471
+ plugin: result,
64472
+ installing: installingPlugins.has(result.name),
64473
+ error: installErrors.get(result.name) ?? null,
64474
+ onInstall: () => onInstall(result.name)
64475
+ },
64476
+ result.name
64477
+ )) })
64478
+ ] })),
64479
+ showNoResults && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "text-muted-foreground py-8 text-center text-sm", children: "No results" })
64480
+ ] });
64481
+ };
64482
+ SearchResults.displayName = "SearchResults";
64483
+
64301
64484
  // src/side-panel/hooks/useServerNotifications.ts
64302
- var import_react19 = __toESM(require_react(), 1);
64485
+ var import_react20 = __toESM(require_react(), 1);
64303
64486
  var validTabStates = /* @__PURE__ */ new Set(["closed", "unavailable", "ready"]);
64304
64487
  var useServerNotifications = ({
64305
64488
  setPlugins,
@@ -64307,9 +64490,9 @@ var useServerNotifications = ({
64307
64490
  setPendingConfirmations,
64308
64491
  pendingTabStates
64309
64492
  }) => {
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)(() => {
64493
+ const timeoutIds = (0, import_react20.useRef)(/* @__PURE__ */ new Map());
64494
+ const invocationTimeoutIds = (0, import_react20.useRef)(/* @__PURE__ */ new Map());
64495
+ (0, import_react20.useEffect)(() => {
64313
64496
  const confirmationMap = timeoutIds.current;
64314
64497
  const invocationMap = invocationTimeoutIds.current;
64315
64498
  return () => {
@@ -64323,14 +64506,14 @@ var useServerNotifications = ({
64323
64506
  invocationMap.clear();
64324
64507
  };
64325
64508
  }, []);
64326
- const clearConfirmationTimeout = (0, import_react19.useCallback)((id) => {
64509
+ const clearConfirmationTimeout = (0, import_react20.useCallback)((id) => {
64327
64510
  const tid = timeoutIds.current.get(id);
64328
64511
  if (tid !== void 0) {
64329
64512
  clearTimeout(tid);
64330
64513
  timeoutIds.current.delete(id);
64331
64514
  }
64332
64515
  }, []);
64333
- const handleNotification = (0, import_react19.useCallback)(
64516
+ const handleNotification = (0, import_react20.useCallback)(
64334
64517
  (data) => {
64335
64518
  if (data.method === "confirmation.request" && data.params) {
64336
64519
  const params = data.params;
@@ -64410,28 +64593,34 @@ var useServerNotifications = ({
64410
64593
  };
64411
64594
 
64412
64595
  // src/side-panel/App.tsx
64413
- var import_react20 = __toESM(require_react(), 1);
64414
- var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
64596
+ var import_react21 = __toESM(require_react(), 1);
64597
+ var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
64415
64598
  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)(() => {
64599
+ const [connected, setConnected] = (0, import_react21.useState)(false);
64600
+ const [disconnectReason, setDisconnectReason] = (0, import_react21.useState)();
64601
+ const [plugins, setPlugins] = (0, import_react21.useState)([]);
64602
+ const [failedPlugins, setFailedPlugins] = (0, import_react21.useState)([]);
64603
+ const [loading, setLoading] = (0, import_react21.useState)(true);
64604
+ const [activeTools, setActiveTools] = (0, import_react21.useState)(/* @__PURE__ */ new Set());
64605
+ const [searchQuery, setSearchQuery] = (0, import_react21.useState)("");
64606
+ const [pendingConfirmations, setPendingConfirmations] = (0, import_react21.useState)([]);
64607
+ const [npmResults, setNpmResults] = (0, import_react21.useState)([]);
64608
+ const [npmSearching, setNpmSearching] = (0, import_react21.useState)(false);
64609
+ const [installingPlugins, setInstallingPlugins] = (0, import_react21.useState)(/* @__PURE__ */ new Set());
64610
+ const [removingPlugins, setRemovingPlugins] = (0, import_react21.useState)(/* @__PURE__ */ new Set());
64611
+ const [installErrors, setInstallErrors] = (0, import_react21.useState)(/* @__PURE__ */ new Map());
64612
+ const lastFetchRef = (0, import_react21.useRef)(0);
64613
+ const pendingTabStates = (0, import_react21.useRef)(/* @__PURE__ */ new Map());
64614
+ const npmSearchTimer = (0, import_react21.useRef)(void 0);
64615
+ const connectedRef = (0, import_react21.useRef)(connected);
64616
+ const loadingRef = (0, import_react21.useRef)(loading);
64617
+ const pluginsRef = (0, import_react21.useRef)(plugins);
64618
+ (0, import_react21.useEffect)(() => {
64430
64619
  connectedRef.current = connected;
64431
64620
  loadingRef.current = loading;
64432
64621
  pluginsRef.current = plugins;
64433
64622
  }, [connected, loading, plugins]);
64434
- const loadPlugins = (0, import_react20.useCallback)(() => {
64623
+ const loadPlugins = (0, import_react21.useCallback)(() => {
64435
64624
  const now = Date.now();
64436
64625
  if (now - lastFetchRef.current < 200) return;
64437
64626
  lastFetchRef.current = now;
@@ -64464,7 +64653,72 @@ var App = () => {
64464
64653
  setPendingConfirmations,
64465
64654
  pendingTabStates
64466
64655
  });
64467
- (0, import_react20.useEffect)(() => {
64656
+ const handleSearchChange = (0, import_react21.useCallback)((query) => {
64657
+ setSearchQuery(query);
64658
+ clearTimeout(npmSearchTimer.current);
64659
+ if (!query.trim()) {
64660
+ setNpmResults([]);
64661
+ setNpmSearching(false);
64662
+ return;
64663
+ }
64664
+ setNpmSearching(true);
64665
+ npmSearchTimer.current = setTimeout(() => {
64666
+ searchPlugins(query).then((result) => {
64667
+ setNpmResults(result.results);
64668
+ }).catch(() => {
64669
+ setNpmResults([]);
64670
+ }).finally(() => {
64671
+ setNpmSearching(false);
64672
+ });
64673
+ }, 400);
64674
+ }, []);
64675
+ const handleInstall = (0, import_react21.useCallback)(
64676
+ (name) => {
64677
+ setInstallingPlugins((prev) => new Set(prev).add(name));
64678
+ setInstallErrors((prev) => {
64679
+ const next = new Map(prev);
64680
+ next.delete(name);
64681
+ return next;
64682
+ });
64683
+ installPlugin(name).then(() => {
64684
+ setInstallingPlugins((prev) => {
64685
+ const next = new Set(prev);
64686
+ next.delete(name);
64687
+ return next;
64688
+ });
64689
+ handleSearchChange("");
64690
+ }).catch((err) => {
64691
+ setInstallingPlugins((prev) => {
64692
+ const next = new Set(prev);
64693
+ next.delete(name);
64694
+ return next;
64695
+ });
64696
+ setInstallErrors((prev) => new Map(prev).set(name, err instanceof Error ? err.message : String(err)));
64697
+ });
64698
+ },
64699
+ [handleSearchChange]
64700
+ );
64701
+ const handleRemove = (0, import_react21.useCallback)((pluginName) => {
64702
+ setRemovingPlugins((prev) => new Set(prev).add(pluginName));
64703
+ removePlugin(pluginName).then(() => {
64704
+ setRemovingPlugins((prev) => {
64705
+ const next = new Set(prev);
64706
+ next.delete(pluginName);
64707
+ return next;
64708
+ });
64709
+ }).catch(() => {
64710
+ setRemovingPlugins((prev) => {
64711
+ const next = new Set(prev);
64712
+ next.delete(pluginName);
64713
+ return next;
64714
+ });
64715
+ });
64716
+ }, []);
64717
+ const handleUpdate = (0, import_react21.useCallback)((pluginName) => {
64718
+ updatePlugin(pluginName).catch(() => {
64719
+ });
64720
+ }, []);
64721
+ (0, import_react21.useEffect)(() => {
64468
64722
  void getConnectionState().then((result) => {
64469
64723
  setConnected(result.connected);
64470
64724
  setDisconnectReason(result.disconnectReason);
@@ -64502,7 +64756,7 @@ var App = () => {
64502
64756
  setFailedPlugins([]);
64503
64757
  setActiveTools(/* @__PURE__ */ new Set());
64504
64758
  setPendingConfirmations([]);
64505
- setToolFilter("");
64759
+ handleSearchChange("");
64506
64760
  rejectAllPending();
64507
64761
  }
64508
64762
  sendResponse({ ok: true });
@@ -64534,8 +64788,8 @@ var App = () => {
64534
64788
  };
64535
64789
  chrome.runtime.onMessage.addListener(listener);
64536
64790
  return () => chrome.runtime.onMessage.removeListener(listener);
64537
- }, [loadPlugins, handleNotification]);
64538
- const handleConfirmationRespond = (0, import_react20.useCallback)(
64791
+ }, [loadPlugins, handleNotification, handleSearchChange]);
64792
+ const handleConfirmationRespond = (0, import_react21.useCallback)(
64539
64793
  (id, decision, scope) => {
64540
64794
  clearConfirmationTimeout(id);
64541
64795
  sendConfirmationResponse(id, decision, scope);
@@ -64543,19 +64797,18 @@ var App = () => {
64543
64797
  },
64544
64798
  [clearConfirmationTimeout]
64545
64799
  );
64546
- const handleDenyAll = (0, import_react20.useCallback)(() => {
64800
+ const handleDenyAll = (0, import_react21.useCallback)(() => {
64547
64801
  for (const c of pendingConfirmations) {
64548
64802
  clearConfirmationTimeout(c.id);
64549
64803
  sendConfirmationResponse(c.id, "deny");
64550
64804
  }
64551
64805
  setPendingConfirmations([]);
64552
64806
  }, [pendingConfirmations, clearConfirmationTimeout]);
64553
- const totalTools = plugins.reduce((sum, p) => sum + p.tools.length, 0);
64554
64807
  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)(
64808
+ const showPlugins = !loading && connected && (hasContent || !!searchQuery);
64809
+ const showSearchBar = connected && !loading;
64810
+ 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: [
64811
+ connected && pendingConfirmations.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64559
64812
  ConfirmationDialog,
64560
64813
  {
64561
64814
  confirmations: pendingConfirmations,
@@ -64563,51 +64816,71 @@ var App = () => {
64563
64816
  onDenyAll: handleDenyAll
64564
64817
  }
64565
64818
  ),
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)(
64819
+ 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: [
64820
+ /* @__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" }),
64821
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64569
64822
  Input,
64570
64823
  {
64571
- value: toolFilter,
64572
- onChange: (e) => setToolFilter(e.target.value),
64573
- placeholder: "Filter tools...",
64824
+ value: searchQuery,
64825
+ onChange: (e) => handleSearchChange(e.target.value),
64826
+ placeholder: "Search plugins and tools...",
64574
64827
  className: "pr-8 pl-9"
64575
64828
  }
64576
64829
  ),
64577
- toolFilter && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
64830
+ searchQuery && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64578
64831
  "button",
64579
64832
  {
64580
64833
  type: "button",
64581
- onClick: () => setToolFilter(""),
64834
+ onClick: () => handleSearchChange(""),
64582
64835
  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" })
64836
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(X, { className: "h-4 w-4" })
64584
64837
  }
64585
64838
  )
64586
64839
  ] }) }),
64587
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
64840
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64588
64841
  "main",
64589
64842
  {
64590
64843
  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)(
64844
+ 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)(
64845
+ SearchResults,
64846
+ {
64847
+ plugins,
64848
+ failedPlugins,
64849
+ activeTools,
64850
+ setPlugins,
64851
+ toolFilter: searchQuery,
64852
+ npmResults,
64853
+ npmSearching,
64854
+ installingPlugins,
64855
+ onInstall: handleInstall,
64856
+ installErrors,
64857
+ onUpdate: handleUpdate,
64858
+ onRemove: handleRemove,
64859
+ removingPlugins
64860
+ }
64861
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
64592
64862
  PluginList,
64593
64863
  {
64594
64864
  plugins,
64595
64865
  failedPlugins,
64596
64866
  activeTools,
64597
64867
  setPlugins,
64598
- toolFilter
64868
+ toolFilter: "",
64869
+ onUpdate: handleUpdate,
64870
+ onRemove: handleRemove,
64871
+ removingPlugins
64599
64872
  }
64600
64873
  )
64601
64874
  }
64602
64875
  ),
64603
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Footer, {})
64876
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Footer, {})
64604
64877
  ] }) });
64605
64878
  };
64606
64879
 
64607
64880
  // 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 {
64881
+ var import_react22 = __toESM(require_react(), 1);
64882
+ var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
64883
+ var ErrorBoundary = class extends import_react22.Component {
64611
64884
  state = { hasError: false };
64612
64885
  static getDerivedStateFromError() {
64613
64886
  return { hasError: true };
@@ -64617,10 +64890,10 @@ var ErrorBoundary = class extends import_react21.Component {
64617
64890
  }
64618
64891
  render() {
64619
64892
  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" })
64893
+ 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: [
64894
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AlertComponent.Title, { children: "Something went wrong" }),
64895
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AlertComponent.Description, { children: "The side panel encountered an unexpected error." }),
64896
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { variant: "default", size: "sm", className: "mt-4 w-full", onClick: () => window.location.reload(), children: "Reload" })
64624
64897
  ] }) });
64625
64898
  }
64626
64899
  return this.props.children;
@@ -64628,16 +64901,16 @@ var ErrorBoundary = class extends import_react21.Component {
64628
64901
  };
64629
64902
 
64630
64903
  // src/side-panel/index.tsx
64631
- var import_react22 = __toESM(require_react(), 1);
64904
+ var import_react23 = __toESM(require_react(), 1);
64632
64905
  var import_client = __toESM(require_client(), 1);
64633
- var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
64906
+ var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
64634
64907
  var rootEl = document.getElementById("root");
64635
64908
  if (!rootEl) {
64636
64909
  throw new Error("Root element not found");
64637
64910
  }
64638
64911
  var root = (0, import_client.createRoot)(rootEl);
64639
64912
  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, {}) }) })
64913
+ /* @__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
64914
  );
64642
64915
  /*! Bundled license information:
64643
64916