@almadar/ui 5.77.0 → 5.79.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.
Files changed (71) hide show
  1. package/dist/avl/index.cjs +863 -98
  2. package/dist/avl/index.css +3 -3
  3. package/dist/avl/index.js +863 -98
  4. package/dist/components/core/atoms/FlipContainer.d.ts +1 -1
  5. package/dist/components/core/atoms/index.d.ts +2 -1
  6. package/dist/components/core/molecules/Card.d.ts +1 -1
  7. package/dist/components/core/molecules/DataGrid.d.ts +1 -1
  8. package/dist/components/core/molecules/DataList.d.ts +1 -1
  9. package/dist/components/core/molecules/DocPagination.d.ts +8 -1
  10. package/dist/components/core/molecules/DocSearch.d.ts +8 -1
  11. package/dist/components/core/molecules/FlipCard.d.ts +1 -1
  12. package/dist/components/core/molecules/MapView.d.ts +18 -1
  13. package/dist/components/core/molecules/PropertyInspector.d.ts +2 -0
  14. package/dist/components/core/molecules/SortableList.d.ts +1 -1
  15. package/dist/components/core/molecules/TableView.d.ts +1 -1
  16. package/dist/components/core/molecules/index.d.ts +4 -0
  17. package/dist/components/core/organisms/DataTable.d.ts +1 -1
  18. package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +10 -1
  19. package/dist/components/core/organisms/debug/tabs/EntitiesTab.d.ts +2 -1
  20. package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +2 -1
  21. package/dist/components/core/organisms/debug/tabs/EventFlowTab.d.ts +6 -1
  22. package/dist/components/core/organisms/debug/tabs/GuardsPanel.d.ts +6 -1
  23. package/dist/components/core/organisms/debug/tabs/ServerBridgeTab.d.ts +12 -1
  24. package/dist/components/core/organisms/debug/tabs/TicksTab.d.ts +2 -1
  25. package/dist/components/core/organisms/debug/tabs/TraitsTab.d.ts +2 -1
  26. package/dist/components/core/organisms/debug/tabs/TransitionTimeline.d.ts +11 -1
  27. package/dist/components/core/organisms/debug/tabs/VerificationTab.d.ts +8 -1
  28. package/dist/components/game/2d/atoms/ActionButton.d.ts +2 -1
  29. package/dist/components/game/2d/atoms/ChoiceButton.d.ts +2 -1
  30. package/dist/components/game/2d/atoms/ComboCounter.d.ts +2 -1
  31. package/dist/components/game/2d/atoms/ControlButton.d.ts +2 -1
  32. package/dist/components/game/2d/atoms/DamageNumber.d.ts +2 -1
  33. package/dist/components/game/2d/atoms/DialogueBubble.d.ts +2 -1
  34. package/dist/components/game/2d/atoms/GameIcon.d.ts +2 -1
  35. package/dist/components/game/2d/atoms/HealthBar.d.ts +2 -1
  36. package/dist/components/game/2d/atoms/ItemSlot.d.ts +2 -1
  37. package/dist/components/game/2d/atoms/MiniMap.d.ts +2 -1
  38. package/dist/components/game/2d/atoms/ResourceCounter.d.ts +2 -1
  39. package/dist/components/game/2d/atoms/ScoreDisplay.d.ts +2 -1
  40. package/dist/components/game/2d/atoms/StatusEffect.d.ts +2 -1
  41. package/dist/components/game/2d/atoms/TimerDisplay.d.ts +2 -1
  42. package/dist/components/game/2d/atoms/TurnIndicator.d.ts +2 -1
  43. package/dist/components/game/2d/atoms/WaypointMarker.d.ts +2 -1
  44. package/dist/components/game/2d/molecules/GameHud.d.ts +2 -1
  45. package/dist/components/game/2d/molecules/GameMenu.d.ts +2 -1
  46. package/dist/components/game/2d/molecules/InventoryGrid.d.ts +2 -1
  47. package/dist/components/game/2d/molecules/ResourceBar.d.ts +2 -1
  48. package/dist/components/game/2d/molecules/StatBadge.d.ts +2 -1
  49. package/dist/components/game/shared/lib/editorUtils.d.ts +8 -8
  50. package/dist/components/index.cjs +2212 -1525
  51. package/dist/components/index.css +3 -3
  52. package/dist/components/index.js +1002 -315
  53. package/dist/components/learning/atoms/LearningCanvas.d.ts +80 -0
  54. package/dist/components/learning/molecules/BiologyCanvas.d.ts +47 -0
  55. package/dist/components/learning/molecules/ChemistryCanvas.d.ts +55 -0
  56. package/dist/components/learning/molecules/MathCanvas.d.ts +61 -0
  57. package/dist/components/learning/molecules/PhysicsCanvas.d.ts +54 -0
  58. package/dist/components/marketing/atoms/MarketingStatCard.d.ts +2 -2
  59. package/dist/hooks/useGitHub.d.ts +7 -7
  60. package/dist/marketing/index.cjs +2 -2
  61. package/dist/marketing/index.js +2 -2
  62. package/dist/providers/EventBusProvider.d.ts +1 -1
  63. package/dist/providers/SelectionProvider.d.ts +1 -1
  64. package/dist/providers/ServerBridge.d.ts +1 -1
  65. package/dist/providers/index.cjs +859 -94
  66. package/dist/providers/index.css +3 -3
  67. package/dist/providers/index.js +859 -94
  68. package/dist/runtime/index.cjs +859 -94
  69. package/dist/runtime/index.css +3 -3
  70. package/dist/runtime/index.js +859 -94
  71. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import * as React80 from 'react';
3
- import React80__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useId, Suspense, lazy, useLayoutEffect, useSyncExternalStore } from 'react';
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 = React80__default.useMemo(() => {
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 = React80__default.useMemo(() => {
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 = React80__default.lazy(async () => {
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
- React80__default.Suspense,
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 = React80__default.useMemo(() => {
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 (React80__default.isValidElement(value)) {
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
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 = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
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 = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
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 = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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] = React80__default.useState(false);
3112
- React80__default.useEffect(() => {
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 = React80__default.forwardRef(
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 React80__default.createElement(
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 React80__default.createElement(Component, {
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 = React80__default.forwardRef(
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 = React80__default.useId();
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] = React80__default.useState(value);
3773
- React80__default.useEffect(() => {
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 = React80.forwardRef(
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] = React80.useState(
3966
+ const [isChecked, setIsChecked] = React79.useState(
3967
3967
  checked !== void 0 ? checked : defaultChecked
3968
3968
  );
3969
- React80.useEffect(() => {
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 React80__default.createElement(
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 React80__default.createElement(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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] = React80__default.useState(false);
4593
- const timeoutRef = React80__default.useRef(null);
4594
- const triggerRef = React80__default.useRef(null);
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
- React80__default.useEffect(() => {
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.forwardRef(
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 = React80__default.useCallback(
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 React80__default.Component {
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 React80__default.createElement(
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 = React80.useRef(null);
8752
- React80.useEffect(() => {
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/katex/dist/katex.min.css
12632
+ // node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
12312
12633
  var init_katex_min = __esm({
12313
- "node_modules/katex/dist/katex.min.css"() {
12634
+ "node_modules/.pnpm/katex@0.16.47/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 = React80__default.memo(
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 = React80__default.memo(
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(React80__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__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,
@@ -18644,7 +18965,7 @@ function GameCard({
18644
18965
  className
18645
18966
  }) {
18646
18967
  const eventBus = useEventBus();
18647
- const handleClick = React80.useCallback(() => {
18968
+ const handleClick = React79.useCallback(() => {
18648
18969
  if (disabled) return;
18649
18970
  onClick?.(id);
18650
18971
  if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
@@ -20993,6 +21314,122 @@ var init_ChatBar = __esm({
20993
21314
  ChatBar.displayName = "ChatBar";
20994
21315
  }
20995
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
+ });
20996
21433
  function ChoiceButton({
20997
21434
  text = "Charge forward into the fray",
20998
21435
  index,
@@ -21988,9 +22425,9 @@ function ControlButton({
21988
22425
  className
21989
22426
  }) {
21990
22427
  const eventBus = useEventBus();
21991
- const [isPressed, setIsPressed] = React80.useState(false);
22428
+ const [isPressed, setIsPressed] = React79.useState(false);
21992
22429
  const actualPressed = pressed ?? isPressed;
21993
- const handlePointerDown = React80.useCallback(
22430
+ const handlePointerDown = React79.useCallback(
21994
22431
  (e) => {
21995
22432
  e.preventDefault();
21996
22433
  if (disabled) return;
@@ -22000,7 +22437,7 @@ function ControlButton({
22000
22437
  },
22001
22438
  [disabled, pressEvent, eventBus, onPress]
22002
22439
  );
22003
- const handlePointerUp = React80.useCallback(
22440
+ const handlePointerUp = React79.useCallback(
22004
22441
  (e) => {
22005
22442
  e.preventDefault();
22006
22443
  if (disabled) return;
@@ -22010,7 +22447,7 @@ function ControlButton({
22010
22447
  },
22011
22448
  [disabled, releaseEvent, eventBus, onRelease]
22012
22449
  );
22013
- const handlePointerLeave = React80.useCallback(
22450
+ const handlePointerLeave = React79.useCallback(
22014
22451
  (e) => {
22015
22452
  if (isPressed) {
22016
22453
  setIsPressed(false);
@@ -22106,8 +22543,8 @@ function ControlGrid({
22106
22543
  className
22107
22544
  }) {
22108
22545
  const eventBus = useEventBus();
22109
- const [active, setActive] = React80.useState(/* @__PURE__ */ new Set());
22110
- const handlePress = React80.useCallback(
22546
+ const [active, setActive] = React79.useState(/* @__PURE__ */ new Set());
22547
+ const handlePress = React79.useCallback(
22111
22548
  (id) => {
22112
22549
  setActive((prev) => new Set(prev).add(id));
22113
22550
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -22119,7 +22556,7 @@ function ControlGrid({
22119
22556
  },
22120
22557
  [kind, actionEvent, directionEvent, eventBus, onAction, onDirection]
22121
22558
  );
22122
- const handleRelease = React80.useCallback(
22559
+ const handleRelease = React79.useCallback(
22123
22560
  (id) => {
22124
22561
  setActive((prev) => {
22125
22562
  const next = new Set(prev);
@@ -23372,8 +23809,8 @@ var init_Menu = __esm({
23372
23809
  "bottom-end": "bottom-start"
23373
23810
  };
23374
23811
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
23375
- const triggerChild = React80__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
23376
- const triggerElement = React80__default.cloneElement(
23812
+ const triggerChild = React79__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
23813
+ const triggerElement = React79__default.cloneElement(
23377
23814
  triggerChild,
23378
23815
  {
23379
23816
  ref: triggerRef,
@@ -23468,14 +23905,14 @@ function useDataDnd(args) {
23468
23905
  const isZone = Boolean(dragGroup || accepts || sortable);
23469
23906
  const enabled = isZone || Boolean(dndRoot);
23470
23907
  const eventBus = useEventBus();
23471
- const parentRoot = React80__default.useContext(RootCtx);
23908
+ const parentRoot = React79__default.useContext(RootCtx);
23472
23909
  const isRoot = enabled && parentRoot === null;
23473
- const zoneId = React80__default.useId();
23910
+ const zoneId = React79__default.useId();
23474
23911
  const ownGroup = dragGroup ?? accepts ?? zoneId;
23475
- const [optimisticOrders, setOptimisticOrders] = React80__default.useState(() => /* @__PURE__ */ new Map());
23476
- const optimisticOrdersRef = React80__default.useRef(optimisticOrders);
23912
+ const [optimisticOrders, setOptimisticOrders] = React79__default.useState(() => /* @__PURE__ */ new Map());
23913
+ const optimisticOrdersRef = React79__default.useRef(optimisticOrders);
23477
23914
  optimisticOrdersRef.current = optimisticOrders;
23478
- const clearOptimisticOrder = React80__default.useCallback((group) => {
23915
+ const clearOptimisticOrder = React79__default.useCallback((group) => {
23479
23916
  setOptimisticOrders((prev) => {
23480
23917
  if (!prev.has(group)) return prev;
23481
23918
  const next = new Map(prev);
@@ -23500,7 +23937,7 @@ function useDataDnd(args) {
23500
23937
  const raw = it[dndItemIdField];
23501
23938
  return raw != null ? String(raw) : `__idx_${idx}`;
23502
23939
  }).join("|");
23503
- const itemIds = React80__default.useMemo(
23940
+ const itemIds = React79__default.useMemo(
23504
23941
  () => orderedItems.map((it, idx) => {
23505
23942
  const raw = it[dndItemIdField];
23506
23943
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -23511,7 +23948,7 @@ function useDataDnd(args) {
23511
23948
  const raw = it[dndItemIdField];
23512
23949
  return raw != null ? String(raw) : `__${idx}`;
23513
23950
  }).join("|");
23514
- React80__default.useEffect(() => {
23951
+ React79__default.useEffect(() => {
23515
23952
  const root = isRoot ? null : parentRoot;
23516
23953
  if (root) {
23517
23954
  root.clearOptimisticOrder(ownGroup);
@@ -23519,20 +23956,20 @@ function useDataDnd(args) {
23519
23956
  clearOptimisticOrder(ownGroup);
23520
23957
  }
23521
23958
  }, [itemsContentSig, ownGroup]);
23522
- const zonesRef = React80__default.useRef(/* @__PURE__ */ new Map());
23523
- const registerZone = React80__default.useCallback((zoneId2, meta2) => {
23959
+ const zonesRef = React79__default.useRef(/* @__PURE__ */ new Map());
23960
+ const registerZone = React79__default.useCallback((zoneId2, meta2) => {
23524
23961
  zonesRef.current.set(zoneId2, meta2);
23525
23962
  }, []);
23526
- const unregisterZone = React80__default.useCallback((zoneId2) => {
23963
+ const unregisterZone = React79__default.useCallback((zoneId2) => {
23527
23964
  zonesRef.current.delete(zoneId2);
23528
23965
  }, []);
23529
- const [activeDrag, setActiveDrag] = React80__default.useState(null);
23530
- const [overZoneGroup, setOverZoneGroup] = React80__default.useState(null);
23531
- const meta = React80__default.useMemo(
23966
+ const [activeDrag, setActiveDrag] = React79__default.useState(null);
23967
+ const [overZoneGroup, setOverZoneGroup] = React79__default.useState(null);
23968
+ const meta = React79__default.useMemo(
23532
23969
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
23533
23970
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
23534
23971
  );
23535
- React80__default.useEffect(() => {
23972
+ React79__default.useEffect(() => {
23536
23973
  const target = isRoot ? null : parentRoot;
23537
23974
  if (!target) {
23538
23975
  zonesRef.current.set(zoneId, meta);
@@ -23551,7 +23988,7 @@ function useDataDnd(args) {
23551
23988
  }, [parentRoot, isRoot, zoneId, meta]);
23552
23989
  const sensors = useAlmadarDndSensors(true);
23553
23990
  const collisionDetection = almadarDndCollisionDetection;
23554
- const findZoneByItem = React80__default.useCallback(
23991
+ const findZoneByItem = React79__default.useCallback(
23555
23992
  (id) => {
23556
23993
  for (const z of zonesRef.current.values()) {
23557
23994
  if (z.itemIds.includes(id)) return z;
@@ -23560,7 +23997,7 @@ function useDataDnd(args) {
23560
23997
  },
23561
23998
  []
23562
23999
  );
23563
- React80__default.useCallback(
24000
+ React79__default.useCallback(
23564
24001
  (group) => {
23565
24002
  for (const z of zonesRef.current.values()) {
23566
24003
  if (z.group === group) return z;
@@ -23569,7 +24006,7 @@ function useDataDnd(args) {
23569
24006
  },
23570
24007
  []
23571
24008
  );
23572
- const handleDragEnd = React80__default.useCallback(
24009
+ const handleDragEnd = React79__default.useCallback(
23573
24010
  (event) => {
23574
24011
  const { active, over } = event;
23575
24012
  const activeIdStr = String(active.id);
@@ -23660,8 +24097,8 @@ function useDataDnd(args) {
23660
24097
  },
23661
24098
  [eventBus]
23662
24099
  );
23663
- const sortableData = React80__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23664
- const SortableItem = React80__default.useCallback(
24100
+ const sortableData = React79__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
24101
+ const SortableItem = React79__default.useCallback(
23665
24102
  ({ id, children }) => {
23666
24103
  const {
23667
24104
  attributes,
@@ -23701,7 +24138,7 @@ function useDataDnd(args) {
23701
24138
  id: droppableId,
23702
24139
  data: sortableData
23703
24140
  });
23704
- const ctx = React80__default.useContext(RootCtx);
24141
+ const ctx = React79__default.useContext(RootCtx);
23705
24142
  const activeDrag2 = ctx?.activeDrag ?? null;
23706
24143
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
23707
24144
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -23716,7 +24153,7 @@ function useDataDnd(args) {
23716
24153
  showForeignPlaceholder,
23717
24154
  ctxAvailable: ctx != null
23718
24155
  });
23719
- React80__default.useEffect(() => {
24156
+ React79__default.useEffect(() => {
23720
24157
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
23721
24158
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
23722
24159
  return /* @__PURE__ */ jsx(
@@ -23730,11 +24167,11 @@ function useDataDnd(args) {
23730
24167
  }
23731
24168
  );
23732
24169
  };
23733
- const rootContextValue = React80__default.useMemo(
24170
+ const rootContextValue = React79__default.useMemo(
23734
24171
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
23735
24172
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
23736
24173
  );
23737
- const handleDragStart = React80__default.useCallback((event) => {
24174
+ const handleDragStart = React79__default.useCallback((event) => {
23738
24175
  const sourceZone = findZoneByItem(event.active.id);
23739
24176
  const rect = event.active.rect.current.initial;
23740
24177
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -23753,7 +24190,7 @@ function useDataDnd(args) {
23753
24190
  isRoot
23754
24191
  });
23755
24192
  }, [findZoneByItem, isRoot, zoneId]);
23756
- const handleDragOver = React80__default.useCallback((event) => {
24193
+ const handleDragOver = React79__default.useCallback((event) => {
23757
24194
  const { active, over } = event;
23758
24195
  const overData = over?.data?.current;
23759
24196
  const overGroup = overData?.dndGroup ?? null;
@@ -23823,7 +24260,7 @@ function useDataDnd(args) {
23823
24260
  return next;
23824
24261
  });
23825
24262
  }, []);
23826
- const handleDragCancel = React80__default.useCallback((event) => {
24263
+ const handleDragCancel = React79__default.useCallback((event) => {
23827
24264
  setActiveDrag(null);
23828
24265
  setOverZoneGroup(null);
23829
24266
  dndLog.warn("dragCancel", {
@@ -23831,12 +24268,12 @@ function useDataDnd(args) {
23831
24268
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
23832
24269
  });
23833
24270
  }, []);
23834
- const handleDragEndWithCleanup = React80__default.useCallback((event) => {
24271
+ const handleDragEndWithCleanup = React79__default.useCallback((event) => {
23835
24272
  handleDragEnd(event);
23836
24273
  setActiveDrag(null);
23837
24274
  setOverZoneGroup(null);
23838
24275
  }, [handleDragEnd]);
23839
- const wrapContainer = React80__default.useCallback(
24276
+ const wrapContainer = React79__default.useCallback(
23840
24277
  (children) => {
23841
24278
  if (!enabled) return children;
23842
24279
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -23890,7 +24327,7 @@ var init_useDataDnd = __esm({
23890
24327
  init_useAlmadarDndCollision();
23891
24328
  init_Box();
23892
24329
  dndLog = createLogger("almadar:ui:dnd");
23893
- RootCtx = React80__default.createContext(null);
24330
+ RootCtx = React79__default.createContext(null);
23894
24331
  }
23895
24332
  });
23896
24333
  function renderIconInput(icon, props) {
@@ -24416,7 +24853,7 @@ function DataList({
24416
24853
  }) {
24417
24854
  const eventBus = useEventBus();
24418
24855
  const { t } = useTranslate();
24419
- const [visibleCount, setVisibleCount] = React80__default.useState(pageSize || Infinity);
24856
+ const [visibleCount, setVisibleCount] = React79__default.useState(pageSize || Infinity);
24420
24857
  const fieldDefs = fields ?? columns ?? [];
24421
24858
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
24422
24859
  const dnd = useDataDnd({
@@ -24435,7 +24872,7 @@ function DataList({
24435
24872
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
24436
24873
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
24437
24874
  const hasRenderProp = typeof children === "function";
24438
- React80__default.useEffect(() => {
24875
+ React79__default.useEffect(() => {
24439
24876
  const renderItemTypeOf = typeof schemaRenderItem;
24440
24877
  const childrenTypeOf = typeof children;
24441
24878
  if (data.length > 0 && !hasRenderProp) {
@@ -24539,7 +24976,7 @@ function DataList({
24539
24976
  const items2 = [...data];
24540
24977
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
24541
24978
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
24542
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
24979
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
24543
24980
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
24544
24981
  group.items.map((itemData, index) => {
24545
24982
  const id = itemData.id || `${gi}-${index}`;
@@ -24680,7 +25117,7 @@ function DataList({
24680
25117
  className
24681
25118
  ),
24682
25119
  children: [
24683
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
25120
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
24684
25121
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
24685
25122
  group.items.map(
24686
25123
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -24787,8 +25224,8 @@ function ScalarControl({
24787
25224
  }
24788
25225
  const numeric = typeof value === "number";
24789
25226
  const initial = value === null ? "" : String(value);
24790
- const [draft, setDraft] = React80__default.useState(initial);
24791
- React80__default.useEffect(() => setDraft(initial), [initial]);
25227
+ const [draft, setDraft] = React79__default.useState(initial);
25228
+ React79__default.useEffect(() => setDraft(initial), [initial]);
24792
25229
  const commit = () => {
24793
25230
  if (numeric) {
24794
25231
  const n = draft.trim() === "" ? 0 : Number(draft);
@@ -24856,8 +25293,8 @@ function Row({
24856
25293
  onRemove,
24857
25294
  readonly
24858
25295
  }) {
24859
- const [keyDraft, setKeyDraft] = React80__default.useState(rowKey);
24860
- React80__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
25296
+ const [keyDraft, setKeyDraft] = React79__default.useState(rowKey);
25297
+ React79__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
24861
25298
  const container = isObj(value) || isArr(value);
24862
25299
  return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
24863
25300
  /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
@@ -24900,7 +25337,7 @@ function ContainerNode({
24900
25337
  depth,
24901
25338
  readonly
24902
25339
  }) {
24903
- const [open, setOpen] = React80__default.useState(depth < 2);
25340
+ const [open, setOpen] = React79__default.useState(depth < 2);
24904
25341
  const array = isArr(value);
24905
25342
  const entries = array ? value.map((v, i) => [String(i), v]) : Object.entries(value);
24906
25343
  const setObjValue = (key, next) => {
@@ -25042,7 +25479,7 @@ var init_FormSection = __esm({
25042
25479
  columns = 1,
25043
25480
  className
25044
25481
  }) => {
25045
- const [collapsed, setCollapsed] = React80__default.useState(defaultCollapsed);
25482
+ const [collapsed, setCollapsed] = React79__default.useState(defaultCollapsed);
25046
25483
  const { t } = useTranslate();
25047
25484
  const eventBus = useEventBus();
25048
25485
  const gridClass = {
@@ -25050,7 +25487,7 @@ var init_FormSection = __esm({
25050
25487
  2: "grid-cols-1 md:grid-cols-2",
25051
25488
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
25052
25489
  }[columns];
25053
- React80__default.useCallback(() => {
25490
+ React79__default.useCallback(() => {
25054
25491
  if (collapsible) {
25055
25492
  setCollapsed((prev) => !prev);
25056
25493
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -25458,8 +25895,8 @@ function TextLikeControl({
25458
25895
  onCommit
25459
25896
  }) {
25460
25897
  const initial = value === void 0 || value === null ? "" : String(value);
25461
- const [draft, setDraft] = React80__default.useState(initial);
25462
- React80__default.useEffect(() => setDraft(initial), [initial]);
25898
+ const [draft, setDraft] = React79__default.useState(initial);
25899
+ React79__default.useEffect(() => setDraft(initial), [initial]);
25463
25900
  const commit = () => {
25464
25901
  if (numeric) {
25465
25902
  const n = draft.trim() === "" ? 0 : Number(draft);
@@ -25579,9 +26016,14 @@ var init_PropertyInspector = __esm({
25579
26016
  onReset,
25580
26017
  title,
25581
26018
  className,
25582
- assets
26019
+ assets,
26020
+ tiers
25583
26021
  }) => {
25584
- const fields = Object.entries(config);
26022
+ const allowedTiers = tiers ? new Set(tiers) : null;
26023
+ const fields = Object.entries(config).filter(([, decl]) => {
26024
+ if (!allowedTiers) return true;
26025
+ return allowedTiers.has(decl.tier ?? "presentation");
26026
+ });
25585
26027
  const byTier = /* @__PURE__ */ new Map();
25586
26028
  for (const [name, decl] of fields) {
25587
26029
  const tier = decl.tier ?? "presentation";
@@ -25589,7 +26031,7 @@ var init_PropertyInspector = __esm({
25589
26031
  arr.push([name, decl]);
25590
26032
  byTier.set(tier, arr);
25591
26033
  }
25592
- const tiers = [...byTier.keys()].sort((a, b) => {
26034
+ const tierList = [...byTier.keys()].sort((a, b) => {
25593
26035
  const ia = TIER_ORDER.indexOf(a);
25594
26036
  const ib = TIER_ORDER.indexOf(b);
25595
26037
  return (ia === -1 ? 99 : ia) - (ib === -1 ? 99 : ib);
@@ -25600,7 +26042,7 @@ var init_PropertyInspector = __esm({
25600
26042
  onReset !== void 0 && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", icon: "rotate-ccw", label: "Reset", onClick: onReset })
25601
26043
  ] }),
25602
26044
  fields.length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "No configurable properties." }),
25603
- tiers.map((tier) => /* @__PURE__ */ jsx(FormSection, { title: tier, collapsible: true, defaultCollapsed: tier !== "presentation", children: /* @__PURE__ */ jsx(VStack, { gap: "sm", children: byTier.get(tier)?.map(([name, decl]) => /* @__PURE__ */ jsx(
26045
+ tierList.map((tier) => /* @__PURE__ */ jsx(FormSection, { title: tier, collapsible: true, defaultCollapsed: tier !== "presentation", children: /* @__PURE__ */ jsx(VStack, { gap: "sm", children: byTier.get(tier)?.map(([name, decl]) => /* @__PURE__ */ jsx(
25604
26046
  FieldControl,
25605
26047
  {
25606
26048
  name,
@@ -25639,14 +26081,14 @@ var init_NodeSlotEditor = __esm({
25639
26081
  isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
25640
26082
  NodeSlotEditor = ({ value, onChange, className }) => {
25641
26083
  const { type, props, wasArray } = normalize(value);
25642
- const patterns = React80__default.useMemo(() => {
26084
+ const patterns = React79__default.useMemo(() => {
25643
26085
  try {
25644
26086
  return [...getKnownPatterns()].sort();
25645
26087
  } catch {
25646
26088
  return [];
25647
26089
  }
25648
26090
  }, []);
25649
- const options = React80__default.useMemo(
26091
+ const options = React79__default.useMemo(
25650
26092
  () => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p2) => ({ value: p2, label: p2 }))],
25651
26093
  [patterns]
25652
26094
  );
@@ -25658,7 +26100,7 @@ var init_NodeSlotEditor = __esm({
25658
26100
  const pattern = { type: nextType, ...nextProps };
25659
26101
  onChange(wasArray || value === void 0 ? [pattern] : pattern);
25660
26102
  };
25661
- const schemaEntries = React80__default.useMemo(() => {
26103
+ const schemaEntries = React79__default.useMemo(() => {
25662
26104
  if (!type) return [];
25663
26105
  const def = getPatternDefinition(type);
25664
26106
  if (!def?.propsSchema) return [];
@@ -26560,7 +27002,7 @@ var init_Flex = __esm({
26560
27002
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
26561
27003
  }
26562
27004
  }
26563
- return React80__default.createElement(Component, {
27005
+ return React79__default.createElement(Component, {
26564
27006
  className: cn(
26565
27007
  inline ? "inline-flex" : "flex",
26566
27008
  directionStyles[direction],
@@ -26679,7 +27121,7 @@ var init_Grid = __esm({
26679
27121
  as: Component = "div"
26680
27122
  }) => {
26681
27123
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
26682
- return React80__default.createElement(
27124
+ return React79__default.createElement(
26683
27125
  Component,
26684
27126
  {
26685
27127
  className: cn(
@@ -26875,9 +27317,9 @@ var init_Popover = __esm({
26875
27317
  onMouseLeave: handleClose,
26876
27318
  onPointerDown: tapTriggerProps.onPointerDown
26877
27319
  };
26878
- const childElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
27320
+ const childElement = React79__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
26879
27321
  const childPointerDown = childElement.props.onPointerDown;
26880
- const triggerElement = React80__default.cloneElement(
27322
+ const triggerElement = React79__default.cloneElement(
26881
27323
  childElement,
26882
27324
  {
26883
27325
  ref: triggerRef,
@@ -27729,9 +28171,9 @@ var init_Tooltip = __esm({
27729
28171
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
27730
28172
  };
27731
28173
  }, []);
27732
- const triggerElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28174
+ const triggerElement = React79__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
27733
28175
  const childPointerDown = triggerElement.props.onPointerDown;
27734
- const trigger = React80__default.cloneElement(triggerElement, {
28176
+ const trigger = React79__default.cloneElement(triggerElement, {
27735
28177
  ref: triggerRef,
27736
28178
  onMouseEnter: handleMouseEnter,
27737
28179
  onMouseLeave: handleMouseLeave,
@@ -27821,7 +28263,7 @@ var init_WizardProgress = __esm({
27821
28263
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
27822
28264
  const isActive = index === currentStep;
27823
28265
  const isCompleted = index < currentStep;
27824
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
28266
+ return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
27825
28267
  /* @__PURE__ */ jsx(
27826
28268
  "button",
27827
28269
  {
@@ -29731,7 +30173,7 @@ function InventoryGrid({
29731
30173
  const eventBus = useEventBus();
29732
30174
  const slotCount = totalSlots ?? items.length;
29733
30175
  const emptySlotCount = Math.max(0, slotCount - items.length);
29734
- const handleSelect = React80.useCallback(
30176
+ const handleSelect = React79.useCallback(
29735
30177
  (id) => {
29736
30178
  onSelect?.(id);
29737
30179
  if (selectEvent) {
@@ -29934,7 +30376,7 @@ function GameMenu({
29934
30376
  } catch {
29935
30377
  }
29936
30378
  const eventBus = eventBusProp || eventBusFromHook;
29937
- const handleOptionClick = React80.useCallback(
30379
+ const handleOptionClick = React79.useCallback(
29938
30380
  (option) => {
29939
30381
  if (option.event && eventBus) {
29940
30382
  eventBus.emit(`UI:${option.event}`, { option });
@@ -32939,7 +33381,7 @@ function LinearView({
32939
33381
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
32940
33382
  const isDone = i < currentIdx;
32941
33383
  const isCurrent = i === currentIdx;
32942
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
33384
+ return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
32943
33385
  i > 0 && /* @__PURE__ */ jsx(
32944
33386
  Typography,
32945
33387
  {
@@ -33565,7 +34007,7 @@ function SequenceBar({
33565
34007
  onSlotRemove(index);
33566
34008
  }, [onSlotRemove, playing]);
33567
34009
  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(React80__default.Fragment, { children: [
34010
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
33569
34011
  i > 0 && /* @__PURE__ */ jsx(
33570
34012
  Typography,
33571
34013
  {
@@ -35730,10 +36172,10 @@ function getSlotContentRenderer() {
35730
36172
  }
35731
36173
  function resolveDescriptor(value, idPrefix) {
35732
36174
  if (value === null || value === void 0) return value;
35733
- if (React80__default.isValidElement(value)) return value;
36175
+ if (React79__default.isValidElement(value)) return value;
35734
36176
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
35735
36177
  if (Array.isArray(value)) {
35736
- return value.map((item, i) => /* @__PURE__ */ jsx(React80__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
36178
+ return value.map((item, i) => /* @__PURE__ */ jsx(React79__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
35737
36179
  }
35738
36180
  if (typeof value === "object") {
35739
36181
  const rec = value;
@@ -35869,7 +36311,7 @@ var init_GameTemplate = __esm({
35869
36311
  }
35870
36312
  });
35871
36313
  function asDescriptor(v) {
35872
- if (Array.isArray(v) || React80__default.isValidElement(v)) return null;
36314
+ if (Array.isArray(v) || React79__default.isValidElement(v)) return null;
35873
36315
  const o = v;
35874
36316
  if (typeof o.type !== "string") return null;
35875
36317
  const props = o.props !== void 0 && typeof o.props === "object" && !Array.isArray(o.props) && o.props !== null ? o.props : void 0;
@@ -35884,10 +36326,10 @@ function getSlotContentRenderer2() {
35884
36326
  }
35885
36327
  function resolveDescriptor2(value, idPrefix) {
35886
36328
  if (value === null || value === void 0) return value;
35887
- if (React80__default.isValidElement(value)) return value;
36329
+ if (React79__default.isValidElement(value)) return value;
35888
36330
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
35889
36331
  if (Array.isArray(value)) {
35890
- return value.map((item, i) => /* @__PURE__ */ jsx(React80__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
36332
+ return value.map((item, i) => /* @__PURE__ */ jsx(React79__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
35891
36333
  }
35892
36334
  if (typeof value === "object" && value !== null) {
35893
36335
  const desc = asDescriptor(value);
@@ -36548,6 +36990,234 @@ var init_molecules = __esm({
36548
36990
  init_CardBattlerTemplate();
36549
36991
  }
36550
36992
  });
36993
+ var MathCanvas;
36994
+ var init_MathCanvas = __esm({
36995
+ "components/learning/molecules/MathCanvas.tsx"() {
36996
+ "use client";
36997
+ init_atoms();
36998
+ init_Stack();
36999
+ init_LearningCanvas();
37000
+ MathCanvas = ({
37001
+ className,
37002
+ width = 600,
37003
+ height = 400,
37004
+ title,
37005
+ xMin = -10,
37006
+ xMax = 10,
37007
+ yMin = -10,
37008
+ yMax = 10,
37009
+ showAxes = true,
37010
+ showGrid = true,
37011
+ gridStep = 1,
37012
+ curves = [],
37013
+ points = [],
37014
+ vectors = [],
37015
+ shapes = [],
37016
+ interactive = false,
37017
+ animate = false,
37018
+ onShapeClick,
37019
+ isLoading,
37020
+ error
37021
+ }) => {
37022
+ const derivedShapes = useMemo(() => {
37023
+ const out = [];
37024
+ const margin = 24;
37025
+ const plotW = width - margin * 2;
37026
+ const plotH = height - margin * 2;
37027
+ const mapX = (x) => margin + (x - xMin) / (xMax - xMin) * plotW;
37028
+ const mapY = (y) => height - (margin + (y - yMin) / (yMax - yMin) * plotH);
37029
+ if (showGrid) {
37030
+ for (let x = Math.ceil(xMin / gridStep) * gridStep; x <= xMax; x += gridStep) {
37031
+ const px = mapX(x);
37032
+ out.push({ type: "line", x1: px, y1: margin, x2: px, y2: height - margin, color: "#e5e7eb", lineWidth: 1 });
37033
+ }
37034
+ for (let y = Math.ceil(yMin / gridStep) * gridStep; y <= yMax; y += gridStep) {
37035
+ const py = mapY(y);
37036
+ out.push({ type: "line", x1: margin, y1: py, x2: width - margin, y2: py, color: "#e5e7eb", lineWidth: 1 });
37037
+ }
37038
+ }
37039
+ if (showAxes) {
37040
+ const xAxisY = Math.max(margin, Math.min(height - margin, mapY(0)));
37041
+ const yAxisX = Math.max(margin, Math.min(width - margin, mapX(0)));
37042
+ out.push({ type: "line", x1: margin, y1: xAxisY, x2: width - margin, y2: xAxisY, color: "#374151", lineWidth: 2 });
37043
+ out.push({ type: "line", x1: yAxisX, y1: margin, x2: yAxisX, y2: height - margin, color: "#374151", lineWidth: 2 });
37044
+ }
37045
+ for (const curve of curves) {
37046
+ if (!curve.samples || curve.samples.length < 2) continue;
37047
+ for (let i = 1; i < curve.samples.length; i++) {
37048
+ const a = curve.samples[i - 1];
37049
+ const b = curve.samples[i];
37050
+ if (a.x < xMin || a.x > xMax || b.x < xMin || b.x > xMax) continue;
37051
+ out.push({
37052
+ type: "line",
37053
+ x1: mapX(a.x),
37054
+ y1: mapY(a.y),
37055
+ x2: mapX(b.x),
37056
+ y2: mapY(b.y),
37057
+ color: curve.color ?? "#2563eb",
37058
+ lineWidth: 2
37059
+ });
37060
+ }
37061
+ }
37062
+ for (const p2 of points) {
37063
+ if (p2.x < xMin || p2.x > xMax || p2.y < yMin || p2.y > yMax) continue;
37064
+ out.push({
37065
+ type: "circle",
37066
+ x: mapX(p2.x),
37067
+ y: mapY(p2.y),
37068
+ radius: p2.radius ?? 4,
37069
+ color: p2.color ?? "#dc2626",
37070
+ fill: p2.color ?? "#dc2626"
37071
+ });
37072
+ if (p2.label) {
37073
+ out.push({ type: "text", x: mapX(p2.x) + 8, y: mapY(p2.y) - 8, text: p2.label, color: "#111827", fontSize: 12 });
37074
+ }
37075
+ }
37076
+ for (const v of vectors) {
37077
+ if (v.x < xMin || v.x > xMax || v.y < yMin || v.y > yMax) continue;
37078
+ const x1 = mapX(v.x);
37079
+ const y1 = mapY(v.y);
37080
+ const x2 = mapX(v.x + v.vx);
37081
+ const y2 = mapY(v.y + v.vy);
37082
+ out.push({ type: "arrow", x1, y1, x2, y2, color: v.color ?? "#7c3aed", lineWidth: 2 });
37083
+ if (v.label) {
37084
+ out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: "#111827", fontSize: 12 });
37085
+ }
37086
+ }
37087
+ out.push(...shapes);
37088
+ return out;
37089
+ }, [width, height, xMin, xMax, yMin, yMax, showAxes, showGrid, gridStep, curves, points, vectors, shapes]);
37090
+ return /* @__PURE__ */ jsx(Card, { className, children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
37091
+ title ? /* @__PURE__ */ jsx(Typography, { variant: "h4", children: title }) : null,
37092
+ /* @__PURE__ */ jsx(
37093
+ LearningCanvas,
37094
+ {
37095
+ width,
37096
+ height,
37097
+ shapes: derivedShapes,
37098
+ interactive,
37099
+ animate,
37100
+ onShapeClick,
37101
+ isLoading,
37102
+ error
37103
+ }
37104
+ )
37105
+ ] }) });
37106
+ };
37107
+ }
37108
+ });
37109
+ var PhysicsCanvas;
37110
+ var init_PhysicsCanvas = __esm({
37111
+ "components/learning/molecules/PhysicsCanvas.tsx"() {
37112
+ "use client";
37113
+ init_atoms();
37114
+ init_Stack();
37115
+ init_LearningCanvas();
37116
+ PhysicsCanvas = ({
37117
+ className,
37118
+ width = 600,
37119
+ height = 400,
37120
+ title,
37121
+ backgroundColor,
37122
+ bodies = [],
37123
+ constraints = [],
37124
+ showVelocity = true,
37125
+ showForces = false,
37126
+ velocityScale = 20,
37127
+ forceScale = 20,
37128
+ shapes = [],
37129
+ interactive = false,
37130
+ animate = false,
37131
+ onShapeClick,
37132
+ isLoading,
37133
+ error
37134
+ }) => {
37135
+ const derivedShapes = useMemo(() => {
37136
+ const out = [];
37137
+ const bodyById = /* @__PURE__ */ new Map();
37138
+ for (const b of bodies) {
37139
+ if (b.id) bodyById.set(b.id, b);
37140
+ }
37141
+ for (const c of constraints) {
37142
+ const a = bodyById.get(c.from);
37143
+ const b = bodyById.get(c.to);
37144
+ if (!a || !b) continue;
37145
+ out.push({
37146
+ type: "line",
37147
+ x1: a.x,
37148
+ y1: a.y,
37149
+ x2: b.x,
37150
+ y2: b.y,
37151
+ color: c.color ?? "#9ca3af",
37152
+ lineWidth: 2
37153
+ });
37154
+ }
37155
+ for (const b of bodies) {
37156
+ out.push({
37157
+ type: "circle",
37158
+ x: b.x,
37159
+ y: b.y,
37160
+ radius: b.radius ?? 12,
37161
+ color: b.color ?? "#2563eb",
37162
+ fill: b.color ?? "#2563eb",
37163
+ id: b.id
37164
+ });
37165
+ if (b.label) {
37166
+ out.push({
37167
+ type: "text",
37168
+ x: b.x + (b.radius ?? 12) + 6,
37169
+ y: b.y - (b.radius ?? 12) - 6,
37170
+ text: b.label,
37171
+ color: "#111827",
37172
+ fontSize: 12
37173
+ });
37174
+ }
37175
+ if (showVelocity && b.vx != null && b.vy != null && (b.vx !== 0 || b.vy !== 0)) {
37176
+ out.push({
37177
+ type: "arrow",
37178
+ x1: b.x,
37179
+ y1: b.y,
37180
+ x2: b.x + b.vx * velocityScale,
37181
+ y2: b.y + b.vy * velocityScale,
37182
+ color: "#16a34a",
37183
+ lineWidth: 2
37184
+ });
37185
+ }
37186
+ if (showForces && b.fx != null && b.fy != null && (b.fx !== 0 || b.fy !== 0)) {
37187
+ out.push({
37188
+ type: "arrow",
37189
+ x1: b.x,
37190
+ y1: b.y,
37191
+ x2: b.x + b.fx * forceScale,
37192
+ y2: b.y + b.fy * forceScale,
37193
+ color: "#dc2626",
37194
+ lineWidth: 2
37195
+ });
37196
+ }
37197
+ }
37198
+ out.push(...shapes);
37199
+ return out;
37200
+ }, [bodies, constraints, showVelocity, showForces, velocityScale, forceScale, shapes]);
37201
+ return /* @__PURE__ */ jsx(Card, { className, children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
37202
+ title ? /* @__PURE__ */ jsx(Typography, { variant: "h4", children: title }) : null,
37203
+ /* @__PURE__ */ jsx(
37204
+ LearningCanvas,
37205
+ {
37206
+ width,
37207
+ height,
37208
+ backgroundColor,
37209
+ shapes: derivedShapes,
37210
+ interactive,
37211
+ animate,
37212
+ onShapeClick,
37213
+ isLoading,
37214
+ error
37215
+ }
37216
+ )
37217
+ ] }) });
37218
+ };
37219
+ }
37220
+ });
36551
37221
  function resolveNodeColor(node, groups) {
36552
37222
  if (node.color) return node.color;
36553
37223
  if (node.group) {
@@ -36919,7 +37589,7 @@ var init_MapView = __esm({
36919
37589
  shadowSize: [41, 41]
36920
37590
  });
36921
37591
  L.Marker.prototype.options.icon = defaultIcon;
36922
- const { useEffect: useEffect79, useRef: useRef78, useCallback: useCallback127, useState: useState119 } = React80__default;
37592
+ const { useEffect: useEffect79, useRef: useRef78, useCallback: useCallback127, useState: useState118 } = React79__default;
36923
37593
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
36924
37594
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
36925
37595
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -36964,7 +37634,7 @@ var init_MapView = __esm({
36964
37634
  showAttribution = true
36965
37635
  }) {
36966
37636
  const eventBus = useEventBus2();
36967
- const [clickedPosition, setClickedPosition] = useState119(null);
37637
+ const [clickedPosition, setClickedPosition] = useState118(null);
36968
37638
  const handleMapClick = useCallback127((lat, lng) => {
36969
37639
  if (showClickedPin) {
36970
37640
  setClickedPosition({ lat, lng });
@@ -37834,8 +38504,8 @@ function TableView({
37834
38504
  }) {
37835
38505
  const eventBus = useEventBus();
37836
38506
  const { t } = useTranslate();
37837
- const [visibleCount, setVisibleCount] = React80__default.useState(pageSize > 0 ? pageSize : Infinity);
37838
- const [localSelected, setLocalSelected] = React80__default.useState(/* @__PURE__ */ new Set());
38507
+ const [visibleCount, setVisibleCount] = React79__default.useState(pageSize > 0 ? pageSize : Infinity);
38508
+ const [localSelected, setLocalSelected] = React79__default.useState(/* @__PURE__ */ new Set());
37839
38509
  const colDefs = columns ?? fields ?? [];
37840
38510
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
37841
38511
  const dnd = useDataDnd({
@@ -38030,12 +38700,12 @@ function TableView({
38030
38700
  ]
38031
38701
  }
38032
38702
  );
38033
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React80__default.Fragment, { children: rowInner }, id);
38703
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React79__default.Fragment, { children: rowInner }, id);
38034
38704
  };
38035
38705
  const items = Array.from(data);
38036
38706
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
38037
38707
  let runningIndex = 0;
38038
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
38708
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
38039
38709
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
38040
38710
  group.items.map((row) => renderRow(row, runningIndex++))
38041
38711
  ] }, gi)) });
@@ -39392,7 +40062,7 @@ var init_StepFlow = __esm({
39392
40062
  className
39393
40063
  }) => {
39394
40064
  if (orientation === "vertical") {
39395
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React80__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
40065
+ 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
40066
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
39397
40067
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
39398
40068
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -39403,7 +40073,7 @@ var init_StepFlow = __esm({
39403
40073
  ] })
39404
40074
  ] }) }, index)) });
39405
40075
  }
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(React80__default.Fragment, { children: [
40076
+ 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
40077
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
39408
40078
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
39409
40079
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -40388,7 +41058,7 @@ var init_LikertScale = __esm({
40388
41058
  md: "text-base",
40389
41059
  lg: "text-lg"
40390
41060
  };
40391
- LikertScale = React80__default.forwardRef(
41061
+ LikertScale = React79__default.forwardRef(
40392
41062
  ({
40393
41063
  question,
40394
41064
  options = DEFAULT_LIKERT_OPTIONS,
@@ -40400,7 +41070,7 @@ var init_LikertScale = __esm({
40400
41070
  variant = "radios",
40401
41071
  className
40402
41072
  }, ref) => {
40403
- const groupId = React80__default.useId();
41073
+ const groupId = React79__default.useId();
40404
41074
  const eventBus = useEventBus();
40405
41075
  const handleSelect = useCallback(
40406
41076
  (next) => {
@@ -42682,7 +43352,7 @@ var init_DocBreadcrumb = __esm({
42682
43352
  "aria-label": t("aria.breadcrumb"),
42683
43353
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
42684
43354
  const isLast = idx === items.length - 1;
42685
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
43355
+ return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
42686
43356
  idx > 0 && /* @__PURE__ */ jsx(
42687
43357
  Icon,
42688
43358
  {
@@ -43551,7 +44221,7 @@ var init_MiniStateMachine = __esm({
43551
44221
  const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
43552
44222
  const tc = transitionCounts[s.name] ?? 0;
43553
44223
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
43554
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
44224
+ return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
43555
44225
  /* @__PURE__ */ jsx(
43556
44226
  AvlState,
43557
44227
  {
@@ -43755,7 +44425,7 @@ var init_PageHeader = __esm({
43755
44425
  info: "bg-info/10 text-info"
43756
44426
  };
43757
44427
  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(React80__default.Fragment, { children: [
44428
+ 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
44429
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
43760
44430
  crumb.href ? /* @__PURE__ */ jsx(
43761
44431
  "a",
@@ -44113,7 +44783,7 @@ var init_Section = __esm({
44113
44783
  as: Component = "section"
44114
44784
  }) => {
44115
44785
  const hasHeader = title || description || action;
44116
- return React80__default.createElement(
44786
+ return React79__default.createElement(
44117
44787
  Component,
44118
44788
  {
44119
44789
  className: cn(
@@ -44479,7 +45149,7 @@ var init_WizardContainer = __esm({
44479
45149
  const isCompleted = index < currentStep;
44480
45150
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
44481
45151
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
44482
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
45152
+ return /* @__PURE__ */ jsxs(React79__default.Fragment, { children: [
44483
45153
  /* @__PURE__ */ jsx(
44484
45154
  Button,
44485
45155
  {
@@ -45377,7 +46047,7 @@ function getGroupColor(group, groups) {
45377
46047
  const idx = groups.indexOf(group);
45378
46048
  return GROUP_COLORS2[idx % GROUP_COLORS2.length];
45379
46049
  }
45380
- function resolveColor2(color, el) {
46050
+ function resolveColor3(color, el) {
45381
46051
  const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
45382
46052
  if (!m) return color;
45383
46053
  const resolved = getComputedStyle(el).getPropertyValue(m[1]).trim();
@@ -45638,7 +46308,7 @@ var init_GraphCanvas = __esm({
45638
46308
  const w = logicalW;
45639
46309
  const h = height;
45640
46310
  const nodes = nodesRef.current;
45641
- const accentColor = resolveColor2("var(--color-accent)", canvas);
46311
+ const accentColor = resolveColor3("var(--color-accent)", canvas);
45642
46312
  const dpr = typeof window !== "undefined" && window.devicePixelRatio || 1;
45643
46313
  ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
45644
46314
  ctx.clearRect(0, 0, w, h);
@@ -45677,7 +46347,7 @@ var init_GraphCanvas = __esm({
45677
46347
  ctx.globalAlpha = 1;
45678
46348
  for (const node of nodes) {
45679
46349
  const size = node.size || 8;
45680
- const color = resolveColor2(node.color || getGroupColor(node.group, groups), canvas);
46350
+ const color = resolveColor3(node.color || getGroupColor(node.group, groups), canvas);
45681
46351
  const isHovered = hoveredNode === node.id;
45682
46352
  const isSelected = selectedNodeId !== void 0 && node.id === selectedNodeId;
45683
46353
  ctx.globalAlpha = hoveredNode && !neighbors.has(node.id) ? 0.2 : 1;
@@ -46111,6 +46781,10 @@ var init_molecules2 = __esm({
46111
46781
  init_LineChart();
46112
46782
  init_ProgressDots();
46113
46783
  init_molecules();
46784
+ init_MathCanvas();
46785
+ init_PhysicsCanvas();
46786
+ init_BiologyCanvas();
46787
+ init_ChemistryCanvas();
46114
46788
  init_GraphView();
46115
46789
  init_MapView();
46116
46790
  init_NumberStepper();
@@ -47124,7 +47798,7 @@ var init_DetailPanel = __esm({
47124
47798
  }
47125
47799
  });
47126
47800
  function extractTitle(children) {
47127
- if (!React80__default.isValidElement(children)) return void 0;
47801
+ if (!React79__default.isValidElement(children)) return void 0;
47128
47802
  const props = children.props;
47129
47803
  if (typeof props.title === "string") {
47130
47804
  return props.title;
@@ -47470,12 +48144,12 @@ var init_Form = __esm({
47470
48144
  const isSchemaEntity = isOrbitalEntitySchema(entity);
47471
48145
  const resolvedEntity = isSchemaEntity ? entity : void 0;
47472
48146
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
47473
- const normalizedInitialData = React80__default.useMemo(() => {
48147
+ const normalizedInitialData = React79__default.useMemo(() => {
47474
48148
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
47475
48149
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
47476
48150
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
47477
48151
  }, [entity, initialData]);
47478
- const entityDerivedFields = React80__default.useMemo(() => {
48152
+ const entityDerivedFields = React79__default.useMemo(() => {
47479
48153
  if (fields && fields.length > 0) return void 0;
47480
48154
  if (!resolvedEntity) return void 0;
47481
48155
  return resolvedEntity.fields.map(
@@ -47496,16 +48170,16 @@ var init_Form = __esm({
47496
48170
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
47497
48171
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
47498
48172
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
47499
- const [formData, setFormData] = React80__default.useState(
48173
+ const [formData, setFormData] = React79__default.useState(
47500
48174
  normalizedInitialData
47501
48175
  );
47502
- const [collapsedSections, setCollapsedSections] = React80__default.useState(
48176
+ const [collapsedSections, setCollapsedSections] = React79__default.useState(
47503
48177
  /* @__PURE__ */ new Set()
47504
48178
  );
47505
- const [submitError, setSubmitError] = React80__default.useState(null);
47506
- const formRef = React80__default.useRef(null);
48179
+ const [submitError, setSubmitError] = React79__default.useState(null);
48180
+ const formRef = React79__default.useRef(null);
47507
48181
  const formMode = props.mode;
47508
- const mountedRef = React80__default.useRef(false);
48182
+ const mountedRef = React79__default.useRef(false);
47509
48183
  if (!mountedRef.current) {
47510
48184
  mountedRef.current = true;
47511
48185
  debug("forms", "mount", {
@@ -47518,7 +48192,7 @@ var init_Form = __esm({
47518
48192
  });
47519
48193
  }
47520
48194
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
47521
- const evalContext = React80__default.useMemo(
48195
+ const evalContext = React79__default.useMemo(
47522
48196
  () => ({
47523
48197
  formValues: formData,
47524
48198
  globalVariables: externalContext?.globalVariables ?? {},
@@ -47527,7 +48201,7 @@ var init_Form = __esm({
47527
48201
  }),
47528
48202
  [formData, externalContext]
47529
48203
  );
47530
- React80__default.useEffect(() => {
48204
+ React79__default.useEffect(() => {
47531
48205
  debug("forms", "initialData-sync", {
47532
48206
  mode: formMode,
47533
48207
  normalizedInitialData,
@@ -47538,7 +48212,7 @@ var init_Form = __esm({
47538
48212
  setFormData(normalizedInitialData);
47539
48213
  }
47540
48214
  }, [normalizedInitialData]);
47541
- const processCalculations = React80__default.useCallback(
48215
+ const processCalculations = React79__default.useCallback(
47542
48216
  (changedFieldId, newFormData) => {
47543
48217
  if (!hiddenCalculations.length) return;
47544
48218
  const context = {
@@ -47563,7 +48237,7 @@ var init_Form = __esm({
47563
48237
  },
47564
48238
  [hiddenCalculations, externalContext, eventBus]
47565
48239
  );
47566
- const checkViolations = React80__default.useCallback(
48240
+ const checkViolations = React79__default.useCallback(
47567
48241
  (changedFieldId, newFormData) => {
47568
48242
  if (!violationTriggers.length) return;
47569
48243
  const context = {
@@ -47601,7 +48275,7 @@ var init_Form = __esm({
47601
48275
  processCalculations(name, newFormData);
47602
48276
  checkViolations(name, newFormData);
47603
48277
  };
47604
- const isFieldVisible = React80__default.useCallback(
48278
+ const isFieldVisible = React79__default.useCallback(
47605
48279
  (fieldName) => {
47606
48280
  const condition = conditionalFields[fieldName];
47607
48281
  if (!condition) return true;
@@ -47609,7 +48283,7 @@ var init_Form = __esm({
47609
48283
  },
47610
48284
  [conditionalFields, evalContext]
47611
48285
  );
47612
- const isSectionVisible = React80__default.useCallback(
48286
+ const isSectionVisible = React79__default.useCallback(
47613
48287
  (section) => {
47614
48288
  if (!section.condition) return true;
47615
48289
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -47685,7 +48359,7 @@ var init_Form = __esm({
47685
48359
  eventBus.emit(`UI:${onCancel}`);
47686
48360
  }
47687
48361
  };
47688
- const renderField = React80__default.useCallback(
48362
+ const renderField = React79__default.useCallback(
47689
48363
  (field) => {
47690
48364
  const fieldName = field.name || field.field;
47691
48365
  if (!fieldName) return null;
@@ -47706,7 +48380,7 @@ var init_Form = __esm({
47706
48380
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
47707
48381
  );
47708
48382
  const effectiveFields = entityDerivedFields ?? fields;
47709
- const normalizedFields = React80__default.useMemo(() => {
48383
+ const normalizedFields = React79__default.useMemo(() => {
47710
48384
  if (!effectiveFields || effectiveFields.length === 0) return [];
47711
48385
  return effectiveFields.map((field) => {
47712
48386
  if (typeof field === "string") {
@@ -47730,7 +48404,7 @@ var init_Form = __esm({
47730
48404
  return field;
47731
48405
  });
47732
48406
  }, [effectiveFields, resolvedEntity]);
47733
- const schemaFields = React80__default.useMemo(() => {
48407
+ const schemaFields = React79__default.useMemo(() => {
47734
48408
  if (normalizedFields.length === 0) return null;
47735
48409
  if (isDebugEnabled()) {
47736
48410
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -47740,7 +48414,7 @@ var init_Form = __esm({
47740
48414
  }
47741
48415
  return normalizedFields.map(renderField).filter(Boolean);
47742
48416
  }, [normalizedFields, renderField, entityName, conditionalFields]);
47743
- const sectionElements = React80__default.useMemo(() => {
48417
+ const sectionElements = React79__default.useMemo(() => {
47744
48418
  if (!sections || sections.length === 0) return null;
47745
48419
  return sections.map((section) => {
47746
48420
  if (!isSectionVisible(section)) {
@@ -48465,7 +49139,7 @@ var init_List = __esm({
48465
49139
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
48466
49140
  return [];
48467
49141
  }, [entity]);
48468
- const getItemActions = React80__default.useCallback(
49142
+ const getItemActions = React79__default.useCallback(
48469
49143
  (item) => {
48470
49144
  if (!itemActions) return [];
48471
49145
  if (typeof itemActions === "function") {
@@ -48940,7 +49614,7 @@ var init_MediaGallery = __esm({
48940
49614
  [selectable, selectedItems, selectionEvent, eventBus]
48941
49615
  );
48942
49616
  const entityData = Array.isArray(entity) ? entity : [];
48943
- const items = React80__default.useMemo(() => {
49617
+ const items = React79__default.useMemo(() => {
48944
49618
  if (propItems) return propItems;
48945
49619
  if (entityData.length === 0) return [];
48946
49620
  return entityData.map((record, idx) => {
@@ -49103,7 +49777,7 @@ var init_MediaGallery = __esm({
49103
49777
  }
49104
49778
  });
49105
49779
  function extractTitle2(children) {
49106
- if (!React80__default.isValidElement(children)) return void 0;
49780
+ if (!React79__default.isValidElement(children)) return void 0;
49107
49781
  const props = children.props;
49108
49782
  if (typeof props.title === "string") {
49109
49783
  return props.title;
@@ -49354,7 +50028,7 @@ var init_debugRegistry = __esm({
49354
50028
  }
49355
50029
  });
49356
50030
  function useDebugData() {
49357
- const [data, setData] = React80.useState(() => ({
50031
+ const [data, setData] = React79.useState(() => ({
49358
50032
  traits: [],
49359
50033
  ticks: [],
49360
50034
  guards: [],
@@ -49368,7 +50042,7 @@ function useDebugData() {
49368
50042
  },
49369
50043
  lastUpdate: Date.now()
49370
50044
  }));
49371
- React80.useEffect(() => {
50045
+ React79.useEffect(() => {
49372
50046
  const updateData = () => {
49373
50047
  setData({
49374
50048
  traits: getAllTraits(),
@@ -49477,12 +50151,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
49477
50151
  return positions;
49478
50152
  }
49479
50153
  function WalkMinimap() {
49480
- const [walkStep, setWalkStep] = React80.useState(null);
49481
- const [traits2, setTraits] = React80.useState([]);
49482
- const [coveredEdges, setCoveredEdges] = React80.useState([]);
49483
- const [completedTraits, setCompletedTraits] = React80.useState(/* @__PURE__ */ new Set());
49484
- const prevTraitRef = React80.useRef(null);
49485
- React80.useEffect(() => {
50154
+ const [walkStep, setWalkStep] = React79.useState(null);
50155
+ const [traits2, setTraits] = React79.useState([]);
50156
+ const [coveredEdges, setCoveredEdges] = React79.useState([]);
50157
+ const [completedTraits, setCompletedTraits] = React79.useState(/* @__PURE__ */ new Set());
50158
+ const prevTraitRef = React79.useRef(null);
50159
+ React79.useEffect(() => {
49486
50160
  const interval = setInterval(() => {
49487
50161
  const w = window;
49488
50162
  const step = w.__orbitalWalkStep;
@@ -49918,15 +50592,15 @@ var init_EntitiesTab = __esm({
49918
50592
  });
49919
50593
  function EventFlowTab({ events: events2 }) {
49920
50594
  const { t } = useTranslate();
49921
- const [filter, setFilter] = React80.useState("all");
49922
- const containerRef = React80.useRef(null);
49923
- const [autoScroll, setAutoScroll] = React80.useState(true);
49924
- React80.useEffect(() => {
50595
+ const [filter, setFilter] = React79.useState("all");
50596
+ const containerRef = React79.useRef(null);
50597
+ const [autoScroll, setAutoScroll] = React79.useState(true);
50598
+ React79.useEffect(() => {
49925
50599
  if (autoScroll && containerRef.current) {
49926
50600
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
49927
50601
  }
49928
50602
  }, [events2.length, autoScroll]);
49929
- const filteredEvents = React80.useMemo(() => {
50603
+ const filteredEvents = React79.useMemo(() => {
49930
50604
  if (filter === "all") return events2;
49931
50605
  return events2.filter((e) => e.type === filter);
49932
50606
  }, [events2, filter]);
@@ -50042,7 +50716,7 @@ var init_EventFlowTab = __esm({
50042
50716
  });
50043
50717
  function GuardsPanel({ guards }) {
50044
50718
  const { t } = useTranslate();
50045
- const [filter, setFilter] = React80.useState("all");
50719
+ const [filter, setFilter] = React79.useState("all");
50046
50720
  if (guards.length === 0) {
50047
50721
  return /* @__PURE__ */ jsx(
50048
50722
  EmptyState,
@@ -50055,7 +50729,7 @@ function GuardsPanel({ guards }) {
50055
50729
  }
50056
50730
  const passedCount = guards.filter((g) => g.result).length;
50057
50731
  const failedCount = guards.length - passedCount;
50058
- const filteredGuards = React80.useMemo(() => {
50732
+ const filteredGuards = React79.useMemo(() => {
50059
50733
  if (filter === "all") return guards;
50060
50734
  if (filter === "passed") return guards.filter((g) => g.result);
50061
50735
  return guards.filter((g) => !g.result);
@@ -50218,10 +50892,10 @@ function EffectBadge({ effect }) {
50218
50892
  }
50219
50893
  function TransitionTimeline({ transitions }) {
50220
50894
  const { t } = useTranslate();
50221
- const containerRef = React80.useRef(null);
50222
- const [autoScroll, setAutoScroll] = React80.useState(true);
50223
- const [expandedId, setExpandedId] = React80.useState(null);
50224
- React80.useEffect(() => {
50895
+ const containerRef = React79.useRef(null);
50896
+ const [autoScroll, setAutoScroll] = React79.useState(true);
50897
+ const [expandedId, setExpandedId] = React79.useState(null);
50898
+ React79.useEffect(() => {
50225
50899
  if (autoScroll && containerRef.current) {
50226
50900
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
50227
50901
  }
@@ -50501,9 +51175,9 @@ function getAllEvents(traits2) {
50501
51175
  function EventDispatcherTab({ traits: traits2, schema }) {
50502
51176
  const eventBus = useEventBus();
50503
51177
  const { t } = useTranslate();
50504
- const [log18, setLog] = React80.useState([]);
50505
- const prevStatesRef = React80.useRef(/* @__PURE__ */ new Map());
50506
- React80.useEffect(() => {
51178
+ const [log18, setLog] = React79.useState([]);
51179
+ const prevStatesRef = React79.useRef(/* @__PURE__ */ new Map());
51180
+ React79.useEffect(() => {
50507
51181
  for (const trait of traits2) {
50508
51182
  const prev = prevStatesRef.current.get(trait.id);
50509
51183
  if (prev && prev !== trait.currentState) {
@@ -50672,10 +51346,10 @@ function VerifyModePanel({
50672
51346
  localCount
50673
51347
  }) {
50674
51348
  const { t } = useTranslate();
50675
- const [expanded, setExpanded] = React80.useState(true);
50676
- const scrollRef = React80.useRef(null);
50677
- const prevCountRef = React80.useRef(0);
50678
- React80.useEffect(() => {
51349
+ const [expanded, setExpanded] = React79.useState(true);
51350
+ const scrollRef = React79.useRef(null);
51351
+ const prevCountRef = React79.useRef(0);
51352
+ React79.useEffect(() => {
50679
51353
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
50680
51354
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
50681
51355
  }
@@ -50732,10 +51406,10 @@ function RuntimeDebugger({
50732
51406
  schema
50733
51407
  }) {
50734
51408
  const { t } = useTranslate();
50735
- const [isCollapsed, setIsCollapsed] = React80.useState(mode === "verify" ? true : defaultCollapsed);
50736
- const [isVisible, setIsVisible] = React80.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
51409
+ const [isCollapsed, setIsCollapsed] = React79.useState(mode === "verify" ? true : defaultCollapsed);
51410
+ const [isVisible, setIsVisible] = React79.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
50737
51411
  const debugData = useDebugData();
50738
- React80.useEffect(() => {
51412
+ React79.useEffect(() => {
50739
51413
  if (mode === "inline") return;
50740
51414
  return onDebugToggle((enabled) => {
50741
51415
  setIsVisible(enabled);
@@ -50744,7 +51418,7 @@ function RuntimeDebugger({
50744
51418
  }
50745
51419
  });
50746
51420
  }, [mode]);
50747
- React80.useEffect(() => {
51421
+ React79.useEffect(() => {
50748
51422
  if (mode === "inline") return;
50749
51423
  const handleKeyDown = (e) => {
50750
51424
  if (e.key === "`" && isVisible) {
@@ -51264,7 +51938,7 @@ var init_StatCard = __esm({
51264
51938
  const labelToUse = propLabel ?? propTitle;
51265
51939
  const eventBus = useEventBus();
51266
51940
  const { t } = useTranslate();
51267
- const handleActionClick = React80__default.useCallback(() => {
51941
+ const handleActionClick = React79__default.useCallback(() => {
51268
51942
  if (action?.event) {
51269
51943
  eventBus.emit(`UI:${action.event}`, {});
51270
51944
  }
@@ -51275,7 +51949,7 @@ var init_StatCard = __esm({
51275
51949
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
51276
51950
  const isLoading = externalLoading ?? false;
51277
51951
  const error = externalError;
51278
- const computeMetricValue = React80__default.useCallback(
51952
+ const computeMetricValue = React79__default.useCallback(
51279
51953
  (metric, items) => {
51280
51954
  if (metric.value !== void 0) {
51281
51955
  return metric.value;
@@ -51314,7 +51988,7 @@ var init_StatCard = __esm({
51314
51988
  },
51315
51989
  []
51316
51990
  );
51317
- const schemaStats = React80__default.useMemo(() => {
51991
+ const schemaStats = React79__default.useMemo(() => {
51318
51992
  if (!metrics || metrics.length === 0) return null;
51319
51993
  return metrics.map((metric) => ({
51320
51994
  label: metric.label,
@@ -51322,7 +51996,7 @@ var init_StatCard = __esm({
51322
51996
  format: metric.format
51323
51997
  }));
51324
51998
  }, [metrics, data, computeMetricValue]);
51325
- const calculatedTrend = React80__default.useMemo(() => {
51999
+ const calculatedTrend = React79__default.useMemo(() => {
51326
52000
  if (manualTrend !== void 0) return manualTrend;
51327
52001
  if (previousValue === void 0 || currentValue2 === void 0)
51328
52002
  return void 0;
@@ -51962,8 +52636,8 @@ var init_SubagentTracePanel = __esm({
51962
52636
  ] });
51963
52637
  };
51964
52638
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
51965
- const endRef = React80__default.useRef(null);
51966
- React80__default.useEffect(() => {
52639
+ const endRef = React79__default.useRef(null);
52640
+ React79__default.useEffect(() => {
51967
52641
  if (!autoScroll) return;
51968
52642
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
51969
52643
  }, [activities.length, autoScroll]);
@@ -52057,7 +52731,7 @@ var init_SubagentTracePanel = __esm({
52057
52731
  };
52058
52732
  SubagentRichCard = ({ subagent }) => {
52059
52733
  const { t } = useTranslate();
52060
- const activities = React80__default.useMemo(
52734
+ const activities = React79__default.useMemo(
52061
52735
  () => subagentMessagesToActivities(subagent.messages),
52062
52736
  [subagent.messages]
52063
52737
  );
@@ -52134,8 +52808,8 @@ var init_SubagentTracePanel = __esm({
52134
52808
  ] });
52135
52809
  };
52136
52810
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
52137
- const endRef = React80__default.useRef(null);
52138
- React80__default.useEffect(() => {
52811
+ const endRef = React79__default.useRef(null);
52812
+ React79__default.useEffect(() => {
52139
52813
  if (!autoScroll) return;
52140
52814
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
52141
52815
  }, [messages.length, autoScroll]);
@@ -52565,7 +53239,7 @@ var init_Timeline = __esm({
52565
53239
  }) => {
52566
53240
  const { t } = useTranslate();
52567
53241
  const entityData = entity ?? [];
52568
- const items = React80__default.useMemo(() => {
53242
+ const items = React79__default.useMemo(() => {
52569
53243
  if (propItems) return propItems;
52570
53244
  if (entityData.length === 0) return [];
52571
53245
  return entityData.map((record, idx) => {
@@ -52667,7 +53341,7 @@ var init_Timeline = __esm({
52667
53341
  }
52668
53342
  });
52669
53343
  function extractToastProps(children) {
52670
- if (!React80__default.isValidElement(children)) {
53344
+ if (!React79__default.isValidElement(children)) {
52671
53345
  if (typeof children === "string") {
52672
53346
  return { message: children };
52673
53347
  }
@@ -52705,7 +53379,7 @@ var init_ToastSlot = __esm({
52705
53379
  eventBus.emit("UI:CLOSE");
52706
53380
  };
52707
53381
  if (!isVisible) return null;
52708
- const isCustomContent = React80__default.isValidElement(children) && !message;
53382
+ const isCustomContent = React79__default.isValidElement(children) && !message;
52709
53383
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
52710
53384
  Toast,
52711
53385
  {
@@ -52722,7 +53396,7 @@ var init_ToastSlot = __esm({
52722
53396
  }
52723
53397
  });
52724
53398
  function lazyThree(name, loader) {
52725
- const Lazy = React80__default.lazy(
53399
+ const Lazy = React79__default.lazy(
52726
53400
  () => loader().then((m) => {
52727
53401
  const Resolved = m[name];
52728
53402
  if (!Resolved) {
@@ -52734,13 +53408,13 @@ function lazyThree(name, loader) {
52734
53408
  })
52735
53409
  );
52736
53410
  function ThreeWrapper(props) {
52737
- return React80__default.createElement(
53411
+ return React79__default.createElement(
52738
53412
  ThreeBoundary,
52739
53413
  { name },
52740
- React80__default.createElement(
52741
- React80__default.Suspense,
53414
+ React79__default.createElement(
53415
+ React79__default.Suspense,
52742
53416
  { fallback: null },
52743
- React80__default.createElement(Lazy, props)
53417
+ React79__default.createElement(Lazy, props)
52744
53418
  )
52745
53419
  );
52746
53420
  }
@@ -52757,7 +53431,7 @@ var init_component_registry_generated = __esm({
52757
53431
  init_ActionTile();
52758
53432
  init_ActivationBlock();
52759
53433
  init_ComponentPatterns();
52760
- init_AnimatedCounter2();
53434
+ init_AnimatedCounter();
52761
53435
  init_AnimatedGraphic();
52762
53436
  init_AnimatedReveal();
52763
53437
  init_ArticleSection();
@@ -52768,6 +53442,7 @@ var init_component_registry_generated = __esm({
52768
53442
  init_BattleBoard();
52769
53443
  init_BattleTemplate();
52770
53444
  init_BehaviorView();
53445
+ init_BiologyCanvas();
52771
53446
  init_BloomQuizBlock();
52772
53447
  init_BoardgameBoard();
52773
53448
  init_BookChapterView();
@@ -52797,6 +53472,7 @@ var init_component_registry_generated = __esm({
52797
53472
  init_ChartLegend();
52798
53473
  init_ChatBar();
52799
53474
  init_Checkbox();
53475
+ init_ChemistryCanvas();
52800
53476
  init_ChoiceButton();
52801
53477
  init_CityBuilderBoard();
52802
53478
  init_CityBuilderTemplate();
@@ -52888,6 +53564,7 @@ var init_component_registry_generated = __esm({
52888
53564
  init_JazariStateMachine();
52889
53565
  init_LandingPageTemplate();
52890
53566
  init_LawReferenceTooltip();
53567
+ init_LearningCanvas();
52891
53568
  init_Lightbox();
52892
53569
  init_LikertScale();
52893
53570
  init_LineChart();
@@ -52896,9 +53573,11 @@ var init_component_registry_generated = __esm({
52896
53573
  init_MapView();
52897
53574
  init_MarkdownContent();
52898
53575
  init_MarketingFooter();
53576
+ init_MarketingStatCard();
52899
53577
  init_MasterDetail();
52900
53578
  init_MasterDetailLayout();
52901
53579
  init_MatchPuzzleBoard();
53580
+ init_MathCanvas();
52902
53581
  init_MatrixQuestion();
52903
53582
  init_MediaGallery();
52904
53583
  init_Menu();
@@ -52917,6 +53596,7 @@ var init_component_registry_generated = __esm({
52917
53596
  init_PageHeader();
52918
53597
  init_Pagination();
52919
53598
  init_PatternTile();
53599
+ init_PhysicsCanvas();
52920
53600
  init_PinballBoard();
52921
53601
  init_PirateBoard();
52922
53602
  init_PlatformerBoard();
@@ -53046,7 +53726,7 @@ var init_component_registry_generated = __esm({
53046
53726
  init_WizardProgress();
53047
53727
  init_WorldMapBoard();
53048
53728
  init_WorldMapTemplate();
53049
- ThreeBoundary = class extends React80__default.Component {
53729
+ ThreeBoundary = class extends React79__default.Component {
53050
53730
  constructor() {
53051
53731
  super(...arguments);
53052
53732
  __publicField(this, "state", { failed: false });
@@ -53056,7 +53736,7 @@ var init_component_registry_generated = __esm({
53056
53736
  }
53057
53737
  render() {
53058
53738
  if (this.state.failed) {
53059
- return React80__default.createElement(
53739
+ return React79__default.createElement(
53060
53740
  "div",
53061
53741
  {
53062
53742
  "data-testid": "three-unavailable",
@@ -53082,7 +53762,7 @@ var init_component_registry_generated = __esm({
53082
53762
  "ActivationBlock": ActivationBlock,
53083
53763
  "Alert": AlertPattern,
53084
53764
  "AlertPattern": AlertPattern,
53085
- "AnimatedCounter": AnimatedCounter2,
53765
+ "AnimatedCounter": AnimatedCounter,
53086
53766
  "AnimatedGraphic": AnimatedGraphic,
53087
53767
  "AnimatedReveal": AnimatedReveal,
53088
53768
  "ArticleSection": ArticleSection,
@@ -53093,6 +53773,7 @@ var init_component_registry_generated = __esm({
53093
53773
  "BattleBoard": BattleBoard,
53094
53774
  "BattleTemplate": BattleTemplate,
53095
53775
  "BehaviorView": BehaviorView,
53776
+ "BiologyCanvas": BiologyCanvas,
53096
53777
  "BloomQuizBlock": BloomQuizBlock,
53097
53778
  "BoardgameBoard": BoardgameBoard,
53098
53779
  "BookChapterView": BookChapterView,
@@ -53125,6 +53806,7 @@ var init_component_registry_generated = __esm({
53125
53806
  "ChartLegend": ChartLegend,
53126
53807
  "ChatBar": ChatBar,
53127
53808
  "Checkbox": Checkbox,
53809
+ "ChemistryCanvas": ChemistryCanvas,
53128
53810
  "ChoiceButton": ChoiceButton,
53129
53811
  "CityBuilderBoard": CityBuilderBoard,
53130
53812
  "CityBuilderTemplate": CityBuilderTemplate,
@@ -53226,6 +53908,7 @@ var init_component_registry_generated = __esm({
53226
53908
  "LabelPattern": LabelPattern,
53227
53909
  "LandingPageTemplate": LandingPageTemplate,
53228
53910
  "LawReferenceTooltip": LawReferenceTooltip,
53911
+ "LearningCanvas": LearningCanvas,
53229
53912
  "Lightbox": Lightbox,
53230
53913
  "LikertScale": LikertScale,
53231
53914
  "LineChart": LineChart2,
@@ -53234,9 +53917,11 @@ var init_component_registry_generated = __esm({
53234
53917
  "MapView": MapView,
53235
53918
  "MarkdownContent": MarkdownContent,
53236
53919
  "MarketingFooter": MarketingFooter,
53920
+ "MarketingStatCard": MarketingStatCard,
53237
53921
  "MasterDetail": MasterDetail,
53238
53922
  "MasterDetailLayout": MasterDetailLayout,
53239
53923
  "MatchPuzzleBoard": MatchPuzzleBoard,
53924
+ "MathCanvas": MathCanvas,
53240
53925
  "MatrixQuestion": MatrixQuestion,
53241
53926
  "MediaGallery": MediaGallery,
53242
53927
  "Menu": Menu,
@@ -53255,6 +53940,7 @@ var init_component_registry_generated = __esm({
53255
53940
  "PageHeader": PageHeader,
53256
53941
  "Pagination": Pagination,
53257
53942
  "PatternTile": PatternTile,
53943
+ "PhysicsCanvas": PhysicsCanvas,
53258
53944
  "PinballBoard": PinballBoard,
53259
53945
  "PirateBoard": PirateBoard,
53260
53946
  "PlatformerBoard": PlatformerBoard,
@@ -53406,7 +54092,7 @@ function SuspenseConfigProvider({
53406
54092
  config,
53407
54093
  children
53408
54094
  }) {
53409
- return React80__default.createElement(
54095
+ return React79__default.createElement(
53410
54096
  SuspenseConfigContext.Provider,
53411
54097
  { value: config },
53412
54098
  children
@@ -53448,7 +54134,7 @@ function enrichFormFields(fields, entityDef) {
53448
54134
  }
53449
54135
  return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
53450
54136
  }
53451
- if (field && typeof field === "object" && !Array.isArray(field) && !React80__default.isValidElement(field) && !(field instanceof Date)) {
54137
+ if (field && typeof field === "object" && !Array.isArray(field) && !React79__default.isValidElement(field) && !(field instanceof Date)) {
53452
54138
  const obj = field;
53453
54139
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
53454
54140
  if (!fieldName) return field;
@@ -53894,7 +54580,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
53894
54580
  const key = `${parentId}-${index}-trait:${traitName}`;
53895
54581
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
53896
54582
  }
53897
- return /* @__PURE__ */ jsx(React80__default.Fragment, { children: child }, `${parentId}-${index}`);
54583
+ return /* @__PURE__ */ jsx(React79__default.Fragment, { children: child }, `${parentId}-${index}`);
53898
54584
  }
53899
54585
  if (!child || typeof child !== "object") return null;
53900
54586
  const childId = `${parentId}-${index}`;
@@ -53934,14 +54620,14 @@ function isPatternConfig(value) {
53934
54620
  if (value === null || value === void 0) return false;
53935
54621
  if (typeof value !== "object") return false;
53936
54622
  if (Array.isArray(value)) return false;
53937
- if (React80__default.isValidElement(value)) return false;
54623
+ if (React79__default.isValidElement(value)) return false;
53938
54624
  if (value instanceof Date) return false;
53939
54625
  if (typeof value === "function") return false;
53940
54626
  const record = value;
53941
54627
  return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
53942
54628
  }
53943
54629
  function isPlainConfigObject(value) {
53944
- if (React80__default.isValidElement(value)) return false;
54630
+ if (React79__default.isValidElement(value)) return false;
53945
54631
  if (value instanceof Date) return false;
53946
54632
  const proto = Object.getPrototypeOf(value);
53947
54633
  return proto === Object.prototype || proto === null;
@@ -54067,7 +54753,7 @@ function SlotContentRenderer({
54067
54753
  for (const slotKey of CONTENT_NODE_SLOTS) {
54068
54754
  const slotVal = restProps[slotKey];
54069
54755
  if (slotVal === void 0 || slotVal === null) continue;
54070
- if (React80__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
54756
+ if (React79__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
54071
54757
  if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
54072
54758
  nodeSlotOverrides[slotKey] = renderPatternChildren(
54073
54759
  slotVal,
@@ -54116,7 +54802,7 @@ function SlotContentRenderer({
54116
54802
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
54117
54803
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
54118
54804
  const sample = resolvedItems[0];
54119
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React80__default.isValidElement(sample) && !(sample instanceof Date)) {
54805
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React79__default.isValidElement(sample) && !(sample instanceof Date)) {
54120
54806
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
54121
54807
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
54122
54808
  }
@@ -54412,6 +55098,7 @@ var init_atoms = __esm({
54412
55098
  init_AnimatedGraphic();
54413
55099
  init_TraitFrame();
54414
55100
  init_molecules();
55101
+ init_LearningCanvas();
54415
55102
  }
54416
55103
  });
54417
55104
 
@@ -56615,4 +57302,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
56615
57302
  });
56616
57303
  }
56617
57304
 
56618
- 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 };
57305
+ 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 };