@almadar/ui 5.134.0 → 5.135.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.
@@ -3955,6 +3955,32 @@ function formatValue(value, format) {
3955
3955
  return String(value);
3956
3956
  }
3957
3957
  }
3958
+ function compareCellValues(a, b) {
3959
+ const aEmpty = a === null || a === void 0 || a === "";
3960
+ const bEmpty = b === null || b === void 0 || b === "";
3961
+ if (aEmpty || bEmpty) return aEmpty && bEmpty ? 0 : aEmpty ? 1 : -1;
3962
+ if (typeof a === "number" && typeof b === "number") return a - b;
3963
+ if (typeof a === "boolean" && typeof b === "boolean") return Number(a) - Number(b);
3964
+ const aNum = Number(a);
3965
+ const bNum = Number(b);
3966
+ if (Number.isFinite(aNum) && Number.isFinite(bNum)) return aNum - bNum;
3967
+ const aTime = dateLikeTime(a);
3968
+ const bTime = dateLikeTime(b);
3969
+ if (aTime !== null && bTime !== null) return aTime - bTime;
3970
+ return String(a).localeCompare(String(b));
3971
+ }
3972
+ function dateLikeTime(value) {
3973
+ if (value instanceof Date) return value.getTime();
3974
+ const text = String(value);
3975
+ if (!/\d/.test(text) || !/[-/:T]/.test(text)) return null;
3976
+ const time = Date.parse(text);
3977
+ return Number.isNaN(time) ? null : time;
3978
+ }
3979
+ function sortRows(rows2, field, direction = "asc") {
3980
+ if (!field) return rows2;
3981
+ const dir = direction === "desc" ? -1 : 1;
3982
+ return [...rows2].sort((a, b) => dir * compareCellValues(a?.[field], b?.[field]));
3983
+ }
3958
3984
  var init_format = __esm({
3959
3985
  "lib/format.ts"() {
3960
3986
  }
@@ -15580,6 +15606,15 @@ function createWebPainter(ctx, onAssetLoad) {
15580
15606
  ctx.lineWidth = lineWidth;
15581
15607
  ctx.stroke();
15582
15608
  },
15609
+ fillPath(d, color) {
15610
+ ctx.fillStyle = color;
15611
+ ctx.fill(new Path2D(d));
15612
+ },
15613
+ strokePath(d, color, lineWidth = 1) {
15614
+ ctx.strokeStyle = color;
15615
+ ctx.lineWidth = lineWidth;
15616
+ ctx.stroke(new Path2D(d));
15617
+ },
15583
15618
  text(str2, x, y, style) {
15584
15619
  if (style.font) ctx.font = style.font;
15585
15620
  ctx.fillStyle = style.color;
@@ -15817,6 +15852,16 @@ var init_DrawShape = __esm({
15817
15852
  if (node.stroke) painter.strokePoly(pts, node.stroke, node.strokeWidth ?? 1, true);
15818
15853
  break;
15819
15854
  }
15855
+ case "path": {
15856
+ if (!node.d) break;
15857
+ const base = dctx.projector.project(node.position);
15858
+ const tw = dctx.projector.tileWidth;
15859
+ painter.translate(base.x, base.y);
15860
+ painter.scale(tw, tw);
15861
+ if (node.fill) painter.fillPath(node.d, node.fill);
15862
+ if (node.stroke) painter.strokePath(node.d, node.stroke, (node.strokeWidth ?? 1) / tw);
15863
+ break;
15864
+ }
15820
15865
  }
15821
15866
  painter.restore();
15822
15867
  };
@@ -15908,6 +15953,19 @@ function paintDrawable(painter, node, dctx) {
15908
15953
  case "draw-text":
15909
15954
  paintText(painter, node, dctx);
15910
15955
  break;
15956
+ case "draw-group": {
15957
+ if (!isValidScenePos(node.position)) break;
15958
+ if (!Array.isArray(node.items)) break;
15959
+ const p = dctx.projector.project(node.position);
15960
+ painter.save();
15961
+ painter.translate(p.x, p.y);
15962
+ if (node.scale !== void 0) painter.scale(node.scale, node.scale);
15963
+ if (node.rotate !== void 0) painter.rotate(node.rotate);
15964
+ if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
15965
+ for (const item of node.items) paintDrawable(painter, item, dctx);
15966
+ painter.restore();
15967
+ break;
15968
+ }
15911
15969
  case "draw-sprite-layer":
15912
15970
  paintSpriteLayer(painter, node, dctx);
15913
15971
  break;
@@ -15921,6 +15979,7 @@ function paintDrawable(painter, node, dctx) {
15921
15979
  }
15922
15980
  var init_paintDispatch = __esm({
15923
15981
  "lib/drawable/paintDispatch.ts"() {
15982
+ init_contract();
15924
15983
  init_DrawSprite();
15925
15984
  init_DrawShape();
15926
15985
  init_DrawText();
@@ -15938,6 +15997,7 @@ function collectDrawnItems(nodes) {
15938
15997
  case "draw-sprite":
15939
15998
  case "draw-shape":
15940
15999
  case "draw-text":
16000
+ case "draw-group":
15941
16001
  if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
15942
16002
  break;
15943
16003
  case "draw-sprite-layer":
@@ -21153,6 +21213,8 @@ function DataList({
21153
21213
  hasMore,
21154
21214
  children,
21155
21215
  pageSize = 5,
21216
+ sortBy,
21217
+ sortDirection,
21156
21218
  renderItem: schemaRenderItem,
21157
21219
  dragGroup,
21158
21220
  accepts,
@@ -21181,7 +21243,11 @@ function DataList({
21181
21243
  dndItemIdField,
21182
21244
  dndRoot
21183
21245
  });
21184
- const allData = dnd.orderedItems;
21246
+ const orderedData = dnd.orderedItems;
21247
+ const allData = React74__default.useMemo(
21248
+ () => sortRows(orderedData, sortBy, sortDirection),
21249
+ [orderedData, sortBy, sortDirection]
21250
+ );
21185
21251
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
21186
21252
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
21187
21253
  const hasRenderProp = typeof children === "function";
@@ -21218,7 +21284,7 @@ function DataList({
21218
21284
  };
21219
21285
  eventBus.emit(`UI:${action.event}`, payload);
21220
21286
  };
21221
- const renderItemActions = (itemData) => {
21287
+ const renderItemActions = (itemData, onPrimary = false) => {
21222
21288
  if (!itemActions || itemActions.length === 0) return null;
21223
21289
  const inline = maxInlineActions != null ? itemActions.slice(0, maxInlineActions) : itemActions;
21224
21290
  const overflow = maxInlineActions != null ? itemActions.slice(maxInlineActions) : [];
@@ -21231,7 +21297,12 @@ function DataList({
21231
21297
  onClick: handleActionClick(action, itemData),
21232
21298
  "data-testid": `action-${action.event}`,
21233
21299
  "data-row-id": String(itemData.id),
21234
- className: cn(action.variant === "danger" && "text-error hover:bg-error/10"),
21300
+ className: cn(
21301
+ action.variant === "danger" && "text-error hover:bg-error/10",
21302
+ // Must sit on the Button itself: the variant's own text colour
21303
+ // beats an inherited one from the row wrapper.
21304
+ onPrimary && "!text-primary-foreground hover:bg-primary-foreground/15"
21305
+ ),
21235
21306
  children: [
21236
21307
  action.icon && renderIconInput2(action.icon, { size: "xs", className: "mr-1" }),
21237
21308
  action.label
@@ -21350,7 +21421,7 @@ function DataList({
21350
21421
  children: formatDate(timestamp)
21351
21422
  }
21352
21423
  ) : /* @__PURE__ */ jsx("span", {}),
21353
- renderItemActions(itemData)
21424
+ renderItemActions(itemData, isSent)
21354
21425
  ] })
21355
21426
  ]
21356
21427
  }
@@ -26118,210 +26189,6 @@ var init_DialogueBubble = __esm({
26118
26189
  DialogueBubble.displayName = "DialogueBubble";
26119
26190
  }
26120
26191
  });
26121
- function SvgStage({
26122
- cols,
26123
- rows: rows2,
26124
- tileSize = 32,
26125
- background = "var(--color-background)",
26126
- tileClickEvent,
26127
- tileHoverEvent,
26128
- tileLeaveEvent,
26129
- keyMap,
26130
- keyUpMap,
26131
- className,
26132
- children
26133
- }) {
26134
- const eventBus = useEventBus();
26135
- const svgRef = useRef(null);
26136
- const pointerDownRef = useRef(null);
26137
- const cellFromClient = useCallback((clientX, clientY) => {
26138
- const svg = svgRef.current;
26139
- if (!svg) return null;
26140
- const rect = svg.getBoundingClientRect();
26141
- if (rect.width === 0 || rect.height === 0) return null;
26142
- const vbW = cols * tileSize;
26143
- const vbH = rows2 * tileSize;
26144
- const meet = Math.min(rect.width / vbW, rect.height / vbH);
26145
- const offsetX = (rect.width - vbW * meet) / 2;
26146
- const offsetY = (rect.height - vbH * meet) / 2;
26147
- const svgX = (clientX - rect.left - offsetX) / meet;
26148
- const svgY = (clientY - rect.top - offsetY) / meet;
26149
- return {
26150
- x: Math.min(Math.max(Math.floor(svgX / tileSize), 0), cols - 1),
26151
- y: Math.min(Math.max(Math.floor(svgY / tileSize), 0), rows2 - 1)
26152
- };
26153
- }, [cols, rows2, tileSize]);
26154
- const handlePointerDown = useCallback((e) => {
26155
- pointerDownRef.current = { clientX: e.clientX, clientY: e.clientY };
26156
- }, []);
26157
- const handlePointerUp = useCallback((e) => {
26158
- const down = pointerDownRef.current;
26159
- pointerDownRef.current = null;
26160
- if (!tileClickEvent) return;
26161
- if (down && Math.hypot(e.clientX - down.clientX, e.clientY - down.clientY) > 5) return;
26162
- const cell = cellFromClient(e.clientX, e.clientY);
26163
- if (cell) eventBus.emit(`UI:${tileClickEvent}`, cell);
26164
- }, [cellFromClient, tileClickEvent, eventBus]);
26165
- const handlePointerMove = useCallback((e) => {
26166
- if (!tileHoverEvent) return;
26167
- const cell = cellFromClient(e.clientX, e.clientY);
26168
- if (cell) eventBus.emit(`UI:${tileHoverEvent}`, cell);
26169
- }, [cellFromClient, tileHoverEvent, eventBus]);
26170
- const handlePointerLeave = useCallback(() => {
26171
- pointerDownRef.current = null;
26172
- if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
26173
- }, [tileLeaveEvent, eventBus]);
26174
- useEffect(() => {
26175
- if (!keyMap && !keyUpMap) return;
26176
- const onDown = (e) => {
26177
- const ev = keyMap?.[e.code];
26178
- if (ev) {
26179
- eventBus.emit(`UI:${ev}`, {});
26180
- e.preventDefault();
26181
- }
26182
- };
26183
- const onUp = (e) => {
26184
- const ev = keyUpMap?.[e.code];
26185
- if (ev) eventBus.emit(`UI:${ev}`, {});
26186
- };
26187
- window.addEventListener("keydown", onDown);
26188
- window.addEventListener("keyup", onUp);
26189
- return () => {
26190
- window.removeEventListener("keydown", onDown);
26191
- window.removeEventListener("keyup", onUp);
26192
- };
26193
- }, [keyMap, keyUpMap, eventBus]);
26194
- useEffect(() => {
26195
- if (!keyMap && !keyUpMap) return;
26196
- svgRef.current?.focus();
26197
- }, [keyMap, keyUpMap]);
26198
- const stageContext = useMemo(() => ({ tileSize }), [tileSize]);
26199
- return /* @__PURE__ */ jsxs(
26200
- "svg",
26201
- {
26202
- ref: svgRef,
26203
- "data-testid": "svg-stage",
26204
- viewBox: `0 0 ${cols * tileSize} ${rows2 * tileSize}`,
26205
- preserveAspectRatio: "xMidYMid meet",
26206
- className: cn("block h-full w-full", className),
26207
- tabIndex: keyMap || keyUpMap ? 0 : void 0,
26208
- onPointerDown: handlePointerDown,
26209
- onPointerMove: handlePointerMove,
26210
- onPointerUp: handlePointerUp,
26211
- onPointerLeave: handlePointerLeave,
26212
- children: [
26213
- /* @__PURE__ */ jsx("rect", { width: cols * tileSize, height: rows2 * tileSize, fill: background }),
26214
- /* @__PURE__ */ jsx(SvgStageContext.Provider, { value: stageContext, children })
26215
- ]
26216
- }
26217
- );
26218
- }
26219
- var SvgStageContext;
26220
- var init_SvgStage = __esm({
26221
- "components/game/molecules/SvgStage.tsx"() {
26222
- "use client";
26223
- init_cn();
26224
- init_useEventBus();
26225
- SvgStageContext = React74.createContext({ tileSize: 1 });
26226
- SvgStage.displayName = "SvgStage";
26227
- }
26228
- });
26229
- function SvgDrawShape({
26230
- shape,
26231
- x,
26232
- y,
26233
- width,
26234
- height,
26235
- radius,
26236
- radiusY,
26237
- points,
26238
- d,
26239
- x2,
26240
- y2,
26241
- fill,
26242
- stroke,
26243
- strokeWidth,
26244
- opacity,
26245
- className
26246
- }) {
26247
- const { tileSize } = useContext(SvgStageContext);
26248
- const cell = (v) => v === void 0 ? void 0 : v * tileSize;
26249
- const paint = {
26250
- fill: fill ?? (stroke === void 0 ? "var(--color-primary)" : "none"),
26251
- stroke,
26252
- strokeWidth,
26253
- opacity,
26254
- className
26255
- };
26256
- return /* @__PURE__ */ jsxs("g", { transform: `translate(${x * tileSize} ${y * tileSize})`, children: [
26257
- shape === "rect" && /* @__PURE__ */ jsx("rect", { width: cell(width), height: cell(height), ...paint }),
26258
- shape === "circle" && /* @__PURE__ */ jsx("circle", { r: cell(radius), ...paint }),
26259
- shape === "ellipse" && /* @__PURE__ */ jsx("ellipse", { rx: cell(radius), ry: cell(radiusY ?? radius), ...paint }),
26260
- shape === "polygon" && /* @__PURE__ */ jsx("polygon", { points, ...paint }),
26261
- shape === "polyline" && /* @__PURE__ */ jsx("polyline", { points, ...paint }),
26262
- shape === "path" && /* @__PURE__ */ jsx("path", { d, ...paint }),
26263
- shape === "line" && /* @__PURE__ */ jsx("line", { x2: cell(x2), y2: cell(y2), ...paint })
26264
- ] });
26265
- }
26266
- var init_SvgDrawShape = __esm({
26267
- "components/game/atoms/SvgDrawShape.tsx"() {
26268
- "use client";
26269
- init_SvgStage();
26270
- SvgDrawShape.displayName = "SvgDrawShape";
26271
- }
26272
- });
26273
- function SvgDrawGroup({
26274
- x = 0,
26275
- y = 0,
26276
- scale,
26277
- rotate,
26278
- opacity,
26279
- className,
26280
- children
26281
- }) {
26282
- const { tileSize } = useContext(SvgStageContext);
26283
- const transforms = [`translate(${x * tileSize} ${y * tileSize})`];
26284
- if (rotate !== void 0) transforms.push(`rotate(${rotate})`);
26285
- if (scale !== void 0) transforms.push(`scale(${scale})`);
26286
- return /* @__PURE__ */ jsx("g", { transform: transforms.join(" "), opacity, className, children });
26287
- }
26288
- var init_SvgDrawGroup = __esm({
26289
- "components/game/atoms/SvgDrawGroup.tsx"() {
26290
- "use client";
26291
- init_SvgStage();
26292
- SvgDrawGroup.displayName = "SvgDrawGroup";
26293
- }
26294
- });
26295
- function SvgDrawText({
26296
- x,
26297
- y,
26298
- text,
26299
- size = 12,
26300
- fill = "var(--color-foreground)",
26301
- anchor = "middle",
26302
- className
26303
- }) {
26304
- const { tileSize } = useContext(SvgStageContext);
26305
- return /* @__PURE__ */ jsx(
26306
- "text",
26307
- {
26308
- x: x * tileSize,
26309
- y: y * tileSize,
26310
- fontSize: size,
26311
- fill,
26312
- textAnchor: anchor,
26313
- className,
26314
- children: text
26315
- }
26316
- );
26317
- }
26318
- var init_SvgDrawText = __esm({
26319
- "components/game/atoms/SvgDrawText.tsx"() {
26320
- "use client";
26321
- init_SvgStage();
26322
- SvgDrawText.displayName = "SvgDrawText";
26323
- }
26324
- });
26325
26192
  function StatBadge({
26326
26193
  assetUrl,
26327
26194
  iconUrl,
@@ -26812,32 +26679,6 @@ var init_StateGraph = __esm({
26812
26679
  init_TransitionArrow();
26813
26680
  }
26814
26681
  });
26815
- function SvgDrawShapeLayer({
26816
- items,
26817
- fill,
26818
- stroke,
26819
- strokeWidth,
26820
- opacity
26821
- }) {
26822
- return /* @__PURE__ */ jsx("g", { children: items.map(({ id, ...shape }) => /* @__PURE__ */ jsx(
26823
- SvgDrawShape,
26824
- {
26825
- ...shape,
26826
- fill: shape.fill ?? fill,
26827
- stroke: shape.stroke ?? stroke,
26828
- strokeWidth: shape.strokeWidth ?? strokeWidth,
26829
- opacity: shape.opacity ?? opacity
26830
- },
26831
- id
26832
- )) });
26833
- }
26834
- var init_SvgDrawShapeLayer = __esm({
26835
- "components/game/molecules/SvgDrawShapeLayer.tsx"() {
26836
- "use client";
26837
- init_SvgDrawShape();
26838
- SvgDrawShapeLayer.displayName = "SvgDrawShapeLayer";
26839
- }
26840
- });
26841
26682
  function unitAtlasUrl(unit) {
26842
26683
  return unit.spriteSheet?.url ?? null;
26843
26684
  }
@@ -28305,9 +28146,6 @@ var init_molecules = __esm({
28305
28146
  init_TimerDisplay();
28306
28147
  init_DialogueBubble();
28307
28148
  init_ChoiceButton();
28308
- init_SvgDrawShape();
28309
- init_SvgDrawGroup();
28310
- init_SvgDrawText();
28311
28149
  init_ControlGrid();
28312
28150
  init_StatBadge();
28313
28151
  init_GameHud();
@@ -28315,8 +28153,6 @@ var init_molecules = __esm({
28315
28153
  init_StateGraph();
28316
28154
  init_Canvas2D();
28317
28155
  init_Canvas();
28318
- init_SvgDrawShapeLayer();
28319
- init_SvgStage();
28320
28156
  init_useUnitSpriteAtlas();
28321
28157
  init_GameAudioToggle();
28322
28158
  init_useGameAudio();
@@ -28934,13 +28770,13 @@ var init_MapView = __esm({
28934
28770
  shadowSize: [41, 41]
28935
28771
  });
28936
28772
  L.Marker.prototype.options.icon = defaultIcon;
28937
- const { useEffect: useEffect66, useRef: useRef64, useCallback: useCallback107, useState: useState102 } = React74__default;
28773
+ const { useEffect: useEffect65, useRef: useRef63, useCallback: useCallback106, useState: useState102 } = React74__default;
28938
28774
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
28939
28775
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
28940
28776
  function MapUpdater({ centerLat, centerLng, zoom }) {
28941
28777
  const map = useMap();
28942
- const prevRef = useRef64({ centerLat, centerLng, zoom });
28943
- useEffect66(() => {
28778
+ const prevRef = useRef63({ centerLat, centerLng, zoom });
28779
+ useEffect65(() => {
28944
28780
  const prev = prevRef.current;
28945
28781
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
28946
28782
  map.setView([centerLat, centerLng], zoom);
@@ -28951,7 +28787,7 @@ var init_MapView = __esm({
28951
28787
  }
28952
28788
  function MapClickHandler({ onMapClick }) {
28953
28789
  const map = useMap();
28954
- useEffect66(() => {
28790
+ useEffect65(() => {
28955
28791
  if (!onMapClick) return;
28956
28792
  const handler = (e) => {
28957
28793
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -28980,7 +28816,7 @@ var init_MapView = __esm({
28980
28816
  }) {
28981
28817
  const eventBus = useEventBus2();
28982
28818
  const [clickedPosition, setClickedPosition] = useState102(null);
28983
- const handleMapClick = useCallback107((lat, lng) => {
28819
+ const handleMapClick = useCallback106((lat, lng) => {
28984
28820
  if (showClickedPin) {
28985
28821
  setClickedPosition({ lat, lng });
28986
28822
  }
@@ -28989,7 +28825,7 @@ var init_MapView = __esm({
28989
28825
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
28990
28826
  }
28991
28827
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
28992
- const handleMarkerClick = useCallback107((marker) => {
28828
+ const handleMarkerClick = useCallback106((marker) => {
28993
28829
  onMarkerClick?.(marker);
28994
28830
  if (markerClickEvent) {
28995
28831
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -39764,6 +39600,16 @@ var init_DetailPanel = __esm({
39764
39600
  DetailPanel.displayName = "DetailPanel";
39765
39601
  }
39766
39602
  });
39603
+
39604
+ // components/game/atoms/DrawGroup.tsx
39605
+ function DrawGroup(_props) {
39606
+ return null;
39607
+ }
39608
+ var init_DrawGroup = __esm({
39609
+ "components/game/atoms/DrawGroup.tsx"() {
39610
+ "use client";
39611
+ }
39612
+ });
39767
39613
  function extractTitle(children) {
39768
39614
  if (!React74__default.isValidElement(children)) return void 0;
39769
39615
  const props = children.props;
@@ -45467,6 +45313,7 @@ var init_component_registry_generated = __esm({
45467
45313
  init_DocSidebar();
45468
45314
  init_DocTOC();
45469
45315
  init_DocumentViewer();
45316
+ init_DrawGroup();
45470
45317
  init_DrawShape();
45471
45318
  init_DrawShapeLayer();
45472
45319
  init_DrawSprite();
@@ -45610,10 +45457,6 @@ var init_component_registry_generated = __esm({
45610
45457
  init_SubagentTracePanel();
45611
45458
  init_SvgBranch();
45612
45459
  init_SvgConnection();
45613
- init_SvgDrawGroup();
45614
- init_SvgDrawShape();
45615
- init_SvgDrawShapeLayer();
45616
- init_SvgDrawText();
45617
45460
  init_SvgFlow();
45618
45461
  init_SvgGrid();
45619
45462
  init_SvgLobe();
@@ -45624,7 +45467,6 @@ var init_component_registry_generated = __esm({
45624
45467
  init_SvgRing();
45625
45468
  init_SvgShield();
45626
45469
  init_SvgStack();
45627
- init_SvgStage();
45628
45470
  init_SwipeableRow();
45629
45471
  init_Switch();
45630
45472
  init_TabbedContainer();
@@ -45738,6 +45580,7 @@ var init_component_registry_generated = __esm({
45738
45580
  "DocSidebar": DocSidebar,
45739
45581
  "DocTOC": DocTOC,
45740
45582
  "DocumentViewer": DocumentViewer,
45583
+ "DrawGroup": DrawGroup,
45741
45584
  "DrawShape": DrawShape,
45742
45585
  "DrawShapeLayer": DrawShapeLayer,
45743
45586
  "DrawSprite": DrawSprite,
@@ -45886,10 +45729,6 @@ var init_component_registry_generated = __esm({
45886
45729
  "SubagentTracePanel": SubagentTracePanel,
45887
45730
  "SvgBranch": SvgBranch,
45888
45731
  "SvgConnection": SvgConnection,
45889
- "SvgDrawGroup": SvgDrawGroup,
45890
- "SvgDrawShape": SvgDrawShape,
45891
- "SvgDrawShapeLayer": SvgDrawShapeLayer,
45892
- "SvgDrawText": SvgDrawText,
45893
45732
  "SvgFlow": SvgFlow,
45894
45733
  "SvgGrid": SvgGrid,
45895
45734
  "SvgLobe": SvgLobe,
@@ -45900,7 +45739,6 @@ var init_component_registry_generated = __esm({
45900
45739
  "SvgRing": SvgRing,
45901
45740
  "SvgShield": SvgShield,
45902
45741
  "SvgStack": SvgStack,
45903
- "SvgStage": SvgStage,
45904
45742
  "SwipeableRow": SwipeableRow,
45905
45743
  "Switch": Switch,
45906
45744
  "TabbedContainer": TabbedContainer,
@@ -49356,4 +49194,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
49356
49194
  });
49357
49195
  }
49358
49196
 
49359
- export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, ImportPreviewTree, ImportProgress, ImportSourcePicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, PageTransition, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, Presence, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichBlockEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgDrawGroup, SvgDrawShape, SvgDrawShapeLayer, SvgDrawText, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SvgStage, SvgStageContext, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, registerCodeLanguageLoader, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useMediaQuery, useOrbitalHistory, usePresence, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate114 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
49197
+ export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, ImportPreviewTree, ImportProgress, ImportSourcePicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, PageTransition, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, Presence, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichBlockEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, registerCodeLanguageLoader, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useMediaQuery, useOrbitalHistory, usePresence, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate114 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
@@ -186,6 +186,7 @@ function collectDrawnItems(nodes) {
186
186
  case "draw-sprite":
187
187
  case "draw-shape":
188
188
  case "draw-text":
189
+ case "draw-group":
189
190
  if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
190
191
  break;
191
192
  case "draw-sprite-layer":
@@ -794,6 +795,13 @@ function ModelLoader({
794
795
  }
795
796
  );
796
797
  }
798
+ var mesh3dLog = logger.createLogger("almadar:ui:drawable-3d");
799
+ var warnedUnsupported = /* @__PURE__ */ new Set();
800
+ var warnUnsupported3d = (kind) => {
801
+ if (warnedUnsupported.has(kind)) return;
802
+ warnedUnsupported.add(kind);
803
+ mesh3dLog.warn("unsupported drawable kind on the 3D backend \u2014 skipped", { kind });
804
+ };
797
805
  var CrossOriginTextureLoader = class extends THREE9__namespace.TextureLoader {
798
806
  constructor() {
799
807
  super();
@@ -966,6 +974,10 @@ function Shape3D({ node, projector }) {
966
974
  geometry = /* @__PURE__ */ jsxRuntime.jsx("shapeGeometry", { args: [s] });
967
975
  break;
968
976
  }
977
+ case "path": {
978
+ warnUnsupported3d("draw-shape:path");
979
+ return null;
980
+ }
969
981
  default:
970
982
  return null;
971
983
  }
@@ -1004,6 +1016,9 @@ function Drawable3D({ node, projector }) {
1004
1016
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: node.items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(Shape3D, { node: item, projector }, i)) });
1005
1017
  case "draw-text-layer":
1006
1018
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: node.items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(Text3D, { node: item, projector }, i)) });
1019
+ case "draw-group":
1020
+ warnUnsupported3d("draw-group");
1021
+ return null;
1007
1022
  }
1008
1023
  }
1009
1024
 
@@ -3,7 +3,7 @@ import React__default, { Component, ReactNode, ErrorInfo } from 'react';
3
3
  import { ScenePos, EventEmit, JsonObject, OrbitalSchema } from '@almadar/core';
4
4
  import * as THREE from 'three';
5
5
  import { QuadraticBezierCurve3 } from 'three';
6
- import { D as DrawableNode } from '../../../paintDispatch-BXJgISot.cjs';
6
+ import { D as DrawableNode } from '../../../paintDispatch-Bl2sfRFb.cjs';
7
7
  import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
8
8
  import { I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-B8Onmfsu.cjs';
9
9
  export { U as UnitAnimationState } from '../../../avl-schema-parser-B8Onmfsu.cjs';
@@ -3,7 +3,7 @@ import React__default, { Component, ReactNode, ErrorInfo } from 'react';
3
3
  import { ScenePos, EventEmit, JsonObject, OrbitalSchema } from '@almadar/core';
4
4
  import * as THREE from 'three';
5
5
  import { QuadraticBezierCurve3 } from 'three';
6
- import { D as DrawableNode } from '../../../paintDispatch-BXJgISot.js';
6
+ import { D as DrawableNode } from '../../../paintDispatch-Bl2sfRFb.js';
7
7
  import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
8
8
  import { I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-B8Onmfsu.js';
9
9
  export { U as UnitAnimationState } from '../../../avl-schema-parser-B8Onmfsu.js';
@@ -162,6 +162,7 @@ function collectDrawnItems(nodes) {
162
162
  case "draw-sprite":
163
163
  case "draw-shape":
164
164
  case "draw-text":
165
+ case "draw-group":
165
166
  if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
166
167
  break;
167
168
  case "draw-sprite-layer":
@@ -770,6 +771,13 @@ function ModelLoader({
770
771
  }
771
772
  );
772
773
  }
774
+ var mesh3dLog = createLogger("almadar:ui:drawable-3d");
775
+ var warnedUnsupported = /* @__PURE__ */ new Set();
776
+ var warnUnsupported3d = (kind) => {
777
+ if (warnedUnsupported.has(kind)) return;
778
+ warnedUnsupported.add(kind);
779
+ mesh3dLog.warn("unsupported drawable kind on the 3D backend \u2014 skipped", { kind });
780
+ };
773
781
  var CrossOriginTextureLoader = class extends THREE9.TextureLoader {
774
782
  constructor() {
775
783
  super();
@@ -942,6 +950,10 @@ function Shape3D({ node, projector }) {
942
950
  geometry = /* @__PURE__ */ jsx("shapeGeometry", { args: [s] });
943
951
  break;
944
952
  }
953
+ case "path": {
954
+ warnUnsupported3d("draw-shape:path");
955
+ return null;
956
+ }
945
957
  default:
946
958
  return null;
947
959
  }
@@ -980,6 +992,9 @@ function Drawable3D({ node, projector }) {
980
992
  return /* @__PURE__ */ jsx(Fragment, { children: node.items.map((item, i) => /* @__PURE__ */ jsx(Shape3D, { node: item, projector }, i)) });
981
993
  case "draw-text-layer":
982
994
  return /* @__PURE__ */ jsx(Fragment, { children: node.items.map((item, i) => /* @__PURE__ */ jsx(Text3D, { node: item, projector }, i)) });
995
+ case "draw-group":
996
+ warnUnsupported3d("draw-group");
997
+ return null;
983
998
  }
984
999
  }
985
1000