myoperator-mcp 0.2.266 → 0.2.267
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 -85
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1635,21 +1635,6 @@ const CreatableMultiSelect = React.forwardRef(
|
|
|
1635
1635
|
)
|
|
1636
1636
|
: availablePresets
|
|
1637
1637
|
|
|
1638
|
-
const afterSanitizeDraft = sanitizeInput
|
|
1639
|
-
? sanitizeInput(inputValue)
|
|
1640
|
-
: inputValue
|
|
1641
|
-
const trimmedDraft = afterSanitizeDraft.trim()
|
|
1642
|
-
const draftForCreate = trimmedDraft
|
|
1643
|
-
? maxLengthPerItem != null
|
|
1644
|
-
? trimmedDraft.slice(0, maxLengthPerItem)
|
|
1645
|
-
: trimmedDraft
|
|
1646
|
-
: ""
|
|
1647
|
-
|
|
1648
|
-
const canShowEnterAffordance =
|
|
1649
|
-
Boolean(draftForCreate) &&
|
|
1650
|
-
!value.includes(draftForCreate) &&
|
|
1651
|
-
(maxItems == null || value.length < maxItems)
|
|
1652
|
-
|
|
1653
1638
|
const panelInputPlaceholder = createHintText ?? placeholder
|
|
1654
1639
|
|
|
1655
1640
|
const summaryTriggerLabel =
|
|
@@ -1668,21 +1653,71 @@ const CreatableMultiSelect = React.forwardRef(
|
|
|
1668
1653
|
creatableSelectTriggerVariants({ state: derivedState }),
|
|
1669
1654
|
"flex h-auto min-h-[42px] cursor-text items-start gap-2 py-2 text-left"
|
|
1670
1655
|
)}
|
|
1671
|
-
onClick={() =>
|
|
1672
|
-
|
|
1656
|
+
onClick={(e) => {
|
|
1657
|
+
if (disabled) return
|
|
1658
|
+
if ((e.target as HTMLElement).closest("[data-chip-remove]")) {
|
|
1659
|
+
return
|
|
1660
|
+
}
|
|
1661
|
+
inputRef.current?.focus()
|
|
1662
|
+
}}
|
|
1673
1663
|
>
|
|
1674
|
-
<
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1664
|
+
<div className="flex min-h-0 min-w-0 flex-1 flex-wrap content-start items-center gap-1.5">
|
|
1665
|
+
{triggerDisplay === "summary" ? (
|
|
1666
|
+
<span
|
|
1667
|
+
className={cn(
|
|
1668
|
+
"line-clamp-2 flex-1 text-base",
|
|
1669
|
+
value.length === 0
|
|
1670
|
+
? "text-semantic-text-muted"
|
|
1671
|
+
: "text-semantic-text-primary"
|
|
1672
|
+
)}
|
|
1673
|
+
>
|
|
1674
|
+
{summaryTriggerLabel}
|
|
1675
|
+
</span>
|
|
1676
|
+
) : value.length === 0 ? (
|
|
1677
|
+
<span
|
|
1678
|
+
className={cn(
|
|
1679
|
+
"line-clamp-2 flex-1 text-base",
|
|
1680
|
+
"text-semantic-text-muted"
|
|
1681
|
+
)}
|
|
1682
|
+
>
|
|
1683
|
+
{placeholder}
|
|
1684
|
+
</span>
|
|
1685
|
+
) : (
|
|
1686
|
+
value.map((val) => (
|
|
1687
|
+
<span
|
|
1688
|
+
key={val}
|
|
1689
|
+
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"
|
|
1690
|
+
>
|
|
1691
|
+
<span className="min-w-0 truncate">
|
|
1692
|
+
{labelForValue(val, options)}
|
|
1693
|
+
</span>
|
|
1694
|
+
<button
|
|
1695
|
+
type="button"
|
|
1696
|
+
data-chip-remove
|
|
1697
|
+
disabled={disabled}
|
|
1698
|
+
aria-label={\`Remove \${labelForValue(val, options)}\`}
|
|
1699
|
+
className={cn(
|
|
1700
|
+
"inline-flex size-6 shrink-0 items-center justify-center rounded text-semantic-text-muted transition-colors",
|
|
1701
|
+
!disabled &&
|
|
1702
|
+
"hover:bg-semantic-bg-hover hover:text-semantic-text-primary"
|
|
1703
|
+
)}
|
|
1704
|
+
onMouseDown={(e) => {
|
|
1705
|
+
e.preventDefault()
|
|
1706
|
+
e.stopPropagation()
|
|
1707
|
+
}}
|
|
1708
|
+
onClick={(e) => {
|
|
1709
|
+
e.stopPropagation()
|
|
1710
|
+
if (!disabled) removeValue(val)
|
|
1711
|
+
}}
|
|
1712
|
+
>
|
|
1713
|
+
<X className="size-3.5" strokeWidth={2} aria-hidden />
|
|
1714
|
+
</button>
|
|
1715
|
+
</span>
|
|
1716
|
+
))
|
|
1680
1717
|
)}
|
|
1681
|
-
>
|
|
1682
|
-
{summaryTriggerLabel}
|
|
1683
|
-
</span>
|
|
1718
|
+
</div>
|
|
1684
1719
|
<ChevronDown
|
|
1685
|
-
className="mt-1 size-
|
|
1720
|
+
className="mt-1 size-4 shrink-0 self-start rotate-180 text-semantic-text-muted opacity-70 transition-transform"
|
|
1686
1721
|
aria-hidden
|
|
1687
1722
|
/>
|
|
1688
1723
|
</div>
|
|
@@ -1772,7 +1807,7 @@ const CreatableMultiSelect = React.forwardRef(
|
|
|
1772
1807
|
)}
|
|
1773
1808
|
</div>
|
|
1774
1809
|
<ChevronDown
|
|
1775
|
-
className="mt-1 size-
|
|
1810
|
+
className="mt-1 size-4 shrink-0 self-start text-semantic-text-muted opacity-70 transition-transform"
|
|
1776
1811
|
aria-hidden
|
|
1777
1812
|
/>
|
|
1778
1813
|
</div>
|
|
@@ -1806,29 +1841,16 @@ const CreatableMultiSelect = React.forwardRef(
|
|
|
1806
1841
|
onKeyDown={handleKeyDown}
|
|
1807
1842
|
disabled={disabled}
|
|
1808
1843
|
placeholder={panelInputPlaceholder}
|
|
1809
|
-
className="min-w-0 flex-1 bg-transparent text-
|
|
1844
|
+
className="min-w-0 flex-1 bg-transparent text-sm text-semantic-text-primary outline-none placeholder:text-semantic-text-muted"
|
|
1810
1845
|
role="combobox"
|
|
1811
1846
|
aria-expanded={isOpen}
|
|
1812
1847
|
aria-controls={listboxId}
|
|
1813
1848
|
aria-haspopup="listbox"
|
|
1814
1849
|
aria-autocomplete="list"
|
|
1815
1850
|
/>
|
|
1816
|
-
<
|
|
1817
|
-
type="button"
|
|
1818
|
-
disabled={disabled || !canShowEnterAffordance}
|
|
1819
|
-
onMouseDown={(e) => {
|
|
1820
|
-
e.preventDefault()
|
|
1821
|
-
}}
|
|
1822
|
-
onClick={() => {
|
|
1823
|
-
if (draftForCreate) addValue(inputValue)
|
|
1824
|
-
}}
|
|
1825
|
-
className={cn(
|
|
1826
|
-
creatableEnterHintKbdClassName,
|
|
1827
|
-
"shrink-0 enabled:cursor-pointer enabled:hover:bg-semantic-bg-hover disabled:opacity-50"
|
|
1828
|
-
)}
|
|
1829
|
-
>
|
|
1851
|
+
<kbd className={cn(creatableEnterHintKbdClassName, "shrink-0")}>
|
|
1830
1852
|
Enter \u21B5
|
|
1831
|
-
</
|
|
1853
|
+
</kbd>
|
|
1832
1854
|
</div>
|
|
1833
1855
|
</div>
|
|
1834
1856
|
|
|
@@ -1839,45 +1861,6 @@ const CreatableMultiSelect = React.forwardRef(
|
|
|
1839
1861
|
</p>
|
|
1840
1862
|
) : null}
|
|
1841
1863
|
|
|
1842
|
-
{value.length > 0 ? (
|
|
1843
|
-
<div
|
|
1844
|
-
className="flex flex-wrap gap-1.5 border-b border-solid border-semantic-border-layout pb-2.5"
|
|
1845
|
-
aria-label="Selected values"
|
|
1846
|
-
>
|
|
1847
|
-
{value.map((val) => (
|
|
1848
|
-
<span
|
|
1849
|
-
key={val}
|
|
1850
|
-
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"
|
|
1851
|
-
>
|
|
1852
|
-
<span className="min-w-0 truncate">
|
|
1853
|
-
{labelForValue(val, options)}
|
|
1854
|
-
</span>
|
|
1855
|
-
<button
|
|
1856
|
-
type="button"
|
|
1857
|
-
data-chip-remove
|
|
1858
|
-
disabled={disabled}
|
|
1859
|
-
aria-label={\`Remove \${labelForValue(val, options)}\`}
|
|
1860
|
-
className={cn(
|
|
1861
|
-
"inline-flex size-6 shrink-0 items-center justify-center rounded text-semantic-text-muted transition-colors",
|
|
1862
|
-
!disabled &&
|
|
1863
|
-
"hover:bg-semantic-bg-hover hover:text-semantic-text-primary"
|
|
1864
|
-
)}
|
|
1865
|
-
onMouseDown={(e) => {
|
|
1866
|
-
e.preventDefault()
|
|
1867
|
-
e.stopPropagation()
|
|
1868
|
-
}}
|
|
1869
|
-
onClick={(e) => {
|
|
1870
|
-
e.stopPropagation()
|
|
1871
|
-
if (!disabled) removeValue(val)
|
|
1872
|
-
}}
|
|
1873
|
-
>
|
|
1874
|
-
<X className="size-3.5" strokeWidth={2} aria-hidden />
|
|
1875
|
-
</button>
|
|
1876
|
-
</span>
|
|
1877
|
-
))}
|
|
1878
|
-
</div>
|
|
1879
|
-
) : null}
|
|
1880
|
-
|
|
1881
1864
|
<div
|
|
1882
1865
|
id={listboxId}
|
|
1883
1866
|
role="listbox"
|
|
@@ -1976,9 +1959,9 @@ export const creatablePrimaryRoleHintRowClassName = cn(
|
|
|
1976
1959
|
"flex items-center justify-between border-b border-solid border-semantic-border-layout px-4 py-2"
|
|
1977
1960
|
)
|
|
1978
1961
|
|
|
1979
|
-
/** Tone / CreatableMultiSelect: inner hint row (place inside a full-bleed wrapper with \`-mx-4\` + \`border-b\` on the panel). */
|
|
1962
|
+
/** Tone / CreatableMultiSelect: inner hint row (place inside a full-bleed wrapper with \`-mx-4\` + \`border-b\` on the panel). Matches Roles' row dimensions for visual parity. */
|
|
1980
1963
|
export const creatableToneHintRowClassName = cn(
|
|
1981
|
-
"flex
|
|
1964
|
+
"flex shrink-0 items-center justify-between gap-2 px-4 py-2"
|
|
1982
1965
|
)
|
|
1983
1966
|
|
|
1984
1967
|
export interface CreatableSelectOption {
|
package/package.json
CHANGED