myoperator-mcp 0.2.255 → 0.2.257

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 +225 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -808,6 +808,213 @@ const Badge = React.forwardRef(
808
808
  Badge.displayName = "Badge";
809
809
 
810
810
  export { Badge, badgeVariants };
811
+ `,
812
+ "bouncing-loader": `import * as React from "react";
813
+ import { cva, type VariantProps } from "class-variance-authority";
814
+
815
+ import { cn } from "@/lib/utils";
816
+
817
+ const DOT_KEYS = [0, 1, 2] as const;
818
+
819
+ /** Delays (seconds) for \`type="staggered"\` \u2014 matches the common 0.1s / 0.3s / 0.6s pattern. */
820
+ const STAGGERED_BOUNCE_DELAYS_SEC = [0.1, 0.3, 0.6] as const;
821
+
822
+ export type BouncingLoaderType = "default" | "staggered";
823
+
824
+ export type BouncingLoaderFrame = "none" | "pill";
825
+
826
+ function toCssLength(value: number | string, unit: string): string {
827
+ if (typeof value === "string") {
828
+ return value;
829
+ }
830
+ return \`\${value}\${unit}\`;
831
+ }
832
+
833
+ const bouncingLoaderVariants = cva(
834
+ "bouncing-loader min-w-0 items-center justify-center leading-[0] align-middle gap-[var(--bouncing-loader-spacing,0.375rem)]",
835
+ {
836
+ variants: {
837
+ fullWidth: {
838
+ true: "bouncing-loader--full-width flex w-full",
839
+ false: "inline-flex shrink-0",
840
+ },
841
+ },
842
+ defaultVariants: {
843
+ fullWidth: false,
844
+ },
845
+ }
846
+ );
847
+
848
+ export interface BouncingLoaderProps
849
+ extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">,
850
+ VariantProps<typeof bouncingLoaderVariants> {
851
+ /**
852
+ * \`default\` \u2014 \`effect\` controls the animation.
853
+ * \`staggered\` \u2014 Tailwind \`animate-bounce\` with **0.5s** duration and per-dot delays
854
+ * **0.1s / 0.3s / 0.6s** (overrides \`effect\` for the animation). Sensible defaults: 20px dots,
855
+ * 12px gap, \`var(--color-neutral-800)\` (override with \`size\` / \`spacing\` / \`color\`).
856
+ */
857
+ type?: BouncingLoaderType;
858
+ /**
859
+ * \`pill\` \u2014 white rounded container with padding (like \`bg-white p-5 rounded-full\` around the row).
860
+ */
861
+ frame?: BouncingLoaderFrame;
862
+ /**
863
+ * Dot diameter. Number is treated as pixels; string is used as a CSS length
864
+ * (e.g. \`"0.5rem"\`, \`"12px"\`).
865
+ */
866
+ size?: number | string;
867
+ /**
868
+ * Dot fill. Any valid CSS color (e.g. semantic token: \`var(--semantic-text-placeholder)\`).
869
+ * When omitted, the placeholder token is used via the default background chain.
870
+ * Use with \`colorDark\` to mirror \`bg-\u2026\` / \`dark:bg-\u2026\` in plain HTML.
871
+ */
872
+ color?: string;
873
+ /**
874
+ * Optional dot fill when \`.dark\` is on an ancestor. If omitted, one fill (from \`color\` or
875
+ * the default placeholder) is used in both themes.
876
+ */
877
+ colorDark?: string;
878
+ /**
879
+ * Space between dots. Number is pixel gap; string is a CSS length (e.g. \`"0.5rem"\`).
880
+ */
881
+ spacing?: number | string;
882
+ /**
883
+ * Extra delay per dot (seconds) as \`i * delay\`. \`wave\` defaults to \`duration/3\`;
884
+ * \`dots-bounce\` / \`tailwind-bounce\` default to \`0.2\` (0s / 0.2s / 0.4s); \`bounce\` defaults
885
+ * to \`0.12s\`.
886
+ */
887
+ staggerDelay?: number;
888
+ /**
889
+ * One full animation loop (seconds) per dot, via \`--bouncing-loader-duration\`.
890
+ */
891
+ duration?: number;
892
+ /**
893
+ * Vertical travel at the peak. Number = pixels; string = any CSS length. Sets
894
+ * \`--bouncing-loader-bounce\`.
895
+ */
896
+ bounce?: number | string;
897
+ /**
898
+ * \`wave\` (default) \u2014 one quick lift per cycle, staggered: classic typing-dot wave.
899
+ * \`bounce\` \u2014 each dot runs a continuous up/down loop (sine-like bounce, not a row wave).
900
+ * \`dots-bounce\` \u2014 Tailwind\u2019s \`animate-bounce\` with staggered delays
901
+ * (default 0.2s, like 0s / 0.2s / 0.4s). Alias: \`tailwind-bounce\`.
902
+ */
903
+ effect?: "wave" | "bounce" | "dots-bounce" | "tailwind-bounce";
904
+ }
905
+
906
+ const BouncingLoader = React.forwardRef<HTMLSpanElement, BouncingLoaderProps>(
907
+ (
908
+ {
909
+ className,
910
+ type: typeProp = "default",
911
+ frame = "none",
912
+ size,
913
+ color,
914
+ colorDark,
915
+ spacing,
916
+ staggerDelay: staggerProp,
917
+ duration: userDuration,
918
+ bounce = 4,
919
+ effect = "wave",
920
+ fullWidth,
921
+ style,
922
+ ...props
923
+ },
924
+ ref
925
+ ) => {
926
+ const isStaggeredType = typeProp === "staggered";
927
+ const isDotsBounce =
928
+ isStaggeredType || effect === "dots-bounce" || effect === "tailwind-bounce";
929
+
930
+ const duration = userDuration ?? (isStaggeredType ? 0.5 : isDotsBounce ? 1 : 0.6);
931
+
932
+ const staggerDelay =
933
+ staggerProp ??
934
+ (effect === "wave" && !isStaggeredType
935
+ ? duration / 3
936
+ : isDotsBounce
937
+ ? 0.2
938
+ : 0.12);
939
+
940
+ const waveClass = !isDotsBounce && effect === "wave" && "animate-bouncing-typing-wave";
941
+ const bounceClass = !isDotsBounce && effect === "bounce" && "animate-bouncing-bounce";
942
+ const dotsBounceClass = isDotsBounce && "animate-bounce";
943
+
944
+ const effectiveSize = size ?? (isStaggeredType ? 20 : undefined);
945
+ const effectiveSpacing = spacing ?? (isStaggeredType ? 12 : undefined);
946
+ const effectiveColor = color ?? (isStaggeredType ? "var(--color-neutral-800)" : undefined);
947
+
948
+ const dotBgClass =
949
+ colorDark !== undefined
950
+ ? "bg-[var(--bouncing-loader-color,var(--semantic-text-placeholder,currentColor))] dark:bg-[var(--bouncing-loader-color-dark)]"
951
+ : "bg-[var(--bouncing-loader-color,var(--semantic-text-placeholder,currentColor))]";
952
+
953
+ const animationDelayForDot = (i: number): string => {
954
+ if (isStaggeredType) {
955
+ if (staggerProp !== undefined) {
956
+ return \`\${i * staggerProp}s\`;
957
+ }
958
+ return \`\${STAGGERED_BOUNCE_DELAYS_SEC[i]}s\`;
959
+ }
960
+ return \`\${i * staggerDelay}s\`;
961
+ };
962
+
963
+ const mergedStyle: React.CSSProperties = {
964
+ ...style,
965
+ ...(effectiveSize !== undefined && {
966
+ ["--bouncing-loader-size" as string]: toCssLength(effectiveSize, "px"),
967
+ }),
968
+ ...(effectiveColor !== undefined && {
969
+ ["--bouncing-loader-color" as string]: effectiveColor,
970
+ }),
971
+ ...(colorDark !== undefined && {
972
+ ["--bouncing-loader-color-dark" as string]: colorDark,
973
+ }),
974
+ ...(effectiveSpacing !== undefined && {
975
+ ["--bouncing-loader-spacing" as string]: toCssLength(effectiveSpacing, "px"),
976
+ }),
977
+ ["--bouncing-loader-duration" as string]: \`\${duration}s\`,
978
+ ["--bouncing-loader-bounce" as string]: toCssLength(bounce, "px"),
979
+ };
980
+
981
+ return (
982
+ <span
983
+ ref={ref}
984
+ className={cn(
985
+ bouncingLoaderVariants({ fullWidth }),
986
+ frame === "pill" && "rounded-full bg-white p-5",
987
+ className
988
+ )}
989
+ style={mergedStyle}
990
+ {...props}
991
+ >
992
+ {DOT_KEYS.map((i) => (
993
+ <span
994
+ key={i}
995
+ className={cn(
996
+ "bouncing-loader__dot box-border block h-[var(--bouncing-loader-size,8px)] w-[var(--bouncing-loader-size,8px)] shrink-0 rounded-full",
997
+ dotBgClass,
998
+ waveClass,
999
+ bounceClass,
1000
+ dotsBounceClass
1001
+ )}
1002
+ style={{
1003
+ animationDelay: animationDelayForDot(i),
1004
+ ...(isDotsBounce && {
1005
+ animationDuration: \`\${duration}s\`,
1006
+ }),
1007
+ }}
1008
+ aria-hidden
1009
+ />
1010
+ ))}
1011
+ </span>
1012
+ );
1013
+ }
1014
+ );
1015
+ BouncingLoader.displayName = "BouncingLoader";
1016
+
1017
+ export { BouncingLoader, bouncingLoaderVariants };
811
1018
  `,
812
1019
  "button": `import * as React from "react";
813
1020
  import { Slot } from "@radix-ui/react-slot";
@@ -8347,6 +8554,24 @@ var componentMetadata = {
8347
8554
  }
8348
8555
  ]
8349
8556
  },
8557
+ "bouncing-loader": {
8558
+ "name": "BouncingLoader",
8559
+ "description": "A bouncing loader component.",
8560
+ "dependencies": [
8561
+ "class-variance-authority",
8562
+ "clsx",
8563
+ "tailwind-merge"
8564
+ ],
8565
+ "props": [],
8566
+ "variants": [],
8567
+ "examples": [
8568
+ {
8569
+ "title": "Basic BouncingLoader",
8570
+ "code": "<BouncingLoader>Content</BouncingLoader>",
8571
+ "description": "Simple bouncing loader usage"
8572
+ }
8573
+ ]
8574
+ },
8350
8575
  "button": {
8351
8576
  "name": "Button",
8352
8577
  "description": "A customizable button component with variants, sizes, and icons. Supports loading states and can render as a child element using Radix Slot.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.2.255",
3
+ "version": "0.2.257",
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",