@almadar/ui 5.103.0 → 5.104.0

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 (66) hide show
  1. package/dist/avl/index.cjs +15 -9
  2. package/dist/avl/index.css +3 -3
  3. package/dist/avl/index.js +15 -9
  4. package/dist/components/core/atoms/AtlasImage.d.ts +2 -2
  5. package/dist/components/core/atoms/FlipContainer.d.ts +1 -1
  6. package/dist/components/core/molecules/Card.d.ts +1 -1
  7. package/dist/components/core/molecules/Chart.d.ts +3 -3
  8. package/dist/components/core/molecules/DataGrid.d.ts +1 -1
  9. package/dist/components/core/molecules/DataList.d.ts +1 -1
  10. package/dist/components/core/molecules/DocPagination.d.ts +8 -1
  11. package/dist/components/core/molecules/DocSearch.d.ts +8 -1
  12. package/dist/components/core/molecules/FlipCard.d.ts +1 -1
  13. package/dist/components/core/molecules/LineChart.d.ts +3 -1
  14. package/dist/components/core/molecules/MapView.d.ts +18 -1
  15. package/dist/components/core/molecules/SortableList.d.ts +1 -1
  16. package/dist/components/core/molecules/TableView.d.ts +1 -1
  17. package/dist/components/core/organisms/DataTable.d.ts +7 -3
  18. package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +10 -1
  19. package/dist/components/core/organisms/debug/tabs/EntitiesTab.d.ts +2 -1
  20. package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +2 -1
  21. package/dist/components/core/organisms/debug/tabs/EventFlowTab.d.ts +6 -1
  22. package/dist/components/core/organisms/debug/tabs/GuardsPanel.d.ts +6 -1
  23. package/dist/components/core/organisms/debug/tabs/ServerBridgeTab.d.ts +12 -1
  24. package/dist/components/core/organisms/debug/tabs/TicksTab.d.ts +2 -1
  25. package/dist/components/core/organisms/debug/tabs/TraitsTab.d.ts +2 -1
  26. package/dist/components/core/organisms/debug/tabs/TransitionTimeline.d.ts +11 -1
  27. package/dist/components/core/organisms/debug/tabs/VerificationTab.d.ts +8 -1
  28. package/dist/components/game/2d/atoms/ActionButton.d.ts +2 -1
  29. package/dist/components/game/2d/atoms/ChoiceButton.d.ts +2 -1
  30. package/dist/components/game/2d/atoms/ComboCounter.d.ts +2 -1
  31. package/dist/components/game/2d/atoms/ControlButton.d.ts +2 -1
  32. package/dist/components/game/2d/atoms/DamageNumber.d.ts +2 -1
  33. package/dist/components/game/2d/atoms/DialogueBubble.d.ts +2 -1
  34. package/dist/components/game/2d/atoms/GameIcon.d.ts +2 -1
  35. package/dist/components/game/2d/atoms/HealthBar.d.ts +2 -1
  36. package/dist/components/game/2d/atoms/ItemSlot.d.ts +2 -1
  37. package/dist/components/game/2d/atoms/MiniMap.d.ts +2 -1
  38. package/dist/components/game/2d/atoms/ResourceCounter.d.ts +2 -1
  39. package/dist/components/game/2d/atoms/ScoreDisplay.d.ts +2 -1
  40. package/dist/components/game/2d/atoms/StatusEffect.d.ts +2 -1
  41. package/dist/components/game/2d/atoms/TimerDisplay.d.ts +2 -1
  42. package/dist/components/game/2d/atoms/TurnIndicator.d.ts +2 -1
  43. package/dist/components/game/2d/atoms/WaypointMarker.d.ts +2 -1
  44. package/dist/components/game/2d/molecules/Canvas2D.d.ts +5 -4
  45. package/dist/components/game/2d/molecules/GameHud.d.ts +2 -1
  46. package/dist/components/game/2d/molecules/GameMenu.d.ts +2 -1
  47. package/dist/components/game/2d/molecules/InventoryGrid.d.ts +2 -1
  48. package/dist/components/game/2d/molecules/ResourceBar.d.ts +2 -1
  49. package/dist/components/game/2d/molecules/StatBadge.d.ts +2 -1
  50. package/dist/components/game/shared/lib/editorUtils.d.ts +8 -8
  51. package/dist/components/index.cjs +11 -5
  52. package/dist/components/index.css +3 -3
  53. package/dist/components/index.js +11 -5
  54. package/dist/hooks/useGitHub.d.ts +7 -7
  55. package/dist/marketing/index.cjs +2 -2
  56. package/dist/marketing/index.js +2 -2
  57. package/dist/providers/EventBusProvider.d.ts +1 -1
  58. package/dist/providers/SelectionProvider.d.ts +1 -1
  59. package/dist/providers/ServerBridge.d.ts +1 -1
  60. package/dist/providers/index.cjs +11 -5
  61. package/dist/providers/index.css +3 -3
  62. package/dist/providers/index.js +11 -5
  63. package/dist/runtime/index.cjs +11 -5
  64. package/dist/runtime/index.css +3 -3
  65. package/dist/runtime/index.js +11 -5
  66. package/package.json +10 -15
@@ -10248,6 +10248,9 @@ var init_useUnitSpriteAtlas = __esm({
10248
10248
  init_spriteAnimation();
10249
10249
  }
10250
10250
  });
10251
+ function normalizeBackdrop(bg) {
10252
+ return typeof bg === "string" ? { url: bg, role: "decoration", category: "background" } : bg;
10253
+ }
10251
10254
  function SideView({
10252
10255
  player,
10253
10256
  platforms,
@@ -10257,7 +10260,7 @@ function SideView({
10257
10260
  canvasHeight,
10258
10261
  follow,
10259
10262
  bgColor,
10260
- backgroundImage,
10263
+ backgroundImage: backgroundImageRaw,
10261
10264
  playerSprite,
10262
10265
  tileSprites,
10263
10266
  effects,
@@ -10265,6 +10268,7 @@ function SideView({
10265
10268
  keyUpMap,
10266
10269
  className
10267
10270
  }) {
10271
+ const backgroundImage = normalizeBackdrop(backgroundImageRaw);
10268
10272
  const canvasRef = React98.useRef(null);
10269
10273
  const eventBus = useEventBus();
10270
10274
  const keysRef = React98.useRef(/* @__PURE__ */ new Set());
@@ -10556,7 +10560,7 @@ function Canvas2D({
10556
10560
  effects: _effectsPropRaw = [],
10557
10561
  platforms,
10558
10562
  player,
10559
- backgroundImage,
10563
+ backgroundImage: backgroundImageRaw,
10560
10564
  // Interaction state
10561
10565
  selectedUnitId = null,
10562
10566
  validMoves = [],
@@ -10597,6 +10601,7 @@ function Canvas2D({
10597
10601
  // Remote asset loading
10598
10602
  assetManifest
10599
10603
  }) {
10604
+ const backgroundImage = normalizeBackdrop(backgroundImageRaw);
10600
10605
  const isSide = projection === "side";
10601
10606
  const isFree = projection === "free";
10602
10607
  const flatLike = projection === "hex" || projection === "flat" || isFree;
@@ -17790,9 +17795,9 @@ var init_BiologyCanvas = __esm({
17790
17795
  }
17791
17796
  });
17792
17797
 
17793
- // node_modules/katex/dist/katex.min.css
17798
+ // node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
17794
17799
  var init_katex_min = __esm({
17795
- "node_modules/katex/dist/katex.min.css"() {
17800
+ "node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
17796
17801
  }
17797
17802
  });
17798
17803
  var Tabs;
@@ -29998,8 +30003,9 @@ var init_LineChart = __esm({
29998
30003
  const safeData = data ?? [];
29999
30004
  const sortedData = React98.useMemo(() => {
30000
30005
  if (safeData.length === 0) return [];
30006
+ if (!safeData.some((d) => d.date != null)) return [...safeData];
30001
30007
  return [...safeData].sort(
30002
- (a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()
30008
+ (a, b) => new Date(a.date ?? 0).getTime() - new Date(b.date ?? 0).getTime()
30003
30009
  );
30004
30010
  }, [safeData]);
30005
30011
  const points = React98.useMemo(() => {
@@ -1,4 +1,4 @@
1
- /* node_modules/katex/dist/katex.min.css */
1
+ /* node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css */
2
2
  @font-face {
3
3
  font-display: block;
4
4
  font-family: KaTeX_AMS;
@@ -214,11 +214,11 @@
214
214
  border-color: currentColor;
215
215
  }
216
216
  .katex .katex-version:after {
217
- content: "0.16.45";
217
+ content: "0.16.47";
218
218
  }
219
219
  .katex .katex-mathml {
220
- clip: rect(1px, 1px, 1px, 1px);
221
220
  border: 0;
221
+ clip-path: inset(50%);
222
222
  height: 1px;
223
223
  overflow: hidden;
224
224
  padding: 0;
@@ -10203,6 +10203,9 @@ var init_useUnitSpriteAtlas = __esm({
10203
10203
  init_spriteAnimation();
10204
10204
  }
10205
10205
  });
10206
+ function normalizeBackdrop(bg) {
10207
+ return typeof bg === "string" ? { url: bg, role: "decoration", category: "background" } : bg;
10208
+ }
10206
10209
  function SideView({
10207
10210
  player,
10208
10211
  platforms,
@@ -10212,7 +10215,7 @@ function SideView({
10212
10215
  canvasHeight,
10213
10216
  follow,
10214
10217
  bgColor,
10215
- backgroundImage,
10218
+ backgroundImage: backgroundImageRaw,
10216
10219
  playerSprite,
10217
10220
  tileSprites,
10218
10221
  effects,
@@ -10220,6 +10223,7 @@ function SideView({
10220
10223
  keyUpMap,
10221
10224
  className
10222
10225
  }) {
10226
+ const backgroundImage = normalizeBackdrop(backgroundImageRaw);
10223
10227
  const canvasRef = useRef(null);
10224
10228
  const eventBus = useEventBus();
10225
10229
  const keysRef = useRef(/* @__PURE__ */ new Set());
@@ -10511,7 +10515,7 @@ function Canvas2D({
10511
10515
  effects: _effectsPropRaw = [],
10512
10516
  platforms,
10513
10517
  player,
10514
- backgroundImage,
10518
+ backgroundImage: backgroundImageRaw,
10515
10519
  // Interaction state
10516
10520
  selectedUnitId = null,
10517
10521
  validMoves = [],
@@ -10552,6 +10556,7 @@ function Canvas2D({
10552
10556
  // Remote asset loading
10553
10557
  assetManifest
10554
10558
  }) {
10559
+ const backgroundImage = normalizeBackdrop(backgroundImageRaw);
10555
10560
  const isSide = projection === "side";
10556
10561
  const isFree = projection === "free";
10557
10562
  const flatLike = projection === "hex" || projection === "flat" || isFree;
@@ -17745,9 +17750,9 @@ var init_BiologyCanvas = __esm({
17745
17750
  }
17746
17751
  });
17747
17752
 
17748
- // node_modules/katex/dist/katex.min.css
17753
+ // node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
17749
17754
  var init_katex_min = __esm({
17750
- "node_modules/katex/dist/katex.min.css"() {
17755
+ "node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
17751
17756
  }
17752
17757
  });
17753
17758
  var Tabs;
@@ -29953,8 +29958,9 @@ var init_LineChart = __esm({
29953
29958
  const safeData = data ?? [];
29954
29959
  const sortedData = useMemo(() => {
29955
29960
  if (safeData.length === 0) return [];
29961
+ if (!safeData.some((d) => d.date != null)) return [...safeData];
29956
29962
  return [...safeData].sort(
29957
- (a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()
29963
+ (a, b) => new Date(a.date ?? 0).getTime() - new Date(b.date ?? 0).getTime()
29958
29964
  );
29959
29965
  }, [safeData]);
29960
29966
  const points = useMemo(() => {
@@ -10595,6 +10595,9 @@ var init_useUnitSpriteAtlas = __esm({
10595
10595
  init_spriteAnimation();
10596
10596
  }
10597
10597
  });
10598
+ function normalizeBackdrop(bg) {
10599
+ return typeof bg === "string" ? { url: bg, role: "decoration", category: "background" } : bg;
10600
+ }
10598
10601
  function SideView({
10599
10602
  player,
10600
10603
  platforms,
@@ -10604,7 +10607,7 @@ function SideView({
10604
10607
  canvasHeight,
10605
10608
  follow,
10606
10609
  bgColor,
10607
- backgroundImage,
10610
+ backgroundImage: backgroundImageRaw,
10608
10611
  playerSprite,
10609
10612
  tileSprites,
10610
10613
  effects,
@@ -10612,6 +10615,7 @@ function SideView({
10612
10615
  keyUpMap,
10613
10616
  className
10614
10617
  }) {
10618
+ const backgroundImage = normalizeBackdrop(backgroundImageRaw);
10615
10619
  const canvasRef = React96.useRef(null);
10616
10620
  const eventBus = useEventBus();
10617
10621
  const keysRef = React96.useRef(/* @__PURE__ */ new Set());
@@ -10903,7 +10907,7 @@ function Canvas2D({
10903
10907
  effects: _effectsPropRaw = [],
10904
10908
  platforms,
10905
10909
  player,
10906
- backgroundImage,
10910
+ backgroundImage: backgroundImageRaw,
10907
10911
  // Interaction state
10908
10912
  selectedUnitId = null,
10909
10913
  validMoves = [],
@@ -10944,6 +10948,7 @@ function Canvas2D({
10944
10948
  // Remote asset loading
10945
10949
  assetManifest
10946
10950
  }) {
10951
+ const backgroundImage = normalizeBackdrop(backgroundImageRaw);
10947
10952
  const isSide = projection === "side";
10948
10953
  const isFree = projection === "free";
10949
10954
  const flatLike = projection === "hex" || projection === "flat" || isFree;
@@ -17754,9 +17759,9 @@ var init_BiologyCanvas = __esm({
17754
17759
  }
17755
17760
  });
17756
17761
 
17757
- // node_modules/katex/dist/katex.min.css
17762
+ // node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
17758
17763
  var init_katex_min = __esm({
17759
- "node_modules/katex/dist/katex.min.css"() {
17764
+ "node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
17760
17765
  }
17761
17766
  });
17762
17767
  var Tabs;
@@ -29767,8 +29772,9 @@ var init_LineChart = __esm({
29767
29772
  const safeData = data ?? [];
29768
29773
  const sortedData = React96.useMemo(() => {
29769
29774
  if (safeData.length === 0) return [];
29775
+ if (!safeData.some((d) => d.date != null)) return [...safeData];
29770
29776
  return [...safeData].sort(
29771
- (a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()
29777
+ (a, b) => new Date(a.date ?? 0).getTime() - new Date(b.date ?? 0).getTime()
29772
29778
  );
29773
29779
  }, [safeData]);
29774
29780
  const points = React96.useMemo(() => {
@@ -1,4 +1,4 @@
1
- /* node_modules/katex/dist/katex.min.css */
1
+ /* node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css */
2
2
  @font-face {
3
3
  font-display: block;
4
4
  font-family: KaTeX_AMS;
@@ -214,11 +214,11 @@
214
214
  border-color: currentColor;
215
215
  }
216
216
  .katex .katex-version:after {
217
- content: "0.16.45";
217
+ content: "0.16.47";
218
218
  }
219
219
  .katex .katex-mathml {
220
- clip: rect(1px, 1px, 1px, 1px);
221
220
  border: 0;
221
+ clip-path: inset(50%);
222
222
  height: 1px;
223
223
  overflow: hidden;
224
224
  padding: 0;
@@ -10550,6 +10550,9 @@ var init_useUnitSpriteAtlas = __esm({
10550
10550
  init_spriteAnimation();
10551
10551
  }
10552
10552
  });
10553
+ function normalizeBackdrop(bg) {
10554
+ return typeof bg === "string" ? { url: bg, role: "decoration", category: "background" } : bg;
10555
+ }
10553
10556
  function SideView({
10554
10557
  player,
10555
10558
  platforms,
@@ -10559,7 +10562,7 @@ function SideView({
10559
10562
  canvasHeight,
10560
10563
  follow,
10561
10564
  bgColor,
10562
- backgroundImage,
10565
+ backgroundImage: backgroundImageRaw,
10563
10566
  playerSprite,
10564
10567
  tileSprites,
10565
10568
  effects,
@@ -10567,6 +10570,7 @@ function SideView({
10567
10570
  keyUpMap,
10568
10571
  className
10569
10572
  }) {
10573
+ const backgroundImage = normalizeBackdrop(backgroundImageRaw);
10570
10574
  const canvasRef = useRef(null);
10571
10575
  const eventBus = useEventBus();
10572
10576
  const keysRef = useRef(/* @__PURE__ */ new Set());
@@ -10858,7 +10862,7 @@ function Canvas2D({
10858
10862
  effects: _effectsPropRaw = [],
10859
10863
  platforms,
10860
10864
  player,
10861
- backgroundImage,
10865
+ backgroundImage: backgroundImageRaw,
10862
10866
  // Interaction state
10863
10867
  selectedUnitId = null,
10864
10868
  validMoves = [],
@@ -10899,6 +10903,7 @@ function Canvas2D({
10899
10903
  // Remote asset loading
10900
10904
  assetManifest
10901
10905
  }) {
10906
+ const backgroundImage = normalizeBackdrop(backgroundImageRaw);
10902
10907
  const isSide = projection === "side";
10903
10908
  const isFree = projection === "free";
10904
10909
  const flatLike = projection === "hex" || projection === "flat" || isFree;
@@ -17709,9 +17714,9 @@ var init_BiologyCanvas = __esm({
17709
17714
  }
17710
17715
  });
17711
17716
 
17712
- // node_modules/katex/dist/katex.min.css
17717
+ // node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
17713
17718
  var init_katex_min = __esm({
17714
- "node_modules/katex/dist/katex.min.css"() {
17719
+ "node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
17715
17720
  }
17716
17721
  });
17717
17722
  var Tabs;
@@ -29722,8 +29727,9 @@ var init_LineChart = __esm({
29722
29727
  const safeData = data ?? [];
29723
29728
  const sortedData = useMemo(() => {
29724
29729
  if (safeData.length === 0) return [];
29730
+ if (!safeData.some((d) => d.date != null)) return [...safeData];
29725
29731
  return [...safeData].sort(
29726
- (a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()
29732
+ (a, b) => new Date(a.date ?? 0).getTime() - new Date(b.date ?? 0).getTime()
29727
29733
  );
29728
29734
  }, [safeData]);
29729
29735
  const points = useMemo(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.103.0",
3
+ "version": "5.104.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -116,12 +116,6 @@
116
116
  "registry": "https://registry.npmjs.org",
117
117
  "access": "public"
118
118
  },
119
- "scripts": {
120
- "build": "tsup && tsc -p tsconfig.build.json",
121
- "build:watch": "tsup --watch",
122
- "typecheck": "tsc --noEmit",
123
- "lint": "eslint --no-warn-ignored --max-warnings 0 ."
124
- },
125
119
  "dependencies": {
126
120
  "@almadar/core": "^10.16.0",
127
121
  "@almadar/evaluator": ">=2.9.2",
@@ -213,7 +207,8 @@
213
207
  "tsx": "^4.7.0",
214
208
  "typescript": "^5.4.0",
215
209
  "vite": "^5.2.0",
216
- "vitest": "^3.2.6"
210
+ "vitest": "^3.2.6",
211
+ "turbo": "^2.8.17"
217
212
  },
218
213
  "repository": {
219
214
  "type": "git",
@@ -229,13 +224,13 @@
229
224
  "hooks"
230
225
  ],
231
226
  "homepage": "https://github.com/almadar-io/almadar#readme",
232
- "pnpm": {
233
- "overrides": {
234
- "@types/react": "^19.0.0",
235
- "@types/react-dom": "^19.0.0"
236
- }
237
- },
238
227
  "overrides": {
239
228
  "@almadar/core": "$@almadar/core"
229
+ },
230
+ "scripts": {
231
+ "build": "tsup && tsc -p tsconfig.build.json",
232
+ "build:watch": "tsup --watch",
233
+ "typecheck": "tsc --noEmit",
234
+ "lint": "eslint --no-warn-ignored --max-warnings 0 ."
240
235
  }
241
- }
236
+ }