kaggle-environments 1.23.2__py3-none-any.whl → 1.23.3__py3-none-any.whl

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.

Potentially problematic release.


This version of kaggle-environments might be problematic. Click here for more details.

@@ -45,15 +45,35 @@ export function renderer(options) {
45
45
  .poker-renderer-host {
46
46
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
47
47
  font-family: 'Zeitung Pro', sans-serif; background-color: #1C1D20; color: #fff;
48
- overflow: hidden; padding: 1rem; box-sizing: border-box; position: relative;
48
+ overflow: hidden; box-sizing: border-box; position: relative;
49
+ }
50
+ .poker-game-layout {
51
+ width: 1000px;
52
+ height: 700px;
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+ position: relative;
57
+ transform-origin: center center;
58
+ }
59
+ .poker-table-container {
60
+ width: 100%;
61
+ height: 400px;
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
49
65
  }
50
- .poker-game-layout { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; max-width: 750px; max-height: 750px; }
51
- .poker-table-container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; max-width: 750px; max-height: 275px; }
52
66
  .poker-table {
53
- width: clamp(400px, 85vw, 750px); height: clamp(220px, 48vw, 275px);
54
- background-color: #197631; border-radius: 24px; position: relative;
55
- display: flex; align-items: center; justify-content: center;
56
- margin: 0 60px;
67
+ width: 900px;
68
+ height: 400px;
69
+ background: radial-gradient(43.33% 50% at 50% 50%, #20BD48 0%, #0A4018 99.99%);
70
+ border-radius: 300px;
71
+ position: relative;
72
+ border: 20px solid #5C3A21;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ margin: 0;
57
77
  }
58
78
  .players-container {
59
79
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10;
@@ -100,15 +120,16 @@ export function renderer(options) {
100
120
  }
101
121
  .player-name.winner { color: #FFEB70; }
102
122
  .player-stack { font-size: 32px; font-weight: 600; color: #ffffff; margin: 16px 0; display: flex; justify-content: space-between; align-items: center; }
103
- .player-cards-container { min-height: 70px; display: flex; justify-content: flex-start; align-items:center; gap: 12px; }
123
+ .player-cards-container { min-height: 70px; display: flex; justify-content: flex-start; align-items:center; gap: 8px; }
104
124
  .card {
105
125
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
106
- width: 80px; height: 112px; border: 2px solid #202124; border-radius: 8px;
126
+ width: 54px; height: 84px; border: 2px solid #202124; border-radius: 8px;
107
127
  background-color: white; color: black; font-weight: bold; text-align: center; overflow: hidden; position: relative;
108
128
  padding: 6px;
129
+ box-shadow: 0 6px 10px 4px rgba(0, 0, 0, 0.15), 0 2px 3px 0 rgba(0, 0, 0, 0.30);
109
130
  }
110
- .card-rank { font-family: 'Inter' sans-serif; font-size: 50px; line-height: 1; display: block; align-self: flex-start; }
111
- .card-suit { width: 50px; height: 50px; display: block; margin-bottom: 2px; }
131
+ .card-rank { font-family: 'Inter' sans-serif; font-size: 40px; line-height: 1; display: block; align-self: flex-start; }
132
+ .card-suit { width: 40px; height: 40px; display: block; margin-bottom: 2px; }
112
133
  .card-suit svg { width: 100%; height: 100%; }
113
134
  .card-red .card-rank { color: #B3261E; }
114
135
  .card-red .card-suit svg { fill: #B3261E; }
@@ -126,14 +147,14 @@ export function renderer(options) {
126
147
  }
127
148
  .card-back .card-rank, .card-back .card-suit { display: none; }
128
149
  .card-empty {
129
- background-color: rgba(255, 255, 255, 0.1);
130
- border: 2px solid rgba(32, 33, 36, 0.5);
131
- background-image: none;
150
+ background-color: rgba(232, 234, 237, 0.1);
151
+ border: 2px solid rgba(154, 160, 166, 0.5);
152
+ box-shadow: none
132
153
  }
133
154
  .card-empty .card-rank, .card-empty .card-suit { display: none; }
134
155
  .community-cards-area { text-align: center; z-index: 10; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
135
- .community-cards-container { min-height: 75px; display: flex; justify-content: center; align-items:center; margin-bottom: 0.5rem; gap: 12px; }
136
- .pot-display { font-size: 40px; font-weight: bold; color: #ffffff; margin-bottom: 30px; }
156
+ .community-cards-container { min-height: 75px; display: flex; justify-content: center; align-items:center; margin-bottom: 0.5rem; gap: 8px; }
157
+ .pot-display { font-size: 30px; font-weight: bold; color: #ffffff; margin-bottom: 30px; }
137
158
  .bet-display {
138
159
  display: inline-block; padding: 10px 20px; border-radius: 12px;
139
160
  background-color: #3C4043; color: #ffff;
@@ -141,6 +162,7 @@ export function renderer(options) {
141
162
  text-align: center;
142
163
  height: 3rem; line-height: 3rem;
143
164
  min-width: 200px;
165
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
144
166
  }
145
167
  .blind-indicator { font-size: 0.7rem; color: #a0aec0; margin-top: 3px; }
146
168
  .dealer-button {
@@ -157,49 +179,6 @@ export function renderer(options) {
157
179
  font-size: 14px; font-weight: 600;
158
180
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
159
181
  }
160
-
161
- @media (max-width: 768px) {
162
- .bet-display { font-size: 1.5rem; height: 2.2rem; line-height: 2.2rem; min-width: 0;}
163
- .card { width: 60px; height: 85px; } .card-rank { font-size: 35px; } .card-suit { width: 35px; height: 35px; }
164
- .community-cards-container { gap: 6px; }
165
- .player-card-area { min-height: 120px; }
166
- .player-cards-container { gap: 6px; }
167
- .player-info-area { min-width: 160px; }
168
- .poker-game-layout { max-height: 700px; }
169
- .pot-display { font-size: 35px; margin-bottom: 20px; }
170
- }
171
- @media (max-width: 600px) {
172
- .bet-display { font-size: 20px; height: 40px; line-height: 40px; }
173
- .card { width: 50px; height: 70px; padding: 2px; } .card-rank { font-size: 32px; } .card-suit { width: 32px; height: 32px; }
174
- .community-cards-container { gap: 2px; }
175
- .dealer-button { font-size: 20px; height: 24px; line-height: 24px; width: 24px; }
176
- .dealer-button.dealer-player0 { bottom: 95px; }
177
- .dealer-button.dealer-player1 { top: 95px; }
178
- .player-card-area { min-height: 110px; margin: 0 0 0 40px;}
179
- .player-cards-container { gap: 2px; }
180
- .player-info-area { margin-right: 20px; }
181
- .player-name { font-size: 30px; margin: 0 20px; }
182
- .player-stack { font-size: 30px; }
183
- .poker-game-layout { max-height: 600px; }
184
- .poker-table { width: clamp(300px, 90vw, 600px); height: clamp(160px, 50vw, 200px); margin: 20px; }
185
- .pot-display { font-size: 30px; margin-bottom: 20px; }
186
- }
187
- @media (max-width: 400px) {
188
- .bet-display { font-size: 15px; height: 30px; line-height: 30px; }
189
- .card { width: 40px; height: 56px; margin: 0 2px; padding: 2px; } .card-rank { font-size: 25px; } .card-suit { width: 25px; height: 25px; }
190
- .community-cards-container { gap: 2px; }
191
- .dealer-button { font-size: 15px; height: 20px; line-height: 20px; width: 20px; }
192
- .dealer-button.dealer-player0 { bottom: 85px; }
193
- .dealer-button.dealer-player1 { top: 85px; }
194
- .player-card-area { margin: 0 0 0 30px;}
195
- .player-cards-container { gap: 2px; }
196
- .player-info-area { min-width: 100px; margin-right: 0; }
197
- .player-name { font-size: 25px; }
198
- .player-stack { font-size: 15px; }
199
- .poker-game-layout { max-height: 500px; }
200
- .poker-table { width: clamp(280px, 95vw, 380px); height: clamp(150px, 55vw, 150px); margin: 0;}
201
- .pot-display { font-size: 25px; margin-bottom: 15px; }
202
- }
203
182
  `;
204
183
 
205
184
  function _injectStyles(passedOptions) {
@@ -368,6 +347,22 @@ export function renderer(options) {
368
347
  return getPokerStateForStep(environment, step);
369
348
  }
370
349
 
350
+ function _applyScale(parentElement) {
351
+ if (!parentElement || !elements.gameLayout) return;
352
+
353
+ const parentWidth = parentElement.clientWidth;
354
+ const parentHeight = parentElement.clientHeight;
355
+
356
+ const baseWidth = 1000;
357
+ const baseHeight = 700;
358
+
359
+ const scaleX = parentWidth / baseWidth;
360
+ const scaleY = parentHeight / baseHeight;
361
+ const scale = Math.min(scaleX, scaleY);
362
+
363
+ elements.gameLayout.style.transform = `scale(${scale})`;
364
+ }
365
+
371
366
  function _renderPokerTableUI(data, passedOptions) {
372
367
  if (!elements.pokerTable || !data) return;
373
368
  const { players, communityCards, pot, isTerminal, step } = data;
@@ -405,7 +400,7 @@ export function renderer(options) {
405
400
  elements.communityCardsContainer.appendChild(emptyCard);
406
401
  }
407
402
 
408
- elements.potDisplay.textContent = `Pot : ${pot}`;
403
+ elements.potDisplay.textContent = `Total Pot : ${pot}`;
409
404
 
410
405
  players.forEach((playerData, index) => {
411
406
  const playerNameElement = elements.playerNames[index];
@@ -490,4 +485,15 @@ export function renderer(options) {
490
485
 
491
486
  const uiData = _parseKagglePokerState(options);
492
487
  _renderPokerTableUI(uiData, options);
488
+
489
+ // Apply initial scale
490
+ _applyScale(parent);
491
+
492
+ // Watch for container size changes and reapply scale
493
+ if (typeof ResizeObserver !== 'undefined') {
494
+ const resizeObserver = new ResizeObserver(() => {
495
+ _applyScale(parent);
496
+ });
497
+ resizeObserver.observe(parent);
498
+ }
493
499
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kaggle-environments
3
- Version: 1.23.2
3
+ Version: 1.23.3
4
4
  Summary: Kaggle Environments
5
5
  Author-email: Kaggle <support@kaggle.com>
6
6
  Requires-Python: >=3.10
@@ -195,7 +195,7 @@ kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/
195
195
  kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/vite.config.ts,sha256=KhIjUn0WWhaoQzQ5YKuWjNndimRF0kFlYDgEnZ0cg7U,208
196
196
  kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/replays/test-replay.json,sha256=jf4ilR6SmOYPNohkIGJvmKP5Gju5FY6sfSStX1qtFZg,28919900
197
197
  kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/src/main.ts,sha256=5NZlic4P9aSdMJpWxckaDrObEx2OJj8FNG49g-Z9_ow,1095
198
- kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/src/repeated_poker_renderer.js,sha256=4WV-DkxkwJ7F5RLutDpBQEpBUoA3_pW9Aqfw5_IenXA,22483
198
+ kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/src/repeated_poker_renderer.js,sha256=XMyktKkyUTF_UXnMn8LerO_rx3YH6nm0omb7ImuLm4M,21092
199
199
  kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/src/components/getRepeatedPokerStateForStep.js,sha256=qzUIlL33-YDpeINi-pCUVLrG1IbVRZuR9h_FVQW3mQ8,9086
200
200
  kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/src/components/utils.js,sha256=pXDAu4V2OppRCvMdJKQ56q1uFTJReMPIvBL6gwxIJoI,5734
201
201
  kaggle_environments/envs/open_spiel_env/games/tic_tac_toe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -241,8 +241,8 @@ kaggle_environments/envs/werewolf/game/protocols/chat.py,sha256=wFewQogic1CHr4AW
241
241
  kaggle_environments/envs/werewolf/game/protocols/factory.py,sha256=hg9Xj5Z-8USmqhouVzo8b7Ktl91xzFsE5_8naD6yErY,2316
242
242
  kaggle_environments/envs/werewolf/game/protocols/vote.py,sha256=hKw64ubLMCIAIG5IcmNeV9MPTWWmWpkkCAyia_5kXn0,20716
243
243
  kaggle_environments/static/player.html,sha256=Icl5yYscPe4BRoWt0HLOSRJWnznQq2MdTHHCaC2OrQQ,27753
244
- kaggle_environments-1.23.2.dist-info/entry_points.txt,sha256=h03sq76TdcHvXKcsre1Qm3lIni9dkWehu61xJqI-p8k,69
245
- kaggle_environments-1.23.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
246
- kaggle_environments-1.23.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
247
- kaggle_environments-1.23.2.dist-info/METADATA,sha256=gUSJ4sbn187BOtv7Via8k0AA_4kbC4rPZkRxjN00l1Q,916
248
- kaggle_environments-1.23.2.dist-info/RECORD,,
244
+ kaggle_environments-1.23.3.dist-info/entry_points.txt,sha256=h03sq76TdcHvXKcsre1Qm3lIni9dkWehu61xJqI-p8k,69
245
+ kaggle_environments-1.23.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
246
+ kaggle_environments-1.23.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
247
+ kaggle_environments-1.23.3.dist-info/METADATA,sha256=ZB40jlDxGCqUGoIwxNg8cRDdu2Ombdus7v9uw7BfV6A,916
248
+ kaggle_environments-1.23.3.dist-info/RECORD,,