myoperator-mcp 0.2.67 → 0.2.69

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 +237 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3279,6 +3279,207 @@ export {
3279
3279
  SelectScrollDownButton,
3280
3280
  selectTriggerVariants,
3281
3281
  };
3282
+ `,
3283
+ "skeleton": `import * as React from "react";
3284
+ import { cva, type VariantProps } from "class-variance-authority";
3285
+
3286
+ import { cn } from "@/lib/utils";
3287
+
3288
+ /**
3289
+ * Skeleton variants for content placeholders.
3290
+ * Uses semantic background tokens for consistent theming.
3291
+ */
3292
+ const skeletonVariants = cva("animate-pulse", {
3293
+ variants: {
3294
+ variant: {
3295
+ default: "bg-semantic-bg-grey",
3296
+ subtle: "bg-semantic-bg-ui",
3297
+ },
3298
+ shape: {
3299
+ line: "h-4 w-full rounded",
3300
+ circle: "rounded-full",
3301
+ rectangle: "rounded",
3302
+ },
3303
+ },
3304
+ defaultVariants: {
3305
+ variant: "default",
3306
+ shape: "line",
3307
+ },
3308
+ });
3309
+
3310
+ /**
3311
+ * A placeholder loading component with pulse animation for content loading states.
3312
+ * Use shape, width, and height props to match the content being loaded.
3313
+ *
3314
+ * @example
3315
+ * \`\`\`tsx
3316
+ * // Text line placeholder
3317
+ * <Skeleton />
3318
+ *
3319
+ * // Avatar placeholder
3320
+ * <Skeleton shape="circle" width={40} height={40} />
3321
+ *
3322
+ * // Image/card placeholder
3323
+ * <Skeleton shape="rectangle" width="100%" height={200} />
3324
+ *
3325
+ * // Subtle variant
3326
+ * <Skeleton variant="subtle" />
3327
+ * \`\`\`
3328
+ */
3329
+ export interface SkeletonProps
3330
+ extends React.HTMLAttributes<HTMLDivElement>,
3331
+ VariantProps<typeof skeletonVariants> {
3332
+ /** Width of the skeleton (number for px, string for any CSS value) */
3333
+ width?: number | string;
3334
+ /** Height of the skeleton (number for px, string for any CSS value) */
3335
+ height?: number | string;
3336
+ }
3337
+
3338
+ const Skeleton = React.forwardRef<HTMLDivElement, SkeletonProps>(
3339
+ ({ className, variant, shape, width, height, style, ...props }, ref) => {
3340
+ const dimensionStyle: React.CSSProperties = {
3341
+ ...style,
3342
+ ...(width !== undefined
3343
+ ? { width: typeof width === "number" ? \`\${width}px\` : width }
3344
+ : {}),
3345
+ ...(height !== undefined
3346
+ ? { height: typeof height === "number" ? \`\${height}px\` : height }
3347
+ : {}),
3348
+ };
3349
+
3350
+ return (
3351
+ <div
3352
+ ref={ref}
3353
+ aria-hidden="true"
3354
+ className={cn(skeletonVariants({ variant, shape, className }))}
3355
+ style={dimensionStyle}
3356
+ {...props}
3357
+ />
3358
+ );
3359
+ }
3360
+ );
3361
+ Skeleton.displayName = "Skeleton";
3362
+
3363
+ export { Skeleton, skeletonVariants };
3364
+ `,
3365
+ "spinner": `import * as React from "react";
3366
+ import { cva, type VariantProps } from "class-variance-authority";
3367
+
3368
+ import { cn } from "@/lib/utils";
3369
+
3370
+ /**
3371
+ * Spinner variants for loading indicators.
3372
+ * Uses semantic color tokens for consistent theming.
3373
+ */
3374
+ const spinnerVariants = cva("animate-spin", {
3375
+ variants: {
3376
+ size: {
3377
+ sm: "size-4",
3378
+ default: "size-6",
3379
+ lg: "size-8",
3380
+ xl: "size-12",
3381
+ },
3382
+ variant: {
3383
+ default: "text-semantic-primary",
3384
+ secondary: "text-semantic-text-secondary",
3385
+ muted: "text-semantic-text-muted",
3386
+ inverted: "text-white",
3387
+ current: "text-current",
3388
+ },
3389
+ },
3390
+ defaultVariants: {
3391
+ size: "default",
3392
+ variant: "default",
3393
+ },
3394
+ });
3395
+
3396
+ /**
3397
+ * SVG stroke widths that decrease as size increases for visual balance.
3398
+ */
3399
+ const strokeWidths: Record<string, number> = {
3400
+ sm: 3,
3401
+ default: 3,
3402
+ lg: 2.5,
3403
+ xl: 2,
3404
+ };
3405
+
3406
+ /**
3407
+ * A loading spinner component with customizable size and color variants.
3408
+ * Uses a custom SVG circle with a visible track and animated arc.
3409
+ *
3410
+ * @example
3411
+ * \`\`\`tsx
3412
+ * <Spinner />
3413
+ * <Spinner size="sm" variant="muted" />
3414
+ * <Spinner size="lg" variant="current" />
3415
+ * <Spinner variant="inverted" aria-label="Saving changes" />
3416
+ * \`\`\`
3417
+ */
3418
+ export interface SpinnerProps
3419
+ extends React.HTMLAttributes<HTMLDivElement>,
3420
+ VariantProps<typeof spinnerVariants> {
3421
+ /** Accessible label for the spinner (default: "Loading") */
3422
+ "aria-label"?: string;
3423
+ }
3424
+
3425
+ const Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(
3426
+ (
3427
+ {
3428
+ className,
3429
+ size = "default",
3430
+ variant,
3431
+ "aria-label": ariaLabel = "Loading",
3432
+ ...props
3433
+ },
3434
+ ref
3435
+ ) => {
3436
+ const strokeWidth = strokeWidths[size || "default"] ?? 3;
3437
+ const radius = 10;
3438
+ const circumference = 2 * Math.PI * radius;
3439
+
3440
+ return (
3441
+ <div
3442
+ ref={ref}
3443
+ role="status"
3444
+ aria-label={ariaLabel}
3445
+ className={cn("inline-flex shrink-0", className)}
3446
+ {...props}
3447
+ >
3448
+ <svg
3449
+ className={cn(spinnerVariants({ size, variant }))}
3450
+ viewBox="0 0 24 24"
3451
+ fill="none"
3452
+ xmlns="http://www.w3.org/2000/svg"
3453
+ >
3454
+ {/* Track circle */}
3455
+ <circle
3456
+ cx="12"
3457
+ cy="12"
3458
+ r={radius}
3459
+ stroke="currentColor"
3460
+ strokeWidth={strokeWidth}
3461
+ opacity="0.25"
3462
+ />
3463
+ {/* Active arc */}
3464
+ <circle
3465
+ cx="12"
3466
+ cy="12"
3467
+ r={radius}
3468
+ stroke="currentColor"
3469
+ strokeWidth={strokeWidth}
3470
+ strokeLinecap="round"
3471
+ strokeDasharray={circumference}
3472
+ strokeDashoffset={circumference * 0.75}
3473
+ />
3474
+ </svg>
3475
+ <span className="sr-only">{ariaLabel}</span>
3476
+ </div>
3477
+ );
3478
+ }
3479
+ );
3480
+ Spinner.displayName = "Spinner";
3481
+
3482
+ export { Spinner, spinnerVariants };
3282
3483
  `,
3283
3484
  "switch": `import * as React from "react";
3284
3485
  import * as SwitchPrimitives from "@radix-ui/react-switch";
@@ -5588,6 +5789,42 @@ var componentMetadata = {
5588
5789
  }
5589
5790
  ]
5590
5791
  },
5792
+ "skeleton": {
5793
+ "name": "Skeleton",
5794
+ "description": "A skeleton component.",
5795
+ "dependencies": [
5796
+ "class-variance-authority",
5797
+ "clsx",
5798
+ "tailwind-merge"
5799
+ ],
5800
+ "props": [],
5801
+ "variants": [],
5802
+ "examples": [
5803
+ {
5804
+ "title": "Basic Skeleton",
5805
+ "code": "<Skeleton>Content</Skeleton>",
5806
+ "description": "Simple skeleton usage"
5807
+ }
5808
+ ]
5809
+ },
5810
+ "spinner": {
5811
+ "name": "Spinner",
5812
+ "description": "A spinner component.",
5813
+ "dependencies": [
5814
+ "class-variance-authority",
5815
+ "clsx",
5816
+ "tailwind-merge"
5817
+ ],
5818
+ "props": [],
5819
+ "variants": [],
5820
+ "examples": [
5821
+ {
5822
+ "title": "Basic Spinner",
5823
+ "code": "<Spinner>Content</Spinner>",
5824
+ "description": "Simple spinner usage"
5825
+ }
5826
+ ]
5827
+ },
5591
5828
  "switch": {
5592
5829
  "name": "Switch",
5593
5830
  "description": "A switch component built on Radix UI for boolean inputs with on/off states. Supports labels and multiple sizes.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.2.67",
3
+ "version": "0.2.69",
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",