@almadar/ui 5.76.7 → 5.78.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 +1121 -535
- package/dist/avl/index.css +3 -3
- package/dist/avl/index.js +1122 -536
- package/dist/components/core/atoms/FlipContainer.d.ts +1 -1
- package/dist/components/core/atoms/index.d.ts +2 -1
- package/dist/components/core/molecules/Card.d.ts +1 -1
- package/dist/components/core/molecules/DataGrid.d.ts +1 -1
- package/dist/components/core/molecules/DataList.d.ts +1 -1
- package/dist/components/core/molecules/DocPagination.d.ts +1 -8
- package/dist/components/core/molecules/DocSearch.d.ts +1 -8
- package/dist/components/core/molecules/FlipCard.d.ts +1 -1
- package/dist/components/core/molecules/MapView.d.ts +1 -18
- package/dist/components/core/molecules/SortableList.d.ts +1 -1
- package/dist/components/core/molecules/TableView.d.ts +1 -1
- package/dist/components/core/molecules/index.d.ts +4 -0
- package/dist/components/core/organisms/DataTable.d.ts +1 -1
- package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +1 -10
- package/dist/components/core/organisms/debug/tabs/EntitiesTab.d.ts +1 -2
- package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +1 -2
- package/dist/components/core/organisms/debug/tabs/EventFlowTab.d.ts +1 -6
- package/dist/components/core/organisms/debug/tabs/GuardsPanel.d.ts +1 -6
- package/dist/components/core/organisms/debug/tabs/ServerBridgeTab.d.ts +1 -12
- package/dist/components/core/organisms/debug/tabs/TicksTab.d.ts +1 -2
- package/dist/components/core/organisms/debug/tabs/TraitsTab.d.ts +1 -2
- package/dist/components/core/organisms/debug/tabs/TransitionTimeline.d.ts +1 -11
- package/dist/components/core/organisms/debug/tabs/VerificationTab.d.ts +1 -8
- package/dist/components/game/2d/atoms/ActionButton.d.ts +1 -2
- package/dist/components/game/2d/atoms/ChoiceButton.d.ts +1 -2
- package/dist/components/game/2d/atoms/ComboCounter.d.ts +1 -2
- package/dist/components/game/2d/atoms/ControlButton.d.ts +1 -2
- package/dist/components/game/2d/atoms/DamageNumber.d.ts +1 -2
- package/dist/components/game/2d/atoms/DialogueBubble.d.ts +1 -2
- package/dist/components/game/2d/atoms/GameIcon.d.ts +1 -2
- package/dist/components/game/2d/atoms/HealthBar.d.ts +1 -2
- package/dist/components/game/2d/atoms/ItemSlot.d.ts +1 -2
- package/dist/components/game/2d/atoms/MiniMap.d.ts +1 -2
- package/dist/components/game/2d/atoms/ResourceCounter.d.ts +1 -2
- package/dist/components/game/2d/atoms/ScoreDisplay.d.ts +1 -2
- package/dist/components/game/2d/atoms/StatusEffect.d.ts +1 -2
- package/dist/components/game/2d/atoms/TimerDisplay.d.ts +1 -2
- package/dist/components/game/2d/atoms/TurnIndicator.d.ts +1 -2
- package/dist/components/game/2d/atoms/WaypointMarker.d.ts +1 -2
- package/dist/components/game/2d/molecules/GameHud.d.ts +1 -2
- package/dist/components/game/2d/molecules/GameMenu.d.ts +1 -2
- package/dist/components/game/2d/molecules/InventoryGrid.d.ts +1 -2
- package/dist/components/game/2d/molecules/ResourceBar.d.ts +1 -2
- package/dist/components/game/2d/molecules/StatBadge.d.ts +1 -2
- package/dist/components/game/shared/lib/editorUtils.d.ts +8 -8
- package/dist/components/index.cjs +2334 -1653
- package/dist/components/index.css +3 -3
- package/dist/components/index.js +1124 -443
- package/dist/components/learning/atoms/LearningCanvas.d.ts +80 -0
- package/dist/components/learning/molecules/BiologyCanvas.d.ts +47 -0
- package/dist/components/learning/molecules/ChemistryCanvas.d.ts +55 -0
- package/dist/components/learning/molecules/MathCanvas.d.ts +61 -0
- package/dist/components/learning/molecules/PhysicsCanvas.d.ts +54 -0
- package/dist/components/marketing/atoms/MarketingStatCard.d.ts +2 -2
- package/dist/hooks/useGitHub.d.ts +7 -7
- package/dist/marketing/index.cjs +2 -2
- package/dist/marketing/index.js +2 -2
- package/dist/providers/EventBusProvider.d.ts +1 -1
- package/dist/providers/SelectionProvider.d.ts +1 -1
- package/dist/providers/ServerBridge.d.ts +1 -1
- package/dist/providers/index.cjs +1117 -531
- package/dist/providers/index.css +3 -3
- package/dist/providers/index.js +1118 -532
- package/dist/runtime/index.cjs +1117 -531
- package/dist/runtime/index.css +3 -3
- package/dist/runtime/index.js +1118 -532
- package/package.json +2 -2
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React79 from 'react';
|
|
3
|
+
import React79__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useId, Suspense, lazy, useLayoutEffect, useSyncExternalStore } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { EventBusContext, useTraitScope, useCurrentPagePath, useEntitySchemaOptional, TraitScopeProvider } from '@almadar/ui/providers';
|
|
@@ -227,7 +227,7 @@ var init_SvgFlow = __esm({
|
|
|
227
227
|
width = 100,
|
|
228
228
|
height = 100
|
|
229
229
|
}) => {
|
|
230
|
-
const markerId =
|
|
230
|
+
const markerId = React79__default.useMemo(() => {
|
|
231
231
|
flowIdCounter += 1;
|
|
232
232
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
233
233
|
}, []);
|
|
@@ -820,7 +820,7 @@ var init_SvgRing = __esm({
|
|
|
820
820
|
width = 100,
|
|
821
821
|
height = 100
|
|
822
822
|
}) => {
|
|
823
|
-
const gradientId =
|
|
823
|
+
const gradientId = React79__default.useMemo(() => {
|
|
824
824
|
ringIdCounter += 1;
|
|
825
825
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
826
826
|
}, []);
|
|
@@ -1232,7 +1232,7 @@ function loadLib(key, importer) {
|
|
|
1232
1232
|
return p2;
|
|
1233
1233
|
}
|
|
1234
1234
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
1235
|
-
const Lazy =
|
|
1235
|
+
const Lazy = React79__default.lazy(async () => {
|
|
1236
1236
|
const lib = await loadLib(libKey, importer);
|
|
1237
1237
|
const Comp = pick(lib);
|
|
1238
1238
|
if (!Comp) {
|
|
@@ -1242,7 +1242,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
1242
1242
|
return { default: Comp };
|
|
1243
1243
|
});
|
|
1244
1244
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
1245
|
-
|
|
1245
|
+
React79__default.Suspense,
|
|
1246
1246
|
{
|
|
1247
1247
|
fallback: /* @__PURE__ */ jsx(
|
|
1248
1248
|
"span",
|
|
@@ -1973,7 +1973,7 @@ var init_Icon = __esm({
|
|
|
1973
1973
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1974
1974
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1975
1975
|
const family = useIconFamily();
|
|
1976
|
-
const RenderedComponent =
|
|
1976
|
+
const RenderedComponent = React79__default.useMemo(() => {
|
|
1977
1977
|
if (directIcon) return null;
|
|
1978
1978
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1979
1979
|
}, [directIcon, effectiveName, family]);
|
|
@@ -2035,7 +2035,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
2035
2035
|
const IconComp = value;
|
|
2036
2036
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
2037
2037
|
}
|
|
2038
|
-
if (
|
|
2038
|
+
if (React79__default.isValidElement(value)) {
|
|
2039
2039
|
return value;
|
|
2040
2040
|
}
|
|
2041
2041
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -2111,7 +2111,7 @@ var init_Button = __esm({
|
|
|
2111
2111
|
md: "h-icon-default w-icon-default",
|
|
2112
2112
|
lg: "h-icon-default w-icon-default"
|
|
2113
2113
|
};
|
|
2114
|
-
Button =
|
|
2114
|
+
Button = React79__default.forwardRef(
|
|
2115
2115
|
({
|
|
2116
2116
|
className,
|
|
2117
2117
|
variant = "primary",
|
|
@@ -2179,7 +2179,7 @@ var init_Input = __esm({
|
|
|
2179
2179
|
init_cn();
|
|
2180
2180
|
init_Icon();
|
|
2181
2181
|
init_useEventBus();
|
|
2182
|
-
Input =
|
|
2182
|
+
Input = React79__default.forwardRef(
|
|
2183
2183
|
({
|
|
2184
2184
|
className,
|
|
2185
2185
|
inputType,
|
|
@@ -2339,7 +2339,7 @@ var Label;
|
|
|
2339
2339
|
var init_Label = __esm({
|
|
2340
2340
|
"components/core/atoms/Label.tsx"() {
|
|
2341
2341
|
init_cn();
|
|
2342
|
-
Label =
|
|
2342
|
+
Label = React79__default.forwardRef(
|
|
2343
2343
|
({ className, required, children, ...props }, ref) => {
|
|
2344
2344
|
return /* @__PURE__ */ jsxs(
|
|
2345
2345
|
"label",
|
|
@@ -2366,7 +2366,7 @@ var init_Textarea = __esm({
|
|
|
2366
2366
|
"components/core/atoms/Textarea.tsx"() {
|
|
2367
2367
|
init_cn();
|
|
2368
2368
|
init_useEventBus();
|
|
2369
|
-
Textarea =
|
|
2369
|
+
Textarea = React79__default.forwardRef(
|
|
2370
2370
|
({ className, error, onChange, ...props }, ref) => {
|
|
2371
2371
|
const eventBus = useEventBus();
|
|
2372
2372
|
const handleChange = (e) => {
|
|
@@ -2605,7 +2605,7 @@ var init_Select = __esm({
|
|
|
2605
2605
|
init_cn();
|
|
2606
2606
|
init_Icon();
|
|
2607
2607
|
init_useEventBus();
|
|
2608
|
-
Select =
|
|
2608
|
+
Select = React79__default.forwardRef(
|
|
2609
2609
|
(props, _ref) => {
|
|
2610
2610
|
const { multiple, searchable, clearable } = props;
|
|
2611
2611
|
if (multiple || searchable || clearable) {
|
|
@@ -2622,7 +2622,7 @@ var init_Checkbox = __esm({
|
|
|
2622
2622
|
"components/core/atoms/Checkbox.tsx"() {
|
|
2623
2623
|
init_cn();
|
|
2624
2624
|
init_useEventBus();
|
|
2625
|
-
Checkbox =
|
|
2625
|
+
Checkbox = React79__default.forwardRef(
|
|
2626
2626
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
2627
2627
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2628
2628
|
const eventBus = useEventBus();
|
|
@@ -2676,7 +2676,7 @@ var init_Spinner = __esm({
|
|
|
2676
2676
|
md: "h-6 w-6",
|
|
2677
2677
|
lg: "h-8 w-8"
|
|
2678
2678
|
};
|
|
2679
|
-
Spinner =
|
|
2679
|
+
Spinner = React79__default.forwardRef(
|
|
2680
2680
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
2681
2681
|
if (overlay) {
|
|
2682
2682
|
return /* @__PURE__ */ jsx(
|
|
@@ -2766,7 +2766,7 @@ var init_Card = __esm({
|
|
|
2766
2766
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
2767
2767
|
"tile-image-first": "p-0 overflow-hidden"
|
|
2768
2768
|
};
|
|
2769
|
-
Card =
|
|
2769
|
+
Card = React79__default.forwardRef(
|
|
2770
2770
|
({
|
|
2771
2771
|
className,
|
|
2772
2772
|
variant = "bordered",
|
|
@@ -2814,9 +2814,9 @@ var init_Card = __esm({
|
|
|
2814
2814
|
}
|
|
2815
2815
|
);
|
|
2816
2816
|
Card.displayName = "Card";
|
|
2817
|
-
CardHeader =
|
|
2817
|
+
CardHeader = React79__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2818
2818
|
CardHeader.displayName = "CardHeader";
|
|
2819
|
-
CardTitle =
|
|
2819
|
+
CardTitle = React79__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2820
2820
|
"h3",
|
|
2821
2821
|
{
|
|
2822
2822
|
ref,
|
|
@@ -2829,11 +2829,11 @@ var init_Card = __esm({
|
|
|
2829
2829
|
}
|
|
2830
2830
|
));
|
|
2831
2831
|
CardTitle.displayName = "CardTitle";
|
|
2832
|
-
CardContent =
|
|
2832
|
+
CardContent = React79__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2833
2833
|
CardContent.displayName = "CardContent";
|
|
2834
2834
|
CardBody = CardContent;
|
|
2835
2835
|
CardBody.displayName = "CardBody";
|
|
2836
|
-
CardFooter =
|
|
2836
|
+
CardFooter = React79__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2837
2837
|
"div",
|
|
2838
2838
|
{
|
|
2839
2839
|
ref,
|
|
@@ -2886,7 +2886,7 @@ var init_Badge = __esm({
|
|
|
2886
2886
|
md: "px-2.5 py-1 text-sm",
|
|
2887
2887
|
lg: "px-3 py-1.5 text-base"
|
|
2888
2888
|
};
|
|
2889
|
-
Badge =
|
|
2889
|
+
Badge = React79__default.forwardRef(
|
|
2890
2890
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2891
2891
|
const iconSizes3 = {
|
|
2892
2892
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2979,7 +2979,7 @@ var init_FilterPill = __esm({
|
|
|
2979
2979
|
md: "w-3.5 h-3.5",
|
|
2980
2980
|
lg: "w-4 h-4"
|
|
2981
2981
|
};
|
|
2982
|
-
FilterPill =
|
|
2982
|
+
FilterPill = React79__default.forwardRef(
|
|
2983
2983
|
({
|
|
2984
2984
|
className,
|
|
2985
2985
|
variant = "default",
|
|
@@ -3108,8 +3108,8 @@ var init_Avatar = __esm({
|
|
|
3108
3108
|
actionPayload
|
|
3109
3109
|
}) => {
|
|
3110
3110
|
const eventBus = useEventBus();
|
|
3111
|
-
const [imgFailed, setImgFailed] =
|
|
3112
|
-
|
|
3111
|
+
const [imgFailed, setImgFailed] = React79__default.useState(false);
|
|
3112
|
+
React79__default.useEffect(() => {
|
|
3113
3113
|
setImgFailed(false);
|
|
3114
3114
|
}, [src]);
|
|
3115
3115
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -3361,7 +3361,7 @@ var init_Box = __esm({
|
|
|
3361
3361
|
fixed: "fixed",
|
|
3362
3362
|
sticky: "sticky"
|
|
3363
3363
|
};
|
|
3364
|
-
Box =
|
|
3364
|
+
Box = React79__default.forwardRef(
|
|
3365
3365
|
({
|
|
3366
3366
|
padding,
|
|
3367
3367
|
paddingX,
|
|
@@ -3426,7 +3426,7 @@ var init_Box = __esm({
|
|
|
3426
3426
|
onPointerDown?.(e);
|
|
3427
3427
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3428
3428
|
const isClickable = action || onClick;
|
|
3429
|
-
return
|
|
3429
|
+
return React79__default.createElement(
|
|
3430
3430
|
Component,
|
|
3431
3431
|
{
|
|
3432
3432
|
ref,
|
|
@@ -3480,7 +3480,7 @@ var init_Center = __esm({
|
|
|
3480
3480
|
as: Component = "div"
|
|
3481
3481
|
}) => {
|
|
3482
3482
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
3483
|
-
return
|
|
3483
|
+
return React79__default.createElement(Component, {
|
|
3484
3484
|
className: cn(
|
|
3485
3485
|
inline ? "inline-flex" : "flex",
|
|
3486
3486
|
horizontal && "justify-center",
|
|
@@ -3748,7 +3748,7 @@ var init_Radio = __esm({
|
|
|
3748
3748
|
md: "w-2.5 h-2.5",
|
|
3749
3749
|
lg: "w-3 h-3"
|
|
3750
3750
|
};
|
|
3751
|
-
Radio =
|
|
3751
|
+
Radio = React79__default.forwardRef(
|
|
3752
3752
|
({
|
|
3753
3753
|
label,
|
|
3754
3754
|
helperText,
|
|
@@ -3765,12 +3765,12 @@ var init_Radio = __esm({
|
|
|
3765
3765
|
onChange,
|
|
3766
3766
|
...props
|
|
3767
3767
|
}, ref) => {
|
|
3768
|
-
const reactId =
|
|
3768
|
+
const reactId = React79__default.useId();
|
|
3769
3769
|
const baseId = id || `radio-${reactId}`;
|
|
3770
3770
|
const hasError = !!error;
|
|
3771
3771
|
const eventBus = useEventBus();
|
|
3772
|
-
const [selected, setSelected] =
|
|
3773
|
-
|
|
3772
|
+
const [selected, setSelected] = React79__default.useState(value);
|
|
3773
|
+
React79__default.useEffect(() => {
|
|
3774
3774
|
if (value !== void 0) setSelected(value);
|
|
3775
3775
|
}, [value]);
|
|
3776
3776
|
const pick = (next, e) => {
|
|
@@ -3952,7 +3952,7 @@ var init_Switch = __esm({
|
|
|
3952
3952
|
"components/core/atoms/Switch.tsx"() {
|
|
3953
3953
|
"use client";
|
|
3954
3954
|
init_cn();
|
|
3955
|
-
Switch =
|
|
3955
|
+
Switch = React79.forwardRef(
|
|
3956
3956
|
({
|
|
3957
3957
|
checked,
|
|
3958
3958
|
defaultChecked = false,
|
|
@@ -3963,10 +3963,10 @@ var init_Switch = __esm({
|
|
|
3963
3963
|
name,
|
|
3964
3964
|
className
|
|
3965
3965
|
}, ref) => {
|
|
3966
|
-
const [isChecked, setIsChecked] =
|
|
3966
|
+
const [isChecked, setIsChecked] = React79.useState(
|
|
3967
3967
|
checked !== void 0 ? checked : defaultChecked
|
|
3968
3968
|
);
|
|
3969
|
-
|
|
3969
|
+
React79.useEffect(() => {
|
|
3970
3970
|
if (checked !== void 0) {
|
|
3971
3971
|
setIsChecked(checked);
|
|
3972
3972
|
}
|
|
@@ -4129,7 +4129,7 @@ var init_Stack = __esm({
|
|
|
4129
4129
|
};
|
|
4130
4130
|
const isHorizontal = direction === "horizontal";
|
|
4131
4131
|
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";
|
|
4132
|
-
return
|
|
4132
|
+
return React79__default.createElement(
|
|
4133
4133
|
Component,
|
|
4134
4134
|
{
|
|
4135
4135
|
className: cn(
|
|
@@ -4325,7 +4325,7 @@ var init_Typography = __esm({
|
|
|
4325
4325
|
}) => {
|
|
4326
4326
|
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
4327
4327
|
const Component = as || defaultElements[variant];
|
|
4328
|
-
return
|
|
4328
|
+
return React79__default.createElement(
|
|
4329
4329
|
Component,
|
|
4330
4330
|
{
|
|
4331
4331
|
id,
|
|
@@ -4484,7 +4484,7 @@ var Dialog;
|
|
|
4484
4484
|
var init_Dialog = __esm({
|
|
4485
4485
|
"components/core/atoms/Dialog.tsx"() {
|
|
4486
4486
|
init_cn();
|
|
4487
|
-
Dialog =
|
|
4487
|
+
Dialog = React79__default.forwardRef(
|
|
4488
4488
|
({
|
|
4489
4489
|
role = "dialog",
|
|
4490
4490
|
"aria-modal": ariaModal = true,
|
|
@@ -4510,7 +4510,7 @@ var Aside;
|
|
|
4510
4510
|
var init_Aside = __esm({
|
|
4511
4511
|
"components/core/atoms/Aside.tsx"() {
|
|
4512
4512
|
init_cn();
|
|
4513
|
-
Aside =
|
|
4513
|
+
Aside = React79__default.forwardRef(
|
|
4514
4514
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4515
4515
|
);
|
|
4516
4516
|
Aside.displayName = "Aside";
|
|
@@ -4589,9 +4589,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4589
4589
|
className
|
|
4590
4590
|
}) => {
|
|
4591
4591
|
const { t } = useTranslate();
|
|
4592
|
-
const [isVisible, setIsVisible] =
|
|
4593
|
-
const timeoutRef =
|
|
4594
|
-
const triggerRef =
|
|
4592
|
+
const [isVisible, setIsVisible] = React79__default.useState(false);
|
|
4593
|
+
const timeoutRef = React79__default.useRef(null);
|
|
4594
|
+
const triggerRef = React79__default.useRef(null);
|
|
4595
4595
|
const handleMouseEnter = () => {
|
|
4596
4596
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4597
4597
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4602,7 +4602,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4602
4602
|
};
|
|
4603
4603
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
4604
4604
|
const open = isVisible || revealed;
|
|
4605
|
-
|
|
4605
|
+
React79__default.useEffect(() => {
|
|
4606
4606
|
return () => {
|
|
4607
4607
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4608
4608
|
};
|
|
@@ -4812,7 +4812,7 @@ var init_StatusDot = __esm({
|
|
|
4812
4812
|
md: "w-2.5 h-2.5",
|
|
4813
4813
|
lg: "w-3 h-3"
|
|
4814
4814
|
};
|
|
4815
|
-
StatusDot =
|
|
4815
|
+
StatusDot = React79__default.forwardRef(
|
|
4816
4816
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4817
4817
|
return /* @__PURE__ */ jsx(
|
|
4818
4818
|
"span",
|
|
@@ -4866,7 +4866,7 @@ var init_TrendIndicator = __esm({
|
|
|
4866
4866
|
down: "trending-down",
|
|
4867
4867
|
flat: "arrow-right"
|
|
4868
4868
|
};
|
|
4869
|
-
TrendIndicator =
|
|
4869
|
+
TrendIndicator = React79__default.forwardRef(
|
|
4870
4870
|
({
|
|
4871
4871
|
className,
|
|
4872
4872
|
value,
|
|
@@ -4933,7 +4933,7 @@ var init_RangeSlider = __esm({
|
|
|
4933
4933
|
md: "w-4 h-4",
|
|
4934
4934
|
lg: "w-5 h-5"
|
|
4935
4935
|
};
|
|
4936
|
-
RangeSlider =
|
|
4936
|
+
RangeSlider = React79__default.forwardRef(
|
|
4937
4937
|
({
|
|
4938
4938
|
className,
|
|
4939
4939
|
min = 0,
|
|
@@ -5527,7 +5527,7 @@ var init_ContentSection = __esm({
|
|
|
5527
5527
|
md: "py-16",
|
|
5528
5528
|
lg: "py-24"
|
|
5529
5529
|
};
|
|
5530
|
-
ContentSection =
|
|
5530
|
+
ContentSection = React79__default.forwardRef(
|
|
5531
5531
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5532
5532
|
return /* @__PURE__ */ jsx(
|
|
5533
5533
|
Box,
|
|
@@ -6061,7 +6061,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6061
6061
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6062
6062
|
"none": {}
|
|
6063
6063
|
};
|
|
6064
|
-
AnimatedReveal =
|
|
6064
|
+
AnimatedReveal = React79__default.forwardRef(
|
|
6065
6065
|
({
|
|
6066
6066
|
trigger = "scroll",
|
|
6067
6067
|
animation = "fade-up",
|
|
@@ -6221,7 +6221,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6221
6221
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6222
6222
|
"use client";
|
|
6223
6223
|
init_cn();
|
|
6224
|
-
AnimatedGraphic =
|
|
6224
|
+
AnimatedGraphic = React79__default.forwardRef(
|
|
6225
6225
|
({
|
|
6226
6226
|
src,
|
|
6227
6227
|
svgContent,
|
|
@@ -6244,7 +6244,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6244
6244
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6245
6245
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6246
6246
|
const prevAnimateRef = useRef(animate);
|
|
6247
|
-
const setRef =
|
|
6247
|
+
const setRef = React79__default.useCallback(
|
|
6248
6248
|
(node) => {
|
|
6249
6249
|
containerRef.current = node;
|
|
6250
6250
|
if (typeof ref === "function") ref(node);
|
|
@@ -6917,7 +6917,7 @@ var init_ErrorBoundary = __esm({
|
|
|
6917
6917
|
}
|
|
6918
6918
|
);
|
|
6919
6919
|
};
|
|
6920
|
-
ErrorBoundary = class extends
|
|
6920
|
+
ErrorBoundary = class extends React79__default.Component {
|
|
6921
6921
|
constructor(props) {
|
|
6922
6922
|
super(props);
|
|
6923
6923
|
__publicField(this, "reset", () => {
|
|
@@ -7213,7 +7213,7 @@ var init_Container = __esm({
|
|
|
7213
7213
|
as: Component = "div"
|
|
7214
7214
|
}) => {
|
|
7215
7215
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
7216
|
-
return
|
|
7216
|
+
return React79__default.createElement(
|
|
7217
7217
|
Component,
|
|
7218
7218
|
{
|
|
7219
7219
|
className: cn(
|
|
@@ -8512,91 +8512,6 @@ var init_ComponentPatterns = __esm({
|
|
|
8512
8512
|
AlertPattern.displayName = "AlertPattern";
|
|
8513
8513
|
}
|
|
8514
8514
|
});
|
|
8515
|
-
function parseValue(value) {
|
|
8516
|
-
if (value === "" || value == null) return { num: 0, prefix: "", suffix: "", decimals: 0 };
|
|
8517
|
-
const match = String(value).match(/^([^0-9]*)([0-9]+(?:\.[0-9]+)?)(.*)$/);
|
|
8518
|
-
if (!match) {
|
|
8519
|
-
return { num: 0, prefix: "", suffix: String(value), decimals: 0 };
|
|
8520
|
-
}
|
|
8521
|
-
const numStr = match[2];
|
|
8522
|
-
const decimalIdx = numStr.indexOf(".");
|
|
8523
|
-
const decimals = decimalIdx >= 0 ? numStr.length - decimalIdx - 1 : 0;
|
|
8524
|
-
return {
|
|
8525
|
-
prefix: match[1],
|
|
8526
|
-
num: parseFloat(numStr),
|
|
8527
|
-
suffix: match[3],
|
|
8528
|
-
decimals
|
|
8529
|
-
};
|
|
8530
|
-
}
|
|
8531
|
-
var AnimatedCounter2;
|
|
8532
|
-
var init_AnimatedCounter2 = __esm({
|
|
8533
|
-
"components/core/molecules/AnimatedCounter.tsx"() {
|
|
8534
|
-
"use client";
|
|
8535
|
-
init_cn();
|
|
8536
|
-
init_Box();
|
|
8537
|
-
init_Typography();
|
|
8538
|
-
AnimatedCounter2 = ({
|
|
8539
|
-
value,
|
|
8540
|
-
label,
|
|
8541
|
-
duration = 1500,
|
|
8542
|
-
className
|
|
8543
|
-
}) => {
|
|
8544
|
-
const ref = useRef(null);
|
|
8545
|
-
const [displayValue, setDisplayValue] = useState("0");
|
|
8546
|
-
const [hasAnimated, setHasAnimated] = useState(false);
|
|
8547
|
-
const animate = useCallback(() => {
|
|
8548
|
-
const { num: num2, prefix, suffix, decimals } = parseValue(value);
|
|
8549
|
-
if (num2 === 0) {
|
|
8550
|
-
setDisplayValue(String(value));
|
|
8551
|
-
return;
|
|
8552
|
-
}
|
|
8553
|
-
const startTime = performance.now();
|
|
8554
|
-
const tick = (now) => {
|
|
8555
|
-
const elapsed = now - startTime;
|
|
8556
|
-
const progress = Math.min(elapsed / duration, 1);
|
|
8557
|
-
const eased = 1 - Math.pow(1 - progress, 3);
|
|
8558
|
-
const current = eased * num2;
|
|
8559
|
-
setDisplayValue(`${prefix}${current.toFixed(decimals)}${suffix}`);
|
|
8560
|
-
if (progress < 1) {
|
|
8561
|
-
requestAnimationFrame(tick);
|
|
8562
|
-
} else {
|
|
8563
|
-
setDisplayValue(String(value));
|
|
8564
|
-
}
|
|
8565
|
-
};
|
|
8566
|
-
requestAnimationFrame(tick);
|
|
8567
|
-
}, [value, duration]);
|
|
8568
|
-
useEffect(() => {
|
|
8569
|
-
if (hasAnimated) return;
|
|
8570
|
-
const el = ref.current;
|
|
8571
|
-
if (!el) return;
|
|
8572
|
-
const observer2 = new IntersectionObserver(
|
|
8573
|
-
(entries) => {
|
|
8574
|
-
if (entries[0].isIntersecting) {
|
|
8575
|
-
setHasAnimated(true);
|
|
8576
|
-
animate();
|
|
8577
|
-
observer2.disconnect();
|
|
8578
|
-
}
|
|
8579
|
-
},
|
|
8580
|
-
{ threshold: 0.3 }
|
|
8581
|
-
);
|
|
8582
|
-
observer2.observe(el);
|
|
8583
|
-
return () => observer2.disconnect();
|
|
8584
|
-
}, [hasAnimated, animate]);
|
|
8585
|
-
return /* @__PURE__ */ jsxs(Box, { ref, className: cn("flex flex-col items-center gap-1 p-4", className), children: [
|
|
8586
|
-
/* @__PURE__ */ jsx(
|
|
8587
|
-
Typography,
|
|
8588
|
-
{
|
|
8589
|
-
variant: "h2",
|
|
8590
|
-
className: "text-primary font-bold tabular-nums",
|
|
8591
|
-
children: hasAnimated ? displayValue : "0"
|
|
8592
|
-
}
|
|
8593
|
-
),
|
|
8594
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "text-center", children: label })
|
|
8595
|
-
] });
|
|
8596
|
-
};
|
|
8597
|
-
AnimatedCounter2.displayName = "AnimatedCounter";
|
|
8598
|
-
}
|
|
8599
|
-
});
|
|
8600
8515
|
var AuthLayout;
|
|
8601
8516
|
var init_AuthLayout = __esm({
|
|
8602
8517
|
"components/marketing/templates/AuthLayout.tsx"() {
|
|
@@ -8748,8 +8663,8 @@ function MiniMap({
|
|
|
8748
8663
|
viewportRect = DEFAULT_VIEWPORT,
|
|
8749
8664
|
className
|
|
8750
8665
|
}) {
|
|
8751
|
-
const canvasRef =
|
|
8752
|
-
|
|
8666
|
+
const canvasRef = React79.useRef(null);
|
|
8667
|
+
React79.useEffect(() => {
|
|
8753
8668
|
const canvas = canvasRef.current;
|
|
8754
8669
|
if (!canvas) return;
|
|
8755
8670
|
const ctx = canvas.getContext("2d");
|
|
@@ -12307,10 +12222,416 @@ var init_BehaviorView = __esm({
|
|
|
12307
12222
|
BehaviorView.displayName = "BehaviorView";
|
|
12308
12223
|
}
|
|
12309
12224
|
});
|
|
12225
|
+
function resolveColor2(color, ctx, fallback) {
|
|
12226
|
+
if (!color) return fallback;
|
|
12227
|
+
if (color.startsWith("var(")) {
|
|
12228
|
+
ctx.canvas.style;
|
|
12229
|
+
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color);
|
|
12230
|
+
if (m) {
|
|
12231
|
+
const computed = getComputedStyle(ctx.canvas).getPropertyValue(m[1]).trim();
|
|
12232
|
+
return computed || m[2]?.trim() || fallback;
|
|
12233
|
+
}
|
|
12234
|
+
}
|
|
12235
|
+
return color;
|
|
12236
|
+
}
|
|
12237
|
+
function shapeBounds(shape) {
|
|
12238
|
+
switch (shape.type) {
|
|
12239
|
+
case "line":
|
|
12240
|
+
case "arrow":
|
|
12241
|
+
if (shape.x1 == null || shape.y1 == null || shape.x2 == null || shape.y2 == null) return null;
|
|
12242
|
+
return {
|
|
12243
|
+
x: Math.min(shape.x1, shape.x2) - 6,
|
|
12244
|
+
y: Math.min(shape.y1, shape.y2) - 6,
|
|
12245
|
+
w: Math.abs(shape.x2 - shape.x1) + 12,
|
|
12246
|
+
h: Math.abs(shape.y2 - shape.y1) + 12
|
|
12247
|
+
};
|
|
12248
|
+
case "circle":
|
|
12249
|
+
if (shape.x == null || shape.y == null || shape.radius == null) return null;
|
|
12250
|
+
return {
|
|
12251
|
+
x: shape.x - shape.radius - 4,
|
|
12252
|
+
y: shape.y - shape.radius - 4,
|
|
12253
|
+
w: shape.radius * 2 + 8,
|
|
12254
|
+
h: shape.radius * 2 + 8
|
|
12255
|
+
};
|
|
12256
|
+
case "rect":
|
|
12257
|
+
if (shape.x == null || shape.y == null || shape.width == null || shape.height == null) return null;
|
|
12258
|
+
return { x: shape.x - 4, y: shape.y - 4, w: shape.width + 8, h: shape.height + 8 };
|
|
12259
|
+
case "polygon":
|
|
12260
|
+
if (!shape.points || shape.points.length === 0) return null;
|
|
12261
|
+
{
|
|
12262
|
+
const xs = shape.points.map((p2) => p2.x);
|
|
12263
|
+
const ys = shape.points.map((p2) => p2.y);
|
|
12264
|
+
const minX = Math.min(...xs);
|
|
12265
|
+
const minY = Math.min(...ys);
|
|
12266
|
+
return {
|
|
12267
|
+
x: minX - 4,
|
|
12268
|
+
y: minY - 4,
|
|
12269
|
+
w: Math.max(...xs) - minX + 8,
|
|
12270
|
+
h: Math.max(...ys) - minY + 8
|
|
12271
|
+
};
|
|
12272
|
+
}
|
|
12273
|
+
case "text":
|
|
12274
|
+
if (shape.x == null || shape.y == null) return null;
|
|
12275
|
+
return { x: shape.x - 4, y: shape.y - (shape.fontSize ?? 14) - 4, w: 120, h: (shape.fontSize ?? 14) + 8 };
|
|
12276
|
+
default:
|
|
12277
|
+
return null;
|
|
12278
|
+
}
|
|
12279
|
+
}
|
|
12280
|
+
function drawArrowHead(ctx, x1, y1, x2, y2, size) {
|
|
12281
|
+
const angle = Math.atan2(y2 - y1, x2 - x1);
|
|
12282
|
+
ctx.beginPath();
|
|
12283
|
+
ctx.moveTo(x2, y2);
|
|
12284
|
+
ctx.lineTo(x2 - size * Math.cos(angle - Math.PI / 6), y2 - size * Math.sin(angle - Math.PI / 6));
|
|
12285
|
+
ctx.lineTo(x2 - size * Math.cos(angle + Math.PI / 6), y2 - size * Math.sin(angle + Math.PI / 6));
|
|
12286
|
+
ctx.closePath();
|
|
12287
|
+
ctx.fill();
|
|
12288
|
+
}
|
|
12289
|
+
function drawShape(ctx, shape, width, height) {
|
|
12290
|
+
ctx.save();
|
|
12291
|
+
const opacity = shape.opacity ?? 1;
|
|
12292
|
+
ctx.globalAlpha = opacity;
|
|
12293
|
+
const stroke = resolveColor2(shape.color, ctx, "#333333");
|
|
12294
|
+
const fill = shape.fill ? resolveColor2(shape.fill, ctx, "#cccccc") : void 0;
|
|
12295
|
+
ctx.lineWidth = shape.lineWidth ?? 2;
|
|
12296
|
+
switch (shape.type) {
|
|
12297
|
+
case "grid": {
|
|
12298
|
+
const step = shape.step ?? 40;
|
|
12299
|
+
ctx.strokeStyle = stroke;
|
|
12300
|
+
ctx.globalAlpha = opacity * 0.25;
|
|
12301
|
+
ctx.lineWidth = 1;
|
|
12302
|
+
ctx.beginPath();
|
|
12303
|
+
for (let x = 0; x <= width; x += step) {
|
|
12304
|
+
ctx.moveTo(x, 0);
|
|
12305
|
+
ctx.lineTo(x, height);
|
|
12306
|
+
}
|
|
12307
|
+
for (let y = 0; y <= height; y += step) {
|
|
12308
|
+
ctx.moveTo(0, y);
|
|
12309
|
+
ctx.lineTo(width, y);
|
|
12310
|
+
}
|
|
12311
|
+
ctx.stroke();
|
|
12312
|
+
break;
|
|
12313
|
+
}
|
|
12314
|
+
case "axis": {
|
|
12315
|
+
const axis = shape.axis ?? "x";
|
|
12316
|
+
ctx.strokeStyle = stroke;
|
|
12317
|
+
ctx.lineWidth = shape.lineWidth ?? 2;
|
|
12318
|
+
ctx.beginPath();
|
|
12319
|
+
if (axis === "x") {
|
|
12320
|
+
ctx.moveTo(0, height / 2);
|
|
12321
|
+
ctx.lineTo(width, height / 2);
|
|
12322
|
+
} else {
|
|
12323
|
+
ctx.moveTo(width / 2, 0);
|
|
12324
|
+
ctx.lineTo(width / 2, height);
|
|
12325
|
+
}
|
|
12326
|
+
ctx.stroke();
|
|
12327
|
+
break;
|
|
12328
|
+
}
|
|
12329
|
+
case "line": {
|
|
12330
|
+
if (shape.x1 == null || shape.y1 == null || shape.x2 == null || shape.y2 == null) break;
|
|
12331
|
+
ctx.strokeStyle = stroke;
|
|
12332
|
+
ctx.beginPath();
|
|
12333
|
+
ctx.moveTo(shape.x1, shape.y1);
|
|
12334
|
+
ctx.lineTo(shape.x2, shape.y2);
|
|
12335
|
+
ctx.stroke();
|
|
12336
|
+
break;
|
|
12337
|
+
}
|
|
12338
|
+
case "arrow": {
|
|
12339
|
+
if (shape.x1 == null || shape.y1 == null || shape.x2 == null || shape.y2 == null) break;
|
|
12340
|
+
ctx.strokeStyle = stroke;
|
|
12341
|
+
ctx.fillStyle = stroke;
|
|
12342
|
+
ctx.beginPath();
|
|
12343
|
+
ctx.moveTo(shape.x1, shape.y1);
|
|
12344
|
+
ctx.lineTo(shape.x2, shape.y2);
|
|
12345
|
+
ctx.stroke();
|
|
12346
|
+
drawArrowHead(ctx, shape.x1, shape.y1, shape.x2, shape.y2, 10);
|
|
12347
|
+
break;
|
|
12348
|
+
}
|
|
12349
|
+
case "circle": {
|
|
12350
|
+
if (shape.x == null || shape.y == null || shape.radius == null) break;
|
|
12351
|
+
ctx.beginPath();
|
|
12352
|
+
ctx.arc(shape.x, shape.y, shape.radius, 0, Math.PI * 2);
|
|
12353
|
+
if (fill) {
|
|
12354
|
+
ctx.fillStyle = fill;
|
|
12355
|
+
ctx.fill();
|
|
12356
|
+
}
|
|
12357
|
+
ctx.strokeStyle = stroke;
|
|
12358
|
+
ctx.stroke();
|
|
12359
|
+
break;
|
|
12360
|
+
}
|
|
12361
|
+
case "rect": {
|
|
12362
|
+
if (shape.x == null || shape.y == null || shape.width == null || shape.height == null) break;
|
|
12363
|
+
if (fill) {
|
|
12364
|
+
ctx.fillStyle = fill;
|
|
12365
|
+
ctx.fillRect(shape.x, shape.y, shape.width, shape.height);
|
|
12366
|
+
}
|
|
12367
|
+
ctx.strokeStyle = stroke;
|
|
12368
|
+
ctx.strokeRect(shape.x, shape.y, shape.width, shape.height);
|
|
12369
|
+
break;
|
|
12370
|
+
}
|
|
12371
|
+
case "polygon": {
|
|
12372
|
+
if (!shape.points || shape.points.length < 2) break;
|
|
12373
|
+
ctx.beginPath();
|
|
12374
|
+
ctx.moveTo(shape.points[0].x, shape.points[0].y);
|
|
12375
|
+
for (let i = 1; i < shape.points.length; i++) {
|
|
12376
|
+
ctx.lineTo(shape.points[i].x, shape.points[i].y);
|
|
12377
|
+
}
|
|
12378
|
+
ctx.closePath();
|
|
12379
|
+
if (fill) {
|
|
12380
|
+
ctx.fillStyle = fill;
|
|
12381
|
+
ctx.fill();
|
|
12382
|
+
}
|
|
12383
|
+
ctx.strokeStyle = stroke;
|
|
12384
|
+
ctx.stroke();
|
|
12385
|
+
break;
|
|
12386
|
+
}
|
|
12387
|
+
case "path": {
|
|
12388
|
+
if (!shape.path) break;
|
|
12389
|
+
const p2 = new Path2D(shape.path);
|
|
12390
|
+
if (fill) {
|
|
12391
|
+
ctx.fillStyle = fill;
|
|
12392
|
+
ctx.fill(p2);
|
|
12393
|
+
}
|
|
12394
|
+
ctx.strokeStyle = stroke;
|
|
12395
|
+
ctx.stroke(p2);
|
|
12396
|
+
break;
|
|
12397
|
+
}
|
|
12398
|
+
case "text": {
|
|
12399
|
+
if (shape.x == null || shape.y == null || !shape.text) break;
|
|
12400
|
+
ctx.fillStyle = stroke;
|
|
12401
|
+
ctx.font = `${shape.fontSize ?? 14}px system-ui, sans-serif`;
|
|
12402
|
+
ctx.textAlign = shape.align ?? "left";
|
|
12403
|
+
ctx.textBaseline = "middle";
|
|
12404
|
+
ctx.fillText(shape.text, shape.x, shape.y);
|
|
12405
|
+
break;
|
|
12406
|
+
}
|
|
12407
|
+
}
|
|
12408
|
+
ctx.restore();
|
|
12409
|
+
}
|
|
12410
|
+
var LearningCanvas;
|
|
12411
|
+
var init_LearningCanvas = __esm({
|
|
12412
|
+
"components/learning/atoms/LearningCanvas.tsx"() {
|
|
12413
|
+
"use client";
|
|
12414
|
+
init_cn();
|
|
12415
|
+
init_useEventBus();
|
|
12416
|
+
LearningCanvas = ({
|
|
12417
|
+
className,
|
|
12418
|
+
width = 600,
|
|
12419
|
+
height = 400,
|
|
12420
|
+
backgroundColor,
|
|
12421
|
+
shapes = [],
|
|
12422
|
+
interactive = false,
|
|
12423
|
+
animate = false,
|
|
12424
|
+
onShapeClick,
|
|
12425
|
+
onShapeHover,
|
|
12426
|
+
isLoading,
|
|
12427
|
+
error
|
|
12428
|
+
}) => {
|
|
12429
|
+
const canvasRef = useRef(null);
|
|
12430
|
+
const eventBus = useEventBus();
|
|
12431
|
+
const animRef = useRef(0);
|
|
12432
|
+
const hoverIndexRef = useRef(-1);
|
|
12433
|
+
const findShapeAt = useCallback((clientX, clientY) => {
|
|
12434
|
+
const canvas = canvasRef.current;
|
|
12435
|
+
if (!canvas) return -1;
|
|
12436
|
+
const rect = canvas.getBoundingClientRect();
|
|
12437
|
+
const x = clientX - rect.left;
|
|
12438
|
+
const y = clientY - rect.top;
|
|
12439
|
+
for (let i = shapes.length - 1; i >= 0; i--) {
|
|
12440
|
+
const b = shapeBounds(shapes[i]);
|
|
12441
|
+
if (b && x >= b.x && x <= b.x + b.w && y >= b.y && y <= b.y + b.h) {
|
|
12442
|
+
return i;
|
|
12443
|
+
}
|
|
12444
|
+
}
|
|
12445
|
+
return -1;
|
|
12446
|
+
}, [shapes]);
|
|
12447
|
+
const draw = useCallback(() => {
|
|
12448
|
+
const canvas = canvasRef.current;
|
|
12449
|
+
if (!canvas) return;
|
|
12450
|
+
const ctx = canvas.getContext("2d");
|
|
12451
|
+
if (!ctx) return;
|
|
12452
|
+
const dpr = typeof window !== "undefined" ? window.devicePixelRatio || 1 : 1;
|
|
12453
|
+
canvas.width = Math.max(1, Math.floor(width * dpr));
|
|
12454
|
+
canvas.height = Math.max(1, Math.floor(height * dpr));
|
|
12455
|
+
canvas.style.width = `${width}px`;
|
|
12456
|
+
canvas.style.height = `${height}px`;
|
|
12457
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
12458
|
+
ctx.clearRect(0, 0, width, height);
|
|
12459
|
+
if (backgroundColor) {
|
|
12460
|
+
ctx.fillStyle = backgroundColor;
|
|
12461
|
+
ctx.fillRect(0, 0, width, height);
|
|
12462
|
+
}
|
|
12463
|
+
for (const shape of shapes) {
|
|
12464
|
+
drawShape(ctx, shape, width, height);
|
|
12465
|
+
}
|
|
12466
|
+
}, [width, height, backgroundColor, shapes]);
|
|
12467
|
+
useEffect(() => {
|
|
12468
|
+
draw();
|
|
12469
|
+
}, [draw]);
|
|
12470
|
+
useEffect(() => {
|
|
12471
|
+
if (!animate) return;
|
|
12472
|
+
const loop = () => {
|
|
12473
|
+
draw();
|
|
12474
|
+
animRef.current = requestAnimationFrame(loop);
|
|
12475
|
+
};
|
|
12476
|
+
animRef.current = requestAnimationFrame(loop);
|
|
12477
|
+
return () => cancelAnimationFrame(animRef.current);
|
|
12478
|
+
}, [animate, draw]);
|
|
12479
|
+
const handlePointerMove = useCallback(
|
|
12480
|
+
(e) => {
|
|
12481
|
+
if (!interactive) return;
|
|
12482
|
+
const idx = findShapeAt(e.clientX, e.clientY);
|
|
12483
|
+
if (idx !== hoverIndexRef.current) {
|
|
12484
|
+
hoverIndexRef.current = idx;
|
|
12485
|
+
if (idx >= 0) {
|
|
12486
|
+
const shape = shapes[idx];
|
|
12487
|
+
const payload = { id: shape.id, type: shape.type, index: idx };
|
|
12488
|
+
if (onShapeHover) onShapeHover(payload);
|
|
12489
|
+
else if (eventBus) eventBus.emit(`UI:SHAPE_HOVER`, payload);
|
|
12490
|
+
}
|
|
12491
|
+
}
|
|
12492
|
+
},
|
|
12493
|
+
[interactive, onShapeHover, eventBus, findShapeAt, shapes]
|
|
12494
|
+
);
|
|
12495
|
+
const handleClick = useCallback(
|
|
12496
|
+
(e) => {
|
|
12497
|
+
if (!interactive) return;
|
|
12498
|
+
const idx = findShapeAt(e.clientX, e.clientY);
|
|
12499
|
+
if (idx >= 0) {
|
|
12500
|
+
const shape = shapes[idx];
|
|
12501
|
+
const payload = { id: shape.id, type: shape.type, index: idx };
|
|
12502
|
+
if (onShapeClick) onShapeClick(payload);
|
|
12503
|
+
else if (eventBus) eventBus.emit(`UI:SHAPE_CLICK`, payload);
|
|
12504
|
+
}
|
|
12505
|
+
},
|
|
12506
|
+
[interactive, onShapeClick, eventBus, findShapeAt, shapes]
|
|
12507
|
+
);
|
|
12508
|
+
if (isLoading || error) {
|
|
12509
|
+
return /* @__PURE__ */ jsx(
|
|
12510
|
+
"div",
|
|
12511
|
+
{
|
|
12512
|
+
className: cn(
|
|
12513
|
+
"flex items-center justify-center rounded border border-border bg-surface",
|
|
12514
|
+
className
|
|
12515
|
+
),
|
|
12516
|
+
style: { width, height },
|
|
12517
|
+
children: error ? /* @__PURE__ */ jsx("span", { className: "text-sm text-destructive", children: error.message }) : /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Loading canvas\u2026" })
|
|
12518
|
+
}
|
|
12519
|
+
);
|
|
12520
|
+
}
|
|
12521
|
+
return /* @__PURE__ */ jsx(
|
|
12522
|
+
"canvas",
|
|
12523
|
+
{
|
|
12524
|
+
ref: canvasRef,
|
|
12525
|
+
className: cn("block touch-none rounded border border-border", className),
|
|
12526
|
+
style: { width, height },
|
|
12527
|
+
onClick: handleClick,
|
|
12528
|
+
onPointerMove: handlePointerMove
|
|
12529
|
+
}
|
|
12530
|
+
);
|
|
12531
|
+
};
|
|
12532
|
+
}
|
|
12533
|
+
});
|
|
12534
|
+
var BiologyCanvas;
|
|
12535
|
+
var init_BiologyCanvas = __esm({
|
|
12536
|
+
"components/learning/molecules/BiologyCanvas.tsx"() {
|
|
12537
|
+
"use client";
|
|
12538
|
+
init_atoms();
|
|
12539
|
+
init_Stack();
|
|
12540
|
+
init_LearningCanvas();
|
|
12541
|
+
BiologyCanvas = ({
|
|
12542
|
+
className,
|
|
12543
|
+
width = 600,
|
|
12544
|
+
height = 400,
|
|
12545
|
+
title,
|
|
12546
|
+
backgroundColor,
|
|
12547
|
+
nodes = [],
|
|
12548
|
+
edges = [],
|
|
12549
|
+
shapes = [],
|
|
12550
|
+
interactive = false,
|
|
12551
|
+
animate = false,
|
|
12552
|
+
onShapeClick,
|
|
12553
|
+
isLoading,
|
|
12554
|
+
error
|
|
12555
|
+
}) => {
|
|
12556
|
+
const derivedShapes = useMemo(() => {
|
|
12557
|
+
const out = [];
|
|
12558
|
+
const nodeById = /* @__PURE__ */ new Map();
|
|
12559
|
+
for (const n of nodes) {
|
|
12560
|
+
if (n.id) nodeById.set(n.id, n);
|
|
12561
|
+
}
|
|
12562
|
+
for (const e of edges) {
|
|
12563
|
+
const a = nodeById.get(e.from);
|
|
12564
|
+
const b = nodeById.get(e.to);
|
|
12565
|
+
if (!a || !b) continue;
|
|
12566
|
+
out.push({
|
|
12567
|
+
type: "line",
|
|
12568
|
+
x1: a.x,
|
|
12569
|
+
y1: a.y,
|
|
12570
|
+
x2: b.x,
|
|
12571
|
+
y2: b.y,
|
|
12572
|
+
color: e.color ?? "#9ca3af",
|
|
12573
|
+
lineWidth: 2
|
|
12574
|
+
});
|
|
12575
|
+
if (e.label) {
|
|
12576
|
+
out.push({
|
|
12577
|
+
type: "text",
|
|
12578
|
+
x: (a.x + b.x) / 2 + 4,
|
|
12579
|
+
y: (a.y + b.y) / 2 - 4,
|
|
12580
|
+
text: e.label,
|
|
12581
|
+
color: "#374151",
|
|
12582
|
+
fontSize: 11
|
|
12583
|
+
});
|
|
12584
|
+
}
|
|
12585
|
+
}
|
|
12586
|
+
for (const n of nodes) {
|
|
12587
|
+
out.push({
|
|
12588
|
+
type: "circle",
|
|
12589
|
+
x: n.x,
|
|
12590
|
+
y: n.y,
|
|
12591
|
+
radius: n.radius ?? 16,
|
|
12592
|
+
color: n.color ?? "#16a34a",
|
|
12593
|
+
fill: `${n.color ?? "#16a34a"}33`,
|
|
12594
|
+
id: n.id
|
|
12595
|
+
});
|
|
12596
|
+
if (n.label) {
|
|
12597
|
+
out.push({
|
|
12598
|
+
type: "text",
|
|
12599
|
+
x: n.x,
|
|
12600
|
+
y: n.y + (n.radius ?? 16) + 14,
|
|
12601
|
+
text: n.label,
|
|
12602
|
+
color: "#111827",
|
|
12603
|
+
fontSize: 12,
|
|
12604
|
+
align: "center"
|
|
12605
|
+
});
|
|
12606
|
+
}
|
|
12607
|
+
}
|
|
12608
|
+
out.push(...shapes);
|
|
12609
|
+
return out;
|
|
12610
|
+
}, [nodes, edges, shapes]);
|
|
12611
|
+
return /* @__PURE__ */ jsx(Card, { className, children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
12612
|
+
title ? /* @__PURE__ */ jsx(Typography, { variant: "h4", children: title }) : null,
|
|
12613
|
+
/* @__PURE__ */ jsx(
|
|
12614
|
+
LearningCanvas,
|
|
12615
|
+
{
|
|
12616
|
+
width,
|
|
12617
|
+
height,
|
|
12618
|
+
backgroundColor,
|
|
12619
|
+
shapes: derivedShapes,
|
|
12620
|
+
interactive,
|
|
12621
|
+
animate,
|
|
12622
|
+
onShapeClick,
|
|
12623
|
+
isLoading,
|
|
12624
|
+
error
|
|
12625
|
+
}
|
|
12626
|
+
)
|
|
12627
|
+
] }) });
|
|
12628
|
+
};
|
|
12629
|
+
}
|
|
12630
|
+
});
|
|
12310
12631
|
|
|
12311
|
-
// node_modules
|
|
12632
|
+
// node_modules/katex/dist/katex.min.css
|
|
12312
12633
|
var init_katex_min = __esm({
|
|
12313
|
-
"node_modules
|
|
12634
|
+
"node_modules/katex/dist/katex.min.css"() {
|
|
12314
12635
|
}
|
|
12315
12636
|
});
|
|
12316
12637
|
var Tabs;
|
|
@@ -12794,7 +13115,7 @@ var init_CodeBlock = __esm({
|
|
|
12794
13115
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
12795
13116
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
12796
13117
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
12797
|
-
CodeBlock =
|
|
13118
|
+
CodeBlock = React79__default.memo(
|
|
12798
13119
|
({
|
|
12799
13120
|
code: rawCode,
|
|
12800
13121
|
language = "text",
|
|
@@ -13381,7 +13702,7 @@ var init_MarkdownContent = __esm({
|
|
|
13381
13702
|
init_Box();
|
|
13382
13703
|
init_CodeBlock();
|
|
13383
13704
|
init_cn();
|
|
13384
|
-
MarkdownContent =
|
|
13705
|
+
MarkdownContent = React79__default.memo(
|
|
13385
13706
|
({ content, direction = "ltr", className }) => {
|
|
13386
13707
|
const { t: _t } = useTranslate();
|
|
13387
13708
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -14749,7 +15070,7 @@ var init_StateMachineView = __esm({
|
|
|
14749
15070
|
style: { top: title ? 30 : 0 },
|
|
14750
15071
|
children: [
|
|
14751
15072
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
14752
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15073
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React79__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
14753
15074
|
StateNode,
|
|
14754
15075
|
{
|
|
14755
15076
|
state,
|
|
@@ -16999,129 +17320,6 @@ var init_BuilderBoard = __esm({
|
|
|
16999
17320
|
BuilderBoard.displayName = "BuilderBoard";
|
|
17000
17321
|
}
|
|
17001
17322
|
});
|
|
17002
|
-
function useSafeEventBus2() {
|
|
17003
|
-
try {
|
|
17004
|
-
return useEventBus();
|
|
17005
|
-
} catch {
|
|
17006
|
-
return { emit: () => {
|
|
17007
|
-
}, on: () => () => {
|
|
17008
|
-
}, once: () => {
|
|
17009
|
-
} };
|
|
17010
|
-
}
|
|
17011
|
-
}
|
|
17012
|
-
var log6, lookStyles4, ButtonGroup;
|
|
17013
|
-
var init_ButtonGroup = __esm({
|
|
17014
|
-
"components/core/molecules/ButtonGroup.tsx"() {
|
|
17015
|
-
"use client";
|
|
17016
|
-
init_cn();
|
|
17017
|
-
init_atoms();
|
|
17018
|
-
init_useEventBus();
|
|
17019
|
-
log6 = createLogger("almadar:ui:button-group");
|
|
17020
|
-
lookStyles4 = {
|
|
17021
|
-
"right-aligned-buttons": "",
|
|
17022
|
-
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
17023
|
-
"inline-row": "gap-2 inline-flex",
|
|
17024
|
-
"dropdown-menu": "[&>button:not(:first-child)]:hidden",
|
|
17025
|
-
"command-palette-trigger": "[&>button:not(:first-child)]:hidden"
|
|
17026
|
-
};
|
|
17027
|
-
ButtonGroup = ({
|
|
17028
|
-
children,
|
|
17029
|
-
primary,
|
|
17030
|
-
secondary,
|
|
17031
|
-
variant = "default",
|
|
17032
|
-
orientation = "horizontal",
|
|
17033
|
-
className,
|
|
17034
|
-
// Filter-group pattern props (entity and filters are used for schema-driven filtering)
|
|
17035
|
-
entity: _entity,
|
|
17036
|
-
filters,
|
|
17037
|
-
look = "right-aligned-buttons"
|
|
17038
|
-
}) => {
|
|
17039
|
-
const eventBus = useSafeEventBus2();
|
|
17040
|
-
const variantClasses2 = {
|
|
17041
|
-
default: "gap-0",
|
|
17042
|
-
segmented: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0",
|
|
17043
|
-
toggle: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0"
|
|
17044
|
-
};
|
|
17045
|
-
const orientationClasses = {
|
|
17046
|
-
horizontal: "flex-row",
|
|
17047
|
-
vertical: "flex-col [&>button:first-child]:rounded-t-lg [&>button:last-child]:rounded-b-lg [&>button:not(:first-child)]:border-t-0 [&>button:not(:first-child)]:border-l"
|
|
17048
|
-
};
|
|
17049
|
-
const handleActionClick = (action) => {
|
|
17050
|
-
if (action.event) {
|
|
17051
|
-
eventBus.emit("UI:DISPATCH", { event: action.event });
|
|
17052
|
-
}
|
|
17053
|
-
if (action.navigatesTo) {
|
|
17054
|
-
eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
|
|
17055
|
-
}
|
|
17056
|
-
};
|
|
17057
|
-
const renderFormActions = () => {
|
|
17058
|
-
const buttons = [];
|
|
17059
|
-
if (secondary) {
|
|
17060
|
-
secondary.forEach((action, index) => {
|
|
17061
|
-
buttons.push(
|
|
17062
|
-
/* @__PURE__ */ jsx(
|
|
17063
|
-
Button,
|
|
17064
|
-
{
|
|
17065
|
-
type: action.actionType === "submit" ? "submit" : "button",
|
|
17066
|
-
variant: action.variant || "ghost",
|
|
17067
|
-
onClick: () => handleActionClick(action),
|
|
17068
|
-
children: action.label
|
|
17069
|
-
},
|
|
17070
|
-
`secondary-${index}`
|
|
17071
|
-
)
|
|
17072
|
-
);
|
|
17073
|
-
});
|
|
17074
|
-
}
|
|
17075
|
-
if (primary) {
|
|
17076
|
-
const isSubmit = primary.actionType === "submit";
|
|
17077
|
-
buttons.push(
|
|
17078
|
-
/* @__PURE__ */ jsx(
|
|
17079
|
-
Button,
|
|
17080
|
-
{
|
|
17081
|
-
type: isSubmit ? "submit" : "button",
|
|
17082
|
-
variant: primary.variant || "primary",
|
|
17083
|
-
onClick: () => handleActionClick(primary),
|
|
17084
|
-
"data-testid": isSubmit ? "form-submit" : void 0,
|
|
17085
|
-
children: primary.label
|
|
17086
|
-
},
|
|
17087
|
-
"primary"
|
|
17088
|
-
)
|
|
17089
|
-
);
|
|
17090
|
-
}
|
|
17091
|
-
return buttons;
|
|
17092
|
-
};
|
|
17093
|
-
const renderFilters = () => {
|
|
17094
|
-
if (!filters || filters.length === 0) return null;
|
|
17095
|
-
return filters.map((filter, index) => /* @__PURE__ */ jsx(
|
|
17096
|
-
Button,
|
|
17097
|
-
{
|
|
17098
|
-
variant: "ghost",
|
|
17099
|
-
onClick: () => {
|
|
17100
|
-
log6.debug("Filter clicked", { field: filter.field });
|
|
17101
|
-
},
|
|
17102
|
-
children: filter.label
|
|
17103
|
-
},
|
|
17104
|
-
`filter-${filter.field}-${index}`
|
|
17105
|
-
));
|
|
17106
|
-
};
|
|
17107
|
-
return /* @__PURE__ */ jsx(
|
|
17108
|
-
"div",
|
|
17109
|
-
{
|
|
17110
|
-
className: cn(
|
|
17111
|
-
"inline-flex gap-2",
|
|
17112
|
-
variantClasses2[variant],
|
|
17113
|
-
orientationClasses[orientation],
|
|
17114
|
-
lookStyles4[look],
|
|
17115
|
-
className
|
|
17116
|
-
),
|
|
17117
|
-
role: "group",
|
|
17118
|
-
children: children || renderFilters() || renderFormActions()
|
|
17119
|
-
}
|
|
17120
|
-
);
|
|
17121
|
-
};
|
|
17122
|
-
ButtonGroup.displayName = "ButtonGroup";
|
|
17123
|
-
}
|
|
17124
|
-
});
|
|
17125
17323
|
function useSwipeGesture(callbacks, options = {}) {
|
|
17126
17324
|
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
17127
17325
|
const startX = useRef(0);
|
|
@@ -18767,7 +18965,7 @@ function GameCard({
|
|
|
18767
18965
|
className
|
|
18768
18966
|
}) {
|
|
18769
18967
|
const eventBus = useEventBus();
|
|
18770
|
-
const handleClick =
|
|
18968
|
+
const handleClick = React79.useCallback(() => {
|
|
18771
18969
|
if (disabled) return;
|
|
18772
18970
|
onClick?.(id);
|
|
18773
18971
|
if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
|
|
@@ -19548,7 +19746,7 @@ var init_CardGrid = __esm({
|
|
|
19548
19746
|
CardGrid.displayName = "CardGrid";
|
|
19549
19747
|
}
|
|
19550
19748
|
});
|
|
19551
|
-
function
|
|
19749
|
+
function useSafeEventBus2() {
|
|
19552
19750
|
try {
|
|
19553
19751
|
return useEventBus();
|
|
19554
19752
|
} catch {
|
|
@@ -19584,7 +19782,7 @@ var init_Carousel = __esm({
|
|
|
19584
19782
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
19585
19783
|
const scrollRef = useRef(null);
|
|
19586
19784
|
const autoPlayRef = useRef(null);
|
|
19587
|
-
const eventBus =
|
|
19785
|
+
const eventBus = useSafeEventBus2();
|
|
19588
19786
|
const { t } = useTranslate();
|
|
19589
19787
|
const safeItems = items ?? [];
|
|
19590
19788
|
const totalSlides = safeItems.length;
|
|
@@ -21116,6 +21314,122 @@ var init_ChatBar = __esm({
|
|
|
21116
21314
|
ChatBar.displayName = "ChatBar";
|
|
21117
21315
|
}
|
|
21118
21316
|
});
|
|
21317
|
+
var ChemistryCanvas;
|
|
21318
|
+
var init_ChemistryCanvas = __esm({
|
|
21319
|
+
"components/learning/molecules/ChemistryCanvas.tsx"() {
|
|
21320
|
+
"use client";
|
|
21321
|
+
init_atoms();
|
|
21322
|
+
init_Stack();
|
|
21323
|
+
init_LearningCanvas();
|
|
21324
|
+
ChemistryCanvas = ({
|
|
21325
|
+
className,
|
|
21326
|
+
width = 600,
|
|
21327
|
+
height = 400,
|
|
21328
|
+
title,
|
|
21329
|
+
backgroundColor,
|
|
21330
|
+
atoms = [],
|
|
21331
|
+
bonds = [],
|
|
21332
|
+
arrows = [],
|
|
21333
|
+
shapes = [],
|
|
21334
|
+
interactive = false,
|
|
21335
|
+
animate = false,
|
|
21336
|
+
onShapeClick,
|
|
21337
|
+
isLoading,
|
|
21338
|
+
error
|
|
21339
|
+
}) => {
|
|
21340
|
+
const derivedShapes = useMemo(() => {
|
|
21341
|
+
const out = [];
|
|
21342
|
+
const atomById = /* @__PURE__ */ new Map();
|
|
21343
|
+
for (const a of atoms) {
|
|
21344
|
+
if (a.id) atomById.set(a.id, a);
|
|
21345
|
+
}
|
|
21346
|
+
for (const b of bonds) {
|
|
21347
|
+
const a = atomById.get(b.from);
|
|
21348
|
+
const c = atomById.get(b.to);
|
|
21349
|
+
if (!a || !c) continue;
|
|
21350
|
+
const color = b.color ?? "#6b7280";
|
|
21351
|
+
const strokeWidth = b.type === "double" ? 4 : b.type === "triple" ? 6 : 2;
|
|
21352
|
+
out.push({
|
|
21353
|
+
type: "line",
|
|
21354
|
+
x1: a.x,
|
|
21355
|
+
y1: a.y,
|
|
21356
|
+
x2: c.x,
|
|
21357
|
+
y2: c.y,
|
|
21358
|
+
color,
|
|
21359
|
+
lineWidth: strokeWidth
|
|
21360
|
+
});
|
|
21361
|
+
}
|
|
21362
|
+
for (const a of arrows) {
|
|
21363
|
+
const angle = (a.angle ?? 0) * (Math.PI / 180);
|
|
21364
|
+
const len = a.length ?? 60;
|
|
21365
|
+
const x2 = a.x + Math.cos(angle) * len;
|
|
21366
|
+
const y2 = a.y + Math.sin(angle) * len;
|
|
21367
|
+
out.push({
|
|
21368
|
+
type: "arrow",
|
|
21369
|
+
x1: a.x,
|
|
21370
|
+
y1: a.y,
|
|
21371
|
+
x2,
|
|
21372
|
+
y2,
|
|
21373
|
+
color: a.color ?? "#dc2626",
|
|
21374
|
+
lineWidth: 2
|
|
21375
|
+
});
|
|
21376
|
+
if (a.label) {
|
|
21377
|
+
out.push({
|
|
21378
|
+
type: "text",
|
|
21379
|
+
x: (a.x + x2) / 2,
|
|
21380
|
+
y: (a.y + y2) / 2 - 10,
|
|
21381
|
+
text: a.label,
|
|
21382
|
+
color: "#111827",
|
|
21383
|
+
fontSize: 12,
|
|
21384
|
+
align: "center"
|
|
21385
|
+
});
|
|
21386
|
+
}
|
|
21387
|
+
}
|
|
21388
|
+
for (const a of atoms) {
|
|
21389
|
+
out.push({
|
|
21390
|
+
type: "circle",
|
|
21391
|
+
x: a.x,
|
|
21392
|
+
y: a.y,
|
|
21393
|
+
radius: a.radius ?? 14,
|
|
21394
|
+
color: a.color ?? "#2563eb",
|
|
21395
|
+
fill: a.color ?? "#2563eb",
|
|
21396
|
+
id: a.id
|
|
21397
|
+
});
|
|
21398
|
+
if (a.element) {
|
|
21399
|
+
out.push({
|
|
21400
|
+
type: "text",
|
|
21401
|
+
x: a.x,
|
|
21402
|
+
y: a.y,
|
|
21403
|
+
text: a.element,
|
|
21404
|
+
color: "#ffffff",
|
|
21405
|
+
fontSize: 12,
|
|
21406
|
+
align: "center"
|
|
21407
|
+
});
|
|
21408
|
+
}
|
|
21409
|
+
}
|
|
21410
|
+
out.push(...shapes);
|
|
21411
|
+
return out;
|
|
21412
|
+
}, [atoms, bonds, arrows, shapes]);
|
|
21413
|
+
return /* @__PURE__ */ jsx(Card, { className, children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
21414
|
+
title ? /* @__PURE__ */ jsx(Typography, { variant: "h4", children: title }) : null,
|
|
21415
|
+
/* @__PURE__ */ jsx(
|
|
21416
|
+
LearningCanvas,
|
|
21417
|
+
{
|
|
21418
|
+
width,
|
|
21419
|
+
height,
|
|
21420
|
+
backgroundColor,
|
|
21421
|
+
shapes: derivedShapes,
|
|
21422
|
+
interactive,
|
|
21423
|
+
animate,
|
|
21424
|
+
onShapeClick,
|
|
21425
|
+
isLoading,
|
|
21426
|
+
error
|
|
21427
|
+
}
|
|
21428
|
+
)
|
|
21429
|
+
] }) });
|
|
21430
|
+
};
|
|
21431
|
+
}
|
|
21432
|
+
});
|
|
21119
21433
|
function ChoiceButton({
|
|
21120
21434
|
text = "Charge forward into the fray",
|
|
21121
21435
|
index,
|
|
@@ -22111,9 +22425,9 @@ function ControlButton({
|
|
|
22111
22425
|
className
|
|
22112
22426
|
}) {
|
|
22113
22427
|
const eventBus = useEventBus();
|
|
22114
|
-
const [isPressed, setIsPressed] =
|
|
22428
|
+
const [isPressed, setIsPressed] = React79.useState(false);
|
|
22115
22429
|
const actualPressed = pressed ?? isPressed;
|
|
22116
|
-
const handlePointerDown =
|
|
22430
|
+
const handlePointerDown = React79.useCallback(
|
|
22117
22431
|
(e) => {
|
|
22118
22432
|
e.preventDefault();
|
|
22119
22433
|
if (disabled) return;
|
|
@@ -22123,7 +22437,7 @@ function ControlButton({
|
|
|
22123
22437
|
},
|
|
22124
22438
|
[disabled, pressEvent, eventBus, onPress]
|
|
22125
22439
|
);
|
|
22126
|
-
const handlePointerUp =
|
|
22440
|
+
const handlePointerUp = React79.useCallback(
|
|
22127
22441
|
(e) => {
|
|
22128
22442
|
e.preventDefault();
|
|
22129
22443
|
if (disabled) return;
|
|
@@ -22133,7 +22447,7 @@ function ControlButton({
|
|
|
22133
22447
|
},
|
|
22134
22448
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
22135
22449
|
);
|
|
22136
|
-
const handlePointerLeave =
|
|
22450
|
+
const handlePointerLeave = React79.useCallback(
|
|
22137
22451
|
(e) => {
|
|
22138
22452
|
if (isPressed) {
|
|
22139
22453
|
setIsPressed(false);
|
|
@@ -22229,8 +22543,8 @@ function ControlGrid({
|
|
|
22229
22543
|
className
|
|
22230
22544
|
}) {
|
|
22231
22545
|
const eventBus = useEventBus();
|
|
22232
|
-
const [active, setActive] =
|
|
22233
|
-
const handlePress =
|
|
22546
|
+
const [active, setActive] = React79.useState(/* @__PURE__ */ new Set());
|
|
22547
|
+
const handlePress = React79.useCallback(
|
|
22234
22548
|
(id) => {
|
|
22235
22549
|
setActive((prev) => new Set(prev).add(id));
|
|
22236
22550
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -22242,7 +22556,7 @@ function ControlGrid({
|
|
|
22242
22556
|
},
|
|
22243
22557
|
[kind, actionEvent, directionEvent, eventBus, onAction, onDirection]
|
|
22244
22558
|
);
|
|
22245
|
-
const handleRelease =
|
|
22559
|
+
const handleRelease = React79.useCallback(
|
|
22246
22560
|
(id) => {
|
|
22247
22561
|
setActive((prev) => {
|
|
22248
22562
|
const next = new Set(prev);
|
|
@@ -23495,8 +23809,8 @@ var init_Menu = __esm({
|
|
|
23495
23809
|
"bottom-end": "bottom-start"
|
|
23496
23810
|
};
|
|
23497
23811
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
23498
|
-
const triggerChild =
|
|
23499
|
-
const triggerElement =
|
|
23812
|
+
const triggerChild = React79__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
23813
|
+
const triggerElement = React79__default.cloneElement(
|
|
23500
23814
|
triggerChild,
|
|
23501
23815
|
{
|
|
23502
23816
|
ref: triggerRef,
|
|
@@ -23591,14 +23905,14 @@ function useDataDnd(args) {
|
|
|
23591
23905
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
23592
23906
|
const enabled = isZone || Boolean(dndRoot);
|
|
23593
23907
|
const eventBus = useEventBus();
|
|
23594
|
-
const parentRoot =
|
|
23908
|
+
const parentRoot = React79__default.useContext(RootCtx);
|
|
23595
23909
|
const isRoot = enabled && parentRoot === null;
|
|
23596
|
-
const zoneId =
|
|
23910
|
+
const zoneId = React79__default.useId();
|
|
23597
23911
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
23598
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
23599
|
-
const optimisticOrdersRef =
|
|
23912
|
+
const [optimisticOrders, setOptimisticOrders] = React79__default.useState(() => /* @__PURE__ */ new Map());
|
|
23913
|
+
const optimisticOrdersRef = React79__default.useRef(optimisticOrders);
|
|
23600
23914
|
optimisticOrdersRef.current = optimisticOrders;
|
|
23601
|
-
const clearOptimisticOrder =
|
|
23915
|
+
const clearOptimisticOrder = React79__default.useCallback((group) => {
|
|
23602
23916
|
setOptimisticOrders((prev) => {
|
|
23603
23917
|
if (!prev.has(group)) return prev;
|
|
23604
23918
|
const next = new Map(prev);
|
|
@@ -23623,7 +23937,7 @@ function useDataDnd(args) {
|
|
|
23623
23937
|
const raw = it[dndItemIdField];
|
|
23624
23938
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
23625
23939
|
}).join("|");
|
|
23626
|
-
const itemIds =
|
|
23940
|
+
const itemIds = React79__default.useMemo(
|
|
23627
23941
|
() => orderedItems.map((it, idx) => {
|
|
23628
23942
|
const raw = it[dndItemIdField];
|
|
23629
23943
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -23634,7 +23948,7 @@ function useDataDnd(args) {
|
|
|
23634
23948
|
const raw = it[dndItemIdField];
|
|
23635
23949
|
return raw != null ? String(raw) : `__${idx}`;
|
|
23636
23950
|
}).join("|");
|
|
23637
|
-
|
|
23951
|
+
React79__default.useEffect(() => {
|
|
23638
23952
|
const root = isRoot ? null : parentRoot;
|
|
23639
23953
|
if (root) {
|
|
23640
23954
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -23642,20 +23956,20 @@ function useDataDnd(args) {
|
|
|
23642
23956
|
clearOptimisticOrder(ownGroup);
|
|
23643
23957
|
}
|
|
23644
23958
|
}, [itemsContentSig, ownGroup]);
|
|
23645
|
-
const zonesRef =
|
|
23646
|
-
const registerZone =
|
|
23959
|
+
const zonesRef = React79__default.useRef(/* @__PURE__ */ new Map());
|
|
23960
|
+
const registerZone = React79__default.useCallback((zoneId2, meta2) => {
|
|
23647
23961
|
zonesRef.current.set(zoneId2, meta2);
|
|
23648
23962
|
}, []);
|
|
23649
|
-
const unregisterZone =
|
|
23963
|
+
const unregisterZone = React79__default.useCallback((zoneId2) => {
|
|
23650
23964
|
zonesRef.current.delete(zoneId2);
|
|
23651
23965
|
}, []);
|
|
23652
|
-
const [activeDrag, setActiveDrag] =
|
|
23653
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
23654
|
-
const meta =
|
|
23966
|
+
const [activeDrag, setActiveDrag] = React79__default.useState(null);
|
|
23967
|
+
const [overZoneGroup, setOverZoneGroup] = React79__default.useState(null);
|
|
23968
|
+
const meta = React79__default.useMemo(
|
|
23655
23969
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
23656
23970
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
23657
23971
|
);
|
|
23658
|
-
|
|
23972
|
+
React79__default.useEffect(() => {
|
|
23659
23973
|
const target = isRoot ? null : parentRoot;
|
|
23660
23974
|
if (!target) {
|
|
23661
23975
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -23674,7 +23988,7 @@ function useDataDnd(args) {
|
|
|
23674
23988
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
23675
23989
|
const sensors = useAlmadarDndSensors(true);
|
|
23676
23990
|
const collisionDetection = almadarDndCollisionDetection;
|
|
23677
|
-
const findZoneByItem =
|
|
23991
|
+
const findZoneByItem = React79__default.useCallback(
|
|
23678
23992
|
(id) => {
|
|
23679
23993
|
for (const z of zonesRef.current.values()) {
|
|
23680
23994
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -23683,7 +23997,7 @@ function useDataDnd(args) {
|
|
|
23683
23997
|
},
|
|
23684
23998
|
[]
|
|
23685
23999
|
);
|
|
23686
|
-
|
|
24000
|
+
React79__default.useCallback(
|
|
23687
24001
|
(group) => {
|
|
23688
24002
|
for (const z of zonesRef.current.values()) {
|
|
23689
24003
|
if (z.group === group) return z;
|
|
@@ -23692,7 +24006,7 @@ function useDataDnd(args) {
|
|
|
23692
24006
|
},
|
|
23693
24007
|
[]
|
|
23694
24008
|
);
|
|
23695
|
-
const handleDragEnd =
|
|
24009
|
+
const handleDragEnd = React79__default.useCallback(
|
|
23696
24010
|
(event) => {
|
|
23697
24011
|
const { active, over } = event;
|
|
23698
24012
|
const activeIdStr = String(active.id);
|
|
@@ -23783,8 +24097,8 @@ function useDataDnd(args) {
|
|
|
23783
24097
|
},
|
|
23784
24098
|
[eventBus]
|
|
23785
24099
|
);
|
|
23786
|
-
const sortableData =
|
|
23787
|
-
const SortableItem =
|
|
24100
|
+
const sortableData = React79__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
24101
|
+
const SortableItem = React79__default.useCallback(
|
|
23788
24102
|
({ id, children }) => {
|
|
23789
24103
|
const {
|
|
23790
24104
|
attributes,
|
|
@@ -23824,7 +24138,7 @@ function useDataDnd(args) {
|
|
|
23824
24138
|
id: droppableId,
|
|
23825
24139
|
data: sortableData
|
|
23826
24140
|
});
|
|
23827
|
-
const ctx =
|
|
24141
|
+
const ctx = React79__default.useContext(RootCtx);
|
|
23828
24142
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
23829
24143
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
23830
24144
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -23839,7 +24153,7 @@ function useDataDnd(args) {
|
|
|
23839
24153
|
showForeignPlaceholder,
|
|
23840
24154
|
ctxAvailable: ctx != null
|
|
23841
24155
|
});
|
|
23842
|
-
|
|
24156
|
+
React79__default.useEffect(() => {
|
|
23843
24157
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
23844
24158
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
23845
24159
|
return /* @__PURE__ */ jsx(
|
|
@@ -23853,11 +24167,11 @@ function useDataDnd(args) {
|
|
|
23853
24167
|
}
|
|
23854
24168
|
);
|
|
23855
24169
|
};
|
|
23856
|
-
const rootContextValue =
|
|
24170
|
+
const rootContextValue = React79__default.useMemo(
|
|
23857
24171
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
23858
24172
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
23859
24173
|
);
|
|
23860
|
-
const handleDragStart =
|
|
24174
|
+
const handleDragStart = React79__default.useCallback((event) => {
|
|
23861
24175
|
const sourceZone = findZoneByItem(event.active.id);
|
|
23862
24176
|
const rect = event.active.rect.current.initial;
|
|
23863
24177
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -23876,7 +24190,7 @@ function useDataDnd(args) {
|
|
|
23876
24190
|
isRoot
|
|
23877
24191
|
});
|
|
23878
24192
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
23879
|
-
const handleDragOver =
|
|
24193
|
+
const handleDragOver = React79__default.useCallback((event) => {
|
|
23880
24194
|
const { active, over } = event;
|
|
23881
24195
|
const overData = over?.data?.current;
|
|
23882
24196
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -23946,7 +24260,7 @@ function useDataDnd(args) {
|
|
|
23946
24260
|
return next;
|
|
23947
24261
|
});
|
|
23948
24262
|
}, []);
|
|
23949
|
-
const handleDragCancel =
|
|
24263
|
+
const handleDragCancel = React79__default.useCallback((event) => {
|
|
23950
24264
|
setActiveDrag(null);
|
|
23951
24265
|
setOverZoneGroup(null);
|
|
23952
24266
|
dndLog.warn("dragCancel", {
|
|
@@ -23954,12 +24268,12 @@ function useDataDnd(args) {
|
|
|
23954
24268
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
23955
24269
|
});
|
|
23956
24270
|
}, []);
|
|
23957
|
-
const handleDragEndWithCleanup =
|
|
24271
|
+
const handleDragEndWithCleanup = React79__default.useCallback((event) => {
|
|
23958
24272
|
handleDragEnd(event);
|
|
23959
24273
|
setActiveDrag(null);
|
|
23960
24274
|
setOverZoneGroup(null);
|
|
23961
24275
|
}, [handleDragEnd]);
|
|
23962
|
-
const wrapContainer =
|
|
24276
|
+
const wrapContainer = React79__default.useCallback(
|
|
23963
24277
|
(children) => {
|
|
23964
24278
|
if (!enabled) return children;
|
|
23965
24279
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -24013,7 +24327,7 @@ var init_useDataDnd = __esm({
|
|
|
24013
24327
|
init_useAlmadarDndCollision();
|
|
24014
24328
|
init_Box();
|
|
24015
24329
|
dndLog = createLogger("almadar:ui:dnd");
|
|
24016
|
-
RootCtx =
|
|
24330
|
+
RootCtx = React79__default.createContext(null);
|
|
24017
24331
|
}
|
|
24018
24332
|
});
|
|
24019
24333
|
function renderIconInput(icon, props) {
|
|
@@ -24209,7 +24523,7 @@ function DataGrid({
|
|
|
24209
24523
|
/* @__PURE__ */ jsx(
|
|
24210
24524
|
Box,
|
|
24211
24525
|
{
|
|
24212
|
-
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass,
|
|
24526
|
+
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass, lookStyles4[look], className),
|
|
24213
24527
|
style: scrollX ? { gridAutoFlow: "column", gridAutoColumns: `minmax(${minCardWidth}px, 1fr)` } : gridTemplateColumns ? { gridTemplateColumns } : void 0,
|
|
24214
24528
|
children: data.map((item, index) => {
|
|
24215
24529
|
const itemData = item;
|
|
@@ -24404,7 +24718,7 @@ function DataGrid({
|
|
|
24404
24718
|
] })
|
|
24405
24719
|
);
|
|
24406
24720
|
}
|
|
24407
|
-
var dataGridLog, BADGE_VARIANTS, gapStyles5,
|
|
24721
|
+
var dataGridLog, BADGE_VARIANTS, gapStyles5, lookStyles4;
|
|
24408
24722
|
var init_DataGrid = __esm({
|
|
24409
24723
|
"components/core/molecules/DataGrid.tsx"() {
|
|
24410
24724
|
"use client";
|
|
@@ -24439,7 +24753,7 @@ var init_DataGrid = __esm({
|
|
|
24439
24753
|
lg: "gap-6",
|
|
24440
24754
|
xl: "gap-8"
|
|
24441
24755
|
};
|
|
24442
|
-
|
|
24756
|
+
lookStyles4 = {
|
|
24443
24757
|
dense: "gap-2 [&>*]:p-card-sm",
|
|
24444
24758
|
spacious: "gap-8 [&>*]:p-card-lg",
|
|
24445
24759
|
striped: "[&>*:nth-child(even)]:bg-muted/30",
|
|
@@ -24539,7 +24853,7 @@ function DataList({
|
|
|
24539
24853
|
}) {
|
|
24540
24854
|
const eventBus = useEventBus();
|
|
24541
24855
|
const { t } = useTranslate();
|
|
24542
|
-
const [visibleCount, setVisibleCount] =
|
|
24856
|
+
const [visibleCount, setVisibleCount] = React79__default.useState(pageSize || Infinity);
|
|
24543
24857
|
const fieldDefs = fields ?? columns ?? [];
|
|
24544
24858
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
24545
24859
|
const dnd = useDataDnd({
|
|
@@ -24558,7 +24872,7 @@ function DataList({
|
|
|
24558
24872
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
24559
24873
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
24560
24874
|
const hasRenderProp = typeof children === "function";
|
|
24561
|
-
|
|
24875
|
+
React79__default.useEffect(() => {
|
|
24562
24876
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
24563
24877
|
const childrenTypeOf = typeof children;
|
|
24564
24878
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -24662,7 +24976,7 @@ function DataList({
|
|
|
24662
24976
|
const items2 = [...data];
|
|
24663
24977
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
24664
24978
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
24665
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
24979
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
|
|
24666
24980
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
24667
24981
|
group.items.map((itemData, index) => {
|
|
24668
24982
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -24803,7 +25117,7 @@ function DataList({
|
|
|
24803
25117
|
className
|
|
24804
25118
|
),
|
|
24805
25119
|
children: [
|
|
24806
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25120
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
|
|
24807
25121
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
24808
25122
|
group.items.map(
|
|
24809
25123
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -24910,8 +25224,8 @@ function ScalarControl({
|
|
|
24910
25224
|
}
|
|
24911
25225
|
const numeric = typeof value === "number";
|
|
24912
25226
|
const initial = value === null ? "" : String(value);
|
|
24913
|
-
const [draft, setDraft] =
|
|
24914
|
-
|
|
25227
|
+
const [draft, setDraft] = React79__default.useState(initial);
|
|
25228
|
+
React79__default.useEffect(() => setDraft(initial), [initial]);
|
|
24915
25229
|
const commit = () => {
|
|
24916
25230
|
if (numeric) {
|
|
24917
25231
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -24979,8 +25293,8 @@ function Row({
|
|
|
24979
25293
|
onRemove,
|
|
24980
25294
|
readonly
|
|
24981
25295
|
}) {
|
|
24982
|
-
const [keyDraft, setKeyDraft] =
|
|
24983
|
-
|
|
25296
|
+
const [keyDraft, setKeyDraft] = React79__default.useState(rowKey);
|
|
25297
|
+
React79__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
|
|
24984
25298
|
const container = isObj(value) || isArr(value);
|
|
24985
25299
|
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
|
|
24986
25300
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
|
|
@@ -25023,7 +25337,7 @@ function ContainerNode({
|
|
|
25023
25337
|
depth,
|
|
25024
25338
|
readonly
|
|
25025
25339
|
}) {
|
|
25026
|
-
const [open, setOpen] =
|
|
25340
|
+
const [open, setOpen] = React79__default.useState(depth < 2);
|
|
25027
25341
|
const array = isArr(value);
|
|
25028
25342
|
const entries = array ? value.map((v, i) => [String(i), v]) : Object.entries(value);
|
|
25029
25343
|
const setObjValue = (key, next) => {
|
|
@@ -25165,7 +25479,7 @@ var init_FormSection = __esm({
|
|
|
25165
25479
|
columns = 1,
|
|
25166
25480
|
className
|
|
25167
25481
|
}) => {
|
|
25168
|
-
const [collapsed, setCollapsed] =
|
|
25482
|
+
const [collapsed, setCollapsed] = React79__default.useState(defaultCollapsed);
|
|
25169
25483
|
const { t } = useTranslate();
|
|
25170
25484
|
const eventBus = useEventBus();
|
|
25171
25485
|
const gridClass = {
|
|
@@ -25173,7 +25487,7 @@ var init_FormSection = __esm({
|
|
|
25173
25487
|
2: "grid-cols-1 md:grid-cols-2",
|
|
25174
25488
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
25175
25489
|
}[columns];
|
|
25176
|
-
|
|
25490
|
+
React79__default.useCallback(() => {
|
|
25177
25491
|
if (collapsible) {
|
|
25178
25492
|
setCollapsed((prev) => !prev);
|
|
25179
25493
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -25581,8 +25895,8 @@ function TextLikeControl({
|
|
|
25581
25895
|
onCommit
|
|
25582
25896
|
}) {
|
|
25583
25897
|
const initial = value === void 0 || value === null ? "" : String(value);
|
|
25584
|
-
const [draft, setDraft] =
|
|
25585
|
-
|
|
25898
|
+
const [draft, setDraft] = React79__default.useState(initial);
|
|
25899
|
+
React79__default.useEffect(() => setDraft(initial), [initial]);
|
|
25586
25900
|
const commit = () => {
|
|
25587
25901
|
if (numeric) {
|
|
25588
25902
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -25762,14 +26076,14 @@ var init_NodeSlotEditor = __esm({
|
|
|
25762
26076
|
isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
|
|
25763
26077
|
NodeSlotEditor = ({ value, onChange, className }) => {
|
|
25764
26078
|
const { type, props, wasArray } = normalize(value);
|
|
25765
|
-
const patterns =
|
|
26079
|
+
const patterns = React79__default.useMemo(() => {
|
|
25766
26080
|
try {
|
|
25767
26081
|
return [...getKnownPatterns()].sort();
|
|
25768
26082
|
} catch {
|
|
25769
26083
|
return [];
|
|
25770
26084
|
}
|
|
25771
26085
|
}, []);
|
|
25772
|
-
const options =
|
|
26086
|
+
const options = React79__default.useMemo(
|
|
25773
26087
|
() => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p2) => ({ value: p2, label: p2 }))],
|
|
25774
26088
|
[patterns]
|
|
25775
26089
|
);
|
|
@@ -25781,7 +26095,7 @@ var init_NodeSlotEditor = __esm({
|
|
|
25781
26095
|
const pattern = { type: nextType, ...nextProps };
|
|
25782
26096
|
onChange(wasArray || value === void 0 ? [pattern] : pattern);
|
|
25783
26097
|
};
|
|
25784
|
-
const schemaEntries =
|
|
26098
|
+
const schemaEntries = React79__default.useMemo(() => {
|
|
25785
26099
|
if (!type) return [];
|
|
25786
26100
|
const def = getPatternDefinition(type);
|
|
25787
26101
|
if (!def?.propsSchema) return [];
|
|
@@ -25983,6 +26297,129 @@ var init_FormField = __esm({
|
|
|
25983
26297
|
FormField.displayName = "FormField";
|
|
25984
26298
|
}
|
|
25985
26299
|
});
|
|
26300
|
+
function useSafeEventBus3() {
|
|
26301
|
+
try {
|
|
26302
|
+
return useEventBus();
|
|
26303
|
+
} catch {
|
|
26304
|
+
return { emit: () => {
|
|
26305
|
+
}, on: () => () => {
|
|
26306
|
+
}, once: () => {
|
|
26307
|
+
} };
|
|
26308
|
+
}
|
|
26309
|
+
}
|
|
26310
|
+
var log6, lookStyles5, ButtonGroup;
|
|
26311
|
+
var init_ButtonGroup = __esm({
|
|
26312
|
+
"components/core/molecules/ButtonGroup.tsx"() {
|
|
26313
|
+
"use client";
|
|
26314
|
+
init_cn();
|
|
26315
|
+
init_atoms();
|
|
26316
|
+
init_useEventBus();
|
|
26317
|
+
log6 = createLogger("almadar:ui:button-group");
|
|
26318
|
+
lookStyles5 = {
|
|
26319
|
+
"right-aligned-buttons": "",
|
|
26320
|
+
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
26321
|
+
"inline-row": "gap-2 inline-flex",
|
|
26322
|
+
"dropdown-menu": "[&>button:not(:first-child)]:hidden",
|
|
26323
|
+
"command-palette-trigger": "[&>button:not(:first-child)]:hidden"
|
|
26324
|
+
};
|
|
26325
|
+
ButtonGroup = ({
|
|
26326
|
+
children,
|
|
26327
|
+
primary,
|
|
26328
|
+
secondary,
|
|
26329
|
+
variant = "default",
|
|
26330
|
+
orientation = "horizontal",
|
|
26331
|
+
className,
|
|
26332
|
+
// Filter-group pattern props (entity and filters are used for schema-driven filtering)
|
|
26333
|
+
entity: _entity,
|
|
26334
|
+
filters,
|
|
26335
|
+
look = "right-aligned-buttons"
|
|
26336
|
+
}) => {
|
|
26337
|
+
const eventBus = useSafeEventBus3();
|
|
26338
|
+
const variantClasses2 = {
|
|
26339
|
+
default: "gap-0",
|
|
26340
|
+
segmented: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0",
|
|
26341
|
+
toggle: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0"
|
|
26342
|
+
};
|
|
26343
|
+
const orientationClasses = {
|
|
26344
|
+
horizontal: "flex-row",
|
|
26345
|
+
vertical: "flex-col [&>button:first-child]:rounded-t-lg [&>button:last-child]:rounded-b-lg [&>button:not(:first-child)]:border-t-0 [&>button:not(:first-child)]:border-l"
|
|
26346
|
+
};
|
|
26347
|
+
const handleActionClick = (action) => {
|
|
26348
|
+
if (action.event) {
|
|
26349
|
+
eventBus.emit("UI:DISPATCH", { event: action.event });
|
|
26350
|
+
}
|
|
26351
|
+
if (action.navigatesTo) {
|
|
26352
|
+
eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
|
|
26353
|
+
}
|
|
26354
|
+
};
|
|
26355
|
+
const renderFormActions = () => {
|
|
26356
|
+
const buttons = [];
|
|
26357
|
+
if (secondary) {
|
|
26358
|
+
secondary.forEach((action, index) => {
|
|
26359
|
+
buttons.push(
|
|
26360
|
+
/* @__PURE__ */ jsx(
|
|
26361
|
+
Button,
|
|
26362
|
+
{
|
|
26363
|
+
type: action.actionType === "submit" ? "submit" : "button",
|
|
26364
|
+
variant: action.variant || "ghost",
|
|
26365
|
+
onClick: () => handleActionClick(action),
|
|
26366
|
+
children: action.label
|
|
26367
|
+
},
|
|
26368
|
+
`secondary-${index}`
|
|
26369
|
+
)
|
|
26370
|
+
);
|
|
26371
|
+
});
|
|
26372
|
+
}
|
|
26373
|
+
if (primary) {
|
|
26374
|
+
const isSubmit = primary.actionType === "submit";
|
|
26375
|
+
buttons.push(
|
|
26376
|
+
/* @__PURE__ */ jsx(
|
|
26377
|
+
Button,
|
|
26378
|
+
{
|
|
26379
|
+
type: isSubmit ? "submit" : "button",
|
|
26380
|
+
variant: primary.variant || "primary",
|
|
26381
|
+
onClick: () => handleActionClick(primary),
|
|
26382
|
+
"data-testid": isSubmit ? "form-submit" : void 0,
|
|
26383
|
+
children: primary.label
|
|
26384
|
+
},
|
|
26385
|
+
"primary"
|
|
26386
|
+
)
|
|
26387
|
+
);
|
|
26388
|
+
}
|
|
26389
|
+
return buttons;
|
|
26390
|
+
};
|
|
26391
|
+
const renderFilters = () => {
|
|
26392
|
+
if (!filters || filters.length === 0) return null;
|
|
26393
|
+
return filters.map((filter, index) => /* @__PURE__ */ jsx(
|
|
26394
|
+
Button,
|
|
26395
|
+
{
|
|
26396
|
+
variant: "ghost",
|
|
26397
|
+
onClick: () => {
|
|
26398
|
+
log6.debug("Filter clicked", { field: filter.field });
|
|
26399
|
+
},
|
|
26400
|
+
children: filter.label
|
|
26401
|
+
},
|
|
26402
|
+
`filter-${filter.field}-${index}`
|
|
26403
|
+
));
|
|
26404
|
+
};
|
|
26405
|
+
return /* @__PURE__ */ jsx(
|
|
26406
|
+
"div",
|
|
26407
|
+
{
|
|
26408
|
+
className: cn(
|
|
26409
|
+
"inline-flex gap-2",
|
|
26410
|
+
variantClasses2[variant],
|
|
26411
|
+
orientationClasses[orientation],
|
|
26412
|
+
lookStyles5[look],
|
|
26413
|
+
className
|
|
26414
|
+
),
|
|
26415
|
+
role: "group",
|
|
26416
|
+
children: children || renderFilters() || renderFormActions()
|
|
26417
|
+
}
|
|
26418
|
+
);
|
|
26419
|
+
};
|
|
26420
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
26421
|
+
}
|
|
26422
|
+
});
|
|
25986
26423
|
function getOrCreateStore(query) {
|
|
25987
26424
|
if (!queryStores.has(query)) {
|
|
25988
26425
|
queryStores.set(query, {
|
|
@@ -26560,7 +26997,7 @@ var init_Flex = __esm({
|
|
|
26560
26997
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
26561
26998
|
}
|
|
26562
26999
|
}
|
|
26563
|
-
return
|
|
27000
|
+
return React79__default.createElement(Component, {
|
|
26564
27001
|
className: cn(
|
|
26565
27002
|
inline ? "inline-flex" : "flex",
|
|
26566
27003
|
directionStyles[direction],
|
|
@@ -26679,7 +27116,7 @@ var init_Grid = __esm({
|
|
|
26679
27116
|
as: Component = "div"
|
|
26680
27117
|
}) => {
|
|
26681
27118
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
26682
|
-
return
|
|
27119
|
+
return React79__default.createElement(
|
|
26683
27120
|
Component,
|
|
26684
27121
|
{
|
|
26685
27122
|
className: cn(
|
|
@@ -26875,9 +27312,9 @@ var init_Popover = __esm({
|
|
|
26875
27312
|
onMouseLeave: handleClose,
|
|
26876
27313
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
26877
27314
|
};
|
|
26878
|
-
const childElement =
|
|
27315
|
+
const childElement = React79__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26879
27316
|
const childPointerDown = childElement.props.onPointerDown;
|
|
26880
|
-
const triggerElement =
|
|
27317
|
+
const triggerElement = React79__default.cloneElement(
|
|
26881
27318
|
childElement,
|
|
26882
27319
|
{
|
|
26883
27320
|
ref: triggerRef,
|
|
@@ -27729,9 +28166,9 @@ var init_Tooltip = __esm({
|
|
|
27729
28166
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
27730
28167
|
};
|
|
27731
28168
|
}, []);
|
|
27732
|
-
const triggerElement =
|
|
28169
|
+
const triggerElement = React79__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
27733
28170
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
27734
|
-
const trigger =
|
|
28171
|
+
const trigger = React79__default.cloneElement(triggerElement, {
|
|
27735
28172
|
ref: triggerRef,
|
|
27736
28173
|
onMouseEnter: handleMouseEnter,
|
|
27737
28174
|
onMouseLeave: handleMouseLeave,
|
|
@@ -27821,7 +28258,7 @@ var init_WizardProgress = __esm({
|
|
|
27821
28258
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
27822
28259
|
const isActive = index === currentStep;
|
|
27823
28260
|
const isCompleted = index < currentStep;
|
|
27824
|
-
return /* @__PURE__ */ jsxs(
|
|
28261
|
+
return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
|
|
27825
28262
|
/* @__PURE__ */ jsx(
|
|
27826
28263
|
"button",
|
|
27827
28264
|
{
|
|
@@ -29731,7 +30168,7 @@ function InventoryGrid({
|
|
|
29731
30168
|
const eventBus = useEventBus();
|
|
29732
30169
|
const slotCount = totalSlots ?? items.length;
|
|
29733
30170
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
29734
|
-
const handleSelect =
|
|
30171
|
+
const handleSelect = React79.useCallback(
|
|
29735
30172
|
(id) => {
|
|
29736
30173
|
onSelect?.(id);
|
|
29737
30174
|
if (selectEvent) {
|
|
@@ -29934,7 +30371,7 @@ function GameMenu({
|
|
|
29934
30371
|
} catch {
|
|
29935
30372
|
}
|
|
29936
30373
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29937
|
-
const handleOptionClick =
|
|
30374
|
+
const handleOptionClick = React79.useCallback(
|
|
29938
30375
|
(option) => {
|
|
29939
30376
|
if (option.event && eventBus) {
|
|
29940
30377
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -32939,7 +33376,7 @@ function LinearView({
|
|
|
32939
33376
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
32940
33377
|
const isDone = i < currentIdx;
|
|
32941
33378
|
const isCurrent = i === currentIdx;
|
|
32942
|
-
return /* @__PURE__ */ jsxs(
|
|
33379
|
+
return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
|
|
32943
33380
|
i > 0 && /* @__PURE__ */ jsx(
|
|
32944
33381
|
Typography,
|
|
32945
33382
|
{
|
|
@@ -33565,7 +34002,7 @@ function SequenceBar({
|
|
|
33565
34002
|
onSlotRemove(index);
|
|
33566
34003
|
}, [onSlotRemove, playing]);
|
|
33567
34004
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
33568
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
34005
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
|
|
33569
34006
|
i > 0 && /* @__PURE__ */ jsx(
|
|
33570
34007
|
Typography,
|
|
33571
34008
|
{
|
|
@@ -35730,10 +36167,10 @@ function getSlotContentRenderer() {
|
|
|
35730
36167
|
}
|
|
35731
36168
|
function resolveDescriptor(value, idPrefix) {
|
|
35732
36169
|
if (value === null || value === void 0) return value;
|
|
35733
|
-
if (
|
|
36170
|
+
if (React79__default.isValidElement(value)) return value;
|
|
35734
36171
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
35735
36172
|
if (Array.isArray(value)) {
|
|
35736
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
36173
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React79__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
35737
36174
|
}
|
|
35738
36175
|
if (typeof value === "object") {
|
|
35739
36176
|
const rec = value;
|
|
@@ -35869,7 +36306,7 @@ var init_GameTemplate = __esm({
|
|
|
35869
36306
|
}
|
|
35870
36307
|
});
|
|
35871
36308
|
function asDescriptor(v) {
|
|
35872
|
-
if (Array.isArray(v) ||
|
|
36309
|
+
if (Array.isArray(v) || React79__default.isValidElement(v)) return null;
|
|
35873
36310
|
const o = v;
|
|
35874
36311
|
if (typeof o.type !== "string") return null;
|
|
35875
36312
|
const props = o.props !== void 0 && typeof o.props === "object" && !Array.isArray(o.props) && o.props !== null ? o.props : void 0;
|
|
@@ -35884,10 +36321,10 @@ function getSlotContentRenderer2() {
|
|
|
35884
36321
|
}
|
|
35885
36322
|
function resolveDescriptor2(value, idPrefix) {
|
|
35886
36323
|
if (value === null || value === void 0) return value;
|
|
35887
|
-
if (
|
|
36324
|
+
if (React79__default.isValidElement(value)) return value;
|
|
35888
36325
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
35889
36326
|
if (Array.isArray(value)) {
|
|
35890
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
36327
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React79__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
35891
36328
|
}
|
|
35892
36329
|
if (typeof value === "object" && value !== null) {
|
|
35893
36330
|
const desc = asDescriptor(value);
|
|
@@ -36548,6 +36985,234 @@ var init_molecules = __esm({
|
|
|
36548
36985
|
init_CardBattlerTemplate();
|
|
36549
36986
|
}
|
|
36550
36987
|
});
|
|
36988
|
+
var MathCanvas;
|
|
36989
|
+
var init_MathCanvas = __esm({
|
|
36990
|
+
"components/learning/molecules/MathCanvas.tsx"() {
|
|
36991
|
+
"use client";
|
|
36992
|
+
init_atoms();
|
|
36993
|
+
init_Stack();
|
|
36994
|
+
init_LearningCanvas();
|
|
36995
|
+
MathCanvas = ({
|
|
36996
|
+
className,
|
|
36997
|
+
width = 600,
|
|
36998
|
+
height = 400,
|
|
36999
|
+
title,
|
|
37000
|
+
xMin = -10,
|
|
37001
|
+
xMax = 10,
|
|
37002
|
+
yMin = -10,
|
|
37003
|
+
yMax = 10,
|
|
37004
|
+
showAxes = true,
|
|
37005
|
+
showGrid = true,
|
|
37006
|
+
gridStep = 1,
|
|
37007
|
+
curves = [],
|
|
37008
|
+
points = [],
|
|
37009
|
+
vectors = [],
|
|
37010
|
+
shapes = [],
|
|
37011
|
+
interactive = false,
|
|
37012
|
+
animate = false,
|
|
37013
|
+
onShapeClick,
|
|
37014
|
+
isLoading,
|
|
37015
|
+
error
|
|
37016
|
+
}) => {
|
|
37017
|
+
const derivedShapes = useMemo(() => {
|
|
37018
|
+
const out = [];
|
|
37019
|
+
const margin = 24;
|
|
37020
|
+
const plotW = width - margin * 2;
|
|
37021
|
+
const plotH = height - margin * 2;
|
|
37022
|
+
const mapX = (x) => margin + (x - xMin) / (xMax - xMin) * plotW;
|
|
37023
|
+
const mapY = (y) => height - (margin + (y - yMin) / (yMax - yMin) * plotH);
|
|
37024
|
+
if (showGrid) {
|
|
37025
|
+
for (let x = Math.ceil(xMin / gridStep) * gridStep; x <= xMax; x += gridStep) {
|
|
37026
|
+
const px = mapX(x);
|
|
37027
|
+
out.push({ type: "line", x1: px, y1: margin, x2: px, y2: height - margin, color: "#e5e7eb", lineWidth: 1 });
|
|
37028
|
+
}
|
|
37029
|
+
for (let y = Math.ceil(yMin / gridStep) * gridStep; y <= yMax; y += gridStep) {
|
|
37030
|
+
const py = mapY(y);
|
|
37031
|
+
out.push({ type: "line", x1: margin, y1: py, x2: width - margin, y2: py, color: "#e5e7eb", lineWidth: 1 });
|
|
37032
|
+
}
|
|
37033
|
+
}
|
|
37034
|
+
if (showAxes) {
|
|
37035
|
+
const xAxisY = Math.max(margin, Math.min(height - margin, mapY(0)));
|
|
37036
|
+
const yAxisX = Math.max(margin, Math.min(width - margin, mapX(0)));
|
|
37037
|
+
out.push({ type: "line", x1: margin, y1: xAxisY, x2: width - margin, y2: xAxisY, color: "#374151", lineWidth: 2 });
|
|
37038
|
+
out.push({ type: "line", x1: yAxisX, y1: margin, x2: yAxisX, y2: height - margin, color: "#374151", lineWidth: 2 });
|
|
37039
|
+
}
|
|
37040
|
+
for (const curve of curves) {
|
|
37041
|
+
if (!curve.samples || curve.samples.length < 2) continue;
|
|
37042
|
+
for (let i = 1; i < curve.samples.length; i++) {
|
|
37043
|
+
const a = curve.samples[i - 1];
|
|
37044
|
+
const b = curve.samples[i];
|
|
37045
|
+
if (a.x < xMin || a.x > xMax || b.x < xMin || b.x > xMax) continue;
|
|
37046
|
+
out.push({
|
|
37047
|
+
type: "line",
|
|
37048
|
+
x1: mapX(a.x),
|
|
37049
|
+
y1: mapY(a.y),
|
|
37050
|
+
x2: mapX(b.x),
|
|
37051
|
+
y2: mapY(b.y),
|
|
37052
|
+
color: curve.color ?? "#2563eb",
|
|
37053
|
+
lineWidth: 2
|
|
37054
|
+
});
|
|
37055
|
+
}
|
|
37056
|
+
}
|
|
37057
|
+
for (const p2 of points) {
|
|
37058
|
+
if (p2.x < xMin || p2.x > xMax || p2.y < yMin || p2.y > yMax) continue;
|
|
37059
|
+
out.push({
|
|
37060
|
+
type: "circle",
|
|
37061
|
+
x: mapX(p2.x),
|
|
37062
|
+
y: mapY(p2.y),
|
|
37063
|
+
radius: p2.radius ?? 4,
|
|
37064
|
+
color: p2.color ?? "#dc2626",
|
|
37065
|
+
fill: p2.color ?? "#dc2626"
|
|
37066
|
+
});
|
|
37067
|
+
if (p2.label) {
|
|
37068
|
+
out.push({ type: "text", x: mapX(p2.x) + 8, y: mapY(p2.y) - 8, text: p2.label, color: "#111827", fontSize: 12 });
|
|
37069
|
+
}
|
|
37070
|
+
}
|
|
37071
|
+
for (const v of vectors) {
|
|
37072
|
+
if (v.x < xMin || v.x > xMax || v.y < yMin || v.y > yMax) continue;
|
|
37073
|
+
const x1 = mapX(v.x);
|
|
37074
|
+
const y1 = mapY(v.y);
|
|
37075
|
+
const x2 = mapX(v.x + v.vx);
|
|
37076
|
+
const y2 = mapY(v.y + v.vy);
|
|
37077
|
+
out.push({ type: "arrow", x1, y1, x2, y2, color: v.color ?? "#7c3aed", lineWidth: 2 });
|
|
37078
|
+
if (v.label) {
|
|
37079
|
+
out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: "#111827", fontSize: 12 });
|
|
37080
|
+
}
|
|
37081
|
+
}
|
|
37082
|
+
out.push(...shapes);
|
|
37083
|
+
return out;
|
|
37084
|
+
}, [width, height, xMin, xMax, yMin, yMax, showAxes, showGrid, gridStep, curves, points, vectors, shapes]);
|
|
37085
|
+
return /* @__PURE__ */ jsx(Card, { className, children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
37086
|
+
title ? /* @__PURE__ */ jsx(Typography, { variant: "h4", children: title }) : null,
|
|
37087
|
+
/* @__PURE__ */ jsx(
|
|
37088
|
+
LearningCanvas,
|
|
37089
|
+
{
|
|
37090
|
+
width,
|
|
37091
|
+
height,
|
|
37092
|
+
shapes: derivedShapes,
|
|
37093
|
+
interactive,
|
|
37094
|
+
animate,
|
|
37095
|
+
onShapeClick,
|
|
37096
|
+
isLoading,
|
|
37097
|
+
error
|
|
37098
|
+
}
|
|
37099
|
+
)
|
|
37100
|
+
] }) });
|
|
37101
|
+
};
|
|
37102
|
+
}
|
|
37103
|
+
});
|
|
37104
|
+
var PhysicsCanvas;
|
|
37105
|
+
var init_PhysicsCanvas = __esm({
|
|
37106
|
+
"components/learning/molecules/PhysicsCanvas.tsx"() {
|
|
37107
|
+
"use client";
|
|
37108
|
+
init_atoms();
|
|
37109
|
+
init_Stack();
|
|
37110
|
+
init_LearningCanvas();
|
|
37111
|
+
PhysicsCanvas = ({
|
|
37112
|
+
className,
|
|
37113
|
+
width = 600,
|
|
37114
|
+
height = 400,
|
|
37115
|
+
title,
|
|
37116
|
+
backgroundColor,
|
|
37117
|
+
bodies = [],
|
|
37118
|
+
constraints = [],
|
|
37119
|
+
showVelocity = true,
|
|
37120
|
+
showForces = false,
|
|
37121
|
+
velocityScale = 20,
|
|
37122
|
+
forceScale = 20,
|
|
37123
|
+
shapes = [],
|
|
37124
|
+
interactive = false,
|
|
37125
|
+
animate = false,
|
|
37126
|
+
onShapeClick,
|
|
37127
|
+
isLoading,
|
|
37128
|
+
error
|
|
37129
|
+
}) => {
|
|
37130
|
+
const derivedShapes = useMemo(() => {
|
|
37131
|
+
const out = [];
|
|
37132
|
+
const bodyById = /* @__PURE__ */ new Map();
|
|
37133
|
+
for (const b of bodies) {
|
|
37134
|
+
if (b.id) bodyById.set(b.id, b);
|
|
37135
|
+
}
|
|
37136
|
+
for (const c of constraints) {
|
|
37137
|
+
const a = bodyById.get(c.from);
|
|
37138
|
+
const b = bodyById.get(c.to);
|
|
37139
|
+
if (!a || !b) continue;
|
|
37140
|
+
out.push({
|
|
37141
|
+
type: "line",
|
|
37142
|
+
x1: a.x,
|
|
37143
|
+
y1: a.y,
|
|
37144
|
+
x2: b.x,
|
|
37145
|
+
y2: b.y,
|
|
37146
|
+
color: c.color ?? "#9ca3af",
|
|
37147
|
+
lineWidth: 2
|
|
37148
|
+
});
|
|
37149
|
+
}
|
|
37150
|
+
for (const b of bodies) {
|
|
37151
|
+
out.push({
|
|
37152
|
+
type: "circle",
|
|
37153
|
+
x: b.x,
|
|
37154
|
+
y: b.y,
|
|
37155
|
+
radius: b.radius ?? 12,
|
|
37156
|
+
color: b.color ?? "#2563eb",
|
|
37157
|
+
fill: b.color ?? "#2563eb",
|
|
37158
|
+
id: b.id
|
|
37159
|
+
});
|
|
37160
|
+
if (b.label) {
|
|
37161
|
+
out.push({
|
|
37162
|
+
type: "text",
|
|
37163
|
+
x: b.x + (b.radius ?? 12) + 6,
|
|
37164
|
+
y: b.y - (b.radius ?? 12) - 6,
|
|
37165
|
+
text: b.label,
|
|
37166
|
+
color: "#111827",
|
|
37167
|
+
fontSize: 12
|
|
37168
|
+
});
|
|
37169
|
+
}
|
|
37170
|
+
if (showVelocity && b.vx != null && b.vy != null && (b.vx !== 0 || b.vy !== 0)) {
|
|
37171
|
+
out.push({
|
|
37172
|
+
type: "arrow",
|
|
37173
|
+
x1: b.x,
|
|
37174
|
+
y1: b.y,
|
|
37175
|
+
x2: b.x + b.vx * velocityScale,
|
|
37176
|
+
y2: b.y + b.vy * velocityScale,
|
|
37177
|
+
color: "#16a34a",
|
|
37178
|
+
lineWidth: 2
|
|
37179
|
+
});
|
|
37180
|
+
}
|
|
37181
|
+
if (showForces && b.fx != null && b.fy != null && (b.fx !== 0 || b.fy !== 0)) {
|
|
37182
|
+
out.push({
|
|
37183
|
+
type: "arrow",
|
|
37184
|
+
x1: b.x,
|
|
37185
|
+
y1: b.y,
|
|
37186
|
+
x2: b.x + b.fx * forceScale,
|
|
37187
|
+
y2: b.y + b.fy * forceScale,
|
|
37188
|
+
color: "#dc2626",
|
|
37189
|
+
lineWidth: 2
|
|
37190
|
+
});
|
|
37191
|
+
}
|
|
37192
|
+
}
|
|
37193
|
+
out.push(...shapes);
|
|
37194
|
+
return out;
|
|
37195
|
+
}, [bodies, constraints, showVelocity, showForces, velocityScale, forceScale, shapes]);
|
|
37196
|
+
return /* @__PURE__ */ jsx(Card, { className, children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
37197
|
+
title ? /* @__PURE__ */ jsx(Typography, { variant: "h4", children: title }) : null,
|
|
37198
|
+
/* @__PURE__ */ jsx(
|
|
37199
|
+
LearningCanvas,
|
|
37200
|
+
{
|
|
37201
|
+
width,
|
|
37202
|
+
height,
|
|
37203
|
+
backgroundColor,
|
|
37204
|
+
shapes: derivedShapes,
|
|
37205
|
+
interactive,
|
|
37206
|
+
animate,
|
|
37207
|
+
onShapeClick,
|
|
37208
|
+
isLoading,
|
|
37209
|
+
error
|
|
37210
|
+
}
|
|
37211
|
+
)
|
|
37212
|
+
] }) });
|
|
37213
|
+
};
|
|
37214
|
+
}
|
|
37215
|
+
});
|
|
36551
37216
|
function resolveNodeColor(node, groups) {
|
|
36552
37217
|
if (node.color) return node.color;
|
|
36553
37218
|
if (node.group) {
|
|
@@ -36919,7 +37584,7 @@ var init_MapView = __esm({
|
|
|
36919
37584
|
shadowSize: [41, 41]
|
|
36920
37585
|
});
|
|
36921
37586
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
36922
|
-
const { useEffect: useEffect79, useRef: useRef78, useCallback: useCallback127, useState:
|
|
37587
|
+
const { useEffect: useEffect79, useRef: useRef78, useCallback: useCallback127, useState: useState118 } = React79__default;
|
|
36923
37588
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
36924
37589
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
36925
37590
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -36964,7 +37629,7 @@ var init_MapView = __esm({
|
|
|
36964
37629
|
showAttribution = true
|
|
36965
37630
|
}) {
|
|
36966
37631
|
const eventBus = useEventBus2();
|
|
36967
|
-
const [clickedPosition, setClickedPosition] =
|
|
37632
|
+
const [clickedPosition, setClickedPosition] = useState118(null);
|
|
36968
37633
|
const handleMapClick = useCallback127((lat, lng) => {
|
|
36969
37634
|
if (showClickedPin) {
|
|
36970
37635
|
setClickedPosition({ lat, lng });
|
|
@@ -37834,8 +38499,8 @@ function TableView({
|
|
|
37834
38499
|
}) {
|
|
37835
38500
|
const eventBus = useEventBus();
|
|
37836
38501
|
const { t } = useTranslate();
|
|
37837
|
-
const [visibleCount, setVisibleCount] =
|
|
37838
|
-
const [localSelected, setLocalSelected] =
|
|
38502
|
+
const [visibleCount, setVisibleCount] = React79__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
38503
|
+
const [localSelected, setLocalSelected] = React79__default.useState(/* @__PURE__ */ new Set());
|
|
37839
38504
|
const colDefs = columns ?? fields ?? [];
|
|
37840
38505
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
37841
38506
|
const dnd = useDataDnd({
|
|
@@ -38030,12 +38695,12 @@ function TableView({
|
|
|
38030
38695
|
]
|
|
38031
38696
|
}
|
|
38032
38697
|
);
|
|
38033
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
38698
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React79__default.Fragment, { children: rowInner }, id);
|
|
38034
38699
|
};
|
|
38035
38700
|
const items = Array.from(data);
|
|
38036
38701
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
38037
38702
|
let runningIndex = 0;
|
|
38038
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
38703
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
|
|
38039
38704
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
38040
38705
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
38041
38706
|
] }, gi)) });
|
|
@@ -39392,7 +40057,7 @@ var init_StepFlow = __esm({
|
|
|
39392
40057
|
className
|
|
39393
40058
|
}) => {
|
|
39394
40059
|
if (orientation === "vertical") {
|
|
39395
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
40060
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React79__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
39396
40061
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
39397
40062
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
39398
40063
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -39403,7 +40068,7 @@ var init_StepFlow = __esm({
|
|
|
39403
40068
|
] })
|
|
39404
40069
|
] }) }, index)) });
|
|
39405
40070
|
}
|
|
39406
|
-
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(
|
|
40071
|
+
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(React79__default.Fragment, { children: [
|
|
39407
40072
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
39408
40073
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
39409
40074
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -40388,7 +41053,7 @@ var init_LikertScale = __esm({
|
|
|
40388
41053
|
md: "text-base",
|
|
40389
41054
|
lg: "text-lg"
|
|
40390
41055
|
};
|
|
40391
|
-
LikertScale =
|
|
41056
|
+
LikertScale = React79__default.forwardRef(
|
|
40392
41057
|
({
|
|
40393
41058
|
question,
|
|
40394
41059
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -40400,7 +41065,7 @@ var init_LikertScale = __esm({
|
|
|
40400
41065
|
variant = "radios",
|
|
40401
41066
|
className
|
|
40402
41067
|
}, ref) => {
|
|
40403
|
-
const groupId =
|
|
41068
|
+
const groupId = React79__default.useId();
|
|
40404
41069
|
const eventBus = useEventBus();
|
|
40405
41070
|
const handleSelect = useCallback(
|
|
40406
41071
|
(next) => {
|
|
@@ -42682,7 +43347,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
42682
43347
|
"aria-label": t("aria.breadcrumb"),
|
|
42683
43348
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
42684
43349
|
const isLast = idx === items.length - 1;
|
|
42685
|
-
return /* @__PURE__ */ jsxs(
|
|
43350
|
+
return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
|
|
42686
43351
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
42687
43352
|
Icon,
|
|
42688
43353
|
{
|
|
@@ -43551,7 +44216,7 @@ var init_MiniStateMachine = __esm({
|
|
|
43551
44216
|
const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
|
|
43552
44217
|
const tc = transitionCounts[s.name] ?? 0;
|
|
43553
44218
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
43554
|
-
return /* @__PURE__ */ jsxs(
|
|
44219
|
+
return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
|
|
43555
44220
|
/* @__PURE__ */ jsx(
|
|
43556
44221
|
AvlState,
|
|
43557
44222
|
{
|
|
@@ -43755,7 +44420,7 @@ var init_PageHeader = __esm({
|
|
|
43755
44420
|
info: "bg-info/10 text-info"
|
|
43756
44421
|
};
|
|
43757
44422
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
43758
|
-
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(
|
|
44423
|
+
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(React79__default.Fragment, { children: [
|
|
43759
44424
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
43760
44425
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
43761
44426
|
"a",
|
|
@@ -44113,7 +44778,7 @@ var init_Section = __esm({
|
|
|
44113
44778
|
as: Component = "section"
|
|
44114
44779
|
}) => {
|
|
44115
44780
|
const hasHeader = title || description || action;
|
|
44116
|
-
return
|
|
44781
|
+
return React79__default.createElement(
|
|
44117
44782
|
Component,
|
|
44118
44783
|
{
|
|
44119
44784
|
className: cn(
|
|
@@ -44479,7 +45144,7 @@ var init_WizardContainer = __esm({
|
|
|
44479
45144
|
const isCompleted = index < currentStep;
|
|
44480
45145
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
44481
45146
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
44482
|
-
return /* @__PURE__ */ jsxs(
|
|
45147
|
+
return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
|
|
44483
45148
|
/* @__PURE__ */ jsx(
|
|
44484
45149
|
Button,
|
|
44485
45150
|
{
|
|
@@ -45377,7 +46042,7 @@ function getGroupColor(group, groups) {
|
|
|
45377
46042
|
const idx = groups.indexOf(group);
|
|
45378
46043
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
45379
46044
|
}
|
|
45380
|
-
function
|
|
46045
|
+
function resolveColor3(color, el) {
|
|
45381
46046
|
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
|
|
45382
46047
|
if (!m) return color;
|
|
45383
46048
|
const resolved = getComputedStyle(el).getPropertyValue(m[1]).trim();
|
|
@@ -45638,7 +46303,7 @@ var init_GraphCanvas = __esm({
|
|
|
45638
46303
|
const w = logicalW;
|
|
45639
46304
|
const h = height;
|
|
45640
46305
|
const nodes = nodesRef.current;
|
|
45641
|
-
const accentColor =
|
|
46306
|
+
const accentColor = resolveColor3("var(--color-accent)", canvas);
|
|
45642
46307
|
const dpr = typeof window !== "undefined" && window.devicePixelRatio || 1;
|
|
45643
46308
|
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
45644
46309
|
ctx.clearRect(0, 0, w, h);
|
|
@@ -45677,7 +46342,7 @@ var init_GraphCanvas = __esm({
|
|
|
45677
46342
|
ctx.globalAlpha = 1;
|
|
45678
46343
|
for (const node of nodes) {
|
|
45679
46344
|
const size = node.size || 8;
|
|
45680
|
-
const color =
|
|
46345
|
+
const color = resolveColor3(node.color || getGroupColor(node.group, groups), canvas);
|
|
45681
46346
|
const isHovered = hoveredNode === node.id;
|
|
45682
46347
|
const isSelected = selectedNodeId !== void 0 && node.id === selectedNodeId;
|
|
45683
46348
|
ctx.globalAlpha = hoveredNode && !neighbors.has(node.id) ? 0.2 : 1;
|
|
@@ -46111,6 +46776,10 @@ var init_molecules2 = __esm({
|
|
|
46111
46776
|
init_LineChart();
|
|
46112
46777
|
init_ProgressDots();
|
|
46113
46778
|
init_molecules();
|
|
46779
|
+
init_MathCanvas();
|
|
46780
|
+
init_PhysicsCanvas();
|
|
46781
|
+
init_BiologyCanvas();
|
|
46782
|
+
init_ChemistryCanvas();
|
|
46114
46783
|
init_GraphView();
|
|
46115
46784
|
init_MapView();
|
|
46116
46785
|
init_NumberStepper();
|
|
@@ -47124,7 +47793,7 @@ var init_DetailPanel = __esm({
|
|
|
47124
47793
|
}
|
|
47125
47794
|
});
|
|
47126
47795
|
function extractTitle(children) {
|
|
47127
|
-
if (!
|
|
47796
|
+
if (!React79__default.isValidElement(children)) return void 0;
|
|
47128
47797
|
const props = children.props;
|
|
47129
47798
|
if (typeof props.title === "string") {
|
|
47130
47799
|
return props.title;
|
|
@@ -47470,12 +48139,12 @@ var init_Form = __esm({
|
|
|
47470
48139
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
47471
48140
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
47472
48141
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
47473
|
-
const normalizedInitialData =
|
|
48142
|
+
const normalizedInitialData = React79__default.useMemo(() => {
|
|
47474
48143
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
47475
48144
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
47476
48145
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
47477
48146
|
}, [entity, initialData]);
|
|
47478
|
-
const entityDerivedFields =
|
|
48147
|
+
const entityDerivedFields = React79__default.useMemo(() => {
|
|
47479
48148
|
if (fields && fields.length > 0) return void 0;
|
|
47480
48149
|
if (!resolvedEntity) return void 0;
|
|
47481
48150
|
return resolvedEntity.fields.map(
|
|
@@ -47496,16 +48165,16 @@ var init_Form = __esm({
|
|
|
47496
48165
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
47497
48166
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
47498
48167
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
47499
|
-
const [formData, setFormData] =
|
|
48168
|
+
const [formData, setFormData] = React79__default.useState(
|
|
47500
48169
|
normalizedInitialData
|
|
47501
48170
|
);
|
|
47502
|
-
const [collapsedSections, setCollapsedSections] =
|
|
48171
|
+
const [collapsedSections, setCollapsedSections] = React79__default.useState(
|
|
47503
48172
|
/* @__PURE__ */ new Set()
|
|
47504
48173
|
);
|
|
47505
|
-
const [submitError, setSubmitError] =
|
|
47506
|
-
const formRef =
|
|
48174
|
+
const [submitError, setSubmitError] = React79__default.useState(null);
|
|
48175
|
+
const formRef = React79__default.useRef(null);
|
|
47507
48176
|
const formMode = props.mode;
|
|
47508
|
-
const mountedRef =
|
|
48177
|
+
const mountedRef = React79__default.useRef(false);
|
|
47509
48178
|
if (!mountedRef.current) {
|
|
47510
48179
|
mountedRef.current = true;
|
|
47511
48180
|
debug("forms", "mount", {
|
|
@@ -47518,7 +48187,7 @@ var init_Form = __esm({
|
|
|
47518
48187
|
});
|
|
47519
48188
|
}
|
|
47520
48189
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
47521
|
-
const evalContext =
|
|
48190
|
+
const evalContext = React79__default.useMemo(
|
|
47522
48191
|
() => ({
|
|
47523
48192
|
formValues: formData,
|
|
47524
48193
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -47527,7 +48196,7 @@ var init_Form = __esm({
|
|
|
47527
48196
|
}),
|
|
47528
48197
|
[formData, externalContext]
|
|
47529
48198
|
);
|
|
47530
|
-
|
|
48199
|
+
React79__default.useEffect(() => {
|
|
47531
48200
|
debug("forms", "initialData-sync", {
|
|
47532
48201
|
mode: formMode,
|
|
47533
48202
|
normalizedInitialData,
|
|
@@ -47538,7 +48207,7 @@ var init_Form = __esm({
|
|
|
47538
48207
|
setFormData(normalizedInitialData);
|
|
47539
48208
|
}
|
|
47540
48209
|
}, [normalizedInitialData]);
|
|
47541
|
-
const processCalculations =
|
|
48210
|
+
const processCalculations = React79__default.useCallback(
|
|
47542
48211
|
(changedFieldId, newFormData) => {
|
|
47543
48212
|
if (!hiddenCalculations.length) return;
|
|
47544
48213
|
const context = {
|
|
@@ -47563,7 +48232,7 @@ var init_Form = __esm({
|
|
|
47563
48232
|
},
|
|
47564
48233
|
[hiddenCalculations, externalContext, eventBus]
|
|
47565
48234
|
);
|
|
47566
|
-
const checkViolations =
|
|
48235
|
+
const checkViolations = React79__default.useCallback(
|
|
47567
48236
|
(changedFieldId, newFormData) => {
|
|
47568
48237
|
if (!violationTriggers.length) return;
|
|
47569
48238
|
const context = {
|
|
@@ -47601,7 +48270,7 @@ var init_Form = __esm({
|
|
|
47601
48270
|
processCalculations(name, newFormData);
|
|
47602
48271
|
checkViolations(name, newFormData);
|
|
47603
48272
|
};
|
|
47604
|
-
const isFieldVisible =
|
|
48273
|
+
const isFieldVisible = React79__default.useCallback(
|
|
47605
48274
|
(fieldName) => {
|
|
47606
48275
|
const condition = conditionalFields[fieldName];
|
|
47607
48276
|
if (!condition) return true;
|
|
@@ -47609,7 +48278,7 @@ var init_Form = __esm({
|
|
|
47609
48278
|
},
|
|
47610
48279
|
[conditionalFields, evalContext]
|
|
47611
48280
|
);
|
|
47612
|
-
const isSectionVisible =
|
|
48281
|
+
const isSectionVisible = React79__default.useCallback(
|
|
47613
48282
|
(section) => {
|
|
47614
48283
|
if (!section.condition) return true;
|
|
47615
48284
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -47685,7 +48354,7 @@ var init_Form = __esm({
|
|
|
47685
48354
|
eventBus.emit(`UI:${onCancel}`);
|
|
47686
48355
|
}
|
|
47687
48356
|
};
|
|
47688
|
-
const renderField =
|
|
48357
|
+
const renderField = React79__default.useCallback(
|
|
47689
48358
|
(field) => {
|
|
47690
48359
|
const fieldName = field.name || field.field;
|
|
47691
48360
|
if (!fieldName) return null;
|
|
@@ -47706,7 +48375,7 @@ var init_Form = __esm({
|
|
|
47706
48375
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
47707
48376
|
);
|
|
47708
48377
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
47709
|
-
const normalizedFields =
|
|
48378
|
+
const normalizedFields = React79__default.useMemo(() => {
|
|
47710
48379
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
47711
48380
|
return effectiveFields.map((field) => {
|
|
47712
48381
|
if (typeof field === "string") {
|
|
@@ -47730,7 +48399,7 @@ var init_Form = __esm({
|
|
|
47730
48399
|
return field;
|
|
47731
48400
|
});
|
|
47732
48401
|
}, [effectiveFields, resolvedEntity]);
|
|
47733
|
-
const schemaFields =
|
|
48402
|
+
const schemaFields = React79__default.useMemo(() => {
|
|
47734
48403
|
if (normalizedFields.length === 0) return null;
|
|
47735
48404
|
if (isDebugEnabled()) {
|
|
47736
48405
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -47740,7 +48409,7 @@ var init_Form = __esm({
|
|
|
47740
48409
|
}
|
|
47741
48410
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
47742
48411
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
47743
|
-
const sectionElements =
|
|
48412
|
+
const sectionElements = React79__default.useMemo(() => {
|
|
47744
48413
|
if (!sections || sections.length === 0) return null;
|
|
47745
48414
|
return sections.map((section) => {
|
|
47746
48415
|
if (!isSectionVisible(section)) {
|
|
@@ -48465,7 +49134,7 @@ var init_List = __esm({
|
|
|
48465
49134
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
48466
49135
|
return [];
|
|
48467
49136
|
}, [entity]);
|
|
48468
|
-
const getItemActions =
|
|
49137
|
+
const getItemActions = React79__default.useCallback(
|
|
48469
49138
|
(item) => {
|
|
48470
49139
|
if (!itemActions) return [];
|
|
48471
49140
|
if (typeof itemActions === "function") {
|
|
@@ -48940,7 +49609,7 @@ var init_MediaGallery = __esm({
|
|
|
48940
49609
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
48941
49610
|
);
|
|
48942
49611
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
48943
|
-
const items =
|
|
49612
|
+
const items = React79__default.useMemo(() => {
|
|
48944
49613
|
if (propItems) return propItems;
|
|
48945
49614
|
if (entityData.length === 0) return [];
|
|
48946
49615
|
return entityData.map((record, idx) => {
|
|
@@ -49103,7 +49772,7 @@ var init_MediaGallery = __esm({
|
|
|
49103
49772
|
}
|
|
49104
49773
|
});
|
|
49105
49774
|
function extractTitle2(children) {
|
|
49106
|
-
if (!
|
|
49775
|
+
if (!React79__default.isValidElement(children)) return void 0;
|
|
49107
49776
|
const props = children.props;
|
|
49108
49777
|
if (typeof props.title === "string") {
|
|
49109
49778
|
return props.title;
|
|
@@ -49354,7 +50023,7 @@ var init_debugRegistry = __esm({
|
|
|
49354
50023
|
}
|
|
49355
50024
|
});
|
|
49356
50025
|
function useDebugData() {
|
|
49357
|
-
const [data, setData] =
|
|
50026
|
+
const [data, setData] = React79.useState(() => ({
|
|
49358
50027
|
traits: [],
|
|
49359
50028
|
ticks: [],
|
|
49360
50029
|
guards: [],
|
|
@@ -49368,7 +50037,7 @@ function useDebugData() {
|
|
|
49368
50037
|
},
|
|
49369
50038
|
lastUpdate: Date.now()
|
|
49370
50039
|
}));
|
|
49371
|
-
|
|
50040
|
+
React79.useEffect(() => {
|
|
49372
50041
|
const updateData = () => {
|
|
49373
50042
|
setData({
|
|
49374
50043
|
traits: getAllTraits(),
|
|
@@ -49477,12 +50146,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
49477
50146
|
return positions;
|
|
49478
50147
|
}
|
|
49479
50148
|
function WalkMinimap() {
|
|
49480
|
-
const [walkStep, setWalkStep] =
|
|
49481
|
-
const [traits2, setTraits] =
|
|
49482
|
-
const [coveredEdges, setCoveredEdges] =
|
|
49483
|
-
const [completedTraits, setCompletedTraits] =
|
|
49484
|
-
const prevTraitRef =
|
|
49485
|
-
|
|
50149
|
+
const [walkStep, setWalkStep] = React79.useState(null);
|
|
50150
|
+
const [traits2, setTraits] = React79.useState([]);
|
|
50151
|
+
const [coveredEdges, setCoveredEdges] = React79.useState([]);
|
|
50152
|
+
const [completedTraits, setCompletedTraits] = React79.useState(/* @__PURE__ */ new Set());
|
|
50153
|
+
const prevTraitRef = React79.useRef(null);
|
|
50154
|
+
React79.useEffect(() => {
|
|
49486
50155
|
const interval = setInterval(() => {
|
|
49487
50156
|
const w = window;
|
|
49488
50157
|
const step = w.__orbitalWalkStep;
|
|
@@ -49918,15 +50587,15 @@ var init_EntitiesTab = __esm({
|
|
|
49918
50587
|
});
|
|
49919
50588
|
function EventFlowTab({ events: events2 }) {
|
|
49920
50589
|
const { t } = useTranslate();
|
|
49921
|
-
const [filter, setFilter] =
|
|
49922
|
-
const containerRef =
|
|
49923
|
-
const [autoScroll, setAutoScroll] =
|
|
49924
|
-
|
|
50590
|
+
const [filter, setFilter] = React79.useState("all");
|
|
50591
|
+
const containerRef = React79.useRef(null);
|
|
50592
|
+
const [autoScroll, setAutoScroll] = React79.useState(true);
|
|
50593
|
+
React79.useEffect(() => {
|
|
49925
50594
|
if (autoScroll && containerRef.current) {
|
|
49926
50595
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
49927
50596
|
}
|
|
49928
50597
|
}, [events2.length, autoScroll]);
|
|
49929
|
-
const filteredEvents =
|
|
50598
|
+
const filteredEvents = React79.useMemo(() => {
|
|
49930
50599
|
if (filter === "all") return events2;
|
|
49931
50600
|
return events2.filter((e) => e.type === filter);
|
|
49932
50601
|
}, [events2, filter]);
|
|
@@ -50042,7 +50711,7 @@ var init_EventFlowTab = __esm({
|
|
|
50042
50711
|
});
|
|
50043
50712
|
function GuardsPanel({ guards }) {
|
|
50044
50713
|
const { t } = useTranslate();
|
|
50045
|
-
const [filter, setFilter] =
|
|
50714
|
+
const [filter, setFilter] = React79.useState("all");
|
|
50046
50715
|
if (guards.length === 0) {
|
|
50047
50716
|
return /* @__PURE__ */ jsx(
|
|
50048
50717
|
EmptyState,
|
|
@@ -50055,7 +50724,7 @@ function GuardsPanel({ guards }) {
|
|
|
50055
50724
|
}
|
|
50056
50725
|
const passedCount = guards.filter((g) => g.result).length;
|
|
50057
50726
|
const failedCount = guards.length - passedCount;
|
|
50058
|
-
const filteredGuards =
|
|
50727
|
+
const filteredGuards = React79.useMemo(() => {
|
|
50059
50728
|
if (filter === "all") return guards;
|
|
50060
50729
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
50061
50730
|
return guards.filter((g) => !g.result);
|
|
@@ -50218,10 +50887,10 @@ function EffectBadge({ effect }) {
|
|
|
50218
50887
|
}
|
|
50219
50888
|
function TransitionTimeline({ transitions }) {
|
|
50220
50889
|
const { t } = useTranslate();
|
|
50221
|
-
const containerRef =
|
|
50222
|
-
const [autoScroll, setAutoScroll] =
|
|
50223
|
-
const [expandedId, setExpandedId] =
|
|
50224
|
-
|
|
50890
|
+
const containerRef = React79.useRef(null);
|
|
50891
|
+
const [autoScroll, setAutoScroll] = React79.useState(true);
|
|
50892
|
+
const [expandedId, setExpandedId] = React79.useState(null);
|
|
50893
|
+
React79.useEffect(() => {
|
|
50225
50894
|
if (autoScroll && containerRef.current) {
|
|
50226
50895
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
50227
50896
|
}
|
|
@@ -50501,9 +51170,9 @@ function getAllEvents(traits2) {
|
|
|
50501
51170
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
50502
51171
|
const eventBus = useEventBus();
|
|
50503
51172
|
const { t } = useTranslate();
|
|
50504
|
-
const [log18, setLog] =
|
|
50505
|
-
const prevStatesRef =
|
|
50506
|
-
|
|
51173
|
+
const [log18, setLog] = React79.useState([]);
|
|
51174
|
+
const prevStatesRef = React79.useRef(/* @__PURE__ */ new Map());
|
|
51175
|
+
React79.useEffect(() => {
|
|
50507
51176
|
for (const trait of traits2) {
|
|
50508
51177
|
const prev = prevStatesRef.current.get(trait.id);
|
|
50509
51178
|
if (prev && prev !== trait.currentState) {
|
|
@@ -50672,10 +51341,10 @@ function VerifyModePanel({
|
|
|
50672
51341
|
localCount
|
|
50673
51342
|
}) {
|
|
50674
51343
|
const { t } = useTranslate();
|
|
50675
|
-
const [expanded, setExpanded] =
|
|
50676
|
-
const scrollRef =
|
|
50677
|
-
const prevCountRef =
|
|
50678
|
-
|
|
51344
|
+
const [expanded, setExpanded] = React79.useState(true);
|
|
51345
|
+
const scrollRef = React79.useRef(null);
|
|
51346
|
+
const prevCountRef = React79.useRef(0);
|
|
51347
|
+
React79.useEffect(() => {
|
|
50679
51348
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
50680
51349
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
50681
51350
|
}
|
|
@@ -50732,10 +51401,10 @@ function RuntimeDebugger({
|
|
|
50732
51401
|
schema
|
|
50733
51402
|
}) {
|
|
50734
51403
|
const { t } = useTranslate();
|
|
50735
|
-
const [isCollapsed, setIsCollapsed] =
|
|
50736
|
-
const [isVisible, setIsVisible] =
|
|
51404
|
+
const [isCollapsed, setIsCollapsed] = React79.useState(mode === "verify" ? true : defaultCollapsed);
|
|
51405
|
+
const [isVisible, setIsVisible] = React79.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
50737
51406
|
const debugData = useDebugData();
|
|
50738
|
-
|
|
51407
|
+
React79.useEffect(() => {
|
|
50739
51408
|
if (mode === "inline") return;
|
|
50740
51409
|
return onDebugToggle((enabled) => {
|
|
50741
51410
|
setIsVisible(enabled);
|
|
@@ -50744,7 +51413,7 @@ function RuntimeDebugger({
|
|
|
50744
51413
|
}
|
|
50745
51414
|
});
|
|
50746
51415
|
}, [mode]);
|
|
50747
|
-
|
|
51416
|
+
React79.useEffect(() => {
|
|
50748
51417
|
if (mode === "inline") return;
|
|
50749
51418
|
const handleKeyDown = (e) => {
|
|
50750
51419
|
if (e.key === "`" && isVisible) {
|
|
@@ -51264,7 +51933,7 @@ var init_StatCard = __esm({
|
|
|
51264
51933
|
const labelToUse = propLabel ?? propTitle;
|
|
51265
51934
|
const eventBus = useEventBus();
|
|
51266
51935
|
const { t } = useTranslate();
|
|
51267
|
-
const handleActionClick =
|
|
51936
|
+
const handleActionClick = React79__default.useCallback(() => {
|
|
51268
51937
|
if (action?.event) {
|
|
51269
51938
|
eventBus.emit(`UI:${action.event}`, {});
|
|
51270
51939
|
}
|
|
@@ -51275,7 +51944,7 @@ var init_StatCard = __esm({
|
|
|
51275
51944
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
51276
51945
|
const isLoading = externalLoading ?? false;
|
|
51277
51946
|
const error = externalError;
|
|
51278
|
-
const computeMetricValue =
|
|
51947
|
+
const computeMetricValue = React79__default.useCallback(
|
|
51279
51948
|
(metric, items) => {
|
|
51280
51949
|
if (metric.value !== void 0) {
|
|
51281
51950
|
return metric.value;
|
|
@@ -51314,7 +51983,7 @@ var init_StatCard = __esm({
|
|
|
51314
51983
|
},
|
|
51315
51984
|
[]
|
|
51316
51985
|
);
|
|
51317
|
-
const schemaStats =
|
|
51986
|
+
const schemaStats = React79__default.useMemo(() => {
|
|
51318
51987
|
if (!metrics || metrics.length === 0) return null;
|
|
51319
51988
|
return metrics.map((metric) => ({
|
|
51320
51989
|
label: metric.label,
|
|
@@ -51322,7 +51991,7 @@ var init_StatCard = __esm({
|
|
|
51322
51991
|
format: metric.format
|
|
51323
51992
|
}));
|
|
51324
51993
|
}, [metrics, data, computeMetricValue]);
|
|
51325
|
-
const calculatedTrend =
|
|
51994
|
+
const calculatedTrend = React79__default.useMemo(() => {
|
|
51326
51995
|
if (manualTrend !== void 0) return manualTrend;
|
|
51327
51996
|
if (previousValue === void 0 || currentValue2 === void 0)
|
|
51328
51997
|
return void 0;
|
|
@@ -51962,8 +52631,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
51962
52631
|
] });
|
|
51963
52632
|
};
|
|
51964
52633
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
51965
|
-
const endRef =
|
|
51966
|
-
|
|
52634
|
+
const endRef = React79__default.useRef(null);
|
|
52635
|
+
React79__default.useEffect(() => {
|
|
51967
52636
|
if (!autoScroll) return;
|
|
51968
52637
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51969
52638
|
}, [activities.length, autoScroll]);
|
|
@@ -52057,7 +52726,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
52057
52726
|
};
|
|
52058
52727
|
SubagentRichCard = ({ subagent }) => {
|
|
52059
52728
|
const { t } = useTranslate();
|
|
52060
|
-
const activities =
|
|
52729
|
+
const activities = React79__default.useMemo(
|
|
52061
52730
|
() => subagentMessagesToActivities(subagent.messages),
|
|
52062
52731
|
[subagent.messages]
|
|
52063
52732
|
);
|
|
@@ -52134,8 +52803,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
52134
52803
|
] });
|
|
52135
52804
|
};
|
|
52136
52805
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
52137
|
-
const endRef =
|
|
52138
|
-
|
|
52806
|
+
const endRef = React79__default.useRef(null);
|
|
52807
|
+
React79__default.useEffect(() => {
|
|
52139
52808
|
if (!autoScroll) return;
|
|
52140
52809
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
52141
52810
|
}, [messages.length, autoScroll]);
|
|
@@ -52565,7 +53234,7 @@ var init_Timeline = __esm({
|
|
|
52565
53234
|
}) => {
|
|
52566
53235
|
const { t } = useTranslate();
|
|
52567
53236
|
const entityData = entity ?? [];
|
|
52568
|
-
const items =
|
|
53237
|
+
const items = React79__default.useMemo(() => {
|
|
52569
53238
|
if (propItems) return propItems;
|
|
52570
53239
|
if (entityData.length === 0) return [];
|
|
52571
53240
|
return entityData.map((record, idx) => {
|
|
@@ -52667,7 +53336,7 @@ var init_Timeline = __esm({
|
|
|
52667
53336
|
}
|
|
52668
53337
|
});
|
|
52669
53338
|
function extractToastProps(children) {
|
|
52670
|
-
if (!
|
|
53339
|
+
if (!React79__default.isValidElement(children)) {
|
|
52671
53340
|
if (typeof children === "string") {
|
|
52672
53341
|
return { message: children };
|
|
52673
53342
|
}
|
|
@@ -52705,7 +53374,7 @@ var init_ToastSlot = __esm({
|
|
|
52705
53374
|
eventBus.emit("UI:CLOSE");
|
|
52706
53375
|
};
|
|
52707
53376
|
if (!isVisible) return null;
|
|
52708
|
-
const isCustomContent =
|
|
53377
|
+
const isCustomContent = React79__default.isValidElement(children) && !message;
|
|
52709
53378
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
52710
53379
|
Toast,
|
|
52711
53380
|
{
|
|
@@ -52722,7 +53391,7 @@ var init_ToastSlot = __esm({
|
|
|
52722
53391
|
}
|
|
52723
53392
|
});
|
|
52724
53393
|
function lazyThree(name, loader) {
|
|
52725
|
-
const Lazy =
|
|
53394
|
+
const Lazy = React79__default.lazy(
|
|
52726
53395
|
() => loader().then((m) => {
|
|
52727
53396
|
const Resolved = m[name];
|
|
52728
53397
|
if (!Resolved) {
|
|
@@ -52734,13 +53403,13 @@ function lazyThree(name, loader) {
|
|
|
52734
53403
|
})
|
|
52735
53404
|
);
|
|
52736
53405
|
function ThreeWrapper(props) {
|
|
52737
|
-
return
|
|
53406
|
+
return React79__default.createElement(
|
|
52738
53407
|
ThreeBoundary,
|
|
52739
53408
|
{ name },
|
|
52740
|
-
|
|
52741
|
-
|
|
53409
|
+
React79__default.createElement(
|
|
53410
|
+
React79__default.Suspense,
|
|
52742
53411
|
{ fallback: null },
|
|
52743
|
-
|
|
53412
|
+
React79__default.createElement(Lazy, props)
|
|
52744
53413
|
)
|
|
52745
53414
|
);
|
|
52746
53415
|
}
|
|
@@ -52757,7 +53426,7 @@ var init_component_registry_generated = __esm({
|
|
|
52757
53426
|
init_ActionTile();
|
|
52758
53427
|
init_ActivationBlock();
|
|
52759
53428
|
init_ComponentPatterns();
|
|
52760
|
-
|
|
53429
|
+
init_AnimatedCounter();
|
|
52761
53430
|
init_AnimatedGraphic();
|
|
52762
53431
|
init_AnimatedReveal();
|
|
52763
53432
|
init_ArticleSection();
|
|
@@ -52768,6 +53437,7 @@ var init_component_registry_generated = __esm({
|
|
|
52768
53437
|
init_BattleBoard();
|
|
52769
53438
|
init_BattleTemplate();
|
|
52770
53439
|
init_BehaviorView();
|
|
53440
|
+
init_BiologyCanvas();
|
|
52771
53441
|
init_BloomQuizBlock();
|
|
52772
53442
|
init_BoardgameBoard();
|
|
52773
53443
|
init_BookChapterView();
|
|
@@ -52779,7 +53449,6 @@ var init_component_registry_generated = __esm({
|
|
|
52779
53449
|
init_BranchingLogicBuilder();
|
|
52780
53450
|
init_Breadcrumb();
|
|
52781
53451
|
init_BuilderBoard();
|
|
52782
|
-
init_ButtonGroup();
|
|
52783
53452
|
init_CTABanner();
|
|
52784
53453
|
init_CalendarGrid();
|
|
52785
53454
|
init_Canvas2D();
|
|
@@ -52798,6 +53467,7 @@ var init_component_registry_generated = __esm({
|
|
|
52798
53467
|
init_ChartLegend();
|
|
52799
53468
|
init_ChatBar();
|
|
52800
53469
|
init_Checkbox();
|
|
53470
|
+
init_ChemistryCanvas();
|
|
52801
53471
|
init_ChoiceButton();
|
|
52802
53472
|
init_CityBuilderBoard();
|
|
52803
53473
|
init_CityBuilderTemplate();
|
|
@@ -52856,9 +53526,9 @@ var init_component_registry_generated = __esm({
|
|
|
52856
53526
|
init_FlipContainer();
|
|
52857
53527
|
init_FloatingActionButton();
|
|
52858
53528
|
init_Form();
|
|
53529
|
+
init_FormSection();
|
|
52859
53530
|
init_FormField();
|
|
52860
53531
|
init_FormSectionHeader();
|
|
52861
|
-
init_GameAudioProvider();
|
|
52862
53532
|
init_GameAudioToggle();
|
|
52863
53533
|
init_GameCard();
|
|
52864
53534
|
init_GameHud();
|
|
@@ -52889,6 +53559,7 @@ var init_component_registry_generated = __esm({
|
|
|
52889
53559
|
init_JazariStateMachine();
|
|
52890
53560
|
init_LandingPageTemplate();
|
|
52891
53561
|
init_LawReferenceTooltip();
|
|
53562
|
+
init_LearningCanvas();
|
|
52892
53563
|
init_Lightbox();
|
|
52893
53564
|
init_LikertScale();
|
|
52894
53565
|
init_LineChart();
|
|
@@ -52897,9 +53568,11 @@ var init_component_registry_generated = __esm({
|
|
|
52897
53568
|
init_MapView();
|
|
52898
53569
|
init_MarkdownContent();
|
|
52899
53570
|
init_MarketingFooter();
|
|
53571
|
+
init_MarketingStatCard();
|
|
52900
53572
|
init_MasterDetail();
|
|
52901
53573
|
init_MasterDetailLayout();
|
|
52902
53574
|
init_MatchPuzzleBoard();
|
|
53575
|
+
init_MathCanvas();
|
|
52903
53576
|
init_MatrixQuestion();
|
|
52904
53577
|
init_MediaGallery();
|
|
52905
53578
|
init_Menu();
|
|
@@ -52918,6 +53591,7 @@ var init_component_registry_generated = __esm({
|
|
|
52918
53591
|
init_PageHeader();
|
|
52919
53592
|
init_Pagination();
|
|
52920
53593
|
init_PatternTile();
|
|
53594
|
+
init_PhysicsCanvas();
|
|
52921
53595
|
init_PinballBoard();
|
|
52922
53596
|
init_PirateBoard();
|
|
52923
53597
|
init_PlatformerBoard();
|
|
@@ -53047,7 +53721,7 @@ var init_component_registry_generated = __esm({
|
|
|
53047
53721
|
init_WizardProgress();
|
|
53048
53722
|
init_WorldMapBoard();
|
|
53049
53723
|
init_WorldMapTemplate();
|
|
53050
|
-
ThreeBoundary = class extends
|
|
53724
|
+
ThreeBoundary = class extends React79__default.Component {
|
|
53051
53725
|
constructor() {
|
|
53052
53726
|
super(...arguments);
|
|
53053
53727
|
__publicField(this, "state", { failed: false });
|
|
@@ -53057,7 +53731,7 @@ var init_component_registry_generated = __esm({
|
|
|
53057
53731
|
}
|
|
53058
53732
|
render() {
|
|
53059
53733
|
if (this.state.failed) {
|
|
53060
|
-
return
|
|
53734
|
+
return React79__default.createElement(
|
|
53061
53735
|
"div",
|
|
53062
53736
|
{
|
|
53063
53737
|
"data-testid": "three-unavailable",
|
|
@@ -53083,7 +53757,7 @@ var init_component_registry_generated = __esm({
|
|
|
53083
53757
|
"ActivationBlock": ActivationBlock,
|
|
53084
53758
|
"Alert": AlertPattern,
|
|
53085
53759
|
"AlertPattern": AlertPattern,
|
|
53086
|
-
"AnimatedCounter":
|
|
53760
|
+
"AnimatedCounter": AnimatedCounter,
|
|
53087
53761
|
"AnimatedGraphic": AnimatedGraphic,
|
|
53088
53762
|
"AnimatedReveal": AnimatedReveal,
|
|
53089
53763
|
"ArticleSection": ArticleSection,
|
|
@@ -53094,6 +53768,7 @@ var init_component_registry_generated = __esm({
|
|
|
53094
53768
|
"BattleBoard": BattleBoard,
|
|
53095
53769
|
"BattleTemplate": BattleTemplate,
|
|
53096
53770
|
"BehaviorView": BehaviorView,
|
|
53771
|
+
"BiologyCanvas": BiologyCanvas,
|
|
53097
53772
|
"BloomQuizBlock": BloomQuizBlock,
|
|
53098
53773
|
"BoardgameBoard": BoardgameBoard,
|
|
53099
53774
|
"BookChapterView": BookChapterView,
|
|
@@ -53107,7 +53782,6 @@ var init_component_registry_generated = __esm({
|
|
|
53107
53782
|
"Breadcrumb": Breadcrumb,
|
|
53108
53783
|
"BuilderBoard": BuilderBoard,
|
|
53109
53784
|
"Button": ButtonPattern,
|
|
53110
|
-
"ButtonGroup": ButtonGroup,
|
|
53111
53785
|
"ButtonPattern": ButtonPattern,
|
|
53112
53786
|
"CTABanner": CTABanner,
|
|
53113
53787
|
"CalendarGrid": CalendarGrid,
|
|
@@ -53127,6 +53801,7 @@ var init_component_registry_generated = __esm({
|
|
|
53127
53801
|
"ChartLegend": ChartLegend,
|
|
53128
53802
|
"ChatBar": ChatBar,
|
|
53129
53803
|
"Checkbox": Checkbox,
|
|
53804
|
+
"ChemistryCanvas": ChemistryCanvas,
|
|
53130
53805
|
"ChoiceButton": ChoiceButton,
|
|
53131
53806
|
"CityBuilderBoard": CityBuilderBoard,
|
|
53132
53807
|
"CityBuilderTemplate": CityBuilderTemplate,
|
|
@@ -53187,9 +53862,10 @@ var init_component_registry_generated = __esm({
|
|
|
53187
53862
|
"FlipContainer": FlipContainer,
|
|
53188
53863
|
"FloatingActionButton": FloatingActionButton,
|
|
53189
53864
|
"Form": Form,
|
|
53865
|
+
"FormActions": FormActions,
|
|
53190
53866
|
"FormField": FormField,
|
|
53867
|
+
"FormLayout": FormLayout,
|
|
53191
53868
|
"FormSectionHeader": FormSectionHeader,
|
|
53192
|
-
"GameAudioProvider": GameAudioProvider,
|
|
53193
53869
|
"GameAudioToggle": GameAudioToggle,
|
|
53194
53870
|
"GameBoard3D": GameBoard3D,
|
|
53195
53871
|
"GameCanvas3D": GameCanvas3D,
|
|
@@ -53227,6 +53903,7 @@ var init_component_registry_generated = __esm({
|
|
|
53227
53903
|
"LabelPattern": LabelPattern,
|
|
53228
53904
|
"LandingPageTemplate": LandingPageTemplate,
|
|
53229
53905
|
"LawReferenceTooltip": LawReferenceTooltip,
|
|
53906
|
+
"LearningCanvas": LearningCanvas,
|
|
53230
53907
|
"Lightbox": Lightbox,
|
|
53231
53908
|
"LikertScale": LikertScale,
|
|
53232
53909
|
"LineChart": LineChart2,
|
|
@@ -53235,9 +53912,11 @@ var init_component_registry_generated = __esm({
|
|
|
53235
53912
|
"MapView": MapView,
|
|
53236
53913
|
"MarkdownContent": MarkdownContent,
|
|
53237
53914
|
"MarketingFooter": MarketingFooter,
|
|
53915
|
+
"MarketingStatCard": MarketingStatCard,
|
|
53238
53916
|
"MasterDetail": MasterDetail,
|
|
53239
53917
|
"MasterDetailLayout": MasterDetailLayout,
|
|
53240
53918
|
"MatchPuzzleBoard": MatchPuzzleBoard,
|
|
53919
|
+
"MathCanvas": MathCanvas,
|
|
53241
53920
|
"MatrixQuestion": MatrixQuestion,
|
|
53242
53921
|
"MediaGallery": MediaGallery,
|
|
53243
53922
|
"Menu": Menu,
|
|
@@ -53256,6 +53935,7 @@ var init_component_registry_generated = __esm({
|
|
|
53256
53935
|
"PageHeader": PageHeader,
|
|
53257
53936
|
"Pagination": Pagination,
|
|
53258
53937
|
"PatternTile": PatternTile,
|
|
53938
|
+
"PhysicsCanvas": PhysicsCanvas,
|
|
53259
53939
|
"PinballBoard": PinballBoard,
|
|
53260
53940
|
"PirateBoard": PirateBoard,
|
|
53261
53941
|
"PlatformerBoard": PlatformerBoard,
|
|
@@ -53407,7 +54087,7 @@ function SuspenseConfigProvider({
|
|
|
53407
54087
|
config,
|
|
53408
54088
|
children
|
|
53409
54089
|
}) {
|
|
53410
|
-
return
|
|
54090
|
+
return React79__default.createElement(
|
|
53411
54091
|
SuspenseConfigContext.Provider,
|
|
53412
54092
|
{ value: config },
|
|
53413
54093
|
children
|
|
@@ -53449,7 +54129,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
53449
54129
|
}
|
|
53450
54130
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
53451
54131
|
}
|
|
53452
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
54132
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React79__default.isValidElement(field) && !(field instanceof Date)) {
|
|
53453
54133
|
const obj = field;
|
|
53454
54134
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
53455
54135
|
if (!fieldName) return field;
|
|
@@ -53895,7 +54575,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
53895
54575
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
53896
54576
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
53897
54577
|
}
|
|
53898
|
-
return /* @__PURE__ */ jsx(
|
|
54578
|
+
return /* @__PURE__ */ jsx(React79__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
53899
54579
|
}
|
|
53900
54580
|
if (!child || typeof child !== "object") return null;
|
|
53901
54581
|
const childId = `${parentId}-${index}`;
|
|
@@ -53935,14 +54615,14 @@ function isPatternConfig(value) {
|
|
|
53935
54615
|
if (value === null || value === void 0) return false;
|
|
53936
54616
|
if (typeof value !== "object") return false;
|
|
53937
54617
|
if (Array.isArray(value)) return false;
|
|
53938
|
-
if (
|
|
54618
|
+
if (React79__default.isValidElement(value)) return false;
|
|
53939
54619
|
if (value instanceof Date) return false;
|
|
53940
54620
|
if (typeof value === "function") return false;
|
|
53941
54621
|
const record = value;
|
|
53942
54622
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
53943
54623
|
}
|
|
53944
54624
|
function isPlainConfigObject(value) {
|
|
53945
|
-
if (
|
|
54625
|
+
if (React79__default.isValidElement(value)) return false;
|
|
53946
54626
|
if (value instanceof Date) return false;
|
|
53947
54627
|
const proto = Object.getPrototypeOf(value);
|
|
53948
54628
|
return proto === Object.prototype || proto === null;
|
|
@@ -54068,7 +54748,7 @@ function SlotContentRenderer({
|
|
|
54068
54748
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
54069
54749
|
const slotVal = restProps[slotKey];
|
|
54070
54750
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
54071
|
-
if (
|
|
54751
|
+
if (React79__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
54072
54752
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
54073
54753
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
54074
54754
|
slotVal,
|
|
@@ -54117,7 +54797,7 @@ function SlotContentRenderer({
|
|
|
54117
54797
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
54118
54798
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
54119
54799
|
const sample = resolvedItems[0];
|
|
54120
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
54800
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React79__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
54121
54801
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
54122
54802
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
54123
54803
|
}
|
|
@@ -54413,6 +55093,7 @@ var init_atoms = __esm({
|
|
|
54413
55093
|
init_AnimatedGraphic();
|
|
54414
55094
|
init_TraitFrame();
|
|
54415
55095
|
init_molecules();
|
|
55096
|
+
init_LearningCanvas();
|
|
54416
55097
|
}
|
|
54417
55098
|
});
|
|
54418
55099
|
|
|
@@ -56616,4 +57297,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
|
|
|
56616
57297
|
});
|
|
56617
57298
|
}
|
|
56618
57299
|
|
|
56619
|
-
export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BloomQuizBlock, BoardgameBoard, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas2D, CanvasEffect, Card, CardBattlerBoard, CardBattlerTemplate, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, ChatBar, Checkbox, ChoiceButton, CityBuilderBoard, CityBuilderTemplate, ClassifierBoard, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EMPTY_EFFECT_STATE, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, FishingBoard, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCard, GameHud, GameIcon, GameMenu, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, HexStrategyBoard, HolidayRunnerBoard, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, ItemSlot, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MatchPuzzleBoard, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, MinigolfBoard, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NodeSlotEditor, NotifyListener, NumberStepper, ObjectRulePanel, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PinballBoard, PirateBoard, PlatformerBoard, PlatformerTemplate, Popover, PositionedCanvas, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, RacingBoard, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RoguelikeBoard, RoguelikeTemplate, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SokobanBoard, SortableList, SpaceShmupBoard, SpaceStationBoard, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, SportsBoard, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TanksBoard, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TopDownShooterBoard, TopDownShooterTemplate, TowerDefenseBoard, TowerDefenseTemplate, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VisualNovelBoard, VisualNovelTemplate, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createCombatPresets, createInitialGameState, createTranslate, createUnitAnimationState, drawEffectState, drawSprite, drawTintedImage, getAllEffectSpriteUrls, getCurrentFrame, getTileDimensions, hasActiveEffects, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, screenToIso, spawnOverlay, spawnParticles, spawnSequence, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, updateEffectState, useAgentChat, useAnchorRect, useAuthContext, useBattleState, useCamera, useCanvasEffects, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGameAudioContext, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useOrbitalHistory, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSwipeGesture, useTapReveal, useTraitListens, useTranslate135 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
|
|
57300
|
+
export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BiologyCanvas, BloomQuizBlock, BoardgameBoard, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas2D, CanvasEffect, Card, CardBattlerBoard, CardBattlerTemplate, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, CityBuilderBoard, CityBuilderTemplate, ClassifierBoard, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EMPTY_EFFECT_STATE, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, FishingBoard, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCard, GameHud, GameIcon, GameMenu, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, HexStrategyBoard, HolidayRunnerBoard, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, ItemSlot, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MatchPuzzleBoard, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, MinigolfBoard, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NodeSlotEditor, NotifyListener, NumberStepper, ObjectRulePanel, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsCanvas, PinballBoard, PirateBoard, PlatformerBoard, PlatformerTemplate, Popover, PositionedCanvas, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, RacingBoard, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RoguelikeBoard, RoguelikeTemplate, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SokobanBoard, SortableList, SpaceShmupBoard, SpaceStationBoard, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, SportsBoard, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TanksBoard, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TopDownShooterBoard, TopDownShooterTemplate, TowerDefenseBoard, TowerDefenseTemplate, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VisualNovelBoard, VisualNovelTemplate, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createCombatPresets, createInitialGameState, createTranslate, createUnitAnimationState, drawEffectState, drawSprite, drawTintedImage, getAllEffectSpriteUrls, getCurrentFrame, getTileDimensions, hasActiveEffects, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, screenToIso, spawnOverlay, spawnParticles, spawnSequence, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, updateEffectState, useAgentChat, useAnchorRect, useAuthContext, useBattleState, useCamera, useCanvasEffects, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGameAudioContext, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useOrbitalHistory, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSwipeGesture, useTapReveal, useTraitListens, useTranslate135 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
|