@almadar/ui 5.33.0 → 5.34.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.
@@ -1,12 +1,12 @@
1
- import * as React80 from 'react';
2
- import React80__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
1
+ import * as React83 from 'react';
2
+ import React83__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
3
3
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
8
8
  import * as LucideIcons2 from 'lucide-react';
9
- import { Loader2, X, List, Printer, ChevronRight, ChevronLeft, GitBranch, Pencil, Eye, Plus, ArrowRight, Trash, Code, FileText, WrapText, Check, Copy, AlertTriangle, Trash2, ZoomOut, ZoomIn, Download, RotateCcw, Menu as Menu$1, Package, Calendar, MoreHorizontal, Image as Image$1, Upload, ArrowLeft, HelpCircle, Search, Type, Heading1, Heading2, Heading3, ListOrdered, Quote, Minus, Eraser, TrendingUp, TrendingDown, AlertCircle, Circle, Clock, CheckCircle2, CheckCircle, XCircle, Play, Pause, SkipForward, Bug, Send, ChevronUp, ChevronDown, Wrench, Tag, User, DollarSign, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
9
+ import { Loader2, X, Lightbulb, CheckCircle, List, Printer, ChevronRight, ChevronLeft, GitBranch, Pencil, Eye, Plus, ArrowRight, Trash, Code, FileText, WrapText, Check, Copy, RotateCcw, Play, Terminal, XCircle, AlertTriangle, Trash2, Link2, ZoomOut, ZoomIn, Download, Menu as Menu$1, Package, Calendar, MoreHorizontal, Image as Image$1, Upload, ArrowLeft, HelpCircle, PauseCircle, Search, Type, Heading1, Heading2, Heading3, ListOrdered, Quote, Minus, Eraser, TrendingUp, TrendingDown, AlertCircle, Circle, Clock, CheckCircle2, Pause, SkipForward, Bug, Send, ChevronUp, ChevronDown, Wrench, Tag, User, DollarSign, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
10
10
  import * as PhosphorIcons from '@phosphor-icons/react';
11
11
  import * as TablerIcons from '@tabler/icons-react';
12
12
  import * as FaIcons from 'react-icons/fa';
@@ -657,7 +657,7 @@ var init_Box = __esm({
657
657
  fixed: "fixed",
658
658
  sticky: "sticky"
659
659
  };
660
- Box = React80__default.forwardRef(
660
+ Box = React83__default.forwardRef(
661
661
  ({
662
662
  padding,
663
663
  paddingX,
@@ -707,7 +707,7 @@ var init_Box = __esm({
707
707
  onMouseLeave?.(e);
708
708
  }, [hoverEvent, eventBus, onMouseLeave]);
709
709
  const isClickable = action || onClick;
710
- return React80__default.createElement(
710
+ return React83__default.createElement(
711
711
  Component,
712
712
  {
713
713
  ref,
@@ -1498,7 +1498,7 @@ var init_Icon = __esm({
1498
1498
  const directIcon = typeof icon === "string" ? void 0 : icon;
1499
1499
  const effectiveName = typeof icon === "string" ? icon : name;
1500
1500
  const family = useIconFamily();
1501
- const RenderedComponent = React80__default.useMemo(() => {
1501
+ const RenderedComponent = React83__default.useMemo(() => {
1502
1502
  if (directIcon) return null;
1503
1503
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
1504
1504
  }, [directIcon, effectiveName, family]);
@@ -1557,7 +1557,7 @@ function resolveIconProp(value, sizeClass) {
1557
1557
  const IconComp = value;
1558
1558
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1559
1559
  }
1560
- if (React80__default.isValidElement(value)) {
1560
+ if (React83__default.isValidElement(value)) {
1561
1561
  return value;
1562
1562
  }
1563
1563
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -1633,7 +1633,7 @@ var init_Button = __esm({
1633
1633
  md: "h-icon-default w-icon-default",
1634
1634
  lg: "h-icon-default w-icon-default"
1635
1635
  };
1636
- Button = React80__default.forwardRef(
1636
+ Button = React83__default.forwardRef(
1637
1637
  ({
1638
1638
  className,
1639
1639
  variant = "primary",
@@ -1698,7 +1698,7 @@ var Dialog;
1698
1698
  var init_Dialog = __esm({
1699
1699
  "components/core/atoms/Dialog.tsx"() {
1700
1700
  init_cn();
1701
- Dialog = React80__default.forwardRef(
1701
+ Dialog = React83__default.forwardRef(
1702
1702
  ({
1703
1703
  role = "dialog",
1704
1704
  "aria-modal": ariaModal = true,
@@ -2312,7 +2312,7 @@ var init_Badge = __esm({
2312
2312
  md: "px-2.5 py-1 text-sm",
2313
2313
  lg: "px-3 py-1.5 text-base"
2314
2314
  };
2315
- Badge = React80__default.forwardRef(
2315
+ Badge = React83__default.forwardRef(
2316
2316
  ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
2317
2317
  const iconSizes3 = {
2318
2318
  sm: "h-icon-default w-icon-default",
@@ -2648,7 +2648,7 @@ var init_SvgFlow = __esm({
2648
2648
  width = 100,
2649
2649
  height = 100
2650
2650
  }) => {
2651
- const markerId = React80__default.useMemo(() => {
2651
+ const markerId = React83__default.useMemo(() => {
2652
2652
  flowIdCounter += 1;
2653
2653
  return `almadar-flow-arrow-${flowIdCounter}`;
2654
2654
  }, []);
@@ -3241,7 +3241,7 @@ var init_SvgRing = __esm({
3241
3241
  width = 100,
3242
3242
  height = 100
3243
3243
  }) => {
3244
- const gradientId = React80__default.useMemo(() => {
3244
+ const gradientId = React83__default.useMemo(() => {
3245
3245
  ringIdCounter += 1;
3246
3246
  return `almadar-ring-glow-${ringIdCounter}`;
3247
3247
  }, []);
@@ -3422,7 +3422,7 @@ var init_Input = __esm({
3422
3422
  init_cn();
3423
3423
  init_Icon();
3424
3424
  init_useEventBus();
3425
- Input = React80__default.forwardRef(
3425
+ Input = React83__default.forwardRef(
3426
3426
  ({
3427
3427
  className,
3428
3428
  inputType,
@@ -3582,7 +3582,7 @@ var Label;
3582
3582
  var init_Label = __esm({
3583
3583
  "components/core/atoms/Label.tsx"() {
3584
3584
  init_cn();
3585
- Label = React80__default.forwardRef(
3585
+ Label = React83__default.forwardRef(
3586
3586
  ({ className, required, children, ...props }, ref) => {
3587
3587
  return /* @__PURE__ */ jsxs(
3588
3588
  "label",
@@ -3609,7 +3609,7 @@ var init_Textarea = __esm({
3609
3609
  "components/core/atoms/Textarea.tsx"() {
3610
3610
  init_cn();
3611
3611
  init_useEventBus();
3612
- Textarea = React80__default.forwardRef(
3612
+ Textarea = React83__default.forwardRef(
3613
3613
  ({ className, error, onChange, ...props }, ref) => {
3614
3614
  const eventBus = useEventBus();
3615
3615
  const handleChange = (e) => {
@@ -3848,7 +3848,7 @@ var init_Select = __esm({
3848
3848
  init_cn();
3849
3849
  init_Icon();
3850
3850
  init_useEventBus();
3851
- Select = React80__default.forwardRef(
3851
+ Select = React83__default.forwardRef(
3852
3852
  (props, _ref) => {
3853
3853
  const { multiple, searchable, clearable } = props;
3854
3854
  if (multiple || searchable || clearable) {
@@ -3865,7 +3865,7 @@ var init_Checkbox = __esm({
3865
3865
  "components/core/atoms/Checkbox.tsx"() {
3866
3866
  init_cn();
3867
3867
  init_useEventBus();
3868
- Checkbox = React80__default.forwardRef(
3868
+ Checkbox = React83__default.forwardRef(
3869
3869
  ({ className, label, id, onChange, ...props }, ref) => {
3870
3870
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
3871
3871
  const eventBus = useEventBus();
@@ -3919,7 +3919,7 @@ var init_Spinner = __esm({
3919
3919
  md: "h-6 w-6",
3920
3920
  lg: "h-8 w-8"
3921
3921
  };
3922
- Spinner = React80__default.forwardRef(
3922
+ Spinner = React83__default.forwardRef(
3923
3923
  ({ className, size = "md", overlay, ...props }, ref) => {
3924
3924
  if (overlay) {
3925
3925
  return /* @__PURE__ */ jsx(
@@ -4009,7 +4009,7 @@ var init_Card = __esm({
4009
4009
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
4010
4010
  "tile-image-first": "p-0 overflow-hidden"
4011
4011
  };
4012
- Card = React80__default.forwardRef(
4012
+ Card = React83__default.forwardRef(
4013
4013
  ({
4014
4014
  className,
4015
4015
  variant = "bordered",
@@ -4057,9 +4057,9 @@ var init_Card = __esm({
4057
4057
  }
4058
4058
  );
4059
4059
  Card.displayName = "Card";
4060
- CardHeader = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
4060
+ CardHeader = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
4061
4061
  CardHeader.displayName = "CardHeader";
4062
- CardTitle = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4062
+ CardTitle = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4063
4063
  "h3",
4064
4064
  {
4065
4065
  ref,
@@ -4072,11 +4072,11 @@ var init_Card = __esm({
4072
4072
  }
4073
4073
  ));
4074
4074
  CardTitle.displayName = "CardTitle";
4075
- CardContent = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
4075
+ CardContent = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
4076
4076
  CardContent.displayName = "CardContent";
4077
4077
  CardBody = CardContent;
4078
4078
  CardBody.displayName = "CardBody";
4079
- CardFooter = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4079
+ CardFooter = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4080
4080
  "div",
4081
4081
  {
4082
4082
  ref,
@@ -4131,7 +4131,7 @@ var init_FilterPill = __esm({
4131
4131
  md: "w-3.5 h-3.5",
4132
4132
  lg: "w-4 h-4"
4133
4133
  };
4134
- FilterPill = React80__default.forwardRef(
4134
+ FilterPill = React83__default.forwardRef(
4135
4135
  ({
4136
4136
  className,
4137
4137
  variant = "default",
@@ -4260,8 +4260,8 @@ var init_Avatar = __esm({
4260
4260
  actionPayload
4261
4261
  }) => {
4262
4262
  const eventBus = useEventBus();
4263
- const [imgFailed, setImgFailed] = React80__default.useState(false);
4264
- React80__default.useEffect(() => {
4263
+ const [imgFailed, setImgFailed] = React83__default.useState(false);
4264
+ React83__default.useEffect(() => {
4265
4265
  setImgFailed(false);
4266
4266
  }, [src]);
4267
4267
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -4646,7 +4646,7 @@ var init_Radio = __esm({
4646
4646
  md: "w-2.5 h-2.5",
4647
4647
  lg: "w-3 h-3"
4648
4648
  };
4649
- Radio = React80__default.forwardRef(
4649
+ Radio = React83__default.forwardRef(
4650
4650
  ({
4651
4651
  label,
4652
4652
  helperText,
@@ -4663,12 +4663,12 @@ var init_Radio = __esm({
4663
4663
  onChange,
4664
4664
  ...props
4665
4665
  }, ref) => {
4666
- const reactId = React80__default.useId();
4666
+ const reactId = React83__default.useId();
4667
4667
  const baseId = id || `radio-${reactId}`;
4668
4668
  const hasError = !!error;
4669
4669
  const eventBus = useEventBus();
4670
- const [selected, setSelected] = React80__default.useState(value);
4671
- React80__default.useEffect(() => {
4670
+ const [selected, setSelected] = React83__default.useState(value);
4671
+ React83__default.useEffect(() => {
4672
4672
  if (value !== void 0) setSelected(value);
4673
4673
  }, [value]);
4674
4674
  const pick = (next, e) => {
@@ -4850,7 +4850,7 @@ var init_Switch = __esm({
4850
4850
  "components/core/atoms/Switch.tsx"() {
4851
4851
  "use client";
4852
4852
  init_cn();
4853
- Switch = React80.forwardRef(
4853
+ Switch = React83.forwardRef(
4854
4854
  ({
4855
4855
  checked,
4856
4856
  defaultChecked = false,
@@ -4861,10 +4861,10 @@ var init_Switch = __esm({
4861
4861
  name,
4862
4862
  className
4863
4863
  }, ref) => {
4864
- const [isChecked, setIsChecked] = React80.useState(
4864
+ const [isChecked, setIsChecked] = React83.useState(
4865
4865
  checked !== void 0 ? checked : defaultChecked
4866
4866
  );
4867
- React80.useEffect(() => {
4867
+ React83.useEffect(() => {
4868
4868
  if (checked !== void 0) {
4869
4869
  setIsChecked(checked);
4870
4870
  }
@@ -5220,7 +5220,7 @@ var Aside;
5220
5220
  var init_Aside = __esm({
5221
5221
  "components/core/atoms/Aside.tsx"() {
5222
5222
  init_cn();
5223
- Aside = React80__default.forwardRef(
5223
+ Aside = React83__default.forwardRef(
5224
5224
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
5225
5225
  );
5226
5226
  Aside.displayName = "Aside";
@@ -5298,8 +5298,8 @@ var init_LawReferenceTooltip = __esm({
5298
5298
  className
5299
5299
  }) => {
5300
5300
  const { t } = useTranslate();
5301
- const [isVisible, setIsVisible] = React80__default.useState(false);
5302
- const timeoutRef = React80__default.useRef(null);
5301
+ const [isVisible, setIsVisible] = React83__default.useState(false);
5302
+ const timeoutRef = React83__default.useRef(null);
5303
5303
  const handleMouseEnter = () => {
5304
5304
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5305
5305
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -5308,7 +5308,7 @@ var init_LawReferenceTooltip = __esm({
5308
5308
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5309
5309
  setIsVisible(false);
5310
5310
  };
5311
- React80__default.useEffect(() => {
5311
+ React83__default.useEffect(() => {
5312
5312
  return () => {
5313
5313
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
5314
5314
  };
@@ -5518,7 +5518,7 @@ var init_StatusDot = __esm({
5518
5518
  md: "w-2.5 h-2.5",
5519
5519
  lg: "w-3 h-3"
5520
5520
  };
5521
- StatusDot = React80__default.forwardRef(
5521
+ StatusDot = React83__default.forwardRef(
5522
5522
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
5523
5523
  return /* @__PURE__ */ jsx(
5524
5524
  "span",
@@ -5572,7 +5572,7 @@ var init_TrendIndicator = __esm({
5572
5572
  down: "trending-down",
5573
5573
  flat: "arrow-right"
5574
5574
  };
5575
- TrendIndicator = React80__default.forwardRef(
5575
+ TrendIndicator = React83__default.forwardRef(
5576
5576
  ({
5577
5577
  className,
5578
5578
  value,
@@ -5639,7 +5639,7 @@ var init_RangeSlider = __esm({
5639
5639
  md: "w-4 h-4",
5640
5640
  lg: "w-5 h-5"
5641
5641
  };
5642
- RangeSlider = React80__default.forwardRef(
5642
+ RangeSlider = React83__default.forwardRef(
5643
5643
  ({
5644
5644
  className,
5645
5645
  min = 0,
@@ -6147,7 +6147,7 @@ var init_ContentSection = __esm({
6147
6147
  md: "py-16",
6148
6148
  lg: "py-24"
6149
6149
  };
6150
- ContentSection = React80__default.forwardRef(
6150
+ ContentSection = React83__default.forwardRef(
6151
6151
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
6152
6152
  return /* @__PURE__ */ jsx(
6153
6153
  Box,
@@ -6681,7 +6681,7 @@ var init_AnimatedReveal = __esm({
6681
6681
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6682
6682
  "none": {}
6683
6683
  };
6684
- AnimatedReveal = React80__default.forwardRef(
6684
+ AnimatedReveal = React83__default.forwardRef(
6685
6685
  ({
6686
6686
  trigger = "scroll",
6687
6687
  animation = "fade-up",
@@ -6841,7 +6841,7 @@ var init_AnimatedGraphic = __esm({
6841
6841
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6842
6842
  "use client";
6843
6843
  init_cn();
6844
- AnimatedGraphic = React80__default.forwardRef(
6844
+ AnimatedGraphic = React83__default.forwardRef(
6845
6845
  ({
6846
6846
  src,
6847
6847
  svgContent,
@@ -6864,7 +6864,7 @@ var init_AnimatedGraphic = __esm({
6864
6864
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6865
6865
  const resolvedSvg = svgContent ?? fetchedSvg;
6866
6866
  const prevAnimateRef = useRef(animate);
6867
- const setRef = React80__default.useCallback(
6867
+ const setRef = React83__default.useCallback(
6868
6868
  (node) => {
6869
6869
  containerRef.current = node;
6870
6870
  if (typeof ref === "function") ref(node);
@@ -7089,9 +7089,9 @@ function ScoreDisplay({
7089
7089
  ...rest
7090
7090
  }) {
7091
7091
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
7092
- const [displayValue, setDisplayValue] = React80.useState(resolvedValue);
7093
- const [isAnimating, setIsAnimating] = React80.useState(false);
7094
- React80.useEffect(() => {
7092
+ const [displayValue, setDisplayValue] = React83.useState(resolvedValue);
7093
+ const [isAnimating, setIsAnimating] = React83.useState(false);
7094
+ React83.useEffect(() => {
7095
7095
  if (!animated || displayValue === resolvedValue) {
7096
7096
  setDisplayValue(resolvedValue);
7097
7097
  return;
@@ -7162,9 +7162,9 @@ function ControlButton({
7162
7162
  className
7163
7163
  }) {
7164
7164
  const eventBus = useEventBus();
7165
- const [isPressed, setIsPressed] = React80.useState(false);
7165
+ const [isPressed, setIsPressed] = React83.useState(false);
7166
7166
  const actualPressed = pressed ?? isPressed;
7167
- const handlePointerDown = React80.useCallback(
7167
+ const handlePointerDown = React83.useCallback(
7168
7168
  (e) => {
7169
7169
  e.preventDefault();
7170
7170
  if (disabled) return;
@@ -7174,7 +7174,7 @@ function ControlButton({
7174
7174
  },
7175
7175
  [disabled, pressEvent, eventBus, onPress]
7176
7176
  );
7177
- const handlePointerUp = React80.useCallback(
7177
+ const handlePointerUp = React83.useCallback(
7178
7178
  (e) => {
7179
7179
  e.preventDefault();
7180
7180
  if (disabled) return;
@@ -7184,7 +7184,7 @@ function ControlButton({
7184
7184
  },
7185
7185
  [disabled, releaseEvent, eventBus, onRelease]
7186
7186
  );
7187
- const handlePointerLeave = React80.useCallback(
7187
+ const handlePointerLeave = React83.useCallback(
7188
7188
  (e) => {
7189
7189
  if (isPressed) {
7190
7190
  setIsPressed(false);
@@ -7687,8 +7687,8 @@ function XPBar({
7687
7687
  }) {
7688
7688
  const sizes = sizeMap9[size];
7689
7689
  const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
7690
- const [fillWidth, setFillWidth] = React80.useState(animated ? 0 : percentage);
7691
- React80.useEffect(() => {
7690
+ const [fillWidth, setFillWidth] = React83.useState(animated ? 0 : percentage);
7691
+ React83.useEffect(() => {
7692
7692
  if (!animated) {
7693
7693
  setFillWidth(percentage);
7694
7694
  return;
@@ -8125,9 +8125,9 @@ function MiniMap({
8125
8125
  viewportRect,
8126
8126
  className
8127
8127
  }) {
8128
- const canvasRef = React80.useRef(null);
8129
- const frameRef = React80.useRef(0);
8130
- React80.useEffect(() => {
8128
+ const canvasRef = React83.useRef(null);
8129
+ const frameRef = React83.useRef(0);
8130
+ React83.useEffect(() => {
8131
8131
  const canvas = canvasRef.current;
8132
8132
  if (!canvas) return;
8133
8133
  const ctx = canvas.getContext("2d");
@@ -8301,7 +8301,7 @@ var init_ErrorBoundary = __esm({
8301
8301
  }
8302
8302
  );
8303
8303
  };
8304
- ErrorBoundary = class extends React80__default.Component {
8304
+ ErrorBoundary = class extends React83__default.Component {
8305
8305
  constructor(props) {
8306
8306
  super(props);
8307
8307
  __publicField(this, "reset", () => {
@@ -9692,8 +9692,8 @@ function ActionButtons({
9692
9692
  disabled
9693
9693
  }) {
9694
9694
  const eventBus = useEventBus();
9695
- const [activeButtons, setActiveButtons] = React80.useState(/* @__PURE__ */ new Set());
9696
- const handlePress = React80.useCallback(
9695
+ const [activeButtons, setActiveButtons] = React83.useState(/* @__PURE__ */ new Set());
9696
+ const handlePress = React83.useCallback(
9697
9697
  (id) => {
9698
9698
  setActiveButtons((prev) => new Set(prev).add(id));
9699
9699
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -9701,7 +9701,7 @@ function ActionButtons({
9701
9701
  },
9702
9702
  [actionEvent, eventBus, onAction]
9703
9703
  );
9704
- const handleRelease = React80.useCallback(
9704
+ const handleRelease = React83.useCallback(
9705
9705
  (id) => {
9706
9706
  setActiveButtons((prev) => {
9707
9707
  const next = new Set(prev);
@@ -9897,6 +9897,85 @@ var init_ActionPalette = __esm({
9897
9897
  ActionPalette.displayName = "ActionPalette";
9898
9898
  }
9899
9899
  });
9900
+ var ActivationBlock;
9901
+ var init_ActivationBlock = __esm({
9902
+ "components/core/molecules/ActivationBlock.tsx"() {
9903
+ "use client";
9904
+ init_useEventBus();
9905
+ init_cn();
9906
+ ActivationBlock = ({
9907
+ question,
9908
+ savedResponse,
9909
+ saveEvent = "SAVE_ACTIVATION",
9910
+ className
9911
+ }) => {
9912
+ const [response, setResponse] = useState(savedResponse ?? "");
9913
+ const [isExpanded, setIsExpanded] = useState(!savedResponse);
9914
+ const { emit } = useEventBus();
9915
+ const handleSubmit = () => {
9916
+ emit(`UI:${saveEvent}`, { response });
9917
+ setIsExpanded(false);
9918
+ };
9919
+ return /* @__PURE__ */ jsx(
9920
+ "div",
9921
+ {
9922
+ className: cn(
9923
+ "bg-indigo-50 dark:bg-indigo-900/20 border-2 border-indigo-200 dark:border-indigo-800 rounded-lg p-5 mb-6",
9924
+ className
9925
+ ),
9926
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
9927
+ /* @__PURE__ */ jsx(Lightbulb, { className: "text-indigo-600 dark:text-indigo-400 flex-shrink-0 mt-1", size: 24 }),
9928
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
9929
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-indigo-900 dark:text-indigo-100 mb-2", children: "Before You Begin..." }),
9930
+ /* @__PURE__ */ jsx("p", { className: "text-gray-700 dark:text-gray-300 mb-3 text-sm md:text-base", children: question }),
9931
+ isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
9932
+ /* @__PURE__ */ jsx(
9933
+ "textarea",
9934
+ {
9935
+ className: "w-full p-3 border border-indigo-300 dark:border-indigo-700 rounded-md bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-indigo-500 focus:border-transparent text-sm",
9936
+ placeholder: "Jot down your thoughts...",
9937
+ value: response,
9938
+ onChange: (e) => setResponse(e.target.value),
9939
+ rows: 3
9940
+ }
9941
+ ),
9942
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 mt-3", children: [
9943
+ /* @__PURE__ */ jsx(
9944
+ "button",
9945
+ {
9946
+ onClick: handleSubmit,
9947
+ className: "px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 text-sm font-medium transition-colors",
9948
+ children: "Continue to Lesson \u2192"
9949
+ }
9950
+ ),
9951
+ /* @__PURE__ */ jsx(
9952
+ "button",
9953
+ {
9954
+ onClick: () => {
9955
+ emit(`UI:${saveEvent}`, { response: "" });
9956
+ setIsExpanded(false);
9957
+ },
9958
+ className: "px-4 py-2 text-indigo-600 dark:text-indigo-400 hover:underline text-sm",
9959
+ children: "Skip for now"
9960
+ }
9961
+ )
9962
+ ] })
9963
+ ] }) : /* @__PURE__ */ jsx(
9964
+ "button",
9965
+ {
9966
+ onClick: () => setIsExpanded(true),
9967
+ className: "text-sm text-indigo-600 dark:text-indigo-400 hover:underline font-medium",
9968
+ children: "\u2713 Answered \xB7 Edit response"
9969
+ }
9970
+ )
9971
+ ] })
9972
+ ] })
9973
+ }
9974
+ );
9975
+ };
9976
+ ActivationBlock.displayName = "ActivationBlock";
9977
+ }
9978
+ });
9900
9979
  var variantBorderClasses, variantIconColors, iconMap2, Alert;
9901
9980
  var init_Alert = __esm({
9902
9981
  "components/core/molecules/Alert.tsx"() {
@@ -12910,102 +12989,6 @@ var init_BehaviorView = __esm({
12910
12989
  BehaviorView.displayName = "BehaviorView";
12911
12990
  }
12912
12991
  });
12913
- var MIN_DIAGRAM_WIDTH, ScaledDiagram;
12914
- var init_ScaledDiagram = __esm({
12915
- "components/core/molecules/ScaledDiagram.tsx"() {
12916
- init_Box();
12917
- init_cn();
12918
- MIN_DIAGRAM_WIDTH = 200;
12919
- ScaledDiagram = ({
12920
- children,
12921
- className
12922
- }) => {
12923
- const { t: _t } = useTranslate();
12924
- const wrapperRef = useRef(null);
12925
- const contentRef = useRef(null);
12926
- const [layout, setLayout] = useState(null);
12927
- const measure = useCallback(() => {
12928
- const wrapper = wrapperRef.current;
12929
- const content = contentRef.current;
12930
- if (!wrapper || !content) return;
12931
- const containerW = wrapper.clientWidth;
12932
- if (containerW <= 0) return;
12933
- let diagramW = 0;
12934
- let diagramH = 0;
12935
- const children2 = content.children;
12936
- for (let i = 0; i < children2.length; i++) {
12937
- const child = children2[i];
12938
- const w = child.style?.width;
12939
- const h = child.style?.height;
12940
- if (w && /^\d+/.test(w) && h && /^\d+/.test(h)) {
12941
- diagramW = parseFloat(w);
12942
- diagramH = parseFloat(h);
12943
- break;
12944
- }
12945
- if (child.offsetWidth > MIN_DIAGRAM_WIDTH) {
12946
- diagramW = child.offsetWidth;
12947
- diagramH = child.offsetHeight;
12948
- break;
12949
- }
12950
- }
12951
- if (diagramW < MIN_DIAGRAM_WIDTH || diagramH <= 0) {
12952
- setLayout(null);
12953
- return;
12954
- }
12955
- const s = Math.min(1, containerW / diagramW);
12956
- setLayout({ scale: s, height: diagramH * s });
12957
- }, []);
12958
- useEffect(() => {
12959
- const content = contentRef.current;
12960
- if (!content) return;
12961
- let raf1 = requestAnimationFrame(() => {
12962
- requestAnimationFrame(() => measure());
12963
- });
12964
- const mo = new MutationObserver(() => {
12965
- requestAnimationFrame(() => measure());
12966
- });
12967
- mo.observe(content, { childList: true, subtree: true, attributes: true });
12968
- return () => {
12969
- cancelAnimationFrame(raf1);
12970
- mo.disconnect();
12971
- };
12972
- }, [measure, children]);
12973
- useEffect(() => {
12974
- const wrapper = wrapperRef.current;
12975
- if (!wrapper) return;
12976
- const ro = new ResizeObserver(() => measure());
12977
- ro.observe(wrapper);
12978
- return () => ro.disconnect();
12979
- }, [measure]);
12980
- const hasLayout = layout !== null;
12981
- return /* @__PURE__ */ jsx(
12982
- Box,
12983
- {
12984
- ref: wrapperRef,
12985
- className: cn("w-full", className),
12986
- style: {
12987
- // Only clip overflow once we have a valid measurement
12988
- overflow: hasLayout ? "hidden" : void 0,
12989
- height: hasLayout ? layout.height : void 0
12990
- },
12991
- children: /* @__PURE__ */ jsx(
12992
- Box,
12993
- {
12994
- ref: contentRef,
12995
- style: {
12996
- width: "max-content",
12997
- transformOrigin: "top left",
12998
- transform: hasLayout && layout.scale < 1 ? `scale(${layout.scale})` : void 0
12999
- },
13000
- children
13001
- }
13002
- )
13003
- }
13004
- );
13005
- };
13006
- ScaledDiagram.displayName = "ScaledDiagram";
13007
- }
13008
- });
13009
12992
 
13010
12993
  // node_modules/katex/dist/katex.min.css
13011
12994
  var init_katex_min = __esm({
@@ -13445,7 +13428,7 @@ var init_CodeBlock = __esm({
13445
13428
  };
13446
13429
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
13447
13430
  HIDDEN_LINE_NUMBERS = { display: "none" };
13448
- CodeBlock = React80__default.memo(
13431
+ CodeBlock = React83__default.memo(
13449
13432
  ({
13450
13433
  code: rawCode,
13451
13434
  language = "text",
@@ -14032,7 +14015,7 @@ var init_MarkdownContent = __esm({
14032
14015
  init_Box();
14033
14016
  init_CodeBlock();
14034
14017
  init_cn();
14035
- MarkdownContent = React80__default.memo(
14018
+ MarkdownContent = React83__default.memo(
14036
14019
  ({ content, direction = "ltr", className }) => {
14037
14020
  const { t: _t } = useTranslate();
14038
14021
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -14197,6 +14180,227 @@ var init_MarkdownContent = __esm({
14197
14180
  MarkdownContent.displayName = "MarkdownContent";
14198
14181
  }
14199
14182
  });
14183
+
14184
+ // components/core/molecules/lessonSegmentUtils.ts
14185
+ function parseMarkdownWithCodeBlocks(content) {
14186
+ const segments = [];
14187
+ const codeBlockRegex = /```([\w-]+)?(?:\s+(run))?\n([\s\S]*?)```/g;
14188
+ let lastIndex = 0;
14189
+ let match;
14190
+ while ((match = codeBlockRegex.exec(content)) !== null) {
14191
+ const before = content.slice(lastIndex, match.index);
14192
+ if (before.trim()) {
14193
+ segments.push({ type: "markdown", content: before });
14194
+ }
14195
+ const rawLanguage = match[1] ?? "text";
14196
+ const runModifier = !!match[2];
14197
+ const suffixRunnable = rawLanguage.endsWith("-runnable");
14198
+ const runnable = runModifier || suffixRunnable;
14199
+ const baseLanguage = suffixRunnable ? rawLanguage.slice(0, -"-runnable".length) || "text" : rawLanguage;
14200
+ segments.push({ type: "code", language: baseLanguage, content: match[3].trim(), runnable });
14201
+ lastIndex = codeBlockRegex.lastIndex;
14202
+ }
14203
+ const remaining = content.slice(lastIndex);
14204
+ if (remaining.trim()) {
14205
+ segments.push({ type: "markdown", content: remaining });
14206
+ }
14207
+ return segments;
14208
+ }
14209
+ var init_lessonSegmentUtils = __esm({
14210
+ "components/core/molecules/lessonSegmentUtils.ts"() {
14211
+ }
14212
+ });
14213
+ var BLOOM_CONFIG, BloomQuizBlock;
14214
+ var init_BloomQuizBlock = __esm({
14215
+ "components/core/molecules/BloomQuizBlock.tsx"() {
14216
+ "use client";
14217
+ init_MarkdownContent();
14218
+ init_CodeBlock();
14219
+ init_lessonSegmentUtils();
14220
+ init_useEventBus();
14221
+ init_cn();
14222
+ BLOOM_CONFIG = {
14223
+ remember: { color: "bg-gray-500", bgColor: "bg-gray-50 dark:bg-gray-900/30", label: "Remember" },
14224
+ understand: { color: "bg-blue-500", bgColor: "bg-blue-50 dark:bg-blue-900/30", label: "Understand" },
14225
+ apply: { color: "bg-green-500", bgColor: "bg-green-50 dark:bg-green-900/30", label: "Apply" },
14226
+ analyze: { color: "bg-yellow-500", bgColor: "bg-yellow-50 dark:bg-yellow-900/30", label: "Analyze" },
14227
+ evaluate: { color: "bg-orange-500", bgColor: "bg-orange-50 dark:bg-orange-900/30", label: "Evaluate" },
14228
+ create: { color: "bg-purple-500", bgColor: "bg-purple-50 dark:bg-purple-900/30", label: "Create" }
14229
+ };
14230
+ BloomQuizBlock = ({
14231
+ level,
14232
+ question,
14233
+ answer,
14234
+ index,
14235
+ isAnswered,
14236
+ answerEvent = "ANSWER_BLOOM",
14237
+ className
14238
+ }) => {
14239
+ const [revealed, setRevealed] = useState(false);
14240
+ const config = BLOOM_CONFIG[level];
14241
+ const { emit } = useEventBus();
14242
+ const questionSegments = useMemo(() => parseMarkdownWithCodeBlocks(question), [question]);
14243
+ const answerSegments = useMemo(() => parseMarkdownWithCodeBlocks(answer), [answer]);
14244
+ const handleReveal = () => {
14245
+ if (!revealed) {
14246
+ emit(`UI:${answerEvent}`, { index: index ?? 0, level });
14247
+ }
14248
+ setRevealed(!revealed);
14249
+ };
14250
+ return /* @__PURE__ */ jsxs(
14251
+ "div",
14252
+ {
14253
+ className: cn(
14254
+ "rounded-lg border border-indigo-100 dark:border-indigo-800 p-4 my-4 transition-all",
14255
+ config.bgColor,
14256
+ className
14257
+ ),
14258
+ children: [
14259
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
14260
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
14261
+ index !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-gray-500 dark:text-gray-400 font-medium text-sm", children: [
14262
+ "Question ",
14263
+ index + 1
14264
+ ] }),
14265
+ /* @__PURE__ */ jsx("span", { className: cn(config.color, "text-white text-xs px-2 py-1 rounded-full font-medium"), children: config.label })
14266
+ ] }),
14267
+ isAnswered && /* @__PURE__ */ jsx(CheckCircle, { className: "text-green-600 dark:text-green-400 flex-shrink-0", size: 20 })
14268
+ ] }),
14269
+ /* @__PURE__ */ jsx("div", { className: "font-semibold text-indigo-900 dark:text-indigo-200 mb-3 space-y-2", children: questionSegments.map(
14270
+ (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `q-md-${idx}`) : /* @__PURE__ */ jsx(
14271
+ CodeBlock,
14272
+ {
14273
+ language: segment.language ?? "text",
14274
+ code: segment.content
14275
+ },
14276
+ `q-code-${idx}`
14277
+ )
14278
+ ) }),
14279
+ /* @__PURE__ */ jsx(
14280
+ "button",
14281
+ {
14282
+ type: "button",
14283
+ className: "inline-flex items-center rounded-md bg-indigo-600 dark:bg-indigo-500 px-3 py-1.5 text-sm font-medium text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 transition-colors",
14284
+ onClick: handleReveal,
14285
+ children: revealed ? "Hide Answer" : "Reveal Answer"
14286
+ }
14287
+ ),
14288
+ revealed && /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-white/80 dark:bg-gray-800/80 p-3 text-sm text-slate-800 dark:text-gray-200 shadow-sm border border-indigo-100 dark:border-indigo-800 mt-3 space-y-2", children: [
14289
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-gray-600 dark:text-gray-400 mb-1 font-medium uppercase tracking-wide", children: "Answer:" }),
14290
+ answerSegments.map(
14291
+ (segment, idx) => segment.type === "markdown" ? /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `a-md-${idx}`) : /* @__PURE__ */ jsx(
14292
+ CodeBlock,
14293
+ {
14294
+ language: segment.language ?? "text",
14295
+ code: segment.content
14296
+ },
14297
+ `a-code-${idx}`
14298
+ )
14299
+ )
14300
+ ] })
14301
+ ]
14302
+ }
14303
+ );
14304
+ };
14305
+ BloomQuizBlock.displayName = "BloomQuizBlock";
14306
+ }
14307
+ });
14308
+ var MIN_DIAGRAM_WIDTH, ScaledDiagram;
14309
+ var init_ScaledDiagram = __esm({
14310
+ "components/core/molecules/ScaledDiagram.tsx"() {
14311
+ init_Box();
14312
+ init_cn();
14313
+ MIN_DIAGRAM_WIDTH = 200;
14314
+ ScaledDiagram = ({
14315
+ children,
14316
+ className
14317
+ }) => {
14318
+ const { t: _t } = useTranslate();
14319
+ const wrapperRef = useRef(null);
14320
+ const contentRef = useRef(null);
14321
+ const [layout, setLayout] = useState(null);
14322
+ const measure = useCallback(() => {
14323
+ const wrapper = wrapperRef.current;
14324
+ const content = contentRef.current;
14325
+ if (!wrapper || !content) return;
14326
+ const containerW = wrapper.clientWidth;
14327
+ if (containerW <= 0) return;
14328
+ let diagramW = 0;
14329
+ let diagramH = 0;
14330
+ const children2 = content.children;
14331
+ for (let i = 0; i < children2.length; i++) {
14332
+ const child = children2[i];
14333
+ const w = child.style?.width;
14334
+ const h = child.style?.height;
14335
+ if (w && /^\d+/.test(w) && h && /^\d+/.test(h)) {
14336
+ diagramW = parseFloat(w);
14337
+ diagramH = parseFloat(h);
14338
+ break;
14339
+ }
14340
+ if (child.offsetWidth > MIN_DIAGRAM_WIDTH) {
14341
+ diagramW = child.offsetWidth;
14342
+ diagramH = child.offsetHeight;
14343
+ break;
14344
+ }
14345
+ }
14346
+ if (diagramW < MIN_DIAGRAM_WIDTH || diagramH <= 0) {
14347
+ setLayout(null);
14348
+ return;
14349
+ }
14350
+ const s = Math.min(1, containerW / diagramW);
14351
+ setLayout({ scale: s, height: diagramH * s });
14352
+ }, []);
14353
+ useEffect(() => {
14354
+ const content = contentRef.current;
14355
+ if (!content) return;
14356
+ let raf1 = requestAnimationFrame(() => {
14357
+ requestAnimationFrame(() => measure());
14358
+ });
14359
+ const mo = new MutationObserver(() => {
14360
+ requestAnimationFrame(() => measure());
14361
+ });
14362
+ mo.observe(content, { childList: true, subtree: true, attributes: true });
14363
+ return () => {
14364
+ cancelAnimationFrame(raf1);
14365
+ mo.disconnect();
14366
+ };
14367
+ }, [measure, children]);
14368
+ useEffect(() => {
14369
+ const wrapper = wrapperRef.current;
14370
+ if (!wrapper) return;
14371
+ const ro = new ResizeObserver(() => measure());
14372
+ ro.observe(wrapper);
14373
+ return () => ro.disconnect();
14374
+ }, [measure]);
14375
+ const hasLayout = layout !== null;
14376
+ return /* @__PURE__ */ jsx(
14377
+ Box,
14378
+ {
14379
+ ref: wrapperRef,
14380
+ className: cn("w-full", className),
14381
+ style: {
14382
+ // Only clip overflow once we have a valid measurement
14383
+ overflow: hasLayout ? "hidden" : void 0,
14384
+ height: hasLayout ? layout.height : void 0
14385
+ },
14386
+ children: /* @__PURE__ */ jsx(
14387
+ Box,
14388
+ {
14389
+ ref: contentRef,
14390
+ style: {
14391
+ width: "max-content",
14392
+ transformOrigin: "top left",
14393
+ transform: hasLayout && layout.scale < 1 ? `scale(${layout.scale})` : void 0
14394
+ },
14395
+ children
14396
+ }
14397
+ )
14398
+ }
14399
+ );
14400
+ };
14401
+ ScaledDiagram.displayName = "ScaledDiagram";
14402
+ }
14403
+ });
14200
14404
  function useLongPress(onLongPress, options = {}) {
14201
14405
  const { duration = 500, moveThreshold = 10 } = options;
14202
14406
  const timerRef = useRef(null);
@@ -15128,7 +15332,7 @@ var init_StateMachineView = __esm({
15128
15332
  style: { top: title ? 30 : 0 },
15129
15333
  children: [
15130
15334
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
15131
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React80__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
15335
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React83__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
15132
15336
  StateNode,
15133
15337
  {
15134
15338
  state,
@@ -15843,7 +16047,7 @@ function tryParseOrbitalSchema(code) {
15843
16047
  }
15844
16048
  return null;
15845
16049
  }
15846
- function parseMarkdownWithCodeBlocks(content) {
16050
+ function parseMarkdownWithCodeBlocks2(content) {
15847
16051
  if (!content) return [];
15848
16052
  const segments = [];
15849
16053
  const codeBlockRegex = /```(\w+)?\n([\s\S]*?)```/g;
@@ -15882,7 +16086,7 @@ function parseContentSegments(content) {
15882
16086
  while ((match = tagRegex.exec(content)) !== null) {
15883
16087
  const before = content.slice(lastIndex, match.index);
15884
16088
  if (before.trim()) {
15885
- segments.push(...parseMarkdownWithCodeBlocks(before));
16089
+ segments.push(...parseMarkdownWithCodeBlocks2(before));
15886
16090
  }
15887
16091
  segments.push({
15888
16092
  type: "quiz",
@@ -15893,7 +16097,7 @@ function parseContentSegments(content) {
15893
16097
  }
15894
16098
  const remaining = content.slice(lastIndex);
15895
16099
  if (remaining.trim()) {
15896
- segments.push(...parseMarkdownWithCodeBlocks(remaining));
16100
+ segments.push(...parseMarkdownWithCodeBlocks2(remaining));
15897
16101
  }
15898
16102
  return segments;
15899
16103
  }
@@ -20917,6 +21121,169 @@ var init_ClassifierBoard = __esm({
20917
21121
  ClassifierBoard.displayName = "ClassifierBoard";
20918
21122
  }
20919
21123
  });
21124
+ var CodeRunnerPanel;
21125
+ var init_CodeRunnerPanel = __esm({
21126
+ "components/core/organisms/CodeRunnerPanel.tsx"() {
21127
+ "use client";
21128
+ init_Box();
21129
+ init_Button();
21130
+ init_Badge();
21131
+ init_Typography();
21132
+ init_Stack();
21133
+ init_CodeBlock();
21134
+ init_useEventBus();
21135
+ init_cn();
21136
+ CodeRunnerPanel = ({
21137
+ code: initialCode,
21138
+ language,
21139
+ runnable = true,
21140
+ onRun,
21141
+ runEvent = "RUN_CODE",
21142
+ className
21143
+ }) => {
21144
+ const eventBus = useEventBus();
21145
+ const { t } = useTranslate();
21146
+ const [code, setCode] = useState(initialCode);
21147
+ const [output, setOutput] = useState(null);
21148
+ const [error, setError] = useState(null);
21149
+ const [isRunning, setIsRunning] = useState(false);
21150
+ const handleRun = useCallback(async () => {
21151
+ if (!onRun) return;
21152
+ setIsRunning(true);
21153
+ setError(null);
21154
+ setOutput(null);
21155
+ try {
21156
+ const result = await onRun(code);
21157
+ setOutput(result);
21158
+ eventBus.emit(`UI:${runEvent}`, { language, exitCode: result.exitCode });
21159
+ } catch (err) {
21160
+ const message = err instanceof Error ? err.message : t("common.error");
21161
+ setError(message);
21162
+ eventBus.emit(`UI:${runEvent}`, { language, exitCode: 1, error: message });
21163
+ } finally {
21164
+ setIsRunning(false);
21165
+ }
21166
+ }, [code, language, onRun, runEvent, eventBus, t]);
21167
+ const handleReset = useCallback(() => {
21168
+ setCode(initialCode);
21169
+ setOutput(null);
21170
+ setError(null);
21171
+ }, [initialCode]);
21172
+ if (!runnable || !onRun) {
21173
+ return /* @__PURE__ */ jsx(Box, { className, children: /* @__PURE__ */ jsx(CodeBlock, { language, code }) });
21174
+ }
21175
+ const hasOutput = output !== null || error !== null;
21176
+ return /* @__PURE__ */ jsxs(Box, { className: cn("space-y-3", className), children: [
21177
+ /* @__PURE__ */ jsx(
21178
+ CodeBlock,
21179
+ {
21180
+ language,
21181
+ code,
21182
+ editable: true,
21183
+ onChange: setCode,
21184
+ showLanguageBadge: true,
21185
+ showCopyButton: true
21186
+ }
21187
+ ),
21188
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "between", children: [
21189
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", children: [
21190
+ /* @__PURE__ */ jsx(
21191
+ Button,
21192
+ {
21193
+ variant: "primary",
21194
+ size: "sm",
21195
+ onClick: handleRun,
21196
+ disabled: isRunning,
21197
+ className: "min-w-[5rem]",
21198
+ children: isRunning ? /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
21199
+ /* @__PURE__ */ jsx(RotateCcw, { size: 16, className: "animate-spin" }),
21200
+ t("common.loading")
21201
+ ] }) : /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
21202
+ /* @__PURE__ */ jsx(Play, { size: 16 }),
21203
+ "Run"
21204
+ ] })
21205
+ }
21206
+ ),
21207
+ /* @__PURE__ */ jsx(
21208
+ Button,
21209
+ {
21210
+ variant: "secondary",
21211
+ size: "sm",
21212
+ onClick: handleReset,
21213
+ disabled: isRunning,
21214
+ children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
21215
+ /* @__PURE__ */ jsx(RotateCcw, { size: 16 }),
21216
+ "Reset"
21217
+ ] })
21218
+ }
21219
+ )
21220
+ ] }),
21221
+ output && /* @__PURE__ */ jsxs(
21222
+ Badge,
21223
+ {
21224
+ variant: output.exitCode === 0 ? "success" : "danger",
21225
+ size: "sm",
21226
+ children: [
21227
+ "Exit ",
21228
+ output.exitCode
21229
+ ]
21230
+ }
21231
+ )
21232
+ ] }),
21233
+ hasOutput && /* @__PURE__ */ jsxs(Box, { className: "rounded-lg border border-gray-700 bg-[#0d0d0d] overflow-hidden", children: [
21234
+ /* @__PURE__ */ jsxs(
21235
+ HStack,
21236
+ {
21237
+ gap: "sm",
21238
+ align: "center",
21239
+ className: "px-3 py-2 bg-gray-800 border-b border-gray-700",
21240
+ children: [
21241
+ /* @__PURE__ */ jsx(Terminal, { size: 16, className: "text-gray-400" }),
21242
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-300 font-medium", children: "Output" })
21243
+ ]
21244
+ }
21245
+ ),
21246
+ /* @__PURE__ */ jsx(VStack, { gap: "none", className: "p-3 font-mono text-sm", children: error ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-400 whitespace-pre-wrap", children: error }) : /* @__PURE__ */ jsxs(Fragment, { children: [
21247
+ output?.stdout ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-200 whitespace-pre-wrap", children: output.stdout }) : null,
21248
+ output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-400 whitespace-pre-wrap", children: output.stderr }) : null,
21249
+ !output?.stdout && !output?.stderr ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 italic", children: "No output" }) : null,
21250
+ output && output.testResults.length > 0 && /* @__PURE__ */ jsx(Box, { className: "mt-3 pt-3 border-t border-gray-700 space-y-2", children: output.testResults.map((test, index) => /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", className: "text-xs", children: [
21251
+ test.passed ? /* @__PURE__ */ jsx(CheckCircle, { size: 14, className: "text-green-400 mt-0.5" }) : /* @__PURE__ */ jsx(XCircle, { size: 14, className: "text-red-400 mt-0.5" }),
21252
+ /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1", children: [
21253
+ /* @__PURE__ */ jsxs(
21254
+ Typography,
21255
+ {
21256
+ variant: "small",
21257
+ className: test.passed ? "text-green-400" : "text-red-400",
21258
+ children: [
21259
+ "Test ",
21260
+ index + 1,
21261
+ ": ",
21262
+ test.passed ? "passed" : "failed"
21263
+ ]
21264
+ }
21265
+ ),
21266
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
21267
+ "Input: ",
21268
+ test.input
21269
+ ] }),
21270
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
21271
+ "Expected: ",
21272
+ test.expectedOutput
21273
+ ] }),
21274
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-gray-400", children: [
21275
+ "Actual: ",
21276
+ test.actualOutput
21277
+ ] })
21278
+ ] })
21279
+ ] }, index)) })
21280
+ ] }) })
21281
+ ] })
21282
+ ] });
21283
+ };
21284
+ CodeRunnerPanel.displayName = "CodeRunnerPanel";
21285
+ }
21286
+ });
20920
21287
  function CombatLog({
20921
21288
  events: events2,
20922
21289
  maxVisible = 50,
@@ -21167,6 +21534,31 @@ var init_ConfirmDialog = __esm({
21167
21534
  ConfirmDialog.displayName = "ConfirmDialog";
21168
21535
  }
21169
21536
  });
21537
+ var ConnectionBlock;
21538
+ var init_ConnectionBlock = __esm({
21539
+ "components/core/molecules/ConnectionBlock.tsx"() {
21540
+ "use client";
21541
+ init_MarkdownContent();
21542
+ init_cn();
21543
+ ConnectionBlock = ({ content, className }) => /* @__PURE__ */ jsx(
21544
+ "div",
21545
+ {
21546
+ className: cn(
21547
+ "bg-emerald-50 dark:bg-emerald-900/20 border-l-4 border-emerald-500 rounded-r-lg p-5 mb-6",
21548
+ className
21549
+ ),
21550
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
21551
+ /* @__PURE__ */ jsx(Link2, { className: "text-emerald-600 dark:text-emerald-400 flex-shrink-0 mt-1", size: 20 }),
21552
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
21553
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-emerald-900 dark:text-emerald-100 mb-2", children: "Building On What You Know" }),
21554
+ /* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert prose-sm max-w-none text-gray-700 dark:text-gray-300", children: /* @__PURE__ */ jsx(MarkdownContent, { content }) })
21555
+ ] })
21556
+ ] })
21557
+ }
21558
+ );
21559
+ ConnectionBlock.displayName = "ConnectionBlock";
21560
+ }
21561
+ });
21170
21562
  function CounterMinimal({
21171
21563
  entity,
21172
21564
  size = "md",
@@ -21391,7 +21783,7 @@ function CraftingRecipe({
21391
21783
  className
21392
21784
  }) {
21393
21785
  const eventBus = useEventBus();
21394
- const handleCraft = React80.useCallback(() => {
21786
+ const handleCraft = React83.useCallback(() => {
21395
21787
  onCraft?.();
21396
21788
  if (craftEvent) {
21397
21789
  eventBus.emit(craftEvent, { output: output.label });
@@ -21408,7 +21800,7 @@ function CraftingRecipe({
21408
21800
  children: [
21409
21801
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
21410
21802
  const hasSufficient = ingredient.available >= ingredient.required;
21411
- return /* @__PURE__ */ jsxs(React80.Fragment, { children: [
21803
+ return /* @__PURE__ */ jsxs(React83.Fragment, { children: [
21412
21804
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
21413
21805
  ItemSlot,
21414
21806
  {
@@ -21471,8 +21863,8 @@ function DPad({
21471
21863
  }) {
21472
21864
  const eventBus = useEventBus();
21473
21865
  const sizes = sizeMap15[size];
21474
- const [activeDirections, setActiveDirections] = React80.useState(/* @__PURE__ */ new Set());
21475
- const handlePress = React80.useCallback(
21866
+ const [activeDirections, setActiveDirections] = React83.useState(/* @__PURE__ */ new Set());
21867
+ const handlePress = React83.useCallback(
21476
21868
  (direction) => {
21477
21869
  setActiveDirections((prev) => new Set(prev).add(direction));
21478
21870
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -21480,7 +21872,7 @@ function DPad({
21480
21872
  },
21481
21873
  [directionEvent, eventBus, onDirection]
21482
21874
  );
21483
- const handleRelease = React80.useCallback(
21875
+ const handleRelease = React83.useCallback(
21484
21876
  (direction) => {
21485
21877
  setActiveDirections((prev) => {
21486
21878
  const next = new Set(prev);
@@ -22287,8 +22679,8 @@ var init_Menu = __esm({
22287
22679
  "bottom-end": "bottom-start"
22288
22680
  };
22289
22681
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
22290
- const triggerChild = React80__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
22291
- const triggerElement = React80__default.cloneElement(
22682
+ const triggerChild = React83__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
22683
+ const triggerElement = React83__default.cloneElement(
22292
22684
  triggerChild,
22293
22685
  {
22294
22686
  ref: triggerRef,
@@ -22422,14 +22814,14 @@ function useDataDnd(args) {
22422
22814
  const isZone = Boolean(dragGroup || accepts || sortable);
22423
22815
  const enabled = isZone || Boolean(dndRoot);
22424
22816
  const eventBus = useEventBus();
22425
- const parentRoot = React80__default.useContext(RootCtx);
22817
+ const parentRoot = React83__default.useContext(RootCtx);
22426
22818
  const isRoot = enabled && parentRoot === null;
22427
- const zoneId = React80__default.useId();
22819
+ const zoneId = React83__default.useId();
22428
22820
  const ownGroup = dragGroup ?? accepts ?? zoneId;
22429
- const [optimisticOrders, setOptimisticOrders] = React80__default.useState(() => /* @__PURE__ */ new Map());
22430
- const optimisticOrdersRef = React80__default.useRef(optimisticOrders);
22821
+ const [optimisticOrders, setOptimisticOrders] = React83__default.useState(() => /* @__PURE__ */ new Map());
22822
+ const optimisticOrdersRef = React83__default.useRef(optimisticOrders);
22431
22823
  optimisticOrdersRef.current = optimisticOrders;
22432
- const clearOptimisticOrder = React80__default.useCallback((group) => {
22824
+ const clearOptimisticOrder = React83__default.useCallback((group) => {
22433
22825
  setOptimisticOrders((prev) => {
22434
22826
  if (!prev.has(group)) return prev;
22435
22827
  const next = new Map(prev);
@@ -22454,7 +22846,7 @@ function useDataDnd(args) {
22454
22846
  const raw = it[dndItemIdField];
22455
22847
  return String(raw ?? `__idx_${idx}`);
22456
22848
  }).join("|");
22457
- const itemIds = React80__default.useMemo(
22849
+ const itemIds = React83__default.useMemo(
22458
22850
  () => orderedItems.map((it, idx) => {
22459
22851
  const raw = it[dndItemIdField];
22460
22852
  return raw ?? `__idx_${idx}`;
@@ -22462,7 +22854,7 @@ function useDataDnd(args) {
22462
22854
  [itemIdsSignature]
22463
22855
  );
22464
22856
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
22465
- React80__default.useEffect(() => {
22857
+ React83__default.useEffect(() => {
22466
22858
  const root = isRoot ? null : parentRoot;
22467
22859
  if (root) {
22468
22860
  root.clearOptimisticOrder(ownGroup);
@@ -22470,20 +22862,20 @@ function useDataDnd(args) {
22470
22862
  clearOptimisticOrder(ownGroup);
22471
22863
  }
22472
22864
  }, [itemsContentSig, ownGroup]);
22473
- const zonesRef = React80__default.useRef(/* @__PURE__ */ new Map());
22474
- const registerZone = React80__default.useCallback((zoneId2, meta2) => {
22865
+ const zonesRef = React83__default.useRef(/* @__PURE__ */ new Map());
22866
+ const registerZone = React83__default.useCallback((zoneId2, meta2) => {
22475
22867
  zonesRef.current.set(zoneId2, meta2);
22476
22868
  }, []);
22477
- const unregisterZone = React80__default.useCallback((zoneId2) => {
22869
+ const unregisterZone = React83__default.useCallback((zoneId2) => {
22478
22870
  zonesRef.current.delete(zoneId2);
22479
22871
  }, []);
22480
- const [activeDrag, setActiveDrag] = React80__default.useState(null);
22481
- const [overZoneGroup, setOverZoneGroup] = React80__default.useState(null);
22482
- const meta = React80__default.useMemo(
22872
+ const [activeDrag, setActiveDrag] = React83__default.useState(null);
22873
+ const [overZoneGroup, setOverZoneGroup] = React83__default.useState(null);
22874
+ const meta = React83__default.useMemo(
22483
22875
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
22484
22876
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
22485
22877
  );
22486
- React80__default.useEffect(() => {
22878
+ React83__default.useEffect(() => {
22487
22879
  const target = isRoot ? null : parentRoot;
22488
22880
  if (!target) {
22489
22881
  zonesRef.current.set(zoneId, meta);
@@ -22502,7 +22894,7 @@ function useDataDnd(args) {
22502
22894
  }, [parentRoot, isRoot, zoneId, meta]);
22503
22895
  const sensors = useAlmadarDndSensors(true);
22504
22896
  const collisionDetection = almadarDndCollisionDetection;
22505
- const findZoneByItem = React80__default.useCallback(
22897
+ const findZoneByItem = React83__default.useCallback(
22506
22898
  (id) => {
22507
22899
  for (const z of zonesRef.current.values()) {
22508
22900
  if (z.itemIds.includes(id)) return z;
@@ -22511,7 +22903,7 @@ function useDataDnd(args) {
22511
22903
  },
22512
22904
  []
22513
22905
  );
22514
- React80__default.useCallback(
22906
+ React83__default.useCallback(
22515
22907
  (group) => {
22516
22908
  for (const z of zonesRef.current.values()) {
22517
22909
  if (z.group === group) return z;
@@ -22520,7 +22912,7 @@ function useDataDnd(args) {
22520
22912
  },
22521
22913
  []
22522
22914
  );
22523
- const handleDragEnd = React80__default.useCallback(
22915
+ const handleDragEnd = React83__default.useCallback(
22524
22916
  (event) => {
22525
22917
  const { active, over } = event;
22526
22918
  const activeIdStr = String(active.id);
@@ -22611,8 +23003,8 @@ function useDataDnd(args) {
22611
23003
  },
22612
23004
  [eventBus]
22613
23005
  );
22614
- const sortableData = React80__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
22615
- const SortableItem = React80__default.useCallback(
23006
+ const sortableData = React83__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
23007
+ const SortableItem = React83__default.useCallback(
22616
23008
  ({ id, children }) => {
22617
23009
  const {
22618
23010
  attributes,
@@ -22652,7 +23044,7 @@ function useDataDnd(args) {
22652
23044
  id: droppableId,
22653
23045
  data: sortableData
22654
23046
  });
22655
- const ctx = React80__default.useContext(RootCtx);
23047
+ const ctx = React83__default.useContext(RootCtx);
22656
23048
  const activeDrag2 = ctx?.activeDrag ?? null;
22657
23049
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
22658
23050
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -22667,7 +23059,7 @@ function useDataDnd(args) {
22667
23059
  showForeignPlaceholder,
22668
23060
  ctxAvailable: ctx != null
22669
23061
  });
22670
- React80__default.useEffect(() => {
23062
+ React83__default.useEffect(() => {
22671
23063
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
22672
23064
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
22673
23065
  return /* @__PURE__ */ jsx(
@@ -22681,11 +23073,11 @@ function useDataDnd(args) {
22681
23073
  }
22682
23074
  );
22683
23075
  };
22684
- const rootContextValue = React80__default.useMemo(
23076
+ const rootContextValue = React83__default.useMemo(
22685
23077
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
22686
23078
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
22687
23079
  );
22688
- const handleDragStart = React80__default.useCallback((event) => {
23080
+ const handleDragStart = React83__default.useCallback((event) => {
22689
23081
  const sourceZone = findZoneByItem(event.active.id);
22690
23082
  const rect = event.active.rect.current.initial;
22691
23083
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -22704,7 +23096,7 @@ function useDataDnd(args) {
22704
23096
  isRoot
22705
23097
  });
22706
23098
  }, [findZoneByItem, isRoot, zoneId]);
22707
- const handleDragOver = React80__default.useCallback((event) => {
23099
+ const handleDragOver = React83__default.useCallback((event) => {
22708
23100
  const { active, over } = event;
22709
23101
  const overData = over?.data?.current;
22710
23102
  const overGroup = overData?.dndGroup ?? null;
@@ -22774,7 +23166,7 @@ function useDataDnd(args) {
22774
23166
  return next;
22775
23167
  });
22776
23168
  }, []);
22777
- const handleDragCancel = React80__default.useCallback((event) => {
23169
+ const handleDragCancel = React83__default.useCallback((event) => {
22778
23170
  setActiveDrag(null);
22779
23171
  setOverZoneGroup(null);
22780
23172
  dndLog.warn("dragCancel", {
@@ -22782,12 +23174,12 @@ function useDataDnd(args) {
22782
23174
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
22783
23175
  });
22784
23176
  }, []);
22785
- const handleDragEndWithCleanup = React80__default.useCallback((event) => {
23177
+ const handleDragEndWithCleanup = React83__default.useCallback((event) => {
22786
23178
  handleDragEnd(event);
22787
23179
  setActiveDrag(null);
22788
23180
  setOverZoneGroup(null);
22789
23181
  }, [handleDragEnd]);
22790
- const wrapContainer = React80__default.useCallback(
23182
+ const wrapContainer = React83__default.useCallback(
22791
23183
  (children) => {
22792
23184
  if (!enabled) return children;
22793
23185
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -22841,7 +23233,7 @@ var init_useDataDnd = __esm({
22841
23233
  init_useAlmadarDndCollision();
22842
23234
  init_Box();
22843
23235
  dndLog = createLogger("almadar:ui:dnd");
22844
- RootCtx = React80__default.createContext(null);
23236
+ RootCtx = React83__default.createContext(null);
22845
23237
  }
22846
23238
  });
22847
23239
  function renderIconInput(icon, props) {
@@ -23367,7 +23759,7 @@ function DataList({
23367
23759
  }) {
23368
23760
  const eventBus = useEventBus();
23369
23761
  const { t } = useTranslate();
23370
- const [visibleCount, setVisibleCount] = React80__default.useState(pageSize || Infinity);
23762
+ const [visibleCount, setVisibleCount] = React83__default.useState(pageSize || Infinity);
23371
23763
  const fieldDefs = fields ?? columns ?? [];
23372
23764
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
23373
23765
  const dnd = useDataDnd({
@@ -23386,7 +23778,7 @@ function DataList({
23386
23778
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
23387
23779
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
23388
23780
  const hasRenderProp = typeof children === "function";
23389
- React80__default.useEffect(() => {
23781
+ React83__default.useEffect(() => {
23390
23782
  const renderItemTypeOf = typeof schemaRenderItem;
23391
23783
  const childrenTypeOf = typeof children;
23392
23784
  if (data.length > 0 && !hasRenderProp) {
@@ -23491,7 +23883,7 @@ function DataList({
23491
23883
  const items2 = data.map((item) => item);
23492
23884
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
23493
23885
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
23494
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
23886
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
23495
23887
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
23496
23888
  group.items.map((itemData, index) => {
23497
23889
  const id = itemData.id || `${gi}-${index}`;
@@ -23632,7 +24024,7 @@ function DataList({
23632
24024
  className
23633
24025
  ),
23634
24026
  children: [
23635
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
24027
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
23636
24028
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
23637
24029
  group.items.map(
23638
24030
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -24548,7 +24940,7 @@ var init_Grid = __esm({
24548
24940
  as: Component = "div"
24549
24941
  }) => {
24550
24942
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
24551
- return React80__default.createElement(
24943
+ return React83__default.createElement(
24552
24944
  Component,
24553
24945
  {
24554
24946
  className: cn(
@@ -24736,8 +25128,8 @@ var init_Popover = __esm({
24736
25128
  onMouseEnter: handleOpen,
24737
25129
  onMouseLeave: handleClose
24738
25130
  };
24739
- const childElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
24740
- const triggerElement = React80__default.cloneElement(
25131
+ const childElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
25132
+ const triggerElement = React83__default.cloneElement(
24741
25133
  childElement,
24742
25134
  {
24743
25135
  ref: triggerRef,
@@ -25327,8 +25719,8 @@ var init_Tooltip = __esm({
25327
25719
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
25328
25720
  };
25329
25721
  }, []);
25330
- const triggerElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
25331
- const trigger = React80__default.cloneElement(triggerElement, {
25722
+ const triggerElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
25723
+ const trigger = React83__default.cloneElement(triggerElement, {
25332
25724
  ref: triggerRef,
25333
25725
  onMouseEnter: handleMouseEnter,
25334
25726
  onMouseLeave: handleMouseLeave,
@@ -25414,7 +25806,7 @@ var init_WizardProgress = __esm({
25414
25806
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
25415
25807
  const isActive = index === currentStep;
25416
25808
  const isCompleted = index < currentStep;
25417
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
25809
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
25418
25810
  /* @__PURE__ */ jsx(
25419
25811
  "button",
25420
25812
  {
@@ -26466,7 +26858,7 @@ function InventoryGrid({
26466
26858
  const eventBus = useEventBus();
26467
26859
  const slotCount = totalSlots ?? items.length;
26468
26860
  const emptySlotCount = Math.max(0, slotCount - items.length);
26469
- const handleSelect = React80.useCallback(
26861
+ const handleSelect = React83.useCallback(
26470
26862
  (id) => {
26471
26863
  onSelect?.(id);
26472
26864
  if (selectEvent) {
@@ -26683,31 +27075,31 @@ function GameCanvas2D({
26683
27075
  assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/",
26684
27076
  className
26685
27077
  }) {
26686
- const canvasRef = React80.useRef(null);
26687
- const rafRef = React80.useRef(0);
26688
- const frameRef = React80.useRef(0);
26689
- const lastTimeRef = React80.useRef(0);
26690
- const imageCache = React80.useRef(/* @__PURE__ */ new Map());
27078
+ const canvasRef = React83.useRef(null);
27079
+ const rafRef = React83.useRef(0);
27080
+ const frameRef = React83.useRef(0);
27081
+ const lastTimeRef = React83.useRef(0);
27082
+ const imageCache = React83.useRef(/* @__PURE__ */ new Map());
26691
27083
  const emit = useEmitEvent();
26692
- const onDrawRef = React80.useRef(onDraw);
27084
+ const onDrawRef = React83.useRef(onDraw);
26693
27085
  onDrawRef.current = onDraw;
26694
- const onTickRef = React80.useRef(onTick);
27086
+ const onTickRef = React83.useRef(onTick);
26695
27087
  onTickRef.current = onTick;
26696
- const tickEventRef = React80.useRef(tickEvent);
27088
+ const tickEventRef = React83.useRef(tickEvent);
26697
27089
  tickEventRef.current = tickEvent;
26698
- const drawEventRef = React80.useRef(drawEvent);
27090
+ const drawEventRef = React83.useRef(drawEvent);
26699
27091
  drawEventRef.current = drawEvent;
26700
- const emitRef = React80.useRef(emit);
27092
+ const emitRef = React83.useRef(emit);
26701
27093
  emitRef.current = emit;
26702
- const assetBaseUrlRef = React80.useRef(assetBaseUrl);
27094
+ const assetBaseUrlRef = React83.useRef(assetBaseUrl);
26703
27095
  assetBaseUrlRef.current = assetBaseUrl;
26704
- const backgroundImageRef = React80.useRef(backgroundImage);
27096
+ const backgroundImageRef = React83.useRef(backgroundImage);
26705
27097
  backgroundImageRef.current = backgroundImage;
26706
- const widthRef = React80.useRef(width);
27098
+ const widthRef = React83.useRef(width);
26707
27099
  widthRef.current = width;
26708
- const heightRef = React80.useRef(height);
27100
+ const heightRef = React83.useRef(height);
26709
27101
  heightRef.current = height;
26710
- const loadImage = React80.useCallback((url) => {
27102
+ const loadImage = React83.useCallback((url) => {
26711
27103
  const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
26712
27104
  const cached = imageCache.current.get(fullUrl);
26713
27105
  if (cached?.complete && cached.naturalWidth > 0) return cached;
@@ -26719,7 +27111,7 @@ function GameCanvas2D({
26719
27111
  }
26720
27112
  return null;
26721
27113
  }, []);
26722
- React80.useEffect(() => {
27114
+ React83.useEffect(() => {
26723
27115
  const canvas = canvasRef.current;
26724
27116
  if (!canvas) return;
26725
27117
  const ctx = canvas.getContext("2d");
@@ -27025,7 +27417,7 @@ function TurnPanel({
27025
27417
  className
27026
27418
  }) {
27027
27419
  const eventBus = useEventBus();
27028
- const handleAction = React80.useCallback(
27420
+ const handleAction = React83.useCallback(
27029
27421
  (event) => {
27030
27422
  if (event) {
27031
27423
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -27171,7 +27563,7 @@ function UnitCommandBar({
27171
27563
  className
27172
27564
  }) {
27173
27565
  const eventBus = useEventBus();
27174
- const handleCommand = React80.useCallback(
27566
+ const handleCommand = React83.useCallback(
27175
27567
  (event) => {
27176
27568
  if (event) {
27177
27569
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -27656,7 +28048,7 @@ function GameMenu({
27656
28048
  } catch {
27657
28049
  }
27658
28050
  const eventBus = eventBusProp || eventBusFromHook;
27659
- const handleOptionClick = React80.useCallback(
28051
+ const handleOptionClick = React83.useCallback(
27660
28052
  (option) => {
27661
28053
  if (option.event && eventBus) {
27662
28054
  eventBus.emit(`UI:${option.event}`, { option });
@@ -27770,7 +28162,7 @@ function GameOverScreen({
27770
28162
  } catch {
27771
28163
  }
27772
28164
  const eventBus = eventBusProp || eventBusFromHook;
27773
- const handleActionClick = React80.useCallback(
28165
+ const handleActionClick = React83.useCallback(
27774
28166
  (action) => {
27775
28167
  if (action.event && eventBus) {
27776
28168
  eventBus.emit(`UI:${action.event}`, { action });
@@ -28512,7 +28904,7 @@ var init_MapView = __esm({
28512
28904
  shadowSize: [41, 41]
28513
28905
  });
28514
28906
  L.Marker.prototype.options.icon = defaultIcon;
28515
- const { useEffect: useEffect72, useRef: useRef67, useCallback: useCallback112, useState: useState100 } = React80__default;
28907
+ const { useEffect: useEffect72, useRef: useRef67, useCallback: useCallback113, useState: useState104 } = React83__default;
28516
28908
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
28517
28909
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
28518
28910
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -28557,8 +28949,8 @@ var init_MapView = __esm({
28557
28949
  showAttribution = true
28558
28950
  }) {
28559
28951
  const eventBus = useEventBus2();
28560
- const [clickedPosition, setClickedPosition] = useState100(null);
28561
- const handleMapClick = useCallback112((lat, lng) => {
28952
+ const [clickedPosition, setClickedPosition] = useState104(null);
28953
+ const handleMapClick = useCallback113((lat, lng) => {
28562
28954
  if (showClickedPin) {
28563
28955
  setClickedPosition({ lat, lng });
28564
28956
  }
@@ -28567,7 +28959,7 @@ var init_MapView = __esm({
28567
28959
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
28568
28960
  }
28569
28961
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
28570
- const handleMarkerClick = useCallback112((marker) => {
28962
+ const handleMarkerClick = useCallback113((marker) => {
28571
28963
  onMarkerClick?.(marker);
28572
28964
  if (markerClickEvent) {
28573
28965
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -29418,8 +29810,8 @@ function TableView({
29418
29810
  }) {
29419
29811
  const eventBus = useEventBus();
29420
29812
  const { t } = useTranslate();
29421
- const [visibleCount, setVisibleCount] = React80__default.useState(pageSize > 0 ? pageSize : Infinity);
29422
- const [localSelected, setLocalSelected] = React80__default.useState(/* @__PURE__ */ new Set());
29813
+ const [visibleCount, setVisibleCount] = React83__default.useState(pageSize > 0 ? pageSize : Infinity);
29814
+ const [localSelected, setLocalSelected] = React83__default.useState(/* @__PURE__ */ new Set());
29423
29815
  const colDefs = columns ?? fields ?? [];
29424
29816
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
29425
29817
  const dnd = useDataDnd({
@@ -29614,12 +30006,12 @@ function TableView({
29614
30006
  ]
29615
30007
  }
29616
30008
  );
29617
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React80__default.Fragment, { children: rowInner }, id);
30009
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React83__default.Fragment, { children: rowInner }, id);
29618
30010
  };
29619
30011
  const items = data.map((row) => row);
29620
30012
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
29621
30013
  let runningIndex = 0;
29622
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
30014
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
29623
30015
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
29624
30016
  group.items.map((row) => renderRow(row, runningIndex++))
29625
30017
  ] }, gi)) });
@@ -30976,7 +31368,7 @@ var init_StepFlow = __esm({
30976
31368
  className
30977
31369
  }) => {
30978
31370
  if (orientation === "vertical") {
30979
- 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: [
31371
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React83__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
30980
31372
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
30981
31373
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30982
31374
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -30987,7 +31379,7 @@ var init_StepFlow = __esm({
30987
31379
  ] })
30988
31380
  ] }) }, index)) });
30989
31381
  }
30990
- 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: [
31382
+ 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(React83__default.Fragment, { children: [
30991
31383
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
30992
31384
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
30993
31385
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -31972,7 +32364,7 @@ var init_LikertScale = __esm({
31972
32364
  md: "text-base",
31973
32365
  lg: "text-lg"
31974
32366
  };
31975
- LikertScale = React80__default.forwardRef(
32367
+ LikertScale = React83__default.forwardRef(
31976
32368
  ({
31977
32369
  question,
31978
32370
  options = DEFAULT_LIKERT_OPTIONS,
@@ -31984,7 +32376,7 @@ var init_LikertScale = __esm({
31984
32376
  variant = "radios",
31985
32377
  className
31986
32378
  }, ref) => {
31987
- const groupId = React80__default.useId();
32379
+ const groupId = React83__default.useId();
31988
32380
  const eventBus = useEventBus();
31989
32381
  const handleSelect = useCallback(
31990
32382
  (next) => {
@@ -34266,7 +34658,7 @@ var init_DocBreadcrumb = __esm({
34266
34658
  "aria-label": t("aria.breadcrumb"),
34267
34659
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
34268
34660
  const isLast = idx === items.length - 1;
34269
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
34661
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
34270
34662
  idx > 0 && /* @__PURE__ */ jsx(
34271
34663
  Icon,
34272
34664
  {
@@ -35135,7 +35527,7 @@ var init_MiniStateMachine = __esm({
35135
35527
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
35136
35528
  const tc = transitionCounts[s.name] ?? 0;
35137
35529
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
35138
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
35530
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
35139
35531
  /* @__PURE__ */ jsx(
35140
35532
  AvlState,
35141
35533
  {
@@ -35339,7 +35731,7 @@ var init_PageHeader = __esm({
35339
35731
  info: "bg-info/10 text-info"
35340
35732
  };
35341
35733
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
35342
- 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: [
35734
+ 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(React83__default.Fragment, { children: [
35343
35735
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
35344
35736
  crumb.href ? /* @__PURE__ */ jsx(
35345
35737
  "a",
@@ -36068,7 +36460,7 @@ var init_WizardContainer = __esm({
36068
36460
  const isCompleted = index < currentStep;
36069
36461
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
36070
36462
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
36071
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
36463
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
36072
36464
  /* @__PURE__ */ jsx(
36073
36465
  Button,
36074
36466
  {
@@ -37270,6 +37662,73 @@ var init_GraphCanvas = __esm({
37270
37662
  GraphCanvas.displayName = "GraphCanvas";
37271
37663
  }
37272
37664
  });
37665
+ var ReflectionBlock;
37666
+ var init_ReflectionBlock = __esm({
37667
+ "components/core/molecules/ReflectionBlock.tsx"() {
37668
+ "use client";
37669
+ init_useEventBus();
37670
+ init_cn();
37671
+ ReflectionBlock = ({
37672
+ prompt,
37673
+ index,
37674
+ savedNote,
37675
+ saveEvent = "SAVE_REFLECTION",
37676
+ className
37677
+ }) => {
37678
+ const [note, setNote] = useState(savedNote ?? "");
37679
+ const [isExpanded, setIsExpanded] = useState(false);
37680
+ const { emit } = useEventBus();
37681
+ const handleSave = () => {
37682
+ emit(`UI:${saveEvent}`, { index, note });
37683
+ setIsExpanded(false);
37684
+ };
37685
+ return /* @__PURE__ */ jsx(
37686
+ "div",
37687
+ {
37688
+ className: cn(
37689
+ "my-6 border-l-4 border-amber-400 bg-amber-50 dark:bg-amber-900/20 rounded-r-lg p-4",
37690
+ className
37691
+ ),
37692
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
37693
+ /* @__PURE__ */ jsx(PauseCircle, { className: "text-amber-600 dark:text-amber-400 flex-shrink-0 mt-1", size: 20 }),
37694
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
37695
+ /* @__PURE__ */ jsx("div", { className: "font-medium text-amber-900 dark:text-amber-100 mb-2", children: "Pause & Reflect" }),
37696
+ /* @__PURE__ */ jsx("p", { className: "text-gray-700 dark:text-gray-300 text-sm mb-3", children: prompt }),
37697
+ isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
37698
+ /* @__PURE__ */ jsx(
37699
+ "textarea",
37700
+ {
37701
+ className: "w-full p-2 border border-amber-300 dark:border-amber-700 rounded text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-amber-500 focus:border-transparent",
37702
+ placeholder: "Your thoughts...",
37703
+ value: note,
37704
+ onChange: (e) => setNote(e.target.value),
37705
+ rows: 2
37706
+ }
37707
+ ),
37708
+ /* @__PURE__ */ jsx(
37709
+ "button",
37710
+ {
37711
+ onClick: handleSave,
37712
+ className: "mt-2 text-sm px-3 py-1 bg-amber-600 text-white rounded hover:bg-amber-700 transition-colors",
37713
+ children: "Save & Continue"
37714
+ }
37715
+ )
37716
+ ] }) : /* @__PURE__ */ jsx(
37717
+ "button",
37718
+ {
37719
+ onClick: () => setIsExpanded(true),
37720
+ className: "text-sm text-amber-600 dark:text-amber-400 hover:underline",
37721
+ children: savedNote ? "\u2713 Answered \xB7 Edit" : "Answer this question"
37722
+ }
37723
+ )
37724
+ ] })
37725
+ ] })
37726
+ }
37727
+ );
37728
+ };
37729
+ ReflectionBlock.displayName = "ReflectionBlock";
37730
+ }
37731
+ });
37273
37732
 
37274
37733
  // components/core/molecules/index.ts
37275
37734
  var init_molecules2 = __esm({
@@ -38352,7 +38811,7 @@ var init_DetailPanel = __esm({
38352
38811
  }
38353
38812
  });
38354
38813
  function extractTitle(children) {
38355
- if (!React80__default.isValidElement(children)) return void 0;
38814
+ if (!React83__default.isValidElement(children)) return void 0;
38356
38815
  const props = children.props;
38357
38816
  if (typeof props.title === "string") {
38358
38817
  return props.title;
@@ -38407,7 +38866,7 @@ function LinearView({
38407
38866
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
38408
38867
  const isDone = i < currentIdx;
38409
38868
  const isCurrent = i === currentIdx;
38410
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
38869
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
38411
38870
  i > 0 && /* @__PURE__ */ jsx(
38412
38871
  Typography,
38413
38872
  {
@@ -39365,12 +39824,12 @@ var init_Form = __esm({
39365
39824
  const isSchemaEntity = isOrbitalEntitySchema(entity);
39366
39825
  const resolvedEntity = isSchemaEntity ? entity : void 0;
39367
39826
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
39368
- const normalizedInitialData = React80__default.useMemo(() => {
39827
+ const normalizedInitialData = React83__default.useMemo(() => {
39369
39828
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
39370
39829
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
39371
39830
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
39372
39831
  }, [entity, initialData]);
39373
- const entityDerivedFields = React80__default.useMemo(() => {
39832
+ const entityDerivedFields = React83__default.useMemo(() => {
39374
39833
  if (fields && fields.length > 0) return void 0;
39375
39834
  if (!resolvedEntity) return void 0;
39376
39835
  return resolvedEntity.fields.map(
@@ -39390,16 +39849,16 @@ var init_Form = __esm({
39390
39849
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
39391
39850
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
39392
39851
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
39393
- const [formData, setFormData] = React80__default.useState(
39852
+ const [formData, setFormData] = React83__default.useState(
39394
39853
  normalizedInitialData
39395
39854
  );
39396
- const [collapsedSections, setCollapsedSections] = React80__default.useState(
39855
+ const [collapsedSections, setCollapsedSections] = React83__default.useState(
39397
39856
  /* @__PURE__ */ new Set()
39398
39857
  );
39399
- const [submitError, setSubmitError] = React80__default.useState(null);
39400
- const formRef = React80__default.useRef(null);
39858
+ const [submitError, setSubmitError] = React83__default.useState(null);
39859
+ const formRef = React83__default.useRef(null);
39401
39860
  const formMode = props.mode;
39402
- const mountedRef = React80__default.useRef(false);
39861
+ const mountedRef = React83__default.useRef(false);
39403
39862
  if (!mountedRef.current) {
39404
39863
  mountedRef.current = true;
39405
39864
  debug("forms", "mount", {
@@ -39412,7 +39871,7 @@ var init_Form = __esm({
39412
39871
  });
39413
39872
  }
39414
39873
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
39415
- const evalContext = React80__default.useMemo(
39874
+ const evalContext = React83__default.useMemo(
39416
39875
  () => ({
39417
39876
  formValues: formData,
39418
39877
  globalVariables: externalContext?.globalVariables ?? {},
@@ -39421,7 +39880,7 @@ var init_Form = __esm({
39421
39880
  }),
39422
39881
  [formData, externalContext]
39423
39882
  );
39424
- React80__default.useEffect(() => {
39883
+ React83__default.useEffect(() => {
39425
39884
  debug("forms", "initialData-sync", {
39426
39885
  mode: formMode,
39427
39886
  normalizedInitialData,
@@ -39432,7 +39891,7 @@ var init_Form = __esm({
39432
39891
  setFormData(normalizedInitialData);
39433
39892
  }
39434
39893
  }, [normalizedInitialData]);
39435
- const processCalculations = React80__default.useCallback(
39894
+ const processCalculations = React83__default.useCallback(
39436
39895
  (changedFieldId, newFormData) => {
39437
39896
  if (!hiddenCalculations.length) return;
39438
39897
  const context = {
@@ -39457,7 +39916,7 @@ var init_Form = __esm({
39457
39916
  },
39458
39917
  [hiddenCalculations, externalContext, eventBus]
39459
39918
  );
39460
- const checkViolations = React80__default.useCallback(
39919
+ const checkViolations = React83__default.useCallback(
39461
39920
  (changedFieldId, newFormData) => {
39462
39921
  if (!violationTriggers.length) return;
39463
39922
  const context = {
@@ -39495,7 +39954,7 @@ var init_Form = __esm({
39495
39954
  processCalculations(name, newFormData);
39496
39955
  checkViolations(name, newFormData);
39497
39956
  };
39498
- const isFieldVisible = React80__default.useCallback(
39957
+ const isFieldVisible = React83__default.useCallback(
39499
39958
  (fieldName) => {
39500
39959
  const condition = conditionalFields[fieldName];
39501
39960
  if (!condition) return true;
@@ -39503,7 +39962,7 @@ var init_Form = __esm({
39503
39962
  },
39504
39963
  [conditionalFields, evalContext]
39505
39964
  );
39506
- const isSectionVisible = React80__default.useCallback(
39965
+ const isSectionVisible = React83__default.useCallback(
39507
39966
  (section) => {
39508
39967
  if (!section.condition) return true;
39509
39968
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -39579,7 +40038,7 @@ var init_Form = __esm({
39579
40038
  eventBus.emit(`UI:${onCancel}`);
39580
40039
  }
39581
40040
  };
39582
- const renderField = React80__default.useCallback(
40041
+ const renderField = React83__default.useCallback(
39583
40042
  (field) => {
39584
40043
  const fieldName = field.name || field.field;
39585
40044
  if (!fieldName) return null;
@@ -39600,7 +40059,7 @@ var init_Form = __esm({
39600
40059
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
39601
40060
  );
39602
40061
  const effectiveFields = entityDerivedFields ?? fields;
39603
- const normalizedFields = React80__default.useMemo(() => {
40062
+ const normalizedFields = React83__default.useMemo(() => {
39604
40063
  if (!effectiveFields || effectiveFields.length === 0) return [];
39605
40064
  return effectiveFields.map((field) => {
39606
40065
  if (typeof field === "string") {
@@ -39623,7 +40082,7 @@ var init_Form = __esm({
39623
40082
  return field;
39624
40083
  });
39625
40084
  }, [effectiveFields, resolvedEntity]);
39626
- const schemaFields = React80__default.useMemo(() => {
40085
+ const schemaFields = React83__default.useMemo(() => {
39627
40086
  if (normalizedFields.length === 0) return null;
39628
40087
  if (isDebugEnabled()) {
39629
40088
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -39633,7 +40092,7 @@ var init_Form = __esm({
39633
40092
  }
39634
40093
  return normalizedFields.map(renderField).filter(Boolean);
39635
40094
  }, [normalizedFields, renderField, entityName, conditionalFields]);
39636
- const sectionElements = React80__default.useMemo(() => {
40095
+ const sectionElements = React83__default.useMemo(() => {
39637
40096
  if (!sections || sections.length === 0) return null;
39638
40097
  return sections.map((section) => {
39639
40098
  if (!isSectionVisible(section)) {
@@ -40908,7 +41367,7 @@ var init_List = __esm({
40908
41367
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
40909
41368
  return [];
40910
41369
  }, [entity]);
40911
- const getItemActions = React80__default.useCallback(
41370
+ const getItemActions = React83__default.useCallback(
40912
41371
  (item) => {
40913
41372
  if (!itemActions) return [];
40914
41373
  if (typeof itemActions === "function") {
@@ -41384,7 +41843,7 @@ var init_MediaGallery = __esm({
41384
41843
  [selectable, selectedItems, selectionEvent, eventBus]
41385
41844
  );
41386
41845
  const entityData = Array.isArray(entity) ? entity : [];
41387
- const items = React80__default.useMemo(() => {
41846
+ const items = React83__default.useMemo(() => {
41388
41847
  if (propItems) return propItems;
41389
41848
  if (entityData.length === 0) return [];
41390
41849
  return entityData.map((record, idx) => ({
@@ -41545,7 +42004,7 @@ var init_MediaGallery = __esm({
41545
42004
  }
41546
42005
  });
41547
42006
  function extractTitle2(children) {
41548
- if (!React80__default.isValidElement(children)) return void 0;
42007
+ if (!React83__default.isValidElement(children)) return void 0;
41549
42008
  const props = children.props;
41550
42009
  if (typeof props.title === "string") {
41551
42010
  return props.title;
@@ -41957,7 +42416,7 @@ var init_debugRegistry = __esm({
41957
42416
  }
41958
42417
  });
41959
42418
  function useDebugData() {
41960
- const [data, setData] = React80.useState(() => ({
42419
+ const [data, setData] = React83.useState(() => ({
41961
42420
  traits: [],
41962
42421
  ticks: [],
41963
42422
  guards: [],
@@ -41971,7 +42430,7 @@ function useDebugData() {
41971
42430
  },
41972
42431
  lastUpdate: Date.now()
41973
42432
  }));
41974
- React80.useEffect(() => {
42433
+ React83.useEffect(() => {
41975
42434
  const updateData = () => {
41976
42435
  setData({
41977
42436
  traits: getAllTraits(),
@@ -42080,12 +42539,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
42080
42539
  return positions;
42081
42540
  }
42082
42541
  function WalkMinimap() {
42083
- const [walkStep, setWalkStep] = React80.useState(null);
42084
- const [traits2, setTraits] = React80.useState([]);
42085
- const [coveredEdges, setCoveredEdges] = React80.useState([]);
42086
- const [completedTraits, setCompletedTraits] = React80.useState(/* @__PURE__ */ new Set());
42087
- const prevTraitRef = React80.useRef(null);
42088
- React80.useEffect(() => {
42542
+ const [walkStep, setWalkStep] = React83.useState(null);
42543
+ const [traits2, setTraits] = React83.useState([]);
42544
+ const [coveredEdges, setCoveredEdges] = React83.useState([]);
42545
+ const [completedTraits, setCompletedTraits] = React83.useState(/* @__PURE__ */ new Set());
42546
+ const prevTraitRef = React83.useRef(null);
42547
+ React83.useEffect(() => {
42089
42548
  const interval = setInterval(() => {
42090
42549
  const w = window;
42091
42550
  const step = w.__orbitalWalkStep;
@@ -42521,15 +42980,15 @@ var init_EntitiesTab = __esm({
42521
42980
  });
42522
42981
  function EventFlowTab({ events: events2 }) {
42523
42982
  const { t } = useTranslate();
42524
- const [filter, setFilter] = React80.useState("all");
42525
- const containerRef = React80.useRef(null);
42526
- const [autoScroll, setAutoScroll] = React80.useState(true);
42527
- React80.useEffect(() => {
42983
+ const [filter, setFilter] = React83.useState("all");
42984
+ const containerRef = React83.useRef(null);
42985
+ const [autoScroll, setAutoScroll] = React83.useState(true);
42986
+ React83.useEffect(() => {
42528
42987
  if (autoScroll && containerRef.current) {
42529
42988
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42530
42989
  }
42531
42990
  }, [events2.length, autoScroll]);
42532
- const filteredEvents = React80.useMemo(() => {
42991
+ const filteredEvents = React83.useMemo(() => {
42533
42992
  if (filter === "all") return events2;
42534
42993
  return events2.filter((e) => e.type === filter);
42535
42994
  }, [events2, filter]);
@@ -42645,7 +43104,7 @@ var init_EventFlowTab = __esm({
42645
43104
  });
42646
43105
  function GuardsPanel({ guards }) {
42647
43106
  const { t } = useTranslate();
42648
- const [filter, setFilter] = React80.useState("all");
43107
+ const [filter, setFilter] = React83.useState("all");
42649
43108
  if (guards.length === 0) {
42650
43109
  return /* @__PURE__ */ jsx(
42651
43110
  EmptyState,
@@ -42658,7 +43117,7 @@ function GuardsPanel({ guards }) {
42658
43117
  }
42659
43118
  const passedCount = guards.filter((g) => g.result).length;
42660
43119
  const failedCount = guards.length - passedCount;
42661
- const filteredGuards = React80.useMemo(() => {
43120
+ const filteredGuards = React83.useMemo(() => {
42662
43121
  if (filter === "all") return guards;
42663
43122
  if (filter === "passed") return guards.filter((g) => g.result);
42664
43123
  return guards.filter((g) => !g.result);
@@ -42821,10 +43280,10 @@ function EffectBadge({ effect }) {
42821
43280
  }
42822
43281
  function TransitionTimeline({ transitions }) {
42823
43282
  const { t } = useTranslate();
42824
- const containerRef = React80.useRef(null);
42825
- const [autoScroll, setAutoScroll] = React80.useState(true);
42826
- const [expandedId, setExpandedId] = React80.useState(null);
42827
- React80.useEffect(() => {
43283
+ const containerRef = React83.useRef(null);
43284
+ const [autoScroll, setAutoScroll] = React83.useState(true);
43285
+ const [expandedId, setExpandedId] = React83.useState(null);
43286
+ React83.useEffect(() => {
42828
43287
  if (autoScroll && containerRef.current) {
42829
43288
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42830
43289
  }
@@ -43104,9 +43563,9 @@ function getAllEvents(traits2) {
43104
43563
  function EventDispatcherTab({ traits: traits2, schema }) {
43105
43564
  const eventBus = useEventBus();
43106
43565
  const { t } = useTranslate();
43107
- const [log12, setLog] = React80.useState([]);
43108
- const prevStatesRef = React80.useRef(/* @__PURE__ */ new Map());
43109
- React80.useEffect(() => {
43566
+ const [log12, setLog] = React83.useState([]);
43567
+ const prevStatesRef = React83.useRef(/* @__PURE__ */ new Map());
43568
+ React83.useEffect(() => {
43110
43569
  for (const trait of traits2) {
43111
43570
  const prev = prevStatesRef.current.get(trait.id);
43112
43571
  if (prev && prev !== trait.currentState) {
@@ -43275,10 +43734,10 @@ function VerifyModePanel({
43275
43734
  localCount
43276
43735
  }) {
43277
43736
  const { t } = useTranslate();
43278
- const [expanded, setExpanded] = React80.useState(true);
43279
- const scrollRef = React80.useRef(null);
43280
- const prevCountRef = React80.useRef(0);
43281
- React80.useEffect(() => {
43737
+ const [expanded, setExpanded] = React83.useState(true);
43738
+ const scrollRef = React83.useRef(null);
43739
+ const prevCountRef = React83.useRef(0);
43740
+ React83.useEffect(() => {
43282
43741
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
43283
43742
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
43284
43743
  }
@@ -43335,10 +43794,10 @@ function RuntimeDebugger({
43335
43794
  schema
43336
43795
  }) {
43337
43796
  const { t } = useTranslate();
43338
- const [isCollapsed, setIsCollapsed] = React80.useState(mode === "verify" ? true : defaultCollapsed);
43339
- const [isVisible, setIsVisible] = React80.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43797
+ const [isCollapsed, setIsCollapsed] = React83.useState(mode === "verify" ? true : defaultCollapsed);
43798
+ const [isVisible, setIsVisible] = React83.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43340
43799
  const debugData = useDebugData();
43341
- React80.useEffect(() => {
43800
+ React83.useEffect(() => {
43342
43801
  if (mode === "inline") return;
43343
43802
  return onDebugToggle((enabled) => {
43344
43803
  setIsVisible(enabled);
@@ -43347,7 +43806,7 @@ function RuntimeDebugger({
43347
43806
  }
43348
43807
  });
43349
43808
  }, [mode]);
43350
- React80.useEffect(() => {
43809
+ React83.useEffect(() => {
43351
43810
  if (mode === "inline") return;
43352
43811
  const handleKeyDown = (e) => {
43353
43812
  if (e.key === "`" && isVisible) {
@@ -43567,6 +44026,117 @@ var init_RuntimeDebugger2 = __esm({
43567
44026
  RuntimeDebugger.displayName = "RuntimeDebugger";
43568
44027
  }
43569
44028
  });
44029
+ var SegmentRenderer;
44030
+ var init_SegmentRenderer = __esm({
44031
+ "components/core/organisms/SegmentRenderer.tsx"() {
44032
+ "use client";
44033
+ init_MarkdownContent();
44034
+ init_CodeBlock();
44035
+ init_QuizBlock();
44036
+ init_ActivationBlock();
44037
+ init_ConnectionBlock();
44038
+ init_ReflectionBlock();
44039
+ init_BloomQuizBlock();
44040
+ init_CodeRunnerPanel();
44041
+ init_cn();
44042
+ SegmentRenderer = ({
44043
+ segments,
44044
+ className,
44045
+ containerClassName,
44046
+ userProgress,
44047
+ onRunCodeSimulation,
44048
+ onRenderVisualization
44049
+ }) => {
44050
+ if (segments.length === 0) return null;
44051
+ let reflectIndex = 0;
44052
+ let bloomIndex = 0;
44053
+ return /* @__PURE__ */ jsx(
44054
+ "div",
44055
+ {
44056
+ className: cn(
44057
+ "border border-gray-200 dark:border-gray-700 rounded-lg p-2 md:p-4 overflow-x-auto space-y-6",
44058
+ containerClassName,
44059
+ className
44060
+ ),
44061
+ children: segments.map((segment, index) => {
44062
+ if (segment.type === "markdown") {
44063
+ return /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `md-${index}`);
44064
+ }
44065
+ if (segment.type === "code") {
44066
+ if (segment.runnable && onRunCodeSimulation) {
44067
+ return /* @__PURE__ */ jsx(
44068
+ CodeRunnerPanel,
44069
+ {
44070
+ language: segment.language,
44071
+ code: segment.content,
44072
+ runnable: true,
44073
+ onRun: (code) => onRunCodeSimulation(code, segment.language)
44074
+ },
44075
+ `code-${index}`
44076
+ );
44077
+ }
44078
+ return /* @__PURE__ */ jsx(
44079
+ CodeBlock,
44080
+ {
44081
+ language: segment.language ?? "text",
44082
+ code: segment.content
44083
+ },
44084
+ `code-${index}`
44085
+ );
44086
+ }
44087
+ if (segment.type === "quiz") {
44088
+ return /* @__PURE__ */ jsx(QuizBlock, { question: segment.question, answer: segment.answer }, `quiz-${index}`);
44089
+ }
44090
+ if (segment.type === "activate") {
44091
+ return /* @__PURE__ */ jsx(
44092
+ ActivationBlock,
44093
+ {
44094
+ question: segment.question,
44095
+ savedResponse: userProgress?.activationResponse
44096
+ },
44097
+ `activate-${index}`
44098
+ );
44099
+ }
44100
+ if (segment.type === "connect") {
44101
+ return /* @__PURE__ */ jsx(ConnectionBlock, { content: segment.content }, `connect-${index}`);
44102
+ }
44103
+ if (segment.type === "reflect") {
44104
+ const ri = reflectIndex++;
44105
+ return /* @__PURE__ */ jsx(
44106
+ ReflectionBlock,
44107
+ {
44108
+ prompt: segment.prompt,
44109
+ index: ri,
44110
+ savedNote: userProgress?.reflectionNotes?.[ri]
44111
+ },
44112
+ `reflect-${index}`
44113
+ );
44114
+ }
44115
+ if (segment.type === "bloom") {
44116
+ const bi = bloomIndex++;
44117
+ return /* @__PURE__ */ jsx(
44118
+ BloomQuizBlock,
44119
+ {
44120
+ level: segment.level,
44121
+ question: segment.question,
44122
+ answer: segment.answer,
44123
+ index: bi,
44124
+ isAnswered: userProgress?.bloomAnswered?.[bi]
44125
+ },
44126
+ `bloom-${index}`
44127
+ );
44128
+ }
44129
+ if (segment.type === "visualization") {
44130
+ return onRenderVisualization ? onRenderVisualization(segment.visualizationType, segment.description, index) ?? null : null;
44131
+ }
44132
+ return null;
44133
+ })
44134
+ }
44135
+ );
44136
+ };
44137
+ SegmentRenderer.displayName = "SegmentRenderer";
44138
+ }
44139
+ });
43570
44140
  function TraitSlot({
43571
44141
  slotNumber,
43572
44142
  equippedItem,
@@ -43796,7 +44366,7 @@ function SequenceBar({
43796
44366
  onSlotRemove(index);
43797
44367
  }, [onSlotRemove, playing]);
43798
44368
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
43799
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
44369
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
43800
44370
  i > 0 && /* @__PURE__ */ jsx(
43801
44371
  Typography,
43802
44372
  {
@@ -44775,7 +45345,7 @@ var init_StatCard = __esm({
44775
45345
  const labelToUse = propLabel ?? propTitle;
44776
45346
  const eventBus = useEventBus();
44777
45347
  const { t } = useTranslate();
44778
- const handleActionClick = React80__default.useCallback(() => {
45348
+ const handleActionClick = React83__default.useCallback(() => {
44779
45349
  if (action?.event) {
44780
45350
  eventBus.emit(`UI:${action.event}`, {});
44781
45351
  }
@@ -44786,7 +45356,7 @@ var init_StatCard = __esm({
44786
45356
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
44787
45357
  const isLoading = externalLoading ?? false;
44788
45358
  const error = externalError;
44789
- const computeMetricValue = React80__default.useCallback(
45359
+ const computeMetricValue = React83__default.useCallback(
44790
45360
  (metric, items) => {
44791
45361
  if (metric.value !== void 0) {
44792
45362
  return metric.value;
@@ -44825,7 +45395,7 @@ var init_StatCard = __esm({
44825
45395
  },
44826
45396
  []
44827
45397
  );
44828
- const schemaStats = React80__default.useMemo(() => {
45398
+ const schemaStats = React83__default.useMemo(() => {
44829
45399
  if (!metrics || metrics.length === 0) return null;
44830
45400
  return metrics.map((metric) => ({
44831
45401
  label: metric.label,
@@ -44833,7 +45403,7 @@ var init_StatCard = __esm({
44833
45403
  format: metric.format
44834
45404
  }));
44835
45405
  }, [metrics, data, computeMetricValue]);
44836
- const calculatedTrend = React80__default.useMemo(() => {
45406
+ const calculatedTrend = React83__default.useMemo(() => {
44837
45407
  if (manualTrend !== void 0) return manualTrend;
44838
45408
  if (previousValue === void 0 || currentValue === void 0)
44839
45409
  return void 0;
@@ -45798,7 +46368,7 @@ var init_Timeline = __esm({
45798
46368
  }) => {
45799
46369
  const { t } = useTranslate();
45800
46370
  const entityData = Array.isArray(entity) ? entity : [];
45801
- const items = React80__default.useMemo(() => {
46371
+ const items = React83__default.useMemo(() => {
45802
46372
  if (propItems) return propItems;
45803
46373
  if (entityData.length === 0) return [];
45804
46374
  return entityData.map((record, idx) => {
@@ -45905,7 +46475,7 @@ var init_Timeline = __esm({
45905
46475
  }
45906
46476
  });
45907
46477
  function extractToastProps(children) {
45908
- if (!React80__default.isValidElement(children)) {
46478
+ if (!React83__default.isValidElement(children)) {
45909
46479
  if (typeof children === "string") {
45910
46480
  return { message: children };
45911
46481
  }
@@ -45943,7 +46513,7 @@ var init_ToastSlot = __esm({
45943
46513
  eventBus.emit("UI:CLOSE");
45944
46514
  };
45945
46515
  if (!isVisible) return null;
45946
- const isCustomContent = React80__default.isValidElement(children) && !message;
46516
+ const isCustomContent = React83__default.isValidElement(children) && !message;
45947
46517
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
45948
46518
  Toast,
45949
46519
  {
@@ -46477,7 +47047,7 @@ var init_WorldMapTemplate = __esm({
46477
47047
  }
46478
47048
  });
46479
47049
  function lazyThree(name, loader) {
46480
- const Lazy = React80__default.lazy(
47050
+ const Lazy = React83__default.lazy(
46481
47051
  () => loader().then((m) => {
46482
47052
  const Resolved = m[name];
46483
47053
  if (!Resolved) {
@@ -46489,13 +47059,13 @@ function lazyThree(name, loader) {
46489
47059
  })
46490
47060
  );
46491
47061
  function ThreeWrapper(props) {
46492
- return React80__default.createElement(
47062
+ return React83__default.createElement(
46493
47063
  ThreeBoundary,
46494
47064
  { name },
46495
- React80__default.createElement(
46496
- React80__default.Suspense,
47065
+ React83__default.createElement(
47066
+ React83__default.Suspense,
46497
47067
  { fallback: null },
46498
- React80__default.createElement(Lazy, props)
47068
+ React83__default.createElement(Lazy, props)
46499
47069
  )
46500
47070
  );
46501
47071
  }
@@ -46511,6 +47081,7 @@ var init_component_registry_generated = __esm({
46511
47081
  init_ActionButtons();
46512
47082
  init_ActionPalette();
46513
47083
  init_ActionTile();
47084
+ init_ActivationBlock();
46514
47085
  init_ComponentPatterns();
46515
47086
  init_AnimatedCounter();
46516
47087
  init_AnimatedGraphic();
@@ -46523,6 +47094,7 @@ var init_component_registry_generated = __esm({
46523
47094
  init_BattleBoard();
46524
47095
  init_BattleTemplate();
46525
47096
  init_BehaviorView();
47097
+ init_BloomQuizBlock();
46526
47098
  init_BookChapterView();
46527
47099
  init_BookCoverPage();
46528
47100
  init_BookNavBar();
@@ -46550,12 +47122,14 @@ var init_component_registry_generated = __esm({
46550
47122
  init_ChoiceButton();
46551
47123
  init_ClassifierBoard();
46552
47124
  init_CodeBlock();
47125
+ init_CodeRunnerPanel();
46553
47126
  init_CombatLog();
46554
47127
  init_ComboCounter();
46555
47128
  init_CommunityLinks();
46556
47129
  init_ConditionalWrapper();
46557
47130
  init_ConfettiEffect();
46558
47131
  init_ConfirmDialog();
47132
+ init_ConnectionBlock();
46559
47133
  init_Container();
46560
47134
  init_ContentRenderer();
46561
47135
  init_ContentSection();
@@ -46683,6 +47257,7 @@ var init_component_registry_generated = __esm({
46683
47257
  init_QuizBlock();
46684
47258
  init_Radio();
46685
47259
  init_RangeSlider();
47260
+ init_ReflectionBlock();
46686
47261
  init_RelationSelect();
46687
47262
  init_RepeatableFormSection();
46688
47263
  init_ReplyTree();
@@ -46697,6 +47272,7 @@ var init_component_registry_generated = __esm({
46697
47272
  init_SearchInput();
46698
47273
  init_Section();
46699
47274
  init_SectionHeader();
47275
+ init_SegmentRenderer();
46700
47276
  init_Select();
46701
47277
  init_SequenceBar();
46702
47278
  init_SequencerBoard();
@@ -46788,7 +47364,7 @@ var init_component_registry_generated = __esm({
46788
47364
  init_WorldMapBoard();
46789
47365
  init_WorldMapTemplate();
46790
47366
  init_XPBar();
46791
- ThreeBoundary = class extends React80__default.Component {
47367
+ ThreeBoundary = class extends React83__default.Component {
46792
47368
  constructor() {
46793
47369
  super(...arguments);
46794
47370
  __publicField(this, "state", { failed: false });
@@ -46798,7 +47374,7 @@ var init_component_registry_generated = __esm({
46798
47374
  }
46799
47375
  render() {
46800
47376
  if (this.state.failed) {
46801
- return React80__default.createElement(
47377
+ return React83__default.createElement(
46802
47378
  "div",
46803
47379
  {
46804
47380
  "data-testid": "three-unavailable",
@@ -46822,6 +47398,7 @@ var init_component_registry_generated = __esm({
46822
47398
  "ActionButtons": ActionButtons,
46823
47399
  "ActionPalette": ActionPalette,
46824
47400
  "ActionTile": ActionTile,
47401
+ "ActivationBlock": ActivationBlock,
46825
47402
  "Alert": AlertPattern,
46826
47403
  "AlertPattern": AlertPattern,
46827
47404
  "AnimatedCounter": AnimatedCounter,
@@ -46835,6 +47412,7 @@ var init_component_registry_generated = __esm({
46835
47412
  "BattleBoard": BattleBoard,
46836
47413
  "BattleTemplate": BattleTemplate,
46837
47414
  "BehaviorView": BehaviorView,
47415
+ "BloomQuizBlock": BloomQuizBlock,
46838
47416
  "BookChapterView": BookChapterView,
46839
47417
  "BookCoverPage": BookCoverPage,
46840
47418
  "BookNavBar": BookNavBar,
@@ -46865,12 +47443,14 @@ var init_component_registry_generated = __esm({
46865
47443
  "ChoiceButton": ChoiceButton,
46866
47444
  "ClassifierBoard": ClassifierBoard,
46867
47445
  "CodeBlock": CodeBlock,
47446
+ "CodeRunnerPanel": CodeRunnerPanel,
46868
47447
  "CombatLog": CombatLog,
46869
47448
  "ComboCounter": ComboCounter,
46870
47449
  "CommunityLinks": CommunityLinks,
46871
47450
  "ConditionalWrapper": ConditionalWrapper,
46872
47451
  "ConfettiEffect": ConfettiEffect,
46873
47452
  "ConfirmDialog": ConfirmDialog,
47453
+ "ConnectionBlock": ConnectionBlock,
46874
47454
  "Container": Container,
46875
47455
  "ContentRenderer": ContentRenderer,
46876
47456
  "ContentSection": ContentSection,
@@ -47007,6 +47587,7 @@ var init_component_registry_generated = __esm({
47007
47587
  "QuizBlock": QuizBlock,
47008
47588
  "Radio": Radio,
47009
47589
  "RangeSlider": RangeSlider,
47590
+ "ReflectionBlock": ReflectionBlock,
47010
47591
  "RelationSelect": RelationSelect,
47011
47592
  "RepeatableFormSection": RepeatableFormSection,
47012
47593
  "ReplyTree": ReplyTree,
@@ -47021,6 +47602,7 @@ var init_component_registry_generated = __esm({
47021
47602
  "SearchInput": SearchInput,
47022
47603
  "Section": Section,
47023
47604
  "SectionHeader": SectionHeader,
47605
+ "SegmentRenderer": SegmentRenderer,
47024
47606
  "Select": Select,
47025
47607
  "SequenceBar": SequenceBar,
47026
47608
  "SequencerBoard": SequencerBoard,
@@ -47134,7 +47716,7 @@ function SuspenseConfigProvider({
47134
47716
  config,
47135
47717
  children
47136
47718
  }) {
47137
- return React80__default.createElement(
47719
+ return React83__default.createElement(
47138
47720
  SuspenseConfigContext.Provider,
47139
47721
  { value: config },
47140
47722
  children
@@ -47624,7 +48206,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
47624
48206
  const key = `${parentId}-${index}-trait:${traitName}`;
47625
48207
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
47626
48208
  }
47627
- return /* @__PURE__ */ jsx(React80__default.Fragment, { children: child }, `${parentId}-${index}`);
48209
+ return /* @__PURE__ */ jsx(React83__default.Fragment, { children: child }, `${parentId}-${index}`);
47628
48210
  }
47629
48211
  if (!child || typeof child !== "object") return null;
47630
48212
  const childId = `${parentId}-${index}`;
@@ -47664,14 +48246,14 @@ function isPatternConfig(value) {
47664
48246
  if (value === null || value === void 0) return false;
47665
48247
  if (typeof value !== "object") return false;
47666
48248
  if (Array.isArray(value)) return false;
47667
- if (React80__default.isValidElement(value)) return false;
48249
+ if (React83__default.isValidElement(value)) return false;
47668
48250
  if (value instanceof Date) return false;
47669
48251
  if (typeof value === "function") return false;
47670
48252
  const record = value;
47671
48253
  return "type" in record && typeof record.type === "string";
47672
48254
  }
47673
48255
  function isPlainConfigObject(value) {
47674
- if (React80__default.isValidElement(value)) return false;
48256
+ if (React83__default.isValidElement(value)) return false;
47675
48257
  if (value instanceof Date) return false;
47676
48258
  const proto = Object.getPrototypeOf(value);
47677
48259
  return proto === Object.prototype || proto === null;