myoperator-mcp 0.2.378 → 0.2.379
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +68 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10553,6 +10553,15 @@ const Select = SelectPrimitive.Root;
|
|
|
10553
10553
|
|
|
10554
10554
|
const SelectGroup = SelectPrimitive.Group;
|
|
10555
10555
|
|
|
10556
|
+
/**
|
|
10557
|
+
* Lets \`SelectContent\` set the long-label behaviour once for every
|
|
10558
|
+
* \`SelectItem\` it renders, so callers don't repeat the flag per item.
|
|
10559
|
+
* Items may still override it individually.
|
|
10560
|
+
*/
|
|
10561
|
+
const SelectItemLayoutContext = React.createContext<{
|
|
10562
|
+
truncateOptionText: boolean;
|
|
10563
|
+
}>({ truncateOptionText: false });
|
|
10564
|
+
|
|
10556
10565
|
const SelectValue = React.forwardRef(({ className, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>, ref: React.Ref<React.ElementRef<typeof SelectPrimitive.Value>>) => (
|
|
10557
10566
|
<SelectPrimitive.Value
|
|
10558
10567
|
ref={ref}
|
|
@@ -10670,6 +10679,13 @@ export type SelectContentProps = React.ComponentPropsWithoutRef<
|
|
|
10670
10679
|
*/
|
|
10671
10680
|
onViewportScrollEnd?: (event: React.UIEvent<HTMLDivElement>) => void;
|
|
10672
10681
|
hideScrollButtons?: boolean;
|
|
10682
|
+
/**
|
|
10683
|
+
* Clip long option labels to a single line with an ellipsis instead of
|
|
10684
|
+
* wrapping them. Applies to every \`SelectItem\` inside this content;
|
|
10685
|
+
* individual items can override it with their own \`truncateOptionText\`.
|
|
10686
|
+
* The trigger value always truncates, regardless of this flag.
|
|
10687
|
+
*/
|
|
10688
|
+
truncateOptionText?: boolean;
|
|
10673
10689
|
};
|
|
10674
10690
|
|
|
10675
10691
|
const BOTTOM_THRESHOLD_PX = 24;
|
|
@@ -10683,6 +10699,7 @@ const SelectContent = React.forwardRef(
|
|
|
10683
10699
|
position = "popper",
|
|
10684
10700
|
onViewportScrollEnd,
|
|
10685
10701
|
hideScrollButtons,
|
|
10702
|
+
truncateOptionText = false,
|
|
10686
10703
|
...props
|
|
10687
10704
|
}: SelectContentProps,
|
|
10688
10705
|
ref: React.Ref<React.ElementRef<typeof SelectPrimitive.Content>>
|
|
@@ -10738,6 +10755,11 @@ const SelectContent = React.forwardRef(
|
|
|
10738
10755
|
};
|
|
10739
10756
|
}, [viewport, onViewportScrollEnd]);
|
|
10740
10757
|
|
|
10758
|
+
const itemLayout = React.useMemo(
|
|
10759
|
+
() => ({ truncateOptionText }),
|
|
10760
|
+
[truncateOptionText]
|
|
10761
|
+
);
|
|
10762
|
+
|
|
10741
10763
|
return (
|
|
10742
10764
|
<SelectPrimitive.Portal>
|
|
10743
10765
|
<SelectPrimitive.Content
|
|
@@ -10766,7 +10788,9 @@ const SelectContent = React.forwardRef(
|
|
|
10766
10788
|
"h-[var(--radix-select-trigger-height)] w-full"
|
|
10767
10789
|
)}
|
|
10768
10790
|
>
|
|
10769
|
-
{
|
|
10791
|
+
<SelectItemLayoutContext.Provider value={itemLayout}>
|
|
10792
|
+
{children}
|
|
10793
|
+
</SelectItemLayoutContext.Provider>
|
|
10770
10794
|
</SelectPrimitive.Viewport>
|
|
10771
10795
|
{!hideScrollButtons && <SelectScrollDownButton />}
|
|
10772
10796
|
</SelectPrimitive.Content>
|
|
@@ -10788,29 +10812,49 @@ const SelectLabel = React.forwardRef(({ className, ...props }: React.ComponentPr
|
|
|
10788
10812
|
));
|
|
10789
10813
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
10790
10814
|
|
|
10791
|
-
|
|
10792
|
-
<SelectPrimitive.Item
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10815
|
+
export interface SelectItemProps
|
|
10816
|
+
extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> {
|
|
10817
|
+
/**
|
|
10818
|
+
* Clip this option's label to a single line with an ellipsis instead of
|
|
10819
|
+
* wrapping it. Defaults to the value set on \`SelectContent\` (wrapped).
|
|
10820
|
+
*/
|
|
10821
|
+
truncateOptionText?: boolean;
|
|
10822
|
+
}
|
|
10823
|
+
|
|
10824
|
+
const SelectItem = React.forwardRef(({ className, children, truncateOptionText, ...props }: SelectItemProps, ref: React.Ref<React.ElementRef<typeof SelectPrimitive.Item>>) => {
|
|
10825
|
+
const layout = React.useContext(SelectItemLayoutContext);
|
|
10826
|
+
const truncate = truncateOptionText ?? layout.truncateOptionText;
|
|
10827
|
+
|
|
10828
|
+
return (
|
|
10829
|
+
<SelectPrimitive.Item
|
|
10830
|
+
ref={ref}
|
|
10831
|
+
className={cn(
|
|
10832
|
+
"relative flex w-full cursor-pointer select-none items-start rounded-sm py-2 pl-4 pr-8 text-base text-semantic-text-primary outline-none",
|
|
10833
|
+
"hover:bg-semantic-bg-ui focus:bg-semantic-bg-ui",
|
|
10834
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
10835
|
+
className
|
|
10836
|
+
)}
|
|
10837
|
+
{...props}
|
|
10838
|
+
>
|
|
10839
|
+
<span className="absolute right-2 flex size-4 items-center justify-center">
|
|
10840
|
+
<SelectPrimitive.ItemIndicator>
|
|
10841
|
+
<Check className="size-4 text-semantic-brand" />
|
|
10842
|
+
</SelectPrimitive.ItemIndicator>
|
|
10843
|
+
</span>
|
|
10844
|
+
<span
|
|
10845
|
+
title={truncate && typeof children === "string" ? children : undefined}
|
|
10846
|
+
className={cn(
|
|
10847
|
+
"min-w-0 flex-1 leading-normal",
|
|
10848
|
+
truncate ? "truncate" : "whitespace-normal break-words"
|
|
10849
|
+
)}
|
|
10850
|
+
>
|
|
10851
|
+
<SelectPrimitive.ItemText>
|
|
10852
|
+
{children}
|
|
10853
|
+
</SelectPrimitive.ItemText>
|
|
10854
|
+
</span>
|
|
10855
|
+
</SelectPrimitive.Item>
|
|
10856
|
+
);
|
|
10857
|
+
});
|
|
10814
10858
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
10815
10859
|
|
|
10816
10860
|
const SelectSeparator = React.forwardRef(({ className, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>, ref: React.Ref<React.ElementRef<typeof SelectPrimitive.Separator>>) => (
|
package/package.json
CHANGED