@almadar/ui 4.51.15 → 4.52.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.
- package/dist/avl/index.cjs +1972 -1806
- package/dist/avl/index.js +726 -560
- package/dist/components/atoms/Aside.d.ts +15 -0
- package/dist/components/atoms/Dialog.d.ts +18 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/index.cjs +1555 -1410
- package/dist/components/index.js +532 -387
- package/dist/components/molecules/CalendarGrid.d.ts +14 -1
- package/dist/components/molecules/SidePanel.d.ts +7 -2
- package/dist/components/molecules/Tabs.d.ts +10 -2
- package/dist/components/molecules/avl/avl-preview-types.d.ts +24 -3
- package/dist/components/organisms/game/three/index.cjs +175 -185
- package/dist/components/organisms/game/three/index.js +12 -22
- package/dist/docs/index.cjs +7 -17
- package/dist/docs/index.js +8 -18
- package/dist/marketing/index.cjs +22 -27
- package/dist/marketing/index.js +23 -28
- package/dist/providers/index.cjs +1651 -1508
- package/dist/providers/index.js +760 -617
- package/dist/runtime/index.cjs +1690 -1547
- package/dist/runtime/index.js +764 -621
- package/package.json +1 -1
package/dist/avl/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { OrbitControls as OrbitControls$1, Grid as Grid$1, Stars, Sparkles, Html, RoundedBox } from '@react-three/drei';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React96 from 'react';
|
|
4
|
+
import React96__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
5
5
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
7
7
|
import { MarkerType, Handle, Position, getBezierPath, EdgeLabelRenderer, BaseEdge, ReactFlowProvider, useNodesState, useEdgesState, useReactFlow, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
|
|
@@ -3726,7 +3726,7 @@ var init_Box = __esm({
|
|
|
3726
3726
|
fixed: "fixed",
|
|
3727
3727
|
sticky: "sticky"
|
|
3728
3728
|
};
|
|
3729
|
-
Box =
|
|
3729
|
+
Box = React96__default.forwardRef(
|
|
3730
3730
|
({
|
|
3731
3731
|
padding,
|
|
3732
3732
|
paddingX,
|
|
@@ -3776,38 +3776,26 @@ var init_Box = __esm({
|
|
|
3776
3776
|
onMouseLeave?.(e);
|
|
3777
3777
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
3778
3778
|
const isClickable = action || onClick;
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
Comp,
|
|
3779
|
+
return React96__default.createElement(
|
|
3780
|
+
Component2,
|
|
3782
3781
|
{
|
|
3783
3782
|
ref,
|
|
3784
3783
|
className: cn(
|
|
3785
|
-
// Padding
|
|
3786
3784
|
padding && paddingStyles[padding],
|
|
3787
3785
|
paddingX && paddingXStyles[paddingX],
|
|
3788
3786
|
paddingY && paddingYStyles[paddingY],
|
|
3789
|
-
// Margin
|
|
3790
3787
|
margin && marginStyles[margin],
|
|
3791
3788
|
marginX && marginXStyles[marginX],
|
|
3792
3789
|
marginY && marginYStyles[marginY],
|
|
3793
|
-
// Background
|
|
3794
3790
|
bgStyles[bg],
|
|
3795
|
-
// Border - uses theme variables
|
|
3796
3791
|
border && "border-[length:var(--border-width)] border-border",
|
|
3797
|
-
// Rounded
|
|
3798
3792
|
roundedStyles[rounded],
|
|
3799
|
-
// Shadow
|
|
3800
3793
|
shadowStyles[shadow],
|
|
3801
|
-
// Display
|
|
3802
3794
|
display && displayStyles[display],
|
|
3803
|
-
// Dimensions
|
|
3804
3795
|
fullWidth && "w-full",
|
|
3805
3796
|
fullHeight && "h-full",
|
|
3806
|
-
// Overflow
|
|
3807
3797
|
overflow && overflowStyles2[overflow],
|
|
3808
|
-
// Position
|
|
3809
3798
|
position && positionStyles[position],
|
|
3810
|
-
// Cursor for clickable
|
|
3811
3799
|
isClickable && "cursor-pointer",
|
|
3812
3800
|
className
|
|
3813
3801
|
),
|
|
@@ -3815,9 +3803,9 @@ var init_Box = __esm({
|
|
|
3815
3803
|
onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
|
|
3816
3804
|
onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
|
|
3817
3805
|
style: maxWidth ? { maxWidth, ...rest.style } : rest.style,
|
|
3818
|
-
...rest
|
|
3819
|
-
|
|
3820
|
-
|
|
3806
|
+
...rest
|
|
3807
|
+
},
|
|
3808
|
+
children
|
|
3821
3809
|
);
|
|
3822
3810
|
}
|
|
3823
3811
|
);
|
|
@@ -4739,7 +4727,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4739
4727
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4740
4728
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4741
4729
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
4742
|
-
return /* @__PURE__ */ jsxs(
|
|
4730
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
4743
4731
|
/* @__PURE__ */ jsx(
|
|
4744
4732
|
AvlState,
|
|
4745
4733
|
{
|
|
@@ -5761,6 +5749,179 @@ var init_Icon = __esm({
|
|
|
5761
5749
|
Icon.displayName = "Icon";
|
|
5762
5750
|
}
|
|
5763
5751
|
});
|
|
5752
|
+
function resolveIconProp(value, sizeClass) {
|
|
5753
|
+
if (!value) return null;
|
|
5754
|
+
if (typeof value === "string") {
|
|
5755
|
+
const Resolved = resolveIcon(value);
|
|
5756
|
+
return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
|
|
5757
|
+
}
|
|
5758
|
+
if (typeof value === "function") {
|
|
5759
|
+
const IconComp = value;
|
|
5760
|
+
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5761
|
+
}
|
|
5762
|
+
if (React96__default.isValidElement(value)) {
|
|
5763
|
+
return value;
|
|
5764
|
+
}
|
|
5765
|
+
if (typeof value === "object" && value !== null && "render" in value) {
|
|
5766
|
+
const IconComp = value;
|
|
5767
|
+
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5768
|
+
}
|
|
5769
|
+
return value;
|
|
5770
|
+
}
|
|
5771
|
+
var variantStyles2, sizeStyles2, iconSizeStyles, Button;
|
|
5772
|
+
var init_Button = __esm({
|
|
5773
|
+
"components/atoms/Button.tsx"() {
|
|
5774
|
+
"use client";
|
|
5775
|
+
init_cn();
|
|
5776
|
+
init_useEventBus();
|
|
5777
|
+
init_Icon();
|
|
5778
|
+
variantStyles2 = {
|
|
5779
|
+
primary: [
|
|
5780
|
+
"bg-primary text-primary-foreground",
|
|
5781
|
+
"border-none",
|
|
5782
|
+
"shadow-sm",
|
|
5783
|
+
"hover:bg-primary-hover hover:shadow-lg",
|
|
5784
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
5785
|
+
].join(" "),
|
|
5786
|
+
secondary: [
|
|
5787
|
+
"bg-transparent text-accent",
|
|
5788
|
+
"border border-accent",
|
|
5789
|
+
"hover:bg-accent hover:text-white hover:border-accent",
|
|
5790
|
+
"active:scale-[var(--active-scale)]"
|
|
5791
|
+
].join(" "),
|
|
5792
|
+
ghost: [
|
|
5793
|
+
"bg-transparent text-muted-foreground",
|
|
5794
|
+
"border border-transparent",
|
|
5795
|
+
"hover:text-primary-foreground hover:bg-primary hover:border-primary",
|
|
5796
|
+
"active:scale-[var(--active-scale)]"
|
|
5797
|
+
].join(" "),
|
|
5798
|
+
danger: [
|
|
5799
|
+
"bg-surface text-error",
|
|
5800
|
+
"border-[length:var(--border-width)] border-error",
|
|
5801
|
+
"shadow-sm",
|
|
5802
|
+
"hover:bg-error hover:text-error-foreground hover:shadow-lg",
|
|
5803
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
5804
|
+
].join(" "),
|
|
5805
|
+
success: [
|
|
5806
|
+
"bg-surface text-success",
|
|
5807
|
+
"border-[length:var(--border-width)] border-success",
|
|
5808
|
+
"shadow-sm",
|
|
5809
|
+
"hover:bg-success hover:text-success-foreground hover:shadow-lg",
|
|
5810
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
5811
|
+
].join(" "),
|
|
5812
|
+
warning: [
|
|
5813
|
+
"bg-surface text-warning",
|
|
5814
|
+
"border-[length:var(--border-width)] border-warning",
|
|
5815
|
+
"shadow-sm",
|
|
5816
|
+
"hover:bg-warning hover:text-warning-foreground hover:shadow-lg",
|
|
5817
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
5818
|
+
].join(" "),
|
|
5819
|
+
// "default" is an alias for secondary
|
|
5820
|
+
default: [
|
|
5821
|
+
"bg-secondary text-secondary-foreground",
|
|
5822
|
+
"border-[length:var(--border-width-thin)] border-border",
|
|
5823
|
+
"hover:bg-secondary-hover",
|
|
5824
|
+
"active:scale-[var(--active-scale)]"
|
|
5825
|
+
].join(" ")
|
|
5826
|
+
};
|
|
5827
|
+
variantStyles2.destructive = variantStyles2.danger;
|
|
5828
|
+
sizeStyles2 = {
|
|
5829
|
+
sm: "px-3 py-1.5 text-sm",
|
|
5830
|
+
md: "px-4 py-2 text-sm",
|
|
5831
|
+
lg: "px-6 py-3 text-base"
|
|
5832
|
+
};
|
|
5833
|
+
iconSizeStyles = {
|
|
5834
|
+
sm: "h-3.5 w-3.5",
|
|
5835
|
+
md: "h-4 w-4",
|
|
5836
|
+
lg: "h-5 w-5"
|
|
5837
|
+
};
|
|
5838
|
+
Button = React96__default.forwardRef(
|
|
5839
|
+
({
|
|
5840
|
+
className,
|
|
5841
|
+
variant = "primary",
|
|
5842
|
+
size = "md",
|
|
5843
|
+
isLoading = false,
|
|
5844
|
+
disabled,
|
|
5845
|
+
leftIcon,
|
|
5846
|
+
rightIcon,
|
|
5847
|
+
icon: iconProp,
|
|
5848
|
+
iconRight: iconRightProp,
|
|
5849
|
+
action,
|
|
5850
|
+
actionPayload,
|
|
5851
|
+
label,
|
|
5852
|
+
children,
|
|
5853
|
+
onClick,
|
|
5854
|
+
...props
|
|
5855
|
+
}, ref) => {
|
|
5856
|
+
const eventBus = useEventBus();
|
|
5857
|
+
const leftIconValue = leftIcon || iconProp;
|
|
5858
|
+
const rightIconValue = rightIcon || iconRightProp;
|
|
5859
|
+
const resolvedLeftIcon = resolveIconProp(leftIconValue, iconSizeStyles[size]);
|
|
5860
|
+
const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
|
|
5861
|
+
const handleClick = (e) => {
|
|
5862
|
+
if (action) {
|
|
5863
|
+
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
5864
|
+
}
|
|
5865
|
+
onClick?.(e);
|
|
5866
|
+
};
|
|
5867
|
+
return /* @__PURE__ */ jsxs(
|
|
5868
|
+
"button",
|
|
5869
|
+
{
|
|
5870
|
+
ref,
|
|
5871
|
+
disabled: disabled || isLoading,
|
|
5872
|
+
className: cn(
|
|
5873
|
+
"inline-flex items-center justify-center gap-2",
|
|
5874
|
+
"font-[var(--font-weight-medium)]",
|
|
5875
|
+
"rounded-sm",
|
|
5876
|
+
"cursor-pointer",
|
|
5877
|
+
"transition-all duration-[var(--transition-normal)]",
|
|
5878
|
+
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
5879
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5880
|
+
variantStyles2[variant],
|
|
5881
|
+
sizeStyles2[size],
|
|
5882
|
+
className
|
|
5883
|
+
),
|
|
5884
|
+
onClick: handleClick,
|
|
5885
|
+
...props,
|
|
5886
|
+
"data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
|
|
5887
|
+
children: [
|
|
5888
|
+
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
|
|
5889
|
+
children || label,
|
|
5890
|
+
resolvedRightIcon && !isLoading && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
|
|
5891
|
+
]
|
|
5892
|
+
}
|
|
5893
|
+
);
|
|
5894
|
+
}
|
|
5895
|
+
);
|
|
5896
|
+
Button.displayName = "Button";
|
|
5897
|
+
}
|
|
5898
|
+
});
|
|
5899
|
+
var Dialog;
|
|
5900
|
+
var init_Dialog = __esm({
|
|
5901
|
+
"components/atoms/Dialog.tsx"() {
|
|
5902
|
+
init_cn();
|
|
5903
|
+
Dialog = React96__default.forwardRef(
|
|
5904
|
+
({
|
|
5905
|
+
role = "dialog",
|
|
5906
|
+
"aria-modal": ariaModal = true,
|
|
5907
|
+
className,
|
|
5908
|
+
children,
|
|
5909
|
+
...rest
|
|
5910
|
+
}, ref) => /* @__PURE__ */ jsx(
|
|
5911
|
+
"dialog",
|
|
5912
|
+
{
|
|
5913
|
+
ref,
|
|
5914
|
+
role,
|
|
5915
|
+
"aria-modal": ariaModal,
|
|
5916
|
+
className: cn(className),
|
|
5917
|
+
...rest,
|
|
5918
|
+
children
|
|
5919
|
+
}
|
|
5920
|
+
)
|
|
5921
|
+
);
|
|
5922
|
+
Dialog.displayName = "Dialog";
|
|
5923
|
+
}
|
|
5924
|
+
});
|
|
5764
5925
|
var Overlay;
|
|
5765
5926
|
var init_Overlay = __esm({
|
|
5766
5927
|
"components/atoms/Overlay.tsx"() {
|
|
@@ -5802,8 +5963,9 @@ var sizeClasses2, minWidths, Modal;
|
|
|
5802
5963
|
var init_Modal = __esm({
|
|
5803
5964
|
"components/molecules/Modal.tsx"() {
|
|
5804
5965
|
"use client";
|
|
5805
|
-
init_Icon();
|
|
5806
5966
|
init_Box();
|
|
5967
|
+
init_Button();
|
|
5968
|
+
init_Dialog();
|
|
5807
5969
|
init_Typography();
|
|
5808
5970
|
init_Overlay();
|
|
5809
5971
|
init_cn();
|
|
@@ -5896,7 +6058,7 @@ var init_Modal = __esm({
|
|
|
5896
6058
|
}
|
|
5897
6059
|
),
|
|
5898
6060
|
/* @__PURE__ */ jsx(
|
|
5899
|
-
|
|
6061
|
+
Box,
|
|
5900
6062
|
{
|
|
5901
6063
|
className: cn(
|
|
5902
6064
|
"fixed inset-0 z-50 pointer-events-none",
|
|
@@ -5905,17 +6067,17 @@ var init_Modal = __esm({
|
|
|
5905
6067
|
),
|
|
5906
6068
|
style: { paddingTop: "10vh" },
|
|
5907
6069
|
children: /* @__PURE__ */ jsxs(
|
|
5908
|
-
|
|
6070
|
+
Dialog,
|
|
5909
6071
|
{
|
|
5910
6072
|
ref: modalRef,
|
|
5911
|
-
|
|
5912
|
-
border: true,
|
|
5913
|
-
shadow: "lg",
|
|
5914
|
-
rounded: "md",
|
|
6073
|
+
open: true,
|
|
5915
6074
|
className: cn(
|
|
5916
|
-
|
|
6075
|
+
// Reset browser-default dialog chrome — we own styling.
|
|
6076
|
+
"m-0 p-0 border-0 bg-transparent",
|
|
6077
|
+
// Pre-existing dialog frame
|
|
6078
|
+
"pointer-events-auto w-full flex flex-col bg-surface border shadow-lg rounded-md",
|
|
5917
6079
|
sizeClasses2[size],
|
|
5918
|
-
"max-sm:max-w-full max-sm:rounded-b-none max-sm:rounded-t-2xl",
|
|
6080
|
+
"max-sm:max-w-full max-sm:min-w-0 max-sm:rounded-b-none max-sm:rounded-t-2xl",
|
|
5919
6081
|
className
|
|
5920
6082
|
),
|
|
5921
6083
|
style: {
|
|
@@ -5926,12 +6088,10 @@ var init_Modal = __esm({
|
|
|
5926
6088
|
transition: isDragging.current ? "none" : "transform 200ms ease-out"
|
|
5927
6089
|
}
|
|
5928
6090
|
},
|
|
5929
|
-
role: "dialog",
|
|
5930
|
-
"aria-modal": "true",
|
|
5931
6091
|
...title && { "aria-labelledby": "modal-title" },
|
|
5932
6092
|
children: [
|
|
5933
6093
|
/* @__PURE__ */ jsx(
|
|
5934
|
-
|
|
6094
|
+
Box,
|
|
5935
6095
|
{
|
|
5936
6096
|
className: "hidden max-sm:flex justify-center py-2 cursor-grab active:cursor-grabbing touch-none",
|
|
5937
6097
|
onPointerDown: (e) => {
|
|
@@ -5957,11 +6117,11 @@ var init_Modal = __esm({
|
|
|
5957
6117
|
isDragging.current = false;
|
|
5958
6118
|
setDragY(0);
|
|
5959
6119
|
},
|
|
5960
|
-
children: /* @__PURE__ */ jsx(
|
|
6120
|
+
children: /* @__PURE__ */ jsx(Box, { className: "w-10 h-1 rounded-full bg-border" })
|
|
5961
6121
|
}
|
|
5962
6122
|
),
|
|
5963
6123
|
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
5964
|
-
|
|
6124
|
+
Box,
|
|
5965
6125
|
{
|
|
5966
6126
|
className: cn(
|
|
5967
6127
|
"px-6 py-4 flex items-center justify-between",
|
|
@@ -5970,25 +6130,22 @@ var init_Modal = __esm({
|
|
|
5970
6130
|
children: [
|
|
5971
6131
|
title && /* @__PURE__ */ jsx(Typography, { variant: "h4", as: "h2", id: "modal-title", children: title }),
|
|
5972
6132
|
showCloseButton && /* @__PURE__ */ jsx(
|
|
5973
|
-
|
|
6133
|
+
Button,
|
|
5974
6134
|
{
|
|
5975
|
-
|
|
6135
|
+
variant: "ghost",
|
|
6136
|
+
size: "sm",
|
|
6137
|
+
icon: X,
|
|
5976
6138
|
onClick: handleClose,
|
|
5977
6139
|
"data-event": "CLOSE",
|
|
5978
|
-
|
|
5979
|
-
"p-1 transition-colors rounded-sm",
|
|
5980
|
-
"hover:bg-muted"
|
|
5981
|
-
),
|
|
5982
|
-
"aria-label": "Close modal",
|
|
5983
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: X, size: "md" })
|
|
6140
|
+
"aria-label": "Close modal"
|
|
5984
6141
|
}
|
|
5985
6142
|
)
|
|
5986
6143
|
]
|
|
5987
6144
|
}
|
|
5988
6145
|
),
|
|
5989
|
-
/* @__PURE__ */ jsx(
|
|
6146
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
|
|
5990
6147
|
footer && /* @__PURE__ */ jsx(
|
|
5991
|
-
|
|
6148
|
+
Box,
|
|
5992
6149
|
{
|
|
5993
6150
|
className: cn(
|
|
5994
6151
|
"px-6 py-4 bg-muted",
|
|
@@ -6011,21 +6168,19 @@ var sizeWidths, Drawer;
|
|
|
6011
6168
|
var init_Drawer = __esm({
|
|
6012
6169
|
"components/molecules/Drawer.tsx"() {
|
|
6013
6170
|
"use client";
|
|
6014
|
-
init_Icon();
|
|
6015
6171
|
init_Box();
|
|
6172
|
+
init_Button();
|
|
6016
6173
|
init_Typography();
|
|
6017
6174
|
init_Overlay();
|
|
6018
6175
|
init_cn();
|
|
6019
6176
|
init_useEventBus();
|
|
6020
6177
|
sizeWidths = {
|
|
6021
|
-
sm: "w-80",
|
|
6178
|
+
sm: "w-full sm:w-80",
|
|
6022
6179
|
// 320px
|
|
6023
|
-
md: "w-96",
|
|
6180
|
+
md: "w-full sm:w-96",
|
|
6024
6181
|
// 384px
|
|
6025
|
-
lg: "w-[480px]",
|
|
6026
|
-
|
|
6027
|
-
xl: "w-[640px]",
|
|
6028
|
-
// 640px
|
|
6182
|
+
lg: "w-full sm:w-[480px]",
|
|
6183
|
+
xl: "w-full sm:w-[640px]",
|
|
6029
6184
|
full: "w-screen"
|
|
6030
6185
|
};
|
|
6031
6186
|
Drawer = ({
|
|
@@ -6123,7 +6278,7 @@ var init_Drawer = __esm({
|
|
|
6123
6278
|
...title && { "aria-labelledby": "drawer-title" },
|
|
6124
6279
|
children: [
|
|
6125
6280
|
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
6126
|
-
|
|
6281
|
+
Box,
|
|
6127
6282
|
{
|
|
6128
6283
|
className: cn(
|
|
6129
6284
|
"px-6 py-4 flex items-center justify-between shrink-0",
|
|
@@ -6132,25 +6287,22 @@ var init_Drawer = __esm({
|
|
|
6132
6287
|
children: [
|
|
6133
6288
|
title && /* @__PURE__ */ jsx(Typography, { variant: "h4", as: "h2", id: "drawer-title", children: title }),
|
|
6134
6289
|
showCloseButton && /* @__PURE__ */ jsx(
|
|
6135
|
-
|
|
6290
|
+
Button,
|
|
6136
6291
|
{
|
|
6137
|
-
|
|
6292
|
+
variant: "ghost",
|
|
6293
|
+
size: "sm",
|
|
6294
|
+
icon: X,
|
|
6138
6295
|
onClick: handleClose,
|
|
6139
|
-
className: cn(
|
|
6140
|
-
"p-1 transition-colors rounded-sm",
|
|
6141
|
-
"hover:bg-muted",
|
|
6142
|
-
!title && "ml-auto"
|
|
6143
|
-
),
|
|
6144
6296
|
"aria-label": "Close drawer",
|
|
6145
|
-
|
|
6297
|
+
className: cn(!title && "ml-auto")
|
|
6146
6298
|
}
|
|
6147
6299
|
)
|
|
6148
6300
|
]
|
|
6149
6301
|
}
|
|
6150
6302
|
),
|
|
6151
|
-
/* @__PURE__ */ jsx(
|
|
6303
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
|
|
6152
6304
|
footer && /* @__PURE__ */ jsx(
|
|
6153
|
-
|
|
6305
|
+
Box,
|
|
6154
6306
|
{
|
|
6155
6307
|
className: cn(
|
|
6156
6308
|
"px-6 py-4 shrink-0 bg-muted",
|
|
@@ -6191,153 +6343,6 @@ var init_Drawer = __esm({
|
|
|
6191
6343
|
Drawer.displayName = "Drawer";
|
|
6192
6344
|
}
|
|
6193
6345
|
});
|
|
6194
|
-
function resolveIconProp(value, sizeClass) {
|
|
6195
|
-
if (!value) return null;
|
|
6196
|
-
if (typeof value === "string") {
|
|
6197
|
-
const Resolved = resolveIcon(value);
|
|
6198
|
-
return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
|
|
6199
|
-
}
|
|
6200
|
-
if (typeof value === "function") {
|
|
6201
|
-
const IconComp = value;
|
|
6202
|
-
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
6203
|
-
}
|
|
6204
|
-
if (React93__default.isValidElement(value)) {
|
|
6205
|
-
return value;
|
|
6206
|
-
}
|
|
6207
|
-
if (typeof value === "object" && value !== null && "render" in value) {
|
|
6208
|
-
const IconComp = value;
|
|
6209
|
-
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
6210
|
-
}
|
|
6211
|
-
return value;
|
|
6212
|
-
}
|
|
6213
|
-
var variantStyles2, sizeStyles2, iconSizeStyles, Button;
|
|
6214
|
-
var init_Button = __esm({
|
|
6215
|
-
"components/atoms/Button.tsx"() {
|
|
6216
|
-
"use client";
|
|
6217
|
-
init_cn();
|
|
6218
|
-
init_useEventBus();
|
|
6219
|
-
init_Icon();
|
|
6220
|
-
variantStyles2 = {
|
|
6221
|
-
primary: [
|
|
6222
|
-
"bg-primary text-primary-foreground",
|
|
6223
|
-
"border-none",
|
|
6224
|
-
"shadow-sm",
|
|
6225
|
-
"hover:bg-primary-hover hover:shadow-lg",
|
|
6226
|
-
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
6227
|
-
].join(" "),
|
|
6228
|
-
secondary: [
|
|
6229
|
-
"bg-transparent text-accent",
|
|
6230
|
-
"border border-accent",
|
|
6231
|
-
"hover:bg-accent hover:text-white hover:border-accent",
|
|
6232
|
-
"active:scale-[var(--active-scale)]"
|
|
6233
|
-
].join(" "),
|
|
6234
|
-
ghost: [
|
|
6235
|
-
"bg-transparent text-muted-foreground",
|
|
6236
|
-
"border border-transparent",
|
|
6237
|
-
"hover:text-primary-foreground hover:bg-primary hover:border-primary",
|
|
6238
|
-
"active:scale-[var(--active-scale)]"
|
|
6239
|
-
].join(" "),
|
|
6240
|
-
danger: [
|
|
6241
|
-
"bg-surface text-error",
|
|
6242
|
-
"border-[length:var(--border-width)] border-error",
|
|
6243
|
-
"shadow-sm",
|
|
6244
|
-
"hover:bg-error hover:text-error-foreground hover:shadow-lg",
|
|
6245
|
-
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
6246
|
-
].join(" "),
|
|
6247
|
-
success: [
|
|
6248
|
-
"bg-surface text-success",
|
|
6249
|
-
"border-[length:var(--border-width)] border-success",
|
|
6250
|
-
"shadow-sm",
|
|
6251
|
-
"hover:bg-success hover:text-success-foreground hover:shadow-lg",
|
|
6252
|
-
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
6253
|
-
].join(" "),
|
|
6254
|
-
warning: [
|
|
6255
|
-
"bg-surface text-warning",
|
|
6256
|
-
"border-[length:var(--border-width)] border-warning",
|
|
6257
|
-
"shadow-sm",
|
|
6258
|
-
"hover:bg-warning hover:text-warning-foreground hover:shadow-lg",
|
|
6259
|
-
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
6260
|
-
].join(" "),
|
|
6261
|
-
// "default" is an alias for secondary
|
|
6262
|
-
default: [
|
|
6263
|
-
"bg-secondary text-secondary-foreground",
|
|
6264
|
-
"border-[length:var(--border-width-thin)] border-border",
|
|
6265
|
-
"hover:bg-secondary-hover",
|
|
6266
|
-
"active:scale-[var(--active-scale)]"
|
|
6267
|
-
].join(" ")
|
|
6268
|
-
};
|
|
6269
|
-
variantStyles2.destructive = variantStyles2.danger;
|
|
6270
|
-
sizeStyles2 = {
|
|
6271
|
-
sm: "px-3 py-1.5 text-sm",
|
|
6272
|
-
md: "px-4 py-2 text-sm",
|
|
6273
|
-
lg: "px-6 py-3 text-base"
|
|
6274
|
-
};
|
|
6275
|
-
iconSizeStyles = {
|
|
6276
|
-
sm: "h-3.5 w-3.5",
|
|
6277
|
-
md: "h-4 w-4",
|
|
6278
|
-
lg: "h-5 w-5"
|
|
6279
|
-
};
|
|
6280
|
-
Button = React93__default.forwardRef(
|
|
6281
|
-
({
|
|
6282
|
-
className,
|
|
6283
|
-
variant = "primary",
|
|
6284
|
-
size = "md",
|
|
6285
|
-
isLoading = false,
|
|
6286
|
-
disabled,
|
|
6287
|
-
leftIcon,
|
|
6288
|
-
rightIcon,
|
|
6289
|
-
icon: iconProp,
|
|
6290
|
-
iconRight: iconRightProp,
|
|
6291
|
-
action,
|
|
6292
|
-
actionPayload,
|
|
6293
|
-
label,
|
|
6294
|
-
children,
|
|
6295
|
-
onClick,
|
|
6296
|
-
...props
|
|
6297
|
-
}, ref) => {
|
|
6298
|
-
const eventBus = useEventBus();
|
|
6299
|
-
const leftIconValue = leftIcon || iconProp;
|
|
6300
|
-
const rightIconValue = rightIcon || iconRightProp;
|
|
6301
|
-
const resolvedLeftIcon = resolveIconProp(leftIconValue, iconSizeStyles[size]);
|
|
6302
|
-
const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
|
|
6303
|
-
const handleClick = (e) => {
|
|
6304
|
-
if (action) {
|
|
6305
|
-
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
6306
|
-
}
|
|
6307
|
-
onClick?.(e);
|
|
6308
|
-
};
|
|
6309
|
-
return /* @__PURE__ */ jsxs(
|
|
6310
|
-
"button",
|
|
6311
|
-
{
|
|
6312
|
-
ref,
|
|
6313
|
-
disabled: disabled || isLoading,
|
|
6314
|
-
className: cn(
|
|
6315
|
-
"inline-flex items-center justify-center gap-2",
|
|
6316
|
-
"font-[var(--font-weight-medium)]",
|
|
6317
|
-
"rounded-sm",
|
|
6318
|
-
"cursor-pointer",
|
|
6319
|
-
"transition-all duration-[var(--transition-normal)]",
|
|
6320
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
6321
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
6322
|
-
variantStyles2[variant],
|
|
6323
|
-
sizeStyles2[size],
|
|
6324
|
-
className
|
|
6325
|
-
),
|
|
6326
|
-
onClick: handleClick,
|
|
6327
|
-
...props,
|
|
6328
|
-
"data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
|
|
6329
|
-
children: [
|
|
6330
|
-
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
|
|
6331
|
-
children || label,
|
|
6332
|
-
resolvedRightIcon && !isLoading && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
|
|
6333
|
-
]
|
|
6334
|
-
}
|
|
6335
|
-
);
|
|
6336
|
-
}
|
|
6337
|
-
);
|
|
6338
|
-
Button.displayName = "Button";
|
|
6339
|
-
}
|
|
6340
|
-
});
|
|
6341
6346
|
var variantStyles3, sizeStyles3, Badge;
|
|
6342
6347
|
var init_Badge = __esm({
|
|
6343
6348
|
"components/atoms/Badge.tsx"() {
|
|
@@ -6380,7 +6385,7 @@ var init_Badge = __esm({
|
|
|
6380
6385
|
md: "px-2.5 py-1 text-sm",
|
|
6381
6386
|
lg: "px-3 py-1.5 text-base"
|
|
6382
6387
|
};
|
|
6383
|
-
Badge =
|
|
6388
|
+
Badge = React96__default.forwardRef(
|
|
6384
6389
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
6385
6390
|
const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
6386
6391
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -6413,6 +6418,7 @@ var variantClasses, iconMap, iconColors, Toast;
|
|
|
6413
6418
|
var init_Toast = __esm({
|
|
6414
6419
|
"components/molecules/Toast.tsx"() {
|
|
6415
6420
|
"use client";
|
|
6421
|
+
init_Box();
|
|
6416
6422
|
init_Icon();
|
|
6417
6423
|
init_Typography();
|
|
6418
6424
|
init_Button();
|
|
@@ -6470,17 +6476,20 @@ var init_Toast = __esm({
|
|
|
6470
6476
|
return () => clearTimeout(timer);
|
|
6471
6477
|
}, [duration, onDismiss, dismissEvent]);
|
|
6472
6478
|
return /* @__PURE__ */ jsx(
|
|
6473
|
-
|
|
6479
|
+
Box,
|
|
6474
6480
|
{
|
|
6475
6481
|
className: cn(
|
|
6476
|
-
|
|
6482
|
+
// `min-w-[300px]` only kicks in at `sm:` and above so a phone
|
|
6483
|
+
// viewport doesn't get a toast wider than the screen near the
|
|
6484
|
+
// edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
|
|
6485
|
+
"border-l-4 p-4 shadow min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
|
|
6477
6486
|
"rounded-sm",
|
|
6478
6487
|
variantClasses[variant],
|
|
6479
6488
|
className
|
|
6480
6489
|
),
|
|
6481
6490
|
role: "alert",
|
|
6482
|
-
children: /* @__PURE__ */ jsxs(
|
|
6483
|
-
/* @__PURE__ */ jsx(
|
|
6491
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
|
|
6492
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
6484
6493
|
Icon,
|
|
6485
6494
|
{
|
|
6486
6495
|
icon: iconMap[variant],
|
|
@@ -6488,25 +6497,22 @@ var init_Toast = __esm({
|
|
|
6488
6497
|
className: iconColors[variant]
|
|
6489
6498
|
}
|
|
6490
6499
|
) }),
|
|
6491
|
-
/* @__PURE__ */ jsxs(
|
|
6500
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0", children: [
|
|
6492
6501
|
title && /* @__PURE__ */ jsx(Typography, { variant: "h6", className: "mb-1", children: title }),
|
|
6493
6502
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-sm", children: message }),
|
|
6494
|
-
actionLabel && (onAction || actionEvent) && /* @__PURE__ */ jsx(
|
|
6503
|
+
actionLabel && (onAction || actionEvent) && /* @__PURE__ */ jsx(Box, { className: "mt-3", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleAction, children: actionLabel }) })
|
|
6495
6504
|
] }),
|
|
6496
|
-
/* @__PURE__ */ jsxs(
|
|
6505
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-2 flex-shrink-0", children: [
|
|
6497
6506
|
badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: badge }),
|
|
6498
6507
|
dismissible && /* @__PURE__ */ jsx(
|
|
6499
|
-
|
|
6508
|
+
Button,
|
|
6500
6509
|
{
|
|
6501
|
-
|
|
6510
|
+
variant: "ghost",
|
|
6511
|
+
size: "sm",
|
|
6512
|
+
icon: X,
|
|
6502
6513
|
onClick: handleDismiss,
|
|
6503
|
-
className: cn(
|
|
6504
|
-
"flex-shrink-0 p-1 transition-colors rounded-sm",
|
|
6505
|
-
"hover:bg-muted",
|
|
6506
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
|
|
6507
|
-
),
|
|
6508
6514
|
"aria-label": "Dismiss toast",
|
|
6509
|
-
|
|
6515
|
+
className: "flex-shrink-0"
|
|
6510
6516
|
}
|
|
6511
6517
|
)
|
|
6512
6518
|
] })
|
|
@@ -6674,7 +6680,7 @@ var init_SvgFlow = __esm({
|
|
|
6674
6680
|
opacity = 1,
|
|
6675
6681
|
className
|
|
6676
6682
|
}) => {
|
|
6677
|
-
const markerId =
|
|
6683
|
+
const markerId = React96__default.useMemo(() => {
|
|
6678
6684
|
flowIdCounter += 1;
|
|
6679
6685
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6680
6686
|
}, []);
|
|
@@ -7217,7 +7223,7 @@ var init_SvgRing = __esm({
|
|
|
7217
7223
|
className,
|
|
7218
7224
|
label
|
|
7219
7225
|
}) => {
|
|
7220
|
-
const gradientId =
|
|
7226
|
+
const gradientId = React96__default.useMemo(() => {
|
|
7221
7227
|
ringIdCounter += 1;
|
|
7222
7228
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
7223
7229
|
}, []);
|
|
@@ -7378,7 +7384,7 @@ var Input;
|
|
|
7378
7384
|
var init_Input = __esm({
|
|
7379
7385
|
"components/atoms/Input.tsx"() {
|
|
7380
7386
|
init_cn();
|
|
7381
|
-
Input =
|
|
7387
|
+
Input = React96__default.forwardRef(
|
|
7382
7388
|
({
|
|
7383
7389
|
className,
|
|
7384
7390
|
inputType,
|
|
@@ -7496,7 +7502,7 @@ var Label;
|
|
|
7496
7502
|
var init_Label = __esm({
|
|
7497
7503
|
"components/atoms/Label.tsx"() {
|
|
7498
7504
|
init_cn();
|
|
7499
|
-
Label =
|
|
7505
|
+
Label = React96__default.forwardRef(
|
|
7500
7506
|
({ className, required, children, ...props }, ref) => {
|
|
7501
7507
|
return /* @__PURE__ */ jsxs(
|
|
7502
7508
|
"label",
|
|
@@ -7522,7 +7528,7 @@ var Textarea;
|
|
|
7522
7528
|
var init_Textarea = __esm({
|
|
7523
7529
|
"components/atoms/Textarea.tsx"() {
|
|
7524
7530
|
init_cn();
|
|
7525
|
-
Textarea =
|
|
7531
|
+
Textarea = React96__default.forwardRef(
|
|
7526
7532
|
({ className, error, ...props }, ref) => {
|
|
7527
7533
|
return /* @__PURE__ */ jsx(
|
|
7528
7534
|
"textarea",
|
|
@@ -7551,7 +7557,7 @@ var Select;
|
|
|
7551
7557
|
var init_Select = __esm({
|
|
7552
7558
|
"components/atoms/Select.tsx"() {
|
|
7553
7559
|
init_cn();
|
|
7554
|
-
Select =
|
|
7560
|
+
Select = React96__default.forwardRef(
|
|
7555
7561
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
7556
7562
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
7557
7563
|
/* @__PURE__ */ jsxs(
|
|
@@ -7593,7 +7599,7 @@ var Checkbox;
|
|
|
7593
7599
|
var init_Checkbox = __esm({
|
|
7594
7600
|
"components/atoms/Checkbox.tsx"() {
|
|
7595
7601
|
init_cn();
|
|
7596
|
-
Checkbox =
|
|
7602
|
+
Checkbox = React96__default.forwardRef(
|
|
7597
7603
|
({ className, label, id, ...props }, ref) => {
|
|
7598
7604
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7599
7605
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -7675,7 +7681,7 @@ var init_Card = __esm({
|
|
|
7675
7681
|
md: "shadow",
|
|
7676
7682
|
lg: "shadow-lg"
|
|
7677
7683
|
};
|
|
7678
|
-
Card =
|
|
7684
|
+
Card = React96__default.forwardRef(
|
|
7679
7685
|
({
|
|
7680
7686
|
className,
|
|
7681
7687
|
variant = "bordered",
|
|
@@ -7711,9 +7717,9 @@ var init_Card = __esm({
|
|
|
7711
7717
|
}
|
|
7712
7718
|
);
|
|
7713
7719
|
Card.displayName = "Card";
|
|
7714
|
-
CardHeader =
|
|
7720
|
+
CardHeader = React96__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7715
7721
|
CardHeader.displayName = "CardHeader";
|
|
7716
|
-
CardTitle =
|
|
7722
|
+
CardTitle = React96__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7717
7723
|
"h3",
|
|
7718
7724
|
{
|
|
7719
7725
|
ref,
|
|
@@ -7726,11 +7732,11 @@ var init_Card = __esm({
|
|
|
7726
7732
|
}
|
|
7727
7733
|
));
|
|
7728
7734
|
CardTitle.displayName = "CardTitle";
|
|
7729
|
-
CardContent =
|
|
7735
|
+
CardContent = React96__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7730
7736
|
CardContent.displayName = "CardContent";
|
|
7731
7737
|
CardBody = CardContent;
|
|
7732
7738
|
CardBody.displayName = "CardBody";
|
|
7733
|
-
CardFooter =
|
|
7739
|
+
CardFooter = React96__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7734
7740
|
"div",
|
|
7735
7741
|
{
|
|
7736
7742
|
ref,
|
|
@@ -7785,7 +7791,7 @@ var init_FilterPill = __esm({
|
|
|
7785
7791
|
md: "w-3.5 h-3.5",
|
|
7786
7792
|
lg: "w-4 h-4"
|
|
7787
7793
|
};
|
|
7788
|
-
FilterPill =
|
|
7794
|
+
FilterPill = React96__default.forwardRef(
|
|
7789
7795
|
({
|
|
7790
7796
|
className,
|
|
7791
7797
|
variant = "default",
|
|
@@ -7864,7 +7870,7 @@ var init_Spinner = __esm({
|
|
|
7864
7870
|
md: "h-6 w-6",
|
|
7865
7871
|
lg: "h-8 w-8"
|
|
7866
7872
|
};
|
|
7867
|
-
Spinner =
|
|
7873
|
+
Spinner = React96__default.forwardRef(
|
|
7868
7874
|
({ className, size = "md", ...props }, ref) => {
|
|
7869
7875
|
return /* @__PURE__ */ jsx(
|
|
7870
7876
|
"div",
|
|
@@ -8312,7 +8318,7 @@ var Radio;
|
|
|
8312
8318
|
var init_Radio = __esm({
|
|
8313
8319
|
"components/atoms/Radio.tsx"() {
|
|
8314
8320
|
init_cn();
|
|
8315
|
-
Radio =
|
|
8321
|
+
Radio = React96__default.forwardRef(
|
|
8316
8322
|
({
|
|
8317
8323
|
label,
|
|
8318
8324
|
helperText,
|
|
@@ -8484,7 +8490,7 @@ var init_Switch = __esm({
|
|
|
8484
8490
|
"components/atoms/Switch.tsx"() {
|
|
8485
8491
|
"use client";
|
|
8486
8492
|
init_cn();
|
|
8487
|
-
Switch =
|
|
8493
|
+
Switch = React96.forwardRef(
|
|
8488
8494
|
({
|
|
8489
8495
|
checked,
|
|
8490
8496
|
defaultChecked = false,
|
|
@@ -8495,10 +8501,10 @@ var init_Switch = __esm({
|
|
|
8495
8501
|
name,
|
|
8496
8502
|
className
|
|
8497
8503
|
}, ref) => {
|
|
8498
|
-
const [isChecked, setIsChecked] =
|
|
8504
|
+
const [isChecked, setIsChecked] = React96.useState(
|
|
8499
8505
|
checked !== void 0 ? checked : defaultChecked
|
|
8500
8506
|
);
|
|
8501
|
-
|
|
8507
|
+
React96.useEffect(() => {
|
|
8502
8508
|
if (checked !== void 0) {
|
|
8503
8509
|
setIsChecked(checked);
|
|
8504
8510
|
}
|
|
@@ -8761,6 +8767,16 @@ var init_FlipContainer = __esm({
|
|
|
8761
8767
|
FlipContainer.displayName = "FlipContainer";
|
|
8762
8768
|
}
|
|
8763
8769
|
});
|
|
8770
|
+
var Aside;
|
|
8771
|
+
var init_Aside = __esm({
|
|
8772
|
+
"components/atoms/Aside.tsx"() {
|
|
8773
|
+
init_cn();
|
|
8774
|
+
Aside = React96__default.forwardRef(
|
|
8775
|
+
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8776
|
+
);
|
|
8777
|
+
Aside.displayName = "Aside";
|
|
8778
|
+
}
|
|
8779
|
+
});
|
|
8764
8780
|
function toSharedContext(ctx) {
|
|
8765
8781
|
return createMinimalContext(
|
|
8766
8782
|
{
|
|
@@ -8832,8 +8848,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8832
8848
|
position = "top",
|
|
8833
8849
|
className
|
|
8834
8850
|
}) => {
|
|
8835
|
-
const [isVisible, setIsVisible] =
|
|
8836
|
-
const timeoutRef =
|
|
8851
|
+
const [isVisible, setIsVisible] = React96__default.useState(false);
|
|
8852
|
+
const timeoutRef = React96__default.useRef(null);
|
|
8837
8853
|
const handleMouseEnter = () => {
|
|
8838
8854
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8839
8855
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8842,7 +8858,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8842
8858
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8843
8859
|
setIsVisible(false);
|
|
8844
8860
|
};
|
|
8845
|
-
|
|
8861
|
+
React96__default.useEffect(() => {
|
|
8846
8862
|
return () => {
|
|
8847
8863
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8848
8864
|
};
|
|
@@ -9052,7 +9068,7 @@ var init_StatusDot = __esm({
|
|
|
9052
9068
|
md: "w-2.5 h-2.5",
|
|
9053
9069
|
lg: "w-3 h-3"
|
|
9054
9070
|
};
|
|
9055
|
-
StatusDot =
|
|
9071
|
+
StatusDot = React96__default.forwardRef(
|
|
9056
9072
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
9057
9073
|
return /* @__PURE__ */ jsx(
|
|
9058
9074
|
"span",
|
|
@@ -9105,7 +9121,7 @@ var init_TrendIndicator = __esm({
|
|
|
9105
9121
|
down: TrendingDown,
|
|
9106
9122
|
flat: ArrowRight
|
|
9107
9123
|
};
|
|
9108
|
-
TrendIndicator =
|
|
9124
|
+
TrendIndicator = React96__default.forwardRef(
|
|
9109
9125
|
({
|
|
9110
9126
|
className,
|
|
9111
9127
|
value,
|
|
@@ -9172,7 +9188,7 @@ var init_RangeSlider = __esm({
|
|
|
9172
9188
|
md: "w-4 h-4",
|
|
9173
9189
|
lg: "w-5 h-5"
|
|
9174
9190
|
};
|
|
9175
|
-
RangeSlider =
|
|
9191
|
+
RangeSlider = React96__default.forwardRef(
|
|
9176
9192
|
({
|
|
9177
9193
|
className,
|
|
9178
9194
|
min = 0,
|
|
@@ -9740,7 +9756,7 @@ var init_ContentSection = __esm({
|
|
|
9740
9756
|
md: "py-16",
|
|
9741
9757
|
lg: "py-24"
|
|
9742
9758
|
};
|
|
9743
|
-
ContentSection =
|
|
9759
|
+
ContentSection = React96__default.forwardRef(
|
|
9744
9760
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9745
9761
|
return /* @__PURE__ */ jsx(
|
|
9746
9762
|
Box,
|
|
@@ -10274,7 +10290,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10274
10290
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10275
10291
|
"none": {}
|
|
10276
10292
|
};
|
|
10277
|
-
AnimatedReveal =
|
|
10293
|
+
AnimatedReveal = React96__default.forwardRef(
|
|
10278
10294
|
({
|
|
10279
10295
|
trigger = "scroll",
|
|
10280
10296
|
animation = "fade-up",
|
|
@@ -10434,7 +10450,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10434
10450
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
10435
10451
|
"use client";
|
|
10436
10452
|
init_cn();
|
|
10437
|
-
AnimatedGraphic =
|
|
10453
|
+
AnimatedGraphic = React96__default.forwardRef(
|
|
10438
10454
|
({
|
|
10439
10455
|
src,
|
|
10440
10456
|
svgContent,
|
|
@@ -10457,7 +10473,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10457
10473
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10458
10474
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10459
10475
|
const prevAnimateRef = useRef(animate);
|
|
10460
|
-
const setRef =
|
|
10476
|
+
const setRef = React96__default.useCallback(
|
|
10461
10477
|
(node) => {
|
|
10462
10478
|
containerRef.current = node;
|
|
10463
10479
|
if (typeof ref === "function") ref(node);
|
|
@@ -10684,9 +10700,9 @@ function ScoreDisplay({
|
|
|
10684
10700
|
...rest
|
|
10685
10701
|
}) {
|
|
10686
10702
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
10687
|
-
const [displayValue, setDisplayValue] =
|
|
10688
|
-
const [isAnimating, setIsAnimating] =
|
|
10689
|
-
|
|
10703
|
+
const [displayValue, setDisplayValue] = React96.useState(resolvedValue);
|
|
10704
|
+
const [isAnimating, setIsAnimating] = React96.useState(false);
|
|
10705
|
+
React96.useEffect(() => {
|
|
10690
10706
|
if (!animated || displayValue === resolvedValue) {
|
|
10691
10707
|
setDisplayValue(resolvedValue);
|
|
10692
10708
|
return;
|
|
@@ -10756,9 +10772,9 @@ function ControlButton({
|
|
|
10756
10772
|
className
|
|
10757
10773
|
}) {
|
|
10758
10774
|
const eventBus = useEventBus();
|
|
10759
|
-
const [isPressed, setIsPressed] =
|
|
10775
|
+
const [isPressed, setIsPressed] = React96.useState(false);
|
|
10760
10776
|
const actualPressed = pressed ?? isPressed;
|
|
10761
|
-
const handlePointerDown =
|
|
10777
|
+
const handlePointerDown = React96.useCallback(
|
|
10762
10778
|
(e) => {
|
|
10763
10779
|
e.preventDefault();
|
|
10764
10780
|
if (disabled) return;
|
|
@@ -10768,7 +10784,7 @@ function ControlButton({
|
|
|
10768
10784
|
},
|
|
10769
10785
|
[disabled, pressEvent, eventBus, onPress]
|
|
10770
10786
|
);
|
|
10771
|
-
const handlePointerUp =
|
|
10787
|
+
const handlePointerUp = React96.useCallback(
|
|
10772
10788
|
(e) => {
|
|
10773
10789
|
e.preventDefault();
|
|
10774
10790
|
if (disabled) return;
|
|
@@ -10778,7 +10794,7 @@ function ControlButton({
|
|
|
10778
10794
|
},
|
|
10779
10795
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
10780
10796
|
);
|
|
10781
|
-
const handlePointerLeave =
|
|
10797
|
+
const handlePointerLeave = React96.useCallback(
|
|
10782
10798
|
(e) => {
|
|
10783
10799
|
if (isPressed) {
|
|
10784
10800
|
setIsPressed(false);
|
|
@@ -11684,9 +11700,9 @@ function MiniMap({
|
|
|
11684
11700
|
viewportRect,
|
|
11685
11701
|
className
|
|
11686
11702
|
}) {
|
|
11687
|
-
const canvasRef =
|
|
11688
|
-
const frameRef =
|
|
11689
|
-
|
|
11703
|
+
const canvasRef = React96.useRef(null);
|
|
11704
|
+
const frameRef = React96.useRef(0);
|
|
11705
|
+
React96.useEffect(() => {
|
|
11690
11706
|
const canvas = canvasRef.current;
|
|
11691
11707
|
if (!canvas) return;
|
|
11692
11708
|
const ctx = canvas.getContext("2d");
|
|
@@ -11980,7 +11996,7 @@ var init_ErrorBoundary = __esm({
|
|
|
11980
11996
|
"use client";
|
|
11981
11997
|
init_cn();
|
|
11982
11998
|
init_ErrorState();
|
|
11983
|
-
ErrorBoundary = class extends
|
|
11999
|
+
ErrorBoundary = class extends React96__default.Component {
|
|
11984
12000
|
constructor(props) {
|
|
11985
12001
|
super(props);
|
|
11986
12002
|
__publicField(this, "reset", () => {
|
|
@@ -12560,7 +12576,7 @@ var init_HeroSection = __esm({
|
|
|
12560
12576
|
HeroSection.displayName = "HeroSection";
|
|
12561
12577
|
}
|
|
12562
12578
|
});
|
|
12563
|
-
var ArticleSection;
|
|
12579
|
+
var maxWidthMap, ArticleSection;
|
|
12564
12580
|
var init_ArticleSection = __esm({
|
|
12565
12581
|
"components/molecules/ArticleSection.tsx"() {
|
|
12566
12582
|
"use client";
|
|
@@ -12568,6 +12584,11 @@ var init_ArticleSection = __esm({
|
|
|
12568
12584
|
init_Box();
|
|
12569
12585
|
init_Stack();
|
|
12570
12586
|
init_Typography();
|
|
12587
|
+
maxWidthMap = {
|
|
12588
|
+
sm: "max-w-full sm:max-w-xl md:max-w-2xl",
|
|
12589
|
+
md: "max-w-full sm:max-w-2xl md:max-w-3xl",
|
|
12590
|
+
lg: "max-w-full sm:max-w-3xl md:max-w-4xl"
|
|
12591
|
+
};
|
|
12571
12592
|
ArticleSection = ({
|
|
12572
12593
|
title,
|
|
12573
12594
|
children,
|
|
@@ -12582,7 +12603,7 @@ var init_ArticleSection = __esm({
|
|
|
12582
12603
|
className
|
|
12583
12604
|
),
|
|
12584
12605
|
padding: "md",
|
|
12585
|
-
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "start", children: [
|
|
12606
|
+
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "start", className: cn("w-full mx-auto", maxWidthMap[maxWidth]), children: [
|
|
12586
12607
|
/* @__PURE__ */ jsx(Typography, { variant: "h2", children: title }),
|
|
12587
12608
|
/* @__PURE__ */ jsx(Box, { className: "w-full", children })
|
|
12588
12609
|
] })
|
|
@@ -12634,6 +12655,7 @@ var init_TeamCard = __esm({
|
|
|
12634
12655
|
var gapStyles2, colStyles, SimpleGrid;
|
|
12635
12656
|
var init_SimpleGrid = __esm({
|
|
12636
12657
|
"components/molecules/SimpleGrid.tsx"() {
|
|
12658
|
+
init_Box();
|
|
12637
12659
|
init_cn();
|
|
12638
12660
|
gapStyles2 = {
|
|
12639
12661
|
none: "gap-0",
|
|
@@ -12646,10 +12668,10 @@ var init_SimpleGrid = __esm({
|
|
|
12646
12668
|
colStyles = {
|
|
12647
12669
|
1: "grid-cols-1",
|
|
12648
12670
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
12649
|
-
3: "grid-cols-1 sm:grid-cols-2
|
|
12650
|
-
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
12651
|
-
5: "grid-cols-1 sm:grid-cols-2
|
|
12652
|
-
6: "grid-cols-1 sm:grid-cols-2
|
|
12671
|
+
3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
|
|
12672
|
+
4: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",
|
|
12673
|
+
5: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",
|
|
12674
|
+
6: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6"
|
|
12653
12675
|
};
|
|
12654
12676
|
SimpleGrid = ({
|
|
12655
12677
|
minChildWidth = 250,
|
|
@@ -12660,12 +12682,12 @@ var init_SimpleGrid = __esm({
|
|
|
12660
12682
|
children
|
|
12661
12683
|
}) => {
|
|
12662
12684
|
if (cols) {
|
|
12663
|
-
return /* @__PURE__ */ jsx(
|
|
12685
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("grid", colStyles[cols], gapStyles2[gap], className), children });
|
|
12664
12686
|
}
|
|
12665
12687
|
const minWidth = typeof minChildWidth === "number" ? `${minChildWidth}px` : minChildWidth;
|
|
12666
12688
|
const templateColumns = maxCols ? `repeat(auto-fit, minmax(min(${minWidth}, 100%), 1fr))` : `repeat(auto-fit, minmax(${minWidth}, 1fr))`;
|
|
12667
12689
|
return /* @__PURE__ */ jsx(
|
|
12668
|
-
|
|
12690
|
+
Box,
|
|
12669
12691
|
{
|
|
12670
12692
|
className: cn("grid", gapStyles2[gap], className),
|
|
12671
12693
|
style: {
|
|
@@ -13055,8 +13077,8 @@ var init_Tooltip = __esm({
|
|
|
13055
13077
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
13056
13078
|
};
|
|
13057
13079
|
}, []);
|
|
13058
|
-
const triggerElement =
|
|
13059
|
-
const trigger =
|
|
13080
|
+
const triggerElement = React96__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
13081
|
+
const trigger = React96__default.cloneElement(triggerElement, {
|
|
13060
13082
|
ref: triggerRef,
|
|
13061
13083
|
onMouseEnter: handleMouseEnter,
|
|
13062
13084
|
onMouseLeave: handleMouseLeave,
|
|
@@ -13177,8 +13199,8 @@ var init_Popover = __esm({
|
|
|
13177
13199
|
onMouseEnter: handleOpen,
|
|
13178
13200
|
onMouseLeave: handleClose
|
|
13179
13201
|
};
|
|
13180
|
-
const childElement =
|
|
13181
|
-
const triggerElement =
|
|
13202
|
+
const childElement = React96__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
13203
|
+
const triggerElement = React96__default.cloneElement(
|
|
13182
13204
|
childElement,
|
|
13183
13205
|
{
|
|
13184
13206
|
ref: triggerRef,
|
|
@@ -13227,6 +13249,7 @@ var Menu;
|
|
|
13227
13249
|
var init_Menu = __esm({
|
|
13228
13250
|
"components/molecules/Menu.tsx"() {
|
|
13229
13251
|
"use client";
|
|
13252
|
+
init_Box();
|
|
13230
13253
|
init_Icon();
|
|
13231
13254
|
init_Divider();
|
|
13232
13255
|
init_Typography();
|
|
@@ -13295,8 +13318,8 @@ var init_Menu = __esm({
|
|
|
13295
13318
|
"bottom-start": "top-full left-0 mt-2",
|
|
13296
13319
|
"bottom-end": "top-full right-0 mt-2"
|
|
13297
13320
|
};
|
|
13298
|
-
const triggerChild =
|
|
13299
|
-
const triggerElement =
|
|
13321
|
+
const triggerChild = React96__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
13322
|
+
const triggerElement = React96__default.cloneElement(
|
|
13300
13323
|
triggerChild,
|
|
13301
13324
|
{
|
|
13302
13325
|
ref: triggerRef,
|
|
@@ -13308,17 +13331,17 @@ var init_Menu = __esm({
|
|
|
13308
13331
|
"border-[length:var(--border-width)] border-border",
|
|
13309
13332
|
"shadow",
|
|
13310
13333
|
"rounded-sm",
|
|
13311
|
-
"min-w-[200px] py-1"
|
|
13334
|
+
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
13312
13335
|
);
|
|
13313
13336
|
const renderMenuItem = (item, hasSubMenu, index) => {
|
|
13314
13337
|
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
13315
13338
|
const isDanger = item.variant === "danger";
|
|
13316
13339
|
return /* @__PURE__ */ jsx(
|
|
13317
|
-
|
|
13340
|
+
Box,
|
|
13318
13341
|
{
|
|
13319
|
-
|
|
13320
|
-
onClick: () => handleItemClick({ ...item, id: itemId }),
|
|
13321
|
-
disabled: item.disabled,
|
|
13342
|
+
as: "button",
|
|
13343
|
+
onClick: () => !item.disabled && handleItemClick({ ...item, id: itemId }),
|
|
13344
|
+
"aria-disabled": item.disabled || void 0,
|
|
13322
13345
|
onMouseEnter: () => hasSubMenu && setActiveSubMenu(itemId),
|
|
13323
13346
|
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
13324
13347
|
className: cn(
|
|
@@ -13330,7 +13353,7 @@ var init_Menu = __esm({
|
|
|
13330
13353
|
item.disabled && "cursor-not-allowed",
|
|
13331
13354
|
isDanger && "text-error hover:bg-error/10"
|
|
13332
13355
|
),
|
|
13333
|
-
children: /* @__PURE__ */ jsxs(
|
|
13356
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
13334
13357
|
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
13335
13358
|
/* @__PURE__ */ jsx(
|
|
13336
13359
|
Typography,
|
|
@@ -13355,10 +13378,10 @@ var init_Menu = __esm({
|
|
|
13355
13378
|
if (isDivider) {
|
|
13356
13379
|
return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
13357
13380
|
}
|
|
13358
|
-
return /* @__PURE__ */ jsxs(
|
|
13381
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
13359
13382
|
renderMenuItem(item, !!hasSubMenu, index),
|
|
13360
13383
|
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsx(
|
|
13361
|
-
|
|
13384
|
+
Box,
|
|
13362
13385
|
{
|
|
13363
13386
|
className: cn(
|
|
13364
13387
|
"absolute left-full top-0 ml-2 z-50",
|
|
@@ -13370,10 +13393,10 @@ var init_Menu = __esm({
|
|
|
13370
13393
|
] }, itemId);
|
|
13371
13394
|
});
|
|
13372
13395
|
};
|
|
13373
|
-
return /* @__PURE__ */ jsxs(
|
|
13396
|
+
return /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
13374
13397
|
triggerElement,
|
|
13375
13398
|
isOpen && triggerRect && /* @__PURE__ */ jsx(
|
|
13376
|
-
|
|
13399
|
+
Box,
|
|
13377
13400
|
{
|
|
13378
13401
|
ref: menuRef,
|
|
13379
13402
|
className: cn(
|
|
@@ -13712,13 +13735,13 @@ var init_MapView = __esm({
|
|
|
13712
13735
|
shadowSize: [41, 41]
|
|
13713
13736
|
});
|
|
13714
13737
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
13715
|
-
const { useEffect:
|
|
13738
|
+
const { useEffect: useEffect88, useRef: useRef88, useCallback: useCallback128, useState: useState122 } = React96__default;
|
|
13716
13739
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
13717
13740
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
13718
13741
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
13719
13742
|
const map = useMap();
|
|
13720
13743
|
const prevRef = useRef88({ centerLat, centerLng, zoom });
|
|
13721
|
-
|
|
13744
|
+
useEffect88(() => {
|
|
13722
13745
|
const prev = prevRef.current;
|
|
13723
13746
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
13724
13747
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -13729,7 +13752,7 @@ var init_MapView = __esm({
|
|
|
13729
13752
|
}
|
|
13730
13753
|
function MapClickHandler({ onMapClick }) {
|
|
13731
13754
|
const map = useMap();
|
|
13732
|
-
|
|
13755
|
+
useEffect88(() => {
|
|
13733
13756
|
if (!onMapClick) return;
|
|
13734
13757
|
const handler = (e) => {
|
|
13735
13758
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -13757,7 +13780,7 @@ var init_MapView = __esm({
|
|
|
13757
13780
|
showAttribution = true
|
|
13758
13781
|
}) {
|
|
13759
13782
|
const eventBus = useEventBus3();
|
|
13760
|
-
const [clickedPosition, setClickedPosition] =
|
|
13783
|
+
const [clickedPosition, setClickedPosition] = useState122(null);
|
|
13761
13784
|
const handleMapClick = useCallback128((lat, lng) => {
|
|
13762
13785
|
if (showClickedPin) {
|
|
13763
13786
|
setClickedPosition({ lat, lng });
|
|
@@ -13958,7 +13981,7 @@ function InputPattern({
|
|
|
13958
13981
|
fieldName
|
|
13959
13982
|
}) {
|
|
13960
13983
|
const { emit } = useEventBus();
|
|
13961
|
-
const [localValue, setLocalValue] =
|
|
13984
|
+
const [localValue, setLocalValue] = React96__default.useState(value);
|
|
13962
13985
|
const handleChange = (e) => {
|
|
13963
13986
|
setLocalValue(e.target.value);
|
|
13964
13987
|
if (onChange) {
|
|
@@ -13996,7 +14019,7 @@ function TextareaPattern({
|
|
|
13996
14019
|
fieldName
|
|
13997
14020
|
}) {
|
|
13998
14021
|
const { emit } = useEventBus();
|
|
13999
|
-
const [localValue, setLocalValue] =
|
|
14022
|
+
const [localValue, setLocalValue] = React96__default.useState(value);
|
|
14000
14023
|
const handleChange = (e) => {
|
|
14001
14024
|
setLocalValue(e.target.value);
|
|
14002
14025
|
if (onChange) {
|
|
@@ -14028,7 +14051,7 @@ function SelectPattern({
|
|
|
14028
14051
|
fieldName
|
|
14029
14052
|
}) {
|
|
14030
14053
|
const { emit } = useEventBus();
|
|
14031
|
-
const [localValue, setLocalValue] =
|
|
14054
|
+
const [localValue, setLocalValue] = React96__default.useState(value);
|
|
14032
14055
|
const handleChange = (e) => {
|
|
14033
14056
|
setLocalValue(e.target.value);
|
|
14034
14057
|
if (onChange) {
|
|
@@ -14057,7 +14080,7 @@ function CheckboxPattern({
|
|
|
14057
14080
|
className
|
|
14058
14081
|
}) {
|
|
14059
14082
|
const { emit } = useEventBus();
|
|
14060
|
-
const [localChecked, setLocalChecked] =
|
|
14083
|
+
const [localChecked, setLocalChecked] = React96__default.useState(checked);
|
|
14061
14084
|
const handleChange = (e) => {
|
|
14062
14085
|
setLocalChecked(e.target.checked);
|
|
14063
14086
|
if (onChange) {
|
|
@@ -14288,8 +14311,8 @@ function ActionButtons({
|
|
|
14288
14311
|
disabled
|
|
14289
14312
|
}) {
|
|
14290
14313
|
const eventBus = useEventBus();
|
|
14291
|
-
const [activeButtons, setActiveButtons] =
|
|
14292
|
-
const handlePress =
|
|
14314
|
+
const [activeButtons, setActiveButtons] = React96.useState(/* @__PURE__ */ new Set());
|
|
14315
|
+
const handlePress = React96.useCallback(
|
|
14293
14316
|
(id) => {
|
|
14294
14317
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
14295
14318
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -14297,7 +14320,7 @@ function ActionButtons({
|
|
|
14297
14320
|
},
|
|
14298
14321
|
[actionEvent, eventBus, onAction]
|
|
14299
14322
|
);
|
|
14300
|
-
const handleRelease =
|
|
14323
|
+
const handleRelease = React96.useCallback(
|
|
14301
14324
|
(id) => {
|
|
14302
14325
|
setActiveButtons((prev) => {
|
|
14303
14326
|
const next = new Set(prev);
|
|
@@ -16361,7 +16384,7 @@ var init_MarkdownContent = __esm({
|
|
|
16361
16384
|
init_Box();
|
|
16362
16385
|
init_useTranslate();
|
|
16363
16386
|
init_cn();
|
|
16364
|
-
MarkdownContent =
|
|
16387
|
+
MarkdownContent = React96__default.memo(
|
|
16365
16388
|
({ content, direction, className }) => {
|
|
16366
16389
|
const { t: _t } = useTranslate();
|
|
16367
16390
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -16579,7 +16602,7 @@ var init_CodeBlock = __esm({
|
|
|
16579
16602
|
log8 = createLogger("almadar:ui:markdown-code");
|
|
16580
16603
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
16581
16604
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
16582
|
-
CodeBlock =
|
|
16605
|
+
CodeBlock = React96__default.memo(
|
|
16583
16606
|
({
|
|
16584
16607
|
code: rawCode,
|
|
16585
16608
|
language = "text",
|
|
@@ -17888,7 +17911,7 @@ var init_StateMachineView = __esm({
|
|
|
17888
17911
|
style: { top: title ? 30 : 0 },
|
|
17889
17912
|
children: [
|
|
17890
17913
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
17891
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
17914
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React96__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
17892
17915
|
StateNode,
|
|
17893
17916
|
{
|
|
17894
17917
|
state,
|
|
@@ -19469,27 +19492,23 @@ var init_Grid = __esm({
|
|
|
19469
19492
|
as: Component2 = "div"
|
|
19470
19493
|
}) => {
|
|
19471
19494
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
19472
|
-
|
|
19473
|
-
|
|
19474
|
-
Comp,
|
|
19495
|
+
return React96__default.createElement(
|
|
19496
|
+
Component2,
|
|
19475
19497
|
{
|
|
19476
19498
|
className: cn(
|
|
19477
19499
|
"grid",
|
|
19478
19500
|
getColsClass(cols),
|
|
19479
|
-
// Gap (rowGap/colGap override gap)
|
|
19480
19501
|
rowGap ? rowGapStyles[rowGap] : colGap ? void 0 : gapStyles3[gap],
|
|
19481
19502
|
colGap ? colGapStyles[colGap] : rowGap ? void 0 : void 0,
|
|
19482
19503
|
rowGap && colGap ? `${rowGapStyles[rowGap]} ${colGapStyles[colGap]}` : void 0,
|
|
19483
|
-
// Alignment
|
|
19484
19504
|
alignItems && alignStyles2[alignItems],
|
|
19485
19505
|
justifyItems && justifyStyles2[justifyItems],
|
|
19486
|
-
// Flow
|
|
19487
19506
|
flow && flowStyles[flow],
|
|
19488
19507
|
className
|
|
19489
19508
|
),
|
|
19490
|
-
style: mergedStyle
|
|
19491
|
-
|
|
19492
|
-
|
|
19509
|
+
style: mergedStyle
|
|
19510
|
+
},
|
|
19511
|
+
children
|
|
19493
19512
|
);
|
|
19494
19513
|
};
|
|
19495
19514
|
Grid.displayName = "Grid";
|
|
@@ -20508,6 +20527,35 @@ var init_useSwipeGesture = __esm({
|
|
|
20508
20527
|
"use client";
|
|
20509
20528
|
}
|
|
20510
20529
|
});
|
|
20530
|
+
function dayWindowForViewport(width) {
|
|
20531
|
+
if (width <= 640) return 1;
|
|
20532
|
+
if (width <= 1024) return 3;
|
|
20533
|
+
return 7;
|
|
20534
|
+
}
|
|
20535
|
+
function useDayWindow(override) {
|
|
20536
|
+
const [w, setW] = useState(() => {
|
|
20537
|
+
if (override !== "auto") return override;
|
|
20538
|
+
if (typeof window === "undefined") return 7;
|
|
20539
|
+
return dayWindowForViewport(window.innerWidth);
|
|
20540
|
+
});
|
|
20541
|
+
useEffect(() => {
|
|
20542
|
+
if (override !== "auto") {
|
|
20543
|
+
setW(override);
|
|
20544
|
+
return void 0;
|
|
20545
|
+
}
|
|
20546
|
+
if (typeof window === "undefined") return void 0;
|
|
20547
|
+
const onResize = () => setW(dayWindowForViewport(window.innerWidth));
|
|
20548
|
+
onResize();
|
|
20549
|
+
window.addEventListener("resize", onResize);
|
|
20550
|
+
return () => window.removeEventListener("resize", onResize);
|
|
20551
|
+
}, [override]);
|
|
20552
|
+
return w;
|
|
20553
|
+
}
|
|
20554
|
+
function formatDateRange(start, end) {
|
|
20555
|
+
const startStr = start.toLocaleDateString(void 0, SHORT_DATE);
|
|
20556
|
+
const endStr = end.toLocaleDateString(void 0, SHORT_DATE);
|
|
20557
|
+
return start.toDateString() === end.toDateString() ? startStr : `${startStr} \u2013 ${endStr}`;
|
|
20558
|
+
}
|
|
20511
20559
|
function getStartOfWeek(date) {
|
|
20512
20560
|
const d = new Date(date);
|
|
20513
20561
|
const day = d.getDay();
|
|
@@ -20548,7 +20596,8 @@ function CalendarGrid({
|
|
|
20548
20596
|
longPressEvent,
|
|
20549
20597
|
longPressPayload,
|
|
20550
20598
|
swipeLeftEvent,
|
|
20551
|
-
swipeRightEvent
|
|
20599
|
+
swipeRightEvent,
|
|
20600
|
+
dayWindow = "auto"
|
|
20552
20601
|
}) {
|
|
20553
20602
|
const eventBus = useEventBus();
|
|
20554
20603
|
const longPressTimer = useRef(null);
|
|
@@ -20564,6 +20613,26 @@ function CalendarGrid({
|
|
|
20564
20613
|
() => timeSlots ?? generateDefaultTimeSlots(),
|
|
20565
20614
|
[timeSlots]
|
|
20566
20615
|
);
|
|
20616
|
+
const visibleCount = useDayWindow(dayWindow);
|
|
20617
|
+
const [dayOffset, setDayOffset] = useState(0);
|
|
20618
|
+
useEffect(() => {
|
|
20619
|
+
if (dayOffset + visibleCount > 7) {
|
|
20620
|
+
setDayOffset(Math.max(0, 7 - visibleCount));
|
|
20621
|
+
}
|
|
20622
|
+
}, [visibleCount, dayOffset]);
|
|
20623
|
+
const visibleDays = useMemo(
|
|
20624
|
+
() => weekDays.slice(dayOffset, dayOffset + visibleCount),
|
|
20625
|
+
[weekDays, dayOffset, visibleCount]
|
|
20626
|
+
);
|
|
20627
|
+
const canPrev = dayOffset > 0;
|
|
20628
|
+
const canNext = dayOffset + visibleCount < 7;
|
|
20629
|
+
const stepPrev = useCallback(() => {
|
|
20630
|
+
setDayOffset((d) => Math.max(0, d - visibleCount));
|
|
20631
|
+
}, [visibleCount]);
|
|
20632
|
+
const stepNext = useCallback(() => {
|
|
20633
|
+
setDayOffset((d) => Math.min(7 - visibleCount, d + visibleCount));
|
|
20634
|
+
}, [visibleCount]);
|
|
20635
|
+
const gridColsClass = visibleCount === 1 ? "grid-cols-2" : visibleCount === 3 ? "grid-cols-4" : "grid-cols-8";
|
|
20567
20636
|
const handleSlotClick = useCallback(
|
|
20568
20637
|
(day, time) => {
|
|
20569
20638
|
onSlotClick?.(day, time);
|
|
@@ -20615,93 +20684,124 @@ function CalendarGrid({
|
|
|
20615
20684
|
},
|
|
20616
20685
|
event.id
|
|
20617
20686
|
);
|
|
20618
|
-
return /* @__PURE__ */
|
|
20687
|
+
return /* @__PURE__ */ jsxs(
|
|
20619
20688
|
Box,
|
|
20620
20689
|
{
|
|
20621
|
-
className
|
|
20690
|
+
className,
|
|
20622
20691
|
...swipeLeftEvent || swipeRightEvent ? {
|
|
20623
20692
|
onPointerDown: swipe.onPointerDown,
|
|
20624
20693
|
onPointerMove: swipe.onPointerMove,
|
|
20625
20694
|
onPointerUp: swipe.onPointerUp,
|
|
20626
20695
|
onPointerCancel: swipe.onPointerCancel
|
|
20627
20696
|
} : {},
|
|
20628
|
-
children:
|
|
20629
|
-
/* @__PURE__ */ jsxs(
|
|
20630
|
-
/* @__PURE__ */ jsx(
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20636
|
-
|
|
20637
|
-
|
|
20638
|
-
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20697
|
+
children: [
|
|
20698
|
+
visibleCount < 7 && /* @__PURE__ */ jsxs(HStack, { align: "center", justify: "between", className: "mb-2 px-2", children: [
|
|
20699
|
+
/* @__PURE__ */ jsx(
|
|
20700
|
+
Button,
|
|
20701
|
+
{
|
|
20702
|
+
variant: "ghost",
|
|
20703
|
+
size: "sm",
|
|
20704
|
+
icon: ChevronLeft,
|
|
20705
|
+
onClick: stepPrev,
|
|
20706
|
+
"aria-disabled": !canPrev || void 0,
|
|
20707
|
+
"aria-label": "Previous days",
|
|
20708
|
+
children: "Prev"
|
|
20709
|
+
}
|
|
20710
|
+
),
|
|
20711
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
20712
|
+
/* @__PURE__ */ jsx(
|
|
20713
|
+
Button,
|
|
20714
|
+
{
|
|
20715
|
+
variant: "ghost",
|
|
20716
|
+
size: "sm",
|
|
20717
|
+
iconRight: ChevronRight,
|
|
20718
|
+
onClick: stepNext,
|
|
20719
|
+
"aria-disabled": !canNext || void 0,
|
|
20720
|
+
"aria-label": "Next days",
|
|
20721
|
+
children: "Next"
|
|
20722
|
+
}
|
|
20723
|
+
)
|
|
20653
20724
|
] }),
|
|
20654
|
-
/* @__PURE__ */
|
|
20655
|
-
Box,
|
|
20656
|
-
|
|
20657
|
-
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20725
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
20726
|
+
/* @__PURE__ */ jsxs(Box, { className: cn("grid border-b border-border", gridColsClass), children: [
|
|
20727
|
+
/* @__PURE__ */ jsx(Box, { className: "p-2" }),
|
|
20728
|
+
visibleDays.map((day) => {
|
|
20729
|
+
const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
20730
|
+
const count = eventsForDayCount(day);
|
|
20731
|
+
return /* @__PURE__ */ jsxs(
|
|
20732
|
+
Box,
|
|
20661
20733
|
{
|
|
20662
|
-
|
|
20663
|
-
|
|
20664
|
-
|
|
20665
|
-
|
|
20666
|
-
|
|
20667
|
-
|
|
20668
|
-
|
|
20669
|
-
|
|
20670
|
-
|
|
20671
|
-
const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
20672
|
-
return /* @__PURE__ */ jsx(
|
|
20673
|
-
TimeSlotCell,
|
|
20674
|
-
{
|
|
20675
|
-
time,
|
|
20676
|
-
isOccupied: slotEvents.length > 0,
|
|
20677
|
-
onClick: () => handleSlotClick(day, time),
|
|
20678
|
-
className: cn(
|
|
20679
|
-
"border-l border-border",
|
|
20680
|
-
isToday && "bg-blue-50/30"
|
|
20734
|
+
className: "border-l border-border",
|
|
20735
|
+
children: [
|
|
20736
|
+
/* @__PURE__ */ jsx(
|
|
20737
|
+
DayCell,
|
|
20738
|
+
{
|
|
20739
|
+
date: day,
|
|
20740
|
+
isToday,
|
|
20741
|
+
onClick: onDayClick
|
|
20742
|
+
}
|
|
20681
20743
|
),
|
|
20682
|
-
|
|
20683
|
-
|
|
20684
|
-
|
|
20685
|
-
|
|
20686
|
-
|
|
20687
|
-
|
|
20688
|
-
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
|
|
20695
|
-
|
|
20696
|
-
|
|
20744
|
+
count > 0 && /* @__PURE__ */ jsx(Box, { className: "text-center pb-1", children: /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: count }) })
|
|
20745
|
+
]
|
|
20746
|
+
},
|
|
20747
|
+
day.toISOString()
|
|
20748
|
+
);
|
|
20749
|
+
})
|
|
20750
|
+
] }),
|
|
20751
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-[500px] overflow-y-auto", children: resolvedTimeSlots.map((time) => /* @__PURE__ */ jsxs(
|
|
20752
|
+
Box,
|
|
20753
|
+
{
|
|
20754
|
+
className: cn("grid border-b border-border", gridColsClass),
|
|
20755
|
+
children: [
|
|
20756
|
+
/* @__PURE__ */ jsx(Box, { className: "p-2 text-right pr-3", children: /* @__PURE__ */ jsx(
|
|
20757
|
+
Typography,
|
|
20758
|
+
{
|
|
20759
|
+
variant: "small",
|
|
20760
|
+
className: "text-muted-foreground",
|
|
20761
|
+
children: time
|
|
20762
|
+
}
|
|
20763
|
+
) }),
|
|
20764
|
+
visibleDays.map((day) => {
|
|
20765
|
+
const slotEvents = events2.filter(
|
|
20766
|
+
(ev) => eventInSlot(ev, day, time)
|
|
20767
|
+
);
|
|
20768
|
+
const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
20769
|
+
return /* @__PURE__ */ jsx(
|
|
20770
|
+
TimeSlotCell,
|
|
20771
|
+
{
|
|
20772
|
+
time,
|
|
20773
|
+
isOccupied: slotEvents.length > 0,
|
|
20774
|
+
onClick: () => handleSlotClick(day, time),
|
|
20775
|
+
className: cn(
|
|
20776
|
+
"border-l border-border",
|
|
20777
|
+
isToday && "bg-blue-50/30"
|
|
20778
|
+
),
|
|
20779
|
+
...longPressEvent ? {
|
|
20780
|
+
onPointerDown: () => startLongPress(day, time),
|
|
20781
|
+
onPointerUp: clearLongPress,
|
|
20782
|
+
onPointerCancel: clearLongPress
|
|
20783
|
+
} : {},
|
|
20784
|
+
children: /* @__PURE__ */ jsx(VStack, { gap: "xs", children: slotEvents.map(renderEvent) })
|
|
20785
|
+
},
|
|
20786
|
+
`${day.toISOString()}-${time}`
|
|
20787
|
+
);
|
|
20788
|
+
})
|
|
20789
|
+
]
|
|
20790
|
+
},
|
|
20791
|
+
time
|
|
20792
|
+
)) })
|
|
20793
|
+
] })
|
|
20794
|
+
]
|
|
20697
20795
|
}
|
|
20698
20796
|
);
|
|
20699
20797
|
}
|
|
20798
|
+
var SHORT_DATE;
|
|
20700
20799
|
var init_CalendarGrid = __esm({
|
|
20701
20800
|
"components/molecules/CalendarGrid.tsx"() {
|
|
20702
20801
|
"use client";
|
|
20703
20802
|
init_cn();
|
|
20704
20803
|
init_Box();
|
|
20804
|
+
init_Button();
|
|
20705
20805
|
init_Stack();
|
|
20706
20806
|
init_Typography();
|
|
20707
20807
|
init_Badge();
|
|
@@ -20709,6 +20809,7 @@ var init_CalendarGrid = __esm({
|
|
|
20709
20809
|
init_TimeSlotCell();
|
|
20710
20810
|
init_useEventBus();
|
|
20711
20811
|
init_useSwipeGesture();
|
|
20812
|
+
SHORT_DATE = { month: "short", day: "numeric" };
|
|
20712
20813
|
CalendarGrid.displayName = "CalendarGrid";
|
|
20713
20814
|
}
|
|
20714
20815
|
});
|
|
@@ -23870,9 +23971,9 @@ var init_Tabs = __esm({
|
|
|
23870
23971
|
className
|
|
23871
23972
|
}) => {
|
|
23872
23973
|
const rawItems = items ?? tabs ?? [];
|
|
23873
|
-
const safeItems = rawItems.map((
|
|
23874
|
-
...
|
|
23875
|
-
id:
|
|
23974
|
+
const safeItems = rawItems.map(({ id, value, ...rest }) => ({
|
|
23975
|
+
...rest,
|
|
23976
|
+
id: id || value || ""
|
|
23876
23977
|
}));
|
|
23877
23978
|
const eventBus = useEventBus();
|
|
23878
23979
|
const { t } = useTranslate();
|
|
@@ -23941,7 +24042,12 @@ var init_Tabs = __esm({
|
|
|
23941
24042
|
role: "tablist",
|
|
23942
24043
|
className: cn(
|
|
23943
24044
|
"flex",
|
|
23944
|
-
|
|
24045
|
+
// Horizontal tab strip becomes a horizontally-scrollable lane
|
|
24046
|
+
// below its container width — phones with many tabs scroll
|
|
24047
|
+
// instead of clipping. `snap-x` snaps to each tab; the
|
|
24048
|
+
// scrollbar is hidden for a cleaner affordance (the swipe
|
|
24049
|
+
// gesture is the discoverability cue).
|
|
24050
|
+
orientation === "horizontal" ? "flex-row border-b-[length:var(--border-width)] border-border overflow-x-auto snap-x snap-mandatory [&::-webkit-scrollbar]:hidden" : "flex-col border-r-[length:var(--border-width)] border-border",
|
|
23945
24051
|
variant === "pills" && "gap-1 p-1 bg-muted border-0 rounded-md",
|
|
23946
24052
|
variant === "underline" && orientation === "vertical" && "border-b-0"
|
|
23947
24053
|
),
|
|
@@ -23963,7 +24069,8 @@ var init_Tabs = __esm({
|
|
|
23963
24069
|
onKeyDown: (e) => handleKeyDown(e, index),
|
|
23964
24070
|
"data-active": isActive,
|
|
23965
24071
|
className: cn(
|
|
23966
|
-
"flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all",
|
|
24072
|
+
"flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all whitespace-nowrap",
|
|
24073
|
+
orientation === "horizontal" && "snap-start shrink-0",
|
|
23967
24074
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
23968
24075
|
isDisabled && "opacity-50 cursor-not-allowed",
|
|
23969
24076
|
variantClasses2[variant],
|
|
@@ -24728,7 +24835,7 @@ function CraftingRecipe({
|
|
|
24728
24835
|
className
|
|
24729
24836
|
}) {
|
|
24730
24837
|
const eventBus = useEventBus();
|
|
24731
|
-
const handleCraft =
|
|
24838
|
+
const handleCraft = React96.useCallback(() => {
|
|
24732
24839
|
onCraft?.();
|
|
24733
24840
|
if (craftEvent) {
|
|
24734
24841
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -24745,7 +24852,7 @@ function CraftingRecipe({
|
|
|
24745
24852
|
children: [
|
|
24746
24853
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
24747
24854
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
24748
|
-
return /* @__PURE__ */ jsxs(
|
|
24855
|
+
return /* @__PURE__ */ jsxs(React96.Fragment, { children: [
|
|
24749
24856
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
24750
24857
|
ItemSlot,
|
|
24751
24858
|
{
|
|
@@ -24808,8 +24915,8 @@ function DPad({
|
|
|
24808
24915
|
}) {
|
|
24809
24916
|
const eventBus = useEventBus();
|
|
24810
24917
|
const sizes = sizeMap15[size];
|
|
24811
|
-
const [activeDirections, setActiveDirections] =
|
|
24812
|
-
const handlePress =
|
|
24918
|
+
const [activeDirections, setActiveDirections] = React96.useState(/* @__PURE__ */ new Set());
|
|
24919
|
+
const handlePress = React96.useCallback(
|
|
24813
24920
|
(direction) => {
|
|
24814
24921
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
24815
24922
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -24817,7 +24924,7 @@ function DPad({
|
|
|
24817
24924
|
},
|
|
24818
24925
|
[directionEvent, eventBus, onDirection]
|
|
24819
24926
|
);
|
|
24820
|
-
const handleRelease =
|
|
24927
|
+
const handleRelease = React96.useCallback(
|
|
24821
24928
|
(direction) => {
|
|
24822
24929
|
setActiveDirections((prev) => {
|
|
24823
24930
|
const next = new Set(prev);
|
|
@@ -25358,14 +25465,14 @@ function useDataDnd(args) {
|
|
|
25358
25465
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25359
25466
|
const enabled = isZone || Boolean(dndRoot);
|
|
25360
25467
|
const eventBus = useEventBus();
|
|
25361
|
-
const parentRoot =
|
|
25468
|
+
const parentRoot = React96__default.useContext(RootCtx);
|
|
25362
25469
|
const isRoot = enabled && parentRoot === null;
|
|
25363
|
-
const zoneId =
|
|
25470
|
+
const zoneId = React96__default.useId();
|
|
25364
25471
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25365
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25366
|
-
const optimisticOrdersRef =
|
|
25472
|
+
const [optimisticOrders, setOptimisticOrders] = React96__default.useState(() => /* @__PURE__ */ new Map());
|
|
25473
|
+
const optimisticOrdersRef = React96__default.useRef(optimisticOrders);
|
|
25367
25474
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25368
|
-
const clearOptimisticOrder =
|
|
25475
|
+
const clearOptimisticOrder = React96__default.useCallback((group) => {
|
|
25369
25476
|
setOptimisticOrders((prev) => {
|
|
25370
25477
|
if (!prev.has(group)) return prev;
|
|
25371
25478
|
const next = new Map(prev);
|
|
@@ -25390,16 +25497,15 @@ function useDataDnd(args) {
|
|
|
25390
25497
|
const raw = it[dndItemIdField];
|
|
25391
25498
|
return String(raw ?? `__idx_${idx}`);
|
|
25392
25499
|
}).join("|");
|
|
25393
|
-
const itemIds =
|
|
25500
|
+
const itemIds = React96__default.useMemo(
|
|
25394
25501
|
() => orderedItems.map((it, idx) => {
|
|
25395
25502
|
const raw = it[dndItemIdField];
|
|
25396
25503
|
return raw ?? `__idx_${idx}`;
|
|
25397
25504
|
}),
|
|
25398
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25399
25505
|
[itemIdsSignature]
|
|
25400
25506
|
);
|
|
25401
25507
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
25402
|
-
|
|
25508
|
+
React96__default.useEffect(() => {
|
|
25403
25509
|
const root = isRoot ? null : parentRoot;
|
|
25404
25510
|
if (root) {
|
|
25405
25511
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25407,20 +25513,20 @@ function useDataDnd(args) {
|
|
|
25407
25513
|
clearOptimisticOrder(ownGroup);
|
|
25408
25514
|
}
|
|
25409
25515
|
}, [itemsContentSig, ownGroup]);
|
|
25410
|
-
const zonesRef =
|
|
25411
|
-
const registerZone =
|
|
25516
|
+
const zonesRef = React96__default.useRef(/* @__PURE__ */ new Map());
|
|
25517
|
+
const registerZone = React96__default.useCallback((zoneId2, meta2) => {
|
|
25412
25518
|
zonesRef.current.set(zoneId2, meta2);
|
|
25413
25519
|
}, []);
|
|
25414
|
-
const unregisterZone =
|
|
25520
|
+
const unregisterZone = React96__default.useCallback((zoneId2) => {
|
|
25415
25521
|
zonesRef.current.delete(zoneId2);
|
|
25416
25522
|
}, []);
|
|
25417
|
-
const [activeDrag, setActiveDrag] =
|
|
25418
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25419
|
-
const meta =
|
|
25523
|
+
const [activeDrag, setActiveDrag] = React96__default.useState(null);
|
|
25524
|
+
const [overZoneGroup, setOverZoneGroup] = React96__default.useState(null);
|
|
25525
|
+
const meta = React96__default.useMemo(
|
|
25420
25526
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25421
25527
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25422
25528
|
);
|
|
25423
|
-
|
|
25529
|
+
React96__default.useEffect(() => {
|
|
25424
25530
|
const target = isRoot ? null : parentRoot;
|
|
25425
25531
|
if (!target) {
|
|
25426
25532
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25439,7 +25545,7 @@ function useDataDnd(args) {
|
|
|
25439
25545
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25440
25546
|
const sensors = useAlmadarDndSensors(true);
|
|
25441
25547
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25442
|
-
const findZoneByItem =
|
|
25548
|
+
const findZoneByItem = React96__default.useCallback(
|
|
25443
25549
|
(id) => {
|
|
25444
25550
|
for (const z of zonesRef.current.values()) {
|
|
25445
25551
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25448,7 +25554,7 @@ function useDataDnd(args) {
|
|
|
25448
25554
|
},
|
|
25449
25555
|
[]
|
|
25450
25556
|
);
|
|
25451
|
-
|
|
25557
|
+
React96__default.useCallback(
|
|
25452
25558
|
(group) => {
|
|
25453
25559
|
for (const z of zonesRef.current.values()) {
|
|
25454
25560
|
if (z.group === group) return z;
|
|
@@ -25457,7 +25563,7 @@ function useDataDnd(args) {
|
|
|
25457
25563
|
},
|
|
25458
25564
|
[]
|
|
25459
25565
|
);
|
|
25460
|
-
const handleDragEnd =
|
|
25566
|
+
const handleDragEnd = React96__default.useCallback(
|
|
25461
25567
|
(event) => {
|
|
25462
25568
|
const { active, over } = event;
|
|
25463
25569
|
const activeIdStr = String(active.id);
|
|
@@ -25548,8 +25654,8 @@ function useDataDnd(args) {
|
|
|
25548
25654
|
},
|
|
25549
25655
|
[eventBus]
|
|
25550
25656
|
);
|
|
25551
|
-
const sortableData =
|
|
25552
|
-
const SortableItem =
|
|
25657
|
+
const sortableData = React96__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25658
|
+
const SortableItem = React96__default.useCallback(
|
|
25553
25659
|
({ id, children }) => {
|
|
25554
25660
|
const {
|
|
25555
25661
|
attributes,
|
|
@@ -25589,7 +25695,7 @@ function useDataDnd(args) {
|
|
|
25589
25695
|
id: droppableId,
|
|
25590
25696
|
data: sortableData
|
|
25591
25697
|
});
|
|
25592
|
-
const ctx =
|
|
25698
|
+
const ctx = React96__default.useContext(RootCtx);
|
|
25593
25699
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25594
25700
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25595
25701
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25604,7 +25710,7 @@ function useDataDnd(args) {
|
|
|
25604
25710
|
showForeignPlaceholder,
|
|
25605
25711
|
ctxAvailable: ctx != null
|
|
25606
25712
|
});
|
|
25607
|
-
|
|
25713
|
+
React96__default.useEffect(() => {
|
|
25608
25714
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25609
25715
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25610
25716
|
return /* @__PURE__ */ jsx(
|
|
@@ -25618,11 +25724,11 @@ function useDataDnd(args) {
|
|
|
25618
25724
|
}
|
|
25619
25725
|
);
|
|
25620
25726
|
};
|
|
25621
|
-
const rootContextValue =
|
|
25727
|
+
const rootContextValue = React96__default.useMemo(
|
|
25622
25728
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25623
25729
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25624
25730
|
);
|
|
25625
|
-
const handleDragStart =
|
|
25731
|
+
const handleDragStart = React96__default.useCallback((event) => {
|
|
25626
25732
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25627
25733
|
const rect = event.active.rect.current.initial;
|
|
25628
25734
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25641,7 +25747,7 @@ function useDataDnd(args) {
|
|
|
25641
25747
|
isRoot
|
|
25642
25748
|
});
|
|
25643
25749
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25644
|
-
const handleDragOver =
|
|
25750
|
+
const handleDragOver = React96__default.useCallback((event) => {
|
|
25645
25751
|
const { active, over } = event;
|
|
25646
25752
|
const overData = over?.data?.current;
|
|
25647
25753
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25711,7 +25817,7 @@ function useDataDnd(args) {
|
|
|
25711
25817
|
return next;
|
|
25712
25818
|
});
|
|
25713
25819
|
}, []);
|
|
25714
|
-
const handleDragCancel =
|
|
25820
|
+
const handleDragCancel = React96__default.useCallback((event) => {
|
|
25715
25821
|
setActiveDrag(null);
|
|
25716
25822
|
setOverZoneGroup(null);
|
|
25717
25823
|
dndLog.warn("dragCancel", {
|
|
@@ -25719,12 +25825,12 @@ function useDataDnd(args) {
|
|
|
25719
25825
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25720
25826
|
});
|
|
25721
25827
|
}, []);
|
|
25722
|
-
const handleDragEndWithCleanup =
|
|
25828
|
+
const handleDragEndWithCleanup = React96__default.useCallback((event) => {
|
|
25723
25829
|
handleDragEnd(event);
|
|
25724
25830
|
setActiveDrag(null);
|
|
25725
25831
|
setOverZoneGroup(null);
|
|
25726
25832
|
}, [handleDragEnd]);
|
|
25727
|
-
const wrapContainer =
|
|
25833
|
+
const wrapContainer = React96__default.useCallback(
|
|
25728
25834
|
(children) => {
|
|
25729
25835
|
if (!enabled) return children;
|
|
25730
25836
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -25778,7 +25884,7 @@ var init_useDataDnd = __esm({
|
|
|
25778
25884
|
init_useAlmadarDndCollision();
|
|
25779
25885
|
init_Box();
|
|
25780
25886
|
dndLog = createLogger("almadar:ui:dnd");
|
|
25781
|
-
RootCtx =
|
|
25887
|
+
RootCtx = React96__default.createContext(null);
|
|
25782
25888
|
}
|
|
25783
25889
|
});
|
|
25784
25890
|
function fieldLabel2(key) {
|
|
@@ -26267,7 +26373,7 @@ function DataList({
|
|
|
26267
26373
|
}) {
|
|
26268
26374
|
const eventBus = useEventBus();
|
|
26269
26375
|
const { t } = useTranslate();
|
|
26270
|
-
const [visibleCount, setVisibleCount] =
|
|
26376
|
+
const [visibleCount, setVisibleCount] = React96__default.useState(pageSize || Infinity);
|
|
26271
26377
|
const fieldDefs = fields ?? columns ?? [];
|
|
26272
26378
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26273
26379
|
const dnd = useDataDnd({
|
|
@@ -26286,7 +26392,7 @@ function DataList({
|
|
|
26286
26392
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26287
26393
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26288
26394
|
const hasRenderProp = typeof children === "function";
|
|
26289
|
-
|
|
26395
|
+
React96__default.useEffect(() => {
|
|
26290
26396
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26291
26397
|
const childrenTypeOf = typeof children;
|
|
26292
26398
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26343,7 +26449,7 @@ function DataList({
|
|
|
26343
26449
|
const items2 = data.map((item) => item);
|
|
26344
26450
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
26345
26451
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
26346
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26452
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
26347
26453
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26348
26454
|
group.items.map((itemData, index) => {
|
|
26349
26455
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26531,7 +26637,7 @@ function DataList({
|
|
|
26531
26637
|
className
|
|
26532
26638
|
),
|
|
26533
26639
|
children: [
|
|
26534
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26640
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
26535
26641
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26536
26642
|
group.items.map(
|
|
26537
26643
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26989,7 +27095,16 @@ var init_FilterGroup = __esm({
|
|
|
26989
27095
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
26990
27096
|
}
|
|
26991
27097
|
)
|
|
26992
|
-
] }) : /* @__PURE__ */ jsx(
|
|
27098
|
+
] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsx(
|
|
27099
|
+
Input,
|
|
27100
|
+
{
|
|
27101
|
+
value: selectedValues[filter.field] || "",
|
|
27102
|
+
onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
|
|
27103
|
+
placeholder: filter.label,
|
|
27104
|
+
clearable: true,
|
|
27105
|
+
onClear: () => handleFilterSelect(filter.field, null)
|
|
27106
|
+
}
|
|
27107
|
+
) : /* @__PURE__ */ jsx(
|
|
26993
27108
|
Select,
|
|
26994
27109
|
{
|
|
26995
27110
|
value: selectedValues[filter.field] || "all",
|
|
@@ -27056,7 +27171,17 @@ var init_FilterGroup = __esm({
|
|
|
27056
27171
|
className: "text-sm min-w-[100px]"
|
|
27057
27172
|
}
|
|
27058
27173
|
)
|
|
27059
|
-
] }) : /* @__PURE__ */ jsx(
|
|
27174
|
+
] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsx(
|
|
27175
|
+
Input,
|
|
27176
|
+
{
|
|
27177
|
+
value: selectedValues[filter.field] || "",
|
|
27178
|
+
onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
|
|
27179
|
+
placeholder: filter.label,
|
|
27180
|
+
clearable: true,
|
|
27181
|
+
onClear: () => handleFilterSelect(filter.field, null),
|
|
27182
|
+
className: "text-sm"
|
|
27183
|
+
}
|
|
27184
|
+
) : /* @__PURE__ */ jsx(
|
|
27060
27185
|
Select,
|
|
27061
27186
|
{
|
|
27062
27187
|
value: selectedValues[filter.field] || "all",
|
|
@@ -27161,7 +27286,17 @@ var init_FilterGroup = __esm({
|
|
|
27161
27286
|
className: "min-w-[130px]"
|
|
27162
27287
|
}
|
|
27163
27288
|
)
|
|
27164
|
-
] }) : /* @__PURE__ */ jsx(
|
|
27289
|
+
] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsx(
|
|
27290
|
+
Input,
|
|
27291
|
+
{
|
|
27292
|
+
value: selectedValues[filter.field] || "",
|
|
27293
|
+
onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
|
|
27294
|
+
placeholder: filter.label,
|
|
27295
|
+
clearable: true,
|
|
27296
|
+
onClear: () => handleFilterSelect(filter.field, null),
|
|
27297
|
+
className: "min-w-[160px]"
|
|
27298
|
+
}
|
|
27299
|
+
) : /* @__PURE__ */ jsx(
|
|
27165
27300
|
Select,
|
|
27166
27301
|
{
|
|
27167
27302
|
value: selectedValues[filter.field] || "all",
|
|
@@ -27731,6 +27866,8 @@ var SidePanel;
|
|
|
27731
27866
|
var init_SidePanel = __esm({
|
|
27732
27867
|
"components/molecules/SidePanel.tsx"() {
|
|
27733
27868
|
"use client";
|
|
27869
|
+
init_Aside();
|
|
27870
|
+
init_Box();
|
|
27734
27871
|
init_Button();
|
|
27735
27872
|
init_Typography();
|
|
27736
27873
|
init_cn();
|
|
@@ -27740,7 +27877,7 @@ var init_SidePanel = __esm({
|
|
|
27740
27877
|
children,
|
|
27741
27878
|
isOpen,
|
|
27742
27879
|
onClose,
|
|
27743
|
-
width = "w-96",
|
|
27880
|
+
width = "w-full sm:w-96",
|
|
27744
27881
|
position = "right",
|
|
27745
27882
|
showOverlay = true,
|
|
27746
27883
|
className,
|
|
@@ -27754,14 +27891,14 @@ var init_SidePanel = __esm({
|
|
|
27754
27891
|
if (!isOpen) return null;
|
|
27755
27892
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27756
27893
|
showOverlay && /* @__PURE__ */ jsx(
|
|
27757
|
-
|
|
27894
|
+
Box,
|
|
27758
27895
|
{
|
|
27759
27896
|
className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
|
|
27760
27897
|
onClick: handleClose
|
|
27761
27898
|
}
|
|
27762
27899
|
),
|
|
27763
27900
|
/* @__PURE__ */ jsxs(
|
|
27764
|
-
|
|
27901
|
+
Aside,
|
|
27765
27902
|
{
|
|
27766
27903
|
className: cn(
|
|
27767
27904
|
"fixed top-16 lg:top-0 bottom-0 z-[60]",
|
|
@@ -27775,7 +27912,7 @@ var init_SidePanel = __esm({
|
|
|
27775
27912
|
className
|
|
27776
27913
|
),
|
|
27777
27914
|
children: [
|
|
27778
|
-
/* @__PURE__ */ jsxs(
|
|
27915
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b-2 border-border sticky top-0 bg-card z-10", children: [
|
|
27779
27916
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
|
|
27780
27917
|
/* @__PURE__ */ jsx(
|
|
27781
27918
|
Button,
|
|
@@ -27785,11 +27922,11 @@ var init_SidePanel = __esm({
|
|
|
27785
27922
|
icon: X,
|
|
27786
27923
|
onClick: handleClose,
|
|
27787
27924
|
"aria-label": "Close panel",
|
|
27788
|
-
children: /* @__PURE__ */ jsx("span",
|
|
27925
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", className: "sr-only", children: "Close" })
|
|
27789
27926
|
}
|
|
27790
27927
|
)
|
|
27791
27928
|
] }),
|
|
27792
|
-
/* @__PURE__ */ jsx(
|
|
27929
|
+
/* @__PURE__ */ jsx(Box, { className: "p-4 flex-1 overflow-y-auto", children })
|
|
27793
27930
|
]
|
|
27794
27931
|
}
|
|
27795
27932
|
)
|
|
@@ -27840,7 +27977,7 @@ var init_WizardProgress = __esm({
|
|
|
27840
27977
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
27841
27978
|
const isActive = index === currentStep;
|
|
27842
27979
|
const isCompleted = index < currentStep;
|
|
27843
|
-
return /* @__PURE__ */ jsxs(
|
|
27980
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
27844
27981
|
/* @__PURE__ */ jsx(
|
|
27845
27982
|
"button",
|
|
27846
27983
|
{
|
|
@@ -27965,7 +28102,9 @@ var init_WizardNavigation = __esm({
|
|
|
27965
28102
|
{
|
|
27966
28103
|
border: true,
|
|
27967
28104
|
className: cn(
|
|
27968
|
-
|
|
28105
|
+
// `flex-wrap gap-2` lets the Back / Step / Next trio reflow on
|
|
28106
|
+
// narrow viewports rather than crushing the step counter.
|
|
28107
|
+
"border-t-2 border-x-0 border-b-0 border-border flex flex-wrap gap-2 justify-between items-center",
|
|
27969
28108
|
compact ? "px-4 py-2" : "px-6 py-4",
|
|
27970
28109
|
className
|
|
27971
28110
|
),
|
|
@@ -28896,7 +29035,7 @@ function InventoryGrid({
|
|
|
28896
29035
|
const eventBus = useEventBus();
|
|
28897
29036
|
const slotCount = totalSlots ?? items.length;
|
|
28898
29037
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
28899
|
-
const handleSelect =
|
|
29038
|
+
const handleSelect = React96.useCallback(
|
|
28900
29039
|
(id) => {
|
|
28901
29040
|
onSelect?.(id);
|
|
28902
29041
|
if (selectEvent) {
|
|
@@ -29109,15 +29248,15 @@ function GameCanvas2D({
|
|
|
29109
29248
|
fps = 60,
|
|
29110
29249
|
className
|
|
29111
29250
|
}) {
|
|
29112
|
-
const canvasRef =
|
|
29113
|
-
const rafRef =
|
|
29114
|
-
const frameRef =
|
|
29115
|
-
const lastTimeRef =
|
|
29116
|
-
const onDrawRef =
|
|
29251
|
+
const canvasRef = React96.useRef(null);
|
|
29252
|
+
const rafRef = React96.useRef(0);
|
|
29253
|
+
const frameRef = React96.useRef(0);
|
|
29254
|
+
const lastTimeRef = React96.useRef(0);
|
|
29255
|
+
const onDrawRef = React96.useRef(onDraw);
|
|
29117
29256
|
onDrawRef.current = onDraw;
|
|
29118
|
-
const onTickRef =
|
|
29257
|
+
const onTickRef = React96.useRef(onTick);
|
|
29119
29258
|
onTickRef.current = onTick;
|
|
29120
|
-
|
|
29259
|
+
React96.useEffect(() => {
|
|
29121
29260
|
const canvas = canvasRef.current;
|
|
29122
29261
|
if (!canvas) return;
|
|
29123
29262
|
const ctx = canvas.getContext("2d");
|
|
@@ -29406,7 +29545,7 @@ function TurnPanel({
|
|
|
29406
29545
|
className
|
|
29407
29546
|
}) {
|
|
29408
29547
|
const eventBus = useEventBus();
|
|
29409
|
-
const handleAction =
|
|
29548
|
+
const handleAction = React96.useCallback(
|
|
29410
29549
|
(event) => {
|
|
29411
29550
|
if (event) {
|
|
29412
29551
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -29552,7 +29691,7 @@ function UnitCommandBar({
|
|
|
29552
29691
|
className
|
|
29553
29692
|
}) {
|
|
29554
29693
|
const eventBus = useEventBus();
|
|
29555
|
-
const handleCommand =
|
|
29694
|
+
const handleCommand = React96.useCallback(
|
|
29556
29695
|
(event) => {
|
|
29557
29696
|
if (event) {
|
|
29558
29697
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -30037,7 +30176,7 @@ function GameMenu({
|
|
|
30037
30176
|
} catch {
|
|
30038
30177
|
}
|
|
30039
30178
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
30040
|
-
const handleOptionClick =
|
|
30179
|
+
const handleOptionClick = React96.useCallback(
|
|
30041
30180
|
(option) => {
|
|
30042
30181
|
if (option.event && eventBus) {
|
|
30043
30182
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -30151,7 +30290,7 @@ function GameOverScreen({
|
|
|
30151
30290
|
} catch {
|
|
30152
30291
|
}
|
|
30153
30292
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
30154
|
-
const handleActionClick =
|
|
30293
|
+
const handleActionClick = React96.useCallback(
|
|
30155
30294
|
(action) => {
|
|
30156
30295
|
if (action.event && eventBus) {
|
|
30157
30296
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -32810,7 +32949,7 @@ var init_StepFlow = __esm({
|
|
|
32810
32949
|
className
|
|
32811
32950
|
}) => {
|
|
32812
32951
|
if (orientation === "vertical") {
|
|
32813
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
32952
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React96__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
32814
32953
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
32815
32954
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32816
32955
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -32821,7 +32960,7 @@ var init_StepFlow = __esm({
|
|
|
32821
32960
|
] })
|
|
32822
32961
|
] }) }, index)) });
|
|
32823
32962
|
}
|
|
32824
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
32963
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
32825
32964
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
32826
32965
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32827
32966
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -32889,9 +33028,9 @@ var init_SplitSection = __esm({
|
|
|
32889
33028
|
className
|
|
32890
33029
|
),
|
|
32891
33030
|
padding: "lg",
|
|
32892
|
-
children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col
|
|
32893
|
-
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0
|
|
32894
|
-
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0
|
|
33031
|
+
children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col md:flex-row gap-8 md:gap-12 lg:gap-16 items-center", isImageLeft && "md:flex-row-reverse"), children: [
|
|
33032
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 md:min-w-[45%]", children: textContent }),
|
|
33033
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 md:max-w-[50%]", children: mediaContent })
|
|
32895
33034
|
] })
|
|
32896
33035
|
}
|
|
32897
33036
|
);
|
|
@@ -33703,7 +33842,7 @@ var init_LikertScale = __esm({
|
|
|
33703
33842
|
md: "text-base",
|
|
33704
33843
|
lg: "text-lg"
|
|
33705
33844
|
};
|
|
33706
|
-
LikertScale =
|
|
33845
|
+
LikertScale = React96__default.forwardRef(
|
|
33707
33846
|
({
|
|
33708
33847
|
question,
|
|
33709
33848
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -33715,7 +33854,7 @@ var init_LikertScale = __esm({
|
|
|
33715
33854
|
variant = "radios",
|
|
33716
33855
|
className
|
|
33717
33856
|
}, ref) => {
|
|
33718
|
-
const groupId =
|
|
33857
|
+
const groupId = React96__default.useId();
|
|
33719
33858
|
const eventBus = useEventBus();
|
|
33720
33859
|
const handleSelect = useCallback(
|
|
33721
33860
|
(next) => {
|
|
@@ -35719,7 +35858,7 @@ var init_VersionDiff = __esm({
|
|
|
35719
35858
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
35720
35859
|
/* @__PURE__ */ jsx(Icon, { icon: GitCommit, size: "sm", className: "text-muted-foreground" }),
|
|
35721
35860
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "Compare" }),
|
|
35722
|
-
/* @__PURE__ */ jsx(Box, { className: "min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
35861
|
+
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
35723
35862
|
Select,
|
|
35724
35863
|
{
|
|
35725
35864
|
options,
|
|
@@ -35729,7 +35868,7 @@ var init_VersionDiff = __esm({
|
|
|
35729
35868
|
}
|
|
35730
35869
|
) }),
|
|
35731
35870
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
35732
|
-
/* @__PURE__ */ jsx(Box, { className: "min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
35871
|
+
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
35733
35872
|
Select,
|
|
35734
35873
|
{
|
|
35735
35874
|
options,
|
|
@@ -35794,8 +35933,8 @@ var init_VersionDiff = __esm({
|
|
|
35794
35933
|
]
|
|
35795
35934
|
}
|
|
35796
35935
|
),
|
|
35797
|
-
/* @__PURE__ */ jsx(Box, { className: "overflow-auto bg-muted/20", style: { maxHeight: 600 }, children: activeView === "side-by-side" ? /* @__PURE__ */ jsxs(Box, { className: "grid grid-cols-2", children: [
|
|
35798
|
-
/* @__PURE__ */ jsx(Box, { className: "border-r border-border", children: /* @__PURE__ */ jsx(VStack, { gap: "none", className: "font-mono text-xs", children: beforeLines.map((line, idx) => {
|
|
35936
|
+
/* @__PURE__ */ jsx(Box, { className: "overflow-auto bg-muted/20", style: { maxHeight: 600 }, children: activeView === "side-by-side" ? /* @__PURE__ */ jsxs(Box, { className: "grid grid-cols-1 md:grid-cols-2", children: [
|
|
35937
|
+
/* @__PURE__ */ jsx(Box, { className: "border-b md:border-b-0 md:border-r border-border", children: /* @__PURE__ */ jsx(VStack, { gap: "none", className: "font-mono text-xs", children: beforeLines.map((line, idx) => {
|
|
35799
35938
|
const isRemoved = line.type === "removed";
|
|
35800
35939
|
return /* @__PURE__ */ jsxs(
|
|
35801
35940
|
HStack,
|
|
@@ -35941,7 +36080,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
35941
36080
|
"aria-label": "Breadcrumb",
|
|
35942
36081
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
35943
36082
|
const isLast = idx === items.length - 1;
|
|
35944
|
-
return /* @__PURE__ */ jsxs(
|
|
36083
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
35945
36084
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
35946
36085
|
Icon,
|
|
35947
36086
|
{
|
|
@@ -37805,7 +37944,7 @@ var init_DocumentViewer = __esm({
|
|
|
37805
37944
|
}
|
|
37806
37945
|
});
|
|
37807
37946
|
function extractTitle(children) {
|
|
37808
|
-
if (!
|
|
37947
|
+
if (!React96__default.isValidElement(children)) return void 0;
|
|
37809
37948
|
const props = children.props;
|
|
37810
37949
|
if (typeof props.title === "string") {
|
|
37811
37950
|
return props.title;
|
|
@@ -37860,7 +37999,7 @@ function LinearView({
|
|
|
37860
37999
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
37861
38000
|
const isDone = i < currentIdx;
|
|
37862
38001
|
const isCurrent = i === currentIdx;
|
|
37863
|
-
return /* @__PURE__ */ jsxs(
|
|
38002
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
37864
38003
|
i > 0 && /* @__PURE__ */ jsx(
|
|
37865
38004
|
Typography,
|
|
37866
38005
|
{
|
|
@@ -38761,12 +38900,12 @@ var init_Form = __esm({
|
|
|
38761
38900
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
38762
38901
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
38763
38902
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
38764
|
-
const normalizedInitialData =
|
|
38903
|
+
const normalizedInitialData = React96__default.useMemo(() => {
|
|
38765
38904
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
38766
38905
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
38767
38906
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
38768
38907
|
}, [entity, initialData]);
|
|
38769
|
-
const entityDerivedFields =
|
|
38908
|
+
const entityDerivedFields = React96__default.useMemo(() => {
|
|
38770
38909
|
if (fields && fields.length > 0) return void 0;
|
|
38771
38910
|
if (!resolvedEntity) return void 0;
|
|
38772
38911
|
return resolvedEntity.fields.map(
|
|
@@ -38785,16 +38924,16 @@ var init_Form = __esm({
|
|
|
38785
38924
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
38786
38925
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
38787
38926
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
38788
|
-
const [formData, setFormData] =
|
|
38927
|
+
const [formData, setFormData] = React96__default.useState(
|
|
38789
38928
|
normalizedInitialData
|
|
38790
38929
|
);
|
|
38791
|
-
const [collapsedSections, setCollapsedSections] =
|
|
38930
|
+
const [collapsedSections, setCollapsedSections] = React96__default.useState(
|
|
38792
38931
|
/* @__PURE__ */ new Set()
|
|
38793
38932
|
);
|
|
38794
|
-
const [submitError, setSubmitError] =
|
|
38795
|
-
const formRef =
|
|
38933
|
+
const [submitError, setSubmitError] = React96__default.useState(null);
|
|
38934
|
+
const formRef = React96__default.useRef(null);
|
|
38796
38935
|
const formMode = props.mode;
|
|
38797
|
-
const mountedRef =
|
|
38936
|
+
const mountedRef = React96__default.useRef(false);
|
|
38798
38937
|
if (!mountedRef.current) {
|
|
38799
38938
|
mountedRef.current = true;
|
|
38800
38939
|
debug("forms", "mount", {
|
|
@@ -38807,7 +38946,7 @@ var init_Form = __esm({
|
|
|
38807
38946
|
});
|
|
38808
38947
|
}
|
|
38809
38948
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
38810
|
-
const evalContext =
|
|
38949
|
+
const evalContext = React96__default.useMemo(
|
|
38811
38950
|
() => ({
|
|
38812
38951
|
formValues: formData,
|
|
38813
38952
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -38816,7 +38955,7 @@ var init_Form = __esm({
|
|
|
38816
38955
|
}),
|
|
38817
38956
|
[formData, externalContext]
|
|
38818
38957
|
);
|
|
38819
|
-
|
|
38958
|
+
React96__default.useEffect(() => {
|
|
38820
38959
|
debug("forms", "initialData-sync", {
|
|
38821
38960
|
mode: formMode,
|
|
38822
38961
|
normalizedInitialData,
|
|
@@ -38827,7 +38966,7 @@ var init_Form = __esm({
|
|
|
38827
38966
|
setFormData(normalizedInitialData);
|
|
38828
38967
|
}
|
|
38829
38968
|
}, [normalizedInitialData]);
|
|
38830
|
-
const processCalculations =
|
|
38969
|
+
const processCalculations = React96__default.useCallback(
|
|
38831
38970
|
(changedFieldId, newFormData) => {
|
|
38832
38971
|
if (!hiddenCalculations.length) return;
|
|
38833
38972
|
const context = {
|
|
@@ -38852,7 +38991,7 @@ var init_Form = __esm({
|
|
|
38852
38991
|
},
|
|
38853
38992
|
[hiddenCalculations, externalContext, eventBus]
|
|
38854
38993
|
);
|
|
38855
|
-
const checkViolations =
|
|
38994
|
+
const checkViolations = React96__default.useCallback(
|
|
38856
38995
|
(changedFieldId, newFormData) => {
|
|
38857
38996
|
if (!violationTriggers.length) return;
|
|
38858
38997
|
const context = {
|
|
@@ -38890,7 +39029,7 @@ var init_Form = __esm({
|
|
|
38890
39029
|
processCalculations(name, newFormData);
|
|
38891
39030
|
checkViolations(name, newFormData);
|
|
38892
39031
|
};
|
|
38893
|
-
const isFieldVisible =
|
|
39032
|
+
const isFieldVisible = React96__default.useCallback(
|
|
38894
39033
|
(fieldName) => {
|
|
38895
39034
|
const condition = conditionalFields[fieldName];
|
|
38896
39035
|
if (!condition) return true;
|
|
@@ -38898,7 +39037,7 @@ var init_Form = __esm({
|
|
|
38898
39037
|
},
|
|
38899
39038
|
[conditionalFields, evalContext]
|
|
38900
39039
|
);
|
|
38901
|
-
const isSectionVisible =
|
|
39040
|
+
const isSectionVisible = React96__default.useCallback(
|
|
38902
39041
|
(section) => {
|
|
38903
39042
|
if (!section.condition) return true;
|
|
38904
39043
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -38974,7 +39113,7 @@ var init_Form = __esm({
|
|
|
38974
39113
|
eventBus.emit(`UI:${onCancel}`);
|
|
38975
39114
|
}
|
|
38976
39115
|
};
|
|
38977
|
-
const renderField =
|
|
39116
|
+
const renderField = React96__default.useCallback(
|
|
38978
39117
|
(field) => {
|
|
38979
39118
|
const fieldName = field.name || field.field;
|
|
38980
39119
|
if (!fieldName) return null;
|
|
@@ -38995,7 +39134,7 @@ var init_Form = __esm({
|
|
|
38995
39134
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
38996
39135
|
);
|
|
38997
39136
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
38998
|
-
const normalizedFields =
|
|
39137
|
+
const normalizedFields = React96__default.useMemo(() => {
|
|
38999
39138
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
39000
39139
|
return effectiveFields.map((field) => {
|
|
39001
39140
|
if (typeof field === "string") {
|
|
@@ -39017,7 +39156,7 @@ var init_Form = __esm({
|
|
|
39017
39156
|
return field;
|
|
39018
39157
|
});
|
|
39019
39158
|
}, [effectiveFields, resolvedEntity]);
|
|
39020
|
-
const schemaFields =
|
|
39159
|
+
const schemaFields = React96__default.useMemo(() => {
|
|
39021
39160
|
if (normalizedFields.length === 0) return null;
|
|
39022
39161
|
if (isDebugEnabled()) {
|
|
39023
39162
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -39027,7 +39166,7 @@ var init_Form = __esm({
|
|
|
39027
39166
|
}
|
|
39028
39167
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
39029
39168
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
39030
|
-
const sectionElements =
|
|
39169
|
+
const sectionElements = React96__default.useMemo(() => {
|
|
39031
39170
|
if (!sections || sections.length === 0) return null;
|
|
39032
39171
|
return sections.map((section) => {
|
|
39033
39172
|
if (!isSectionVisible(section)) {
|
|
@@ -40753,7 +40892,7 @@ var init_List = __esm({
|
|
|
40753
40892
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
40754
40893
|
return [];
|
|
40755
40894
|
}, [entity]);
|
|
40756
|
-
const getItemActions =
|
|
40895
|
+
const getItemActions = React96__default.useCallback(
|
|
40757
40896
|
(item) => {
|
|
40758
40897
|
if (!itemActions) return [];
|
|
40759
40898
|
if (typeof itemActions === "function") {
|
|
@@ -41226,7 +41365,7 @@ var init_MediaGallery = __esm({
|
|
|
41226
41365
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
41227
41366
|
);
|
|
41228
41367
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
41229
|
-
const items =
|
|
41368
|
+
const items = React96__default.useMemo(() => {
|
|
41230
41369
|
if (propItems) return propItems;
|
|
41231
41370
|
if (entityData.length === 0) return [];
|
|
41232
41371
|
return entityData.map((record, idx) => ({
|
|
@@ -41390,7 +41529,7 @@ var init_MediaGallery = __esm({
|
|
|
41390
41529
|
}
|
|
41391
41530
|
});
|
|
41392
41531
|
function extractTitle2(children) {
|
|
41393
|
-
if (!
|
|
41532
|
+
if (!React96__default.isValidElement(children)) return void 0;
|
|
41394
41533
|
const props = children.props;
|
|
41395
41534
|
if (typeof props.title === "string") {
|
|
41396
41535
|
return props.title;
|
|
@@ -42103,7 +42242,7 @@ var init_PageHeader = __esm({
|
|
|
42103
42242
|
info: "bg-info/10 text-info"
|
|
42104
42243
|
};
|
|
42105
42244
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
42106
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(
|
|
42245
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
42107
42246
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
42108
42247
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
42109
42248
|
"a",
|
|
@@ -42418,7 +42557,7 @@ var init_debugRegistry = __esm({
|
|
|
42418
42557
|
}
|
|
42419
42558
|
});
|
|
42420
42559
|
function useDebugData() {
|
|
42421
|
-
const [data, setData] =
|
|
42560
|
+
const [data, setData] = React96.useState(() => ({
|
|
42422
42561
|
traits: [],
|
|
42423
42562
|
ticks: [],
|
|
42424
42563
|
guards: [],
|
|
@@ -42432,7 +42571,7 @@ function useDebugData() {
|
|
|
42432
42571
|
},
|
|
42433
42572
|
lastUpdate: Date.now()
|
|
42434
42573
|
}));
|
|
42435
|
-
|
|
42574
|
+
React96.useEffect(() => {
|
|
42436
42575
|
const updateData = () => {
|
|
42437
42576
|
setData({
|
|
42438
42577
|
traits: getAllTraits(),
|
|
@@ -42541,12 +42680,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
42541
42680
|
return positions;
|
|
42542
42681
|
}
|
|
42543
42682
|
function WalkMinimap() {
|
|
42544
|
-
const [walkStep, setWalkStep] =
|
|
42545
|
-
const [traits2, setTraits] =
|
|
42546
|
-
const [coveredEdges, setCoveredEdges] =
|
|
42547
|
-
const [completedTraits, setCompletedTraits] =
|
|
42548
|
-
const prevTraitRef =
|
|
42549
|
-
|
|
42683
|
+
const [walkStep, setWalkStep] = React96.useState(null);
|
|
42684
|
+
const [traits2, setTraits] = React96.useState([]);
|
|
42685
|
+
const [coveredEdges, setCoveredEdges] = React96.useState([]);
|
|
42686
|
+
const [completedTraits, setCompletedTraits] = React96.useState(/* @__PURE__ */ new Set());
|
|
42687
|
+
const prevTraitRef = React96.useRef(null);
|
|
42688
|
+
React96.useEffect(() => {
|
|
42550
42689
|
const interval = setInterval(() => {
|
|
42551
42690
|
const w = window;
|
|
42552
42691
|
const step = w.__orbitalWalkStep;
|
|
@@ -42993,15 +43132,15 @@ var init_EntitiesTab = __esm({
|
|
|
42993
43132
|
}
|
|
42994
43133
|
});
|
|
42995
43134
|
function EventFlowTab({ events: events2 }) {
|
|
42996
|
-
const [filter, setFilter] =
|
|
42997
|
-
const containerRef =
|
|
42998
|
-
const [autoScroll, setAutoScroll] =
|
|
42999
|
-
|
|
43135
|
+
const [filter, setFilter] = React96.useState("all");
|
|
43136
|
+
const containerRef = React96.useRef(null);
|
|
43137
|
+
const [autoScroll, setAutoScroll] = React96.useState(true);
|
|
43138
|
+
React96.useEffect(() => {
|
|
43000
43139
|
if (autoScroll && containerRef.current) {
|
|
43001
43140
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43002
43141
|
}
|
|
43003
43142
|
}, [events2.length, autoScroll]);
|
|
43004
|
-
const filteredEvents =
|
|
43143
|
+
const filteredEvents = React96.useMemo(() => {
|
|
43005
43144
|
if (filter === "all") return events2;
|
|
43006
43145
|
return events2.filter((e) => e.type === filter);
|
|
43007
43146
|
}, [events2, filter]);
|
|
@@ -43120,7 +43259,7 @@ var init_EventFlowTab = __esm({
|
|
|
43120
43259
|
}
|
|
43121
43260
|
});
|
|
43122
43261
|
function GuardsPanel({ guards }) {
|
|
43123
|
-
const [filter, setFilter] =
|
|
43262
|
+
const [filter, setFilter] = React96.useState("all");
|
|
43124
43263
|
if (guards.length === 0) {
|
|
43125
43264
|
return /* @__PURE__ */ jsx(
|
|
43126
43265
|
EmptyState,
|
|
@@ -43133,7 +43272,7 @@ function GuardsPanel({ guards }) {
|
|
|
43133
43272
|
}
|
|
43134
43273
|
const passedCount = guards.filter((g) => g.result).length;
|
|
43135
43274
|
const failedCount = guards.length - passedCount;
|
|
43136
|
-
const filteredGuards =
|
|
43275
|
+
const filteredGuards = React96.useMemo(() => {
|
|
43137
43276
|
if (filter === "all") return guards;
|
|
43138
43277
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
43139
43278
|
return guards.filter((g) => !g.result);
|
|
@@ -43294,10 +43433,10 @@ function EffectBadge({ effect }) {
|
|
|
43294
43433
|
] });
|
|
43295
43434
|
}
|
|
43296
43435
|
function TransitionTimeline({ transitions }) {
|
|
43297
|
-
const containerRef =
|
|
43298
|
-
const [autoScroll, setAutoScroll] =
|
|
43299
|
-
const [expandedId, setExpandedId] =
|
|
43300
|
-
|
|
43436
|
+
const containerRef = React96.useRef(null);
|
|
43437
|
+
const [autoScroll, setAutoScroll] = React96.useState(true);
|
|
43438
|
+
const [expandedId, setExpandedId] = React96.useState(null);
|
|
43439
|
+
React96.useEffect(() => {
|
|
43301
43440
|
if (autoScroll && containerRef.current) {
|
|
43302
43441
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43303
43442
|
}
|
|
@@ -43583,9 +43722,9 @@ function getAllEvents(traits2) {
|
|
|
43583
43722
|
}
|
|
43584
43723
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43585
43724
|
const eventBus = useEventBus();
|
|
43586
|
-
const [log20, setLog] =
|
|
43587
|
-
const prevStatesRef =
|
|
43588
|
-
|
|
43725
|
+
const [log20, setLog] = React96.useState([]);
|
|
43726
|
+
const prevStatesRef = React96.useRef(/* @__PURE__ */ new Map());
|
|
43727
|
+
React96.useEffect(() => {
|
|
43589
43728
|
for (const trait of traits2) {
|
|
43590
43729
|
const prev = prevStatesRef.current.get(trait.id);
|
|
43591
43730
|
if (prev && prev !== trait.currentState) {
|
|
@@ -43755,10 +43894,10 @@ function VerifyModePanel({
|
|
|
43755
43894
|
serverCount,
|
|
43756
43895
|
localCount
|
|
43757
43896
|
}) {
|
|
43758
|
-
const [expanded, setExpanded] =
|
|
43759
|
-
const scrollRef =
|
|
43760
|
-
const prevCountRef =
|
|
43761
|
-
|
|
43897
|
+
const [expanded, setExpanded] = React96.useState(true);
|
|
43898
|
+
const scrollRef = React96.useRef(null);
|
|
43899
|
+
const prevCountRef = React96.useRef(0);
|
|
43900
|
+
React96.useEffect(() => {
|
|
43762
43901
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
43763
43902
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
43764
43903
|
}
|
|
@@ -43824,10 +43963,10 @@ function RuntimeDebugger({
|
|
|
43824
43963
|
defaultTab,
|
|
43825
43964
|
schema
|
|
43826
43965
|
}) {
|
|
43827
|
-
const [isCollapsed, setIsCollapsed] =
|
|
43828
|
-
const [isVisible, setIsVisible] =
|
|
43966
|
+
const [isCollapsed, setIsCollapsed] = React96.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43967
|
+
const [isVisible, setIsVisible] = React96.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43829
43968
|
const debugData = useDebugData();
|
|
43830
|
-
|
|
43969
|
+
React96.useEffect(() => {
|
|
43831
43970
|
if (mode === "inline") return;
|
|
43832
43971
|
return onDebugToggle((enabled) => {
|
|
43833
43972
|
setIsVisible(enabled);
|
|
@@ -43836,7 +43975,7 @@ function RuntimeDebugger({
|
|
|
43836
43975
|
}
|
|
43837
43976
|
});
|
|
43838
43977
|
}, [mode]);
|
|
43839
|
-
|
|
43978
|
+
React96.useEffect(() => {
|
|
43840
43979
|
if (mode === "inline") return;
|
|
43841
43980
|
const handleKeyDown = (e) => {
|
|
43842
43981
|
if (e.key === "`" && isVisible) {
|
|
@@ -44385,7 +44524,7 @@ function SequenceBar({
|
|
|
44385
44524
|
onSlotRemove(index);
|
|
44386
44525
|
}, [onSlotRemove, playing]);
|
|
44387
44526
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
44388
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
44527
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
44389
44528
|
i > 0 && /* @__PURE__ */ jsx(
|
|
44390
44529
|
Typography,
|
|
44391
44530
|
{
|
|
@@ -45787,7 +45926,7 @@ var init_StatCard = __esm({
|
|
|
45787
45926
|
const labelToUse = propLabel ?? propTitle;
|
|
45788
45927
|
const eventBus = useEventBus();
|
|
45789
45928
|
const { t } = useTranslate();
|
|
45790
|
-
const handleActionClick =
|
|
45929
|
+
const handleActionClick = React96__default.useCallback(() => {
|
|
45791
45930
|
if (action?.event) {
|
|
45792
45931
|
eventBus.emit(`UI:${action.event}`, {});
|
|
45793
45932
|
}
|
|
@@ -45798,7 +45937,7 @@ var init_StatCard = __esm({
|
|
|
45798
45937
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
45799
45938
|
const isLoading = externalLoading ?? false;
|
|
45800
45939
|
const error = externalError;
|
|
45801
|
-
const computeMetricValue =
|
|
45940
|
+
const computeMetricValue = React96__default.useCallback(
|
|
45802
45941
|
(metric, items) => {
|
|
45803
45942
|
if (metric.value !== void 0) {
|
|
45804
45943
|
return metric.value;
|
|
@@ -45837,7 +45976,7 @@ var init_StatCard = __esm({
|
|
|
45837
45976
|
},
|
|
45838
45977
|
[]
|
|
45839
45978
|
);
|
|
45840
|
-
const schemaStats =
|
|
45979
|
+
const schemaStats = React96__default.useMemo(() => {
|
|
45841
45980
|
if (!metrics || metrics.length === 0) return null;
|
|
45842
45981
|
return metrics.map((metric) => ({
|
|
45843
45982
|
label: metric.label,
|
|
@@ -45845,7 +45984,7 @@ var init_StatCard = __esm({
|
|
|
45845
45984
|
format: metric.format
|
|
45846
45985
|
}));
|
|
45847
45986
|
}, [metrics, data, computeMetricValue]);
|
|
45848
|
-
const calculatedTrend =
|
|
45987
|
+
const calculatedTrend = React96__default.useMemo(() => {
|
|
45849
45988
|
if (manualTrend !== void 0) return manualTrend;
|
|
45850
45989
|
if (previousValue === void 0 || currentValue === void 0)
|
|
45851
45990
|
return void 0;
|
|
@@ -46956,7 +47095,7 @@ var init_Timeline = __esm({
|
|
|
46956
47095
|
}) => {
|
|
46957
47096
|
const { t } = useTranslate();
|
|
46958
47097
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
46959
|
-
const items =
|
|
47098
|
+
const items = React96__default.useMemo(() => {
|
|
46960
47099
|
if (propItems) return propItems;
|
|
46961
47100
|
if (entityData.length === 0) return [];
|
|
46962
47101
|
return entityData.map((record, idx) => {
|
|
@@ -47063,7 +47202,7 @@ var init_Timeline = __esm({
|
|
|
47063
47202
|
}
|
|
47064
47203
|
});
|
|
47065
47204
|
function extractToastProps(children) {
|
|
47066
|
-
if (!
|
|
47205
|
+
if (!React96__default.isValidElement(children)) {
|
|
47067
47206
|
if (typeof children === "string") {
|
|
47068
47207
|
return { message: children };
|
|
47069
47208
|
}
|
|
@@ -47101,7 +47240,7 @@ var init_ToastSlot = __esm({
|
|
|
47101
47240
|
eventBus.emit("UI:CLOSE");
|
|
47102
47241
|
};
|
|
47103
47242
|
if (!isVisible) return null;
|
|
47104
|
-
const isCustomContent =
|
|
47243
|
+
const isCustomContent = React96__default.isValidElement(children) && !message;
|
|
47105
47244
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
47106
47245
|
Toast,
|
|
47107
47246
|
{
|
|
@@ -47370,7 +47509,7 @@ var init_WizardContainer = __esm({
|
|
|
47370
47509
|
const isCompleted = index < currentStep;
|
|
47371
47510
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
47372
47511
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
47373
|
-
return /* @__PURE__ */ jsxs(
|
|
47512
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
47374
47513
|
/* @__PURE__ */ jsx(
|
|
47375
47514
|
Button,
|
|
47376
47515
|
{
|
|
@@ -49563,7 +49702,7 @@ function UnitRenderer({
|
|
|
49563
49702
|
onAnimationStateChange,
|
|
49564
49703
|
animationSpeed = 1
|
|
49565
49704
|
}) {
|
|
49566
|
-
const handleUnitClick =
|
|
49705
|
+
const handleUnitClick = React96__default.useCallback(
|
|
49567
49706
|
(unit) => {
|
|
49568
49707
|
onUnitClick?.(unit);
|
|
49569
49708
|
},
|
|
@@ -52759,7 +52898,7 @@ var init_Avl3DViewer = __esm({
|
|
|
52759
52898
|
const handleTraitClick = useCallback((name) => {
|
|
52760
52899
|
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
|
|
52761
52900
|
}, []);
|
|
52762
|
-
const [highlightedTrait, setHighlightedTrait] =
|
|
52901
|
+
const [highlightedTrait, setHighlightedTrait] = React96__default.useState(null);
|
|
52763
52902
|
const handleTransitionClick = useCallback((index) => {
|
|
52764
52903
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
|
|
52765
52904
|
}, []);
|
|
@@ -52846,7 +52985,7 @@ var init_Avl3DViewer = __esm({
|
|
|
52846
52985
|
gap: "xs",
|
|
52847
52986
|
align: "center",
|
|
52848
52987
|
className: "absolute top-2 left-2 z-10 bg-surface/80 backdrop-blur rounded-md px-3 py-1.5",
|
|
52849
|
-
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
52988
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
52850
52989
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
52851
52990
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
52852
52991
|
Box,
|
|
@@ -53224,12 +53363,12 @@ var init_three = __esm({
|
|
|
53224
53363
|
}
|
|
53225
53364
|
});
|
|
53226
53365
|
function lazyThree(name, loader) {
|
|
53227
|
-
const Lazy =
|
|
53366
|
+
const Lazy = React96__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
53228
53367
|
function ThreeWrapper(props) {
|
|
53229
|
-
return
|
|
53230
|
-
|
|
53368
|
+
return React96__default.createElement(
|
|
53369
|
+
React96__default.Suspense,
|
|
53231
53370
|
{ fallback: null },
|
|
53232
|
-
|
|
53371
|
+
React96__default.createElement(Lazy, props)
|
|
53233
53372
|
);
|
|
53234
53373
|
}
|
|
53235
53374
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -53248,6 +53387,7 @@ var init_component_registry_generated = __esm({
|
|
|
53248
53387
|
init_AnimatedGraphic();
|
|
53249
53388
|
init_AnimatedReveal();
|
|
53250
53389
|
init_ArticleSection();
|
|
53390
|
+
init_Aside();
|
|
53251
53391
|
init_AuthLayout();
|
|
53252
53392
|
init_BattleBoard();
|
|
53253
53393
|
init_BattleTemplate();
|
|
@@ -53302,6 +53442,7 @@ var init_component_registry_generated = __esm({
|
|
|
53302
53442
|
init_DayCell();
|
|
53303
53443
|
init_DebuggerBoard();
|
|
53304
53444
|
init_DetailPanel();
|
|
53445
|
+
init_Dialog();
|
|
53305
53446
|
init_DialogueBox();
|
|
53306
53447
|
init_DialogueBubble();
|
|
53307
53448
|
init_DocBreadcrumb();
|
|
@@ -53515,6 +53656,7 @@ var init_component_registry_generated = __esm({
|
|
|
53515
53656
|
"AnimatedGraphic": AnimatedGraphic,
|
|
53516
53657
|
"AnimatedReveal": AnimatedReveal,
|
|
53517
53658
|
"ArticleSection": ArticleSection,
|
|
53659
|
+
"Aside": Aside,
|
|
53518
53660
|
"AuthLayout": AuthLayout,
|
|
53519
53661
|
"Avatar": AvatarPattern,
|
|
53520
53662
|
"AvatarPattern": AvatarPattern,
|
|
@@ -53584,6 +53726,7 @@ var init_component_registry_generated = __esm({
|
|
|
53584
53726
|
"DayCell": DayCell,
|
|
53585
53727
|
"DebuggerBoard": DebuggerBoard,
|
|
53586
53728
|
"DetailPanel": DetailPanel,
|
|
53729
|
+
"Dialog": Dialog,
|
|
53587
53730
|
"DialogueBox": DialogueBox,
|
|
53588
53731
|
"DialogueBubble": DialogueBubble,
|
|
53589
53732
|
"Divider": DividerPattern,
|
|
@@ -53837,7 +53980,7 @@ function SuspenseConfigProvider({
|
|
|
53837
53980
|
config,
|
|
53838
53981
|
children
|
|
53839
53982
|
}) {
|
|
53840
|
-
return
|
|
53983
|
+
return React96__default.createElement(
|
|
53841
53984
|
SuspenseConfigContext.Provider,
|
|
53842
53985
|
{ value: config },
|
|
53843
53986
|
children
|
|
@@ -54320,7 +54463,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
54320
54463
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
54321
54464
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
54322
54465
|
}
|
|
54323
|
-
return /* @__PURE__ */ jsx(
|
|
54466
|
+
return /* @__PURE__ */ jsx(React96__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
54324
54467
|
}
|
|
54325
54468
|
if (!child || typeof child !== "object") return null;
|
|
54326
54469
|
const childId = `${parentId}-${index}`;
|
|
@@ -54357,14 +54500,14 @@ function isPatternConfig(value) {
|
|
|
54357
54500
|
if (value === null || value === void 0) return false;
|
|
54358
54501
|
if (typeof value !== "object") return false;
|
|
54359
54502
|
if (Array.isArray(value)) return false;
|
|
54360
|
-
if (
|
|
54503
|
+
if (React96__default.isValidElement(value)) return false;
|
|
54361
54504
|
if (value instanceof Date) return false;
|
|
54362
54505
|
if (typeof value === "function") return false;
|
|
54363
54506
|
const record = value;
|
|
54364
54507
|
return "type" in record && typeof record.type === "string";
|
|
54365
54508
|
}
|
|
54366
54509
|
function isPlainConfigObject(value) {
|
|
54367
|
-
if (
|
|
54510
|
+
if (React96__default.isValidElement(value)) return false;
|
|
54368
54511
|
if (value instanceof Date) return false;
|
|
54369
54512
|
const proto = Object.getPrototypeOf(value);
|
|
54370
54513
|
return proto === Object.prototype || proto === null;
|
|
@@ -54819,7 +54962,7 @@ var AvlTransition = ({
|
|
|
54819
54962
|
opacity = 1,
|
|
54820
54963
|
className
|
|
54821
54964
|
}) => {
|
|
54822
|
-
const ids =
|
|
54965
|
+
const ids = React96__default.useMemo(() => {
|
|
54823
54966
|
avlTransitionId += 1;
|
|
54824
54967
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
54825
54968
|
}, []);
|
|
@@ -55380,7 +55523,7 @@ var AvlStateMachine = ({
|
|
|
55380
55523
|
color = "var(--color-primary)",
|
|
55381
55524
|
animated = false
|
|
55382
55525
|
}) => {
|
|
55383
|
-
const ids =
|
|
55526
|
+
const ids = React96__default.useMemo(() => {
|
|
55384
55527
|
avlSmId += 1;
|
|
55385
55528
|
const base = `avl-sm-${avlSmId}`;
|
|
55386
55529
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -55579,7 +55722,7 @@ var AvlOrbitalUnit = ({
|
|
|
55579
55722
|
color = "var(--color-primary)",
|
|
55580
55723
|
animated = false
|
|
55581
55724
|
}) => {
|
|
55582
|
-
const ids =
|
|
55725
|
+
const ids = React96__default.useMemo(() => {
|
|
55583
55726
|
avlOuId += 1;
|
|
55584
55727
|
const base = `avl-ou-${avlOuId}`;
|
|
55585
55728
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -55675,7 +55818,7 @@ var AvlClosedCircuit = ({
|
|
|
55675
55818
|
color = "var(--color-primary)",
|
|
55676
55819
|
animated = false
|
|
55677
55820
|
}) => {
|
|
55678
|
-
const ids =
|
|
55821
|
+
const ids = React96__default.useMemo(() => {
|
|
55679
55822
|
avlCcId += 1;
|
|
55680
55823
|
const base = `avl-cc-${avlCcId}`;
|
|
55681
55824
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -55830,7 +55973,7 @@ var AvlEmitListen = ({
|
|
|
55830
55973
|
color = "var(--color-primary)",
|
|
55831
55974
|
animated = false
|
|
55832
55975
|
}) => {
|
|
55833
|
-
const ids =
|
|
55976
|
+
const ids = React96__default.useMemo(() => {
|
|
55834
55977
|
avlElId += 1;
|
|
55835
55978
|
const base = `avl-el-${avlElId}`;
|
|
55836
55979
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -56103,7 +56246,7 @@ function renderNode(node, color, glowId) {
|
|
|
56103
56246
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
56104
56247
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
56105
56248
|
const nc = nodeColor(node.type, color);
|
|
56106
|
-
return /* @__PURE__ */ jsxs(
|
|
56249
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
56107
56250
|
node.children.map((child, i) => {
|
|
56108
56251
|
const childR = Math.max(
|
|
56109
56252
|
child.type === "operator" ? 20 : 16,
|
|
@@ -56160,7 +56303,7 @@ var AvlExprTree = ({
|
|
|
56160
56303
|
className,
|
|
56161
56304
|
color = "var(--color-primary)"
|
|
56162
56305
|
}) => {
|
|
56163
|
-
const ids =
|
|
56306
|
+
const ids = React96__default.useMemo(() => {
|
|
56164
56307
|
avlEtId += 1;
|
|
56165
56308
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
56166
56309
|
}, []);
|
|
@@ -56723,7 +56866,7 @@ var SystemNode = ({ data }) => {
|
|
|
56723
56866
|
stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
|
|
56724
56867
|
const tc = transitionCounts[s.name] ?? 0;
|
|
56725
56868
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
56726
|
-
return /* @__PURE__ */ jsxs(
|
|
56869
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
56727
56870
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
56728
56871
|
i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
|
|
56729
56872
|
] }, s.name);
|
|
@@ -57063,10 +57206,17 @@ AvlBindingEdge.displayName = "AvlBindingEdge";
|
|
|
57063
57206
|
|
|
57064
57207
|
// components/molecules/avl/avl-preview-types.ts
|
|
57065
57208
|
var SCREEN_SIZE_PRESETS = {
|
|
57066
|
-
mobile: { width: 375, minHeight:
|
|
57067
|
-
tablet: { width:
|
|
57068
|
-
|
|
57209
|
+
mobile: { width: 375, minHeight: 320, label: "Mobile", icon: "smartphone" },
|
|
57210
|
+
tablet: { width: 768, minHeight: 320, label: "Tablet", icon: "tablet" },
|
|
57211
|
+
laptop: { width: 1280, minHeight: 360, label: "Laptop", icon: "monitor" },
|
|
57212
|
+
wide: { width: 1600, minHeight: 360, label: "Wide", icon: "monitor-up" }
|
|
57069
57213
|
};
|
|
57214
|
+
function detectScreenSize(viewportWidth) {
|
|
57215
|
+
if (viewportWidth <= 640) return "mobile";
|
|
57216
|
+
if (viewportWidth <= 1024) return "tablet";
|
|
57217
|
+
if (viewportWidth <= 1440) return "laptop";
|
|
57218
|
+
return "wide";
|
|
57219
|
+
}
|
|
57070
57220
|
|
|
57071
57221
|
// components/molecules/avl/avl-preview-converter.ts
|
|
57072
57222
|
var OVERVIEW_SPACING = 900;
|
|
@@ -57967,7 +58117,7 @@ function resolveLambdaBindings(body, argName, arg) {
|
|
|
57967
58117
|
if (Array.isArray(body)) {
|
|
57968
58118
|
return body.map((b) => resolveLambdaBindings(b, argName, arg));
|
|
57969
58119
|
}
|
|
57970
|
-
if (body !== null && typeof body === "object" && !
|
|
58120
|
+
if (body !== null && typeof body === "object" && !React96__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
57971
58121
|
const out = {};
|
|
57972
58122
|
for (const [k, v] of Object.entries(body)) {
|
|
57973
58123
|
out[k] = resolveLambdaBindings(v, argName, arg);
|
|
@@ -57986,7 +58136,7 @@ function getSlotContentRenderer2() {
|
|
|
57986
58136
|
function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
57987
58137
|
return (item, index) => {
|
|
57988
58138
|
const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
|
|
57989
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
58139
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React96__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
57990
58140
|
return null;
|
|
57991
58141
|
}
|
|
57992
58142
|
const record = resolvedBody;
|
|
@@ -58004,7 +58154,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
|
58004
58154
|
props: childProps,
|
|
58005
58155
|
priority: 0
|
|
58006
58156
|
};
|
|
58007
|
-
return
|
|
58157
|
+
return React96__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
58008
58158
|
};
|
|
58009
58159
|
}
|
|
58010
58160
|
function convertNode(node, callerKey) {
|
|
@@ -58023,7 +58173,7 @@ function convertNode(node, callerKey) {
|
|
|
58023
58173
|
});
|
|
58024
58174
|
return anyChanged ? mapped : node;
|
|
58025
58175
|
}
|
|
58026
|
-
if (typeof node === "object" && !
|
|
58176
|
+
if (typeof node === "object" && !React96__default.isValidElement(node) && !(node instanceof Date)) {
|
|
58027
58177
|
return convertObjectProps(node);
|
|
58028
58178
|
}
|
|
58029
58179
|
return node;
|
|
@@ -59754,8 +59904,8 @@ function CanvasDndProvider({
|
|
|
59754
59904
|
}) {
|
|
59755
59905
|
const eventBus = useEventBus();
|
|
59756
59906
|
const sensors = useAlmadarDndSensors(false);
|
|
59757
|
-
const [activePayload, setActivePayload] =
|
|
59758
|
-
const handleDragStart =
|
|
59907
|
+
const [activePayload, setActivePayload] = React96__default.useState(null);
|
|
59908
|
+
const handleDragStart = React96__default.useCallback((e) => {
|
|
59759
59909
|
const data = e.active.data.current;
|
|
59760
59910
|
const payload = data?.payload;
|
|
59761
59911
|
if (payload) {
|
|
@@ -59766,7 +59916,7 @@ function CanvasDndProvider({
|
|
|
59766
59916
|
log18.warn("dragStart:missing-payload", { id: e.active.id });
|
|
59767
59917
|
}
|
|
59768
59918
|
}, [eventBus]);
|
|
59769
|
-
const handleDragEnd =
|
|
59919
|
+
const handleDragEnd = React96__default.useCallback((e) => {
|
|
59770
59920
|
setActivePayload(null);
|
|
59771
59921
|
const activeData = e.active.data.current;
|
|
59772
59922
|
const payload = activeData?.payload;
|
|
@@ -59795,7 +59945,7 @@ function CanvasDndProvider({
|
|
|
59795
59945
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
59796
59946
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
59797
59947
|
}, [eventBus, onDrop]);
|
|
59798
|
-
const handleDragCancel =
|
|
59948
|
+
const handleDragCancel = React96__default.useCallback(() => {
|
|
59799
59949
|
setActivePayload(null);
|
|
59800
59950
|
log18.info("dragCancel");
|
|
59801
59951
|
}, []);
|
|
@@ -60402,7 +60552,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
60402
60552
|
}
|
|
60403
60553
|
);
|
|
60404
60554
|
};
|
|
60405
|
-
var OrbPreviewNode =
|
|
60555
|
+
var OrbPreviewNode = React96__default.memo(OrbPreviewNodeInner);
|
|
60406
60556
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
60407
60557
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
60408
60558
|
type: typeof OrbPreviewNode,
|
|
@@ -60507,7 +60657,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
60507
60657
|
) })
|
|
60508
60658
|
] });
|
|
60509
60659
|
};
|
|
60510
|
-
var EventFlowEdge =
|
|
60660
|
+
var EventFlowEdge = React96__default.memo(EventFlowEdgeInner);
|
|
60511
60661
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
60512
60662
|
|
|
60513
60663
|
// components/molecules/avl/BehaviorComposeNode.tsx
|
|
@@ -60654,7 +60804,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
60654
60804
|
}
|
|
60655
60805
|
);
|
|
60656
60806
|
};
|
|
60657
|
-
var BehaviorComposeNode =
|
|
60807
|
+
var BehaviorComposeNode = React96__default.memo(BehaviorComposeNodeInner);
|
|
60658
60808
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
60659
60809
|
|
|
60660
60810
|
// components/molecules/avl/avl-behavior-compose-converter.ts
|
|
@@ -61520,7 +61670,23 @@ function FlowCanvasInner({
|
|
|
61520
61670
|
const [expandedOrbital, setExpandedOrbital] = useState(
|
|
61521
61671
|
initialOrbital
|
|
61522
61672
|
);
|
|
61523
|
-
const
|
|
61673
|
+
const screenSizeUserOverrideRef = React96__default.useRef(false);
|
|
61674
|
+
const [screenSize, setScreenSize] = useState(
|
|
61675
|
+
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
61676
|
+
);
|
|
61677
|
+
useEffect(() => {
|
|
61678
|
+
if (typeof window === "undefined") return void 0;
|
|
61679
|
+
const onResize = () => {
|
|
61680
|
+
if (screenSizeUserOverrideRef.current) return;
|
|
61681
|
+
setScreenSize(detectScreenSize(window.innerWidth));
|
|
61682
|
+
};
|
|
61683
|
+
window.addEventListener("resize", onResize);
|
|
61684
|
+
return () => window.removeEventListener("resize", onResize);
|
|
61685
|
+
}, []);
|
|
61686
|
+
const pickScreenSize = useCallback((size) => {
|
|
61687
|
+
screenSizeUserOverrideRef.current = true;
|
|
61688
|
+
setScreenSize(size);
|
|
61689
|
+
}, []);
|
|
61524
61690
|
const [selectedNode, setSelectedNode] = useState(initialSelectedNode ?? null);
|
|
61525
61691
|
const [selectedPattern, setSelectedPattern] = useState(null);
|
|
61526
61692
|
const patternSelectionValue = useMemo(() => ({
|
|
@@ -61690,7 +61856,7 @@ function FlowCanvasInner({
|
|
|
61690
61856
|
targetTraitName: tgtData.traitName
|
|
61691
61857
|
});
|
|
61692
61858
|
}, [nodes, onEventWire, eventBus]);
|
|
61693
|
-
const screenSizeKeys = ["mobile", "tablet", "
|
|
61859
|
+
const screenSizeKeys = ["mobile", "tablet", "laptop", "wide"];
|
|
61694
61860
|
return /* @__PURE__ */ jsx(ScreenSizeContext.Provider, { value: screenSize, children: /* @__PURE__ */ jsx(PatternSelectionContext.Provider, { value: patternSelectionValue, children: /* @__PURE__ */ jsxs(
|
|
61695
61861
|
Box,
|
|
61696
61862
|
{
|
|
@@ -61769,7 +61935,7 @@ function FlowCanvasInner({
|
|
|
61769
61935
|
"button",
|
|
61770
61936
|
{
|
|
61771
61937
|
onClick: () => {
|
|
61772
|
-
|
|
61938
|
+
pickScreenSize(size);
|
|
61773
61939
|
requestAnimationFrame(() => {
|
|
61774
61940
|
reactFlow.fitView({ duration: 300, padding: 0.15 });
|
|
61775
61941
|
});
|
|
@@ -61843,7 +62009,7 @@ var ZoomBreadcrumb = ({
|
|
|
61843
62009
|
if (eventName && band === "detail") {
|
|
61844
62010
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
61845
62011
|
}
|
|
61846
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-[11px] text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(
|
|
62012
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-[11px] text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
61847
62013
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
61848
62014
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
61849
62015
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -62322,7 +62488,7 @@ var EventWireOverlay = ({
|
|
|
62322
62488
|
containerW,
|
|
62323
62489
|
containerH
|
|
62324
62490
|
}) => {
|
|
62325
|
-
const ids =
|
|
62491
|
+
const ids = React96__default.useMemo(() => {
|
|
62326
62492
|
avlOczWireId += 1;
|
|
62327
62493
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
62328
62494
|
}, []);
|
|
@@ -62681,7 +62847,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
62681
62847
|
borderRadius: 6,
|
|
62682
62848
|
border: `1px solid ${color}`
|
|
62683
62849
|
},
|
|
62684
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
62850
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
62685
62851
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
62686
62852
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
62687
62853
|
Box,
|