myoperator-mcp 0.2.308 → 0.2.310
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 +112 -42
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3999,7 +3999,7 @@ const inputVariants = cva(
|
|
|
3999
3999
|
default:
|
|
4000
4000
|
"border border-solid border-semantic-border-input focus:outline-none focus:border-semantic-border-input-focus focus:shadow-[0_0_0_1px_rgba(43,188,202,0.15)]",
|
|
4001
4001
|
error:
|
|
4002
|
-
"border border-solid border-semantic-error-primary focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
4002
|
+
"border border-solid border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
4003
4003
|
},
|
|
4004
4004
|
},
|
|
4005
4005
|
defaultVariants: {
|
|
@@ -4079,7 +4079,10 @@ const Input = React.forwardRef(
|
|
|
4079
4079
|
<input
|
|
4080
4080
|
type={type}
|
|
4081
4081
|
className={cn(
|
|
4082
|
-
inputVariants({ state
|
|
4082
|
+
inputVariants({ state }),
|
|
4083
|
+
className,
|
|
4084
|
+
state === "error" &&
|
|
4085
|
+
"border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
4083
4086
|
showCheckIcon && "pr-9",
|
|
4084
4087
|
type === "number" &&
|
|
4085
4088
|
hideNumberSpinners &&
|
|
@@ -4164,6 +4167,15 @@ Input.displayName = "Input";
|
|
|
4164
4167
|
export { Input, inputVariants };
|
|
4165
4168
|
`,
|
|
4166
4169
|
"multi-select": `import * as React from "react";
|
|
4170
|
+
import { createPortal } from "react-dom";
|
|
4171
|
+
import {
|
|
4172
|
+
autoUpdate,
|
|
4173
|
+
flip,
|
|
4174
|
+
offset,
|
|
4175
|
+
shift,
|
|
4176
|
+
size,
|
|
4177
|
+
useFloating,
|
|
4178
|
+
} from "@floating-ui/react-dom";
|
|
4167
4179
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
4168
4180
|
import { Check, ChevronDown, CircleAlert, Loader2, X } from "lucide-react";
|
|
4169
4181
|
|
|
@@ -4282,10 +4294,8 @@ const multiSelectTriggerVariants = cva(
|
|
|
4282
4294
|
{
|
|
4283
4295
|
variants: {
|
|
4284
4296
|
state: {
|
|
4285
|
-
default:
|
|
4286
|
-
|
|
4287
|
-
error:
|
|
4288
|
-
"border border-solid border-semantic-error-primary/40 focus:outline-none focus:border-semantic-error-primary/60 focus:shadow-[0_0_0_1px_rgba(240,68,56,0.1)]",
|
|
4297
|
+
default: "border border-solid border-semantic-border-input focus:outline-none focus:border-semantic-border-input-focus/50 focus:shadow-[0_0_0_1px_rgba(43,188,202,0.15)]",
|
|
4298
|
+
error: "border border-solid border-semantic-error-primary/40 focus:outline-none focus:border-semantic-error-primary/60 focus:shadow-[0_0_0_1px_rgba(240,68,56,0.1)]",
|
|
4289
4299
|
},
|
|
4290
4300
|
},
|
|
4291
4301
|
defaultVariants: {
|
|
@@ -4417,7 +4427,40 @@ const MultiSelect = React.forwardRef(
|
|
|
4417
4427
|
const [searchQuery, setSearchQuery] = React.useState("");
|
|
4418
4428
|
|
|
4419
4429
|
// Container ref for click outside detection
|
|
4420
|
-
const containerRef = React.useRef<HTMLDivElement>(null);
|
|
4430
|
+
const containerRef = React.useRef<HTMLDivElement | null>(null);
|
|
4431
|
+
|
|
4432
|
+
const { refs, floatingStyles, isPositioned } = useFloating({
|
|
4433
|
+
open: isOpen,
|
|
4434
|
+
placement: "bottom-start",
|
|
4435
|
+
strategy: "fixed",
|
|
4436
|
+
middleware: [
|
|
4437
|
+
offset(4),
|
|
4438
|
+
flip({ padding: 8 }),
|
|
4439
|
+
shift({ padding: 8 }),
|
|
4440
|
+
size({
|
|
4441
|
+
padding: 8,
|
|
4442
|
+
apply({ rects, elements }) {
|
|
4443
|
+
elements.floating.style.width = \`\${rects.reference.width}px\`;
|
|
4444
|
+
},
|
|
4445
|
+
}),
|
|
4446
|
+
],
|
|
4447
|
+
whileElementsMounted: (reference, floating, update) =>
|
|
4448
|
+
autoUpdate(reference, floating, update, { animationFrame: true }),
|
|
4449
|
+
});
|
|
4450
|
+
|
|
4451
|
+
const setAnchorRef = React.useCallback(
|
|
4452
|
+
(node: HTMLDivElement | null) => {
|
|
4453
|
+
refs.setReference(node);
|
|
4454
|
+
},
|
|
4455
|
+
[refs]
|
|
4456
|
+
);
|
|
4457
|
+
|
|
4458
|
+
const setDropdownRef = React.useCallback(
|
|
4459
|
+
(node: HTMLDivElement | null) => {
|
|
4460
|
+
refs.setFloating(node);
|
|
4461
|
+
},
|
|
4462
|
+
[refs]
|
|
4463
|
+
);
|
|
4421
4464
|
|
|
4422
4465
|
const flatOptions = React.useMemo(
|
|
4423
4466
|
() => flattenMultiSelectOptions(options),
|
|
@@ -4558,22 +4601,31 @@ const MultiSelect = React.forwardRef(
|
|
|
4558
4601
|
onValueChange?.([]);
|
|
4559
4602
|
};
|
|
4560
4603
|
|
|
4561
|
-
// Close dropdown when clicking outside
|
|
4604
|
+
// Close dropdown when clicking outside (defer so opening click does not close immediately)
|
|
4562
4605
|
React.useEffect(() => {
|
|
4606
|
+
if (!isOpen) return;
|
|
4607
|
+
|
|
4563
4608
|
const handleClickOutside = (event: MouseEvent) => {
|
|
4609
|
+
const target = event.target as Node;
|
|
4564
4610
|
if (
|
|
4565
|
-
containerRef.current
|
|
4566
|
-
|
|
4611
|
+
containerRef.current?.contains(target) ||
|
|
4612
|
+
refs.floating.current?.contains(target)
|
|
4567
4613
|
) {
|
|
4568
|
-
|
|
4569
|
-
setSearchQuery("");
|
|
4614
|
+
return;
|
|
4570
4615
|
}
|
|
4616
|
+
setIsOpen(false);
|
|
4617
|
+
setSearchQuery("");
|
|
4571
4618
|
};
|
|
4572
4619
|
|
|
4573
|
-
|
|
4574
|
-
|
|
4620
|
+
const timeoutId = window.setTimeout(() => {
|
|
4621
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
4622
|
+
}, 0);
|
|
4623
|
+
|
|
4624
|
+
return () => {
|
|
4625
|
+
window.clearTimeout(timeoutId);
|
|
4575
4626
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
4576
|
-
|
|
4627
|
+
};
|
|
4628
|
+
}, [isOpen, refs.floating]);
|
|
4577
4629
|
|
|
4578
4630
|
// Handle keyboard navigation
|
|
4579
4631
|
const handleKeyDown = (e: React.KeyboardEvent) => {
|
|
@@ -4609,9 +4661,11 @@ const MultiSelect = React.forwardRef(
|
|
|
4609
4661
|
</label>
|
|
4610
4662
|
)}
|
|
4611
4663
|
|
|
4612
|
-
{/*
|
|
4613
|
-
|
|
4614
|
-
|
|
4664
|
+
{/* Anchor for floating menu (portaled to body to escape overflow:hidden scroll areas). */}
|
|
4665
|
+
<div
|
|
4666
|
+
ref={setAnchorRef}
|
|
4667
|
+
className="relative w-full min-w-0 flex flex-col gap-1"
|
|
4668
|
+
>
|
|
4615
4669
|
{/* Trigger */}
|
|
4616
4670
|
<button
|
|
4617
4671
|
ref={ref}
|
|
@@ -4731,18 +4785,23 @@ const MultiSelect = React.forwardRef(
|
|
|
4731
4785
|
</div>
|
|
4732
4786
|
)}
|
|
4733
4787
|
|
|
4734
|
-
{
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
<
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
"
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4788
|
+
{isOpen &&
|
|
4789
|
+
typeof document !== "undefined" &&
|
|
4790
|
+
createPortal(
|
|
4791
|
+
<TooltipProvider delayDuration={200}>
|
|
4792
|
+
<div
|
|
4793
|
+
ref={setDropdownRef}
|
|
4794
|
+
id={listboxId}
|
|
4795
|
+
role="listbox"
|
|
4796
|
+
aria-multiselectable="true"
|
|
4797
|
+
className="rounded bg-semantic-bg-primary border border-solid border-semantic-border-layout shadow-md"
|
|
4798
|
+
style={{
|
|
4799
|
+
...floatingStyles,
|
|
4800
|
+
zIndex: 10050,
|
|
4801
|
+
visibility: isPositioned ? undefined : "hidden",
|
|
4802
|
+
}}
|
|
4803
|
+
onMouseDown={(e) => e.stopPropagation()}
|
|
4804
|
+
>
|
|
4746
4805
|
{/* Search input */}
|
|
4747
4806
|
{searchable && (
|
|
4748
4807
|
<div className="p-2 border-b border-solid border-semantic-border-layout">
|
|
@@ -4770,7 +4829,7 @@ const MultiSelect = React.forwardRef(
|
|
|
4770
4829
|
<div
|
|
4771
4830
|
key={\`divider-\${itemIndex}\`}
|
|
4772
4831
|
role="separator"
|
|
4773
|
-
className="my-1 h-px bg-semantic-border-layout"
|
|
4832
|
+
className="my-1 h-px bg-[var(--semantic-border-layout,#E9EAEB)]"
|
|
4774
4833
|
/>
|
|
4775
4834
|
);
|
|
4776
4835
|
}
|
|
@@ -4820,7 +4879,7 @@ const MultiSelect = React.forwardRef(
|
|
|
4820
4879
|
>
|
|
4821
4880
|
<span className="absolute right-2 flex size-4 items-center justify-center">
|
|
4822
4881
|
{isSelected && (
|
|
4823
|
-
<Check className="size-4 text-semantic-
|
|
4882
|
+
<Check className="size-4 text-semantic-primary" />
|
|
4824
4883
|
)}
|
|
4825
4884
|
</span>
|
|
4826
4885
|
<span className="min-w-0 flex-1 whitespace-normal break-words text-left">
|
|
@@ -4879,7 +4938,7 @@ const MultiSelect = React.forwardRef(
|
|
|
4879
4938
|
</TooltipTrigger>
|
|
4880
4939
|
<TooltipContent
|
|
4881
4940
|
side="top"
|
|
4882
|
-
className="max-w-xs bg-semantic-primary text-semantic-text-inverted border-semantic-primary"
|
|
4941
|
+
className="max-w-xs bg-semantic-primary text-semantic-text-inverted border-semantic-primary border-solid"
|
|
4883
4942
|
>
|
|
4884
4943
|
{overlayCopy}
|
|
4885
4944
|
</TooltipContent>
|
|
@@ -4905,9 +4964,10 @@ const MultiSelect = React.forwardRef(
|
|
|
4905
4964
|
{selectedValues.length} / {maxSelections} selected
|
|
4906
4965
|
</div>
|
|
4907
4966
|
) : null}
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4967
|
+
</div>
|
|
4968
|
+
</TooltipProvider>,
|
|
4969
|
+
document.body
|
|
4970
|
+
)}
|
|
4911
4971
|
</div>
|
|
4912
4972
|
|
|
4913
4973
|
{/* Hidden input for form submission */}
|
|
@@ -8049,7 +8109,7 @@ const textFieldContainerVariants = cva(
|
|
|
8049
8109
|
empty:
|
|
8050
8110
|
"border border-solid border-semantic-border-input focus-within:border-semantic-border-input-focus focus-within:shadow-[0_0_0_1px_rgba(43,188,202,0.15)]",
|
|
8051
8111
|
error:
|
|
8052
|
-
"border border-solid border-semantic-error-primary focus-within:border-semantic-error-primary focus-within:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8112
|
+
"border border-solid border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus-within:border-semantic-error-primary focus-within:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8053
8113
|
},
|
|
8054
8114
|
disabled: {
|
|
8055
8115
|
true: "cursor-not-allowed opacity-50 bg-[var(--color-neutral-50)]",
|
|
@@ -8076,7 +8136,7 @@ const textFieldInputVariants = cva(
|
|
|
8076
8136
|
empty:
|
|
8077
8137
|
"border border-solid border-semantic-border-input focus:outline-none focus:border-semantic-border-input-focus focus:shadow-[0_0_0_1px_rgba(43,188,202,0.15)]",
|
|
8078
8138
|
error:
|
|
8079
|
-
"border border-solid border-semantic-error-primary focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8139
|
+
"border border-solid border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8080
8140
|
},
|
|
8081
8141
|
size: {
|
|
8082
8142
|
default: "h-[42px] px-4 py-2 text-base file:text-base",
|
|
@@ -8244,7 +8304,12 @@ const TextField = React.forwardRef(
|
|
|
8244
8304
|
"flex-1 bg-transparent border-0 outline-none focus:ring-0 px-0 h-full text-semantic-text-primary placeholder:text-semantic-text-placeholder disabled:cursor-not-allowed",
|
|
8245
8305
|
size === "sm" ? "text-sm" : "text-base"
|
|
8246
8306
|
)
|
|
8247
|
-
:
|
|
8307
|
+
: cn(
|
|
8308
|
+
textFieldInputVariants({ state: derivedState, size }),
|
|
8309
|
+
className,
|
|
8310
|
+
derivedState === "error" &&
|
|
8311
|
+
"border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]"
|
|
8312
|
+
),
|
|
8248
8313
|
type === "number" &&
|
|
8249
8314
|
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
|
|
8250
8315
|
)}
|
|
@@ -8294,7 +8359,9 @@ const TextField = React.forwardRef(
|
|
|
8294
8359
|
disabled: disabled || loading,
|
|
8295
8360
|
}),
|
|
8296
8361
|
size === "sm" ? "h-9 px-3" : "h-[42px] px-4",
|
|
8297
|
-
inputContainerClassName
|
|
8362
|
+
inputContainerClassName,
|
|
8363
|
+
derivedState === "error" &&
|
|
8364
|
+
"border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus-within:border-semantic-error-primary focus-within:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]"
|
|
8298
8365
|
)}
|
|
8299
8366
|
>
|
|
8300
8367
|
{prefix && (
|
|
@@ -8403,7 +8470,7 @@ const textareaVariants = cva(
|
|
|
8403
8470
|
default:
|
|
8404
8471
|
"border border-solid border-semantic-border-input focus:outline-none focus:border-semantic-border-input-focus focus:shadow-[0_0_0_1px_rgba(43,188,202,0.15)]",
|
|
8405
8472
|
error:
|
|
8406
|
-
"border border-solid border-semantic-error-primary focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8473
|
+
"border border-solid border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8407
8474
|
},
|
|
8408
8475
|
size: {
|
|
8409
8476
|
default: "px-4 py-2.5 text-base",
|
|
@@ -8576,7 +8643,10 @@ const Textarea = React.forwardRef(
|
|
|
8576
8643
|
id={textareaId}
|
|
8577
8644
|
rows={rows}
|
|
8578
8645
|
className={cn(
|
|
8579
|
-
textareaVariants({ state: derivedState, size
|
|
8646
|
+
textareaVariants({ state: derivedState, size }),
|
|
8647
|
+
className,
|
|
8648
|
+
derivedState === "error" &&
|
|
8649
|
+
"border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8580
8650
|
resizeClasses[resize]
|
|
8581
8651
|
)}
|
|
8582
8652
|
disabled={disabled}
|
package/package.json
CHANGED