myoperator-mcp 0.2.270 → 0.2.272

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 +22 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7251,6 +7251,12 @@ import { cva, type VariantProps } from "class-variance-authority";
7251
7251
 
7252
7252
  import { cn } from "@/lib/utils";
7253
7253
 
7254
+ // Length of the string with all whitespace removed. Inlined so the component
7255
+ // is self-contained when distributed via the CLI (consumer's lib/utils.ts is
7256
+ // scaffolded once at init and not updated by \`add\`).
7257
+ const countNonWhitespaceChars = (value: string): number =>
7258
+ String(value).replace(/\\s/g, "").length;
7259
+
7254
7260
  /**
7255
7261
  * Textarea variants for different visual states
7256
7262
  */
@@ -7278,6 +7284,7 @@ const textareaVariants = cva(
7278
7284
 
7279
7285
  /**
7280
7286
  * A multi-line text input with label, error state, helper text, character counter, and resize control.
7287
+ * With \`showCount\` and \`maxLength\`, the counter excludes all whitespace unless \`displayCharCount\` is set.
7281
7288
  *
7282
7289
  * @example
7283
7290
  * \`\`\`tsx
@@ -7307,6 +7314,12 @@ export interface TextareaProps
7307
7314
  errorIcon?: boolean;
7308
7315
  /** Shows character count when maxLength is set */
7309
7316
  showCount?: boolean;
7317
+ /**
7318
+ * When set, the counter shows this number instead of the default non-whitespace length
7319
+ * (see \`countNonWhitespaceChars\` defined in this file).
7320
+ * Does not change native \`maxLength\` or stored value \u2014 display only.
7321
+ */
7322
+ displayCharCount?: number;
7310
7323
  /**
7311
7324
  * When true (default), \`maxLength\` is applied to the native textarea (hard limit).
7312
7325
  * When false, the limit is only used for \`showCount\` / styling \u2014 pair with \`error\` or parent validation for soft limits.
@@ -7334,6 +7347,7 @@ const Textarea = React.forwardRef(
7334
7347
  error,
7335
7348
  errorIcon = false,
7336
7349
  showCount,
7350
+ displayCharCount,
7337
7351
  enforceMaxLength = true,
7338
7352
  resize = "none",
7339
7353
  maxLength,
@@ -7367,8 +7381,11 @@ const Textarea = React.forwardRef(
7367
7381
  onChange?.(e);
7368
7382
  };
7369
7383
 
7370
- // Character count
7371
- const charCount = String(currentValue).length;
7384
+ // Counter excludes whitespace so spacing between words does not consume the budget.
7385
+ const charCount =
7386
+ displayCharCount !== undefined
7387
+ ? displayCharCount
7388
+ : countNonWhitespaceChars(String(currentValue));
7372
7389
 
7373
7390
  // Generate unique IDs for accessibility
7374
7391
  const generatedId = React.useId();
@@ -8073,7 +8090,7 @@ Tooltip.displayName = TooltipPrimitive.Root.displayName;
8073
8090
  const TooltipTrigger = React.forwardRef<
8074
8091
  React.ElementRef<typeof TooltipPrimitive.Trigger>,
8075
8092
  React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>
8076
- >(({ onPointerDown, onClick, ...props }, ref) => {
8093
+ >(({ onPointerDown, onClick, className, ...props }, ref) => {
8077
8094
  const { tapMode, open, setOpen, isControlled, suppressFocusOpenRef } = useTooltipFieldContext();
8078
8095
 
8079
8096
  const onPointerDownForTap = React.useCallback(
@@ -8108,6 +8125,7 @@ const TooltipTrigger = React.forwardRef<
8108
8125
  <TooltipPrimitive.Trigger
8109
8126
  ref={ref}
8110
8127
  {...props}
8128
+ className={cn("cursor-pointer", className)}
8111
8129
  onPointerDown={(e) => {
8112
8130
  onPointerDown?.(e);
8113
8131
  if (!e.defaultPrevented) {
@@ -8131,7 +8149,7 @@ const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }
8131
8149
  ref={ref}
8132
8150
  sideOffset={sideOffset}
8133
8151
  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",
8152
+ "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
8153
  className
8136
8154
  )}
8137
8155
  {...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.272",
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",