@almadar/ui 2.24.3 → 2.24.4
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/components/index.cjs +16 -12
- package/dist/components/index.js +16 -12
- package/dist/components/organisms/game/three/index.cjs +2 -2
- package/dist/components/organisms/game/three/index.js +2 -2
- package/dist/marketing/index.cjs +1 -1
- package/dist/marketing/index.js +1 -1
- package/dist/providers/index.cjs +4 -2
- package/dist/providers/index.js +4 -2
- package/dist/runtime/index.cjs +15 -11
- package/dist/runtime/index.js +15 -11
- package/package.json +1 -1
- package/themes/wireframe.css +5 -5
|
@@ -3003,6 +3003,7 @@ var TypewriterText = ({
|
|
|
3003
3003
|
className,
|
|
3004
3004
|
onComplete
|
|
3005
3005
|
}) => {
|
|
3006
|
+
const safeText = typeof text === "string" ? text : String(text ?? "");
|
|
3006
3007
|
const [charCount, setCharCount] = React88.useState(0);
|
|
3007
3008
|
const [started, setStarted] = React88.useState(startDelay === 0);
|
|
3008
3009
|
const onCompleteRef = React88.useRef(onComplete);
|
|
@@ -3026,14 +3027,14 @@ var TypewriterText = ({
|
|
|
3026
3027
|
}, [text]);
|
|
3027
3028
|
React88.useEffect(() => {
|
|
3028
3029
|
if (!started) return void 0;
|
|
3029
|
-
if (charCount >=
|
|
3030
|
+
if (charCount >= safeText.length) {
|
|
3030
3031
|
onCompleteRef.current?.();
|
|
3031
3032
|
return void 0;
|
|
3032
3033
|
}
|
|
3033
3034
|
const interval = window.setInterval(() => {
|
|
3034
3035
|
setCharCount((prev) => {
|
|
3035
3036
|
const next = prev + 1;
|
|
3036
|
-
if (next >=
|
|
3037
|
+
if (next >= safeText.length) {
|
|
3037
3038
|
window.clearInterval(interval);
|
|
3038
3039
|
}
|
|
3039
3040
|
return next;
|
|
@@ -3043,8 +3044,8 @@ var TypewriterText = ({
|
|
|
3043
3044
|
window.clearInterval(interval);
|
|
3044
3045
|
};
|
|
3045
3046
|
}, [started, text, speed, charCount]);
|
|
3046
|
-
const isComplete = charCount >=
|
|
3047
|
-
const displayedText =
|
|
3047
|
+
const isComplete = charCount >= safeText.length;
|
|
3048
|
+
const displayedText = safeText.slice(0, charCount);
|
|
3048
3049
|
return /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "body", className: cn("inline", className), children: [
|
|
3049
3050
|
displayedText,
|
|
3050
3051
|
!isComplete && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8255,6 +8256,7 @@ WizardNavigation.displayName = "WizardNavigation";
|
|
|
8255
8256
|
var MarkdownContent = React88__namespace.default.memo(
|
|
8256
8257
|
({ content, direction, className }) => {
|
|
8257
8258
|
const { t: _t } = useTranslate();
|
|
8259
|
+
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
8258
8260
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8259
8261
|
Box,
|
|
8260
8262
|
{
|
|
@@ -8344,7 +8346,7 @@ var MarkdownContent = React88__namespace.default.memo(
|
|
|
8344
8346
|
);
|
|
8345
8347
|
}
|
|
8346
8348
|
},
|
|
8347
|
-
children:
|
|
8349
|
+
children: safeContent
|
|
8348
8350
|
}
|
|
8349
8351
|
)
|
|
8350
8352
|
}
|
|
@@ -8355,13 +8357,14 @@ var MarkdownContent = React88__namespace.default.memo(
|
|
|
8355
8357
|
MarkdownContent.displayName = "MarkdownContent";
|
|
8356
8358
|
var CodeBlock = React88__namespace.default.memo(
|
|
8357
8359
|
({
|
|
8358
|
-
code,
|
|
8360
|
+
code: rawCode,
|
|
8359
8361
|
language = "text",
|
|
8360
8362
|
showCopyButton = true,
|
|
8361
8363
|
showLanguageBadge = true,
|
|
8362
8364
|
maxHeight = "60vh",
|
|
8363
8365
|
className
|
|
8364
8366
|
}) => {
|
|
8367
|
+
const code = typeof rawCode === "string" ? rawCode : String(rawCode ?? "");
|
|
8365
8368
|
const eventBus = useEventBus();
|
|
8366
8369
|
const { t: _t } = useTranslate();
|
|
8367
8370
|
const scrollRef = React88.useRef(null);
|
|
@@ -10700,21 +10703,22 @@ function CombatLog({
|
|
|
10700
10703
|
] })
|
|
10701
10704
|
] }) }),
|
|
10702
10705
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { ref: scrollRef, overflow: "auto", className: "flex-1 max-h-64", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "md", className: "text-center opacity-50", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", children: "No events yet" }) }) : /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "xs", className: "space-y-1", children: visibleEvents.map((event) => {
|
|
10703
|
-
const
|
|
10704
|
-
const
|
|
10706
|
+
const eventType = event.type && event.type in eventIcons ? event.type : "attack";
|
|
10707
|
+
const EventIcon = eventIcons[eventType];
|
|
10708
|
+
const colorClass = eventColors[eventType];
|
|
10705
10709
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10706
10710
|
Box,
|
|
10707
10711
|
{
|
|
10708
10712
|
display: "flex",
|
|
10709
10713
|
padding: "xs",
|
|
10710
10714
|
rounded: "sm",
|
|
10711
|
-
className: cn("items-start gap-2 hover:bg-[var(--color-muted)] transition-colors",
|
|
10715
|
+
className: cn("items-start gap-2 hover:bg-[var(--color-muted)] transition-colors", eventType === "death" && "opacity-60"),
|
|
10712
10716
|
children: [
|
|
10713
10717
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("flex-shrink-0 mt-0.5", colorClass), children: /* @__PURE__ */ jsxRuntime.jsx(EventIcon, { className: "h-4 w-4" }) }),
|
|
10714
10718
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex-1 min-w-0", children: [
|
|
10715
10719
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "block", children: event.message }),
|
|
10716
|
-
event.value !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: eventBadgeVariants[
|
|
10717
|
-
|
|
10720
|
+
event.value !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: eventBadgeVariants[eventType], size: "sm", className: "mt-1", children: [
|
|
10721
|
+
eventType === "heal" ? "+" : eventType === "attack" ? "-" : "",
|
|
10718
10722
|
event.value
|
|
10719
10723
|
] })
|
|
10720
10724
|
] }),
|
|
@@ -15426,7 +15430,7 @@ var HeroSection = ({
|
|
|
15426
15430
|
src: image.src,
|
|
15427
15431
|
alt: image.alt,
|
|
15428
15432
|
className: cn(
|
|
15429
|
-
imagePosition === "right" ? "
|
|
15433
|
+
imagePosition === "right" ? "w-full max-w-[280px] max-h-[280px]" : "w-full min-h-[400px]"
|
|
15430
15434
|
)
|
|
15431
15435
|
}
|
|
15432
15436
|
);
|
package/dist/components/index.js
CHANGED
|
@@ -2973,6 +2973,7 @@ var TypewriterText = ({
|
|
|
2973
2973
|
className,
|
|
2974
2974
|
onComplete
|
|
2975
2975
|
}) => {
|
|
2976
|
+
const safeText = typeof text === "string" ? text : String(text ?? "");
|
|
2976
2977
|
const [charCount, setCharCount] = useState(0);
|
|
2977
2978
|
const [started, setStarted] = useState(startDelay === 0);
|
|
2978
2979
|
const onCompleteRef = useRef(onComplete);
|
|
@@ -2996,14 +2997,14 @@ var TypewriterText = ({
|
|
|
2996
2997
|
}, [text]);
|
|
2997
2998
|
useEffect(() => {
|
|
2998
2999
|
if (!started) return void 0;
|
|
2999
|
-
if (charCount >=
|
|
3000
|
+
if (charCount >= safeText.length) {
|
|
3000
3001
|
onCompleteRef.current?.();
|
|
3001
3002
|
return void 0;
|
|
3002
3003
|
}
|
|
3003
3004
|
const interval = window.setInterval(() => {
|
|
3004
3005
|
setCharCount((prev) => {
|
|
3005
3006
|
const next = prev + 1;
|
|
3006
|
-
if (next >=
|
|
3007
|
+
if (next >= safeText.length) {
|
|
3007
3008
|
window.clearInterval(interval);
|
|
3008
3009
|
}
|
|
3009
3010
|
return next;
|
|
@@ -3013,8 +3014,8 @@ var TypewriterText = ({
|
|
|
3013
3014
|
window.clearInterval(interval);
|
|
3014
3015
|
};
|
|
3015
3016
|
}, [started, text, speed, charCount]);
|
|
3016
|
-
const isComplete = charCount >=
|
|
3017
|
-
const displayedText =
|
|
3017
|
+
const isComplete = charCount >= safeText.length;
|
|
3018
|
+
const displayedText = safeText.slice(0, charCount);
|
|
3018
3019
|
return /* @__PURE__ */ jsxs(Typography, { variant: "body", className: cn("inline", className), children: [
|
|
3019
3020
|
displayedText,
|
|
3020
3021
|
!isComplete && /* @__PURE__ */ jsx(
|
|
@@ -8225,6 +8226,7 @@ WizardNavigation.displayName = "WizardNavigation";
|
|
|
8225
8226
|
var MarkdownContent = React88__default.memo(
|
|
8226
8227
|
({ content, direction, className }) => {
|
|
8227
8228
|
const { t: _t } = useTranslate();
|
|
8229
|
+
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
8228
8230
|
return /* @__PURE__ */ jsx(
|
|
8229
8231
|
Box,
|
|
8230
8232
|
{
|
|
@@ -8314,7 +8316,7 @@ var MarkdownContent = React88__default.memo(
|
|
|
8314
8316
|
);
|
|
8315
8317
|
}
|
|
8316
8318
|
},
|
|
8317
|
-
children:
|
|
8319
|
+
children: safeContent
|
|
8318
8320
|
}
|
|
8319
8321
|
)
|
|
8320
8322
|
}
|
|
@@ -8325,13 +8327,14 @@ var MarkdownContent = React88__default.memo(
|
|
|
8325
8327
|
MarkdownContent.displayName = "MarkdownContent";
|
|
8326
8328
|
var CodeBlock = React88__default.memo(
|
|
8327
8329
|
({
|
|
8328
|
-
code,
|
|
8330
|
+
code: rawCode,
|
|
8329
8331
|
language = "text",
|
|
8330
8332
|
showCopyButton = true,
|
|
8331
8333
|
showLanguageBadge = true,
|
|
8332
8334
|
maxHeight = "60vh",
|
|
8333
8335
|
className
|
|
8334
8336
|
}) => {
|
|
8337
|
+
const code = typeof rawCode === "string" ? rawCode : String(rawCode ?? "");
|
|
8335
8338
|
const eventBus = useEventBus();
|
|
8336
8339
|
const { t: _t } = useTranslate();
|
|
8337
8340
|
const scrollRef = useRef(null);
|
|
@@ -10670,21 +10673,22 @@ function CombatLog({
|
|
|
10670
10673
|
] })
|
|
10671
10674
|
] }) }),
|
|
10672
10675
|
/* @__PURE__ */ jsx(Box, { ref: scrollRef, overflow: "auto", className: "flex-1 max-h-64", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsx(Box, { padding: "md", className: "text-center opacity-50", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "No events yet" }) }) : /* @__PURE__ */ jsx(Box, { padding: "xs", className: "space-y-1", children: visibleEvents.map((event) => {
|
|
10673
|
-
const
|
|
10674
|
-
const
|
|
10676
|
+
const eventType = event.type && event.type in eventIcons ? event.type : "attack";
|
|
10677
|
+
const EventIcon = eventIcons[eventType];
|
|
10678
|
+
const colorClass = eventColors[eventType];
|
|
10675
10679
|
return /* @__PURE__ */ jsxs(
|
|
10676
10680
|
Box,
|
|
10677
10681
|
{
|
|
10678
10682
|
display: "flex",
|
|
10679
10683
|
padding: "xs",
|
|
10680
10684
|
rounded: "sm",
|
|
10681
|
-
className: cn("items-start gap-2 hover:bg-[var(--color-muted)] transition-colors",
|
|
10685
|
+
className: cn("items-start gap-2 hover:bg-[var(--color-muted)] transition-colors", eventType === "death" && "opacity-60"),
|
|
10682
10686
|
children: [
|
|
10683
10687
|
/* @__PURE__ */ jsx(Box, { className: cn("flex-shrink-0 mt-0.5", colorClass), children: /* @__PURE__ */ jsx(EventIcon, { className: "h-4 w-4" }) }),
|
|
10684
10688
|
/* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0", children: [
|
|
10685
10689
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "block", children: event.message }),
|
|
10686
|
-
event.value !== void 0 && /* @__PURE__ */ jsxs(Badge, { variant: eventBadgeVariants[
|
|
10687
|
-
|
|
10690
|
+
event.value !== void 0 && /* @__PURE__ */ jsxs(Badge, { variant: eventBadgeVariants[eventType], size: "sm", className: "mt-1", children: [
|
|
10691
|
+
eventType === "heal" ? "+" : eventType === "attack" ? "-" : "",
|
|
10688
10692
|
event.value
|
|
10689
10693
|
] })
|
|
10690
10694
|
] }),
|
|
@@ -15396,7 +15400,7 @@ var HeroSection = ({
|
|
|
15396
15400
|
src: image.src,
|
|
15397
15401
|
alt: image.alt,
|
|
15398
15402
|
className: cn(
|
|
15399
|
-
imagePosition === "right" ? "
|
|
15403
|
+
imagePosition === "right" ? "w-full max-w-[280px] max-h-[280px]" : "w-full min-h-[400px]"
|
|
15400
15404
|
)
|
|
15401
15405
|
}
|
|
15402
15406
|
);
|
|
@@ -4204,7 +4204,7 @@ var Avl3DCrossWire = ({
|
|
|
4204
4204
|
}, [from, to]);
|
|
4205
4205
|
return /* @__PURE__ */ jsxRuntime.jsxs("group", { children: [
|
|
4206
4206
|
/* @__PURE__ */ jsxRuntime.jsxs("mesh", { children: [
|
|
4207
|
-
/* @__PURE__ */ jsxRuntime.jsx("tubeGeometry", { args:
|
|
4207
|
+
/* @__PURE__ */ jsxRuntime.jsx("tubeGeometry", { args: tubeArgs }),
|
|
4208
4208
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4209
4209
|
"meshStandardMaterial",
|
|
4210
4210
|
{
|
|
@@ -4917,7 +4917,7 @@ var Avl3DTransitionArc = ({
|
|
|
4917
4917
|
document.body.style.cursor = "auto";
|
|
4918
4918
|
},
|
|
4919
4919
|
children: [
|
|
4920
|
-
/* @__PURE__ */ jsxRuntime.jsx("tubeGeometry", { args:
|
|
4920
|
+
/* @__PURE__ */ jsxRuntime.jsx("tubeGeometry", { args: tubeArgs }),
|
|
4921
4921
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4922
4922
|
"meshStandardMaterial",
|
|
4923
4923
|
{
|
|
@@ -4180,7 +4180,7 @@ var Avl3DCrossWire = ({
|
|
|
4180
4180
|
}, [from, to]);
|
|
4181
4181
|
return /* @__PURE__ */ jsxs("group", { children: [
|
|
4182
4182
|
/* @__PURE__ */ jsxs("mesh", { children: [
|
|
4183
|
-
/* @__PURE__ */ jsx("tubeGeometry", { args:
|
|
4183
|
+
/* @__PURE__ */ jsx("tubeGeometry", { args: tubeArgs }),
|
|
4184
4184
|
/* @__PURE__ */ jsx(
|
|
4185
4185
|
"meshStandardMaterial",
|
|
4186
4186
|
{
|
|
@@ -4893,7 +4893,7 @@ var Avl3DTransitionArc = ({
|
|
|
4893
4893
|
document.body.style.cursor = "auto";
|
|
4894
4894
|
},
|
|
4895
4895
|
children: [
|
|
4896
|
-
/* @__PURE__ */ jsx("tubeGeometry", { args:
|
|
4896
|
+
/* @__PURE__ */ jsx("tubeGeometry", { args: tubeArgs }),
|
|
4897
4897
|
/* @__PURE__ */ jsx(
|
|
4898
4898
|
"meshStandardMaterial",
|
|
4899
4899
|
{
|
package/dist/marketing/index.cjs
CHANGED
|
@@ -3687,7 +3687,7 @@ var HeroSection = ({
|
|
|
3687
3687
|
src: image.src,
|
|
3688
3688
|
alt: image.alt,
|
|
3689
3689
|
className: cn(
|
|
3690
|
-
imagePosition === "right" ? "
|
|
3690
|
+
imagePosition === "right" ? "w-full max-w-[280px] max-h-[280px]" : "w-full min-h-[400px]"
|
|
3691
3691
|
)
|
|
3692
3692
|
}
|
|
3693
3693
|
);
|
package/dist/marketing/index.js
CHANGED
|
@@ -3663,7 +3663,7 @@ var HeroSection = ({
|
|
|
3663
3663
|
src: image.src,
|
|
3664
3664
|
alt: image.alt,
|
|
3665
3665
|
className: cn(
|
|
3666
|
-
imagePosition === "right" ? "
|
|
3666
|
+
imagePosition === "right" ? "w-full max-w-[280px] max-h-[280px]" : "w-full min-h-[400px]"
|
|
3667
3667
|
)
|
|
3668
3668
|
}
|
|
3669
3669
|
);
|
package/dist/providers/index.cjs
CHANGED
|
@@ -2796,6 +2796,7 @@ exposeOnWindow();
|
|
|
2796
2796
|
var MarkdownContent = React110__namespace.default.memo(
|
|
2797
2797
|
({ content, direction, className }) => {
|
|
2798
2798
|
const { t: _t } = useTranslate();
|
|
2799
|
+
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
2799
2800
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2800
2801
|
Box,
|
|
2801
2802
|
{
|
|
@@ -2885,7 +2886,7 @@ var MarkdownContent = React110__namespace.default.memo(
|
|
|
2885
2886
|
);
|
|
2886
2887
|
}
|
|
2887
2888
|
},
|
|
2888
|
-
children:
|
|
2889
|
+
children: safeContent
|
|
2889
2890
|
}
|
|
2890
2891
|
)
|
|
2891
2892
|
}
|
|
@@ -2896,13 +2897,14 @@ var MarkdownContent = React110__namespace.default.memo(
|
|
|
2896
2897
|
MarkdownContent.displayName = "MarkdownContent";
|
|
2897
2898
|
var CodeBlock = React110__namespace.default.memo(
|
|
2898
2899
|
({
|
|
2899
|
-
code,
|
|
2900
|
+
code: rawCode,
|
|
2900
2901
|
language = "text",
|
|
2901
2902
|
showCopyButton = true,
|
|
2902
2903
|
showLanguageBadge = true,
|
|
2903
2904
|
maxHeight = "60vh",
|
|
2904
2905
|
className
|
|
2905
2906
|
}) => {
|
|
2907
|
+
const code = typeof rawCode === "string" ? rawCode : String(rawCode ?? "");
|
|
2906
2908
|
const eventBus = useEventBus();
|
|
2907
2909
|
const { t: _t } = useTranslate();
|
|
2908
2910
|
const scrollRef = React110.useRef(null);
|
package/dist/providers/index.js
CHANGED
|
@@ -2766,6 +2766,7 @@ exposeOnWindow();
|
|
|
2766
2766
|
var MarkdownContent = React110__default.memo(
|
|
2767
2767
|
({ content, direction, className }) => {
|
|
2768
2768
|
const { t: _t } = useTranslate();
|
|
2769
|
+
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
2769
2770
|
return /* @__PURE__ */ jsx(
|
|
2770
2771
|
Box,
|
|
2771
2772
|
{
|
|
@@ -2855,7 +2856,7 @@ var MarkdownContent = React110__default.memo(
|
|
|
2855
2856
|
);
|
|
2856
2857
|
}
|
|
2857
2858
|
},
|
|
2858
|
-
children:
|
|
2859
|
+
children: safeContent
|
|
2859
2860
|
}
|
|
2860
2861
|
)
|
|
2861
2862
|
}
|
|
@@ -2866,13 +2867,14 @@ var MarkdownContent = React110__default.memo(
|
|
|
2866
2867
|
MarkdownContent.displayName = "MarkdownContent";
|
|
2867
2868
|
var CodeBlock = React110__default.memo(
|
|
2868
2869
|
({
|
|
2869
|
-
code,
|
|
2870
|
+
code: rawCode,
|
|
2870
2871
|
language = "text",
|
|
2871
2872
|
showCopyButton = true,
|
|
2872
2873
|
showLanguageBadge = true,
|
|
2873
2874
|
maxHeight = "60vh",
|
|
2874
2875
|
className
|
|
2875
2876
|
}) => {
|
|
2877
|
+
const code = typeof rawCode === "string" ? rawCode : String(rawCode ?? "");
|
|
2876
2878
|
const eventBus = useEventBus();
|
|
2877
2879
|
const { t: _t } = useTranslate();
|
|
2878
2880
|
const scrollRef = useRef(null);
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -4826,6 +4826,7 @@ var TypewriterText = ({
|
|
|
4826
4826
|
className,
|
|
4827
4827
|
onComplete
|
|
4828
4828
|
}) => {
|
|
4829
|
+
const safeText = typeof text === "string" ? text : String(text ?? "");
|
|
4829
4830
|
const [charCount, setCharCount] = React114.useState(0);
|
|
4830
4831
|
const [started, setStarted] = React114.useState(startDelay === 0);
|
|
4831
4832
|
const onCompleteRef = React114.useRef(onComplete);
|
|
@@ -4849,14 +4850,14 @@ var TypewriterText = ({
|
|
|
4849
4850
|
}, [text]);
|
|
4850
4851
|
React114.useEffect(() => {
|
|
4851
4852
|
if (!started) return void 0;
|
|
4852
|
-
if (charCount >=
|
|
4853
|
+
if (charCount >= safeText.length) {
|
|
4853
4854
|
onCompleteRef.current?.();
|
|
4854
4855
|
return void 0;
|
|
4855
4856
|
}
|
|
4856
4857
|
const interval = window.setInterval(() => {
|
|
4857
4858
|
setCharCount((prev) => {
|
|
4858
4859
|
const next = prev + 1;
|
|
4859
|
-
if (next >=
|
|
4860
|
+
if (next >= safeText.length) {
|
|
4860
4861
|
window.clearInterval(interval);
|
|
4861
4862
|
}
|
|
4862
4863
|
return next;
|
|
@@ -4866,8 +4867,8 @@ var TypewriterText = ({
|
|
|
4866
4867
|
window.clearInterval(interval);
|
|
4867
4868
|
};
|
|
4868
4869
|
}, [started, text, speed, charCount]);
|
|
4869
|
-
const isComplete = charCount >=
|
|
4870
|
-
const displayedText =
|
|
4870
|
+
const isComplete = charCount >= safeText.length;
|
|
4871
|
+
const displayedText = safeText.slice(0, charCount);
|
|
4871
4872
|
return /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "body", className: cn("inline", className), children: [
|
|
4872
4873
|
displayedText,
|
|
4873
4874
|
!isComplete && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9253,6 +9254,7 @@ ScaledDiagram.displayName = "ScaledDiagram";
|
|
|
9253
9254
|
var MarkdownContent = React114__namespace.default.memo(
|
|
9254
9255
|
({ content, direction, className }) => {
|
|
9255
9256
|
const { t: _t } = useTranslate();
|
|
9257
|
+
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
9256
9258
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9257
9259
|
Box,
|
|
9258
9260
|
{
|
|
@@ -9342,7 +9344,7 @@ var MarkdownContent = React114__namespace.default.memo(
|
|
|
9342
9344
|
);
|
|
9343
9345
|
}
|
|
9344
9346
|
},
|
|
9345
|
-
children:
|
|
9347
|
+
children: safeContent
|
|
9346
9348
|
}
|
|
9347
9349
|
)
|
|
9348
9350
|
}
|
|
@@ -9353,13 +9355,14 @@ var MarkdownContent = React114__namespace.default.memo(
|
|
|
9353
9355
|
MarkdownContent.displayName = "MarkdownContent";
|
|
9354
9356
|
var CodeBlock = React114__namespace.default.memo(
|
|
9355
9357
|
({
|
|
9356
|
-
code,
|
|
9358
|
+
code: rawCode,
|
|
9357
9359
|
language = "text",
|
|
9358
9360
|
showCopyButton = true,
|
|
9359
9361
|
showLanguageBadge = true,
|
|
9360
9362
|
maxHeight = "60vh",
|
|
9361
9363
|
className
|
|
9362
9364
|
}) => {
|
|
9365
|
+
const code = typeof rawCode === "string" ? rawCode : String(rawCode ?? "");
|
|
9363
9366
|
const eventBus = useEventBus();
|
|
9364
9367
|
const { t: _t } = useTranslate();
|
|
9365
9368
|
const scrollRef = React114.useRef(null);
|
|
@@ -15301,21 +15304,22 @@ function CombatLog({
|
|
|
15301
15304
|
] })
|
|
15302
15305
|
] }) }),
|
|
15303
15306
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { ref: scrollRef, overflow: "auto", className: "flex-1 max-h-64", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "md", className: "text-center opacity-50", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", children: "No events yet" }) }) : /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: "xs", className: "space-y-1", children: visibleEvents.map((event) => {
|
|
15304
|
-
const
|
|
15305
|
-
const
|
|
15307
|
+
const eventType = event.type && event.type in eventIcons ? event.type : "attack";
|
|
15308
|
+
const EventIcon = eventIcons[eventType];
|
|
15309
|
+
const colorClass = eventColors[eventType];
|
|
15306
15310
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15307
15311
|
Box,
|
|
15308
15312
|
{
|
|
15309
15313
|
display: "flex",
|
|
15310
15314
|
padding: "xs",
|
|
15311
15315
|
rounded: "sm",
|
|
15312
|
-
className: cn("items-start gap-2 hover:bg-[var(--color-muted)] transition-colors",
|
|
15316
|
+
className: cn("items-start gap-2 hover:bg-[var(--color-muted)] transition-colors", eventType === "death" && "opacity-60"),
|
|
15313
15317
|
children: [
|
|
15314
15318
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("flex-shrink-0 mt-0.5", colorClass), children: /* @__PURE__ */ jsxRuntime.jsx(EventIcon, { className: "h-4 w-4" }) }),
|
|
15315
15319
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex-1 min-w-0", children: [
|
|
15316
15320
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "block", children: event.message }),
|
|
15317
|
-
event.value !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: eventBadgeVariants[
|
|
15318
|
-
|
|
15321
|
+
event.value !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: eventBadgeVariants[eventType], size: "sm", className: "mt-1", children: [
|
|
15322
|
+
eventType === "heal" ? "+" : eventType === "attack" ? "-" : "",
|
|
15319
15323
|
event.value
|
|
15320
15324
|
] })
|
|
15321
15325
|
] }),
|
package/dist/runtime/index.js
CHANGED
|
@@ -4796,6 +4796,7 @@ var TypewriterText = ({
|
|
|
4796
4796
|
className,
|
|
4797
4797
|
onComplete
|
|
4798
4798
|
}) => {
|
|
4799
|
+
const safeText = typeof text === "string" ? text : String(text ?? "");
|
|
4799
4800
|
const [charCount, setCharCount] = useState(0);
|
|
4800
4801
|
const [started, setStarted] = useState(startDelay === 0);
|
|
4801
4802
|
const onCompleteRef = useRef(onComplete);
|
|
@@ -4819,14 +4820,14 @@ var TypewriterText = ({
|
|
|
4819
4820
|
}, [text]);
|
|
4820
4821
|
useEffect(() => {
|
|
4821
4822
|
if (!started) return void 0;
|
|
4822
|
-
if (charCount >=
|
|
4823
|
+
if (charCount >= safeText.length) {
|
|
4823
4824
|
onCompleteRef.current?.();
|
|
4824
4825
|
return void 0;
|
|
4825
4826
|
}
|
|
4826
4827
|
const interval = window.setInterval(() => {
|
|
4827
4828
|
setCharCount((prev) => {
|
|
4828
4829
|
const next = prev + 1;
|
|
4829
|
-
if (next >=
|
|
4830
|
+
if (next >= safeText.length) {
|
|
4830
4831
|
window.clearInterval(interval);
|
|
4831
4832
|
}
|
|
4832
4833
|
return next;
|
|
@@ -4836,8 +4837,8 @@ var TypewriterText = ({
|
|
|
4836
4837
|
window.clearInterval(interval);
|
|
4837
4838
|
};
|
|
4838
4839
|
}, [started, text, speed, charCount]);
|
|
4839
|
-
const isComplete = charCount >=
|
|
4840
|
-
const displayedText =
|
|
4840
|
+
const isComplete = charCount >= safeText.length;
|
|
4841
|
+
const displayedText = safeText.slice(0, charCount);
|
|
4841
4842
|
return /* @__PURE__ */ jsxs(Typography, { variant: "body", className: cn("inline", className), children: [
|
|
4842
4843
|
displayedText,
|
|
4843
4844
|
!isComplete && /* @__PURE__ */ jsx(
|
|
@@ -9223,6 +9224,7 @@ ScaledDiagram.displayName = "ScaledDiagram";
|
|
|
9223
9224
|
var MarkdownContent = React114__default.memo(
|
|
9224
9225
|
({ content, direction, className }) => {
|
|
9225
9226
|
const { t: _t } = useTranslate();
|
|
9227
|
+
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
9226
9228
|
return /* @__PURE__ */ jsx(
|
|
9227
9229
|
Box,
|
|
9228
9230
|
{
|
|
@@ -9312,7 +9314,7 @@ var MarkdownContent = React114__default.memo(
|
|
|
9312
9314
|
);
|
|
9313
9315
|
}
|
|
9314
9316
|
},
|
|
9315
|
-
children:
|
|
9317
|
+
children: safeContent
|
|
9316
9318
|
}
|
|
9317
9319
|
)
|
|
9318
9320
|
}
|
|
@@ -9323,13 +9325,14 @@ var MarkdownContent = React114__default.memo(
|
|
|
9323
9325
|
MarkdownContent.displayName = "MarkdownContent";
|
|
9324
9326
|
var CodeBlock = React114__default.memo(
|
|
9325
9327
|
({
|
|
9326
|
-
code,
|
|
9328
|
+
code: rawCode,
|
|
9327
9329
|
language = "text",
|
|
9328
9330
|
showCopyButton = true,
|
|
9329
9331
|
showLanguageBadge = true,
|
|
9330
9332
|
maxHeight = "60vh",
|
|
9331
9333
|
className
|
|
9332
9334
|
}) => {
|
|
9335
|
+
const code = typeof rawCode === "string" ? rawCode : String(rawCode ?? "");
|
|
9333
9336
|
const eventBus = useEventBus();
|
|
9334
9337
|
const { t: _t } = useTranslate();
|
|
9335
9338
|
const scrollRef = useRef(null);
|
|
@@ -15271,21 +15274,22 @@ function CombatLog({
|
|
|
15271
15274
|
] })
|
|
15272
15275
|
] }) }),
|
|
15273
15276
|
/* @__PURE__ */ jsx(Box, { ref: scrollRef, overflow: "auto", className: "flex-1 max-h-64", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsx(Box, { padding: "md", className: "text-center opacity-50", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "No events yet" }) }) : /* @__PURE__ */ jsx(Box, { padding: "xs", className: "space-y-1", children: visibleEvents.map((event) => {
|
|
15274
|
-
const
|
|
15275
|
-
const
|
|
15277
|
+
const eventType = event.type && event.type in eventIcons ? event.type : "attack";
|
|
15278
|
+
const EventIcon = eventIcons[eventType];
|
|
15279
|
+
const colorClass = eventColors[eventType];
|
|
15276
15280
|
return /* @__PURE__ */ jsxs(
|
|
15277
15281
|
Box,
|
|
15278
15282
|
{
|
|
15279
15283
|
display: "flex",
|
|
15280
15284
|
padding: "xs",
|
|
15281
15285
|
rounded: "sm",
|
|
15282
|
-
className: cn("items-start gap-2 hover:bg-[var(--color-muted)] transition-colors",
|
|
15286
|
+
className: cn("items-start gap-2 hover:bg-[var(--color-muted)] transition-colors", eventType === "death" && "opacity-60"),
|
|
15283
15287
|
children: [
|
|
15284
15288
|
/* @__PURE__ */ jsx(Box, { className: cn("flex-shrink-0 mt-0.5", colorClass), children: /* @__PURE__ */ jsx(EventIcon, { className: "h-4 w-4" }) }),
|
|
15285
15289
|
/* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0", children: [
|
|
15286
15290
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "block", children: event.message }),
|
|
15287
|
-
event.value !== void 0 && /* @__PURE__ */ jsxs(Badge, { variant: eventBadgeVariants[
|
|
15288
|
-
|
|
15291
|
+
event.value !== void 0 && /* @__PURE__ */ jsxs(Badge, { variant: eventBadgeVariants[eventType], size: "sm", className: "mt-1", children: [
|
|
15292
|
+
eventType === "heal" ? "+" : eventType === "attack" ? "-" : "",
|
|
15289
15293
|
event.value
|
|
15290
15294
|
] })
|
|
15291
15295
|
] }),
|
package/package.json
CHANGED
package/themes/wireframe.css
CHANGED
|
@@ -138,11 +138,11 @@
|
|
|
138
138
|
--color-muted: #262626;
|
|
139
139
|
--color-muted-foreground: #a3a3a3;
|
|
140
140
|
|
|
141
|
-
--color-background: #
|
|
142
|
-
--color-foreground: #
|
|
143
|
-
--color-card: #
|
|
144
|
-
--color-card-foreground: #
|
|
145
|
-
--color-surface: #
|
|
141
|
+
--color-background: #111117;
|
|
142
|
+
--color-foreground: #f5f5f5;
|
|
143
|
+
--color-card: #1c1c22;
|
|
144
|
+
--color-card-foreground: #f5f5f5;
|
|
145
|
+
--color-surface: #28282e;
|
|
146
146
|
--color-border: #ffffff;
|
|
147
147
|
--color-input: #ffffff;
|
|
148
148
|
--color-ring: #ffffff;
|