@almadar/ui 5.65.0 → 5.67.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.
@@ -11802,6 +11802,8 @@ var init_DialogueBubble = __esm({
11802
11802
  function ChoiceButton({
11803
11803
  text = "Charge forward into the fray",
11804
11804
  index,
11805
+ assetUrl,
11806
+ icon,
11805
11807
  disabled = false,
11806
11808
  selected = false,
11807
11809
  onClick,
@@ -11834,6 +11836,23 @@ function ChoiceButton({
11834
11836
  ]
11835
11837
  }
11836
11838
  ),
11839
+ assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
11840
+ "img",
11841
+ {
11842
+ src: assetUrl,
11843
+ alt: "",
11844
+ width: 16,
11845
+ height: 16,
11846
+ style: { imageRendering: "pixelated", objectFit: "contain" },
11847
+ className: "flex-shrink-0"
11848
+ }
11849
+ ) : icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-sm", children: typeof icon === "string" ? (() => {
11850
+ const I = resolveIcon(icon);
11851
+ return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" }) : null;
11852
+ })() : /* @__PURE__ */ (() => {
11853
+ const I = icon;
11854
+ return /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" });
11855
+ })() }) : null,
11837
11856
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm leading-snug", children: text })
11838
11857
  ]
11839
11858
  }
@@ -11842,6 +11861,7 @@ function ChoiceButton({
11842
11861
  var init_ChoiceButton = __esm({
11843
11862
  "components/game/atoms/ChoiceButton.tsx"() {
11844
11863
  init_cn();
11864
+ init_Icon();
11845
11865
  ChoiceButton.displayName = "ChoiceButton";
11846
11866
  }
11847
11867
  });
@@ -14990,7 +15010,8 @@ function IsometricCanvas({
14990
15010
  const minX = Math.min(...allScreenPos.map((p2) => p2.x));
14991
15011
  const maxX = Math.max(...allScreenPos.map((p2) => p2.x + scaledTileWidth));
14992
15012
  const minY = Math.min(...allScreenPos.map((p2) => p2.y));
14993
- const maxY = Math.max(...allScreenPos.map((p2) => p2.y + scaledTileHeight));
15013
+ const tileBottomExtent = tileLayout === "hex" ? scaledTileWidth : scaledTileHeight;
15014
+ const maxY = Math.max(...allScreenPos.map((p2) => p2.y + tileBottomExtent));
14994
15015
  const worldW = maxX - minX;
14995
15016
  const worldH = maxY - minY;
14996
15017
  const scaleM = Math.min(mW / worldW, mH / worldH) * 0.9;
@@ -15082,7 +15103,7 @@ function IsometricCanvas({
15082
15103
  const drawW = scaledTileWidth;
15083
15104
  const drawH = scaledTileWidth * (img.naturalHeight / img.naturalWidth);
15084
15105
  const drawX = pos.x;
15085
- const drawY = pos.y + scaledTileHeight - drawH;
15106
+ const drawY = tileLayout === "hex" ? pos.y : pos.y + scaledTileHeight - drawH;
15086
15107
  ctx.drawImage(img, drawX, drawY, drawW, drawH);
15087
15108
  }
15088
15109
  } else {
@@ -31005,6 +31026,7 @@ function PowerupSlots({
31005
31026
  /* @__PURE__ */ jsxRuntime.jsx(
31006
31027
  ItemSlot,
31007
31028
  {
31029
+ assetUrl: powerup.assetUrl,
31008
31030
  icon: powerup.icon,
31009
31031
  label: powerup.label,
31010
31032
  rarity: "uncommon",
@@ -31254,13 +31276,26 @@ function HealthPanel({
31254
31276
  )
31255
31277
  }
31256
31278
  ),
31257
- effects && effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex items-center gap-1 flex-wrap", children: effects.map((effect, i) => /* @__PURE__ */ jsxRuntime.jsx(
31279
+ effects && effects.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex items-center gap-1 flex-wrap", children: effects.map((effect, i) => /* @__PURE__ */ jsxRuntime.jsxs(
31258
31280
  Badge,
31259
31281
  {
31260
31282
  variant: effectVariantMap[effect.variant ?? "neutral"],
31261
31283
  size: "sm",
31262
- icon: effect.icon,
31263
- children: effect.label
31284
+ icon: effect.assetUrl ? void 0 : effect.icon,
31285
+ children: [
31286
+ effect.assetUrl && /* @__PURE__ */ jsxRuntime.jsx(
31287
+ "img",
31288
+ {
31289
+ src: effect.assetUrl,
31290
+ alt: "",
31291
+ width: 12,
31292
+ height: 12,
31293
+ style: { imageRendering: "pixelated", objectFit: "contain" },
31294
+ className: "flex-shrink-0 inline-block"
31295
+ }
31296
+ ),
31297
+ effect.label
31298
+ ]
31264
31299
  },
31265
31300
  i
31266
31301
  )) })
@@ -31443,15 +31478,28 @@ function TurnPanel({
31443
31478
  activeTeam
31444
31479
  }
31445
31480
  ),
31446
- actions && actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex items-center gap-1.5 ml-auto", children: actions.map((action, i) => /* @__PURE__ */ jsxRuntime.jsx(
31481
+ actions && actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex items-center gap-1.5 ml-auto", children: actions.map((action, i) => /* @__PURE__ */ jsxRuntime.jsxs(
31447
31482
  Button,
31448
31483
  {
31449
31484
  variant: "ghost",
31450
31485
  size: "sm",
31451
31486
  disabled: action.disabled,
31452
- leftIcon: action.icon,
31487
+ leftIcon: action.assetUrl ? void 0 : action.icon,
31453
31488
  onClick: () => handleAction(action.event),
31454
- children: action.label
31489
+ children: [
31490
+ action.assetUrl && /* @__PURE__ */ jsxRuntime.jsx(
31491
+ "img",
31492
+ {
31493
+ src: action.assetUrl,
31494
+ alt: "",
31495
+ width: 14,
31496
+ height: 14,
31497
+ style: { imageRendering: "pixelated", objectFit: "contain" },
31498
+ className: "flex-shrink-0"
31499
+ }
31500
+ ),
31501
+ action.label
31502
+ ]
31455
31503
  },
31456
31504
  i
31457
31505
  )) })
@@ -45958,9 +46006,9 @@ var init_GameCanvas3D2 = __esm({
45958
46006
  const color = unit.faction === "player" ? 4491519 : unit.faction === "enemy" ? 16729156 : 16777028;
45959
46007
  const hasAtlas = unitAtlasUrl(unit) !== null;
45960
46008
  const initialFrame = hasAtlas ? resolveUnitFrame(unit.id) : null;
45961
- const modelScale = UNIT_BASE_MODEL_SCALE * unitScale;
45962
- const billboardHeight = UNIT_BASE_BILLBOARD_HEIGHT * unitScale;
45963
- const primitiveRadius = UNIT_BASE_PRIMITIVE_RADIUS * unitScale;
46009
+ const modelScale = UNIT_BASE_MODEL_SCALE * unitScale * gridConfig.cellSize;
46010
+ const billboardHeight = UNIT_BASE_BILLBOARD_HEIGHT * unitScale * gridConfig.cellSize;
46011
+ const primitiveRadius = UNIT_BASE_PRIMITIVE_RADIUS * unitScale * gridConfig.cellSize;
45964
46012
  return /* @__PURE__ */ jsxRuntime.jsxs(
45965
46013
  "group",
45966
46014
  {
@@ -46007,7 +46055,7 @@ var init_GameCanvas3D2 = __esm({
46007
46055
  /* @__PURE__ */ jsxRuntime.jsx("meshStandardMaterial", { color })
46008
46056
  ] })
46009
46057
  ] }),
46010
- unit.health !== void 0 && unit.maxHealth !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("group", { position: [0, 1.2, 0], children: [
46058
+ unit.health !== void 0 && unit.maxHealth !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("group", { position: [0, billboardHeight, 0], children: [
46011
46059
  /* @__PURE__ */ jsxRuntime.jsxs("mesh", { position: [-0.25, 0, 0], children: [
46012
46060
  /* @__PURE__ */ jsxRuntime.jsx("planeGeometry", { args: [0.5, 0.05] }),
46013
46061
  /* @__PURE__ */ jsxRuntime.jsx("meshBasicMaterial", { color: 3355443 })
@@ -46036,7 +46084,7 @@ var init_GameCanvas3D2 = __esm({
46036
46084
  }
46037
46085
  );
46038
46086
  },
46039
- [selectedUnitId, handleUnitClick, resolveUnitFrame, unitScale]
46087
+ [selectedUnitId, handleUnitClick, resolveUnitFrame, unitScale, gridConfig]
46040
46088
  );
46041
46089
  const DefaultFeatureRenderer = React93.useCallback(
46042
46090
  ({
@@ -46124,7 +46172,7 @@ var init_GameCanvas3D2 = __esm({
46124
46172
  {
46125
46173
  ref: containerRef,
46126
46174
  className: cn("game-canvas-3d relative w-full overflow-hidden", className),
46127
- style: { height: "85vh" },
46175
+ style: { flex: "1 1 0", minHeight: "400px" },
46128
46176
  "data-orientation": orientation,
46129
46177
  "data-camera-mode": cameraMode,
46130
46178
  "data-overlay": overlay,
@@ -46424,13 +46472,39 @@ var init_GameBoard3D = __esm({
46424
46472
  GameBoard3D.displayName = "GameBoard3D";
46425
46473
  }
46426
46474
  });
46427
- var GameShell;
46475
+ function getSlotContentRenderer2() {
46476
+ if (_scr) return _scr;
46477
+ const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
46478
+ _scr = mod.SlotContentRenderer;
46479
+ return _scr;
46480
+ }
46481
+ function resolveDescriptor(value, idPrefix) {
46482
+ if (value === null || value === void 0) return value;
46483
+ if (React93__namespace.default.isValidElement(value)) return value;
46484
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
46485
+ if (Array.isArray(value)) {
46486
+ return value.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(React93__namespace.default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
46487
+ }
46488
+ if (typeof value === "object") {
46489
+ const rec = value;
46490
+ if (typeof rec.type === "string" && patterns.getComponentForPattern(rec.type) !== null) {
46491
+ const { type, props: nestedProps, _id, ...flatProps } = rec;
46492
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
46493
+ const content = { id: _id ?? idPrefix, pattern: type, props: resolvedProps, priority: 0 };
46494
+ const SCR = getSlotContentRenderer2();
46495
+ return /* @__PURE__ */ jsxRuntime.jsx(SCR, { content, onDismiss: () => void 0 });
46496
+ }
46497
+ }
46498
+ return null;
46499
+ }
46500
+ var _scr, GameShell;
46428
46501
  var init_GameShell = __esm({
46429
46502
  "components/game/templates/GameShell.tsx"() {
46430
46503
  init_cn();
46431
46504
  init_Box();
46432
46505
  init_Stack();
46433
46506
  init_Typography();
46507
+ _scr = null;
46434
46508
  GameShell = ({
46435
46509
  appName = "Game",
46436
46510
  hud,
@@ -46479,7 +46553,7 @@ var init_GameShell = __esm({
46479
46553
  children: appName
46480
46554
  }
46481
46555
  ),
46482
- hud && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "game-shell__hud", children: hud })
46556
+ hud && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "game-shell__hud", children: resolveDescriptor(hud, "gs-hud") })
46483
46557
  ]
46484
46558
  }
46485
46559
  ),
@@ -46492,7 +46566,7 @@ var init_GameShell = __esm({
46492
46566
  overflow: "hidden",
46493
46567
  position: "relative"
46494
46568
  },
46495
- children
46569
+ children: resolveDescriptor(children, "gs-children")
46496
46570
  }
46497
46571
  )
46498
46572
  ]
@@ -46502,7 +46576,32 @@ var init_GameShell = __esm({
46502
46576
  GameShell.displayName = "GameShell";
46503
46577
  }
46504
46578
  });
46505
- var GameTemplate;
46579
+ function getSlotContentRenderer3() {
46580
+ if (_scr2) return _scr2;
46581
+ const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
46582
+ _scr2 = mod.SlotContentRenderer;
46583
+ return _scr2;
46584
+ }
46585
+ function resolveDescriptor2(value, idPrefix) {
46586
+ if (value === null || value === void 0) return value;
46587
+ if (React93__namespace.default.isValidElement(value)) return value;
46588
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
46589
+ if (Array.isArray(value)) {
46590
+ return value.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(React93__namespace.default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
46591
+ }
46592
+ if (typeof value === "object") {
46593
+ const rec = value;
46594
+ if (typeof rec.type === "string" && patterns.getComponentForPattern(rec.type) !== null) {
46595
+ const { type, props: nestedProps, _id, ...flatProps } = rec;
46596
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
46597
+ const content = { id: _id ?? idPrefix, pattern: type, props: resolvedProps, priority: 0 };
46598
+ const SCR = getSlotContentRenderer3();
46599
+ return /* @__PURE__ */ jsxRuntime.jsx(SCR, { content, onDismiss: () => void 0 });
46600
+ }
46601
+ }
46602
+ return null;
46603
+ }
46604
+ var _scr2, GameTemplate;
46506
46605
  var init_GameTemplate = __esm({
46507
46606
  "components/game/templates/GameTemplate.tsx"() {
46508
46607
  init_cn();
@@ -46510,6 +46609,7 @@ var init_GameTemplate = __esm({
46510
46609
  init_Stack();
46511
46610
  init_Typography();
46512
46611
  init_Button();
46612
+ _scr2 = null;
46513
46613
  GameTemplate = ({
46514
46614
  entity,
46515
46615
  title = "Game",
@@ -46577,13 +46677,13 @@ var init_GameTemplate = __esm({
46577
46677
  fullWidth: true,
46578
46678
  className: "flex-1 bg-muted",
46579
46679
  children: [
46580
- children,
46680
+ resolveDescriptor2(children, "gt-children"),
46581
46681
  hud && /* @__PURE__ */ jsxRuntime.jsx(
46582
46682
  Box,
46583
46683
  {
46584
46684
  position: "absolute",
46585
46685
  className: "top-0 left-0 right-0 pointer-events-none",
46586
- children: /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "md", className: "pointer-events-auto w-fit", children: hud })
46686
+ children: /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "md", className: "pointer-events-auto w-fit", children: resolveDescriptor2(hud, "gt-hud") })
46587
46687
  }
46588
46688
  )
46589
46689
  ]
@@ -46608,7 +46708,7 @@ var init_GameTemplate = __esm({
46608
46708
  children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", children: "Debug Panel" })
46609
46709
  }
46610
46710
  ),
46611
- /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "md", children: debugPanel })
46711
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "md", children: resolveDescriptor2(debugPanel, "gt-debug") })
46612
46712
  ]
46613
46713
  }
46614
46714
  )
@@ -55187,7 +55287,7 @@ function getSlotFallback(slot, config) {
55187
55287
  const variant = SLOT_SKELETON_MAP[slot] ?? "text";
55188
55288
  return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant });
55189
55289
  }
55190
- function getComponentForPattern(patternType) {
55290
+ function getComponentForPattern3(patternType) {
55191
55291
  const mapping = patterns.getComponentForPattern(patternType);
55192
55292
  if (!mapping) {
55193
55293
  return null;
@@ -55818,7 +55918,8 @@ function SlotContentRenderer({
55818
55918
  entityDef = schemaCtx.entities.get(linkedEntity);
55819
55919
  }
55820
55920
  }
55821
- const PatternComponent = getComponentForPattern(content.pattern);
55921
+ const orbitalName = schemaCtx && content.sourceTrait !== void 0 ? schemaCtx.orbitalsByTrait.get(content.sourceTrait) : void 0;
55922
+ const PatternComponent = getComponentForPattern3(content.pattern);
55822
55923
  if (PatternComponent) {
55823
55924
  const childrenConfig = content.props.children;
55824
55925
  const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
@@ -55916,6 +56017,7 @@ function SlotContentRenderer({
55916
56017
  "data-orb-entity": content.entity,
55917
56018
  "data-orb-path": myPath,
55918
56019
  "data-orb-pattern": content.pattern,
56020
+ "data-orb-orbital": orbitalName,
55919
56021
  children: renderedChildren !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps })
55920
56022
  }
55921
56023
  );
@@ -55935,6 +56037,7 @@ function SlotContentRenderer({
55935
56037
  "data-orb-entity": content.entity,
55936
56038
  "data-orb-path": patternPath ?? "root",
55937
56039
  "data-orb-pattern": content.pattern,
56040
+ "data-orb-orbital": orbitalName,
55938
56041
  children: content.props.children ?? /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
55939
56042
  "Unknown pattern: ",
55940
56043
  content.pattern,
@@ -59577,7 +59680,7 @@ function resolveLambdaBindings(body, params, item, index) {
59577
59680
  return body;
59578
59681
  }
59579
59682
  var _slotContentRenderer2 = null;
59580
- function getSlotContentRenderer2() {
59683
+ function getSlotContentRenderer4() {
59581
59684
  if (_slotContentRenderer2) return _slotContentRenderer2;
59582
59685
  const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
59583
59686
  _slotContentRenderer2 = mod.SlotContentRenderer;
@@ -59593,7 +59696,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
59593
59696
  if (typeof record.type !== "string") {
59594
59697
  return null;
59595
59698
  }
59596
- const SlotContentRenderer2 = getSlotContentRenderer2();
59699
+ const SlotContentRenderer2 = getSlotContentRenderer4();
59597
59700
  const rawChildProps = {};
59598
59701
  for (const [k, v] of Object.entries(record)) {
59599
59702
  if (k !== "type") rawChildProps[k] = v;
@@ -61953,6 +62056,33 @@ function formatPayloadTooltip(fields) {
61953
62056
  );
61954
62057
  return `{ ${parts.join(", ")} }`;
61955
62058
  }
62059
+
62060
+ // components/avl/derive-edit-focus.ts
62061
+ function deriveEditFocusFromElement(el) {
62062
+ const orbitalEl = el.getAttribute("data-orb-orbital") !== null ? el : el.closest("[data-orb-orbital]");
62063
+ const orbital = orbitalEl?.getAttribute("data-orb-orbital") ?? "";
62064
+ if (!orbital) return null;
62065
+ const path = el.getAttribute("data-orb-path") ?? el.getAttribute("data-pattern-path");
62066
+ const patternType = el.getAttribute("data-orb-pattern") ?? el.getAttribute("data-pattern");
62067
+ const trait = el.getAttribute("data-orb-trait") ?? el.getAttribute("data-source-trait");
62068
+ const focus = {
62069
+ level: "node",
62070
+ orbital,
62071
+ label: patternType ?? trait ?? "element"
62072
+ };
62073
+ if (path !== null) focus.path = path;
62074
+ if (trait !== null) focus.trait = trait;
62075
+ if (patternType !== null) focus.patternType = patternType;
62076
+ const transition = el.getAttribute("data-orb-transition");
62077
+ if (transition !== null) focus.transition = transition;
62078
+ const state = el.getAttribute("data-orb-state");
62079
+ if (state !== null) focus.state = state;
62080
+ const slot = el.getAttribute("data-orb-slot");
62081
+ if (slot !== null) focus.slot = slot;
62082
+ const entity = el.getAttribute("data-orb-entity");
62083
+ if (entity !== null) focus.entity = entity;
62084
+ return focus;
62085
+ }
61956
62086
  function entityNameOf(ref) {
61957
62087
  if (!ref) return void 0;
61958
62088
  if (typeof ref === "string") return ref;
@@ -62238,29 +62368,6 @@ function rectRelativeTo(el, container, zoom) {
62238
62368
  height: (u.bottom - u.top) / z
62239
62369
  };
62240
62370
  }
62241
- function buildFocus(el, orbitalName) {
62242
- if (!orbitalName) return null;
62243
- const path = el.getAttribute("data-orb-path") ?? el.getAttribute("data-pattern-path");
62244
- const patternType = el.getAttribute("data-orb-pattern") ?? el.getAttribute("data-pattern");
62245
- const trait = el.getAttribute("data-orb-trait") ?? el.getAttribute("data-source-trait");
62246
- const focus = {
62247
- level: "node",
62248
- orbital: orbitalName,
62249
- label: patternType ?? trait ?? "element"
62250
- };
62251
- if (path !== null) focus.path = path;
62252
- if (trait !== null) focus.trait = trait;
62253
- if (patternType !== null) focus.patternType = patternType;
62254
- const transition = el.getAttribute("data-orb-transition");
62255
- if (transition !== null) focus.transition = transition;
62256
- const state = el.getAttribute("data-orb-state");
62257
- if (state !== null) focus.state = state;
62258
- const slot = el.getAttribute("data-orb-slot");
62259
- if (slot !== null) focus.slot = slot;
62260
- const entity = el.getAttribute("data-orb-entity");
62261
- if (entity !== null) focus.entity = entity;
62262
- return focus;
62263
- }
62264
62371
  var OrbPreviewNodeInner = (props) => {
62265
62372
  const data = props.data;
62266
62373
  const screenSize = React93.useContext(ScreenSizeContext);
@@ -62329,7 +62436,7 @@ var OrbPreviewNodeInner = (props) => {
62329
62436
  nodeData: data,
62330
62437
  rect: rect ?? void 0
62331
62438
  });
62332
- const focus = buildFocus(patternEl, data.orbitalName);
62439
+ const focus = deriveEditFocusFromElement(patternEl);
62333
62440
  if (focus) eventBus.emit("UI:ELEMENT_SELECTED", { focus: { ...focus } });
62334
62441
  } else {
62335
62442
  setSelectedRect(null);
@@ -65619,6 +65726,7 @@ exports.behaviorsToComposeGraph = behaviorsToComposeGraph;
65619
65726
  exports.computeTraitLayout = computeTraitLayout;
65620
65727
  exports.computeZoomBand = computeZoomBand;
65621
65728
  exports.curveControlPoint = curveControlPoint;
65729
+ exports.deriveEditFocusFromElement = deriveEditFocusFromElement;
65622
65730
  exports.edgePath = edgePath;
65623
65731
  exports.getStateRole = getStateRole;
65624
65732
  exports.gridPositions = gridPositions;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
- import { OrbitalSchema, UISlot, Expression, EntityPersistence, EventPayloadField, EventPayload, ThemeDefinition } from '@almadar/core';
3
+ import { OrbitalSchema, UISlot, Expression, EntityPersistence, EventPayloadField, EditFocus, EventPayload, ThemeDefinition } from '@almadar/core';
4
4
  import { Node, Edge, NodeProps, EdgeProps } from '@xyflow/react';
5
5
  import { useDraggable } from '@dnd-kit/core';
6
6
 
@@ -1277,6 +1277,14 @@ interface BehaviorRegistryRecord {
1277
1277
  */
1278
1278
  declare function registryEntryToCanvasEntry(entry: BehaviorRegistryRecord, orbitalNames: string[]): BehaviorCanvasEntry;
1279
1279
 
1280
+ /**
1281
+ * Build an `EditFocus` from a clicked element's `data-orb-*` address (stamped by
1282
+ * UISlotRenderer). The owning orbital is read from the DOM (`data-orb-orbital`,
1283
+ * walking up via `closest` when the clicked node itself doesn't carry it); since
1284
+ * `EditFocus.orbital` is required, returns `null` when it can't be resolved.
1285
+ */
1286
+ declare function deriveEditFocusFromElement(el: HTMLElement): EditFocus | null;
1287
+
1280
1288
  /**
1281
1289
  * useCanvasDnd — drag/drop primitives for the AVL canvas surface.
1282
1290
  *
@@ -1805,4 +1813,4 @@ interface AvlClickTargetProps {
1805
1813
  }
1806
1814
  declare const AvlClickTarget: React__default.FC<AvlClickTargetProps>;
1807
1815
 
1808
- export { AVL_FIELD_TYPE_SHAPES, AVL_OPERATOR_COLORS, type ApplicationLevelData, AvlApplication, type AvlApplicationProps, AvlBackwardEdge, type AvlBaseProps, AvlBehaviorGlyph, type AvlBehaviorGlyphProps, AvlBinding, AvlBindingEdge, type AvlBindingProps, AvlBindingRef, type AvlBindingRefProps, AvlClickTarget, type AvlClickTargetProps, AvlClosedCircuit, type AvlClosedCircuitProps, type AvlClosedCircuitState, type AvlClosedCircuitTransition, AvlCosmicZoom, type AvlCosmicZoomProps, type AvlEdgeData, AvlEffect, type AvlEffectProps, type AvlEffectType, AvlEmitListen, type AvlEmitListenProps, AvlEntity, type AvlEntityProps, AvlEvent, type AvlEventProps, AvlEventWireEdge, type AvlEventWireEdgeData, AvlExprTree, type AvlExprTreeNode, type AvlExprTreeProps, AvlField, type AvlFieldProps, AvlFieldType, type AvlFieldTypeKind, type AvlFieldTypeProps, AvlGuard, type AvlGuardProps, AvlLiteral, type AvlLiteralProps, type AvlNodeData, AvlOperator, type AvlOperatorNamespace, type AvlOperatorProps, AvlOrbital, AvlOrbitalNode, type AvlOrbitalProps, AvlOrbitalUnit, type AvlOrbitalUnitPage, type AvlOrbitalUnitProps, type AvlOrbitalUnitTrait, AvlOrbitalsCosmicZoom, type AvlOrbitalsCosmicZoomProps, AvlPage, AvlPageEdge, type AvlPageProps, AvlPersistence, type AvlPersistenceKind, type AvlPersistenceProps, AvlSExpr, type AvlSExprProps, AvlSlotMap, type AvlSlotMapProps, type AvlSlotMapSlot, AvlState, AvlStateMachine, type AvlStateMachineProps, type AvlStateMachineState, type AvlStateMachineTransition, type AvlStateProps, AvlSwimLane, type AvlSwimLaneProps, AvlTrait, type AvlTraitProps, AvlTraitScene, type AvlTraitSceneProps, AvlTransition, AvlTransitionEdge, type AvlTransitionEdgeData, AvlTransitionLane, type AvlTransitionLaneProps, type AvlTransitionProps, AvlTransitionScene, type AvlTransitionSceneProps, type BehaviorCanvasEntry, BehaviorComposeNode, type BehaviorComposeNodeData, type BehaviorGlyphChild, type BehaviorGlyphConnection, type BehaviorLevel, type BehaviorRegistryRecord, BehaviorView, type BehaviorWireEdgeData, CONNECTION_COLORS, type CanvasContainerNode, CanvasDndProvider, type CanvasDndProviderProps, type CanvasDragKind, type CanvasDragPayload, type CanvasDropEvent, type CanvasDropTarget, type ComposeViewLevel, type ConnectableEvent, type CrossLink, DOMAIN_COLORS, DetailView, EFFECT_CATEGORY_COLORS, EFFECT_TYPE_TO_CATEGORY, type EffectCategory, type ElkLayout, type EventEdgeData, EventFlowEdge, FlowCanvas, type FlowCanvasProps, type GlyphSize, type LayoutEdge, type LayoutNode, MiniStateMachine, ModuleCard, OrbInspector, type OrbInspectorProps, OrbPreviewNode, type OrbitalLevelData, type PatternEventSource, type PreviewNodeData, type RenderUIEntry, STATE_COLORS, type StateRole, SystemNode, type TraitLevelData, type TransitionLevelData, type UseCanvasDraggableArgs, type UseCanvasDraggableResult, type UseCanvasDroppableArgs, type UseCanvasDroppableResult, type ViewLevel, ZOOM_BAND_THRESHOLDS, type ZoomBand, ZoomBandContext, ZoomBreadcrumb, type ZoomBreadcrumbProps, ZoomLegend, type ZoomLegendProps, type ZoomLevel, arcPath, behaviorsToComposeGraph, computeTraitLayout, computeZoomBand, curveControlPoint, edgePath, getStateRole, gridPositions, orbitalToExpandedGraph, parseApplicationLevel, parseOrbitalLevel, parseTraitLevel, parseTransitionLevel, radialPositions, registryEntryToCanvasEntry, ringPositions, schemaToFlowGraph, schemaToOverviewGraph, useCanvasDraggable, useCanvasDroppable, useZoomBand, zoomProgress };
1816
+ export { AVL_FIELD_TYPE_SHAPES, AVL_OPERATOR_COLORS, type ApplicationLevelData, AvlApplication, type AvlApplicationProps, AvlBackwardEdge, type AvlBaseProps, AvlBehaviorGlyph, type AvlBehaviorGlyphProps, AvlBinding, AvlBindingEdge, type AvlBindingProps, AvlBindingRef, type AvlBindingRefProps, AvlClickTarget, type AvlClickTargetProps, AvlClosedCircuit, type AvlClosedCircuitProps, type AvlClosedCircuitState, type AvlClosedCircuitTransition, AvlCosmicZoom, type AvlCosmicZoomProps, type AvlEdgeData, AvlEffect, type AvlEffectProps, type AvlEffectType, AvlEmitListen, type AvlEmitListenProps, AvlEntity, type AvlEntityProps, AvlEvent, type AvlEventProps, AvlEventWireEdge, type AvlEventWireEdgeData, AvlExprTree, type AvlExprTreeNode, type AvlExprTreeProps, AvlField, type AvlFieldProps, AvlFieldType, type AvlFieldTypeKind, type AvlFieldTypeProps, AvlGuard, type AvlGuardProps, AvlLiteral, type AvlLiteralProps, type AvlNodeData, AvlOperator, type AvlOperatorNamespace, type AvlOperatorProps, AvlOrbital, AvlOrbitalNode, type AvlOrbitalProps, AvlOrbitalUnit, type AvlOrbitalUnitPage, type AvlOrbitalUnitProps, type AvlOrbitalUnitTrait, AvlOrbitalsCosmicZoom, type AvlOrbitalsCosmicZoomProps, AvlPage, AvlPageEdge, type AvlPageProps, AvlPersistence, type AvlPersistenceKind, type AvlPersistenceProps, AvlSExpr, type AvlSExprProps, AvlSlotMap, type AvlSlotMapProps, type AvlSlotMapSlot, AvlState, AvlStateMachine, type AvlStateMachineProps, type AvlStateMachineState, type AvlStateMachineTransition, type AvlStateProps, AvlSwimLane, type AvlSwimLaneProps, AvlTrait, type AvlTraitProps, AvlTraitScene, type AvlTraitSceneProps, AvlTransition, AvlTransitionEdge, type AvlTransitionEdgeData, AvlTransitionLane, type AvlTransitionLaneProps, type AvlTransitionProps, AvlTransitionScene, type AvlTransitionSceneProps, type BehaviorCanvasEntry, BehaviorComposeNode, type BehaviorComposeNodeData, type BehaviorGlyphChild, type BehaviorGlyphConnection, type BehaviorLevel, type BehaviorRegistryRecord, BehaviorView, type BehaviorWireEdgeData, CONNECTION_COLORS, type CanvasContainerNode, CanvasDndProvider, type CanvasDndProviderProps, type CanvasDragKind, type CanvasDragPayload, type CanvasDropEvent, type CanvasDropTarget, type ComposeViewLevel, type ConnectableEvent, type CrossLink, DOMAIN_COLORS, DetailView, EFFECT_CATEGORY_COLORS, EFFECT_TYPE_TO_CATEGORY, type EffectCategory, type ElkLayout, type EventEdgeData, EventFlowEdge, FlowCanvas, type FlowCanvasProps, type GlyphSize, type LayoutEdge, type LayoutNode, MiniStateMachine, ModuleCard, OrbInspector, type OrbInspectorProps, OrbPreviewNode, type OrbitalLevelData, type PatternEventSource, type PreviewNodeData, type RenderUIEntry, STATE_COLORS, type StateRole, SystemNode, type TraitLevelData, type TransitionLevelData, type UseCanvasDraggableArgs, type UseCanvasDraggableResult, type UseCanvasDroppableArgs, type UseCanvasDroppableResult, type ViewLevel, ZOOM_BAND_THRESHOLDS, type ZoomBand, ZoomBandContext, ZoomBreadcrumb, type ZoomBreadcrumbProps, ZoomLegend, type ZoomLegendProps, type ZoomLevel, arcPath, behaviorsToComposeGraph, computeTraitLayout, computeZoomBand, curveControlPoint, deriveEditFocusFromElement, edgePath, getStateRole, gridPositions, orbitalToExpandedGraph, parseApplicationLevel, parseOrbitalLevel, parseTraitLevel, parseTransitionLevel, radialPositions, registryEntryToCanvasEntry, ringPositions, schemaToFlowGraph, schemaToOverviewGraph, useCanvasDraggable, useCanvasDroppable, useZoomBand, zoomProgress };
@@ -55,6 +55,7 @@ export { type ViewLevel, type PreviewNodeData, type EventEdgeData, type PatternE
55
55
  export { schemaToOverviewGraph, orbitalToExpandedGraph } from '../components/avl/molecules/avl-preview-converter';
56
56
  export { OrbPreviewNode } from '../components/avl/molecules/OrbPreviewNode';
57
57
  export { EventFlowEdge } from '../components/avl/molecules/EventFlowEdge';
58
+ export { deriveEditFocusFromElement } from '../components/avl/derive-edit-focus';
58
59
  export { CanvasDndProvider, useCanvasDraggable, useCanvasDroppable, type CanvasDragKind, type CanvasDragPayload, type CanvasContainerNode, type CanvasDropTarget, type CanvasDropEvent, type CanvasDndProviderProps, type UseCanvasDraggableArgs, type UseCanvasDraggableResult, type UseCanvasDroppableArgs, type UseCanvasDroppableResult, } from '../components/avl/molecules/useCanvasDnd';
59
60
  export { type ComposeViewLevel, type BehaviorComposeNodeData, type BehaviorWireEdgeData, type BehaviorCanvasEntry, type ConnectableEvent } from '../components/avl/molecules/avl-behavior-compose-types';
60
61
  export { BehaviorComposeNode } from '../components/avl/molecules/BehaviorComposeNode';