@almadar/ui 2.27.2 → 2.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/flow/FlowLabel.d.ts +23 -0
- package/dist/components/atoms/flow/FlowMinimap.d.ts +28 -0
- package/dist/components/atoms/flow/FlowNodeShell.d.ts +25 -0
- package/dist/components/atoms/flow/FlowPort.d.ts +26 -0
- package/dist/components/atoms/flow/FlowWire.d.ts +39 -0
- package/dist/components/atoms/flow/index.d.ts +13 -0
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/index.cjs +1745 -1018
- package/dist/components/index.js +854 -142
- package/dist/components/molecules/avl/AvlBehaviorGlyph.d.ts +61 -0
- package/dist/components/molecules/avl/index.d.ts +1 -0
- package/dist/components/molecules/flow/BehaviorNode.d.ts +28 -0
- package/dist/components/molecules/flow/EffectNode.d.ts +26 -0
- package/dist/components/molecules/flow/EventWireEdge.d.ts +23 -0
- package/dist/components/molecules/flow/ExprNode.d.ts +27 -0
- package/dist/components/molecules/flow/FlowStateNode.d.ts +18 -0
- package/dist/components/molecules/flow/NodePalette.d.ts +36 -0
- package/dist/components/molecules/flow/OrbitalNode.d.ts +31 -0
- package/dist/components/molecules/flow/TransitionEdge.d.ts +26 -0
- package/dist/components/molecules/flow/index.d.ts +8 -0
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/docs/index.cjs +1 -1
- package/dist/docs/index.js +1 -1
- package/dist/flow/index.cjs +3832 -0
- package/dist/flow/index.d.cts +367 -0
- package/dist/flow/index.d.ts +10 -0
- package/dist/flow/index.js +3793 -0
- package/dist/marketing/index.cjs +1 -1
- package/dist/marketing/index.js +1 -1
- package/dist/providers/index.cjs +146 -144
- package/dist/providers/index.js +44 -42
- package/dist/runtime/index.cjs +977 -920
- package/dist/runtime/index.js +203 -146
- package/package.json +7 -1
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React113 from 'react';
|
|
2
|
+
import React113__default, { createContext, useCallback, useState, useRef, useEffect, useLayoutEffect, lazy, useContext, useMemo } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { EventBusContext } from '@almadar/ui/providers';
|
|
5
5
|
import 'react-dom';
|
|
@@ -20,6 +20,7 @@ import remarkMath from 'remark-math';
|
|
|
20
20
|
import rehypeKatex from 'rehype-katex';
|
|
21
21
|
import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism';
|
|
22
22
|
import dark from 'react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus';
|
|
23
|
+
import '@xyflow/react';
|
|
23
24
|
|
|
24
25
|
var __defProp = Object.defineProperty;
|
|
25
26
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -674,7 +675,7 @@ var positionStyles = {
|
|
|
674
675
|
fixed: "fixed",
|
|
675
676
|
sticky: "sticky"
|
|
676
677
|
};
|
|
677
|
-
var Box =
|
|
678
|
+
var Box = React113__default.forwardRef(
|
|
678
679
|
({
|
|
679
680
|
padding,
|
|
680
681
|
paddingX,
|
|
@@ -843,7 +844,7 @@ var Typography = ({
|
|
|
843
844
|
align,
|
|
844
845
|
weight,
|
|
845
846
|
size,
|
|
846
|
-
truncate = false,
|
|
847
|
+
truncate: truncate2 = false,
|
|
847
848
|
overflow,
|
|
848
849
|
as,
|
|
849
850
|
id,
|
|
@@ -865,7 +866,7 @@ var Typography = ({
|
|
|
865
866
|
weight && weightStyles[weight],
|
|
866
867
|
size && typographySizeStyles[size],
|
|
867
868
|
align && `text-${align}`,
|
|
868
|
-
|
|
869
|
+
truncate2 && "truncate overflow-hidden text-ellipsis",
|
|
869
870
|
overflow && overflowStyles2[overflow],
|
|
870
871
|
className
|
|
871
872
|
),
|
|
@@ -892,7 +893,7 @@ var variantStyles2 = {
|
|
|
892
893
|
ghost: [
|
|
893
894
|
"bg-transparent text-muted-foreground",
|
|
894
895
|
"border border-transparent",
|
|
895
|
-
"hover:text-foreground hover:bg-
|
|
896
|
+
"hover:text-primary-foreground hover:bg-primary hover:border-primary",
|
|
896
897
|
"active:scale-[var(--active-scale)]"
|
|
897
898
|
].join(" "),
|
|
898
899
|
danger: [
|
|
@@ -945,7 +946,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
945
946
|
const IconComp = value;
|
|
946
947
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
947
948
|
}
|
|
948
|
-
if (
|
|
949
|
+
if (React113__default.isValidElement(value)) {
|
|
949
950
|
return value;
|
|
950
951
|
}
|
|
951
952
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -954,7 +955,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
954
955
|
}
|
|
955
956
|
return value;
|
|
956
957
|
}
|
|
957
|
-
var Button =
|
|
958
|
+
var Button = React113__default.forwardRef(
|
|
958
959
|
({
|
|
959
960
|
className,
|
|
960
961
|
variant = "primary",
|
|
@@ -1050,7 +1051,7 @@ var sizeStyles3 = {
|
|
|
1050
1051
|
md: "px-2.5 py-1 text-sm",
|
|
1051
1052
|
lg: "px-3 py-1.5 text-base"
|
|
1052
1053
|
};
|
|
1053
|
-
var Badge =
|
|
1054
|
+
var Badge = React113__default.forwardRef(
|
|
1054
1055
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
1055
1056
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1056
1057
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -1077,7 +1078,7 @@ var Badge = React112__default.forwardRef(
|
|
|
1077
1078
|
}
|
|
1078
1079
|
);
|
|
1079
1080
|
Badge.displayName = "Badge";
|
|
1080
|
-
var Input =
|
|
1081
|
+
var Input = React113__default.forwardRef(
|
|
1081
1082
|
({
|
|
1082
1083
|
className,
|
|
1083
1084
|
inputType,
|
|
@@ -1189,7 +1190,7 @@ var Input = React112__default.forwardRef(
|
|
|
1189
1190
|
}
|
|
1190
1191
|
);
|
|
1191
1192
|
Input.displayName = "Input";
|
|
1192
|
-
var Label =
|
|
1193
|
+
var Label = React113__default.forwardRef(
|
|
1193
1194
|
({ className, required, children, ...props }, ref) => {
|
|
1194
1195
|
return /* @__PURE__ */ jsxs(
|
|
1195
1196
|
"label",
|
|
@@ -1209,7 +1210,7 @@ var Label = React112__default.forwardRef(
|
|
|
1209
1210
|
}
|
|
1210
1211
|
);
|
|
1211
1212
|
Label.displayName = "Label";
|
|
1212
|
-
var Textarea =
|
|
1213
|
+
var Textarea = React113__default.forwardRef(
|
|
1213
1214
|
({ className, error, ...props }, ref) => {
|
|
1214
1215
|
return /* @__PURE__ */ jsx(
|
|
1215
1216
|
"textarea",
|
|
@@ -1232,7 +1233,7 @@ var Textarea = React112__default.forwardRef(
|
|
|
1232
1233
|
}
|
|
1233
1234
|
);
|
|
1234
1235
|
Textarea.displayName = "Textarea";
|
|
1235
|
-
var Select =
|
|
1236
|
+
var Select = React113__default.forwardRef(
|
|
1236
1237
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
1237
1238
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1238
1239
|
/* @__PURE__ */ jsxs(
|
|
@@ -1268,7 +1269,7 @@ var Select = React112__default.forwardRef(
|
|
|
1268
1269
|
}
|
|
1269
1270
|
);
|
|
1270
1271
|
Select.displayName = "Select";
|
|
1271
|
-
var Checkbox =
|
|
1272
|
+
var Checkbox = React113__default.forwardRef(
|
|
1272
1273
|
({ className, label, id, ...props }, ref) => {
|
|
1273
1274
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
1274
1275
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -1344,7 +1345,7 @@ var shadowStyles2 = {
|
|
|
1344
1345
|
md: "shadow",
|
|
1345
1346
|
lg: "shadow-lg"
|
|
1346
1347
|
};
|
|
1347
|
-
var Card =
|
|
1348
|
+
var Card = React113__default.forwardRef(
|
|
1348
1349
|
({
|
|
1349
1350
|
className,
|
|
1350
1351
|
variant = "bordered",
|
|
@@ -1380,9 +1381,9 @@ var Card = React112__default.forwardRef(
|
|
|
1380
1381
|
}
|
|
1381
1382
|
);
|
|
1382
1383
|
Card.displayName = "Card";
|
|
1383
|
-
var CardHeader =
|
|
1384
|
+
var CardHeader = React113__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
1384
1385
|
CardHeader.displayName = "CardHeader";
|
|
1385
|
-
var CardTitle =
|
|
1386
|
+
var CardTitle = React113__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1386
1387
|
"h3",
|
|
1387
1388
|
{
|
|
1388
1389
|
ref,
|
|
@@ -1395,11 +1396,11 @@ var CardTitle = React112__default.forwardRef(({ className, ...props }, ref) => /
|
|
|
1395
1396
|
}
|
|
1396
1397
|
));
|
|
1397
1398
|
CardTitle.displayName = "CardTitle";
|
|
1398
|
-
var CardContent =
|
|
1399
|
+
var CardContent = React113__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
1399
1400
|
CardContent.displayName = "CardContent";
|
|
1400
1401
|
var CardBody = CardContent;
|
|
1401
1402
|
CardBody.displayName = "CardBody";
|
|
1402
|
-
var CardFooter =
|
|
1403
|
+
var CardFooter = React113__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1403
1404
|
"div",
|
|
1404
1405
|
{
|
|
1405
1406
|
ref,
|
|
@@ -1414,7 +1415,7 @@ var sizeStyles4 = {
|
|
|
1414
1415
|
md: "h-6 w-6",
|
|
1415
1416
|
lg: "h-8 w-8"
|
|
1416
1417
|
};
|
|
1417
|
-
var Spinner =
|
|
1418
|
+
var Spinner = React113__default.forwardRef(
|
|
1418
1419
|
({ className, size = "md", ...props }, ref) => {
|
|
1419
1420
|
return /* @__PURE__ */ jsx(
|
|
1420
1421
|
"div",
|
|
@@ -1428,7 +1429,7 @@ var Spinner = React112__default.forwardRef(
|
|
|
1428
1429
|
}
|
|
1429
1430
|
);
|
|
1430
1431
|
Spinner.displayName = "Spinner";
|
|
1431
|
-
var Radio =
|
|
1432
|
+
var Radio = React113__default.forwardRef(
|
|
1432
1433
|
({
|
|
1433
1434
|
label,
|
|
1434
1435
|
helperText,
|
|
@@ -1532,7 +1533,7 @@ var Radio = React112__default.forwardRef(
|
|
|
1532
1533
|
}
|
|
1533
1534
|
);
|
|
1534
1535
|
Radio.displayName = "Radio";
|
|
1535
|
-
var Switch =
|
|
1536
|
+
var Switch = React113.forwardRef(
|
|
1536
1537
|
({
|
|
1537
1538
|
checked,
|
|
1538
1539
|
defaultChecked = false,
|
|
@@ -1543,10 +1544,10 @@ var Switch = React112.forwardRef(
|
|
|
1543
1544
|
name,
|
|
1544
1545
|
className
|
|
1545
1546
|
}, ref) => {
|
|
1546
|
-
const [isChecked, setIsChecked] =
|
|
1547
|
+
const [isChecked, setIsChecked] = React113.useState(
|
|
1547
1548
|
checked !== void 0 ? checked : defaultChecked
|
|
1548
1549
|
);
|
|
1549
|
-
|
|
1550
|
+
React113.useEffect(() => {
|
|
1550
1551
|
if (checked !== void 0) {
|
|
1551
1552
|
setIsChecked(checked);
|
|
1552
1553
|
}
|
|
@@ -1704,7 +1705,7 @@ var sizeStyles5 = {
|
|
|
1704
1705
|
md: "w-2.5 h-2.5",
|
|
1705
1706
|
lg: "w-3 h-3"
|
|
1706
1707
|
};
|
|
1707
|
-
var StatusDot =
|
|
1708
|
+
var StatusDot = React113__default.forwardRef(
|
|
1708
1709
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
1709
1710
|
return /* @__PURE__ */ jsx(
|
|
1710
1711
|
"span",
|
|
@@ -1751,7 +1752,7 @@ var iconMap2 = {
|
|
|
1751
1752
|
down: TrendingDown,
|
|
1752
1753
|
flat: ArrowRight
|
|
1753
1754
|
};
|
|
1754
|
-
var TrendIndicator =
|
|
1755
|
+
var TrendIndicator = React113__default.forwardRef(
|
|
1755
1756
|
({
|
|
1756
1757
|
className,
|
|
1757
1758
|
value,
|
|
@@ -1810,7 +1811,7 @@ var thumbSizes = {
|
|
|
1810
1811
|
md: "w-4 h-4",
|
|
1811
1812
|
lg: "w-5 h-5"
|
|
1812
1813
|
};
|
|
1813
|
-
var RangeSlider =
|
|
1814
|
+
var RangeSlider = React113__default.forwardRef(
|
|
1814
1815
|
({
|
|
1815
1816
|
className,
|
|
1816
1817
|
min = 0,
|
|
@@ -2013,7 +2014,7 @@ var paddingClasses = {
|
|
|
2013
2014
|
md: "py-16",
|
|
2014
2015
|
lg: "py-24"
|
|
2015
2016
|
};
|
|
2016
|
-
var ContentSection =
|
|
2017
|
+
var ContentSection = React113__default.forwardRef(
|
|
2017
2018
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
2018
2019
|
return /* @__PURE__ */ jsx(
|
|
2019
2020
|
Box,
|
|
@@ -2052,7 +2053,7 @@ var animatedStyles = {
|
|
|
2052
2053
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
2053
2054
|
"none": {}
|
|
2054
2055
|
};
|
|
2055
|
-
var AnimatedReveal =
|
|
2056
|
+
var AnimatedReveal = React113__default.forwardRef(
|
|
2056
2057
|
({
|
|
2057
2058
|
trigger = "scroll",
|
|
2058
2059
|
animation = "fade-up",
|
|
@@ -2205,7 +2206,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
|
2205
2206
|
el.style.opacity = animate ? "1" : "0";
|
|
2206
2207
|
});
|
|
2207
2208
|
}
|
|
2208
|
-
var AnimatedGraphic =
|
|
2209
|
+
var AnimatedGraphic = React113__default.forwardRef(
|
|
2209
2210
|
({
|
|
2210
2211
|
src,
|
|
2211
2212
|
svgContent,
|
|
@@ -2228,7 +2229,7 @@ var AnimatedGraphic = React112__default.forwardRef(
|
|
|
2228
2229
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
2229
2230
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
2230
2231
|
const prevAnimateRef = useRef(animate);
|
|
2231
|
-
const setRef =
|
|
2232
|
+
const setRef = React113__default.useCallback(
|
|
2232
2233
|
(node) => {
|
|
2233
2234
|
containerRef.current = node;
|
|
2234
2235
|
if (typeof ref === "function") ref(node);
|
|
@@ -2470,7 +2471,7 @@ var ErrorState = ({
|
|
|
2470
2471
|
);
|
|
2471
2472
|
};
|
|
2472
2473
|
ErrorState.displayName = "ErrorState";
|
|
2473
|
-
var ErrorBoundary = class extends
|
|
2474
|
+
var ErrorBoundary = class extends React113__default.Component {
|
|
2474
2475
|
constructor(props) {
|
|
2475
2476
|
super(props);
|
|
2476
2477
|
__publicField(this, "reset", () => {
|
|
@@ -3063,7 +3064,7 @@ function bindTraitStateGetter(getter) {
|
|
|
3063
3064
|
}
|
|
3064
3065
|
}
|
|
3065
3066
|
exposeOnWindow();
|
|
3066
|
-
var MarkdownContent =
|
|
3067
|
+
var MarkdownContent = React113__default.memo(
|
|
3067
3068
|
({ content, direction, className }) => {
|
|
3068
3069
|
const { t: _t } = useTranslate();
|
|
3069
3070
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -3165,7 +3166,7 @@ var MarkdownContent = React112__default.memo(
|
|
|
3165
3166
|
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
3166
3167
|
);
|
|
3167
3168
|
MarkdownContent.displayName = "MarkdownContent";
|
|
3168
|
-
var CodeBlock =
|
|
3169
|
+
var CodeBlock = React113__default.memo(
|
|
3169
3170
|
({
|
|
3170
3171
|
code: rawCode,
|
|
3171
3172
|
language = "text",
|
|
@@ -3282,12 +3283,12 @@ GameAudioContext.displayName = "GameAudioContext";
|
|
|
3282
3283
|
|
|
3283
3284
|
// components/organisms/component-registry.generated.ts
|
|
3284
3285
|
function lazyThree(name, loader) {
|
|
3285
|
-
const Lazy =
|
|
3286
|
+
const Lazy = React113__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
3286
3287
|
function ThreeWrapper(props) {
|
|
3287
|
-
return
|
|
3288
|
-
|
|
3288
|
+
return React113__default.createElement(
|
|
3289
|
+
React113__default.Suspense,
|
|
3289
3290
|
{ fallback: null },
|
|
3290
|
-
|
|
3291
|
+
React113__default.createElement(Lazy, props)
|
|
3291
3292
|
);
|
|
3292
3293
|
}
|
|
3293
3294
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -3314,7 +3315,7 @@ function SuspenseConfigProvider({
|
|
|
3314
3315
|
config,
|
|
3315
3316
|
children
|
|
3316
3317
|
}) {
|
|
3317
|
-
return
|
|
3318
|
+
return React113__default.createElement(
|
|
3318
3319
|
SuspenseConfigContext.Provider,
|
|
3319
3320
|
{ value: config },
|
|
3320
3321
|
children
|
|
@@ -3387,7 +3388,7 @@ function VerificationProvider({
|
|
|
3387
3388
|
})) : [];
|
|
3388
3389
|
recordTransition({
|
|
3389
3390
|
traitName: parsed.traitName,
|
|
3390
|
-
from: pending?.from ??
|
|
3391
|
+
from: pending?.from ?? payload["currentState"] ?? newState,
|
|
3391
3392
|
to: newState,
|
|
3392
3393
|
event: parsed.event,
|
|
3393
3394
|
effects,
|
|
@@ -3398,10 +3399,11 @@ function VerificationProvider({
|
|
|
3398
3399
|
const pending = pendingRef.current.get(key);
|
|
3399
3400
|
pendingRef.current.delete(key);
|
|
3400
3401
|
const errorMsg = payload["error"] ?? "Unknown error";
|
|
3402
|
+
const fromState = pending?.from ?? payload["currentState"] ?? "unknown";
|
|
3401
3403
|
recordTransition({
|
|
3402
3404
|
traitName: parsed.traitName,
|
|
3403
|
-
from:
|
|
3404
|
-
to:
|
|
3405
|
+
from: fromState,
|
|
3406
|
+
to: fromState,
|
|
3405
3407
|
// state didn't change on error
|
|
3406
3408
|
event: parsed.event,
|
|
3407
3409
|
effects: [{
|