@almadar/ui 5.28.4 → 5.29.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 (49) hide show
  1. package/dist/avl/index.cjs +6600 -495
  2. package/dist/avl/index.js +6601 -496
  3. package/dist/components/core/molecules/NodeSlotEditor.d.ts +17 -0
  4. package/dist/components/core/molecules/index.d.ts +1 -0
  5. package/dist/components/core/organisms/index.d.ts +1 -1
  6. package/dist/components/core/templates/index.d.ts +3 -0
  7. package/dist/components/game/{organisms → molecules}/GameCanvas3D.d.ts +1 -3
  8. package/dist/components/game/molecules/index.d.ts +1 -0
  9. package/dist/components/game/{organisms → molecules}/three/hooks/useGameCanvas3DEvents.d.ts +1 -1
  10. package/dist/components/game/{organisms → molecules}/three/index.cjs +2 -2
  11. package/dist/components/game/{organisms → molecules}/three/index.css +3 -3
  12. package/dist/components/game/{organisms → molecules}/three/index.js +2 -2
  13. package/dist/components/game/{organisms → molecules}/three/renderers/FeatureRenderer.d.ts +1 -1
  14. package/dist/components/game/{organisms → molecules}/three/renderers/FeatureRenderer3D.d.ts +1 -1
  15. package/dist/components/game/{organisms → molecules}/three/renderers/TileRenderer.d.ts +1 -1
  16. package/dist/components/game/{organisms → molecules}/three/renderers/UnitRenderer.d.ts +1 -1
  17. package/dist/components/game/organisms/index.d.ts +0 -9
  18. package/dist/components/index.cjs +105 -31
  19. package/dist/components/index.js +106 -32
  20. package/dist/providers/index.cjs +13 -12
  21. package/dist/providers/index.js +13 -12
  22. package/dist/runtime/index.cjs +13 -12
  23. package/dist/runtime/index.js +13 -12
  24. package/package.json +9 -4
  25. package/dist/components/game/organisms/CombatLog.d.ts +0 -2
  26. package/dist/components/game/organisms/DialogueBox.d.ts +0 -2
  27. package/dist/components/game/organisms/GameHud.d.ts +0 -2
  28. package/dist/components/game/organisms/GameMenu.d.ts +0 -2
  29. package/dist/components/game/organisms/GameOverScreen.d.ts +0 -2
  30. package/dist/components/game/organisms/InventoryPanel.d.ts +0 -2
  31. package/dist/components/game/organisms/IsometricCanvas.d.ts +0 -3
  32. package/dist/components/game/organisms/PlatformerCanvas.d.ts +0 -2
  33. /package/dist/components/game/{organisms → molecules}/three/Camera3D.d.ts +0 -0
  34. /package/dist/components/game/{organisms → molecules}/three/Lighting3D.d.ts +0 -0
  35. /package/dist/components/game/{organisms → molecules}/three/Scene3D.d.ts +0 -0
  36. /package/dist/components/game/{organisms → molecules}/three/components/Canvas3DErrorBoundary.d.ts +0 -0
  37. /package/dist/components/game/{organisms → molecules}/three/components/Canvas3DLoadingState.d.ts +0 -0
  38. /package/dist/components/game/{organisms → molecules}/three/components/ModelLoader.d.ts +0 -0
  39. /package/dist/components/game/{organisms → molecules}/three/components/PhysicsObject3D.d.ts +0 -0
  40. /package/dist/components/game/{organisms → molecules}/three/components/index.d.ts +0 -0
  41. /package/dist/components/game/{organisms → molecules}/three/hooks/useAssetLoader.d.ts +0 -0
  42. /package/dist/components/game/{organisms → molecules}/three/hooks/useRaycaster.d.ts +0 -0
  43. /package/dist/components/game/{organisms → molecules}/three/hooks/useSceneGraph.d.ts +0 -0
  44. /package/dist/components/game/{organisms → molecules}/three/hooks/useThree.d.ts +0 -0
  45. /package/dist/components/game/{organisms → molecules}/three/index.d.ts +0 -0
  46. /package/dist/components/game/{organisms → molecules}/three/loaders/AssetLoader.d.ts +0 -0
  47. /package/dist/components/game/{organisms → molecules}/three/renderers/index.d.ts +0 -0
  48. /package/dist/components/game/{organisms → molecules}/three/utils/culling.d.ts +0 -0
  49. /package/dist/components/game/{organisms → molecules}/three/utils/grid3D.d.ts +0 -0
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { TraitConfigValue } from '@almadar/core';
3
+ export interface NodeSlotEditorProps {
4
+ /** Current node-slot value (a render-ui pattern config, or nothing). */
5
+ value: TraitConfigValue | undefined;
6
+ /** Fired with the next value. */
7
+ onChange: (next: TraitConfigValue) => void;
8
+ /** Additional CSS classes. */
9
+ className?: string;
10
+ }
11
+ /**
12
+ * NodeSlotEditor — edits a `node` config slot (e.g. `children`/`hud`/`debugPanel`).
13
+ * A node slot renders a nested render-ui pattern, so this picks the pattern TYPE
14
+ * from the known-pattern registry and edits that pattern's props as a tree — instead
15
+ * of the read-only "edit in source" fallback. Self-contained `@almadar/ui` atoms.
16
+ */
17
+ export declare const NodeSlotEditor: React.FC<NodeSlotEditorProps>;
@@ -1,5 +1,6 @@
1
1
  export { ErrorBoundary, type ErrorBoundaryProps } from './ErrorBoundary';
2
2
  export { JsonTreeEditor, type JsonTreeEditorProps } from './JsonTreeEditor';
3
+ export { NodeSlotEditor, type NodeSlotEditorProps } from './NodeSlotEditor';
3
4
  export { FileTree, type FileTreeProps, type FileTreeNode } from './FileTree';
4
5
  export { FormField, type FormFieldProps } from './FormField';
5
6
  export { EmptyState, type EmptyStateProps } from './EmptyState';
@@ -26,4 +26,4 @@ export { StepFlowOrganism, type StepFlowOrganismProps, } from "../../marketing/o
26
26
  export { ShowcaseOrganism, type ShowcaseOrganismProps, } from "../../marketing/organisms/ShowcaseOrganism";
27
27
  export { TeamOrganism, type TeamOrganismProps, } from "../../marketing/organisms/TeamOrganism";
28
28
  export { CaseStudyOrganism, type CaseStudyOrganismProps, } from "../../marketing/organisms/CaseStudyOrganism";
29
- export { FeatureRenderer, type FeatureRendererProps } from '../../game/organisms/three/renderers/FeatureRenderer';
29
+ export { FeatureRenderer, type FeatureRendererProps } from '../../game/molecules/three/renderers/FeatureRenderer';
@@ -12,3 +12,6 @@ export { LandingPageTemplate, type LandingPageTemplateProps, type LandingPageEnt
12
12
  export { PricingPageTemplate, type PricingPageTemplateProps, type PricingPageEntity, } from '../../marketing/templates/PricingPageTemplate';
13
13
  export { FeatureDetailPageTemplate, type FeatureDetailPageTemplateProps, type FeatureDetailPageEntity, type FeatureDetailSection, } from '../../marketing/templates/FeatureDetailPageTemplate';
14
14
  export { AboutPageTemplate, type AboutPageTemplateProps, type AboutPageEntity, } from '../../marketing/templates/AboutPageTemplate';
15
+ export type { GameCanvas3DBattleTemplate, GameCanvas3DBattleTemplateProps } from '../../game/templates/GameCanvas3DBattleTemplate';
16
+ export type { GameCanvas3DCastleTemplate, GameCanvas3DCastleTemplateProps } from '../../game/templates/GameCanvas3DCastleTemplate';
17
+ export type { GameCanvas3DWorldMapTemplate, GameCanvas3DWorldMapTemplateProps } from '../../game/templates/GameCanvas3DWorldMapTemplate';
@@ -17,7 +17,7 @@ import React from 'react';
17
17
  import type { EventEmit } from '@almadar/core';
18
18
  import * as THREE from 'three';
19
19
  import { AssetLoader } from './three/loaders/AssetLoader';
20
- import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
20
+ import type { IsometricTile, IsometricUnit, IsometricFeature } from '../organisms/types/isometric';
21
21
  import './GameCanvas3D.css';
22
22
  export type { IsometricTile, IsometricUnit, IsometricFeature };
23
23
  /** Game event for canvas display */
@@ -35,8 +35,6 @@ export type CameraMode = 'isometric' | 'perspective' | 'top-down';
35
35
  export type MapOrientation = 'standard' | 'rotated';
36
36
  /** Overlay control */
37
37
  export type OverlayControl = 'default' | 'hidden' | 'minimap';
38
- /** Unit animation state */
39
- export type UnitAnimationState = 'idle' | 'walk' | 'attack' | 'hurt' | 'die';
40
38
  /** Props for GameCanvas3D component */
41
39
  export interface GameCanvas3DProps {
42
40
  /** Additional CSS classes */
@@ -5,6 +5,7 @@
5
5
  *
6
6
  * @packageDocumentation
7
7
  */
8
+ export type { GameCanvas3D, GameCanvas3DProps, GameCanvas3DHandle, GameEvent, CameraMode, MapOrientation, OverlayControl } from './GameCanvas3D';
8
9
  export { DPad, type DPadProps, type DPadDirection } from './DPad';
9
10
  export { ActionButtons, type ActionButtonsProps, type ActionButtonConfig } from './ActionButtons';
10
11
  export { StatBadge, type StatBadgeProps } from './StatBadge';
@@ -1,5 +1,5 @@
1
1
  import type { EventEmit } from '@almadar/core';
2
- import type { IsometricTile, IsometricUnit, IsometricFeature } from '../../types/isometric';
2
+ import type { IsometricTile, IsometricUnit, IsometricFeature } from '../../../organisms/types/isometric';
3
3
  export interface GameCanvas3DEventConfig {
4
4
  /** Event name for tile clicks */
5
5
  tileClickEvent?: EventEmit<{
@@ -780,7 +780,7 @@ var AssetLoader = class {
780
780
  };
781
781
  var assetLoader = new AssetLoader();
782
782
 
783
- // components/game/organisms/three/hooks/useThree.ts
783
+ // components/game/molecules/three/hooks/useThree.ts
784
784
  var DEFAULT_OPTIONS = {
785
785
  cameraMode: "isometric",
786
786
  cameraPosition: [10, 10, 10],
@@ -1500,7 +1500,7 @@ function useEmitEvent() {
1500
1500
  );
1501
1501
  }
1502
1502
 
1503
- // components/game/organisms/three/hooks/useGameCanvas3DEvents.ts
1503
+ // components/game/molecules/three/hooks/useGameCanvas3DEvents.ts
1504
1504
  function useGameCanvas3DEvents(options) {
1505
1505
  const {
1506
1506
  tileClickEvent,
@@ -1,4 +1,4 @@
1
- /* components/game/organisms/three/components/Canvas3DLoadingState.css */
1
+ /* components/game/molecules/three/components/Canvas3DLoadingState.css */
2
2
  .canvas-3d-loading {
3
3
  position: absolute;
4
4
  inset: 0;
@@ -151,7 +151,7 @@
151
151
  }
152
152
  }
153
153
 
154
- /* components/game/organisms/three/components/Canvas3DErrorBoundary.css */
154
+ /* components/game/molecules/three/components/Canvas3DErrorBoundary.css */
155
155
  .canvas-3d-error {
156
156
  position: absolute;
157
157
  inset: 0;
@@ -314,7 +314,7 @@
314
314
  }
315
315
  }
316
316
 
317
- /* components/game/organisms/GameCanvas3D.css */
317
+ /* components/game/molecules/GameCanvas3D.css */
318
318
  .game-canvas-3d {
319
319
  position: relative;
320
320
  width: 100%;
@@ -756,7 +756,7 @@ var AssetLoader = class {
756
756
  };
757
757
  var assetLoader = new AssetLoader();
758
758
 
759
- // components/game/organisms/three/hooks/useThree.ts
759
+ // components/game/molecules/three/hooks/useThree.ts
760
760
  var DEFAULT_OPTIONS = {
761
761
  cameraMode: "isometric",
762
762
  cameraPosition: [10, 10, 10],
@@ -1476,7 +1476,7 @@ function useEmitEvent() {
1476
1476
  );
1477
1477
  }
1478
1478
 
1479
- // components/game/organisms/three/hooks/useGameCanvas3DEvents.ts
1479
+ // components/game/molecules/three/hooks/useGameCanvas3DEvents.ts
1480
1480
  function useGameCanvas3DEvents(options) {
1481
1481
  const {
1482
1482
  tileClickEvent,
@@ -7,7 +7,7 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import React from 'react';
10
- import type { IsometricFeature } from '../../types/isometric';
10
+ import type { IsometricFeature } from '../../../organisms/types/isometric';
11
11
  export interface FeatureRendererProps {
12
12
  /** Array of features to render */
13
13
  features: IsometricFeature[];
@@ -7,7 +7,7 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import React from 'react';
10
- import type { IsometricFeature } from '../../types/isometric';
10
+ import type { IsometricFeature } from '../../../organisms/types/isometric';
11
11
  export interface FeatureRenderer3DProps {
12
12
  /** Array of features to render */
13
13
  features: IsometricFeature[];
@@ -7,7 +7,7 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import React from 'react';
10
- import type { IsometricTile } from '../../types/isometric';
10
+ import type { IsometricTile } from '../../../organisms/types/isometric';
11
11
  export interface TileRendererProps {
12
12
  /** Array of tiles to render */
13
13
  tiles: IsometricTile[];
@@ -7,7 +7,7 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import React from 'react';
10
- import type { IsometricUnit } from '../../types/isometric';
10
+ import type { IsometricUnit } from '../../../organisms/types/isometric';
11
11
  export type UnitAnimationState = 'idle' | 'walk' | 'attack' | 'hurt' | 'die';
12
12
  export interface UnitRendererProps {
13
13
  /** Array of units to render */
@@ -6,8 +6,6 @@
6
6
  *
7
7
  * @packageDocumentation
8
8
  */
9
- export { IsometricCanvas, type IsometricCanvasProps } from './IsometricCanvas';
10
- export { PlatformerCanvas, type PlatformerCanvasProps, type PlatformerPlatform, type PlatformerPlayer } from './PlatformerCanvas';
11
9
  export { CanvasEffect, type CanvasEffectProps, type CombatActionType } from './CanvasEffect';
12
10
  export type { IsometricTile, IsometricUnit, IsometricFeature, CameraState, } from './types/isometric';
13
11
  export type { AnimationName, FacingDirection, SpriteDirection, ResolvedFrame, UnitAnimationState, SpriteFrameDims, SpriteSheetUrls, AnimationDef, } from './types/spriteAnimation';
@@ -22,11 +20,6 @@ export { PhysicsManager, type Physics2DState, type PhysicsBounds, type PhysicsCo
22
20
  export { isoToScreen, screenToIso, TILE_WIDTH, TILE_HEIGHT, FLOOR_HEIGHT, DIAMOND_TOP_Y, FEATURE_COLORS, } from './utils/isometric';
23
21
  export { inferDirection, resolveSheetDirection, getCurrentFrame, resolveFrame, createUnitAnimationState, transitionAnimation, tickAnimationState, } from './utils/spriteAnimation';
24
22
  export { SPRITE_SHEET_LAYOUT, SHEET_COLUMNS } from './utils/spriteSheetConstants';
25
- export { GameHud, type GameHudProps, type GameHudStat, type GameHudElement } from './GameHud';
26
- export { GameMenu, type GameMenuProps, type MenuOption } from './GameMenu';
27
- export { GameOverScreen, type GameOverScreenProps, type GameOverStat, type GameOverAction } from './GameOverScreen';
28
- export { InventoryPanel, type InventoryPanelProps, type InventoryItem } from './InventoryPanel';
29
- export { DialogueBox, type DialogueBoxProps, type DialogueNode, type DialogueChoice } from './DialogueBox';
30
23
  export { BattleBoard, type BattleBoardProps, type BattlePhase, type BattleSlotContext, } from './BattleBoard';
31
24
  export { UncontrolledBattleBoard, type UncontrolledBattleBoardProps, } from './UncontrolledBattleBoard';
32
25
  export { useBattleState, type BattleStateEventConfig, type BattleStateCallbacks, type BattleStateResult, } from './hooks/useBattleState';
@@ -44,8 +37,6 @@ export * from './puzzles/builder';
44
37
  export * from './puzzles/debugger';
45
38
  export * from './puzzles/negotiator';
46
39
  export * from './physics-sim';
47
- export { CombatLog } from './CombatLog';
48
- export type { CombatLogProps, CombatEvent, CombatLogEventType } from './CombatLog';
49
40
  export { createInitialGameState, calculateValidMoves, calculateAttackTargets, } from './types/game';
50
41
  export type { Position, GameUnit, UnitTrait, BoardTile, GamePhase, GameState, GameAction, } from './types/game';
51
42
  export { combatAnimations, combatClasses, combatEffects, applyTemporaryEffect, calculateDamage, generateCombatMessage, } from './utils/combatEffects';
@@ -7126,6 +7126,16 @@ var init_Skeleton = __esm({
7126
7126
  Skeleton.displayName = "Skeleton";
7127
7127
  }
7128
7128
  });
7129
+ function getKnownPatterns() {
7130
+ return Object.keys(componentMapping);
7131
+ }
7132
+ var componentMapping;
7133
+ var init_pattern_resolver = __esm({
7134
+ "renderer/pattern-resolver.ts"() {
7135
+ logger.createLogger("almadar:ui:pattern-resolver");
7136
+ componentMapping = {};
7137
+ }
7138
+ });
7129
7139
 
7130
7140
  // renderer/slot-definitions.ts
7131
7141
  function isPortalSlot(slot) {
@@ -9032,7 +9042,7 @@ function getTraitSnapshots() {
9032
9042
  try {
9033
9043
  snapshots.push(getter());
9034
9044
  } catch (err) {
9035
- log3.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
9045
+ log4.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
9036
9046
  }
9037
9047
  }
9038
9048
  return snapshots;
@@ -9110,10 +9120,10 @@ function updateAssetStatus(url, status) {
9110
9120
  window.__orbitalVerification.assetStatus[url] = status;
9111
9121
  }
9112
9122
  }
9113
- var log3;
9123
+ var log4;
9114
9124
  var init_verificationRegistry = __esm({
9115
9125
  "lib/verificationRegistry.ts"() {
9116
- log3 = logger.createLogger("almadar:bridge");
9126
+ log4 = logger.createLogger("almadar:bridge");
9117
9127
  exposeOnWindow();
9118
9128
  }
9119
9129
  });
@@ -10036,13 +10046,6 @@ var init_IsometricCanvas = __esm({
10036
10046
  }
10037
10047
  });
10038
10048
 
10039
- // components/game/organisms/IsometricCanvas.tsx
10040
- var init_IsometricCanvas2 = __esm({
10041
- "components/game/organisms/IsometricCanvas.tsx"() {
10042
- init_IsometricCanvas();
10043
- }
10044
- });
10045
-
10046
10049
  // components/game/organisms/boardEntity.ts
10047
10050
  function boardEntity(entity) {
10048
10051
  if (!entity) return void 0;
@@ -10438,7 +10441,7 @@ var init_BattleBoard = __esm({
10438
10441
  init_Button();
10439
10442
  init_Typography();
10440
10443
  init_Stack();
10441
- init_IsometricCanvas2();
10444
+ init_IsometricCanvas();
10442
10445
  init_boardEntity();
10443
10446
  init_isometric();
10444
10447
  BattleBoard.displayName = "BattleBoard";
@@ -11198,7 +11201,7 @@ var init_avl_elk_layout = __esm({
11198
11201
  elk = new ELK__default.default();
11199
11202
  }
11200
11203
  });
11201
- var log4, SWIM_GUTTER, CENTER_W; exports.BehaviorView = void 0;
11204
+ var log5, SWIM_GUTTER, CENTER_W; exports.BehaviorView = void 0;
11202
11205
  var init_BehaviorView = __esm({
11203
11206
  "components/avl/molecules/BehaviorView.tsx"() {
11204
11207
  "use client";
@@ -11207,7 +11210,7 @@ var init_BehaviorView = __esm({
11207
11210
  init_AvlSwimLane();
11208
11211
  init_types();
11209
11212
  init_avl_elk_layout();
11210
- log4 = logger.createLogger("almadar:ui:avl:behavior-view");
11213
+ log5 = logger.createLogger("almadar:ui:avl:behavior-view");
11211
11214
  SWIM_GUTTER = 120;
11212
11215
  CENTER_W = 360;
11213
11216
  exports.BehaviorView = ({ data }) => {
@@ -11218,7 +11221,7 @@ var init_BehaviorView = __esm({
11218
11221
  const dataKey = React74.useMemo(() => JSON.stringify(traitData), [traitData]);
11219
11222
  React74.useEffect(() => {
11220
11223
  if (!traitData) return;
11221
- computeTraitLayout(traitData).then(setLayout).catch((err) => log4.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
11224
+ computeTraitLayout(traitData).then(setLayout).catch((err) => log5.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
11222
11225
  }, [dataKey]);
11223
11226
  if (!traitData) {
11224
11227
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.noTraitData") });
@@ -11725,7 +11728,7 @@ function generateDiff(oldVal, newVal) {
11725
11728
  }
11726
11729
  return diff;
11727
11730
  }
11728
- var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS; exports.CodeBlock = void 0;
11731
+ var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS; exports.CodeBlock = void 0;
11729
11732
  var init_CodeBlock = __esm({
11730
11733
  "components/core/molecules/markdown/CodeBlock.tsx"() {
11731
11734
  init_cn();
@@ -11808,7 +11811,7 @@ var init_CodeBlock = __esm({
11808
11811
  "lolo-op-async": { color: syntax.ORB_COLORS.dark.async }
11809
11812
  };
11810
11813
  loloStyle = { ...dark__default.default, ...loloStyleOverrides };
11811
- log5 = logger.createLogger("almadar:ui:markdown-code");
11814
+ log6 = logger.createLogger("almadar:ui:markdown-code");
11812
11815
  CODE_LANGUAGES = [
11813
11816
  "text",
11814
11817
  "json",
@@ -12072,7 +12075,7 @@ var init_CodeBlock = __esm({
12072
12075
  eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: true });
12073
12076
  setTimeout(() => setCopied(false), 2e3);
12074
12077
  } catch (err) {
12075
- log5.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
12078
+ log6.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
12076
12079
  eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: false });
12077
12080
  }
12078
12081
  };
@@ -15740,14 +15743,14 @@ function useSafeEventBus2() {
15740
15743
  } };
15741
15744
  }
15742
15745
  }
15743
- var log6, lookStyles4; exports.ButtonGroup = void 0;
15746
+ var log7, lookStyles4; exports.ButtonGroup = void 0;
15744
15747
  var init_ButtonGroup = __esm({
15745
15748
  "components/core/molecules/ButtonGroup.tsx"() {
15746
15749
  "use client";
15747
15750
  init_cn();
15748
15751
  init_atoms2();
15749
15752
  init_useEventBus();
15750
- log6 = logger.createLogger("almadar:ui:button-group");
15753
+ log7 = logger.createLogger("almadar:ui:button-group");
15751
15754
  lookStyles4 = {
15752
15755
  "right-aligned-buttons": "",
15753
15756
  "floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
@@ -15828,7 +15831,7 @@ var init_ButtonGroup = __esm({
15828
15831
  {
15829
15832
  variant: "ghost",
15830
15833
  onClick: () => {
15831
- log6.debug("Filter clicked", { field: filter.field });
15834
+ log7.debug("Filter clicked", { field: filter.field });
15832
15835
  },
15833
15836
  children: filter.label
15834
15837
  },
@@ -18353,7 +18356,7 @@ var init_CastleBoard = __esm({
18353
18356
  "use client";
18354
18357
  init_cn();
18355
18358
  init_useEventBus();
18356
- init_IsometricCanvas2();
18359
+ init_IsometricCanvas();
18357
18360
  init_boardEntity();
18358
18361
  init_isometric();
18359
18362
  CastleBoard.displayName = "CastleBoard";
@@ -22521,6 +22524,65 @@ var init_JsonTreeEditor = __esm({
22521
22524
  };
22522
22525
  }
22523
22526
  });
22527
+ function normalize(value) {
22528
+ const wasArray = Array.isArray(value);
22529
+ const pattern = wasArray ? value[0] : value;
22530
+ const type = isObj2(pattern) && typeof pattern["type"] === "string" ? pattern["type"] : "";
22531
+ const props = {};
22532
+ if (isObj2(pattern)) {
22533
+ for (const [k, v] of Object.entries(pattern)) if (k !== "type") props[k] = v;
22534
+ }
22535
+ return { type, props, wasArray };
22536
+ }
22537
+ var isObj2; exports.NodeSlotEditor = void 0;
22538
+ var init_NodeSlotEditor = __esm({
22539
+ "components/core/molecules/NodeSlotEditor.tsx"() {
22540
+ "use client";
22541
+ init_Stack();
22542
+ init_Select();
22543
+ init_Typography();
22544
+ init_JsonTreeEditor();
22545
+ init_pattern_resolver();
22546
+ init_cn();
22547
+ isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
22548
+ exports.NodeSlotEditor = ({ value, onChange, className }) => {
22549
+ const { type, props, wasArray } = normalize(value);
22550
+ const patterns = React74__namespace.default.useMemo(() => {
22551
+ try {
22552
+ return [...getKnownPatterns()].sort();
22553
+ } catch {
22554
+ return [];
22555
+ }
22556
+ }, []);
22557
+ const options = React74__namespace.default.useMemo(
22558
+ () => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p2) => ({ value: p2, label: p2 }))],
22559
+ [patterns]
22560
+ );
22561
+ const emit = (nextType, nextProps) => {
22562
+ if (!nextType) {
22563
+ onChange(wasArray ? [] : {});
22564
+ return;
22565
+ }
22566
+ const pattern = { type: nextType, ...nextProps };
22567
+ onChange(wasArray || value === void 0 ? [pattern] : pattern);
22568
+ };
22569
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", className: cn("w-full", className), children: [
22570
+ /* @__PURE__ */ jsxRuntime.jsx(
22571
+ exports.Select,
22572
+ {
22573
+ options,
22574
+ value: type,
22575
+ onChange: (e) => emit(e.target.value, props)
22576
+ }
22577
+ ),
22578
+ type !== "" && /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "none", className: "pl-1", children: [
22579
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "muted", children: "props" }),
22580
+ /* @__PURE__ */ jsxRuntime.jsx(exports.JsonTreeEditor, { value: props, onChange: (next) => emit(type, isObj2(next) ? next : {}) })
22581
+ ] })
22582
+ ] });
22583
+ };
22584
+ }
22585
+ });
22524
22586
  function fileIcon(name) {
22525
22587
  const ext = name.split(".").pop()?.toLowerCase() ?? "";
22526
22588
  switch (ext) {
@@ -23869,9 +23931,9 @@ function debug(...args) {
23869
23931
  const [first, ...rest] = args;
23870
23932
  const message = typeof first === "string" ? first : "<debug>";
23871
23933
  if (rest.length === 0 && typeof first === "string") {
23872
- log7.debug(message);
23934
+ log8.debug(message);
23873
23935
  } else {
23874
- log7.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
23936
+ log8.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
23875
23937
  }
23876
23938
  }
23877
23939
  function debugGroup(label) {
@@ -23899,11 +23961,11 @@ function toLogMetaValue(v) {
23899
23961
  }
23900
23962
  return String(v);
23901
23963
  }
23902
- var NAMESPACE, log7;
23964
+ var NAMESPACE, log8;
23903
23965
  var init_debug = __esm({
23904
23966
  "lib/debug.ts"() {
23905
23967
  NAMESPACE = "almadar:ui:debug";
23906
- log7 = logger.createLogger(NAMESPACE);
23968
+ log8 = logger.createLogger(NAMESPACE);
23907
23969
  logger.createLogger("almadar:ui:debug:input");
23908
23970
  logger.createLogger("almadar:ui:debug:collision");
23909
23971
  logger.createLogger("almadar:ui:debug:physics");
@@ -35284,6 +35346,8 @@ function FieldControl({
35284
35346
  control = /* @__PURE__ */ jsxRuntime.jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
35285
35347
  } else if (decl.type === "string") {
35286
35348
  control = /* @__PURE__ */ jsxRuntime.jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
35349
+ } else if (decl.type === "node") {
35350
+ control = /* @__PURE__ */ jsxRuntime.jsx(exports.NodeSlotEditor, { value: effectiveValue, onChange: (next) => onChange(name, next) });
35287
35351
  } else if (decl.type.startsWith("[") || Array.isArray(effectiveValue)) {
35288
35352
  const arr = Array.isArray(effectiveValue) ? effectiveValue : [];
35289
35353
  control = /* @__PURE__ */ jsxRuntime.jsx(exports.JsonTreeEditor, { value: arr, onChange: (next) => onChange(name, next) });
@@ -35317,6 +35381,7 @@ var init_PropertyInspector = __esm({
35317
35381
  init_IconPicker();
35318
35382
  init_AssetPicker();
35319
35383
  init_JsonTreeEditor();
35384
+ init_NodeSlotEditor();
35320
35385
  TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
35321
35386
  SCALAR_TYPES = /* @__PURE__ */ new Set(["string", "number", "boolean", "icon", "asset"]);
35322
35387
  exports.PropertyInspector = ({
@@ -37213,6 +37278,7 @@ var init_molecules2 = __esm({
37213
37278
  "components/core/molecules/index.ts"() {
37214
37279
  init_ErrorBoundary();
37215
37280
  init_JsonTreeEditor();
37281
+ init_NodeSlotEditor();
37216
37282
  init_FileTree();
37217
37283
  init_FormField();
37218
37284
  init_EmptyState();
@@ -43414,7 +43480,7 @@ function getAllEvents(traits2) {
43414
43480
  function EventDispatcherTab({ traits: traits2, schema }) {
43415
43481
  const eventBus = useEventBus();
43416
43482
  const { t } = hooks.useTranslate();
43417
- const [log8, setLog] = React74__namespace.useState([]);
43483
+ const [log9, setLog] = React74__namespace.useState([]);
43418
43484
  const prevStatesRef = React74__namespace.useRef(/* @__PURE__ */ new Map());
43419
43485
  React74__namespace.useEffect(() => {
43420
43486
  for (const trait of traits2) {
@@ -43478,9 +43544,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
43478
43544
  /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
43479
43545
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
43480
43546
  ] }),
43481
- log8.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
43547
+ log9.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
43482
43548
  /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
43483
- /* @__PURE__ */ jsxRuntime.jsx(exports.Stack, { gap: "xs", children: log8.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "small", className: "font-mono text-xs", children: [
43549
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Stack, { gap: "xs", children: log9.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "small", className: "font-mono text-xs", children: [
43484
43550
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
43485
43551
  " ",
43486
43552
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
@@ -46975,7 +47041,7 @@ var init_WorldMapBoard = __esm({
46975
47041
  init_useEventBus();
46976
47042
  init_Stack();
46977
47043
  init_LoadingState();
46978
- init_IsometricCanvas2();
47044
+ init_IsometricCanvas();
46979
47045
  init_boardEntity();
46980
47046
  init_isometric();
46981
47047
  WorldMapBoard.displayName = "WorldMapBoard";
@@ -47115,7 +47181,7 @@ function lazyThree(name, loader) {
47115
47181
  ThreeWrapper.displayName = `Lazy(${name})`;
47116
47182
  return ThreeWrapper;
47117
47183
  }
47118
- var FeatureRenderer, COMPONENT_REGISTRY;
47184
+ var FeatureRenderer, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
47119
47185
  var init_component_registry_generated = __esm({
47120
47186
  "components/core/organisms/component-registry.generated.ts"() {
47121
47187
  init_AboutPageTemplate();
@@ -47401,7 +47467,11 @@ var init_component_registry_generated = __esm({
47401
47467
  init_WorldMapBoard();
47402
47468
  init_WorldMapTemplate();
47403
47469
  init_XPBar();
47404
- FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/organisms/game/three'));
47470
+ FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/molecules/game/three'));
47471
+ GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
47472
+ GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
47473
+ GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
47474
+ GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
47405
47475
  COMPONENT_REGISTRY = {
47406
47476
  "AboutPageTemplate": exports.AboutPageTemplate,
47407
47477
  "Accordion": exports.Accordion,
@@ -47514,6 +47584,10 @@ var init_component_registry_generated = __esm({
47514
47584
  "GameAudioProvider": GameAudioProvider,
47515
47585
  "GameAudioToggle": GameAudioToggle,
47516
47586
  "GameCanvas2D": GameCanvas2D,
47587
+ "GameCanvas3D": GameCanvas3D,
47588
+ "GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
47589
+ "GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
47590
+ "GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
47517
47591
  "GameHud": GameHud,
47518
47592
  "GameMenu": GameMenu,
47519
47593
  "GameOverScreen": GameOverScreen,