@almadar/ui 2.4.0 → 2.5.2

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.
@@ -1,20 +1,20 @@
1
- import { useAuthContext } from '../chunk-42WRQA7T.js';
2
- export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-42WRQA7T.js';
1
+ import { useAuthContext } from '../chunk-2UMN2BLO.js';
2
+ export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-2UMN2BLO.js';
3
3
  import { DEFAULT_CONFIG, renderStateMachineToDomData, parseContentSegments } from '../chunk-N6DJVKZ6.js';
4
4
  import '../chunk-3HJHHULT.js';
5
- import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, Stack, Select, Drawer, Toast, Tabs, Input, ThemeToggle, EntityDisplayEvents, HealthBar, ScoreDisplay, StateIndicator, Container } from '../chunk-HWZL7IZG.js';
6
- export { Accordion, Card2 as ActionCard, Alert, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, CalendarGrid, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Center, ChartLegend, Checkbox, CodeBlock, ConditionalWrapper, Container, ControlButton, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormField, FormSectionHeader, GraphView, Grid, HStack, Heading, HealthBar, Icon, Input, InputGroup, Label, LawReferenceTooltip, LineChart, LoadingState, MarkdownContent, MasterDetail, Menu, Modal, Overlay, PageHeader, Pagination, Popover, ProgressBar, ProgressDots, QuizBlock, Radio, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, Spacer, Spinner, Sprite, Stack, StatCard, StateIndicator, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Toast, Tooltip, Typography, UISlotComponent, UISlotRenderer, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-HWZL7IZG.js';
5
+ export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
6
+ import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, Stack, StatBadge, Select, Drawer, Toast, Tabs, Input, ThemeToggle, EntityDisplayEvents, StateIndicator, Container } from '../chunk-AL6BLHMG.js';
7
+ export { Accordion, ActionButtons, Card2 as ActionCard, Alert, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, CalendarGrid, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Center, ChartLegend, Checkbox, CodeBlock, ConditionalWrapper, Container, ControlButton, DPad, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormField, FormSectionHeader, GraphView, Grid, HStack, Heading, HealthBar, Icon, Input, InputGroup, Label, LawReferenceTooltip, LineChart, LoadingState, MapView, MarkdownContent, MasterDetail, Menu, Modal, Overlay, PageHeader, Pagination, Popover, ProgressBar, ProgressDots, QuizBlock, Radio, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, Spacer, Spinner, Sprite, Stack, StatBadge, StatCard, StateIndicator, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Toast, Tooltip, Typography, UISlotComponent, UISlotRenderer, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-AL6BLHMG.js';
7
8
  import '../chunk-DKQN5FVU.js';
8
9
  import { useTranslate } from '../chunk-GOZKH7QW.js';
9
10
  export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useQuerySingleton, useTranslate } from '../chunk-GOZKH7QW.js';
10
11
  import { useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
11
12
  export { useEmitEvent, useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
12
13
  export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-3JGAROCW.js';
14
+ import '../chunk-TSETXL2E.js';
13
15
  import { cn, getNestedValue } from '../chunk-KKCVDUK7.js';
14
16
  export { cn } from '../chunk-KKCVDUK7.js';
15
- import '../chunk-TSETXL2E.js';
16
17
  import '../chunk-K2D5D3WK.js';
17
- export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
18
18
  import { __publicField } from '../chunk-PKBMQBKP.js';
19
19
  import * as React from 'react';
20
20
  import React__default, { createContext, useState, useCallback, useMemo, useEffect, useRef, useContext } from 'react';
@@ -4529,12 +4529,15 @@ function IsometricCanvas({
4529
4529
  }
4530
4530
  if (sortedTiles.length === 0) {
4531
4531
  return /* @__PURE__ */ jsx(
4532
- EmptyState,
4532
+ Box,
4533
4533
  {
4534
- title: t("canvas.emptyTitle"),
4535
- message: t("canvas.emptyMessage"),
4536
- icon: "map",
4537
- className
4534
+ className: cn("relative w-full overflow-hidden rounded-lg", className),
4535
+ style: { height: viewportSize.height },
4536
+ "data-testid": "game-canvas-empty",
4537
+ children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-slate-800 rounded-lg", children: /* @__PURE__ */ jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
4538
+ /* @__PURE__ */ jsx(Icon, { name: "map", size: "xl" }),
4539
+ /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-slate-400", children: t("canvas.emptyMessage") || "No map data loaded" })
4540
+ ] }) })
4538
4541
  }
4539
4542
  );
4540
4543
  }
@@ -4598,6 +4601,193 @@ function IsometricCanvas({
4598
4601
  }
4599
4602
  IsometricCanvas.displayName = "IsometricCanvas";
4600
4603
  var IsometricCanvas_default = IsometricCanvas;
4604
+ var PLATFORM_COLORS = {
4605
+ ground: "#4a7c59",
4606
+ platform: "#7c6b4a",
4607
+ hazard: "#c0392b",
4608
+ goal: "#f1c40f"
4609
+ };
4610
+ var PLAYER_COLOR = "#3498db";
4611
+ var PLAYER_EYE_COLOR = "#ffffff";
4612
+ var SKY_GRADIENT_TOP = "#1a1a2e";
4613
+ var SKY_GRADIENT_BOTTOM = "#16213e";
4614
+ var GRID_COLOR = "rgba(255, 255, 255, 0.03)";
4615
+ function PlatformerCanvas({
4616
+ player,
4617
+ platforms = [],
4618
+ worldWidth = 800,
4619
+ worldHeight = 400,
4620
+ canvasWidth = 800,
4621
+ canvasHeight = 400,
4622
+ followCamera = true,
4623
+ bgColor,
4624
+ leftEvent = "MOVE_LEFT",
4625
+ rightEvent = "MOVE_RIGHT",
4626
+ jumpEvent = "JUMP",
4627
+ stopEvent = "STOP",
4628
+ className,
4629
+ entity
4630
+ }) {
4631
+ const canvasRef = useRef(null);
4632
+ const eventBus = useEventBus();
4633
+ const keysRef = useRef(/* @__PURE__ */ new Set());
4634
+ const resolvedPlayer = player ?? {
4635
+ x: entity?.x ?? 50,
4636
+ y: entity?.y ?? 300,
4637
+ width: entity?.width ?? 24,
4638
+ height: entity?.height ?? 32,
4639
+ vx: entity?.vx ?? 0,
4640
+ vy: entity?.vy ?? 0,
4641
+ grounded: entity?.grounded ?? false,
4642
+ facingRight: entity?.facingRight ?? true
4643
+ };
4644
+ const handleKeyDown = useCallback((e) => {
4645
+ if (keysRef.current.has(e.code)) return;
4646
+ keysRef.current.add(e.code);
4647
+ switch (e.code) {
4648
+ case "ArrowLeft":
4649
+ case "KeyA":
4650
+ eventBus.emit(`UI:${leftEvent}`, { direction: -1 });
4651
+ break;
4652
+ case "ArrowRight":
4653
+ case "KeyD":
4654
+ eventBus.emit(`UI:${rightEvent}`, { direction: 1 });
4655
+ break;
4656
+ case "ArrowUp":
4657
+ case "KeyW":
4658
+ case "Space":
4659
+ eventBus.emit(`UI:${jumpEvent}`, {});
4660
+ e.preventDefault();
4661
+ break;
4662
+ }
4663
+ }, [eventBus, leftEvent, rightEvent, jumpEvent]);
4664
+ const handleKeyUp = useCallback((e) => {
4665
+ keysRef.current.delete(e.code);
4666
+ switch (e.code) {
4667
+ case "ArrowLeft":
4668
+ case "KeyA":
4669
+ case "ArrowRight":
4670
+ case "KeyD":
4671
+ eventBus.emit(`UI:${stopEvent}`, {});
4672
+ break;
4673
+ }
4674
+ }, [eventBus, stopEvent]);
4675
+ useEffect(() => {
4676
+ window.addEventListener("keydown", handleKeyDown);
4677
+ window.addEventListener("keyup", handleKeyUp);
4678
+ return () => {
4679
+ window.removeEventListener("keydown", handleKeyDown);
4680
+ window.removeEventListener("keyup", handleKeyUp);
4681
+ };
4682
+ }, [handleKeyDown, handleKeyUp]);
4683
+ useEffect(() => {
4684
+ const canvas = canvasRef.current;
4685
+ if (!canvas) return;
4686
+ const ctx = canvas.getContext("2d");
4687
+ if (!ctx) return;
4688
+ const dpr = window.devicePixelRatio || 1;
4689
+ canvas.width = canvasWidth * dpr;
4690
+ canvas.height = canvasHeight * dpr;
4691
+ ctx.scale(dpr, dpr);
4692
+ let camX = 0;
4693
+ let camY = 0;
4694
+ if (followCamera) {
4695
+ camX = Math.max(0, Math.min(resolvedPlayer.x - canvasWidth / 2, worldWidth - canvasWidth));
4696
+ camY = Math.max(0, Math.min(resolvedPlayer.y - canvasHeight / 2 - 50, worldHeight - canvasHeight));
4697
+ }
4698
+ if (bgColor) {
4699
+ ctx.fillStyle = bgColor;
4700
+ ctx.fillRect(0, 0, canvasWidth, canvasHeight);
4701
+ } else {
4702
+ const grad = ctx.createLinearGradient(0, 0, 0, canvasHeight);
4703
+ grad.addColorStop(0, SKY_GRADIENT_TOP);
4704
+ grad.addColorStop(1, SKY_GRADIENT_BOTTOM);
4705
+ ctx.fillStyle = grad;
4706
+ ctx.fillRect(0, 0, canvasWidth, canvasHeight);
4707
+ }
4708
+ ctx.strokeStyle = GRID_COLOR;
4709
+ ctx.lineWidth = 1;
4710
+ const gridSize = 32;
4711
+ for (let gx = -camX % gridSize; gx < canvasWidth; gx += gridSize) {
4712
+ ctx.beginPath();
4713
+ ctx.moveTo(gx, 0);
4714
+ ctx.lineTo(gx, canvasHeight);
4715
+ ctx.stroke();
4716
+ }
4717
+ for (let gy = -camY % gridSize; gy < canvasHeight; gy += gridSize) {
4718
+ ctx.beginPath();
4719
+ ctx.moveTo(0, gy);
4720
+ ctx.lineTo(canvasWidth, gy);
4721
+ ctx.stroke();
4722
+ }
4723
+ for (const plat of platforms) {
4724
+ const px = plat.x - camX;
4725
+ const py = plat.y - camY;
4726
+ const color = PLATFORM_COLORS[plat.type ?? "ground"] ?? PLATFORM_COLORS.ground;
4727
+ ctx.fillStyle = color;
4728
+ ctx.fillRect(px, py, plat.width, plat.height);
4729
+ ctx.fillStyle = "rgba(255, 255, 255, 0.15)";
4730
+ ctx.fillRect(px, py, plat.width, 3);
4731
+ ctx.fillStyle = "rgba(0, 0, 0, 0.3)";
4732
+ ctx.fillRect(px, py + plat.height - 2, plat.width, 2);
4733
+ if (plat.type === "hazard") {
4734
+ ctx.strokeStyle = "#e74c3c";
4735
+ ctx.lineWidth = 2;
4736
+ for (let sx = px; sx < px + plat.width; sx += 12) {
4737
+ ctx.beginPath();
4738
+ ctx.moveTo(sx, py);
4739
+ ctx.lineTo(sx + 6, py + plat.height);
4740
+ ctx.stroke();
4741
+ }
4742
+ }
4743
+ if (plat.type === "goal") {
4744
+ ctx.fillStyle = "rgba(241, 196, 15, 0.5)";
4745
+ ctx.beginPath();
4746
+ ctx.arc(px + plat.width / 2, py - 10, 8, 0, Math.PI * 2);
4747
+ ctx.fill();
4748
+ }
4749
+ }
4750
+ const pw = resolvedPlayer.width ?? 24;
4751
+ const ph = resolvedPlayer.height ?? 32;
4752
+ const ppx = resolvedPlayer.x - camX;
4753
+ const ppy = resolvedPlayer.y - camY;
4754
+ ctx.fillStyle = PLAYER_COLOR;
4755
+ const radius = Math.min(pw, ph) * 0.25;
4756
+ ctx.beginPath();
4757
+ ctx.moveTo(ppx + radius, ppy);
4758
+ ctx.lineTo(ppx + pw - radius, ppy);
4759
+ ctx.quadraticCurveTo(ppx + pw, ppy, ppx + pw, ppy + radius);
4760
+ ctx.lineTo(ppx + pw, ppy + ph - radius);
4761
+ ctx.quadraticCurveTo(ppx + pw, ppy + ph, ppx + pw - radius, ppy + ph);
4762
+ ctx.lineTo(ppx + radius, ppy + ph);
4763
+ ctx.quadraticCurveTo(ppx, ppy + ph, ppx, ppy + ph - radius);
4764
+ ctx.lineTo(ppx, ppy + radius);
4765
+ ctx.quadraticCurveTo(ppx, ppy, ppx + radius, ppy);
4766
+ ctx.fill();
4767
+ const eyeY = ppy + ph * 0.3;
4768
+ const eyeSize = 3;
4769
+ const facingRight = resolvedPlayer.facingRight ?? true;
4770
+ const eyeOffsetX = facingRight ? pw * 0.55 : pw * 0.2;
4771
+ ctx.fillStyle = PLAYER_EYE_COLOR;
4772
+ ctx.beginPath();
4773
+ ctx.arc(ppx + eyeOffsetX, eyeY, eyeSize, 0, Math.PI * 2);
4774
+ ctx.fill();
4775
+ ctx.beginPath();
4776
+ ctx.arc(ppx + eyeOffsetX + 7, eyeY, eyeSize, 0, Math.PI * 2);
4777
+ ctx.fill();
4778
+ });
4779
+ return /* @__PURE__ */ jsx(
4780
+ "canvas",
4781
+ {
4782
+ ref: canvasRef,
4783
+ style: { width: canvasWidth, height: canvasHeight },
4784
+ className: cn("block rounded-lg border border-white/10", className),
4785
+ "data-testid": "platformer-canvas",
4786
+ tabIndex: 0
4787
+ }
4788
+ );
4789
+ }
4790
+ PlatformerCanvas.displayName = "PlatformerCanvas";
4601
4791
 
4602
4792
  // components/organisms/game/types/effects.ts
4603
4793
  var EMPTY_EFFECT_STATE = {
@@ -6644,76 +6834,6 @@ function usePhysics2D(options = {}) {
6644
6834
  reset
6645
6835
  };
6646
6836
  }
6647
- var sizeMap = {
6648
- sm: "text-xs px-2 py-1",
6649
- md: "text-sm px-3 py-1.5",
6650
- lg: "text-base px-4 py-2"
6651
- };
6652
- var variantMap = {
6653
- default: "bg-gray-800/80 border-gray-700",
6654
- primary: "bg-blue-900/80 border-blue-700",
6655
- success: "bg-green-900/80 border-green-700",
6656
- warning: "bg-yellow-900/80 border-yellow-700",
6657
- danger: "bg-red-900/80 border-red-700"
6658
- };
6659
- function StatBadge({
6660
- label,
6661
- value = 0,
6662
- max,
6663
- format = "number",
6664
- icon,
6665
- size = "md",
6666
- variant = "default",
6667
- className,
6668
- // Ignored config props (used for schema binding)
6669
- source: _source,
6670
- field: _field
6671
- }) {
6672
- const numValue = typeof value === "number" ? value : parseInt(String(value), 10) || 0;
6673
- return /* @__PURE__ */ jsxs(
6674
- "div",
6675
- {
6676
- className: cn(
6677
- "inline-flex items-center gap-2 rounded-lg border backdrop-blur-sm",
6678
- sizeMap[size] ?? sizeMap.md,
6679
- variantMap[variant] ?? variantMap.default,
6680
- className
6681
- ),
6682
- children: [
6683
- icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-lg", children: icon }),
6684
- /* @__PURE__ */ jsx("span", { className: "text-gray-400 font-medium", children: label }),
6685
- format === "hearts" && max && /* @__PURE__ */ jsx(
6686
- HealthBar,
6687
- {
6688
- current: numValue,
6689
- max,
6690
- format: "hearts",
6691
- size: size === "lg" ? "md" : "sm"
6692
- }
6693
- ),
6694
- format === "bar" && max && /* @__PURE__ */ jsx(
6695
- HealthBar,
6696
- {
6697
- current: numValue,
6698
- max,
6699
- format: "bar",
6700
- size: size === "lg" ? "md" : "sm"
6701
- }
6702
- ),
6703
- format === "number" && /* @__PURE__ */ jsx(
6704
- ScoreDisplay,
6705
- {
6706
- value: numValue,
6707
- size: size === "lg" ? "md" : "sm",
6708
- animated: true
6709
- }
6710
- ),
6711
- format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-white", children: value })
6712
- ]
6713
- }
6714
- );
6715
- }
6716
- StatBadge.displayName = "StatBadge";
6717
6837
  var positionMap = {
6718
6838
  top: "top-0 left-0 right-0 flex justify-between items-start p-4",
6719
6839
  bottom: "bottom-0 left-0 right-0 flex justify-between items-end p-4",
@@ -6729,9 +6849,14 @@ function convertElementsToStats(elements) {
6729
6849
  timer: "Time"
6730
6850
  };
6731
6851
  return {
6732
- label: el.label || labelMap[el.type] || el.type,
6852
+ label: el.label || labelMap[el.type ?? ""] || el.type || "",
6733
6853
  source,
6734
- field
6854
+ field,
6855
+ // Pass through direct values from compiled render-ui effects
6856
+ ...el.value !== void 0 && { value: el.value },
6857
+ ...el.icon !== void 0 && { icon: el.icon },
6858
+ ...el.format !== void 0 && { format: el.format },
6859
+ ...el.max !== void 0 && { max: el.max }
6735
6860
  };
6736
6861
  });
6737
6862
  }
@@ -6770,7 +6895,7 @@ function GameHud({
6770
6895
  );
6771
6896
  }
6772
6897
  GameHud.displayName = "GameHud";
6773
- var variantMap2 = {
6898
+ var variantMap = {
6774
6899
  primary: "bg-blue-600 hover:bg-blue-500 text-white border-blue-400 shadow-lg shadow-blue-500/25",
6775
6900
  secondary: "bg-gray-700 hover:bg-gray-600 text-white border-gray-500",
6776
6901
  ghost: "bg-transparent hover:bg-white/10 text-white border-white/20"
@@ -6849,7 +6974,7 @@ function GameMenu({
6849
6974
  "transition-all duration-200 transform",
6850
6975
  "hover:scale-105 active:scale-95",
6851
6976
  "focus:outline-none focus:ring-4 focus:ring-white/25",
6852
- variantMap2[option.variant ?? "secondary"] ?? variantMap2.secondary,
6977
+ variantMap[option.variant ?? "secondary"] ?? variantMap.secondary,
6853
6978
  option.disabled && "opacity-50 cursor-not-allowed hover:scale-100"
6854
6979
  ),
6855
6980
  style: {
@@ -13931,4 +14056,4 @@ function WorldMapTemplate({
13931
14056
  }
13932
14057
  WorldMapTemplate.displayName = "WorldMapTemplate";
13933
14058
 
13934
- export { ALL_PRESETS, AR_BOOK_FIELDS, ActionPalette, ActionTile, AuthLayout, BattleBoard, BattleTemplate, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, BuilderBoard, CanvasEffect, CastleBoard, CastleTemplate, Chart, ClassifierBoard, CodeView, CodeViewer, CollapsibleSection, CombatLog, ConfirmDialog, ContentRenderer, CounterTemplate, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DebuggerBoard, DialogueBox, DocumentViewer, StateMachineView as DomStateMachineVisualizer, DrawerSlot, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FormActions, FormLayout, FormSection, GameAudioContext, GameAudioProvider, GameAudioToggle, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GraphCanvas, Header, IDENTITY_BOOK_FIELDS, InventoryPanel, IsometricCanvas, JazariStateMachine, List, MediaGallery, Meter, ModalSlot, Navigation, NegotiatorBoard, NotifyListener, ObjectRulePanel, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, PhysicsManager, RuleEditor, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, Section, SequenceBar, SequencerBoard, Sidebar, SignaturePad, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Split, SplitPane, StateArchitectBoard, StateMachineView, StateNode2 as StateNode, StatusBar, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, Table, TerrainPalette, Timeline, ToastSlot, TraitSlot, TraitStateViewer, TransitionArrow, UncontrolledBattleBoard, VariablePanel, WizardContainer, WorldMapBoard, WorldMapTemplate, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, combatAnimations, combatClasses, combatEffects, createInitialGameState, createUnitAnimationState, generateCombatMessage, getCurrentFrame, inferDirection, isoToScreen, mapBookData, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, springOscillator, tickAnimationState, transitionAnimation, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };
14059
+ export { ALL_PRESETS, AR_BOOK_FIELDS, ActionPalette, ActionTile, AuthLayout, BattleBoard, BattleTemplate, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, BuilderBoard, CanvasEffect, CastleBoard, CastleTemplate, Chart, ClassifierBoard, CodeView, CodeViewer, CollapsibleSection, CombatLog, ConfirmDialog, ContentRenderer, CounterTemplate, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DebuggerBoard, DialogueBox, DocumentViewer, StateMachineView as DomStateMachineVisualizer, DrawerSlot, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FormActions, FormLayout, FormSection, GameAudioContext, GameAudioProvider, GameAudioToggle, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GraphCanvas, Header, IDENTITY_BOOK_FIELDS, InventoryPanel, IsometricCanvas, JazariStateMachine, List, MediaGallery, Meter, ModalSlot, Navigation, NegotiatorBoard, NotifyListener, ObjectRulePanel, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, PhysicsManager, PlatformerCanvas, RuleEditor, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, Section, SequenceBar, SequencerBoard, Sidebar, SignaturePad, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Split, SplitPane, StateArchitectBoard, StateMachineView, StateNode2 as StateNode, StatusBar, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, Table, TerrainPalette, Timeline, ToastSlot, TraitSlot, TraitStateViewer, TransitionArrow, UncontrolledBattleBoard, VariablePanel, WizardContainer, WorldMapBoard, WorldMapTemplate, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, combatAnimations, combatClasses, combatEffects, createInitialGameState, createUnitAnimationState, generateCombatMessage, getCurrentFrame, inferDirection, isoToScreen, mapBookData, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, springOscillator, tickAnimationState, transitionAnimation, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };
@@ -1,8 +1,8 @@
1
- export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-42WRQA7T.js';
1
+ export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-2UMN2BLO.js';
2
2
  import '../chunk-3HJHHULT.js';
3
+ export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
3
4
  export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useQuerySingleton, useTranslate } from '../chunk-GOZKH7QW.js';
4
5
  export { useEmitEvent, useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
5
6
  export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-3JGAROCW.js';
6
7
  import '../chunk-TSETXL2E.js';
7
- export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
8
8
  import '../chunk-PKBMQBKP.js';
@@ -1,13 +1,13 @@
1
- import { SuspenseConfigProvider } from '../chunk-HWZL7IZG.js';
1
+ import { SuspenseConfigProvider } from '../chunk-AL6BLHMG.js';
2
2
  import { ThemeProvider } from '../chunk-DKQN5FVU.js';
3
3
  import { SelectionProvider, EntityDataProvider } from '../chunk-GOZKH7QW.js';
4
4
  export { SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-GOZKH7QW.js';
5
5
  import { useEventBus, EventBusProvider } from '../chunk-YXZM3WCF.js';
6
6
  export { EventBusContext, EventBusProvider } from '../chunk-YXZM3WCF.js';
7
7
  import '../chunk-3JGAROCW.js';
8
+ import '../chunk-TSETXL2E.js';
8
9
  import { recordTransition, registerCheck, bindEventBus, bindTraitStateGetter } from '../chunk-45CTDYBT.js';
9
10
  import '../chunk-KKCVDUK7.js';
10
- import '../chunk-TSETXL2E.js';
11
11
  import { useOfflineExecutor } from '../chunk-K2D5D3WK.js';
12
12
  import '../chunk-PKBMQBKP.js';
13
13
  import { createContext, useState, useCallback, useMemo, useContext, useRef, useEffect } from 'react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "2.4.0",
3
+ "version": "2.5.2",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",
@@ -74,60 +74,63 @@
74
74
  "@almadar/evaluator": ">=2.0.0",
75
75
  "@almadar/patterns": ">=2.0.0",
76
76
  "clsx": "^2.1.0",
77
- "tailwind-merge": "^2.2.0",
77
+ "leaflet": "1.9.4",
78
78
  "lucide-react": "^0.344.0",
79
+ "react-leaflet": "^4.2.1",
79
80
  "react-markdown": "^9.0.0",
81
+ "react-syntax-highlighter": "^16.1.0",
82
+ "rehype-katex": "^7.0.0",
80
83
  "remark-gfm": "^4.0.0",
81
84
  "remark-math": "^6.0.0",
82
- "rehype-katex": "^7.0.0",
83
- "react-syntax-highlighter": "^16.1.0"
85
+ "tailwind-merge": "^2.2.0"
84
86
  },
85
87
  "peerDependencies": {
88
+ "@react-three/drei": "^9.92.0 || ^10.0.0",
89
+ "@react-three/fiber": "^8.15.0",
90
+ "@tanstack/react-query": "^5.0.0",
86
91
  "react": ">=18.0.0",
87
92
  "react-dom": ">=18.0.0",
88
93
  "react-router-dom": "^7.0.0",
89
- "@tanstack/react-query": "^5.0.0",
90
- "three": "^0.160.0",
91
- "@react-three/fiber": "^8.15.0",
92
- "@react-three/drei": "^9.92.0 || ^10.0.0"
94
+ "three": "^0.160.0"
93
95
  },
94
96
  "devDependencies": {
95
- "react": "^19.0.0",
96
- "react-dom": "^19.0.0",
97
- "react-router-dom": "^7.13.0",
98
- "@tanstack/react-query": "^5.0.0",
99
- "@types/react": "^19.0.0",
100
- "@types/react-dom": "^19.0.0",
101
- "@types/three": "^0.160.0",
97
+ "@almadar/eslint-plugin": ">=2.3.0",
98
+ "@storybook/addon-docs": "^10.2.6",
102
99
  "@storybook/addon-links": "^10.2.6",
103
100
  "@storybook/addon-themes": "^10.2.6",
104
101
  "@storybook/react": "^10.2.6",
105
102
  "@storybook/react-vite": "^10.2.6",
106
- "storybook": "^10.2.6",
103
+ "@tanstack/react-query": "^5.0.0",
104
+ "@testing-library/jest-dom": "^6.4.0",
105
+ "@testing-library/react": "^14.2.0",
106
+ "@testing-library/user-event": "^14.5.0",
107
+ "@types/leaflet": "1.9.21",
108
+ "@types/node": "^22.0.0",
109
+ "@types/react": "^19.0.0",
110
+ "@types/react-dom": "^19.0.0",
111
+ "@types/react-syntax-highlighter": "^15.5.0",
112
+ "@types/three": "^0.160.0",
113
+ "@typescript-eslint/parser": "8.56.0",
107
114
  "@vitejs/plugin-react": "^4.2.0",
108
- "babel-plugin-react-compiler": "19.0.0-beta-af1b7da-20250417",
109
- "react-compiler-runtime": "19.0.0-beta-af1b7da-20250417",
115
+ "@vitest/ui": "^1.4.0",
110
116
  "autoprefixer": "^10.4.0",
117
+ "babel-plugin-react-compiler": "19.0.0-beta-af1b7da-20250417",
118
+ "eslint": "10.0.0",
119
+ "eslint-plugin-react-compiler": "19.1.0-rc.2",
120
+ "jsdom": "^24.0.0",
121
+ "katex": "^0.16.0",
111
122
  "postcss": "^8.4.35",
123
+ "react": "^19.0.0",
124
+ "react-compiler-runtime": "19.0.0-beta-af1b7da-20250417",
125
+ "react-dom": "^19.0.0",
126
+ "react-router-dom": "^7.13.0",
127
+ "storybook": "^10.2.6",
112
128
  "tailwindcss": "^3.4.0",
113
129
  "tsup": "^8.0.0",
130
+ "tsx": "^4.7.0",
114
131
  "typescript": "^5.4.0",
115
132
  "vite": "^5.2.0",
116
- "tsx": "^4.7.0",
117
- "vitest": "^1.4.0",
118
- "@testing-library/react": "^14.2.0",
119
- "@testing-library/jest-dom": "^6.4.0",
120
- "@testing-library/user-event": "^14.5.0",
121
- "@vitest/ui": "^1.4.0",
122
- "jsdom": "^24.0.0",
123
- "@storybook/addon-docs": "^10.2.6",
124
- "@types/react-syntax-highlighter": "^15.5.0",
125
- "katex": "^0.16.0",
126
- "@types/node": "^22.0.0",
127
- "eslint": "10.0.0",
128
- "@typescript-eslint/parser": "8.56.0",
129
- "@almadar/eslint-plugin": ">=2.3.0",
130
- "eslint-plugin-react-compiler": "19.1.0-rc.2"
133
+ "vitest": "^1.4.0"
131
134
  },
132
135
  "repository": {
133
136
  "type": "git",
@@ -1,7 +1,7 @@
1
1
  import { apiClient } from './chunk-3HJHHULT.js';
2
+ import { subscribe, getSnapshot, clearEntities, removeEntity, updateSingleton, updateEntity, spawnEntity, getSingleton, getAllEntities, getByType, getEntity } from './chunk-N7MVUW4R.js';
2
3
  import { SelectionContext, entityDataKeys, useEntityList } from './chunk-GOZKH7QW.js';
3
4
  import { useEventBus } from './chunk-YXZM3WCF.js';
4
- import { subscribe, getSnapshot, clearEntities, removeEntity, updateSingleton, updateEntity, spawnEntity, getSingleton, getAllEntities, getByType, getEntity } from './chunk-N7MVUW4R.js';
5
5
  import { useCallback, useState, useEffect, useMemo, useContext, useSyncExternalStore } from 'react';
6
6
  import { useQueryClient, useMutation, useQuery } from '@tanstack/react-query';
7
7