@almadar/ui 5.70.0 → 5.71.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 +1953 -1802
- package/dist/avl/index.d.cts +93 -56
- package/dist/avl/index.js +677 -526
- package/dist/components/avl/molecules/AvlEventWireEdge.d.ts +2 -1
- package/dist/components/avl/molecules/AvlTransitionEdge.d.ts +2 -1
- package/dist/components/avl/molecules/avl-behavior-compose-converter.d.ts +7 -5
- package/dist/components/avl/molecules/avl-behavior-compose-types.d.ts +41 -21
- package/dist/components/avl/molecules/avl-canvas-types.d.ts +10 -7
- package/dist/components/avl/molecules/avl-preview-converter.d.ts +5 -5
- package/dist/components/avl/molecules/avl-preview-types.d.ts +15 -4
- package/dist/components/avl/organisms/FlowCanvas.d.ts +2 -2
- package/dist/components/avl/organisms/avl-schema-parser.d.ts +18 -16
- package/dist/components/core/atoms/Button.d.ts +2 -0
- package/dist/components/core/atoms/ConditionalWrapper.d.ts +5 -4
- package/dist/components/core/molecules/Carousel.d.ts +2 -2
- package/dist/components/core/molecules/OrbitalVisualization.d.ts +4 -3
- package/dist/components/core/molecules/PageHeader.d.ts +3 -3
- package/dist/components/core/molecules/RepeatableFormSection.d.ts +4 -3
- package/dist/components/core/molecules/ViolationAlert.d.ts +2 -0
- package/dist/components/core/molecules/WizardContainer.d.ts +23 -22
- package/dist/components/core/organisms/CardGrid.d.ts +2 -2
- package/dist/components/core/organisms/CustomPattern.d.ts +3 -4
- package/dist/components/core/organisms/DataTable.d.ts +2 -2
- package/dist/components/core/organisms/DetailPanel.d.ts +1 -1
- package/dist/components/core/organisms/Form.d.ts +11 -11
- package/dist/components/core/organisms/List.d.ts +3 -5
- package/dist/components/core/organisms/StatCard.d.ts +2 -2
- package/dist/components/core/organisms/book/types.d.ts +1 -1
- package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +2 -1
- package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +2 -1
- package/dist/components/core/organisms/layout/DashboardGrid.d.ts +0 -2
- package/dist/components/core/organisms/types.d.ts +3 -2
- package/dist/components/game/atoms/ScoreDisplay.d.ts +3 -1
- package/dist/components/game/molecules/three/hooks/useSceneGraph.d.ts +2 -1
- package/dist/components/game/molecules/three/index.cjs +37 -24
- package/dist/components/game/molecules/three/index.js +37 -24
- package/dist/components/game/organisms/PinballBoard.d.ts +4 -4
- package/dist/components/game/organisms/boardEntity.d.ts +6 -6
- package/dist/components/game/organisms/puzzles/debugger/DebuggerBoard.d.ts +16 -2
- package/dist/components/game/organisms/puzzles/event-handler/puzzleObject.d.ts +21 -10
- package/dist/components/game/organisms/puzzles/state-architect/StateJsonView.d.ts +2 -1
- package/dist/components/index.cjs +1690 -1562
- package/dist/components/index.js +569 -441
- package/dist/docs/index.cjs +107 -104
- package/dist/docs/index.d.cts +2 -0
- package/dist/docs/index.js +38 -35
- package/dist/lib/getNestedValue.d.ts +2 -13
- package/dist/marketing/index.cjs +97 -98
- package/dist/marketing/index.d.cts +2 -0
- package/dist/marketing/index.js +54 -55
- package/dist/providers/index.cjs +1663 -1535
- package/dist/providers/index.js +554 -426
- package/dist/runtime/index.cjs +1721 -1593
- package/dist/runtime/index.js +560 -432
- package/package.json +1 -1
package/dist/marketing/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React11, { createContext, useCallback, useState, useRef, useEffect, useContext, useMemo, useSyncExternalStore, useId } from 'react';
|
|
2
2
|
import { createLogger } from '@almadar/logger';
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import * as LucideIcons2 from 'lucide-react';
|
|
@@ -2748,7 +2748,7 @@ var positionStyles = {
|
|
|
2748
2748
|
fixed: "fixed",
|
|
2749
2749
|
sticky: "sticky"
|
|
2750
2750
|
};
|
|
2751
|
-
var Box =
|
|
2751
|
+
var Box = React11.forwardRef(
|
|
2752
2752
|
({
|
|
2753
2753
|
padding,
|
|
2754
2754
|
paddingX,
|
|
@@ -2813,7 +2813,7 @@ var Box = React9.forwardRef(
|
|
|
2813
2813
|
onPointerDown?.(e);
|
|
2814
2814
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
2815
2815
|
const isClickable = action || onClick;
|
|
2816
|
-
return
|
|
2816
|
+
return React11.createElement(
|
|
2817
2817
|
Component,
|
|
2818
2818
|
{
|
|
2819
2819
|
ref,
|
|
@@ -2901,9 +2901,8 @@ var Stack = ({
|
|
|
2901
2901
|
};
|
|
2902
2902
|
const isHorizontal = direction === "horizontal";
|
|
2903
2903
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
Comp,
|
|
2904
|
+
return React11.createElement(
|
|
2905
|
+
Component,
|
|
2907
2906
|
{
|
|
2908
2907
|
className: cn(
|
|
2909
2908
|
"flex",
|
|
@@ -2919,9 +2918,9 @@ var Stack = ({
|
|
|
2919
2918
|
onClick: action || onClick ? handleClick : void 0,
|
|
2920
2919
|
onKeyDown,
|
|
2921
2920
|
role,
|
|
2922
|
-
tabIndex
|
|
2923
|
-
|
|
2924
|
-
|
|
2921
|
+
tabIndex
|
|
2922
|
+
},
|
|
2923
|
+
children
|
|
2925
2924
|
);
|
|
2926
2925
|
};
|
|
2927
2926
|
var VStack = (props) => /* @__PURE__ */ jsx(Stack, { direction: "vertical", ...props });
|
|
@@ -3012,9 +3011,8 @@ var Typography = ({
|
|
|
3012
3011
|
}) => {
|
|
3013
3012
|
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
3014
3013
|
const Component = as || defaultElements[variant];
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
Comp,
|
|
3014
|
+
return React11.createElement(
|
|
3015
|
+
Component,
|
|
3018
3016
|
{
|
|
3019
3017
|
id,
|
|
3020
3018
|
className: cn(
|
|
@@ -3027,9 +3025,9 @@ var Typography = ({
|
|
|
3027
3025
|
overflow && overflowStyles2[overflow],
|
|
3028
3026
|
className
|
|
3029
3027
|
),
|
|
3030
|
-
style
|
|
3031
|
-
|
|
3032
|
-
|
|
3028
|
+
style
|
|
3029
|
+
},
|
|
3030
|
+
children ?? content
|
|
3033
3031
|
);
|
|
3034
3032
|
};
|
|
3035
3033
|
Typography.displayName = "Typography";
|
|
@@ -3105,7 +3103,7 @@ function loadLib(key, importer) {
|
|
|
3105
3103
|
return p;
|
|
3106
3104
|
}
|
|
3107
3105
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
3108
|
-
const Lazy =
|
|
3106
|
+
const Lazy = React11.lazy(async () => {
|
|
3109
3107
|
const lib = await loadLib(libKey, importer);
|
|
3110
3108
|
const Comp = pick(lib);
|
|
3111
3109
|
if (!Comp) {
|
|
@@ -3115,7 +3113,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
3115
3113
|
return { default: Comp };
|
|
3116
3114
|
});
|
|
3117
3115
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
3118
|
-
|
|
3116
|
+
React11.Suspense,
|
|
3119
3117
|
{
|
|
3120
3118
|
fallback: /* @__PURE__ */ jsx(
|
|
3121
3119
|
"span",
|
|
@@ -3785,9 +3783,10 @@ function resolveIcon(name) {
|
|
|
3785
3783
|
function doResolve(name) {
|
|
3786
3784
|
if (iconAliases[name]) return iconAliases[name];
|
|
3787
3785
|
const pascalName = kebabToPascal2(name);
|
|
3788
|
-
const
|
|
3786
|
+
const lucideMap = LucideIcons2;
|
|
3787
|
+
const directLookup = lucideMap[pascalName];
|
|
3789
3788
|
if (directLookup && typeof directLookup === "object") return directLookup;
|
|
3790
|
-
const asIs =
|
|
3789
|
+
const asIs = lucideMap[name];
|
|
3791
3790
|
if (asIs && typeof asIs === "object") return asIs;
|
|
3792
3791
|
return LucideIcons2.HelpCircle;
|
|
3793
3792
|
}
|
|
@@ -3816,7 +3815,7 @@ var Icon = ({
|
|
|
3816
3815
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
3817
3816
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
3818
3817
|
const family = useIconFamily();
|
|
3819
|
-
const RenderedComponent =
|
|
3818
|
+
const RenderedComponent = React11.useMemo(() => {
|
|
3820
3819
|
if (directIcon) return null;
|
|
3821
3820
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
3822
3821
|
}, [directIcon, effectiveName, family]);
|
|
@@ -3924,6 +3923,9 @@ var iconSizeStyles = {
|
|
|
3924
3923
|
md: "h-icon-default w-icon-default",
|
|
3925
3924
|
lg: "h-icon-default w-icon-default"
|
|
3926
3925
|
};
|
|
3926
|
+
function isIconLike(v) {
|
|
3927
|
+
return typeof v.render === "function";
|
|
3928
|
+
}
|
|
3927
3929
|
function resolveIconProp(value, sizeClass) {
|
|
3928
3930
|
if (!value) return null;
|
|
3929
3931
|
if (typeof value === "string") {
|
|
@@ -3933,16 +3935,16 @@ function resolveIconProp(value, sizeClass) {
|
|
|
3933
3935
|
const IconComp = value;
|
|
3934
3936
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
3935
3937
|
}
|
|
3936
|
-
if (
|
|
3938
|
+
if (React11.isValidElement(value)) {
|
|
3937
3939
|
return value;
|
|
3938
3940
|
}
|
|
3939
|
-
if (typeof value === "object" && value !== null &&
|
|
3941
|
+
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
3940
3942
|
const IconComp = value;
|
|
3941
3943
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
3942
3944
|
}
|
|
3943
3945
|
return value;
|
|
3944
3946
|
}
|
|
3945
|
-
var Button =
|
|
3947
|
+
var Button = React11.forwardRef(
|
|
3946
3948
|
({
|
|
3947
3949
|
className,
|
|
3948
3950
|
variant = "primary",
|
|
@@ -3958,6 +3960,7 @@ var Button = React9.forwardRef(
|
|
|
3958
3960
|
label,
|
|
3959
3961
|
children,
|
|
3960
3962
|
onClick,
|
|
3963
|
+
"data-testid": dataTestId,
|
|
3961
3964
|
...props
|
|
3962
3965
|
}, ref) => {
|
|
3963
3966
|
const eventBus = useEventBus();
|
|
@@ -3990,7 +3993,7 @@ var Button = React9.forwardRef(
|
|
|
3990
3993
|
),
|
|
3991
3994
|
onClick: handleClick,
|
|
3992
3995
|
...props,
|
|
3993
|
-
"data-testid":
|
|
3996
|
+
"data-testid": dataTestId ?? (action ? `action-${action}` : void 0),
|
|
3994
3997
|
children: [
|
|
3995
3998
|
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-icon-default w-icon-default animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
|
|
3996
3999
|
children || label,
|
|
@@ -4038,7 +4041,7 @@ var sizeStyles2 = {
|
|
|
4038
4041
|
md: "px-2.5 py-1 text-sm",
|
|
4039
4042
|
lg: "px-3 py-1.5 text-base"
|
|
4040
4043
|
};
|
|
4041
|
-
var Badge =
|
|
4044
|
+
var Badge = React11.forwardRef(
|
|
4042
4045
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
4043
4046
|
const iconSizes = {
|
|
4044
4047
|
sm: "h-icon-default w-icon-default",
|
|
@@ -4091,7 +4094,7 @@ var sizeStyles3 = {
|
|
|
4091
4094
|
md: "h-6 w-6",
|
|
4092
4095
|
lg: "h-8 w-8"
|
|
4093
4096
|
};
|
|
4094
|
-
var Spinner =
|
|
4097
|
+
var Spinner = React11.forwardRef(
|
|
4095
4098
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4096
4099
|
if (overlay) {
|
|
4097
4100
|
return /* @__PURE__ */ jsx(
|
|
@@ -4173,7 +4176,7 @@ var lookStyles = {
|
|
|
4173
4176
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4174
4177
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4175
4178
|
};
|
|
4176
|
-
var Card =
|
|
4179
|
+
var Card = React11.forwardRef(
|
|
4177
4180
|
({
|
|
4178
4181
|
className,
|
|
4179
4182
|
variant = "bordered",
|
|
@@ -4221,9 +4224,9 @@ var Card = React9.forwardRef(
|
|
|
4221
4224
|
}
|
|
4222
4225
|
);
|
|
4223
4226
|
Card.displayName = "Card";
|
|
4224
|
-
var CardHeader =
|
|
4227
|
+
var CardHeader = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4225
4228
|
CardHeader.displayName = "CardHeader";
|
|
4226
|
-
var CardTitle =
|
|
4229
|
+
var CardTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4227
4230
|
"h3",
|
|
4228
4231
|
{
|
|
4229
4232
|
ref,
|
|
@@ -4236,11 +4239,11 @@ var CardTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4236
4239
|
}
|
|
4237
4240
|
));
|
|
4238
4241
|
CardTitle.displayName = "CardTitle";
|
|
4239
|
-
var CardContent =
|
|
4242
|
+
var CardContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4240
4243
|
CardContent.displayName = "CardContent";
|
|
4241
4244
|
var CardBody = CardContent;
|
|
4242
4245
|
CardBody.displayName = "CardBody";
|
|
4243
|
-
var CardFooter =
|
|
4246
|
+
var CardFooter = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4244
4247
|
"div",
|
|
4245
4248
|
{
|
|
4246
4249
|
ref,
|
|
@@ -4332,22 +4335,18 @@ var Center = ({
|
|
|
4332
4335
|
as: Component = "div"
|
|
4333
4336
|
}) => {
|
|
4334
4337
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
style: mergedStyle,
|
|
4348
|
-
children
|
|
4349
|
-
}
|
|
4350
|
-
);
|
|
4338
|
+
return React11.createElement(Component, {
|
|
4339
|
+
className: cn(
|
|
4340
|
+
inline ? "inline-flex" : "flex",
|
|
4341
|
+
horizontal && "justify-center",
|
|
4342
|
+
vertical && "items-center",
|
|
4343
|
+
fullHeight && "h-full",
|
|
4344
|
+
fullWidth && "w-full",
|
|
4345
|
+
className
|
|
4346
|
+
),
|
|
4347
|
+
style: mergedStyle,
|
|
4348
|
+
children
|
|
4349
|
+
});
|
|
4351
4350
|
};
|
|
4352
4351
|
var horizontalSizes = {
|
|
4353
4352
|
xs: "w-1",
|
|
@@ -4397,7 +4396,7 @@ var paddingClasses = {
|
|
|
4397
4396
|
md: "py-16",
|
|
4398
4397
|
lg: "py-24"
|
|
4399
4398
|
};
|
|
4400
|
-
var ContentSection =
|
|
4399
|
+
var ContentSection = React11.forwardRef(
|
|
4401
4400
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
4402
4401
|
return /* @__PURE__ */ jsx(
|
|
4403
4402
|
Box,
|
|
@@ -4999,7 +4998,7 @@ var StepFlow = ({
|
|
|
4999
4998
|
className
|
|
5000
4999
|
}) => {
|
|
5001
5000
|
if (orientation === "vertical") {
|
|
5002
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
5001
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React11.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
5003
5002
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
5004
5003
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
5005
5004
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -5010,7 +5009,7 @@ var StepFlow = ({
|
|
|
5010
5009
|
] })
|
|
5011
5010
|
] }) }, index)) });
|
|
5012
5011
|
}
|
|
5013
|
-
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(
|
|
5012
|
+
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(React11.Fragment, { children: [
|
|
5014
5013
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
5015
5014
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
5016
5015
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -5218,8 +5217,8 @@ var Avatar = ({
|
|
|
5218
5217
|
actionPayload
|
|
5219
5218
|
}) => {
|
|
5220
5219
|
const eventBus = useEventBus();
|
|
5221
|
-
const [imgFailed, setImgFailed] =
|
|
5222
|
-
|
|
5220
|
+
const [imgFailed, setImgFailed] = React11.useState(false);
|
|
5221
|
+
React11.useEffect(() => {
|
|
5223
5222
|
setImgFailed(false);
|
|
5224
5223
|
}, [src]);
|
|
5225
5224
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -5610,7 +5609,7 @@ var animatedStyles = {
|
|
|
5610
5609
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5611
5610
|
"none": {}
|
|
5612
5611
|
};
|
|
5613
|
-
var AnimatedReveal =
|
|
5612
|
+
var AnimatedReveal = React11.forwardRef(
|
|
5614
5613
|
({
|
|
5615
5614
|
trigger = "scroll",
|
|
5616
5615
|
animation = "fade-up",
|
|
@@ -5763,7 +5762,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
|
5763
5762
|
el.style.opacity = animate ? "1" : "0";
|
|
5764
5763
|
});
|
|
5765
5764
|
}
|
|
5766
|
-
var AnimatedGraphic =
|
|
5765
|
+
var AnimatedGraphic = React11.forwardRef(
|
|
5767
5766
|
({
|
|
5768
5767
|
src,
|
|
5769
5768
|
svgContent,
|
|
@@ -5786,7 +5785,7 @@ var AnimatedGraphic = React9.forwardRef(
|
|
|
5786
5785
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
5787
5786
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
5788
5787
|
const prevAnimateRef = useRef(animate);
|
|
5789
|
-
const setRef =
|
|
5788
|
+
const setRef = React11.useCallback(
|
|
5790
5789
|
(node) => {
|
|
5791
5790
|
containerRef.current = node;
|
|
5792
5791
|
if (typeof ref === "function") ref(node);
|