myoperator-mcp 0.2.377 → 0.2.378

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 +90 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8518,6 +8518,49 @@ function PaginationEllipsis({
8518
8518
  }
8519
8519
  PaginationEllipsis.displayName = "PaginationEllipsis";
8520
8520
 
8521
+ export interface PaginationInfoProps extends React.ComponentProps<"p"> {
8522
+ /** Current page (1-based) */
8523
+ currentPage: number;
8524
+ /** Number of items shown per page */
8525
+ pageSize: number;
8526
+ /** Total number of items across all pages */
8527
+ totalItems: number;
8528
+ /** Leading label before the range (default: "Showing") */
8529
+ label?: string;
8530
+ /** Additional CSS classes */
8531
+ className?: string;
8532
+ }
8533
+
8534
+ function PaginationInfo({
8535
+ currentPage,
8536
+ pageSize,
8537
+ totalItems,
8538
+ label = "Showing",
8539
+ className,
8540
+ ...props
8541
+ }: PaginationInfoProps) {
8542
+ const startItem = totalItems === 0 ? 0 : (currentPage - 1) * pageSize + 1;
8543
+ const endItem = Math.min(currentPage * pageSize, totalItems);
8544
+
8545
+ return (
8546
+ <p
8547
+ data-slot="pagination-info"
8548
+ aria-live="polite"
8549
+ className={cn(
8550
+ "m-0 text-sm text-semantic-text-muted whitespace-nowrap",
8551
+ className
8552
+ )}
8553
+ {...props}
8554
+ >
8555
+ {label}{" "}
8556
+ <span className="font-medium text-semantic-text-primary">
8557
+ {startItem}\u2013{endItem} of {totalItems}
8558
+ </span>
8559
+ </p>
8560
+ );
8561
+ }
8562
+ PaginationInfo.displayName = "PaginationInfo";
8563
+
8521
8564
  export interface PaginationWidgetProps {
8522
8565
  /** Current page (1-based) */
8523
8566
  currentPage: number;
@@ -8527,7 +8570,13 @@ export interface PaginationWidgetProps {
8527
8570
  onPageChange: (page: number) => void;
8528
8571
  /** Number of pages shown on each side of current page (default: 1) */
8529
8572
  siblingCount?: number;
8530
- /** Additional CSS classes */
8573
+ /** Total number of items \u2014 required to render the "Showing X-Y of Z" summary */
8574
+ totalItems?: number;
8575
+ /** Items per page \u2014 required to render the "Showing X-Y of Z" summary */
8576
+ pageSize?: number;
8577
+ /** Horizontal placement of the page controls (default: "center", or "end" when the summary is shown) */
8578
+ align?: "start" | "center" | "end";
8579
+ /** Additional CSS classes for the outer wrapper */
8531
8580
  className?: string;
8532
8581
  }
8533
8582
 
@@ -8569,17 +8618,35 @@ function usePaginationRange(
8569
8618
  return pages;
8570
8619
  }
8571
8620
 
8621
+ const paginationAlignClasses = {
8622
+ start: "justify-start",
8623
+ center: "justify-center",
8624
+ end: "justify-end",
8625
+ } as const;
8626
+
8572
8627
  function PaginationWidget({
8573
8628
  currentPage,
8574
8629
  totalPages,
8575
8630
  onPageChange,
8576
8631
  siblingCount = 1,
8632
+ totalItems,
8633
+ pageSize,
8634
+ align,
8577
8635
  className,
8578
8636
  }: PaginationWidgetProps) {
8579
8637
  const pages = usePaginationRange(currentPage, totalPages, siblingCount);
8638
+ const showInfo = totalItems !== undefined && pageSize !== undefined;
8639
+ const resolvedAlign = align ?? (showInfo ? "end" : "center");
8580
8640
 
8581
- return (
8582
- <Pagination className={className}>
8641
+ const controls = (
8642
+ <Pagination
8643
+ className={cn(
8644
+ "mx-0 w-auto",
8645
+ paginationAlignClasses[resolvedAlign],
8646
+ !showInfo && "w-full",
8647
+ !showInfo && className
8648
+ )}
8649
+ >
8583
8650
  <PaginationContent>
8584
8651
  <PaginationItem>
8585
8652
  <PaginationPrevious
@@ -8624,6 +8691,25 @@ function PaginationWidget({
8624
8691
  </PaginationContent>
8625
8692
  </Pagination>
8626
8693
  );
8694
+
8695
+ if (!showInfo) return controls;
8696
+
8697
+ return (
8698
+ <div
8699
+ data-slot="pagination-widget"
8700
+ className={cn(
8701
+ "flex w-full flex-col items-start gap-3 sm:flex-row sm:items-center sm:justify-between",
8702
+ className
8703
+ )}
8704
+ >
8705
+ <PaginationInfo
8706
+ currentPage={currentPage}
8707
+ pageSize={pageSize}
8708
+ totalItems={totalItems}
8709
+ />
8710
+ {controls}
8711
+ </div>
8712
+ );
8627
8713
  }
8628
8714
  PaginationWidget.displayName = "PaginationWidget";
8629
8715
 
@@ -8635,6 +8721,7 @@ export {
8635
8721
  PaginationPrevious,
8636
8722
  PaginationNext,
8637
8723
  PaginationEllipsis,
8724
+ PaginationInfo,
8638
8725
  PaginationWidget,
8639
8726
  };
8640
8727
  `,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.2.377",
3
+ "version": "0.2.378",
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",