myoperator-mcp 0.2.257 → 0.2.259

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 +86 -25
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1571,7 +1571,7 @@ ContactListItem.displayName = "ContactListItem";
1571
1571
  export { ContactListItem };
1572
1572
  `,
1573
1573
  "creatable-multi-select": `import * as React from "react"
1574
- import { ChevronRight, Plus, Info } from "lucide-react"
1574
+ import { ChevronRight, Plus, Info, X } from "lucide-react"
1575
1575
 
1576
1576
  import { cn } from "@/lib/utils"
1577
1577
  import {
@@ -1642,6 +1642,13 @@ function joinSelectedLabels(
1642
1642
  .join(", ")
1643
1643
  }
1644
1644
 
1645
+ function labelForValue(
1646
+ val: string,
1647
+ options: CreatableMultiSelectOption[]
1648
+ ): string {
1649
+ return options.find((o) => o.value === val)?.label ?? val
1650
+ }
1651
+
1645
1652
  const CreatableMultiSelect = React.forwardRef(
1646
1653
  (
1647
1654
  {
@@ -1814,31 +1821,82 @@ const CreatableMultiSelect = React.forwardRef(
1814
1821
  />
1815
1822
  </div>
1816
1823
  ) : (
1817
- <button
1818
- type="button"
1819
- disabled={disabled}
1820
- onClick={handleOpen}
1821
- className={cn(
1822
- creatableSelectTriggerVariants({ state: derivedState }),
1823
- "cursor-pointer text-left"
1824
- )}
1824
+ <div
1825
+ role="combobox"
1826
+ tabIndex={disabled ? -1 : 0}
1825
1827
  aria-haspopup="listbox"
1826
1828
  aria-expanded={false}
1827
1829
  aria-controls={listboxId}
1830
+ aria-disabled={disabled || undefined}
1831
+ onKeyDown={(e) => {
1832
+ if (disabled) return
1833
+ if (e.key === "Enter" || e.key === " ") {
1834
+ e.preventDefault()
1835
+ handleOpen()
1836
+ }
1837
+ }}
1838
+ onClick={(e) => {
1839
+ if (disabled) return
1840
+ if ((e.target as HTMLElement).closest("[data-chip-remove]")) {
1841
+ return
1842
+ }
1843
+ handleOpen()
1844
+ }}
1845
+ className={cn(
1846
+ creatableSelectTriggerVariants({ state: derivedState }),
1847
+ "flex min-h-[42px] cursor-pointer items-center gap-2 py-1 text-left outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-semantic-bg-primary",
1848
+ disabled && "pointer-events-none cursor-not-allowed"
1849
+ )}
1828
1850
  >
1829
- <span
1830
- className={cn(
1831
- "flex-1 min-w-0 line-clamp-2 text-base",
1832
- !selectedSummary && "text-semantic-text-muted"
1851
+ <div className="flex min-h-0 min-w-0 flex-1 flex-wrap items-center gap-1.5">
1852
+ {value.length === 0 ? (
1853
+ <span
1854
+ className={cn(
1855
+ "line-clamp-2 flex-1 text-base",
1856
+ "text-semantic-text-muted"
1857
+ )}
1858
+ >
1859
+ {placeholder}
1860
+ </span>
1861
+ ) : (
1862
+ value.map((val) => (
1863
+ <span
1864
+ key={val}
1865
+ className="inline-flex max-w-full items-center gap-0.5 rounded bg-semantic-bg-ui py-1 pl-2 pr-0.5 text-sm text-semantic-text-primary"
1866
+ >
1867
+ <span className="min-w-0 truncate">
1868
+ {labelForValue(val, options)}
1869
+ </span>
1870
+ <button
1871
+ type="button"
1872
+ data-chip-remove
1873
+ disabled={disabled}
1874
+ aria-label={\`Remove \${labelForValue(val, options)}\`}
1875
+ className={cn(
1876
+ "inline-flex size-6 shrink-0 items-center justify-center rounded text-semantic-text-muted transition-colors",
1877
+ !disabled &&
1878
+ "hover:bg-semantic-bg-hover hover:text-semantic-text-primary"
1879
+ )}
1880
+ onMouseDown={(e) => {
1881
+ e.preventDefault()
1882
+ e.stopPropagation()
1883
+ }}
1884
+ onClick={(e) => {
1885
+ e.stopPropagation()
1886
+ if (!disabled) removeValue(val)
1887
+ }}
1888
+ >
1889
+ <X className="size-3.5" strokeWidth={2} aria-hidden />
1890
+ </button>
1891
+ </span>
1892
+ ))
1833
1893
  )}
1834
- >
1835
- {selectedSummary || placeholder}
1836
- </span>
1894
+ </div>
1837
1895
  <ChevronRight
1838
- className="size-5 text-semantic-text-muted shrink-0 opacity-70"
1896
+ className="size-5 shrink-0 text-semantic-text-muted opacity-70"
1839
1897
  aria-hidden
1840
1898
  />
1841
- </button>
1899
+ </div>
1842
1900
  )}
1843
1901
 
1844
1902
  {/* Dropdown panel */}
@@ -1849,7 +1907,7 @@ const CreatableMultiSelect = React.forwardRef(
1849
1907
  className="absolute left-0 top-full z-[9999] mt-1 flex w-full flex-col gap-2.5 overflow-hidden rounded border border-solid border-semantic-border-layout bg-semantic-bg-primary px-4 pb-4 pt-0 shadow-sm animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200"
1850
1908
  >
1851
1909
  {showHintsSection && (
1852
- <>
1910
+ <div className="-mx-4 flex shrink-0 flex-col border-b border-solid border-semantic-border-layout">
1853
1911
  <div className={creatableToneHintRowClassName}>
1854
1912
  {createHintText ? (
1855
1913
  <span className="text-sm text-semantic-text-muted">
@@ -1863,11 +1921,11 @@ const CreatableMultiSelect = React.forwardRef(
1863
1921
  </kbd>
1864
1922
  </div>
1865
1923
  {maxItems != null ? (
1866
- <p className="m-0 text-left text-sm text-semantic-text-muted">
1924
+ <div className="border-t border-solid border-semantic-border-layout bg-semantic-bg-ui px-4 py-2 text-left text-sm text-semantic-text-muted">
1867
1925
  Max selections allowed: {maxItems}
1868
- </p>
1926
+ </div>
1869
1927
  ) : null}
1870
- </>
1928
+ </div>
1871
1929
  )}
1872
1930
 
1873
1931
  {filteredPresets.length > 0 && (
@@ -1948,17 +2006,20 @@ const creatableSelectTriggerVariants = cva(
1948
2006
 
1949
2007
  /**
1950
2008
  * Tailwind classes for the "Enter \u21B5" hint in creatable dropdown headers (shared by Primary Role and Tone).
2009
+ * If your Tailwind config uses \`prefix\` (e.g. \`"tw-"\`), prefix every utility here or these strings will not compile.
1951
2010
  */
1952
2011
  export const creatableEnterHintKbdClassName =
1953
2012
  "inline-flex items-center gap-0.5 rounded border border-solid border-semantic-border-layout bg-semantic-bg-ui px-1.5 py-0.5 font-sans text-[10px] font-medium text-semantic-text-muted"
1954
2013
 
1955
2014
  /** Primary Role: hint row above the options list (custom role + Enter kbd). */
1956
2015
  export const creatablePrimaryRoleHintRowClassName =
1957
- "flex items-center justify-between px-4 py-2 border-b border-solid border-semantic-border-layout"
2016
+ "flex items-center justify-between border-b border-solid border-semantic-border-layout px-4 py-2"
1958
2017
 
1959
- /** Tone / CreatableMultiSelect: hint row inside the padded dropdown panel (-mx-4 full-bleed border). */
2018
+ /**
2019
+ * Tone / CreatableMultiSelect: inner hint row (place inside a full-bleed wrapper with \`-mx-4\` + \`border-b\` on the panel).
2020
+ */
1960
2021
  export const creatableToneHintRowClassName =
1961
- "-mx-4 flex min-h-[45px] shrink-0 items-center justify-between gap-2.5 border-b border-solid border-semantic-border-layout px-4 py-2.5"
2022
+ "flex min-h-[45px] shrink-0 items-center justify-between gap-2.5 px-4 py-2.5"
1962
2023
 
1963
2024
  export interface CreatableSelectOption {
1964
2025
  value: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.2.257",
3
+ "version": "0.2.259",
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",