@alepot55/chessboardjs 2.3.4 → 2.3.6

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.
@@ -107,26 +107,22 @@
107
107
  box-shadow: inset 0 0 10px var(--highlightSquare);
108
108
  }/* Piece-specific styles */
109
109
  .piece {
110
- position: relative;
110
+ position: absolute;
111
111
  cursor: pointer;
112
112
  /* Solo transizioni specifiche, non "all" */
113
113
  transition: opacity var(--fade-time, 150ms) var(--fade-animation, ease);
114
114
  z-index: 10;
115
115
  /* Hint al browser per ottimizzazioni */
116
116
  will-change: auto;
117
- width: 100%;
118
- height: 100%;
119
117
  }
120
118
 
121
119
  .piece.dragging {
122
- position: absolute;
123
120
  z-index: 100;
124
121
  /* Disabilita completamente le transizioni durante il drag */
125
122
  transition: none !important;
126
123
  /* Hint per ottimizzazione durante drag */
127
124
  will-change: left, top;
128
- /* Scala visiva senza interferire con il posizionamento */
129
- transform: scale(1.1);
125
+ /* Rimuovo l'ingrandimento che causava problemi visivi */
130
126
  }
131
127
 
132
128
  .piece.fading {
@@ -139,6 +135,32 @@
139
135
  transition: transform var(--move-time, 200ms) var(--move-animation, ease);
140
136
  }
141
137
 
138
+ /* Piece replacement during promotion - no transitions to avoid flickering */
139
+ .piece.replacing {
140
+ transition: none !important;
141
+ opacity: 1;
142
+ transform: none;
143
+ }
144
+
145
+ /* Piece transformation during promotion - smooth scaling animation */
146
+ .piece.transforming {
147
+ transition: none !important;
148
+ transform-origin: center center;
149
+ will-change: transform, opacity;
150
+ z-index: 50;
151
+ }
152
+
153
+ /* Subtle bounce effect after transformation */
154
+ .piece.transform-complete {
155
+ animation: transformBounce 0.4s ease-out;
156
+ }
157
+
158
+ @keyframes transformBounce {
159
+ 0% { transform: scale(1); }
160
+ 50% { transform: scale(1.1); }
161
+ 100% { transform: scale(1); }
162
+ }
163
+
142
164
  /* Piece sizing */
143
165
  .piece img {
144
166
  width: 100%;