myoperator-mcp 0.2.151 → 0.2.152

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 (2) hide show
  1. package/dist/index.js +23 -4
  2. 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 trimmed = search.trim()
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
- }, [search, onValueChange, maxLength])
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 ? sanitized.slice(0, maxLength) : sanitized
1912
+ maxLength != null ? next.slice(0, maxLength) : next
1894
1913
  )
1895
1914
  }}
1896
1915
  maxLength={maxLength}
@@ -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-none text-semantic-text-primary truncate">
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 && (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.2.151",
3
+ "version": "0.2.152",
4
4
  "description": "MCP server for myOperator UI components - enables AI assistants to access component metadata, examples, and design tokens",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",