myoperator-mcp 0.2.151 → 0.2.153
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 +29 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1715,6 +1715,11 @@ export interface CreatableSelectProps
|
|
|
1715
1715
|
* If the raw value differs from the sanitized value, \`onInvalidCharacters\` is called.
|
|
1716
1716
|
*/
|
|
1717
1717
|
sanitizeInput?: (raw: string) => string
|
|
1718
|
+
/**
|
|
1719
|
+
* Applied after \`sanitizeInput\` on the combobox value (e.g. collapse spaces).
|
|
1720
|
+
* Does not affect invalid-character detection, which compares \`raw\` to \`sanitizeInput(raw)\` only.
|
|
1721
|
+
*/
|
|
1722
|
+
normalizeComboboxInput?: (sanitized: string) => string
|
|
1718
1723
|
/** Fired when \`sanitizeInput\` removed one or more characters from the raw input. */
|
|
1719
1724
|
onInvalidCharacters?: () => void
|
|
1720
1725
|
/**
|
|
@@ -1737,6 +1742,7 @@ const CreatableSelect = React.forwardRef(
|
|
|
1737
1742
|
disabled = false,
|
|
1738
1743
|
maxLength,
|
|
1739
1744
|
sanitizeInput,
|
|
1745
|
+
normalizeComboboxInput,
|
|
1740
1746
|
onInvalidCharacters,
|
|
1741
1747
|
onValidInput,
|
|
1742
1748
|
...props
|
|
@@ -1787,14 +1793,24 @@ const CreatableSelect = React.forwardRef(
|
|
|
1787
1793
|
)
|
|
1788
1794
|
|
|
1789
1795
|
const handleCreate = React.useCallback(() => {
|
|
1790
|
-
const
|
|
1796
|
+
const afterSanitize = sanitizeInput ? sanitizeInput(search) : search
|
|
1797
|
+
const normalized = normalizeComboboxInput
|
|
1798
|
+
? normalizeComboboxInput(afterSanitize)
|
|
1799
|
+
: afterSanitize
|
|
1800
|
+
const trimmed = normalized.trim()
|
|
1791
1801
|
if (trimmed) {
|
|
1792
1802
|
const value = maxLength != null ? trimmed.slice(0, maxLength) : trimmed
|
|
1793
1803
|
onValueChange?.(value)
|
|
1794
1804
|
setOpen(false)
|
|
1795
1805
|
setSearch("")
|
|
1796
1806
|
}
|
|
1797
|
-
}, [
|
|
1807
|
+
}, [
|
|
1808
|
+
search,
|
|
1809
|
+
onValueChange,
|
|
1810
|
+
maxLength,
|
|
1811
|
+
sanitizeInput,
|
|
1812
|
+
normalizeComboboxInput,
|
|
1813
|
+
])
|
|
1798
1814
|
|
|
1799
1815
|
const handleKeyDown = (e: React.KeyboardEvent) => {
|
|
1800
1816
|
if (e.key === "Escape") {
|
|
@@ -1889,8 +1905,11 @@ const CreatableSelect = React.forwardRef(
|
|
|
1889
1905
|
if (raw !== sanitized) onInvalidCharacters?.()
|
|
1890
1906
|
else onValidInput?.()
|
|
1891
1907
|
}
|
|
1908
|
+
const next = normalizeComboboxInput
|
|
1909
|
+
? normalizeComboboxInput(sanitized)
|
|
1910
|
+
: sanitized
|
|
1892
1911
|
setSearch(
|
|
1893
|
-
maxLength != null ?
|
|
1912
|
+
maxLength != null ? next.slice(0, maxLength) : next
|
|
1894
1913
|
)
|
|
1895
1914
|
}}
|
|
1896
1915
|
maxLength={maxLength}
|
|
@@ -2243,7 +2262,7 @@ const DialogOverlay = React.forwardRef(({ className, ...props }: React.Component
|
|
|
2243
2262
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
2244
2263
|
|
|
2245
2264
|
const dialogContentVariants = cva(
|
|
2246
|
-
"fixed left-[50%] top-[50%] z-[9999] flex flex-col translate-x-[-50%] translate-y-[-50%] gap-4 border border-solid border-border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",
|
|
2265
|
+
"fixed left-[50%] top-[50%] z-[9999] flex flex-col translate-x-[-50%] translate-y-[-50%] gap-4 border border-solid border-border bg-background p-6 shadow-lg duration-200 max-h-[calc(100vh-2rem)] overflow-y-auto data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",
|
|
2247
2266
|
{
|
|
2248
2267
|
variants: {
|
|
2249
2268
|
size: {
|
|
@@ -3648,7 +3667,7 @@ const PageHeader = React.forwardRef(
|
|
|
3648
3667
|
{/* Content Section: Title + Description */}
|
|
3649
3668
|
<div className="flex-1 min-w-0">
|
|
3650
3669
|
<div className="flex h-auto items-center gap-2 sm:min-h-10">
|
|
3651
|
-
<h1 className="m-0 text-lg font-semibold leading-
|
|
3670
|
+
<h1 className="m-0 text-lg font-semibold leading-tight text-semantic-text-primary truncate">
|
|
3652
3671
|
{title}
|
|
3653
3672
|
</h1>
|
|
3654
3673
|
{badge && (
|
|
@@ -3718,7 +3737,7 @@ function PaginationContent({
|
|
|
3718
3737
|
return (
|
|
3719
3738
|
<ul
|
|
3720
3739
|
data-slot="pagination-content"
|
|
3721
|
-
className={cn("flex flex-row items-center gap-1", className)}
|
|
3740
|
+
className={cn("flex flex-row items-center gap-1 list-none m-0 p-0", className)}
|
|
3722
3741
|
{...props}
|
|
3723
3742
|
/>
|
|
3724
3743
|
);
|
|
@@ -4935,6 +4954,10 @@ SelectScrollDownButton.displayName =
|
|
|
4935
4954
|
*/
|
|
4936
4955
|
function useUnlockBodyScroll() {
|
|
4937
4956
|
React.useEffect(() => {
|
|
4957
|
+
// Don't unlock body scroll if inside a dialog/modal \u2014 the dialog's
|
|
4958
|
+
// own scroll lock should remain active to prevent background scrolling
|
|
4959
|
+
if (document.querySelector('[role="dialog"]')) return;
|
|
4960
|
+
|
|
4938
4961
|
const style = document.createElement("style");
|
|
4939
4962
|
style.setAttribute("data-select-scroll-fix", "");
|
|
4940
4963
|
style.textContent =
|
package/package.json
CHANGED