@moontra/moonui-pro 3.3.13 → 3.3.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.
package/dist/index.d.ts CHANGED
@@ -6211,7 +6211,7 @@ interface CodeSnippetsProps {
6211
6211
  /** Pozisyon türü - fixed veya absolute */
6212
6212
  position?: "fixed" | "absolute";
6213
6213
  }
6214
- declare function CodeSnippets({ snippets, variant, speed, density, opacity, showIcons, glowEffect, className, multiplier, position }: CodeSnippetsProps): react_jsx_runtime.JSX.Element | null;
6214
+ declare function CodeSnippets({ snippets, variant, speed, density, opacity, showIcons, glowEffect, className, multiplier, position }: CodeSnippetsProps): react_jsx_runtime.JSX.Element;
6215
6215
  declare const codeSnippetsPresets: {
6216
6216
  readonly default: {
6217
6217
  readonly snippets: CodeSnippet[];
package/dist/index.mjs CHANGED
@@ -91562,19 +91562,18 @@ function FloatingCodeItem({
91562
91562
  showIcons,
91563
91563
  glowEffect
91564
91564
  }) {
91565
- const [position, setPosition] = useState({ x: 0, y: 0 });
91566
- useEffect(() => {
91567
- setPosition({
91568
- x: Math.random() * 100,
91569
- y: Math.random() * 100
91570
- });
91571
- }, []);
91565
+ const position = useMemo(() => ({
91566
+ x: index2 * 137.5 % 100,
91567
+ // Deterministik position hesaplama
91568
+ y: index2 * 73.2 % 100
91569
+ }), [index2]);
91572
91570
  const animationConfig = useMemo(() => {
91573
91571
  switch (variant) {
91574
91572
  case "float":
91575
91573
  return {
91576
91574
  animate: {
91577
- opacity: [0.3, 0.7, 0.3],
91575
+ opacity: [0.4, 0.6, 0.4],
91576
+ // Daha smooth opacity geçişi
91578
91577
  y: [0, -30, -60],
91579
91578
  x: [0, Math.random() * 20 - 10, Math.random() * 40 - 20],
91580
91579
  rotate: [0, Math.random() * 10 - 5, Math.random() * 20 - 10],
@@ -91607,7 +91606,8 @@ function FloatingCodeItem({
91607
91606
  const angle = index2 * 360 / 8 * Math.PI / 180;
91608
91607
  return {
91609
91608
  animate: {
91610
- opacity: [0.4, 0.8, 0.4],
91609
+ opacity: [0.4, 0.6, 0.4],
91610
+ // Daha smooth opacity
91611
91611
  x: [
91612
91612
  Math.cos(angle) * radius,
91613
91613
  Math.cos(angle + Math.PI) * radius,
@@ -91629,7 +91629,8 @@ function FloatingCodeItem({
91629
91629
  case "wave":
91630
91630
  return {
91631
91631
  animate: {
91632
- opacity: [0.3, 0.7, 0.3],
91632
+ opacity: [0.4, 0.6, 0.4],
91633
+ // Daha smooth opacity
91633
91634
  x: [0, 100, 0, -100, 0],
91634
91635
  y: [
91635
91636
  0,
@@ -91666,7 +91667,9 @@ function FloatingCodeItem({
91666
91667
  style: {
91667
91668
  left: `${position.x}%`,
91668
91669
  top: `${position.y}%`,
91669
- color: lang.color
91670
+ color: lang.color,
91671
+ willChange: "transform, opacity"
91672
+ // GPU acceleration için
91670
91673
  },
91671
91674
  initial: { opacity: 0, scale: 0.5 },
91672
91675
  animate: animationConfig.animate,
@@ -91695,19 +91698,16 @@ function CodeSnippets({
91695
91698
  multiplier = 2,
91696
91699
  position = "absolute"
91697
91700
  }) {
91698
- const [mounted, setMounted] = useState(false);
91699
- useEffect(() => {
91700
- setMounted(true);
91701
- }, []);
91702
- if (!mounted)
91703
- return null;
91704
- const allSnippets = Array.from(
91705
- { length: multiplier },
91706
- (_, i) => snippets.map((snippet, j) => ({
91707
- ...snippet,
91708
- id: `${i}-${j}-${snippet.language}`
91709
- }))
91710
- ).flat();
91701
+ const allSnippets = useMemo(
91702
+ () => Array.from(
91703
+ { length: multiplier },
91704
+ (_, i) => snippets.map((snippet, j) => ({
91705
+ ...snippet,
91706
+ id: `${i}-${j}-${snippet.language}`
91707
+ }))
91708
+ ).flat(),
91709
+ [snippets, multiplier]
91710
+ );
91711
91711
  return /* @__PURE__ */ jsx(
91712
91712
  "div",
91713
91713
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "3.3.13",
3
+ "version": "3.3.14",
4
4
  "description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",