@almadar/ui 2.12.3 → 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-TVP75XPM.js → chunk-AX45OCIB.js} +1 -1
- package/dist/{chunk-JDISOWHE.js → chunk-HJJIE4K5.js} +161 -22
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.js +2 -2
- package/dist/providers/index.js +2 -2
- package/dist/runtime/index.js +2 -2
- package/package.json +1 -1
- package/themes/index.css +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SuspenseConfigProvider } from './chunk-
|
|
1
|
+
import { SuspenseConfigProvider } from './chunk-HJJIE4K5.js';
|
|
2
2
|
import { ThemeProvider } from './chunk-DKQN5FVU.js';
|
|
3
3
|
import { SelectionProvider, EntityDataProvider } from './chunk-WGJIL4YR.js';
|
|
4
4
|
import { useEventBus, EventBusProvider } from './chunk-YXZM3WCF.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 = [],
|
|
@@ -10335,15 +10330,29 @@ function IsometricCanvas({
|
|
|
10335
10330
|
const observer = new ResizeObserver((entries) => {
|
|
10336
10331
|
const entry = entries[0];
|
|
10337
10332
|
if (entry) {
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10333
|
+
const w = Math.round(entry.contentRect.width) || 800;
|
|
10334
|
+
const h = Math.round(entry.contentRect.height) || 600;
|
|
10335
|
+
setViewportSize((prev) => {
|
|
10336
|
+
if (Math.abs(prev.width - w) < 2 && Math.abs(prev.height - h) < 2) return prev;
|
|
10337
|
+
return { width: w, height: h };
|
|
10341
10338
|
});
|
|
10342
10339
|
}
|
|
10343
10340
|
});
|
|
10344
10341
|
observer.observe(el);
|
|
10345
10342
|
return () => observer.disconnect();
|
|
10346
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
|
+
);
|
|
10347
10356
|
const sortedTiles = useMemo(() => {
|
|
10348
10357
|
const tiles = [...tilesProp];
|
|
10349
10358
|
tiles.sort((a, b) => {
|
|
@@ -10422,7 +10431,7 @@ function IsometricCanvas({
|
|
|
10422
10431
|
if (backgroundImage) urls.push(backgroundImage);
|
|
10423
10432
|
return [...new Set(urls.filter(Boolean))];
|
|
10424
10433
|
}, [sortedTiles, features, units, getTerrainSprite, getFeatureSprite, getUnitSprite, effectSpriteUrls, backgroundImage, assetManifest, resolveManifestUrl]);
|
|
10425
|
-
const { getImage } = useImageCache(spriteUrls);
|
|
10434
|
+
const { getImage, pendingCount } = useImageCache(spriteUrls);
|
|
10426
10435
|
useEffect(() => {
|
|
10427
10436
|
if (typeof window === "undefined") return;
|
|
10428
10437
|
const canvas = canvasRef.current;
|
|
@@ -10851,7 +10860,7 @@ function IsometricCanvas({
|
|
|
10851
10860
|
};
|
|
10852
10861
|
}, [selectedUnitId, units, scale, baseOffsetX, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, viewportSize, targetCameraRef]);
|
|
10853
10862
|
useEffect(() => {
|
|
10854
|
-
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;
|
|
10855
10864
|
draw(animTimeRef.current);
|
|
10856
10865
|
if (!hasAnimations) return;
|
|
10857
10866
|
let running = true;
|
|
@@ -10867,7 +10876,7 @@ function IsometricCanvas({
|
|
|
10867
10876
|
running = false;
|
|
10868
10877
|
cancelAnimationFrame(rafIdRef.current);
|
|
10869
10878
|
};
|
|
10870
|
-
}, [draw, units.length, validMoves.length, attackTargets.length, selectedUnitId, hasActiveEffects2, lerpToTarget, targetCameraRef]);
|
|
10879
|
+
}, [draw, units.length, validMoves.length, attackTargets.length, selectedUnitId, hasActiveEffects2, pendingCount, lerpToTarget, targetCameraRef]);
|
|
10871
10880
|
const handleMouseMoveWithCamera = useCallback((e) => {
|
|
10872
10881
|
if (enableCamera) {
|
|
10873
10882
|
const wasPanning = handleMouseMove(e, () => draw(animTimeRef.current));
|
|
@@ -18288,6 +18297,7 @@ function CustomPattern({
|
|
|
18288
18297
|
}
|
|
18289
18298
|
CustomPattern.displayName = "CustomPattern";
|
|
18290
18299
|
var SuspenseConfigContext = createContext({ enabled: false });
|
|
18300
|
+
var SlotContainedContext = createContext(false);
|
|
18291
18301
|
function SuspenseConfigProvider({
|
|
18292
18302
|
config,
|
|
18293
18303
|
children
|
|
@@ -18469,6 +18479,102 @@ var PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
|
|
|
18469
18479
|
"custom"
|
|
18470
18480
|
// Custom patterns support nested children
|
|
18471
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
|
+
}
|
|
18472
18578
|
function UISlotComponent({
|
|
18473
18579
|
slot,
|
|
18474
18580
|
portal = false,
|
|
@@ -18480,12 +18586,25 @@ function UISlotComponent({
|
|
|
18480
18586
|
}) {
|
|
18481
18587
|
const { slots, clear } = useUISlots();
|
|
18482
18588
|
const suspenseConfig = useContext(SuspenseConfigContext);
|
|
18589
|
+
const contained = useContext(SlotContainedContext);
|
|
18483
18590
|
const content = slots[slot];
|
|
18484
18591
|
if (children !== void 0) {
|
|
18485
18592
|
if (pattern === "clear") {
|
|
18486
18593
|
return null;
|
|
18487
18594
|
}
|
|
18488
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
|
+
}
|
|
18489
18608
|
return /* @__PURE__ */ jsx(CompiledPortal, { slot, className, pattern, sourceTrait, children });
|
|
18490
18609
|
}
|
|
18491
18610
|
return /* @__PURE__ */ jsx(
|
|
@@ -18515,6 +18634,9 @@ function UISlotComponent({
|
|
|
18515
18634
|
clear(slot);
|
|
18516
18635
|
};
|
|
18517
18636
|
if (portal) {
|
|
18637
|
+
if (contained) {
|
|
18638
|
+
return renderContainedPortal(slot, content, handleDismiss);
|
|
18639
|
+
}
|
|
18518
18640
|
return /* @__PURE__ */ jsx(
|
|
18519
18641
|
SlotPortal,
|
|
18520
18642
|
{
|
|
@@ -18763,12 +18885,18 @@ function SlotContentRenderer({
|
|
|
18763
18885
|
}
|
|
18764
18886
|
function UISlotRenderer({
|
|
18765
18887
|
includeHud = false,
|
|
18888
|
+
hudMode = "fixed",
|
|
18766
18889
|
includeFloating = false,
|
|
18767
18890
|
className,
|
|
18768
18891
|
suspense
|
|
18769
18892
|
}) {
|
|
18893
|
+
const isContained = hudMode === "inline";
|
|
18770
18894
|
const suspenseConfig = suspense === true ? { enabled: true } : suspense && typeof suspense === "object" ? suspense : { enabled: false };
|
|
18771
|
-
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: [
|
|
18772
18900
|
/* @__PURE__ */ jsx(UISlotComponent, { slot: "sidebar", className: "ui-slot-sidebar" }),
|
|
18773
18901
|
/* @__PURE__ */ jsx(UISlotComponent, { slot: "main", className: "ui-slot-main flex-1" }),
|
|
18774
18902
|
/* @__PURE__ */ jsx(UISlotComponent, { slot: "modal", portal: true }),
|
|
@@ -18781,23 +18909,34 @@ function UISlotRenderer({
|
|
|
18781
18909
|
UISlotComponent,
|
|
18782
18910
|
{
|
|
18783
18911
|
slot: "hud-top",
|
|
18784
|
-
className: "fixed top-0 inset-x-0 z-40"
|
|
18912
|
+
className: isContained ? "sticky top-0 inset-x-0 z-40" : "fixed top-0 inset-x-0 z-40"
|
|
18785
18913
|
}
|
|
18786
18914
|
),
|
|
18787
18915
|
/* @__PURE__ */ jsx(
|
|
18788
18916
|
UISlotComponent,
|
|
18789
18917
|
{
|
|
18790
18918
|
slot: "hud-bottom",
|
|
18791
|
-
className: "fixed bottom-0 inset-x-0 z-40"
|
|
18919
|
+
className: isContained ? "sticky bottom-0 inset-x-0 z-40" : "fixed bottom-0 inset-x-0 z-40"
|
|
18792
18920
|
}
|
|
18793
18921
|
)
|
|
18794
18922
|
] }),
|
|
18795
|
-
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
|
+
)
|
|
18796
18931
|
] });
|
|
18932
|
+
let wrapped = content;
|
|
18797
18933
|
if (suspenseConfig.enabled) {
|
|
18798
|
-
|
|
18934
|
+
wrapped = /* @__PURE__ */ jsx(SuspenseConfigProvider, { config: suspenseConfig, children: wrapped });
|
|
18935
|
+
}
|
|
18936
|
+
if (isContained) {
|
|
18937
|
+
wrapped = /* @__PURE__ */ jsx(SlotContainedContext.Provider, { value: true, children: wrapped });
|
|
18799
18938
|
}
|
|
18800
|
-
return
|
|
18939
|
+
return wrapped;
|
|
18801
18940
|
}
|
|
18802
18941
|
UISlotRenderer.displayName = "UISlotRenderer";
|
|
18803
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
|
}
|
|
@@ -8861,6 +8861,8 @@ declare function SlotContentRenderer({ content, onDismiss, }: SlotContentRendere
|
|
|
8861
8861
|
interface UISlotRendererProps {
|
|
8862
8862
|
/** Include HUD slots */
|
|
8863
8863
|
includeHud?: boolean;
|
|
8864
|
+
/** HUD positioning mode: 'fixed' (default, viewport-relative) or 'inline' (container-relative, uses sticky) */
|
|
8865
|
+
hudMode?: 'fixed' | 'inline';
|
|
8864
8866
|
/** Include floating slot */
|
|
8865
8867
|
includeFloating?: boolean;
|
|
8866
8868
|
/** Additional class name for the container */
|
|
@@ -8894,7 +8896,7 @@ interface UISlotRendererProps {
|
|
|
8894
8896
|
* }
|
|
8895
8897
|
* ```
|
|
8896
8898
|
*/
|
|
8897
|
-
declare function UISlotRenderer({ includeHud, includeFloating, className, suspense, }: UISlotRendererProps): React__default.ReactElement;
|
|
8899
|
+
declare function UISlotRenderer({ includeHud, hudMode, includeFloating, className, suspense, }: UISlotRendererProps): React__default.ReactElement;
|
|
8898
8900
|
declare namespace UISlotRenderer {
|
|
8899
8901
|
var displayName: string;
|
|
8900
8902
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -4,8 +4,8 @@ export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitH
|
|
|
4
4
|
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
5
5
|
import { subscribeToTraitChanges, getAllTraits } from '../chunk-42YQ6JVR.js';
|
|
6
6
|
import '../chunk-3HJHHULT.js';
|
|
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-
|
|
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-
|
|
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
9
|
import '../chunk-DKQN5FVU.js';
|
|
10
10
|
import { useTranslate } from '../chunk-WGJIL4YR.js';
|
|
11
11
|
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useDragReorder, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useInfiniteScroll, useLongPress, usePullToRefresh, useQuerySingleton, useSwipeGesture, useTranslate } from '../chunk-WGJIL4YR.js';
|
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
3
|
import '../chunk-DKQN5FVU.js';
|
|
4
4
|
export { SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-WGJIL4YR.js';
|
|
5
5
|
export { EventBusContext, EventBusProvider } from '../chunk-YXZM3WCF.js';
|
package/dist/runtime/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import '../chunk-GTIAVPI5.js';
|
|
|
2
2
|
import '../chunk-N7MVUW4R.js';
|
|
3
3
|
import { registerTrait, unregisterTrait, updateTraitState } from '../chunk-42YQ6JVR.js';
|
|
4
4
|
import '../chunk-3HJHHULT.js';
|
|
5
|
-
import { useFetchedDataContext } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import { useFetchedDataContext } from '../chunk-AX45OCIB.js';
|
|
6
|
+
import '../chunk-HJJIE4K5.js';
|
|
7
7
|
import '../chunk-DKQN5FVU.js';
|
|
8
8
|
import '../chunk-WGJIL4YR.js';
|
|
9
9
|
import { useEventBus } from '../chunk-YXZM3WCF.js';
|
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;
|