myoperator-mcp 0.2.270 → 0.2.271

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 +17 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7249,7 +7249,7 @@ export { TextField, textFieldContainerVariants, textFieldInputVariants };
7249
7249
  import { CircleAlert } from "lucide-react";
7250
7250
  import { cva, type VariantProps } from "class-variance-authority";
7251
7251
 
7252
- import { cn } from "@/lib/utils";
7252
+ import { cn, countNonWhitespaceChars } from "@/lib/utils";
7253
7253
 
7254
7254
  /**
7255
7255
  * Textarea variants for different visual states
@@ -7278,6 +7278,7 @@ const textareaVariants = cva(
7278
7278
 
7279
7279
  /**
7280
7280
  * A multi-line text input with label, error state, helper text, character counter, and resize control.
7281
+ * With \`showCount\` and \`maxLength\`, the counter excludes all whitespace unless \`displayCharCount\` is set.
7281
7282
  *
7282
7283
  * @example
7283
7284
  * \`\`\`tsx
@@ -7307,6 +7308,12 @@ export interface TextareaProps
7307
7308
  errorIcon?: boolean;
7308
7309
  /** Shows character count when maxLength is set */
7309
7310
  showCount?: boolean;
7311
+ /**
7312
+ * When set, the counter shows this number instead of the default non-whitespace length
7313
+ * (see {@link countNonWhitespaceChars} in \`@/lib/utils\`).
7314
+ * Does not change native \`maxLength\` or stored value \u2014 display only.
7315
+ */
7316
+ displayCharCount?: number;
7310
7317
  /**
7311
7318
  * When true (default), \`maxLength\` is applied to the native textarea (hard limit).
7312
7319
  * When false, the limit is only used for \`showCount\` / styling \u2014 pair with \`error\` or parent validation for soft limits.
@@ -7334,6 +7341,7 @@ const Textarea = React.forwardRef(
7334
7341
  error,
7335
7342
  errorIcon = false,
7336
7343
  showCount,
7344
+ displayCharCount,
7337
7345
  enforceMaxLength = true,
7338
7346
  resize = "none",
7339
7347
  maxLength,
@@ -7367,8 +7375,11 @@ const Textarea = React.forwardRef(
7367
7375
  onChange?.(e);
7368
7376
  };
7369
7377
 
7370
- // Character count
7371
- const charCount = String(currentValue).length;
7378
+ // Counter excludes whitespace so spacing between words does not consume the budget.
7379
+ const charCount =
7380
+ displayCharCount !== undefined
7381
+ ? displayCharCount
7382
+ : countNonWhitespaceChars(String(currentValue));
7372
7383
 
7373
7384
  // Generate unique IDs for accessibility
7374
7385
  const generatedId = React.useId();
@@ -8073,7 +8084,7 @@ Tooltip.displayName = TooltipPrimitive.Root.displayName;
8073
8084
  const TooltipTrigger = React.forwardRef<
8074
8085
  React.ElementRef<typeof TooltipPrimitive.Trigger>,
8075
8086
  React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>
8076
- >(({ onPointerDown, onClick, ...props }, ref) => {
8087
+ >(({ onPointerDown, onClick, className, ...props }, ref) => {
8077
8088
  const { tapMode, open, setOpen, isControlled, suppressFocusOpenRef } = useTooltipFieldContext();
8078
8089
 
8079
8090
  const onPointerDownForTap = React.useCallback(
@@ -8108,6 +8119,7 @@ const TooltipTrigger = React.forwardRef<
8108
8119
  <TooltipPrimitive.Trigger
8109
8120
  ref={ref}
8110
8121
  {...props}
8122
+ className={cn("cursor-pointer", className)}
8111
8123
  onPointerDown={(e) => {
8112
8124
  onPointerDown?.(e);
8113
8125
  if (!e.defaultPrevented) {
@@ -8131,7 +8143,7 @@ const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }
8131
8143
  ref={ref}
8132
8144
  sideOffset={sideOffset}
8133
8145
  className={cn(
8134
- "z-[9999] overflow-hidden rounded-md bg-semantic-primary px-3 py-1.5 text-xs text-semantic-text-inverted shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-w-xs whitespace-normal",
8146
+ "z-[9999] pointer-events-none data-[state=delayed-open]:pointer-events-auto data-[state=instant-open]:pointer-events-auto overflow-hidden rounded-md bg-semantic-primary px-3 py-1.5 text-xs text-semantic-text-inverted shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-w-xs whitespace-normal",
8135
8147
  className
8136
8148
  )}
8137
8149
  {...props}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.2.270",
3
+ "version": "0.2.271",
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",