myoperator-mcp 0.2.13 → 0.2.14

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 +241 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1398,6 +1398,160 @@ const MultiSelect = React.forwardRef<HTMLButtonElement, MultiSelectProps>(
1398
1398
  MultiSelect.displayName = "MultiSelect"
1399
1399
 
1400
1400
  export { MultiSelect, multiSelectTriggerVariants }
1401
+ `,
1402
+ "page-header": `import * as React from "react"
1403
+ import { cva, type VariantProps } from "class-variance-authority"
1404
+ import { ArrowLeft } from "lucide-react"
1405
+
1406
+ import { cn } from "@/lib/utils"
1407
+
1408
+ /**
1409
+ * PageHeader variants for layout styles.
1410
+ */
1411
+ const pageHeaderVariants = cva(
1412
+ "flex items-center w-full bg-white",
1413
+ {
1414
+ variants: {},
1415
+ defaultVariants: {},
1416
+ }
1417
+ )
1418
+
1419
+ /**
1420
+ * Page header component for displaying page titles with optional icons and actions.
1421
+ *
1422
+ * @example
1423
+ * \`\`\`tsx
1424
+ * // Simple header with icon
1425
+ * <PageHeader
1426
+ * icon={<WebhookIcon />}
1427
+ * title="Webhooks"
1428
+ * description="Manage your webhook integrations"
1429
+ * />
1430
+ *
1431
+ * // Header with actions
1432
+ * <PageHeader
1433
+ * icon={<WebhookIcon />}
1434
+ * title="Webhooks"
1435
+ * description="Manage your webhook integrations"
1436
+ * actions={<Button>Add Webhook</Button>}
1437
+ * />
1438
+ *
1439
+ * // Header with back button
1440
+ * <PageHeader
1441
+ * showBackButton
1442
+ * onBackClick={() => navigate(-1)}
1443
+ * title="Edit Webhook"
1444
+ * description="Modify webhook settings"
1445
+ * actions={<><Button variant="outline">Cancel</Button><Button>Save</Button></>}
1446
+ * />
1447
+ * \`\`\`
1448
+ */
1449
+ export interface PageHeaderProps
1450
+ extends React.HTMLAttributes<HTMLDivElement>,
1451
+ VariantProps<typeof pageHeaderVariants> {
1452
+ /** Page title (required) */
1453
+ title: string
1454
+ /** Optional description/subtitle displayed below the title */
1455
+ description?: string
1456
+ /** Icon displayed on the left side (hidden when showBackButton is true) */
1457
+ icon?: React.ReactNode
1458
+ /** Shows back arrow button instead of icon */
1459
+ showBackButton?: boolean
1460
+ /** Callback when back button is clicked */
1461
+ onBackClick?: () => void
1462
+ /** Optional info icon displayed next to the title (e.g., tooltip trigger) */
1463
+ infoIcon?: React.ReactNode
1464
+ /** Action buttons/elements rendered on the right side */
1465
+ actions?: React.ReactNode
1466
+ }
1467
+
1468
+ const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
1469
+ ({
1470
+ className,
1471
+ title,
1472
+ description,
1473
+ icon,
1474
+ showBackButton = false,
1475
+ onBackClick,
1476
+ infoIcon,
1477
+ actions,
1478
+ ...props
1479
+ }, ref) => {
1480
+ // Determine what to show on the left: back button, icon, or nothing
1481
+ const renderLeftElement = () => {
1482
+ if (showBackButton) {
1483
+ return (
1484
+ <button
1485
+ type="button"
1486
+ onClick={onBackClick}
1487
+ className="flex items-center justify-center w-10 h-10 rounded hover:bg-[#F3F4F6] transition-colors text-[#333333]"
1488
+ aria-label="Go back"
1489
+ >
1490
+ <ArrowLeft className="w-5 h-5" />
1491
+ </button>
1492
+ )
1493
+ }
1494
+ if (icon) {
1495
+ return (
1496
+ <div className="flex items-center justify-center w-10 h-10 [&_svg]:w-6 [&_svg]:h-6 text-[#6B7280]">
1497
+ {icon}
1498
+ </div>
1499
+ )
1500
+ }
1501
+ return null
1502
+ }
1503
+
1504
+ const leftElement = renderLeftElement()
1505
+
1506
+ return (
1507
+ <div
1508
+ ref={ref}
1509
+ className={cn(
1510
+ pageHeaderVariants(),
1511
+ "h-[76px] px-4 pt-4",
1512
+ className
1513
+ )}
1514
+ {...props}
1515
+ >
1516
+ {/* Left Section: Icon or Back Button */}
1517
+ {leftElement && (
1518
+ <div className="flex-shrink-0 mr-4">
1519
+ {leftElement}
1520
+ </div>
1521
+ )}
1522
+
1523
+ {/* Content Section: Title + Description */}
1524
+ <div className="flex-1 min-w-0">
1525
+ <div className="flex items-center gap-2">
1526
+ <h1 className="text-base font-semibold text-[#333333] truncate">
1527
+ {title}
1528
+ </h1>
1529
+ {infoIcon && (
1530
+ <span className="flex-shrink-0 [&_svg]:w-4 [&_svg]:h-4 text-[#6B7280]">
1531
+ {infoIcon}
1532
+ </span>
1533
+ )}
1534
+ </div>
1535
+ {description && (
1536
+ <p className="text-sm text-[#333333] font-normal mt-1 truncate">
1537
+ {description}
1538
+ </p>
1539
+ )}
1540
+ </div>
1541
+
1542
+ {/* Actions Section */}
1543
+ {actions && (
1544
+ <div className="flex-shrink-0 flex items-center gap-2 ml-4">
1545
+ {actions}
1546
+ </div>
1547
+ )}
1548
+ </div>
1549
+ )
1550
+ }
1551
+ )
1552
+ PageHeader.displayName = "PageHeader"
1553
+
1554
+ export { PageHeader, pageHeaderVariants }
1401
1555
  `,
1402
1556
  "select-field": `import * as React from "react"
1403
1557
  import { Loader2 } from "lucide-react"
@@ -2675,6 +2829,55 @@ const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(
2675
2829
  TextField.displayName = "TextField"
2676
2830
 
2677
2831
  export { TextField, textFieldContainerVariants, textFieldInputVariants }
2832
+ `,
2833
+ "tooltip": `import * as React from "react"
2834
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip"
2835
+
2836
+ import { cn } from "@/lib/utils"
2837
+
2838
+ const TooltipProvider = TooltipPrimitive.Provider
2839
+
2840
+ const Tooltip = TooltipPrimitive.Root
2841
+
2842
+ const TooltipTrigger = TooltipPrimitive.Trigger
2843
+
2844
+ const TooltipContent = React.forwardRef<
2845
+ React.ElementRef<typeof TooltipPrimitive.Content>,
2846
+ React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
2847
+ >(({ className, sideOffset = 4, ...props }, ref) => (
2848
+ <TooltipPrimitive.Portal>
2849
+ <TooltipPrimitive.Content
2850
+ ref={ref}
2851
+ sideOffset={sideOffset}
2852
+ className={cn(
2853
+ "z-50 overflow-hidden rounded-md bg-[#343E55] px-3 py-1.5 text-xs text-white 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",
2854
+ className
2855
+ )}
2856
+ {...props}
2857
+ />
2858
+ </TooltipPrimitive.Portal>
2859
+ ))
2860
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName
2861
+
2862
+ const TooltipArrow = React.forwardRef<
2863
+ React.ElementRef<typeof TooltipPrimitive.Arrow>,
2864
+ React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>
2865
+ >(({ className, ...props }, ref) => (
2866
+ <TooltipPrimitive.Arrow
2867
+ ref={ref}
2868
+ className={cn("fill-[#343E55]", className)}
2869
+ {...props}
2870
+ />
2871
+ ))
2872
+ TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName
2873
+
2874
+ export {
2875
+ Tooltip,
2876
+ TooltipTrigger,
2877
+ TooltipContent,
2878
+ TooltipArrow,
2879
+ TooltipProvider,
2880
+ }
2678
2881
  `
2679
2882
  };
2680
2883
  var utilsSourceCode = `import { type ClassValue, clsx } from "clsx"
@@ -3170,6 +3373,25 @@ var componentMetadata = {
3170
3373
  }
3171
3374
  ]
3172
3375
  },
3376
+ "page-header": {
3377
+ "name": "PageHeader",
3378
+ "description": "A page header component.",
3379
+ "dependencies": [
3380
+ "class-variance-authority",
3381
+ "clsx",
3382
+ "tailwind-merge",
3383
+ "lucide-react"
3384
+ ],
3385
+ "props": [],
3386
+ "variants": [],
3387
+ "examples": [
3388
+ {
3389
+ "title": "Basic PageHeader",
3390
+ "code": "<PageHeader>Content</PageHeader>",
3391
+ "description": "Simple page header usage"
3392
+ }
3393
+ ]
3394
+ },
3173
3395
  "select-field": {
3174
3396
  "name": "SelectField",
3175
3397
  "description": "A form-ready select component with label, helper text, error handling, and grouped options support.",
@@ -3552,6 +3774,25 @@ var componentMetadata = {
3552
3774
  "description": "Text field showing error state"
3553
3775
  }
3554
3776
  ]
3777
+ },
3778
+ "tooltip": {
3779
+ "name": "Tooltip",
3780
+ "description": "A tooltip component.",
3781
+ "dependencies": [
3782
+ "@radix-ui/react-tooltip",
3783
+ "class-variance-authority",
3784
+ "clsx",
3785
+ "tailwind-merge"
3786
+ ],
3787
+ "props": [],
3788
+ "variants": [],
3789
+ "examples": [
3790
+ {
3791
+ "title": "Basic Tooltip",
3792
+ "code": "<Tooltip>Content</Tooltip>",
3793
+ "description": "Simple tooltip usage"
3794
+ }
3795
+ ]
3555
3796
  }
3556
3797
  };
3557
3798
  function getComponentNames() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
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",