myoperator-mcp 0.2.259 → 0.2.260

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 +16 -143
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -815,13 +815,7 @@ import { cva, type VariantProps } from "class-variance-authority";
815
815
  import { cn } from "@/lib/utils";
816
816
 
817
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";
818
+ const DOT_DELAYS_SEC = [0, 0.2, 0.4] as const;
825
819
 
826
820
  function toCssLength(value: number | string, unit: string): string {
827
821
  if (typeof value === "string") {
@@ -831,34 +825,12 @@ function toCssLength(value: number | string, unit: string): string {
831
825
  }
832
826
 
833
827
  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
- }
828
+ "bouncing-loader inline-flex shrink-0 min-w-0 items-center justify-center leading-[0] align-middle gap-[var(--bouncing-loader-spacing,0.375rem)]"
846
829
  );
847
830
 
848
831
  export interface BouncingLoaderProps
849
- extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">,
832
+ extends React.HTMLAttributes<HTMLSpanElement>,
850
833
  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
834
  /**
863
835
  * Dot diameter. Number is treated as pixels; string is used as a CSS length
864
836
  * (e.g. \`"0.5rem"\`, \`"12px"\`).
@@ -866,144 +838,45 @@ export interface BouncingLoaderProps
866
838
  size?: number | string;
867
839
  /**
868
840
  * 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
841
  */
872
842
  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
843
  /**
879
844
  * Space between dots. Number is pixel gap; string is a CSS length (e.g. \`"0.5rem"\`).
880
845
  */
881
846
  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
847
  }
905
848
 
906
849
  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
-
850
+ ({ className, size, color, spacing, style, ...props }, ref) => {
963
851
  const mergedStyle: React.CSSProperties = {
964
852
  ...style,
965
- ...(effectiveSize !== undefined && {
966
- ["--bouncing-loader-size" as string]: toCssLength(effectiveSize, "px"),
967
- }),
968
- ...(effectiveColor !== undefined && {
969
- ["--bouncing-loader-color" as string]: effectiveColor,
853
+ ...(size !== undefined && {
854
+ ["--bouncing-loader-size" as string]: toCssLength(size, "px"),
970
855
  }),
971
- ...(colorDark !== undefined && {
972
- ["--bouncing-loader-color-dark" as string]: colorDark,
856
+ ...(color !== undefined && {
857
+ ["--bouncing-loader-color" as string]: color,
973
858
  }),
974
- ...(effectiveSpacing !== undefined && {
975
- ["--bouncing-loader-spacing" as string]: toCssLength(effectiveSpacing, "px"),
859
+ ...(spacing !== undefined && {
860
+ ["--bouncing-loader-spacing" as string]: toCssLength(spacing, "px"),
976
861
  }),
977
- ["--bouncing-loader-duration" as string]: \`\${duration}s\`,
978
- ["--bouncing-loader-bounce" as string]: toCssLength(bounce, "px"),
979
862
  };
980
863
 
981
864
  return (
982
865
  <span
983
866
  ref={ref}
984
- className={cn(
985
- bouncingLoaderVariants({ fullWidth }),
986
- frame === "pill" && "rounded-full bg-white p-5",
987
- className
988
- )}
867
+ role="status"
868
+ aria-live="polite"
869
+ aria-label="Loading"
870
+ className={cn(bouncingLoaderVariants(), className)}
989
871
  style={mergedStyle}
990
872
  {...props}
991
873
  >
992
874
  {DOT_KEYS.map((i) => (
993
875
  <span
994
876
  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
- )}
877
+ className="bouncing-loader__dot box-border block h-[var(--bouncing-loader-size,8px)] w-[var(--bouncing-loader-size,8px)] shrink-0 rounded-full bg-[var(--bouncing-loader-color,var(--semantic-text-placeholder,currentColor))] animate-bouncing-typing-wave"
1002
878
  style={{
1003
- animationDelay: animationDelayForDot(i),
1004
- ...(isDotsBounce && {
1005
- animationDuration: \`\${duration}s\`,
1006
- }),
879
+ ["--bouncing-loader-delay" as string]: \`\${DOT_DELAYS_SEC[i]}s\`,
1007
880
  }}
1008
881
  aria-hidden
1009
882
  />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.2.259",
3
+ "version": "0.2.260",
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",