@almadar/ui 2.12.4 → 2.12.5
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.
- package/dist/{chunk-42AVZIGQ.js → chunk-AX45OCIB.js} +2 -2
- package/dist/{chunk-IP2FYX3M.js → chunk-HJJIE4K5.js} +156 -20
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +6 -6
- package/dist/hooks/index.js +2 -2
- package/dist/providers/index.js +3 -3
- package/dist/runtime/index.js +5 -5
- package/package.json +1 -1
- package/themes/index.css +8 -8
- package/dist/{chunk-2QM732NQ.js → chunk-GTIAVPI5.js} +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SuspenseConfigProvider } from './chunk-
|
|
1
|
+
import { SuspenseConfigProvider } from './chunk-HJJIE4K5.js';
|
|
2
|
+
import { ThemeProvider } from './chunk-DKQN5FVU.js';
|
|
2
3
|
import { SelectionProvider, EntityDataProvider } from './chunk-WGJIL4YR.js';
|
|
3
4
|
import { useEventBus, EventBusProvider } from './chunk-YXZM3WCF.js';
|
|
4
|
-
import { ThemeProvider } from './chunk-DKQN5FVU.js';
|
|
5
5
|
import { recordTransition, registerCheck, bindEventBus, bindTraitStateGetter } from './chunk-WCTZ7WZX.js';
|
|
6
6
|
import { useOfflineExecutor } from './chunk-K2D5D3WK.js';
|
|
7
7
|
import { createContext, useState, useCallback, useMemo, useContext, useRef, useEffect } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useTheme, useUISlots } from './chunk-DKQN5FVU.js';
|
|
1
2
|
import { useTranslate, useInfiniteScroll, useQuerySingleton, useLongPress, useSwipeGesture, useDragReorder, usePullToRefresh } from './chunk-WGJIL4YR.js';
|
|
2
3
|
import { useEventBus } from './chunk-YXZM3WCF.js';
|
|
3
|
-
import { useTheme, useUISlots } from './chunk-DKQN5FVU.js';
|
|
4
4
|
import { cn, debugGroup, debug, debugGroupEnd, updateAssetStatus, bindCanvasCapture, getNestedValue, isDebugEnabled } from './chunk-WCTZ7WZX.js';
|
|
5
5
|
import { isPortalSlot } from './chunk-K2D5D3WK.js';
|
|
6
6
|
import { __publicField } from './chunk-PKBMQBKP.js';
|
|
@@ -148,6 +148,7 @@ var variantStyles = {
|
|
|
148
148
|
"active:scale-[var(--active-scale)]"
|
|
149
149
|
].join(" ")
|
|
150
150
|
};
|
|
151
|
+
variantStyles.destructive = variantStyles.danger;
|
|
151
152
|
var sizeStyles = {
|
|
152
153
|
sm: "px-3 py-1.5 text-sm",
|
|
153
154
|
md: "px-4 py-2 text-sm",
|
|
@@ -9220,7 +9221,7 @@ function GameHud({
|
|
|
9220
9221
|
if (position === "corners") {
|
|
9221
9222
|
const leftStats = stats.slice(0, Math.ceil(stats.length / 2));
|
|
9222
9223
|
const rightStats = stats.slice(Math.ceil(stats.length / 2));
|
|
9223
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("
|
|
9224
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative", positionMap[position], className), children: [
|
|
9224
9225
|
/* @__PURE__ */ jsx("div", { className: "absolute top-4 left-4 flex flex-col gap-2 pointer-events-auto", children: leftStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) }),
|
|
9225
9226
|
/* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 flex flex-col gap-2 items-end pointer-events-auto", children: rightStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) })
|
|
9226
9227
|
] });
|
|
@@ -9229,7 +9230,7 @@ function GameHud({
|
|
|
9229
9230
|
"div",
|
|
9230
9231
|
{
|
|
9231
9232
|
className: cn(
|
|
9232
|
-
"
|
|
9233
|
+
"relative z-10",
|
|
9233
9234
|
positionMap[position],
|
|
9234
9235
|
transparent && "bg-gradient-to-b from-black/50 to-transparent",
|
|
9235
9236
|
position === "bottom" && "bg-gradient-to-t from-black/50 to-transparent",
|
|
@@ -10134,7 +10135,6 @@ function useImageCache(urls) {
|
|
|
10134
10135
|
useEffect(() => {
|
|
10135
10136
|
const cache = cacheRef.current;
|
|
10136
10137
|
const loading = loadingRef.current;
|
|
10137
|
-
let cancelled = false;
|
|
10138
10138
|
const newUrls = urls.filter((url) => url && !cache.has(url) && !loading.has(url));
|
|
10139
10139
|
if (newUrls.length === 0) return;
|
|
10140
10140
|
setPendingCount((prev) => prev + newUrls.length);
|
|
@@ -10143,14 +10143,12 @@ function useImageCache(urls) {
|
|
|
10143
10143
|
const img = new Image();
|
|
10144
10144
|
img.crossOrigin = "anonymous";
|
|
10145
10145
|
img.onload = () => {
|
|
10146
|
-
if (cancelled) return;
|
|
10147
10146
|
cache.set(url, img);
|
|
10148
10147
|
loading.delete(url);
|
|
10149
10148
|
setPendingCount((prev) => Math.max(0, prev - 1));
|
|
10150
10149
|
updateAssetStatus(url, "loaded");
|
|
10151
10150
|
};
|
|
10152
10151
|
img.onerror = () => {
|
|
10153
|
-
if (cancelled) return;
|
|
10154
10152
|
loading.delete(url);
|
|
10155
10153
|
setPendingCount((prev) => Math.max(0, prev - 1));
|
|
10156
10154
|
updateAssetStatus(url, "failed");
|
|
@@ -10158,9 +10156,6 @@ function useImageCache(urls) {
|
|
|
10158
10156
|
updateAssetStatus(url, "pending");
|
|
10159
10157
|
img.src = url;
|
|
10160
10158
|
}
|
|
10161
|
-
return () => {
|
|
10162
|
-
cancelled = true;
|
|
10163
|
-
};
|
|
10164
10159
|
}, [urls.join(",")]);
|
|
10165
10160
|
const getImage = useCallback((url) => {
|
|
10166
10161
|
return cacheRef.current.get(url);
|
|
@@ -10282,8 +10277,8 @@ function IsometricCanvas({
|
|
|
10282
10277
|
error = null,
|
|
10283
10278
|
// Grid data
|
|
10284
10279
|
tiles: tilesProp = [],
|
|
10285
|
-
units = [],
|
|
10286
|
-
features = [],
|
|
10280
|
+
units: unitsProp = [],
|
|
10281
|
+
features: featuresProp = [],
|
|
10287
10282
|
// Interaction state
|
|
10288
10283
|
selectedUnitId = null,
|
|
10289
10284
|
validMoves = [],
|
|
@@ -10346,6 +10341,18 @@ function IsometricCanvas({
|
|
|
10346
10341
|
observer.observe(el);
|
|
10347
10342
|
return () => observer.disconnect();
|
|
10348
10343
|
}, []);
|
|
10344
|
+
const units = useMemo(
|
|
10345
|
+
() => unitsProp.map((u) => u.position ? u : { ...u, position: { x: u.x ?? 0, y: u.y ?? 0 } }),
|
|
10346
|
+
[unitsProp]
|
|
10347
|
+
);
|
|
10348
|
+
const features = useMemo(
|
|
10349
|
+
() => featuresProp.map((f) => {
|
|
10350
|
+
if (f.type) return f;
|
|
10351
|
+
const raw = f;
|
|
10352
|
+
return raw.featureType ? { ...f, type: raw.featureType } : f;
|
|
10353
|
+
}),
|
|
10354
|
+
[featuresProp]
|
|
10355
|
+
);
|
|
10349
10356
|
const sortedTiles = useMemo(() => {
|
|
10350
10357
|
const tiles = [...tilesProp];
|
|
10351
10358
|
tiles.sort((a, b) => {
|
|
@@ -10424,7 +10431,7 @@ function IsometricCanvas({
|
|
|
10424
10431
|
if (backgroundImage) urls.push(backgroundImage);
|
|
10425
10432
|
return [...new Set(urls.filter(Boolean))];
|
|
10426
10433
|
}, [sortedTiles, features, units, getTerrainSprite, getFeatureSprite, getUnitSprite, effectSpriteUrls, backgroundImage, assetManifest, resolveManifestUrl]);
|
|
10427
|
-
const { getImage } = useImageCache(spriteUrls);
|
|
10434
|
+
const { getImage, pendingCount } = useImageCache(spriteUrls);
|
|
10428
10435
|
useEffect(() => {
|
|
10429
10436
|
if (typeof window === "undefined") return;
|
|
10430
10437
|
const canvas = canvasRef.current;
|
|
@@ -10853,7 +10860,7 @@ function IsometricCanvas({
|
|
|
10853
10860
|
};
|
|
10854
10861
|
}, [selectedUnitId, units, scale, baseOffsetX, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, viewportSize, targetCameraRef]);
|
|
10855
10862
|
useEffect(() => {
|
|
10856
|
-
const hasAnimations = units.length > 0 || validMoves.length > 0 || attackTargets.length > 0 || selectedUnitId != null || targetCameraRef.current != null || hasActiveEffects2;
|
|
10863
|
+
const hasAnimations = units.length > 0 || validMoves.length > 0 || attackTargets.length > 0 || selectedUnitId != null || targetCameraRef.current != null || hasActiveEffects2 || pendingCount > 0;
|
|
10857
10864
|
draw(animTimeRef.current);
|
|
10858
10865
|
if (!hasAnimations) return;
|
|
10859
10866
|
let running = true;
|
|
@@ -10869,7 +10876,7 @@ function IsometricCanvas({
|
|
|
10869
10876
|
running = false;
|
|
10870
10877
|
cancelAnimationFrame(rafIdRef.current);
|
|
10871
10878
|
};
|
|
10872
|
-
}, [draw, units.length, validMoves.length, attackTargets.length, selectedUnitId, hasActiveEffects2, lerpToTarget, targetCameraRef]);
|
|
10879
|
+
}, [draw, units.length, validMoves.length, attackTargets.length, selectedUnitId, hasActiveEffects2, pendingCount, lerpToTarget, targetCameraRef]);
|
|
10873
10880
|
const handleMouseMoveWithCamera = useCallback((e) => {
|
|
10874
10881
|
if (enableCamera) {
|
|
10875
10882
|
const wasPanning = handleMouseMove(e, () => draw(animTimeRef.current));
|
|
@@ -18290,6 +18297,7 @@ function CustomPattern({
|
|
|
18290
18297
|
}
|
|
18291
18298
|
CustomPattern.displayName = "CustomPattern";
|
|
18292
18299
|
var SuspenseConfigContext = createContext({ enabled: false });
|
|
18300
|
+
var SlotContainedContext = createContext(false);
|
|
18293
18301
|
function SuspenseConfigProvider({
|
|
18294
18302
|
config,
|
|
18295
18303
|
children
|
|
@@ -18471,6 +18479,102 @@ var PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
|
|
|
18471
18479
|
"custom"
|
|
18472
18480
|
// Custom patterns support nested children
|
|
18473
18481
|
]);
|
|
18482
|
+
function renderContainedPortal(slot, content, onDismiss) {
|
|
18483
|
+
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
18484
|
+
switch (slot) {
|
|
18485
|
+
case "modal":
|
|
18486
|
+
return /* @__PURE__ */ jsx(
|
|
18487
|
+
Box,
|
|
18488
|
+
{
|
|
18489
|
+
className: "absolute inset-0 z-50 flex items-center justify-center bg-black/50 p-4 overflow-auto",
|
|
18490
|
+
onClick: onDismiss,
|
|
18491
|
+
children: /* @__PURE__ */ jsxs(
|
|
18492
|
+
Box,
|
|
18493
|
+
{
|
|
18494
|
+
bg: "surface",
|
|
18495
|
+
border: true,
|
|
18496
|
+
shadow: "lg",
|
|
18497
|
+
rounded: "md",
|
|
18498
|
+
className: "pointer-events-auto max-w-[calc(100%-2rem)] max-h-full overflow-auto flex flex-col",
|
|
18499
|
+
onClick: (e) => e.stopPropagation(),
|
|
18500
|
+
children: [
|
|
18501
|
+
content.props.title ? /* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b border-[var(--color-border)]", children: [
|
|
18502
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h3", className: "text-lg font-semibold", children: String(content.props.title) }),
|
|
18503
|
+
/* @__PURE__ */ jsx(
|
|
18504
|
+
Box,
|
|
18505
|
+
{
|
|
18506
|
+
as: "button",
|
|
18507
|
+
className: "text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)] cursor-pointer",
|
|
18508
|
+
onClick: onDismiss,
|
|
18509
|
+
children: "\u2715"
|
|
18510
|
+
}
|
|
18511
|
+
)
|
|
18512
|
+
] }) : null,
|
|
18513
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-auto p-4", children: slotContent })
|
|
18514
|
+
]
|
|
18515
|
+
}
|
|
18516
|
+
)
|
|
18517
|
+
}
|
|
18518
|
+
);
|
|
18519
|
+
case "drawer":
|
|
18520
|
+
return /* @__PURE__ */ jsx(
|
|
18521
|
+
Box,
|
|
18522
|
+
{
|
|
18523
|
+
className: "absolute inset-0 z-50 bg-black/50 overflow-hidden",
|
|
18524
|
+
onClick: onDismiss,
|
|
18525
|
+
children: /* @__PURE__ */ jsxs(
|
|
18526
|
+
Box,
|
|
18527
|
+
{
|
|
18528
|
+
bg: "surface",
|
|
18529
|
+
className: cn(
|
|
18530
|
+
"absolute top-0 bottom-0 w-80 max-w-[80%] overflow-auto pointer-events-auto",
|
|
18531
|
+
content.props.position === "left" ? "left-0" : "right-0"
|
|
18532
|
+
),
|
|
18533
|
+
onClick: (e) => e.stopPropagation(),
|
|
18534
|
+
children: [
|
|
18535
|
+
content.props.title ? /* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b border-[var(--color-border)]", children: [
|
|
18536
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h3", className: "text-lg font-semibold", children: String(content.props.title) }),
|
|
18537
|
+
/* @__PURE__ */ jsx(
|
|
18538
|
+
Box,
|
|
18539
|
+
{
|
|
18540
|
+
as: "button",
|
|
18541
|
+
className: "text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)] cursor-pointer",
|
|
18542
|
+
onClick: onDismiss,
|
|
18543
|
+
children: "\u2715"
|
|
18544
|
+
}
|
|
18545
|
+
)
|
|
18546
|
+
] }) : null,
|
|
18547
|
+
/* @__PURE__ */ jsx(Box, { className: "p-4", children: slotContent })
|
|
18548
|
+
]
|
|
18549
|
+
}
|
|
18550
|
+
)
|
|
18551
|
+
}
|
|
18552
|
+
);
|
|
18553
|
+
case "toast":
|
|
18554
|
+
return /* @__PURE__ */ jsx(Box, { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
18555
|
+
Toast,
|
|
18556
|
+
{
|
|
18557
|
+
variant: content.props.variant ?? "info",
|
|
18558
|
+
title: content.props.title,
|
|
18559
|
+
message: content.props.message ?? "",
|
|
18560
|
+
onDismiss
|
|
18561
|
+
}
|
|
18562
|
+
) });
|
|
18563
|
+
case "overlay":
|
|
18564
|
+
return /* @__PURE__ */ jsx(
|
|
18565
|
+
Box,
|
|
18566
|
+
{
|
|
18567
|
+
className: "absolute inset-0 z-50 bg-[var(--color-foreground)]/50 flex items-center justify-center overflow-auto",
|
|
18568
|
+
onClick: onDismiss,
|
|
18569
|
+
children: /* @__PURE__ */ jsx(Box, { className: "max-h-full overflow-auto", onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
18570
|
+
}
|
|
18571
|
+
);
|
|
18572
|
+
case "center":
|
|
18573
|
+
return /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
18574
|
+
default:
|
|
18575
|
+
return slotContent;
|
|
18576
|
+
}
|
|
18577
|
+
}
|
|
18474
18578
|
function UISlotComponent({
|
|
18475
18579
|
slot,
|
|
18476
18580
|
portal = false,
|
|
@@ -18482,12 +18586,25 @@ function UISlotComponent({
|
|
|
18482
18586
|
}) {
|
|
18483
18587
|
const { slots, clear } = useUISlots();
|
|
18484
18588
|
const suspenseConfig = useContext(SuspenseConfigContext);
|
|
18589
|
+
const contained = useContext(SlotContainedContext);
|
|
18485
18590
|
const content = slots[slot];
|
|
18486
18591
|
if (children !== void 0) {
|
|
18487
18592
|
if (pattern === "clear") {
|
|
18488
18593
|
return null;
|
|
18489
18594
|
}
|
|
18490
18595
|
if (isPortalSlot(slot)) {
|
|
18596
|
+
if (contained) {
|
|
18597
|
+
return /* @__PURE__ */ jsx(
|
|
18598
|
+
Box,
|
|
18599
|
+
{
|
|
18600
|
+
id: `slot-${slot}`,
|
|
18601
|
+
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
18602
|
+
"data-pattern": pattern,
|
|
18603
|
+
"data-source-trait": sourceTrait,
|
|
18604
|
+
children
|
|
18605
|
+
}
|
|
18606
|
+
);
|
|
18607
|
+
}
|
|
18491
18608
|
return /* @__PURE__ */ jsx(CompiledPortal, { slot, className, pattern, sourceTrait, children });
|
|
18492
18609
|
}
|
|
18493
18610
|
return /* @__PURE__ */ jsx(
|
|
@@ -18517,6 +18634,9 @@ function UISlotComponent({
|
|
|
18517
18634
|
clear(slot);
|
|
18518
18635
|
};
|
|
18519
18636
|
if (portal) {
|
|
18637
|
+
if (contained) {
|
|
18638
|
+
return renderContainedPortal(slot, content, handleDismiss);
|
|
18639
|
+
}
|
|
18520
18640
|
return /* @__PURE__ */ jsx(
|
|
18521
18641
|
SlotPortal,
|
|
18522
18642
|
{
|
|
@@ -18770,8 +18890,13 @@ function UISlotRenderer({
|
|
|
18770
18890
|
className,
|
|
18771
18891
|
suspense
|
|
18772
18892
|
}) {
|
|
18893
|
+
const isContained = hudMode === "inline";
|
|
18773
18894
|
const suspenseConfig = suspense === true ? { enabled: true } : suspense && typeof suspense === "object" ? suspense : { enabled: false };
|
|
18774
|
-
const content = /* @__PURE__ */ jsxs(Box, { className: cn(
|
|
18895
|
+
const content = /* @__PURE__ */ jsxs(Box, { className: cn(
|
|
18896
|
+
"ui-slot-renderer",
|
|
18897
|
+
isContained && "relative",
|
|
18898
|
+
className
|
|
18899
|
+
), children: [
|
|
18775
18900
|
/* @__PURE__ */ jsx(UISlotComponent, { slot: "sidebar", className: "ui-slot-sidebar" }),
|
|
18776
18901
|
/* @__PURE__ */ jsx(UISlotComponent, { slot: "main", className: "ui-slot-main flex-1" }),
|
|
18777
18902
|
/* @__PURE__ */ jsx(UISlotComponent, { slot: "modal", portal: true }),
|
|
@@ -18784,23 +18909,34 @@ function UISlotRenderer({
|
|
|
18784
18909
|
UISlotComponent,
|
|
18785
18910
|
{
|
|
18786
18911
|
slot: "hud-top",
|
|
18787
|
-
className:
|
|
18912
|
+
className: isContained ? "sticky top-0 inset-x-0 z-40" : "fixed top-0 inset-x-0 z-40"
|
|
18788
18913
|
}
|
|
18789
18914
|
),
|
|
18790
18915
|
/* @__PURE__ */ jsx(
|
|
18791
18916
|
UISlotComponent,
|
|
18792
18917
|
{
|
|
18793
18918
|
slot: "hud-bottom",
|
|
18794
|
-
className:
|
|
18919
|
+
className: isContained ? "sticky bottom-0 inset-x-0 z-40" : "fixed bottom-0 inset-x-0 z-40"
|
|
18795
18920
|
}
|
|
18796
18921
|
)
|
|
18797
18922
|
] }),
|
|
18798
|
-
includeFloating && /* @__PURE__ */ jsx(
|
|
18923
|
+
includeFloating && /* @__PURE__ */ jsx(
|
|
18924
|
+
UISlotComponent,
|
|
18925
|
+
{
|
|
18926
|
+
slot: "floating",
|
|
18927
|
+
className: isContained ? "absolute z-50" : "fixed z-50",
|
|
18928
|
+
draggable: true
|
|
18929
|
+
}
|
|
18930
|
+
)
|
|
18799
18931
|
] });
|
|
18932
|
+
let wrapped = content;
|
|
18800
18933
|
if (suspenseConfig.enabled) {
|
|
18801
|
-
|
|
18934
|
+
wrapped = /* @__PURE__ */ jsx(SuspenseConfigProvider, { config: suspenseConfig, children: wrapped });
|
|
18935
|
+
}
|
|
18936
|
+
if (isContained) {
|
|
18937
|
+
wrapped = /* @__PURE__ */ jsx(SlotContainedContext.Provider, { value: true, children: wrapped });
|
|
18802
18938
|
}
|
|
18803
|
-
return
|
|
18939
|
+
return wrapped;
|
|
18804
18940
|
}
|
|
18805
18941
|
UISlotRenderer.displayName = "UISlotRenderer";
|
|
18806
18942
|
|
|
@@ -4107,7 +4107,7 @@ interface IsometricCanvasProps {
|
|
|
4107
4107
|
effects?: Record<string, string>;
|
|
4108
4108
|
};
|
|
4109
4109
|
}
|
|
4110
|
-
declare function IsometricCanvas({ className, isLoading, error, tiles: tilesProp, units, features, selectedUnitId, validMoves, attackTargets, hoveredTile, onTileClick, onUnitClick, onTileHover, onTileLeave, tileClickEvent, unitClickEvent, tileHoverEvent, tileLeaveEvent, scale, debug, backgroundImage, showMinimap, enableCamera, unitScale, getTerrainSprite, getFeatureSprite, getUnitSprite, resolveUnitFrame, effectSpriteUrls, onDrawEffects, hasActiveEffects, diamondTopY: diamondTopYProp, assetBaseUrl, assetManifest, }: IsometricCanvasProps): React$1.JSX.Element;
|
|
4110
|
+
declare function IsometricCanvas({ className, isLoading, error, tiles: tilesProp, units: unitsProp, features: featuresProp, selectedUnitId, validMoves, attackTargets, hoveredTile, onTileClick, onUnitClick, onTileHover, onTileLeave, tileClickEvent, unitClickEvent, tileHoverEvent, tileLeaveEvent, scale, debug, backgroundImage, showMinimap, enableCamera, unitScale, getTerrainSprite, getFeatureSprite, getUnitSprite, resolveUnitFrame, effectSpriteUrls, onDrawEffects, hasActiveEffects, diamondTopY: diamondTopYProp, assetBaseUrl, assetManifest, }: IsometricCanvasProps): React$1.JSX.Element;
|
|
4111
4111
|
declare namespace IsometricCanvas {
|
|
4112
4112
|
var displayName: string;
|
|
4113
4113
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { DEFAULT_CONFIG, renderStateMachineToDomData, parseContentSegments, isDebugEnabled, onDebugToggle, subscribeToTickChanges, subscribeToGuardChanges, subscribeToDebugEvents, getEntitySnapshot, getDebugEvents, getGuardHistory, getAllTicks } from '../chunk-4ZBSL37D.js';
|
|
2
|
-
import { useAuthContext } from '../chunk-
|
|
3
|
-
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-
|
|
2
|
+
import { useAuthContext } from '../chunk-GTIAVPI5.js';
|
|
3
|
+
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-GTIAVPI5.js';
|
|
4
|
+
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
4
5
|
import { subscribeToTraitChanges, getAllTraits } from '../chunk-42YQ6JVR.js';
|
|
5
6
|
import '../chunk-3HJHHULT.js';
|
|
6
|
-
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, isoToScreen, IsometricCanvas_default, Stack, Select, Drawer, Toast, Tabs, Input, ThemeToggle, TILE_WIDTH, EntityDisplayEvents, StateIndicator, Accordion, ButtonGroup, Container } from '../chunk-
|
|
7
|
-
export { ALL_PRESETS, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, Alert, AnimatedCounter, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, Center, Chart, ChartLegend, Checkbox, ChoiceButton, CodeBlock, CombatLog, ComboCounter, ConditionalWrapper, ConfettiEffect, Container, ControlButton, CraftingRecipe, DIAMOND_TOP_Y, DPad, DamageNumber, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DetailPanel, DialogueBox, DialogueBubble, Divider, Drawer, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FLOOR_HEIGHT, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormField, FormSectionHeader, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GraphView, Grid, HStack, Heading, HealthBar, HealthPanel, Icon, InfiniteScrollSentinel, Input, InputGroup, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, Label, LawReferenceTooltip, Lightbox, LineChart, LoadingState, MapView, MarkdownContent, MasterDetail, Menu, Meter, MiniMap, Modal, NumberStepper, Overlay, PageHeader, Pagination, PlatformerCanvas, Popover, PowerupSlots, ProgressBar, ProgressDots, PullToRefresh, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ResourceBar, ResourceCounter, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, Skeleton, SlotContentRenderer, SortableList, Spacer, Spinner, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateIndicator, StatusDot, StatusEffect, SwipeableRow, Switch, TILE_HEIGHT, TILE_WIDTH, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, TimerDisplay, Toast, Tooltip, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UnitCommandBar, UploadDropZone, VStack, ViolationAlert, WaypointMarker, WizardNavigation, WizardProgress, XPBar, drawSprite, isoToScreen, pendulum, projectileMotion, screenToIso, springOscillator, useCamera, useImageCache } from '../chunk-
|
|
7
|
+
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, isoToScreen, IsometricCanvas_default, Stack, Select, Drawer, Toast, Tabs, Input, ThemeToggle, TILE_WIDTH, EntityDisplayEvents, StateIndicator, Accordion, ButtonGroup, Container } from '../chunk-HJJIE4K5.js';
|
|
8
|
+
export { ALL_PRESETS, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, Alert, AnimatedCounter, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, Center, Chart, ChartLegend, Checkbox, ChoiceButton, CodeBlock, CombatLog, ComboCounter, ConditionalWrapper, ConfettiEffect, Container, ControlButton, CraftingRecipe, DIAMOND_TOP_Y, DPad, DamageNumber, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DetailPanel, DialogueBox, DialogueBubble, Divider, Drawer, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FLOOR_HEIGHT, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormField, FormSectionHeader, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GraphView, Grid, HStack, Heading, HealthBar, HealthPanel, Icon, InfiniteScrollSentinel, Input, InputGroup, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, Label, LawReferenceTooltip, Lightbox, LineChart, LoadingState, MapView, MarkdownContent, MasterDetail, Menu, Meter, MiniMap, Modal, NumberStepper, Overlay, PageHeader, Pagination, PlatformerCanvas, Popover, PowerupSlots, ProgressBar, ProgressDots, PullToRefresh, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ResourceBar, ResourceCounter, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, Skeleton, SlotContentRenderer, SortableList, Spacer, Spinner, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateIndicator, StatusDot, StatusEffect, SwipeableRow, Switch, TILE_HEIGHT, TILE_WIDTH, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, TimerDisplay, Toast, Tooltip, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UnitCommandBar, UploadDropZone, VStack, ViolationAlert, WaypointMarker, WizardNavigation, WizardProgress, XPBar, drawSprite, isoToScreen, pendulum, projectileMotion, screenToIso, springOscillator, useCamera, useImageCache } from '../chunk-HJJIE4K5.js';
|
|
9
|
+
import '../chunk-DKQN5FVU.js';
|
|
8
10
|
import { useTranslate } from '../chunk-WGJIL4YR.js';
|
|
9
11
|
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useDragReorder, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useInfiniteScroll, useLongPress, usePullToRefresh, useQuerySingleton, useSwipeGesture, useTranslate } from '../chunk-WGJIL4YR.js';
|
|
10
12
|
import { useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
11
13
|
export { useEmitEvent, useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
12
|
-
import '../chunk-DKQN5FVU.js';
|
|
13
14
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-3JGAROCW.js';
|
|
14
15
|
import { cn, getNestedValue, subscribeToVerification, getSummary, getBridgeHealth, getTransitions, getAllChecks } from '../chunk-WCTZ7WZX.js';
|
|
15
16
|
export { cn } from '../chunk-WCTZ7WZX.js';
|
|
16
17
|
import '../chunk-TSETXL2E.js';
|
|
17
18
|
import '../chunk-K2D5D3WK.js';
|
|
18
|
-
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
19
19
|
import { __publicField } from '../chunk-PKBMQBKP.js';
|
|
20
20
|
import * as React44 from 'react';
|
|
21
21
|
import React44__default, { createContext, useState, useCallback, useMemo, useEffect, useRef, useContext } from 'react';
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-
|
|
1
|
+
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-GTIAVPI5.js';
|
|
2
|
+
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
2
3
|
import '../chunk-3HJHHULT.js';
|
|
3
4
|
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useDragReorder, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useInfiniteScroll, useLongPress, usePullToRefresh, useQuerySingleton, useSwipeGesture, useTranslate } from '../chunk-WGJIL4YR.js';
|
|
4
5
|
export { useEmitEvent, useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
5
6
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-3JGAROCW.js';
|
|
6
7
|
import '../chunk-TSETXL2E.js';
|
|
7
|
-
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
8
8
|
import '../chunk-PKBMQBKP.js';
|
package/dist/providers/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { FetchedDataContext, FetchedDataProvider, OfflineModeProvider, OrbitalProvider, VerificationProvider, useFetchedData, useFetchedDataContext, useFetchedEntity, useOfflineMode, useOptionalOfflineMode } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { FetchedDataContext, FetchedDataProvider, OfflineModeProvider, OrbitalProvider, VerificationProvider, useFetchedData, useFetchedDataContext, useFetchedEntity, useOfflineMode, useOptionalOfflineMode } from '../chunk-AX45OCIB.js';
|
|
2
|
+
import '../chunk-HJJIE4K5.js';
|
|
3
|
+
import '../chunk-DKQN5FVU.js';
|
|
3
4
|
export { SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-WGJIL4YR.js';
|
|
4
5
|
export { EventBusContext, EventBusProvider } from '../chunk-YXZM3WCF.js';
|
|
5
|
-
import '../chunk-DKQN5FVU.js';
|
|
6
6
|
import '../chunk-3JGAROCW.js';
|
|
7
7
|
import '../chunk-WCTZ7WZX.js';
|
|
8
8
|
import '../chunk-TSETXL2E.js';
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import '../chunk-
|
|
1
|
+
import '../chunk-GTIAVPI5.js';
|
|
2
|
+
import '../chunk-N7MVUW4R.js';
|
|
2
3
|
import { registerTrait, unregisterTrait, updateTraitState } from '../chunk-42YQ6JVR.js';
|
|
3
4
|
import '../chunk-3HJHHULT.js';
|
|
4
|
-
import { useFetchedDataContext } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import { useFetchedDataContext } from '../chunk-AX45OCIB.js';
|
|
6
|
+
import '../chunk-HJJIE4K5.js';
|
|
7
|
+
import '../chunk-DKQN5FVU.js';
|
|
6
8
|
import '../chunk-WGJIL4YR.js';
|
|
7
9
|
import { useEventBus } from '../chunk-YXZM3WCF.js';
|
|
8
|
-
import '../chunk-DKQN5FVU.js';
|
|
9
10
|
import '../chunk-3JGAROCW.js';
|
|
10
11
|
import { recordTransition } from '../chunk-WCTZ7WZX.js';
|
|
11
12
|
import '../chunk-TSETXL2E.js';
|
|
12
13
|
import '../chunk-K2D5D3WK.js';
|
|
13
|
-
import '../chunk-N7MVUW4R.js';
|
|
14
14
|
import '../chunk-PKBMQBKP.js';
|
|
15
15
|
import { createContext, useMemo, useContext, useState, useRef, useEffect, useCallback } from 'react';
|
|
16
16
|
import { isCircuitEvent, schemaToIR, getPage, clearSchemaCache as clearSchemaCache$1 } from '@almadar/core';
|
package/package.json
CHANGED
package/themes/index.css
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* browser-default borders/backgrounds on raw HTML elements. This scoped
|
|
14
14
|
* reset normalizes them inside themed containers and the portal root.
|
|
15
15
|
*/
|
|
16
|
-
[data-theme] button,
|
|
17
|
-
#ui-slot-portal-root button {
|
|
16
|
+
:where([data-theme]) button,
|
|
17
|
+
:where(#ui-slot-portal-root) button {
|
|
18
18
|
border: 0;
|
|
19
19
|
background: transparent;
|
|
20
20
|
padding: 0;
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
[data-theme] *,
|
|
27
|
-
[data-theme] *::before,
|
|
28
|
-
[data-theme] *::after,
|
|
29
|
-
#ui-slot-portal-root *,
|
|
30
|
-
#ui-slot-portal-root *::before,
|
|
31
|
-
#ui-slot-portal-root *::after {
|
|
26
|
+
:where([data-theme]) *,
|
|
27
|
+
:where([data-theme]) *::before,
|
|
28
|
+
:where([data-theme]) *::after,
|
|
29
|
+
:where(#ui-slot-portal-root) *,
|
|
30
|
+
:where(#ui-slot-portal-root) *::before,
|
|
31
|
+
:where(#ui-slot-portal-root) *::after {
|
|
32
32
|
box-sizing: border-box;
|
|
33
33
|
border-width: 0;
|
|
34
34
|
border-style: solid;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { subscribe, getSnapshot, clearEntities, removeEntity, updateSingleton, updateEntity, spawnEntity, getSingleton, getAllEntities, getByType, getEntity } from './chunk-N7MVUW4R.js';
|
|
1
2
|
import { apiClient } from './chunk-3HJHHULT.js';
|
|
2
3
|
import { SelectionContext, entityDataKeys, useEntityList } from './chunk-WGJIL4YR.js';
|
|
3
4
|
import { useEventBus } from './chunk-YXZM3WCF.js';
|
|
4
|
-
import { subscribe, getSnapshot, clearEntities, removeEntity, updateSingleton, updateEntity, spawnEntity, getSingleton, getAllEntities, getByType, getEntity } from './chunk-N7MVUW4R.js';
|
|
5
5
|
import { useCallback, useState, useEffect, useMemo, useContext, useSyncExternalStore, useRef } from 'react';
|
|
6
6
|
import { useQueryClient, useMutation, useQuery } from '@tanstack/react-query';
|
|
7
7
|
|