@almadar/ui 5.25.0 → 5.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/avl/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import * as React97 from 'react';
3
- import React97__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
2
+ import * as React95 from 'react';
3
+ import React95__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
4
4
  import { OrbitalProvider, EventBusContext, useTraitScope, VerificationProvider, TraitScopeProvider } from '@almadar/ui/providers';
5
5
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
@@ -3085,11 +3085,9 @@ var init_cn = __esm({
3085
3085
  // components/core/atoms/Typography.tsx
3086
3086
  var Typography_exports = {};
3087
3087
  __export(Typography_exports, {
3088
- Heading: () => Heading,
3089
- Text: () => Text,
3090
3088
  Typography: () => Typography
3091
3089
  });
3092
- var variantStyles, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles, Typography, sizeStyles, Heading, Text;
3090
+ var variantStyles, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles, Typography;
3093
3091
  var init_Typography = __esm({
3094
3092
  "components/core/atoms/Typography.tsx"() {
3095
3093
  init_cn();
@@ -3200,46 +3198,6 @@ var init_Typography = __esm({
3200
3198
  );
3201
3199
  };
3202
3200
  Typography.displayName = "Typography";
3203
- sizeStyles = {
3204
- xs: "text-xs",
3205
- sm: "text-sm",
3206
- md: "text-base",
3207
- lg: "text-lg",
3208
- xl: "text-xl",
3209
- "2xl": "text-2xl",
3210
- "3xl": "text-3xl"
3211
- };
3212
- Heading = ({
3213
- level = 2,
3214
- size,
3215
- className,
3216
- ...props
3217
- }) => {
3218
- const variant = `h${level}`;
3219
- const sizeClass = size ? sizeStyles[size] : void 0;
3220
- return /* @__PURE__ */ jsx(
3221
- Typography,
3222
- {
3223
- variant,
3224
- className: cn(sizeClass, className),
3225
- ...props
3226
- }
3227
- );
3228
- };
3229
- Heading.displayName = "Heading";
3230
- Text = ({
3231
- variant = "body",
3232
- ...props
3233
- }) => {
3234
- return /* @__PURE__ */ jsx(
3235
- Typography,
3236
- {
3237
- variant,
3238
- ...props
3239
- }
3240
- );
3241
- };
3242
- Text.displayName = "Text";
3243
3201
  }
3244
3202
  });
3245
3203
 
@@ -3509,7 +3467,7 @@ var init_Box = __esm({
3509
3467
  fixed: "fixed",
3510
3468
  sticky: "sticky"
3511
3469
  };
3512
- Box = React97__default.forwardRef(
3470
+ Box = React95__default.forwardRef(
3513
3471
  ({
3514
3472
  padding,
3515
3473
  paddingX,
@@ -3559,7 +3517,7 @@ var init_Box = __esm({
3559
3517
  onMouseLeave?.(e);
3560
3518
  }, [hoverEvent, eventBus, onMouseLeave]);
3561
3519
  const isClickable = action || onClick;
3562
- return React97__default.createElement(
3520
+ return React95__default.createElement(
3563
3521
  Component,
3564
3522
  {
3565
3523
  ref,
@@ -4149,7 +4107,7 @@ var init_MiniStateMachine = __esm({
4149
4107
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
4150
4108
  const tc = transitionCounts[s.name] ?? 0;
4151
4109
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
4152
- return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
4110
+ return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
4153
4111
  /* @__PURE__ */ jsx(
4154
4112
  AvlState,
4155
4113
  {
@@ -5212,7 +5170,7 @@ var init_Icon = __esm({
5212
5170
  const directIcon = typeof icon === "string" ? void 0 : icon;
5213
5171
  const effectiveName = typeof icon === "string" ? icon : name;
5214
5172
  const family = useIconFamily();
5215
- const RenderedComponent = React97__default.useMemo(() => {
5173
+ const RenderedComponent = React95__default.useMemo(() => {
5216
5174
  if (directIcon) return null;
5217
5175
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
5218
5176
  }, [directIcon, effectiveName, family]);
@@ -5270,7 +5228,7 @@ function resolveIconProp(value, sizeClass) {
5270
5228
  const IconComp = value;
5271
5229
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
5272
5230
  }
5273
- if (React97__default.isValidElement(value)) {
5231
+ if (React95__default.isValidElement(value)) {
5274
5232
  return value;
5275
5233
  }
5276
5234
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -5279,7 +5237,7 @@ function resolveIconProp(value, sizeClass) {
5279
5237
  }
5280
5238
  return value;
5281
5239
  }
5282
- var variantStyles2, sizeStyles2, iconSizeStyles, Button;
5240
+ var variantStyles2, sizeStyles, iconSizeStyles, Button;
5283
5241
  var init_Button = __esm({
5284
5242
  "components/core/atoms/Button.tsx"() {
5285
5243
  "use client";
@@ -5336,7 +5294,7 @@ var init_Button = __esm({
5336
5294
  ].join(" ")
5337
5295
  };
5338
5296
  variantStyles2.destructive = variantStyles2.danger;
5339
- sizeStyles2 = {
5297
+ sizeStyles = {
5340
5298
  sm: "h-button-sm px-3 text-sm",
5341
5299
  md: "h-button-md px-4 text-sm",
5342
5300
  lg: "h-button-lg px-6 text-base"
@@ -5346,7 +5304,7 @@ var init_Button = __esm({
5346
5304
  md: "h-icon-default w-icon-default",
5347
5305
  lg: "h-icon-default w-icon-default"
5348
5306
  };
5349
- Button = React97__default.forwardRef(
5307
+ Button = React95__default.forwardRef(
5350
5308
  ({
5351
5309
  className,
5352
5310
  variant = "primary",
@@ -5389,7 +5347,7 @@ var init_Button = __esm({
5389
5347
  "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
5390
5348
  "disabled:opacity-50 disabled:cursor-not-allowed",
5391
5349
  variantStyles2[variant],
5392
- sizeStyles2[size],
5350
+ sizeStyles[size],
5393
5351
  className
5394
5352
  ),
5395
5353
  onClick: handleClick,
@@ -5411,7 +5369,7 @@ var Dialog;
5411
5369
  var init_Dialog = __esm({
5412
5370
  "components/core/atoms/Dialog.tsx"() {
5413
5371
  init_cn();
5414
- Dialog = React97__default.forwardRef(
5372
+ Dialog = React95__default.forwardRef(
5415
5373
  ({
5416
5374
  role = "dialog",
5417
5375
  "aria-modal": ariaModal = true,
@@ -5872,7 +5830,7 @@ var init_Drawer = __esm({
5872
5830
  Drawer.displayName = "Drawer";
5873
5831
  }
5874
5832
  });
5875
- var variantStyles3, sizeStyles3, Badge;
5833
+ var variantStyles3, sizeStyles2, Badge;
5876
5834
  var init_Badge = __esm({
5877
5835
  "components/core/atoms/Badge.tsx"() {
5878
5836
  init_cn();
@@ -5909,12 +5867,12 @@ var init_Badge = __esm({
5909
5867
  "border-[length:var(--border-width-thin)] border-border"
5910
5868
  ].join(" ")
5911
5869
  };
5912
- sizeStyles3 = {
5870
+ sizeStyles2 = {
5913
5871
  sm: "px-2 py-0.5 text-xs",
5914
5872
  md: "px-2.5 py-1 text-sm",
5915
5873
  lg: "px-3 py-1.5 text-base"
5916
5874
  };
5917
- Badge = React97__default.forwardRef(
5875
+ Badge = React95__default.forwardRef(
5918
5876
  ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
5919
5877
  const iconSizes3 = {
5920
5878
  sm: "h-icon-default w-icon-default",
@@ -5929,7 +5887,7 @@ var init_Badge = __esm({
5929
5887
  className: cn(
5930
5888
  "inline-flex items-center gap-1 font-bold rounded-sm",
5931
5889
  variantStyles3[variant],
5932
- sizeStyles3[size],
5890
+ sizeStyles2[size],
5933
5891
  onRemove && "pr-1",
5934
5892
  className
5935
5893
  ),
@@ -6230,7 +6188,7 @@ var init_SvgFlow = __esm({
6230
6188
  opacity = 1,
6231
6189
  className
6232
6190
  }) => {
6233
- const markerId = React97__default.useMemo(() => {
6191
+ const markerId = React95__default.useMemo(() => {
6234
6192
  flowIdCounter += 1;
6235
6193
  return `almadar-flow-arrow-${flowIdCounter}`;
6236
6194
  }, []);
@@ -6773,7 +6731,7 @@ var init_SvgRing = __esm({
6773
6731
  className,
6774
6732
  label
6775
6733
  }) => {
6776
- const gradientId = React97__default.useMemo(() => {
6734
+ const gradientId = React95__default.useMemo(() => {
6777
6735
  ringIdCounter += 1;
6778
6736
  return `almadar-ring-glow-${ringIdCounter}`;
6779
6737
  }, []);
@@ -6935,7 +6893,7 @@ var init_Input = __esm({
6935
6893
  "components/core/atoms/Input.tsx"() {
6936
6894
  init_cn();
6937
6895
  init_Icon();
6938
- Input = React97__default.forwardRef(
6896
+ Input = React95__default.forwardRef(
6939
6897
  ({
6940
6898
  className,
6941
6899
  inputType,
@@ -7056,7 +7014,7 @@ var Label;
7056
7014
  var init_Label = __esm({
7057
7015
  "components/core/atoms/Label.tsx"() {
7058
7016
  init_cn();
7059
- Label = React97__default.forwardRef(
7017
+ Label = React95__default.forwardRef(
7060
7018
  ({ className, required, children, ...props }, ref) => {
7061
7019
  return /* @__PURE__ */ jsxs(
7062
7020
  "label",
@@ -7082,7 +7040,7 @@ var Textarea;
7082
7040
  var init_Textarea = __esm({
7083
7041
  "components/core/atoms/Textarea.tsx"() {
7084
7042
  init_cn();
7085
- Textarea = React97__default.forwardRef(
7043
+ Textarea = React95__default.forwardRef(
7086
7044
  ({ className, error, ...props }, ref) => {
7087
7045
  return /* @__PURE__ */ jsx(
7088
7046
  "textarea",
@@ -7112,7 +7070,7 @@ var init_Select = __esm({
7112
7070
  "components/core/atoms/Select.tsx"() {
7113
7071
  init_cn();
7114
7072
  init_Icon();
7115
- Select = React97__default.forwardRef(
7073
+ Select = React95__default.forwardRef(
7116
7074
  ({ className, options, placeholder, error, ...props }, ref) => {
7117
7075
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
7118
7076
  /* @__PURE__ */ jsxs(
@@ -7154,7 +7112,7 @@ var Checkbox;
7154
7112
  var init_Checkbox = __esm({
7155
7113
  "components/core/atoms/Checkbox.tsx"() {
7156
7114
  init_cn();
7157
- Checkbox = React97__default.forwardRef(
7115
+ Checkbox = React95__default.forwardRef(
7158
7116
  ({ className, label, id, ...props }, ref) => {
7159
7117
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
7160
7118
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -7245,7 +7203,7 @@ var init_Card = __esm({
7245
7203
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
7246
7204
  "tile-image-first": "p-0 overflow-hidden"
7247
7205
  };
7248
- Card = React97__default.forwardRef(
7206
+ Card = React95__default.forwardRef(
7249
7207
  ({
7250
7208
  className,
7251
7209
  variant = "bordered",
@@ -7283,9 +7241,9 @@ var init_Card = __esm({
7283
7241
  }
7284
7242
  );
7285
7243
  Card.displayName = "Card";
7286
- CardHeader = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7244
+ CardHeader = React95__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7287
7245
  CardHeader.displayName = "CardHeader";
7288
- CardTitle = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7246
+ CardTitle = React95__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7289
7247
  "h3",
7290
7248
  {
7291
7249
  ref,
@@ -7298,11 +7256,11 @@ var init_Card = __esm({
7298
7256
  }
7299
7257
  ));
7300
7258
  CardTitle.displayName = "CardTitle";
7301
- CardContent = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7259
+ CardContent = React95__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7302
7260
  CardContent.displayName = "CardContent";
7303
7261
  CardBody = CardContent;
7304
7262
  CardBody.displayName = "CardBody";
7305
- CardFooter = React97__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7263
+ CardFooter = React95__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7306
7264
  "div",
7307
7265
  {
7308
7266
  ref,
@@ -7313,7 +7271,7 @@ var init_Card = __esm({
7313
7271
  CardFooter.displayName = "CardFooter";
7314
7272
  }
7315
7273
  });
7316
- var variantStyles5, sizeStyles4, iconSizes, FilterPill;
7274
+ var variantStyles5, sizeStyles3, iconSizes, FilterPill;
7317
7275
  var init_FilterPill = __esm({
7318
7276
  "components/core/atoms/FilterPill.tsx"() {
7319
7277
  init_cn();
@@ -7347,7 +7305,7 @@ var init_FilterPill = __esm({
7347
7305
  "border-[length:var(--border-width-thin)] border-border"
7348
7306
  ].join(" ")
7349
7307
  };
7350
- sizeStyles4 = {
7308
+ sizeStyles3 = {
7351
7309
  sm: "px-2 py-0.5 text-xs",
7352
7310
  md: "px-2.5 py-1 text-sm",
7353
7311
  lg: "px-3 py-1.5 text-base"
@@ -7357,7 +7315,7 @@ var init_FilterPill = __esm({
7357
7315
  md: "w-3.5 h-3.5",
7358
7316
  lg: "w-4 h-4"
7359
7317
  };
7360
- FilterPill = React97__default.forwardRef(
7318
+ FilterPill = React95__default.forwardRef(
7361
7319
  ({
7362
7320
  className,
7363
7321
  variant = "default",
@@ -7391,7 +7349,7 @@ var init_FilterPill = __esm({
7391
7349
  className: cn(
7392
7350
  "inline-flex items-center gap-1 font-bold rounded-pill",
7393
7351
  variantStyles5[variant],
7394
- sizeStyles4[size],
7352
+ sizeStyles3[size],
7395
7353
  (onClick || clickEvent) && "cursor-pointer",
7396
7354
  className
7397
7355
  ),
@@ -7423,18 +7381,18 @@ var init_FilterPill = __esm({
7423
7381
  FilterPill.displayName = "FilterPill";
7424
7382
  }
7425
7383
  });
7426
- var sizeStyles5, Spinner;
7384
+ var sizeStyles4, Spinner;
7427
7385
  var init_Spinner = __esm({
7428
7386
  "components/core/atoms/Spinner.tsx"() {
7429
7387
  init_cn();
7430
7388
  init_Icon();
7431
- sizeStyles5 = {
7389
+ sizeStyles4 = {
7432
7390
  xs: "h-3 w-3",
7433
7391
  sm: "h-icon-default w-icon-default",
7434
7392
  md: "h-6 w-6",
7435
7393
  lg: "h-8 w-8"
7436
7394
  };
7437
- Spinner = React97__default.forwardRef(
7395
+ Spinner = React95__default.forwardRef(
7438
7396
  ({ className, size = "md", ...props }, ref) => {
7439
7397
  return /* @__PURE__ */ jsx(
7440
7398
  "div",
@@ -7442,7 +7400,7 @@ var init_Spinner = __esm({
7442
7400
  ref,
7443
7401
  className: cn("text-foreground", className),
7444
7402
  ...props,
7445
- children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles5[size]) })
7403
+ children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles4[size]) })
7446
7404
  }
7447
7405
  );
7448
7406
  }
@@ -7513,8 +7471,8 @@ var init_Avatar = __esm({
7513
7471
  actionPayload
7514
7472
  }) => {
7515
7473
  const eventBus = useEventBus();
7516
- const [imgFailed, setImgFailed] = React97__default.useState(false);
7517
- React97__default.useEffect(() => {
7474
+ const [imgFailed, setImgFailed] = React95__default.useState(false);
7475
+ React95__default.useEffect(() => {
7518
7476
  setImgFailed(false);
7519
7477
  }, [src]);
7520
7478
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -7899,7 +7857,7 @@ var init_Radio = __esm({
7899
7857
  md: "w-2.5 h-2.5",
7900
7858
  lg: "w-3 h-3"
7901
7859
  };
7902
- Radio = React97__default.forwardRef(
7860
+ Radio = React95__default.forwardRef(
7903
7861
  ({
7904
7862
  label,
7905
7863
  helperText,
@@ -7916,12 +7874,12 @@ var init_Radio = __esm({
7916
7874
  onChange,
7917
7875
  ...props
7918
7876
  }, ref) => {
7919
- const reactId = React97__default.useId();
7877
+ const reactId = React95__default.useId();
7920
7878
  const baseId = id || `radio-${reactId}`;
7921
7879
  const hasError = !!error;
7922
7880
  const eventBus = useEventBus();
7923
- const [selected, setSelected] = React97__default.useState(value);
7924
- React97__default.useEffect(() => {
7881
+ const [selected, setSelected] = React95__default.useState(value);
7882
+ React95__default.useEffect(() => {
7925
7883
  if (value !== void 0) setSelected(value);
7926
7884
  }, [value]);
7927
7885
  const pick = (next, e) => {
@@ -8103,7 +8061,7 @@ var init_Switch = __esm({
8103
8061
  "components/core/atoms/Switch.tsx"() {
8104
8062
  "use client";
8105
8063
  init_cn();
8106
- Switch = React97.forwardRef(
8064
+ Switch = React95.forwardRef(
8107
8065
  ({
8108
8066
  checked,
8109
8067
  defaultChecked = false,
@@ -8114,10 +8072,10 @@ var init_Switch = __esm({
8114
8072
  name,
8115
8073
  className
8116
8074
  }, ref) => {
8117
- const [isChecked, setIsChecked] = React97.useState(
8075
+ const [isChecked, setIsChecked] = React95.useState(
8118
8076
  checked !== void 0 ? checked : defaultChecked
8119
8077
  );
8120
- React97.useEffect(() => {
8078
+ React95.useEffect(() => {
8121
8079
  if (checked !== void 0) {
8122
8080
  setIsChecked(checked);
8123
8081
  }
@@ -8562,7 +8520,7 @@ var Aside;
8562
8520
  var init_Aside = __esm({
8563
8521
  "components/core/atoms/Aside.tsx"() {
8564
8522
  init_cn();
8565
- Aside = React97__default.forwardRef(
8523
+ Aside = React95__default.forwardRef(
8566
8524
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
8567
8525
  );
8568
8526
  Aside.displayName = "Aside";
@@ -8640,8 +8598,8 @@ var init_LawReferenceTooltip = __esm({
8640
8598
  className
8641
8599
  }) => {
8642
8600
  const { t } = useTranslate();
8643
- const [isVisible, setIsVisible] = React97__default.useState(false);
8644
- const timeoutRef = React97__default.useRef(null);
8601
+ const [isVisible, setIsVisible] = React95__default.useState(false);
8602
+ const timeoutRef = React95__default.useRef(null);
8645
8603
  const handleMouseEnter = () => {
8646
8604
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8647
8605
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -8650,7 +8608,7 @@ var init_LawReferenceTooltip = __esm({
8650
8608
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8651
8609
  setIsVisible(false);
8652
8610
  };
8653
- React97__default.useEffect(() => {
8611
+ React95__default.useEffect(() => {
8654
8612
  return () => {
8655
8613
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8656
8614
  };
@@ -8835,7 +8793,7 @@ var init_TimeSlotCell = __esm({
8835
8793
  TimeSlotCell.displayName = "TimeSlotCell";
8836
8794
  }
8837
8795
  });
8838
- var statusColors, pulseRingColors, sizeStyles6, StatusDot;
8796
+ var statusColors, pulseRingColors, sizeStyles5, StatusDot;
8839
8797
  var init_StatusDot = __esm({
8840
8798
  "components/core/atoms/StatusDot.tsx"() {
8841
8799
  init_cn();
@@ -8855,12 +8813,12 @@ var init_StatusDot = __esm({
8855
8813
  warning: "ring-warning",
8856
8814
  critical: "ring-error"
8857
8815
  };
8858
- sizeStyles6 = {
8816
+ sizeStyles5 = {
8859
8817
  sm: "w-2 h-2",
8860
8818
  md: "w-2.5 h-2.5",
8861
8819
  lg: "w-3 h-3"
8862
8820
  };
8863
- StatusDot = React97__default.forwardRef(
8821
+ StatusDot = React95__default.forwardRef(
8864
8822
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
8865
8823
  return /* @__PURE__ */ jsx(
8866
8824
  "span",
@@ -8869,7 +8827,7 @@ var init_StatusDot = __esm({
8869
8827
  className: cn(
8870
8828
  "inline-block rounded-full flex-shrink-0",
8871
8829
  statusColors[status],
8872
- sizeStyles6[size],
8830
+ sizeStyles5[size],
8873
8831
  pulse && [
8874
8832
  "animate-pulse",
8875
8833
  "ring-2 ring-offset-1",
@@ -8899,12 +8857,12 @@ function resolveColor(dir, invert) {
8899
8857
  const isGood = invert ? !isPositive : isPositive;
8900
8858
  return isGood ? "text-success" : "text-error";
8901
8859
  }
8902
- var sizeStyles7, iconNameMap, TrendIndicator;
8860
+ var sizeStyles6, iconNameMap, TrendIndicator;
8903
8861
  var init_TrendIndicator = __esm({
8904
8862
  "components/core/atoms/TrendIndicator.tsx"() {
8905
8863
  init_Icon();
8906
8864
  init_cn();
8907
- sizeStyles7 = {
8865
+ sizeStyles6 = {
8908
8866
  sm: { icon: "w-3 h-3", text: "text-xs" },
8909
8867
  md: { icon: "w-4 h-4", text: "text-sm" },
8910
8868
  lg: { icon: "w-5 h-5", text: "text-base" }
@@ -8914,7 +8872,7 @@ var init_TrendIndicator = __esm({
8914
8872
  down: "trending-down",
8915
8873
  flat: "arrow-right"
8916
8874
  };
8917
- TrendIndicator = React97__default.forwardRef(
8875
+ TrendIndicator = React95__default.forwardRef(
8918
8876
  ({
8919
8877
  className,
8920
8878
  value,
@@ -8928,7 +8886,7 @@ var init_TrendIndicator = __esm({
8928
8886
  const dir = resolveDirection(value, direction);
8929
8887
  const colorClass = resolveColor(dir, invert);
8930
8888
  const iconName = iconNameMap[dir];
8931
- const styles = sizeStyles7[size];
8889
+ const styles = sizeStyles6[size];
8932
8890
  const formattedValue = value !== void 0 ? `${value > 0 ? "+" : ""}${value}%` : void 0;
8933
8891
  const ariaLabel = label ?? (formattedValue ? `${dir} ${formattedValue}` : dir);
8934
8892
  return /* @__PURE__ */ jsxs(
@@ -8981,7 +8939,7 @@ var init_RangeSlider = __esm({
8981
8939
  md: "w-4 h-4",
8982
8940
  lg: "w-5 h-5"
8983
8941
  };
8984
- RangeSlider = React97__default.forwardRef(
8942
+ RangeSlider = React95__default.forwardRef(
8985
8943
  ({
8986
8944
  className,
8987
8945
  min = 0,
@@ -9489,7 +9447,7 @@ var init_ContentSection = __esm({
9489
9447
  md: "py-16",
9490
9448
  lg: "py-24"
9491
9449
  };
9492
- ContentSection = React97__default.forwardRef(
9450
+ ContentSection = React95__default.forwardRef(
9493
9451
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
9494
9452
  return /* @__PURE__ */ jsx(
9495
9453
  Box,
@@ -10023,7 +9981,7 @@ var init_AnimatedReveal = __esm({
10023
9981
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
10024
9982
  "none": {}
10025
9983
  };
10026
- AnimatedReveal = React97__default.forwardRef(
9984
+ AnimatedReveal = React95__default.forwardRef(
10027
9985
  ({
10028
9986
  trigger = "scroll",
10029
9987
  animation = "fade-up",
@@ -10183,7 +10141,7 @@ var init_AnimatedGraphic = __esm({
10183
10141
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
10184
10142
  "use client";
10185
10143
  init_cn();
10186
- AnimatedGraphic = React97__default.forwardRef(
10144
+ AnimatedGraphic = React95__default.forwardRef(
10187
10145
  ({
10188
10146
  src,
10189
10147
  svgContent,
@@ -10206,7 +10164,7 @@ var init_AnimatedGraphic = __esm({
10206
10164
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
10207
10165
  const resolvedSvg = svgContent ?? fetchedSvg;
10208
10166
  const prevAnimateRef = useRef(animate);
10209
- const setRef = React97__default.useCallback(
10167
+ const setRef = React95__default.useCallback(
10210
10168
  (node) => {
10211
10169
  containerRef.current = node;
10212
10170
  if (typeof ref === "function") ref(node);
@@ -10431,9 +10389,9 @@ function ScoreDisplay({
10431
10389
  ...rest
10432
10390
  }) {
10433
10391
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
10434
- const [displayValue, setDisplayValue] = React97.useState(resolvedValue);
10435
- const [isAnimating, setIsAnimating] = React97.useState(false);
10436
- React97.useEffect(() => {
10392
+ const [displayValue, setDisplayValue] = React95.useState(resolvedValue);
10393
+ const [isAnimating, setIsAnimating] = React95.useState(false);
10394
+ React95.useEffect(() => {
10437
10395
  if (!animated || displayValue === resolvedValue) {
10438
10396
  setDisplayValue(resolvedValue);
10439
10397
  return;
@@ -10503,9 +10461,9 @@ function ControlButton({
10503
10461
  className
10504
10462
  }) {
10505
10463
  const eventBus = useEventBus();
10506
- const [isPressed, setIsPressed] = React97.useState(false);
10464
+ const [isPressed, setIsPressed] = React95.useState(false);
10507
10465
  const actualPressed = pressed ?? isPressed;
10508
- const handlePointerDown = React97.useCallback(
10466
+ const handlePointerDown = React95.useCallback(
10509
10467
  (e) => {
10510
10468
  e.preventDefault();
10511
10469
  if (disabled) return;
@@ -10515,7 +10473,7 @@ function ControlButton({
10515
10473
  },
10516
10474
  [disabled, pressEvent, eventBus, onPress]
10517
10475
  );
10518
- const handlePointerUp = React97.useCallback(
10476
+ const handlePointerUp = React95.useCallback(
10519
10477
  (e) => {
10520
10478
  e.preventDefault();
10521
10479
  if (disabled) return;
@@ -10525,7 +10483,7 @@ function ControlButton({
10525
10483
  },
10526
10484
  [disabled, releaseEvent, eventBus, onRelease]
10527
10485
  );
10528
- const handlePointerLeave = React97.useCallback(
10486
+ const handlePointerLeave = React95.useCallback(
10529
10487
  (e) => {
10530
10488
  if (isPressed) {
10531
10489
  setIsPressed(false);
@@ -10593,7 +10551,7 @@ var init_ControlButton = __esm({
10593
10551
  }
10594
10552
  });
10595
10553
  function Sprite({
10596
- spritesheet,
10554
+ spritesheet = "https://almadar-kflow-assets.web.app/shared/isometric-blocks/Spritesheet/allTiles_sheet.png",
10597
10555
  frameWidth,
10598
10556
  frameHeight,
10599
10557
  frame,
@@ -11014,8 +10972,8 @@ function XPBar({
11014
10972
  }) {
11015
10973
  const sizes = sizeMap9[size];
11016
10974
  const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
11017
- const [fillWidth, setFillWidth] = React97.useState(animated ? 0 : percentage);
11018
- React97.useEffect(() => {
10975
+ const [fillWidth, setFillWidth] = React95.useState(animated ? 0 : percentage);
10976
+ React95.useEffect(() => {
11019
10977
  if (!animated) {
11020
10978
  setFillWidth(percentage);
11021
10979
  return;
@@ -11273,7 +11231,7 @@ var init_DamageNumber = __esm({
11273
11231
  function DialogueBubble({
11274
11232
  speaker,
11275
11233
  text,
11276
- portrait,
11234
+ portrait = "https://almadar-kflow-assets.web.app/shared/characters/archetypes/00_base_model.png",
11277
11235
  position = "bottom",
11278
11236
  className
11279
11237
  }) {
@@ -11441,9 +11399,9 @@ function MiniMap({
11441
11399
  viewportRect,
11442
11400
  className
11443
11401
  }) {
11444
- const canvasRef = React97.useRef(null);
11445
- const frameRef = React97.useRef(0);
11446
- React97.useEffect(() => {
11402
+ const canvasRef = React95.useRef(null);
11403
+ const frameRef = React95.useRef(0);
11404
+ React95.useEffect(() => {
11447
11405
  const canvas = canvasRef.current;
11448
11406
  if (!canvas) return;
11449
11407
  const ctx = canvas.getContext("2d");
@@ -11617,7 +11575,7 @@ var init_ErrorBoundary = __esm({
11617
11575
  }
11618
11576
  );
11619
11577
  };
11620
- ErrorBoundary = class extends React97__default.Component {
11578
+ ErrorBoundary = class extends React95__default.Component {
11621
11579
  constructor(props) {
11622
11580
  super(props);
11623
11581
  __publicField(this, "reset", () => {
@@ -11892,11 +11850,11 @@ var init_wrapCallbackForEvent = __esm({
11892
11850
  "runtime/wrapCallbackForEvent.ts"() {
11893
11851
  }
11894
11852
  });
11895
- var sizeStyles8, paddingStyles3, Container;
11853
+ var sizeStyles7, paddingStyles3, Container;
11896
11854
  var init_Container = __esm({
11897
11855
  "components/core/molecules/Container.tsx"() {
11898
11856
  init_cn();
11899
- sizeStyles8 = {
11857
+ sizeStyles7 = {
11900
11858
  xs: "max-w-xs",
11901
11859
  // 320px
11902
11860
  sm: "max-w-screen-sm",
@@ -11934,7 +11892,7 @@ var init_Container = __esm({
11934
11892
  {
11935
11893
  className: cn(
11936
11894
  "w-full",
11937
- sizeStyles8[resolvedSize],
11895
+ sizeStyles7[resolvedSize],
11938
11896
  paddingStyles3[padding],
11939
11897
  center && "mx-auto",
11940
11898
  className
@@ -12707,8 +12665,8 @@ var init_Tooltip = __esm({
12707
12665
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
12708
12666
  };
12709
12667
  }, []);
12710
- const triggerElement = React97__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12711
- const trigger = React97__default.cloneElement(triggerElement, {
12668
+ const triggerElement = React95__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12669
+ const trigger = React95__default.cloneElement(triggerElement, {
12712
12670
  ref: triggerRef,
12713
12671
  onMouseEnter: handleMouseEnter,
12714
12672
  onMouseLeave: handleMouseLeave,
@@ -12855,8 +12813,8 @@ var init_Popover = __esm({
12855
12813
  onMouseEnter: handleOpen,
12856
12814
  onMouseLeave: handleClose
12857
12815
  };
12858
- const childElement = React97__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12859
- const triggerElement = React97__default.cloneElement(
12816
+ const childElement = React95__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
12817
+ const triggerElement = React95__default.cloneElement(
12860
12818
  childElement,
12861
12819
  {
12862
12820
  ref: triggerRef,
@@ -12982,8 +12940,8 @@ var init_Menu = __esm({
12982
12940
  };
12983
12941
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
12984
12942
  const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
12985
- const triggerChild = React97__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
12986
- const triggerElement = React97__default.cloneElement(
12943
+ const triggerChild = React95__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
12944
+ const triggerElement = React95__default.cloneElement(
12987
12945
  triggerChild,
12988
12946
  {
12989
12947
  ref: triggerRef,
@@ -13390,12 +13348,12 @@ var init_MapView = __esm({
13390
13348
  shadowSize: [41, 41]
13391
13349
  });
13392
13350
  L.Marker.prototype.options.icon = defaultIcon;
13393
- const { useEffect: useEffect76, useRef: useRef69, useCallback: useCallback122, useState: useState113 } = React97__default;
13351
+ const { useEffect: useEffect76, useRef: useRef68, useCallback: useCallback120, useState: useState112 } = React95__default;
13394
13352
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
13395
13353
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
13396
13354
  function MapUpdater({ centerLat, centerLng, zoom }) {
13397
13355
  const map = useMap();
13398
- const prevRef = useRef69({ centerLat, centerLng, zoom });
13356
+ const prevRef = useRef68({ centerLat, centerLng, zoom });
13399
13357
  useEffect76(() => {
13400
13358
  const prev = prevRef.current;
13401
13359
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
@@ -13435,8 +13393,8 @@ var init_MapView = __esm({
13435
13393
  showAttribution = true
13436
13394
  }) {
13437
13395
  const eventBus = useEventBus3();
13438
- const [clickedPosition, setClickedPosition] = useState113(null);
13439
- const handleMapClick = useCallback122((lat, lng) => {
13396
+ const [clickedPosition, setClickedPosition] = useState112(null);
13397
+ const handleMapClick = useCallback120((lat, lng) => {
13440
13398
  if (showClickedPin) {
13441
13399
  setClickedPosition({ lat, lng });
13442
13400
  }
@@ -13445,7 +13403,7 @@ var init_MapView = __esm({
13445
13403
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
13446
13404
  }
13447
13405
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
13448
- const handleMarkerClick = useCallback122((marker) => {
13406
+ const handleMarkerClick = useCallback120((marker) => {
13449
13407
  onMarkerClick?.(marker);
13450
13408
  if (markerClickEvent) {
13451
13409
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -13636,7 +13594,7 @@ function InputPattern({
13636
13594
  fieldName
13637
13595
  }) {
13638
13596
  const { emit } = useEventBus();
13639
- const [localValue, setLocalValue] = React97__default.useState(value);
13597
+ const [localValue, setLocalValue] = React95__default.useState(value);
13640
13598
  const handleChange = (e) => {
13641
13599
  setLocalValue(e.target.value);
13642
13600
  if (onChange) {
@@ -13674,7 +13632,7 @@ function TextareaPattern({
13674
13632
  fieldName
13675
13633
  }) {
13676
13634
  const { emit } = useEventBus();
13677
- const [localValue, setLocalValue] = React97__default.useState(value);
13635
+ const [localValue, setLocalValue] = React95__default.useState(value);
13678
13636
  const handleChange = (e) => {
13679
13637
  setLocalValue(e.target.value);
13680
13638
  if (onChange) {
@@ -13706,7 +13664,7 @@ function SelectPattern({
13706
13664
  fieldName
13707
13665
  }) {
13708
13666
  const { emit } = useEventBus();
13709
- const [localValue, setLocalValue] = React97__default.useState(value);
13667
+ const [localValue, setLocalValue] = React95__default.useState(value);
13710
13668
  const handleChange = (e) => {
13711
13669
  setLocalValue(e.target.value);
13712
13670
  if (onChange) {
@@ -13735,7 +13693,7 @@ function CheckboxPattern({
13735
13693
  className
13736
13694
  }) {
13737
13695
  const { emit } = useEventBus();
13738
- const [localChecked, setLocalChecked] = React97__default.useState(checked);
13696
+ const [localChecked, setLocalChecked] = React95__default.useState(checked);
13739
13697
  const handleChange = (e) => {
13740
13698
  setLocalChecked(e.target.checked);
13741
13699
  if (onChange) {
@@ -13923,6 +13881,7 @@ var init_ComponentPatterns = __esm({
13923
13881
  init_ProgressBar();
13924
13882
  init_Card();
13925
13883
  init_Typography();
13884
+ init_cn();
13926
13885
  init_Alert();
13927
13886
  init_Tooltip();
13928
13887
  init_Popover();
@@ -13966,8 +13925,8 @@ function ActionButtons({
13966
13925
  disabled
13967
13926
  }) {
13968
13927
  const eventBus = useEventBus();
13969
- const [activeButtons, setActiveButtons] = React97.useState(/* @__PURE__ */ new Set());
13970
- const handlePress = React97.useCallback(
13928
+ const [activeButtons, setActiveButtons] = React95.useState(/* @__PURE__ */ new Set());
13929
+ const handlePress = React95.useCallback(
13971
13930
  (id) => {
13972
13931
  setActiveButtons((prev) => new Set(prev).add(id));
13973
13932
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -13975,7 +13934,7 @@ function ActionButtons({
13975
13934
  },
13976
13935
  [actionEvent, eventBus, onAction]
13977
13936
  );
13978
- const handleRelease = React97.useCallback(
13937
+ const handleRelease = React95.useCallback(
13979
13938
  (id) => {
13980
13939
  setActiveButtons((prev) => {
13981
13940
  const next = new Set(prev);
@@ -14256,259 +14215,6 @@ var init_AnimatedCounter = __esm({
14256
14215
  AnimatedCounter.displayName = "AnimatedCounter";
14257
14216
  }
14258
14217
  });
14259
- var ALL_CATEGORY, GridPicker;
14260
- var init_GridPicker = __esm({
14261
- "components/core/molecules/GridPicker.tsx"() {
14262
- "use client";
14263
- init_cn();
14264
- init_Input();
14265
- init_Badge();
14266
- init_Stack();
14267
- ALL_CATEGORY = "__all__";
14268
- GridPicker = ({
14269
- items,
14270
- value,
14271
- onChange,
14272
- categories,
14273
- searchPlaceholder,
14274
- renderThumbnail,
14275
- cellSize = 32,
14276
- className
14277
- }) => {
14278
- const [search, setSearch] = useState("");
14279
- const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
14280
- const gridRef = useRef(null);
14281
- const categoryChips = useMemo(() => {
14282
- if (categories !== void 0) return categories;
14283
- const seen = [];
14284
- for (const item of items) {
14285
- if (!seen.includes(item.category)) seen.push(item.category);
14286
- }
14287
- return seen;
14288
- }, [categories, items]);
14289
- const filtered = useMemo(() => {
14290
- const needle = search.trim().toLowerCase();
14291
- return items.filter((item) => {
14292
- const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
14293
- const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
14294
- return matchesCategory && matchesSearch;
14295
- });
14296
- }, [items, search, activeCategory]);
14297
- const select = useCallback(
14298
- (item) => {
14299
- onChange(item.id);
14300
- },
14301
- [onChange]
14302
- );
14303
- const handleKeyDown = useCallback(
14304
- (e, index) => {
14305
- const cells = gridRef.current?.querySelectorAll(
14306
- "[data-gridpicker-cell]"
14307
- );
14308
- if (cells === void 0 || cells.length === 0) return;
14309
- const columns = (() => {
14310
- const grid = gridRef.current;
14311
- if (grid === null) return 1;
14312
- const style = window.getComputedStyle(grid);
14313
- const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
14314
- return cols > 0 ? cols : 1;
14315
- })();
14316
- let next = -1;
14317
- if (e.key === "ArrowRight") next = index + 1;
14318
- else if (e.key === "ArrowLeft") next = index - 1;
14319
- else if (e.key === "ArrowDown") next = index + columns;
14320
- else if (e.key === "ArrowUp") next = index - columns;
14321
- else if (e.key === "Enter" || e.key === " ") {
14322
- e.preventDefault();
14323
- select(filtered[index]);
14324
- return;
14325
- } else {
14326
- return;
14327
- }
14328
- e.preventDefault();
14329
- if (next >= 0 && next < cells.length) {
14330
- cells[next].focus();
14331
- }
14332
- },
14333
- [filtered, select]
14334
- );
14335
- return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
14336
- /* @__PURE__ */ jsx(
14337
- Input,
14338
- {
14339
- type: "search",
14340
- icon: "search",
14341
- value: search,
14342
- placeholder: searchPlaceholder,
14343
- clearable: true,
14344
- onClear: () => setSearch(""),
14345
- onChange: (e) => setSearch(e.target.value)
14346
- }
14347
- ),
14348
- categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
14349
- /* @__PURE__ */ jsx(
14350
- Badge,
14351
- {
14352
- variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
14353
- size: "sm",
14354
- role: "button",
14355
- tabIndex: 0,
14356
- "aria-pressed": activeCategory === ALL_CATEGORY,
14357
- className: "cursor-pointer",
14358
- onClick: () => setActiveCategory(ALL_CATEGORY),
14359
- onKeyDown: (e) => {
14360
- if (e.key === "Enter" || e.key === " ") {
14361
- e.preventDefault();
14362
- setActiveCategory(ALL_CATEGORY);
14363
- }
14364
- },
14365
- children: "All"
14366
- }
14367
- ),
14368
- categoryChips.map((category) => /* @__PURE__ */ jsx(
14369
- Badge,
14370
- {
14371
- variant: activeCategory === category ? "primary" : "neutral",
14372
- size: "sm",
14373
- role: "button",
14374
- tabIndex: 0,
14375
- "aria-pressed": activeCategory === category,
14376
- className: "cursor-pointer",
14377
- onClick: () => setActiveCategory(category),
14378
- onKeyDown: (e) => {
14379
- if (e.key === "Enter" || e.key === " ") {
14380
- e.preventDefault();
14381
- setActiveCategory(category);
14382
- }
14383
- },
14384
- children: category
14385
- },
14386
- category
14387
- ))
14388
- ] }),
14389
- /* @__PURE__ */ jsx(
14390
- "div",
14391
- {
14392
- ref: gridRef,
14393
- role: "listbox",
14394
- className: "grid gap-1 overflow-y-auto max-h-64 p-1",
14395
- style: {
14396
- gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
14397
- },
14398
- children: filtered.map((item, index) => {
14399
- const selected = item.id === value;
14400
- return /* @__PURE__ */ jsx(
14401
- "button",
14402
- {
14403
- type: "button",
14404
- role: "option",
14405
- "aria-selected": selected,
14406
- "aria-label": item.label,
14407
- title: item.label,
14408
- "data-gridpicker-cell": true,
14409
- tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
14410
- onClick: () => select(item),
14411
- onKeyDown: (e) => handleKeyDown(e, index),
14412
- className: cn(
14413
- "flex items-center justify-center rounded-sm",
14414
- "transition-colors hover:bg-muted",
14415
- "focus:outline-none focus:ring-1 focus:ring-ring",
14416
- selected && "bg-primary/10 ring-1 ring-primary"
14417
- ),
14418
- style: { width: cellSize, height: cellSize },
14419
- children: renderThumbnail(item)
14420
- },
14421
- item.id
14422
- );
14423
- })
14424
- }
14425
- )
14426
- ] });
14427
- };
14428
- GridPicker.displayName = "GridPicker";
14429
- }
14430
- });
14431
- function iconForKind(kind) {
14432
- if (kind === "audio") return "music";
14433
- if (kind === "model") return "box";
14434
- return "file";
14435
- }
14436
- var THUMB_PX, IMAGE_KINDS, AssetPicker;
14437
- var init_AssetPicker = __esm({
14438
- "components/core/molecules/AssetPicker.tsx"() {
14439
- "use client";
14440
- init_GridPicker();
14441
- init_Icon();
14442
- THUMB_PX = 32;
14443
- IMAGE_KINDS = /* @__PURE__ */ new Set([
14444
- "image",
14445
- "spritesheet",
14446
- "scene",
14447
- "portrait"
14448
- ]);
14449
- AssetPicker = ({
14450
- assets,
14451
- value,
14452
- onChange,
14453
- className
14454
- }) => {
14455
- const byUrl = useMemo(() => {
14456
- const map = /* @__PURE__ */ new Map();
14457
- for (const entry of assets) map.set(entry.url, entry);
14458
- return map;
14459
- }, [assets]);
14460
- const items = useMemo(
14461
- () => assets.map((entry) => ({
14462
- id: entry.url,
14463
- label: entry.name,
14464
- category: entry.category
14465
- })),
14466
- [assets]
14467
- );
14468
- const categories = useMemo(() => {
14469
- const seen = [];
14470
- for (const entry of assets) {
14471
- if (!seen.includes(entry.category)) seen.push(entry.category);
14472
- }
14473
- return seen;
14474
- }, [assets]);
14475
- const renderThumbnail = useCallback(
14476
- (item) => {
14477
- const entry = byUrl.get(item.id);
14478
- if (entry === void 0) return null;
14479
- if (IMAGE_KINDS.has(entry.kind)) {
14480
- return /* @__PURE__ */ jsx(
14481
- "img",
14482
- {
14483
- src: entry.thumbnailUrl ?? entry.url,
14484
- alt: entry.name,
14485
- loading: "lazy",
14486
- width: THUMB_PX,
14487
- height: THUMB_PX,
14488
- style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
14489
- }
14490
- );
14491
- }
14492
- return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
14493
- },
14494
- [byUrl]
14495
- );
14496
- return /* @__PURE__ */ jsx(
14497
- GridPicker,
14498
- {
14499
- items,
14500
- value,
14501
- onChange,
14502
- categories,
14503
- renderThumbnail,
14504
- cellSize: THUMB_PX,
14505
- className
14506
- }
14507
- );
14508
- };
14509
- AssetPicker.displayName = "AssetPicker";
14510
- }
14511
- });
14512
14218
  var AuthLayout;
14513
14219
  var init_AuthLayout = __esm({
14514
14220
  "components/marketing/templates/AuthLayout.tsx"() {
@@ -16540,7 +16246,7 @@ var init_CodeBlock = __esm({
16540
16246
  CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
16541
16247
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
16542
16248
  HIDDEN_LINE_NUMBERS = { display: "none" };
16543
- CodeBlock = React97__default.memo(
16249
+ CodeBlock = React95__default.memo(
16544
16250
  ({
16545
16251
  code: rawCode,
16546
16252
  language = "text",
@@ -16977,7 +16683,7 @@ var init_MarkdownContent = __esm({
16977
16683
  init_Box();
16978
16684
  init_CodeBlock();
16979
16685
  init_cn();
16980
- MarkdownContent = React97__default.memo(
16686
+ MarkdownContent = React95__default.memo(
16981
16687
  ({ content, direction, className }) => {
16982
16688
  const { t: _t } = useTranslate();
16983
16689
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -18073,7 +17779,7 @@ var init_StateMachineView = __esm({
18073
17779
  style: { top: title ? 30 : 0 },
18074
17780
  children: [
18075
17781
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
18076
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React97__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
17782
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React95__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
18077
17783
  StateNode,
18078
17784
  {
18079
17785
  state,
@@ -19678,7 +19384,7 @@ var init_Grid = __esm({
19678
19384
  as: Component = "div"
19679
19385
  }) => {
19680
19386
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
19681
- return React97__default.createElement(
19387
+ return React95__default.createElement(
19682
19388
  Component,
19683
19389
  {
19684
19390
  className: cn(
@@ -24828,7 +24534,7 @@ function CounterMinimal({
24828
24534
  Button,
24829
24535
  {
24830
24536
  variant: "secondary",
24831
- size: sizeStyles9[size].button,
24537
+ size: sizeStyles8[size].button,
24832
24538
  onClick: onDecrement,
24833
24539
  disabled: resolved.decrementDisabled,
24834
24540
  icon: "minus",
@@ -24840,7 +24546,7 @@ function CounterMinimal({
24840
24546
  {
24841
24547
  variant: "h1",
24842
24548
  className: cn(
24843
- sizeStyles9[size].display,
24549
+ sizeStyles8[size].display,
24844
24550
  "font-bold tabular-nums min-w-[3ch] text-center"
24845
24551
  ),
24846
24552
  children: resolved.count
@@ -24850,7 +24556,7 @@ function CounterMinimal({
24850
24556
  Button,
24851
24557
  {
24852
24558
  variant: "secondary",
24853
- size: sizeStyles9[size].button,
24559
+ size: sizeStyles8[size].button,
24854
24560
  onClick: onIncrement,
24855
24561
  disabled: resolved.incrementDisabled,
24856
24562
  icon: "plus",
@@ -24885,7 +24591,7 @@ function CounterStandard({
24885
24591
  {
24886
24592
  variant: "h1",
24887
24593
  className: cn(
24888
- sizeStyles9[size].display,
24594
+ sizeStyles8[size].display,
24889
24595
  "font-bold tabular-nums text-primary-600"
24890
24596
  ),
24891
24597
  children: resolved.count
@@ -24896,7 +24602,7 @@ function CounterStandard({
24896
24602
  Button,
24897
24603
  {
24898
24604
  variant: "secondary",
24899
- size: sizeStyles9[size].button,
24605
+ size: sizeStyles8[size].button,
24900
24606
  onClick: onDecrement,
24901
24607
  disabled: resolved.decrementDisabled,
24902
24608
  icon: "minus"
@@ -24906,7 +24612,7 @@ function CounterStandard({
24906
24612
  Button,
24907
24613
  {
24908
24614
  variant: "primary",
24909
- size: sizeStyles9[size].button,
24615
+ size: sizeStyles8[size].button,
24910
24616
  onClick: onIncrement,
24911
24617
  disabled: resolved.incrementDisabled,
24912
24618
  icon: "plus"
@@ -24952,7 +24658,7 @@ function CounterFull({
24952
24658
  {
24953
24659
  variant: "h1",
24954
24660
  className: cn(
24955
- sizeStyles9[size].display,
24661
+ sizeStyles8[size].display,
24956
24662
  "font-bold tabular-nums text-primary-600"
24957
24663
  ),
24958
24664
  children: resolved.count
@@ -24965,7 +24671,7 @@ function CounterFull({
24965
24671
  Button,
24966
24672
  {
24967
24673
  variant: "secondary",
24968
- size: sizeStyles9[size].button,
24674
+ size: sizeStyles8[size].button,
24969
24675
  onClick: onDecrement,
24970
24676
  disabled: resolved.decrementDisabled,
24971
24677
  icon: "minus",
@@ -24976,7 +24682,7 @@ function CounterFull({
24976
24682
  Button,
24977
24683
  {
24978
24684
  variant: "primary",
24979
- size: sizeStyles9[size].button,
24685
+ size: sizeStyles8[size].button,
24980
24686
  onClick: onIncrement,
24981
24687
  disabled: resolved.incrementDisabled,
24982
24688
  icon: "plus",
@@ -24996,7 +24702,7 @@ function CounterFull({
24996
24702
  )
24997
24703
  ] }) });
24998
24704
  }
24999
- var sizeStyles9, CounterTemplate;
24705
+ var sizeStyles8, CounterTemplate;
25000
24706
  var init_CounterTemplate = __esm({
25001
24707
  "components/core/templates/CounterTemplate.tsx"() {
25002
24708
  init_cn();
@@ -25004,7 +24710,7 @@ var init_CounterTemplate = __esm({
25004
24710
  init_Stack();
25005
24711
  init_Typography();
25006
24712
  init_Button();
25007
- sizeStyles9 = {
24713
+ sizeStyles8 = {
25008
24714
  sm: { display: "text-4xl", button: "sm" },
25009
24715
  md: { display: "text-6xl", button: "md" },
25010
24716
  lg: { display: "text-8xl", button: "lg" }
@@ -25038,7 +24744,7 @@ function CraftingRecipe({
25038
24744
  className
25039
24745
  }) {
25040
24746
  const eventBus = useEventBus();
25041
- const handleCraft = React97.useCallback(() => {
24747
+ const handleCraft = React95.useCallback(() => {
25042
24748
  onCraft?.();
25043
24749
  if (craftEvent) {
25044
24750
  eventBus.emit(craftEvent, { output: output.label });
@@ -25055,7 +24761,7 @@ function CraftingRecipe({
25055
24761
  children: [
25056
24762
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
25057
24763
  const hasSufficient = ingredient.available >= ingredient.required;
25058
- return /* @__PURE__ */ jsxs(React97.Fragment, { children: [
24764
+ return /* @__PURE__ */ jsxs(React95.Fragment, { children: [
25059
24765
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
25060
24766
  ItemSlot,
25061
24767
  {
@@ -25118,8 +24824,8 @@ function DPad({
25118
24824
  }) {
25119
24825
  const eventBus = useEventBus();
25120
24826
  const sizes = sizeMap15[size];
25121
- const [activeDirections, setActiveDirections] = React97.useState(/* @__PURE__ */ new Set());
25122
- const handlePress = React97.useCallback(
24827
+ const [activeDirections, setActiveDirections] = React95.useState(/* @__PURE__ */ new Set());
24828
+ const handlePress = React95.useCallback(
25123
24829
  (direction) => {
25124
24830
  setActiveDirections((prev) => new Set(prev).add(direction));
25125
24831
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -25127,7 +24833,7 @@ function DPad({
25127
24833
  },
25128
24834
  [directionEvent, eventBus, onDirection]
25129
24835
  );
25130
- const handleRelease = React97.useCallback(
24836
+ const handleRelease = React95.useCallback(
25131
24837
  (direction) => {
25132
24838
  setActiveDirections((prev) => {
25133
24839
  const next = new Set(prev);
@@ -25813,14 +25519,14 @@ function useDataDnd(args) {
25813
25519
  const isZone = Boolean(dragGroup || accepts || sortable);
25814
25520
  const enabled = isZone || Boolean(dndRoot);
25815
25521
  const eventBus = useEventBus();
25816
- const parentRoot = React97__default.useContext(RootCtx);
25522
+ const parentRoot = React95__default.useContext(RootCtx);
25817
25523
  const isRoot = enabled && parentRoot === null;
25818
- const zoneId = React97__default.useId();
25524
+ const zoneId = React95__default.useId();
25819
25525
  const ownGroup = dragGroup ?? accepts ?? zoneId;
25820
- const [optimisticOrders, setOptimisticOrders] = React97__default.useState(() => /* @__PURE__ */ new Map());
25821
- const optimisticOrdersRef = React97__default.useRef(optimisticOrders);
25526
+ const [optimisticOrders, setOptimisticOrders] = React95__default.useState(() => /* @__PURE__ */ new Map());
25527
+ const optimisticOrdersRef = React95__default.useRef(optimisticOrders);
25822
25528
  optimisticOrdersRef.current = optimisticOrders;
25823
- const clearOptimisticOrder = React97__default.useCallback((group) => {
25529
+ const clearOptimisticOrder = React95__default.useCallback((group) => {
25824
25530
  setOptimisticOrders((prev) => {
25825
25531
  if (!prev.has(group)) return prev;
25826
25532
  const next = new Map(prev);
@@ -25845,7 +25551,7 @@ function useDataDnd(args) {
25845
25551
  const raw = it[dndItemIdField];
25846
25552
  return String(raw ?? `__idx_${idx}`);
25847
25553
  }).join("|");
25848
- const itemIds = React97__default.useMemo(
25554
+ const itemIds = React95__default.useMemo(
25849
25555
  () => orderedItems.map((it, idx) => {
25850
25556
  const raw = it[dndItemIdField];
25851
25557
  return raw ?? `__idx_${idx}`;
@@ -25853,7 +25559,7 @@ function useDataDnd(args) {
25853
25559
  [itemIdsSignature]
25854
25560
  );
25855
25561
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
25856
- React97__default.useEffect(() => {
25562
+ React95__default.useEffect(() => {
25857
25563
  const root = isRoot ? null : parentRoot;
25858
25564
  if (root) {
25859
25565
  root.clearOptimisticOrder(ownGroup);
@@ -25861,20 +25567,20 @@ function useDataDnd(args) {
25861
25567
  clearOptimisticOrder(ownGroup);
25862
25568
  }
25863
25569
  }, [itemsContentSig, ownGroup]);
25864
- const zonesRef = React97__default.useRef(/* @__PURE__ */ new Map());
25865
- const registerZone = React97__default.useCallback((zoneId2, meta2) => {
25570
+ const zonesRef = React95__default.useRef(/* @__PURE__ */ new Map());
25571
+ const registerZone = React95__default.useCallback((zoneId2, meta2) => {
25866
25572
  zonesRef.current.set(zoneId2, meta2);
25867
25573
  }, []);
25868
- const unregisterZone = React97__default.useCallback((zoneId2) => {
25574
+ const unregisterZone = React95__default.useCallback((zoneId2) => {
25869
25575
  zonesRef.current.delete(zoneId2);
25870
25576
  }, []);
25871
- const [activeDrag, setActiveDrag] = React97__default.useState(null);
25872
- const [overZoneGroup, setOverZoneGroup] = React97__default.useState(null);
25873
- const meta = React97__default.useMemo(
25577
+ const [activeDrag, setActiveDrag] = React95__default.useState(null);
25578
+ const [overZoneGroup, setOverZoneGroup] = React95__default.useState(null);
25579
+ const meta = React95__default.useMemo(
25874
25580
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
25875
25581
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
25876
25582
  );
25877
- React97__default.useEffect(() => {
25583
+ React95__default.useEffect(() => {
25878
25584
  const target = isRoot ? null : parentRoot;
25879
25585
  if (!target) {
25880
25586
  zonesRef.current.set(zoneId, meta);
@@ -25893,7 +25599,7 @@ function useDataDnd(args) {
25893
25599
  }, [parentRoot, isRoot, zoneId, meta]);
25894
25600
  const sensors = useAlmadarDndSensors(true);
25895
25601
  const collisionDetection = almadarDndCollisionDetection;
25896
- const findZoneByItem = React97__default.useCallback(
25602
+ const findZoneByItem = React95__default.useCallback(
25897
25603
  (id) => {
25898
25604
  for (const z of zonesRef.current.values()) {
25899
25605
  if (z.itemIds.includes(id)) return z;
@@ -25902,7 +25608,7 @@ function useDataDnd(args) {
25902
25608
  },
25903
25609
  []
25904
25610
  );
25905
- React97__default.useCallback(
25611
+ React95__default.useCallback(
25906
25612
  (group) => {
25907
25613
  for (const z of zonesRef.current.values()) {
25908
25614
  if (z.group === group) return z;
@@ -25911,7 +25617,7 @@ function useDataDnd(args) {
25911
25617
  },
25912
25618
  []
25913
25619
  );
25914
- const handleDragEnd = React97__default.useCallback(
25620
+ const handleDragEnd = React95__default.useCallback(
25915
25621
  (event) => {
25916
25622
  const { active, over } = event;
25917
25623
  const activeIdStr = String(active.id);
@@ -26002,8 +25708,8 @@ function useDataDnd(args) {
26002
25708
  },
26003
25709
  [eventBus]
26004
25710
  );
26005
- const sortableData = React97__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
26006
- const SortableItem = React97__default.useCallback(
25711
+ const sortableData = React95__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
25712
+ const SortableItem = React95__default.useCallback(
26007
25713
  ({ id, children }) => {
26008
25714
  const {
26009
25715
  attributes,
@@ -26043,7 +25749,7 @@ function useDataDnd(args) {
26043
25749
  id: droppableId,
26044
25750
  data: sortableData
26045
25751
  });
26046
- const ctx = React97__default.useContext(RootCtx);
25752
+ const ctx = React95__default.useContext(RootCtx);
26047
25753
  const activeDrag2 = ctx?.activeDrag ?? null;
26048
25754
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
26049
25755
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -26058,7 +25764,7 @@ function useDataDnd(args) {
26058
25764
  showForeignPlaceholder,
26059
25765
  ctxAvailable: ctx != null
26060
25766
  });
26061
- React97__default.useEffect(() => {
25767
+ React95__default.useEffect(() => {
26062
25768
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
26063
25769
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
26064
25770
  return /* @__PURE__ */ jsx(
@@ -26072,11 +25778,11 @@ function useDataDnd(args) {
26072
25778
  }
26073
25779
  );
26074
25780
  };
26075
- const rootContextValue = React97__default.useMemo(
25781
+ const rootContextValue = React95__default.useMemo(
26076
25782
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
26077
25783
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
26078
25784
  );
26079
- const handleDragStart = React97__default.useCallback((event) => {
25785
+ const handleDragStart = React95__default.useCallback((event) => {
26080
25786
  const sourceZone = findZoneByItem(event.active.id);
26081
25787
  const rect = event.active.rect.current.initial;
26082
25788
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -26095,7 +25801,7 @@ function useDataDnd(args) {
26095
25801
  isRoot
26096
25802
  });
26097
25803
  }, [findZoneByItem, isRoot, zoneId]);
26098
- const handleDragOver = React97__default.useCallback((event) => {
25804
+ const handleDragOver = React95__default.useCallback((event) => {
26099
25805
  const { active, over } = event;
26100
25806
  const overData = over?.data?.current;
26101
25807
  const overGroup = overData?.dndGroup ?? null;
@@ -26165,7 +25871,7 @@ function useDataDnd(args) {
26165
25871
  return next;
26166
25872
  });
26167
25873
  }, []);
26168
- const handleDragCancel = React97__default.useCallback((event) => {
25874
+ const handleDragCancel = React95__default.useCallback((event) => {
26169
25875
  setActiveDrag(null);
26170
25876
  setOverZoneGroup(null);
26171
25877
  dndLog.warn("dragCancel", {
@@ -26173,12 +25879,12 @@ function useDataDnd(args) {
26173
25879
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
26174
25880
  });
26175
25881
  }, []);
26176
- const handleDragEndWithCleanup = React97__default.useCallback((event) => {
25882
+ const handleDragEndWithCleanup = React95__default.useCallback((event) => {
26177
25883
  handleDragEnd(event);
26178
25884
  setActiveDrag(null);
26179
25885
  setOverZoneGroup(null);
26180
25886
  }, [handleDragEnd]);
26181
- const wrapContainer = React97__default.useCallback(
25887
+ const wrapContainer = React95__default.useCallback(
26182
25888
  (children) => {
26183
25889
  if (!enabled) return children;
26184
25890
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -26232,7 +25938,7 @@ var init_useDataDnd = __esm({
26232
25938
  init_useAlmadarDndCollision();
26233
25939
  init_Box();
26234
25940
  dndLog = createLogger("almadar:ui:dnd");
26235
- RootCtx = React97__default.createContext(null);
25941
+ RootCtx = React95__default.createContext(null);
26236
25942
  }
26237
25943
  });
26238
25944
  function fieldLabel2(key) {
@@ -26752,7 +26458,7 @@ function DataList({
26752
26458
  }) {
26753
26459
  const eventBus = useEventBus();
26754
26460
  const { t } = useTranslate();
26755
- const [visibleCount, setVisibleCount] = React97__default.useState(pageSize || Infinity);
26461
+ const [visibleCount, setVisibleCount] = React95__default.useState(pageSize || Infinity);
26756
26462
  const fieldDefs = fields ?? columns ?? [];
26757
26463
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
26758
26464
  const dnd = useDataDnd({
@@ -26771,7 +26477,7 @@ function DataList({
26771
26477
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
26772
26478
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
26773
26479
  const hasRenderProp = typeof children === "function";
26774
- React97__default.useEffect(() => {
26480
+ React95__default.useEffect(() => {
26775
26481
  const renderItemTypeOf = typeof schemaRenderItem;
26776
26482
  const childrenTypeOf = typeof children;
26777
26483
  if (data.length > 0 && !hasRenderProp) {
@@ -26876,7 +26582,7 @@ function DataList({
26876
26582
  const items2 = data.map((item) => item);
26877
26583
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
26878
26584
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
26879
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
26585
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
26880
26586
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
26881
26587
  group.items.map((itemData, index) => {
26882
26588
  const id = itemData.id || `${gi}-${index}`;
@@ -27024,7 +26730,7 @@ function DataList({
27024
26730
  className
27025
26731
  ),
27026
26732
  children: [
27027
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
26733
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
27028
26734
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
27029
26735
  group.items.map(
27030
26736
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -28398,7 +28104,7 @@ var init_WizardProgress = __esm({
28398
28104
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
28399
28105
  const isActive = index === currentStep;
28400
28106
  const isCompleted = index < currentStep;
28401
- return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
28107
+ return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
28402
28108
  /* @__PURE__ */ jsx(
28403
28109
  "button",
28404
28110
  {
@@ -29009,50 +28715,6 @@ var init_FlipCard = __esm({
29009
28715
  FlipCard.displayName = "FlipCard";
29010
28716
  }
29011
28717
  });
29012
- function pascalToKebab(name) {
29013
- return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
29014
- }
29015
- function kebabToPascal3(name) {
29016
- return name.split("-").map((part) => /^\d+$/.test(part) ? part : part.charAt(0).toUpperCase() + part.slice(1)).join("");
29017
- }
29018
- var ICON_ITEMS, IconPicker;
29019
- var init_IconPicker = __esm({
29020
- "components/core/molecules/IconPicker.tsx"() {
29021
- "use client";
29022
- init_Icon();
29023
- init_GridPicker();
29024
- ICON_ITEMS = (() => {
29025
- const items = [];
29026
- for (const [exportName, candidate] of Object.entries(LucideIcons2)) {
29027
- if (!/^[A-Z]/.test(exportName)) continue;
29028
- if (exportName.endsWith("Icon")) continue;
29029
- if (exportName.startsWith("Lucide")) continue;
29030
- const isComponent = candidate !== null && (typeof candidate === "object" || typeof candidate === "function") && "$$typeof" in candidate;
29031
- if (!isComponent) continue;
29032
- const kebab = pascalToKebab(exportName);
29033
- if (kebabToPascal3(kebab) !== exportName) continue;
29034
- items.push({ id: kebab, label: kebab, category: "icons" });
29035
- }
29036
- return items;
29037
- })();
29038
- IconPicker = ({ value, onChange, className }) => {
29039
- const items = useMemo(() => ICON_ITEMS, []);
29040
- return /* @__PURE__ */ jsx(
29041
- GridPicker,
29042
- {
29043
- items,
29044
- value,
29045
- onChange,
29046
- searchPlaceholder: "Search icons\u2026",
29047
- renderThumbnail: (it) => /* @__PURE__ */ jsx(Icon, { name: it.id }),
29048
- cellSize: 32,
29049
- className
29050
- }
29051
- );
29052
- };
29053
- IconPicker.displayName = "IconPicker";
29054
- }
29055
- });
29056
28718
  function toISODate(d) {
29057
28719
  return d.toISOString().slice(0, 10);
29058
28720
  }
@@ -29497,7 +29159,7 @@ function InventoryGrid({
29497
29159
  const eventBus = useEventBus();
29498
29160
  const slotCount = totalSlots ?? items.length;
29499
29161
  const emptySlotCount = Math.max(0, slotCount - items.length);
29500
- const handleSelect = React97.useCallback(
29162
+ const handleSelect = React95.useCallback(
29501
29163
  (id) => {
29502
29164
  onSelect?.(id);
29503
29165
  if (selectEvent) {
@@ -29714,31 +29376,31 @@ function GameCanvas2D({
29714
29376
  assetBaseUrl = "",
29715
29377
  className
29716
29378
  }) {
29717
- const canvasRef = React97.useRef(null);
29718
- const rafRef = React97.useRef(0);
29719
- const frameRef = React97.useRef(0);
29720
- const lastTimeRef = React97.useRef(0);
29721
- const imageCache = React97.useRef(/* @__PURE__ */ new Map());
29379
+ const canvasRef = React95.useRef(null);
29380
+ const rafRef = React95.useRef(0);
29381
+ const frameRef = React95.useRef(0);
29382
+ const lastTimeRef = React95.useRef(0);
29383
+ const imageCache = React95.useRef(/* @__PURE__ */ new Map());
29722
29384
  const emit = useEmitEvent();
29723
- const onDrawRef = React97.useRef(onDraw);
29385
+ const onDrawRef = React95.useRef(onDraw);
29724
29386
  onDrawRef.current = onDraw;
29725
- const onTickRef = React97.useRef(onTick);
29387
+ const onTickRef = React95.useRef(onTick);
29726
29388
  onTickRef.current = onTick;
29727
- const tickEventRef = React97.useRef(tickEvent);
29389
+ const tickEventRef = React95.useRef(tickEvent);
29728
29390
  tickEventRef.current = tickEvent;
29729
- const drawEventRef = React97.useRef(drawEvent);
29391
+ const drawEventRef = React95.useRef(drawEvent);
29730
29392
  drawEventRef.current = drawEvent;
29731
- const emitRef = React97.useRef(emit);
29393
+ const emitRef = React95.useRef(emit);
29732
29394
  emitRef.current = emit;
29733
- const assetBaseUrlRef = React97.useRef(assetBaseUrl);
29395
+ const assetBaseUrlRef = React95.useRef(assetBaseUrl);
29734
29396
  assetBaseUrlRef.current = assetBaseUrl;
29735
- const backgroundImageRef = React97.useRef(backgroundImage);
29397
+ const backgroundImageRef = React95.useRef(backgroundImage);
29736
29398
  backgroundImageRef.current = backgroundImage;
29737
- const widthRef = React97.useRef(width);
29399
+ const widthRef = React95.useRef(width);
29738
29400
  widthRef.current = width;
29739
- const heightRef = React97.useRef(height);
29401
+ const heightRef = React95.useRef(height);
29740
29402
  heightRef.current = height;
29741
- const loadImage = React97.useCallback((url) => {
29403
+ const loadImage = React95.useCallback((url) => {
29742
29404
  const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
29743
29405
  const cached = imageCache.current.get(fullUrl);
29744
29406
  if (cached?.complete && cached.naturalWidth > 0) return cached;
@@ -29750,7 +29412,7 @@ function GameCanvas2D({
29750
29412
  }
29751
29413
  return null;
29752
29414
  }, []);
29753
- React97.useEffect(() => {
29415
+ React95.useEffect(() => {
29754
29416
  const canvas = canvasRef.current;
29755
29417
  if (!canvas) return;
29756
29418
  const ctx = canvas.getContext("2d");
@@ -30053,7 +29715,7 @@ function TurnPanel({
30053
29715
  className
30054
29716
  }) {
30055
29717
  const eventBus = useEventBus();
30056
- const handleAction = React97.useCallback(
29718
+ const handleAction = React95.useCallback(
30057
29719
  (event) => {
30058
29720
  if (event) {
30059
29721
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -30199,7 +29861,7 @@ function UnitCommandBar({
30199
29861
  className
30200
29862
  }) {
30201
29863
  const eventBus = useEventBus();
30202
- const handleCommand = React97.useCallback(
29864
+ const handleCommand = React95.useCallback(
30203
29865
  (event) => {
30204
29866
  if (event) {
30205
29867
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -30684,7 +30346,7 @@ function GameMenu({
30684
30346
  } catch {
30685
30347
  }
30686
30348
  const eventBus = eventBusProp || eventBusFromHook;
30687
- const handleOptionClick = React97.useCallback(
30349
+ const handleOptionClick = React95.useCallback(
30688
30350
  (option) => {
30689
30351
  if (option.event && eventBus) {
30690
30352
  eventBus.emit(`UI:${option.event}`, { option });
@@ -30798,7 +30460,7 @@ function GameOverScreen({
30798
30460
  } catch {
30799
30461
  }
30800
30462
  const eventBus = eventBusProp || eventBusFromHook;
30801
- const handleActionClick = React97.useCallback(
30463
+ const handleActionClick = React95.useCallback(
30802
30464
  (action) => {
30803
30465
  if (action.event && eventBus) {
30804
30466
  eventBus.emit(`UI:${action.event}`, { action });
@@ -31509,14 +31171,14 @@ function useSafeEventBus5() {
31509
31171
  } };
31510
31172
  }
31511
31173
  }
31512
- var sizeStyles10, LONG_PRESS_DELAY, LONG_PRESS_INTERVAL, NumberStepper;
31174
+ var sizeStyles9, LONG_PRESS_DELAY, LONG_PRESS_INTERVAL, NumberStepper;
31513
31175
  var init_NumberStepper = __esm({
31514
31176
  "components/core/molecules/NumberStepper.tsx"() {
31515
31177
  "use client";
31516
31178
  init_cn();
31517
31179
  init_Icon();
31518
31180
  init_useEventBus();
31519
- sizeStyles10 = {
31181
+ sizeStyles9 = {
31520
31182
  sm: {
31521
31183
  button: "w-7 h-7",
31522
31184
  text: "text-sm min-w-[2rem]",
@@ -31554,7 +31216,7 @@ var init_NumberStepper = __esm({
31554
31216
  const timeoutRef = useRef(null);
31555
31217
  const isAtMin = min !== void 0 && value <= min;
31556
31218
  const isAtMax = max !== void 0 && value >= max;
31557
- const styles = sizeStyles10[size];
31219
+ const styles = sizeStyles9[size];
31558
31220
  const emitChange = useCallback(
31559
31221
  (newValue) => {
31560
31222
  const clamped = Math.round(newValue / step) * step;
@@ -31695,14 +31357,14 @@ function useSafeEventBus6() {
31695
31357
  } };
31696
31358
  }
31697
31359
  }
31698
- var sizeStyles11, StarRating;
31360
+ var sizeStyles10, StarRating;
31699
31361
  var init_StarRating = __esm({
31700
31362
  "components/core/molecules/StarRating.tsx"() {
31701
31363
  "use client";
31702
31364
  init_cn();
31703
31365
  init_Icon();
31704
31366
  init_useEventBus();
31705
- sizeStyles11 = {
31367
+ sizeStyles10 = {
31706
31368
  sm: { star: "w-4 h-4", gap: "gap-0.5" },
31707
31369
  md: { star: "w-6 h-6", gap: "gap-1" },
31708
31370
  lg: { star: "w-8 h-8", gap: "gap-1.5" }
@@ -31721,7 +31383,7 @@ var init_StarRating = __esm({
31721
31383
  }) => {
31722
31384
  const [hoverValue, setHoverValue] = useState(null);
31723
31385
  const eventBus = useSafeEventBus6();
31724
- const styles = sizeStyles11[size];
31386
+ const styles = sizeStyles10[size];
31725
31387
  const displayValue = hoverValue ?? value;
31726
31388
  const emitChange = useCallback(
31727
31389
  (newValue) => {
@@ -32275,8 +31937,8 @@ function TableView({
32275
31937
  }) {
32276
31938
  const eventBus = useEventBus();
32277
31939
  const { t } = useTranslate();
32278
- const [visibleCount, setVisibleCount] = React97__default.useState(pageSize > 0 ? pageSize : Infinity);
32279
- const [localSelected, setLocalSelected] = React97__default.useState(/* @__PURE__ */ new Set());
31940
+ const [visibleCount, setVisibleCount] = React95__default.useState(pageSize > 0 ? pageSize : Infinity);
31941
+ const [localSelected, setLocalSelected] = React95__default.useState(/* @__PURE__ */ new Set());
32280
31942
  const colDefs = columns ?? fields ?? [];
32281
31943
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
32282
31944
  const dnd = useDataDnd({
@@ -32471,12 +32133,12 @@ function TableView({
32471
32133
  ]
32472
32134
  }
32473
32135
  );
32474
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React97__default.Fragment, { children: rowInner }, id);
32136
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React95__default.Fragment, { children: rowInner }, id);
32475
32137
  };
32476
32138
  const items = data.map((row) => row);
32477
32139
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
32478
32140
  let runningIndex = 0;
32479
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
32141
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
32480
32142
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
32481
32143
  group.items.map((row) => renderRow(row, runningIndex++))
32482
32144
  ] }, gi)) });
@@ -33828,7 +33490,7 @@ var init_StepFlow = __esm({
33828
33490
  className
33829
33491
  }) => {
33830
33492
  if (orientation === "vertical") {
33831
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React97__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
33493
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React95__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
33832
33494
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
33833
33495
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
33834
33496
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -33839,7 +33501,7 @@ var init_StepFlow = __esm({
33839
33501
  ] })
33840
33502
  ] }) }, index)) });
33841
33503
  }
33842
- 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(React97__default.Fragment, { children: [
33504
+ 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(React95__default.Fragment, { children: [
33843
33505
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
33844
33506
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
33845
33507
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -34648,14 +34310,14 @@ var init_EdgeDecoration = __esm({
34648
34310
  EdgeDecoration.displayName = "EdgeDecoration";
34649
34311
  }
34650
34312
  });
34651
- var sizeStyles12, VoteStack;
34313
+ var sizeStyles11, VoteStack;
34652
34314
  var init_VoteStack = __esm({
34653
34315
  "components/core/molecules/VoteStack.tsx"() {
34654
34316
  "use client";
34655
34317
  init_cn();
34656
34318
  init_Icon();
34657
34319
  init_useEventBus();
34658
- sizeStyles12 = {
34320
+ sizeStyles11 = {
34659
34321
  sm: {
34660
34322
  button: "w-7 h-7",
34661
34323
  text: "text-sm min-w-[2rem]",
@@ -34683,7 +34345,7 @@ var init_VoteStack = __esm({
34683
34345
  className,
34684
34346
  label
34685
34347
  }) => {
34686
- const styles = sizeStyles12[size];
34348
+ const styles = sizeStyles11[size];
34687
34349
  const isUp = userVote === "up";
34688
34350
  const isDown = userVote === "down";
34689
34351
  const eventBus = useEventBus();
@@ -34815,7 +34477,7 @@ var init_LikertScale = __esm({
34815
34477
  md: "text-base",
34816
34478
  lg: "text-lg"
34817
34479
  };
34818
- LikertScale = React97__default.forwardRef(
34480
+ LikertScale = React95__default.forwardRef(
34819
34481
  ({
34820
34482
  question,
34821
34483
  options = DEFAULT_LIKERT_OPTIONS,
@@ -34827,7 +34489,7 @@ var init_LikertScale = __esm({
34827
34489
  variant = "radios",
34828
34490
  className
34829
34491
  }, ref) => {
34830
- const groupId = React97__default.useId();
34492
+ const groupId = React95__default.useId();
34831
34493
  const eventBus = useEventBus();
34832
34494
  const handleSelect = useCallback(
34833
34495
  (next) => {
@@ -34951,7 +34613,7 @@ var init_LikertScale = __esm({
34951
34613
  LikertScale.displayName = "LikertScale";
34952
34614
  }
34953
34615
  });
34954
- var DEFAULT_MATRIX_COLUMNS, sizeStyles13, MatrixQuestion;
34616
+ var DEFAULT_MATRIX_COLUMNS, sizeStyles12, MatrixQuestion;
34955
34617
  var init_MatrixQuestion = __esm({
34956
34618
  "components/core/molecules/MatrixQuestion.tsx"() {
34957
34619
  "use client";
@@ -34967,7 +34629,7 @@ var init_MatrixQuestion = __esm({
34967
34629
  { value: 4, label: "Agree" },
34968
34630
  { value: 5, label: "Strongly Agree" }
34969
34631
  ];
34970
- sizeStyles13 = {
34632
+ sizeStyles12 = {
34971
34633
  sm: {
34972
34634
  cell: "px-2 py-1.5 text-xs",
34973
34635
  radio: "sm",
@@ -34990,7 +34652,7 @@ var init_MatrixQuestion = __esm({
34990
34652
  size = "md",
34991
34653
  className
34992
34654
  }) => {
34993
- const styles = sizeStyles13[size];
34655
+ const styles = sizeStyles12[size];
34994
34656
  const safeRows = rows2 ?? [];
34995
34657
  const safeValues = values ?? {};
34996
34658
  const eventBus = useEventBus();
@@ -37135,7 +36797,7 @@ var init_DocBreadcrumb = __esm({
37135
36797
  "aria-label": t("aria.breadcrumb"),
37136
36798
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
37137
36799
  const isLast = idx === items.length - 1;
37138
- return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
36800
+ return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
37139
36801
  idx > 0 && /* @__PURE__ */ jsx(
37140
36802
  Icon,
37141
36803
  {
@@ -37894,7 +37556,7 @@ var init_PageHeader = __esm({
37894
37556
  info: "bg-info/10 text-info"
37895
37557
  };
37896
37558
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
37897
- 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(React97__default.Fragment, { children: [
37559
+ 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(React95__default.Fragment, { children: [
37898
37560
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
37899
37561
  crumb.href ? /* @__PURE__ */ jsx(
37900
37562
  "a",
@@ -37981,271 +37643,6 @@ var init_PageHeader = __esm({
37981
37643
  PageHeader.displayName = "PageHeader";
37982
37644
  }
37983
37645
  });
37984
- var FormSection, FormLayout, FormActions;
37985
- var init_FormSection = __esm({
37986
- "components/core/molecules/FormSection.tsx"() {
37987
- "use client";
37988
- init_cn();
37989
- init_atoms2();
37990
- init_Box();
37991
- init_Typography();
37992
- init_Button();
37993
- init_Stack();
37994
- init_Icon();
37995
- init_useEventBus();
37996
- FormSection = ({
37997
- title,
37998
- description,
37999
- children,
38000
- collapsible = false,
38001
- defaultCollapsed = false,
38002
- card = false,
38003
- columns = 1,
38004
- className
38005
- }) => {
38006
- const [collapsed, setCollapsed] = React97__default.useState(defaultCollapsed);
38007
- const { t } = useTranslate();
38008
- const eventBus = useEventBus();
38009
- const gridClass = {
38010
- 1: "grid-cols-1",
38011
- 2: "grid-cols-1 md:grid-cols-2",
38012
- 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
38013
- }[columns];
38014
- React97__default.useCallback(() => {
38015
- if (collapsible) {
38016
- setCollapsed((prev) => !prev);
38017
- eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
38018
- }
38019
- }, [collapsible, collapsed, eventBus]);
38020
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
38021
- (title || description) && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "mb-4", children: [
38022
- title && /* @__PURE__ */ jsxs(
38023
- HStack,
38024
- {
38025
- justify: "between",
38026
- align: "center",
38027
- className: cn(collapsible && "cursor-pointer"),
38028
- action: collapsible ? "TOGGLE_COLLAPSE" : void 0,
38029
- children: [
38030
- /* @__PURE__ */ jsx(Typography, { variant: "h3", weight: "semibold", children: title }),
38031
- collapsible && /* @__PURE__ */ jsx(
38032
- Button,
38033
- {
38034
- variant: "ghost",
38035
- size: "sm",
38036
- action: "TOGGLE_COLLAPSE",
38037
- children: /* @__PURE__ */ jsx(
38038
- Icon,
38039
- {
38040
- icon: ChevronDown,
38041
- size: "sm",
38042
- className: cn(
38043
- "text-muted-foreground transition-transform",
38044
- collapsed && "rotate-180"
38045
- )
38046
- }
38047
- )
38048
- }
38049
- )
38050
- ]
38051
- }
38052
- ),
38053
- description && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: description })
38054
- ] }),
38055
- (!collapsible || !collapsed) && /* @__PURE__ */ jsx(Box, { className: cn("grid gap-4", gridClass), children })
38056
- ] });
38057
- if (card) {
38058
- return /* @__PURE__ */ jsx(Card, { className: cn("p-6", className), children: content });
38059
- }
38060
- return /* @__PURE__ */ jsx(Box, { className, children: content });
38061
- };
38062
- FormSection.displayName = "FormSection";
38063
- FormLayout = ({
38064
- children,
38065
- dividers = true,
38066
- className
38067
- }) => {
38068
- return /* @__PURE__ */ jsx(
38069
- VStack,
38070
- {
38071
- gap: "lg",
38072
- className: cn(
38073
- dividers && "[&>*+*]:pt-8 [&>*+*]:border-t [&>*+*]:border-border",
38074
- className
38075
- ),
38076
- children
38077
- }
38078
- );
38079
- };
38080
- FormLayout.displayName = "FormLayout";
38081
- FormActions = ({
38082
- children,
38083
- sticky = false,
38084
- align = "right",
38085
- className
38086
- }) => {
38087
- const alignClass2 = {
38088
- left: "justify-start",
38089
- right: "justify-end",
38090
- between: "justify-between",
38091
- center: "justify-center"
38092
- }[align];
38093
- return /* @__PURE__ */ jsx(
38094
- HStack,
38095
- {
38096
- gap: "sm",
38097
- align: "center",
38098
- className: cn(
38099
- "pt-6 border-t border-border",
38100
- alignClass2,
38101
- sticky && "sticky bottom-0 bg-card py-4 -mx-6 px-6 shadow-[0_-4px_6px_-1px_rgb(0,0,0,0.05)]",
38102
- className
38103
- ),
38104
- children
38105
- }
38106
- );
38107
- };
38108
- FormActions.displayName = "FormActions";
38109
- }
38110
- });
38111
- function currentValue(decl, override) {
38112
- return override !== void 0 ? override : decl.default;
38113
- }
38114
- function TextLikeControl({
38115
- field,
38116
- numeric,
38117
- value,
38118
- onCommit
38119
- }) {
38120
- const initial = value === void 0 || value === null ? "" : String(value);
38121
- const [draft, setDraft] = React97__default.useState(initial);
38122
- React97__default.useEffect(() => setDraft(initial), [initial]);
38123
- const commit = () => {
38124
- if (numeric) {
38125
- const n = draft.trim() === "" ? 0 : Number(draft);
38126
- onCommit(field, Number.isNaN(n) ? 0 : n);
38127
- } else {
38128
- onCommit(field, draft);
38129
- }
38130
- };
38131
- return /* @__PURE__ */ jsx(
38132
- Input,
38133
- {
38134
- inputType: numeric ? "number" : "text",
38135
- value: draft,
38136
- onChange: (e) => setDraft(e.target.value),
38137
- onBlur: commit,
38138
- onKeyDown: (e) => {
38139
- if (e.key === "Enter") commit();
38140
- }
38141
- }
38142
- );
38143
- }
38144
- function FieldControl({
38145
- name,
38146
- decl,
38147
- value,
38148
- onChange,
38149
- assets
38150
- }) {
38151
- let control;
38152
- const stringValue = typeof value === "string" ? value : void 0;
38153
- if (decl.type === "icon") {
38154
- control = /* @__PURE__ */ jsx(IconPicker, { value: stringValue, onChange: (icon) => onChange(name, icon) });
38155
- } else if (decl.type === "asset") {
38156
- control = /* @__PURE__ */ jsx(
38157
- AssetPicker,
38158
- {
38159
- assets: assets ?? [],
38160
- value: stringValue,
38161
- onChange: (url) => onChange(name, url)
38162
- }
38163
- );
38164
- } else if (decl.type === "boolean") {
38165
- control = /* @__PURE__ */ jsx(Switch, { checked: value === true, onChange: (c) => onChange(name, c) });
38166
- } else if (decl.type === "string" && decl.values !== void 0 && decl.values.length > 0) {
38167
- control = /* @__PURE__ */ jsx(
38168
- Select,
38169
- {
38170
- options: decl.values.map((v) => ({ value: v, label: v })),
38171
- value: typeof value === "string" ? value : "",
38172
- onChange: (e) => onChange(name, e.target.value)
38173
- }
38174
- );
38175
- } else if (decl.type === "number") {
38176
- control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
38177
- } else if (decl.type === "string") {
38178
- control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
38179
- } else {
38180
- control = /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
38181
- decl.type,
38182
- " \u2014 edit in source"
38183
- ] });
38184
- }
38185
- return /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
38186
- /* @__PURE__ */ jsx(Typography, { variant: "label", children: decl.label ?? name }),
38187
- control,
38188
- decl.description !== void 0 && decl.description !== "" && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: decl.description })
38189
- ] });
38190
- }
38191
- var TIER_ORDER, PropertyInspector;
38192
- var init_PropertyInspector = __esm({
38193
- "components/core/molecules/PropertyInspector.tsx"() {
38194
- "use client";
38195
- init_cn();
38196
- init_Stack();
38197
- init_Typography();
38198
- init_Button();
38199
- init_Switch();
38200
- init_Select();
38201
- init_Input();
38202
- init_FormSection();
38203
- init_IconPicker();
38204
- init_AssetPicker();
38205
- TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
38206
- PropertyInspector = ({
38207
- config,
38208
- values,
38209
- onChange,
38210
- onReset,
38211
- title,
38212
- className,
38213
- assets
38214
- }) => {
38215
- const fields = Object.entries(config);
38216
- const byTier = /* @__PURE__ */ new Map();
38217
- for (const [name, decl] of fields) {
38218
- const tier = decl.tier ?? "presentation";
38219
- const arr = byTier.get(tier) ?? [];
38220
- arr.push([name, decl]);
38221
- byTier.set(tier, arr);
38222
- }
38223
- const tiers = [...byTier.keys()].sort((a, b) => {
38224
- const ia = TIER_ORDER.indexOf(a);
38225
- const ib = TIER_ORDER.indexOf(b);
38226
- return (ia === -1 ? 99 : ia) - (ib === -1 ? 99 : ib);
38227
- });
38228
- return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
38229
- /* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
38230
- /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "bold", children: title ?? "Config" }),
38231
- onReset !== void 0 && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", icon: "rotate-ccw", label: "Reset", onClick: onReset })
38232
- ] }),
38233
- fields.length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "No configurable properties." }),
38234
- tiers.map((tier) => /* @__PURE__ */ jsx(FormSection, { title: tier, collapsible: true, defaultCollapsed: tier !== "presentation", children: /* @__PURE__ */ jsx(VStack, { gap: "sm", children: byTier.get(tier)?.map(([name, decl]) => /* @__PURE__ */ jsx(
38235
- FieldControl,
38236
- {
38237
- name,
38238
- decl,
38239
- value: currentValue(decl, values?.[name]),
38240
- onChange,
38241
- assets
38242
- },
38243
- name
38244
- )) }) }, tier))
38245
- ] });
38246
- };
38247
- }
38248
- });
38249
37646
  var lookStyles8, Header;
38250
37647
  var init_Header = __esm({
38251
37648
  "components/core/molecules/Header.tsx"() {
@@ -38896,7 +38293,7 @@ var init_WizardContainer = __esm({
38896
38293
  const isCompleted = index < currentStep;
38897
38294
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
38898
38295
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
38899
- return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
38296
+ return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
38900
38297
  /* @__PURE__ */ jsx(
38901
38298
  Button,
38902
38299
  {
@@ -41181,7 +40578,7 @@ var init_DetailPanel = __esm({
41181
40578
  }
41182
40579
  });
41183
40580
  function extractTitle(children) {
41184
- if (!React97__default.isValidElement(children)) return void 0;
40581
+ if (!React95__default.isValidElement(children)) return void 0;
41185
40582
  const props = children.props;
41186
40583
  if (typeof props.title === "string") {
41187
40584
  return props.title;
@@ -41236,7 +40633,7 @@ function LinearView({
41236
40633
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
41237
40634
  const isDone = i < currentIdx;
41238
40635
  const isCurrent = i === currentIdx;
41239
- return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
40636
+ return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
41240
40637
  i > 0 && /* @__PURE__ */ jsx(
41241
40638
  Typography,
41242
40639
  {
@@ -42194,12 +41591,12 @@ var init_Form = __esm({
42194
41591
  const isSchemaEntity = isOrbitalEntitySchema(entity);
42195
41592
  const resolvedEntity = isSchemaEntity ? entity : void 0;
42196
41593
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
42197
- const normalizedInitialData = React97__default.useMemo(() => {
41594
+ const normalizedInitialData = React95__default.useMemo(() => {
42198
41595
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
42199
41596
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
42200
41597
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
42201
41598
  }, [entity, initialData]);
42202
- const entityDerivedFields = React97__default.useMemo(() => {
41599
+ const entityDerivedFields = React95__default.useMemo(() => {
42203
41600
  if (fields && fields.length > 0) return void 0;
42204
41601
  if (!resolvedEntity) return void 0;
42205
41602
  return resolvedEntity.fields.map(
@@ -42219,16 +41616,16 @@ var init_Form = __esm({
42219
41616
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
42220
41617
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
42221
41618
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
42222
- const [formData, setFormData] = React97__default.useState(
41619
+ const [formData, setFormData] = React95__default.useState(
42223
41620
  normalizedInitialData
42224
41621
  );
42225
- const [collapsedSections, setCollapsedSections] = React97__default.useState(
41622
+ const [collapsedSections, setCollapsedSections] = React95__default.useState(
42226
41623
  /* @__PURE__ */ new Set()
42227
41624
  );
42228
- const [submitError, setSubmitError] = React97__default.useState(null);
42229
- const formRef = React97__default.useRef(null);
41625
+ const [submitError, setSubmitError] = React95__default.useState(null);
41626
+ const formRef = React95__default.useRef(null);
42230
41627
  const formMode = props.mode;
42231
- const mountedRef = React97__default.useRef(false);
41628
+ const mountedRef = React95__default.useRef(false);
42232
41629
  if (!mountedRef.current) {
42233
41630
  mountedRef.current = true;
42234
41631
  debug("forms", "mount", {
@@ -42241,7 +41638,7 @@ var init_Form = __esm({
42241
41638
  });
42242
41639
  }
42243
41640
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
42244
- const evalContext = React97__default.useMemo(
41641
+ const evalContext = React95__default.useMemo(
42245
41642
  () => ({
42246
41643
  formValues: formData,
42247
41644
  globalVariables: externalContext?.globalVariables ?? {},
@@ -42250,7 +41647,7 @@ var init_Form = __esm({
42250
41647
  }),
42251
41648
  [formData, externalContext]
42252
41649
  );
42253
- React97__default.useEffect(() => {
41650
+ React95__default.useEffect(() => {
42254
41651
  debug("forms", "initialData-sync", {
42255
41652
  mode: formMode,
42256
41653
  normalizedInitialData,
@@ -42261,7 +41658,7 @@ var init_Form = __esm({
42261
41658
  setFormData(normalizedInitialData);
42262
41659
  }
42263
41660
  }, [normalizedInitialData]);
42264
- const processCalculations = React97__default.useCallback(
41661
+ const processCalculations = React95__default.useCallback(
42265
41662
  (changedFieldId, newFormData) => {
42266
41663
  if (!hiddenCalculations.length) return;
42267
41664
  const context = {
@@ -42286,7 +41683,7 @@ var init_Form = __esm({
42286
41683
  },
42287
41684
  [hiddenCalculations, externalContext, eventBus]
42288
41685
  );
42289
- const checkViolations = React97__default.useCallback(
41686
+ const checkViolations = React95__default.useCallback(
42290
41687
  (changedFieldId, newFormData) => {
42291
41688
  if (!violationTriggers.length) return;
42292
41689
  const context = {
@@ -42324,7 +41721,7 @@ var init_Form = __esm({
42324
41721
  processCalculations(name, newFormData);
42325
41722
  checkViolations(name, newFormData);
42326
41723
  };
42327
- const isFieldVisible = React97__default.useCallback(
41724
+ const isFieldVisible = React95__default.useCallback(
42328
41725
  (fieldName) => {
42329
41726
  const condition = conditionalFields[fieldName];
42330
41727
  if (!condition) return true;
@@ -42332,7 +41729,7 @@ var init_Form = __esm({
42332
41729
  },
42333
41730
  [conditionalFields, evalContext]
42334
41731
  );
42335
- const isSectionVisible = React97__default.useCallback(
41732
+ const isSectionVisible = React95__default.useCallback(
42336
41733
  (section) => {
42337
41734
  if (!section.condition) return true;
42338
41735
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -42408,7 +41805,7 @@ var init_Form = __esm({
42408
41805
  eventBus.emit(`UI:${onCancel}`);
42409
41806
  }
42410
41807
  };
42411
- const renderField = React97__default.useCallback(
41808
+ const renderField = React95__default.useCallback(
42412
41809
  (field) => {
42413
41810
  const fieldName = field.name || field.field;
42414
41811
  if (!fieldName) return null;
@@ -42417,19 +41814,19 @@ var init_Form = __esm({
42417
41814
  }
42418
41815
  const inputType = determineInputType(field);
42419
41816
  const label = field.label || fieldName.charAt(0).toUpperCase() + fieldName.slice(1).replace(/([A-Z])/g, " $1");
42420
- const currentValue2 = formData[fieldName] ?? field.defaultValue ?? "";
41817
+ const currentValue = formData[fieldName] ?? field.defaultValue ?? "";
42421
41818
  return /* @__PURE__ */ jsxs(VStack, { gap: "xs", "data-field": fieldName, children: [
42422
41819
  inputType !== "checkbox" && /* @__PURE__ */ jsxs(Typography, { as: "label", variant: "label", weight: "bold", children: [
42423
41820
  label,
42424
41821
  field.required && /* @__PURE__ */ jsx(Typography, { as: "span", color: "error", className: "ml-1", children: "*" })
42425
41822
  ] }),
42426
- renderFieldInput(field, fieldName, inputType, currentValue2, label)
41823
+ renderFieldInput(field, fieldName, inputType, currentValue, label)
42427
41824
  ] }, fieldName);
42428
41825
  },
42429
41826
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
42430
41827
  );
42431
41828
  const effectiveFields = entityDerivedFields ?? fields;
42432
- const normalizedFields = React97__default.useMemo(() => {
41829
+ const normalizedFields = React95__default.useMemo(() => {
42433
41830
  if (!effectiveFields || effectiveFields.length === 0) return [];
42434
41831
  return effectiveFields.map((field) => {
42435
41832
  if (typeof field === "string") {
@@ -42452,7 +41849,7 @@ var init_Form = __esm({
42452
41849
  return field;
42453
41850
  });
42454
41851
  }, [effectiveFields, resolvedEntity]);
42455
- const schemaFields = React97__default.useMemo(() => {
41852
+ const schemaFields = React95__default.useMemo(() => {
42456
41853
  if (normalizedFields.length === 0) return null;
42457
41854
  if (isDebugEnabled()) {
42458
41855
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -42462,7 +41859,7 @@ var init_Form = __esm({
42462
41859
  }
42463
41860
  return normalizedFields.map(renderField).filter(Boolean);
42464
41861
  }, [normalizedFields, renderField, entityName, conditionalFields]);
42465
- const sectionElements = React97__default.useMemo(() => {
41862
+ const sectionElements = React95__default.useMemo(() => {
42466
41863
  if (!sections || sections.length === 0) return null;
42467
41864
  return sections.map((section) => {
42468
41865
  if (!isSectionVisible(section)) {
@@ -42498,7 +41895,7 @@ var init_Form = __esm({
42498
41895
  ] }, section.id);
42499
41896
  }).filter(Boolean);
42500
41897
  }, [sections, isSectionVisible, collapsedSections, renderField, gap]);
42501
- function renderFieldInput(field, fieldName, inputType, currentValue2, label) {
41898
+ function renderFieldInput(field, fieldName, inputType, currentValue, label) {
42502
41899
  const commonProps = {
42503
41900
  id: fieldName,
42504
41901
  name: fieldName,
@@ -42515,7 +41912,7 @@ var init_Form = __esm({
42515
41912
  {
42516
41913
  ...commonProps,
42517
41914
  label: label + (field.required ? " *" : ""),
42518
- checked: Boolean(currentValue2),
41915
+ checked: Boolean(currentValue),
42519
41916
  onChange: (e) => handleChange(fieldName, e.target.checked)
42520
41917
  }
42521
41918
  );
@@ -42524,7 +41921,7 @@ var init_Form = __esm({
42524
41921
  Textarea,
42525
41922
  {
42526
41923
  ...commonProps,
42527
- value: String(currentValue2),
41924
+ value: String(currentValue),
42528
41925
  onChange: (e) => handleChange(fieldName, e.target.value),
42529
41926
  minLength: field.min,
42530
41927
  maxLength: field.max
@@ -42537,7 +41934,7 @@ var init_Form = __esm({
42537
41934
  {
42538
41935
  ...commonProps,
42539
41936
  options,
42540
- value: String(currentValue2),
41937
+ value: String(currentValue),
42541
41938
  onChange: (e) => handleChange(fieldName, e.target.value),
42542
41939
  placeholder: field.placeholder || `Select ${label}...`
42543
41940
  }
@@ -42550,7 +41947,7 @@ var init_Form = __esm({
42550
41947
  RelationSelect,
42551
41948
  {
42552
41949
  ...commonProps,
42553
- value: currentValue2 ? String(currentValue2) : void 0,
41950
+ value: currentValue ? String(currentValue) : void 0,
42554
41951
  onChange: (value) => handleChange(fieldName, value),
42555
41952
  options: relationOptions,
42556
41953
  isLoading: relationLoading,
@@ -42566,7 +41963,7 @@ var init_Form = __esm({
42566
41963
  {
42567
41964
  ...commonProps,
42568
41965
  type: "number",
42569
- value: currentValue2 !== void 0 && currentValue2 !== "" ? String(currentValue2) : "",
41966
+ value: currentValue !== void 0 && currentValue !== "" ? String(currentValue) : "",
42570
41967
  onChange: (e) => handleChange(
42571
41968
  fieldName,
42572
41969
  e.target.value ? Number(e.target.value) : void 0
@@ -42581,7 +41978,7 @@ var init_Form = __esm({
42581
41978
  {
42582
41979
  ...commonProps,
42583
41980
  type: "date",
42584
- value: formatDateValue(currentValue2),
41981
+ value: formatDateValue(currentValue),
42585
41982
  onChange: (e) => handleChange(fieldName, e.target.value)
42586
41983
  }
42587
41984
  );
@@ -42591,7 +41988,7 @@ var init_Form = __esm({
42591
41988
  {
42592
41989
  ...commonProps,
42593
41990
  type: "datetime-local",
42594
- value: formatDateTimeValue(currentValue2),
41991
+ value: formatDateTimeValue(currentValue),
42595
41992
  onChange: (e) => handleChange(fieldName, e.target.value)
42596
41993
  }
42597
41994
  );
@@ -42601,7 +41998,7 @@ var init_Form = __esm({
42601
41998
  {
42602
41999
  ...commonProps,
42603
42000
  type: "email",
42604
- value: String(currentValue2),
42001
+ value: String(currentValue),
42605
42002
  onChange: (e) => handleChange(fieldName, e.target.value),
42606
42003
  minLength: field.min,
42607
42004
  maxLength: field.max
@@ -42613,7 +42010,7 @@ var init_Form = __esm({
42613
42010
  {
42614
42011
  ...commonProps,
42615
42012
  type: "url",
42616
- value: String(currentValue2),
42013
+ value: String(currentValue),
42617
42014
  onChange: (e) => handleChange(fieldName, e.target.value),
42618
42015
  minLength: field.min,
42619
42016
  maxLength: field.max
@@ -42625,7 +42022,7 @@ var init_Form = __esm({
42625
42022
  {
42626
42023
  ...commonProps,
42627
42024
  type: "password",
42628
- value: String(currentValue2),
42025
+ value: String(currentValue),
42629
42026
  onChange: (e) => handleChange(fieldName, e.target.value),
42630
42027
  minLength: field.min,
42631
42028
  maxLength: field.max
@@ -42638,7 +42035,7 @@ var init_Form = __esm({
42638
42035
  {
42639
42036
  ...commonProps,
42640
42037
  type: "text",
42641
- value: String(currentValue2),
42038
+ value: String(currentValue),
42642
42039
  onChange: (e) => handleChange(fieldName, e.target.value),
42643
42040
  minLength: field.min,
42644
42041
  maxLength: field.max
@@ -43737,7 +43134,7 @@ var init_List = __esm({
43737
43134
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
43738
43135
  return [];
43739
43136
  }, [entity]);
43740
- const getItemActions = React97__default.useCallback(
43137
+ const getItemActions = React95__default.useCallback(
43741
43138
  (item) => {
43742
43139
  if (!itemActions) return [];
43743
43140
  if (typeof itemActions === "function") {
@@ -44213,7 +43610,7 @@ var init_MediaGallery = __esm({
44213
43610
  [selectable, selectedItems, selectionEvent, eventBus]
44214
43611
  );
44215
43612
  const entityData = Array.isArray(entity) ? entity : [];
44216
- const items = React97__default.useMemo(() => {
43613
+ const items = React95__default.useMemo(() => {
44217
43614
  if (propItems) return propItems;
44218
43615
  if (entityData.length === 0) return [];
44219
43616
  return entityData.map((record, idx) => ({
@@ -44374,7 +43771,7 @@ var init_MediaGallery = __esm({
44374
43771
  }
44375
43772
  });
44376
43773
  function extractTitle2(children) {
44377
- if (!React97__default.isValidElement(children)) return void 0;
43774
+ if (!React95__default.isValidElement(children)) return void 0;
44378
43775
  const props = children.props;
44379
43776
  if (typeof props.title === "string") {
44380
43777
  return props.title;
@@ -44805,7 +44202,7 @@ var init_debugRegistry = __esm({
44805
44202
  }
44806
44203
  });
44807
44204
  function useDebugData() {
44808
- const [data, setData] = React97.useState(() => ({
44205
+ const [data, setData] = React95.useState(() => ({
44809
44206
  traits: [],
44810
44207
  ticks: [],
44811
44208
  guards: [],
@@ -44819,7 +44216,7 @@ function useDebugData() {
44819
44216
  },
44820
44217
  lastUpdate: Date.now()
44821
44218
  }));
44822
- React97.useEffect(() => {
44219
+ React95.useEffect(() => {
44823
44220
  const updateData = () => {
44824
44221
  setData({
44825
44222
  traits: getAllTraits(),
@@ -44928,12 +44325,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
44928
44325
  return positions;
44929
44326
  }
44930
44327
  function WalkMinimap() {
44931
- const [walkStep, setWalkStep] = React97.useState(null);
44932
- const [traits2, setTraits] = React97.useState([]);
44933
- const [coveredEdges, setCoveredEdges] = React97.useState([]);
44934
- const [completedTraits, setCompletedTraits] = React97.useState(/* @__PURE__ */ new Set());
44935
- const prevTraitRef = React97.useRef(null);
44936
- React97.useEffect(() => {
44328
+ const [walkStep, setWalkStep] = React95.useState(null);
44329
+ const [traits2, setTraits] = React95.useState([]);
44330
+ const [coveredEdges, setCoveredEdges] = React95.useState([]);
44331
+ const [completedTraits, setCompletedTraits] = React95.useState(/* @__PURE__ */ new Set());
44332
+ const prevTraitRef = React95.useRef(null);
44333
+ React95.useEffect(() => {
44937
44334
  const interval = setInterval(() => {
44938
44335
  const w = window;
44939
44336
  const step = w.__orbitalWalkStep;
@@ -45369,15 +44766,15 @@ var init_EntitiesTab = __esm({
45369
44766
  });
45370
44767
  function EventFlowTab({ events: events2 }) {
45371
44768
  const { t } = useTranslate();
45372
- const [filter, setFilter] = React97.useState("all");
45373
- const containerRef = React97.useRef(null);
45374
- const [autoScroll, setAutoScroll] = React97.useState(true);
45375
- React97.useEffect(() => {
44769
+ const [filter, setFilter] = React95.useState("all");
44770
+ const containerRef = React95.useRef(null);
44771
+ const [autoScroll, setAutoScroll] = React95.useState(true);
44772
+ React95.useEffect(() => {
45376
44773
  if (autoScroll && containerRef.current) {
45377
44774
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
45378
44775
  }
45379
44776
  }, [events2.length, autoScroll]);
45380
- const filteredEvents = React97.useMemo(() => {
44777
+ const filteredEvents = React95.useMemo(() => {
45381
44778
  if (filter === "all") return events2;
45382
44779
  return events2.filter((e) => e.type === filter);
45383
44780
  }, [events2, filter]);
@@ -45493,7 +44890,7 @@ var init_EventFlowTab = __esm({
45493
44890
  });
45494
44891
  function GuardsPanel({ guards }) {
45495
44892
  const { t } = useTranslate();
45496
- const [filter, setFilter] = React97.useState("all");
44893
+ const [filter, setFilter] = React95.useState("all");
45497
44894
  if (guards.length === 0) {
45498
44895
  return /* @__PURE__ */ jsx(
45499
44896
  EmptyState,
@@ -45506,7 +44903,7 @@ function GuardsPanel({ guards }) {
45506
44903
  }
45507
44904
  const passedCount = guards.filter((g) => g.result).length;
45508
44905
  const failedCount = guards.length - passedCount;
45509
- const filteredGuards = React97.useMemo(() => {
44906
+ const filteredGuards = React95.useMemo(() => {
45510
44907
  if (filter === "all") return guards;
45511
44908
  if (filter === "passed") return guards.filter((g) => g.result);
45512
44909
  return guards.filter((g) => !g.result);
@@ -45669,10 +45066,10 @@ function EffectBadge({ effect }) {
45669
45066
  }
45670
45067
  function TransitionTimeline({ transitions }) {
45671
45068
  const { t } = useTranslate();
45672
- const containerRef = React97.useRef(null);
45673
- const [autoScroll, setAutoScroll] = React97.useState(true);
45674
- const [expandedId, setExpandedId] = React97.useState(null);
45675
- React97.useEffect(() => {
45069
+ const containerRef = React95.useRef(null);
45070
+ const [autoScroll, setAutoScroll] = React95.useState(true);
45071
+ const [expandedId, setExpandedId] = React95.useState(null);
45072
+ React95.useEffect(() => {
45676
45073
  if (autoScroll && containerRef.current) {
45677
45074
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
45678
45075
  }
@@ -45952,9 +45349,9 @@ function getAllEvents(traits2) {
45952
45349
  function EventDispatcherTab({ traits: traits2, schema }) {
45953
45350
  const eventBus = useEventBus();
45954
45351
  const { t } = useTranslate();
45955
- const [log13, setLog] = React97.useState([]);
45956
- const prevStatesRef = React97.useRef(/* @__PURE__ */ new Map());
45957
- React97.useEffect(() => {
45352
+ const [log13, setLog] = React95.useState([]);
45353
+ const prevStatesRef = React95.useRef(/* @__PURE__ */ new Map());
45354
+ React95.useEffect(() => {
45958
45355
  for (const trait of traits2) {
45959
45356
  const prev = prevStatesRef.current.get(trait.id);
45960
45357
  if (prev && prev !== trait.currentState) {
@@ -46123,10 +45520,10 @@ function VerifyModePanel({
46123
45520
  localCount
46124
45521
  }) {
46125
45522
  const { t } = useTranslate();
46126
- const [expanded, setExpanded] = React97.useState(true);
46127
- const scrollRef = React97.useRef(null);
46128
- const prevCountRef = React97.useRef(0);
46129
- React97.useEffect(() => {
45523
+ const [expanded, setExpanded] = React95.useState(true);
45524
+ const scrollRef = React95.useRef(null);
45525
+ const prevCountRef = React95.useRef(0);
45526
+ React95.useEffect(() => {
46130
45527
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
46131
45528
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
46132
45529
  }
@@ -46183,10 +45580,10 @@ function RuntimeDebugger({
46183
45580
  schema
46184
45581
  }) {
46185
45582
  const { t } = useTranslate();
46186
- const [isCollapsed, setIsCollapsed] = React97.useState(mode === "verify" ? true : defaultCollapsed);
46187
- const [isVisible, setIsVisible] = React97.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
45583
+ const [isCollapsed, setIsCollapsed] = React95.useState(mode === "verify" ? true : defaultCollapsed);
45584
+ const [isVisible, setIsVisible] = React95.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
46188
45585
  const debugData = useDebugData();
46189
- React97.useEffect(() => {
45586
+ React95.useEffect(() => {
46190
45587
  if (mode === "inline") return;
46191
45588
  return onDebugToggle((enabled) => {
46192
45589
  setIsVisible(enabled);
@@ -46195,7 +45592,7 @@ function RuntimeDebugger({
46195
45592
  }
46196
45593
  });
46197
45594
  }, [mode]);
46198
- React97.useEffect(() => {
45595
+ React95.useEffect(() => {
46199
45596
  if (mode === "inline") return;
46200
45597
  const handleKeyDown = (e) => {
46201
45598
  if (e.key === "`" && isVisible) {
@@ -46644,7 +46041,7 @@ function SequenceBar({
46644
46041
  onSlotRemove(index);
46645
46042
  }, [onSlotRemove, playing]);
46646
46043
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
46647
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
46044
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
46648
46045
  i > 0 && /* @__PURE__ */ jsx(
46649
46046
  Typography,
46650
46047
  {
@@ -47602,7 +46999,7 @@ var init_StatCard = __esm({
47602
46999
  title: propTitle,
47603
47000
  value: propValue,
47604
47001
  previousValue,
47605
- currentValue: currentValue2,
47002
+ currentValue,
47606
47003
  trend: manualTrend,
47607
47004
  trendDirection: manualDirection,
47608
47005
  invertTrend = false,
@@ -47623,7 +47020,7 @@ var init_StatCard = __esm({
47623
47020
  const labelToUse = propLabel ?? propTitle;
47624
47021
  const eventBus = useEventBus();
47625
47022
  const { t } = useTranslate();
47626
- const handleActionClick = React97__default.useCallback(() => {
47023
+ const handleActionClick = React95__default.useCallback(() => {
47627
47024
  if (action?.event) {
47628
47025
  eventBus.emit(`UI:${action.event}`, {});
47629
47026
  }
@@ -47634,7 +47031,7 @@ var init_StatCard = __esm({
47634
47031
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
47635
47032
  const isLoading = externalLoading ?? false;
47636
47033
  const error = externalError;
47637
- const computeMetricValue = React97__default.useCallback(
47034
+ const computeMetricValue = React95__default.useCallback(
47638
47035
  (metric, items) => {
47639
47036
  if (metric.value !== void 0) {
47640
47037
  return metric.value;
@@ -47673,7 +47070,7 @@ var init_StatCard = __esm({
47673
47070
  },
47674
47071
  []
47675
47072
  );
47676
- const schemaStats = React97__default.useMemo(() => {
47073
+ const schemaStats = React95__default.useMemo(() => {
47677
47074
  if (!metrics || metrics.length === 0) return null;
47678
47075
  return metrics.map((metric) => ({
47679
47076
  label: metric.label,
@@ -47681,13 +47078,13 @@ var init_StatCard = __esm({
47681
47078
  format: metric.format
47682
47079
  }));
47683
47080
  }, [metrics, data, computeMetricValue]);
47684
- const calculatedTrend = React97__default.useMemo(() => {
47081
+ const calculatedTrend = React95__default.useMemo(() => {
47685
47082
  if (manualTrend !== void 0) return manualTrend;
47686
- if (previousValue === void 0 || currentValue2 === void 0)
47083
+ if (previousValue === void 0 || currentValue === void 0)
47687
47084
  return void 0;
47688
- if (previousValue === 0) return currentValue2 > 0 ? 100 : 0;
47689
- return (currentValue2 - previousValue) / previousValue * 100;
47690
- }, [manualTrend, previousValue, currentValue2]);
47085
+ if (previousValue === 0) return currentValue > 0 ? 100 : 0;
47086
+ return (currentValue - previousValue) / previousValue * 100;
47087
+ }, [manualTrend, previousValue, currentValue]);
47691
47088
  if (schemaStats && schemaStats.length > 1) {
47692
47089
  if (isLoading) {
47693
47090
  return /* @__PURE__ */ jsx(
@@ -48615,7 +48012,7 @@ var init_Timeline = __esm({
48615
48012
  }) => {
48616
48013
  const { t } = useTranslate();
48617
48014
  const entityData = Array.isArray(entity) ? entity : [];
48618
- const items = React97__default.useMemo(() => {
48015
+ const items = React95__default.useMemo(() => {
48619
48016
  if (propItems) return propItems;
48620
48017
  if (entityData.length === 0) return [];
48621
48018
  return entityData.map((record, idx) => {
@@ -48722,7 +48119,7 @@ var init_Timeline = __esm({
48722
48119
  }
48723
48120
  });
48724
48121
  function extractToastProps(children) {
48725
- if (!React97__default.isValidElement(children)) {
48122
+ if (!React95__default.isValidElement(children)) {
48726
48123
  if (typeof children === "string") {
48727
48124
  return { message: children };
48728
48125
  }
@@ -48760,7 +48157,7 @@ var init_ToastSlot = __esm({
48760
48157
  eventBus.emit("UI:CLOSE");
48761
48158
  };
48762
48159
  if (!isVisible) return null;
48763
- const isCustomContent = React97__default.isValidElement(children) && !message;
48160
+ const isCustomContent = React95__default.isValidElement(children) && !message;
48764
48161
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
48765
48162
  Toast,
48766
48163
  {
@@ -49270,12 +48667,12 @@ var init_WorldMapTemplate = __esm({
49270
48667
  }
49271
48668
  });
49272
48669
  function lazyThree(name, loader) {
49273
- const Lazy = React97__default.lazy(() => loader().then((m) => ({ default: m[name] })));
48670
+ const Lazy = React95__default.lazy(() => loader().then((m) => ({ default: m[name] })));
49274
48671
  function ThreeWrapper(props) {
49275
- return React97__default.createElement(
49276
- React97__default.Suspense,
48672
+ return React95__default.createElement(
48673
+ React95__default.Suspense,
49277
48674
  { fallback: null },
49278
- React97__default.createElement(Lazy, props)
48675
+ React95__default.createElement(Lazy, props)
49279
48676
  );
49280
48677
  }
49281
48678
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -49295,7 +48692,6 @@ var init_component_registry_generated = __esm({
49295
48692
  init_AnimatedReveal();
49296
48693
  init_ArticleSection();
49297
48694
  init_Aside();
49298
- init_AssetPicker();
49299
48695
  init_AuthLayout();
49300
48696
  init_BattleBoard();
49301
48697
  init_BattleTemplate();
@@ -49395,13 +48791,11 @@ var init_component_registry_generated = __esm({
49395
48791
  init_GradientDivider();
49396
48792
  init_GraphCanvas();
49397
48793
  init_GraphView();
49398
- init_GridPicker();
49399
48794
  init_Header();
49400
48795
  init_HealthBar();
49401
48796
  init_HealthPanel();
49402
48797
  init_HeroOrganism();
49403
48798
  init_HeroSection();
49404
- init_IconPicker();
49405
48799
  init_InfiniteScrollSentinel();
49406
48800
  init_InputGroup();
49407
48801
  init_InstallBox();
@@ -49446,7 +48840,6 @@ var init_component_registry_generated = __esm({
49446
48840
  init_PricingOrganism();
49447
48841
  init_PricingPageTemplate();
49448
48842
  init_ProgressDots();
49449
- init_PropertyInspector();
49450
48843
  init_PullQuote();
49451
48844
  init_PullToRefresh();
49452
48845
  init_QrScanner();
@@ -49570,7 +48963,6 @@ var init_component_registry_generated = __esm({
49570
48963
  "AnimatedReveal": AnimatedReveal,
49571
48964
  "ArticleSection": ArticleSection,
49572
48965
  "Aside": Aside,
49573
- "AssetPicker": AssetPicker,
49574
48966
  "AuthLayout": AuthLayout,
49575
48967
  "Avatar": AvatarPattern,
49576
48968
  "AvatarPattern": AvatarPattern,
@@ -49690,7 +49082,6 @@ var init_component_registry_generated = __esm({
49690
49082
  "GraphView": GraphView,
49691
49083
  "Grid": GridPattern,
49692
49084
  "GridPattern": GridPattern,
49693
- "GridPicker": GridPicker,
49694
49085
  "HStack": HStackPattern,
49695
49086
  "HStackPattern": HStackPattern,
49696
49087
  "Header": Header,
@@ -49700,7 +49091,6 @@ var init_component_registry_generated = __esm({
49700
49091
  "HeroSection": HeroSection,
49701
49092
  "Icon": IconPattern,
49702
49093
  "IconPattern": IconPattern,
49703
- "IconPicker": IconPicker,
49704
49094
  "InfiniteScrollSentinel": InfiniteScrollSentinel,
49705
49095
  "Input": InputPattern,
49706
49096
  "InputGroup": InputGroup,
@@ -49757,7 +49147,6 @@ var init_component_registry_generated = __esm({
49757
49147
  "ProgressBar": ProgressBarPattern,
49758
49148
  "ProgressBarPattern": ProgressBarPattern,
49759
49149
  "ProgressDots": ProgressDots,
49760
- "PropertyInspector": PropertyInspector,
49761
49150
  "PullQuote": PullQuote,
49762
49151
  "PullToRefresh": PullToRefresh,
49763
49152
  "QrScanner": QrScanner,
@@ -49899,7 +49288,7 @@ function SuspenseConfigProvider({
49899
49288
  config,
49900
49289
  children
49901
49290
  }) {
49902
- return React97__default.createElement(
49291
+ return React95__default.createElement(
49903
49292
  SuspenseConfigContext.Provider,
49904
49293
  { value: config },
49905
49294
  children
@@ -50389,7 +49778,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
50389
49778
  const key = `${parentId}-${index}-trait:${traitName}`;
50390
49779
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
50391
49780
  }
50392
- return /* @__PURE__ */ jsx(React97__default.Fragment, { children: child }, `${parentId}-${index}`);
49781
+ return /* @__PURE__ */ jsx(React95__default.Fragment, { children: child }, `${parentId}-${index}`);
50393
49782
  }
50394
49783
  if (!child || typeof child !== "object") return null;
50395
49784
  const childId = `${parentId}-${index}`;
@@ -50429,14 +49818,14 @@ function isPatternConfig(value) {
50429
49818
  if (value === null || value === void 0) return false;
50430
49819
  if (typeof value !== "object") return false;
50431
49820
  if (Array.isArray(value)) return false;
50432
- if (React97__default.isValidElement(value)) return false;
49821
+ if (React95__default.isValidElement(value)) return false;
50433
49822
  if (value instanceof Date) return false;
50434
49823
  if (typeof value === "function") return false;
50435
49824
  const record = value;
50436
49825
  return "type" in record && typeof record.type === "string";
50437
49826
  }
50438
49827
  function isPlainConfigObject(value) {
50439
- if (React97__default.isValidElement(value)) return false;
49828
+ if (React95__default.isValidElement(value)) return false;
50440
49829
  if (value instanceof Date) return false;
50441
49830
  const proto = Object.getPrototypeOf(value);
50442
49831
  return proto === Object.prototype || proto === null;
@@ -50925,7 +50314,7 @@ var AvlTransition = ({
50925
50314
  opacity = 1,
50926
50315
  className
50927
50316
  }) => {
50928
- const ids = React97__default.useMemo(() => {
50317
+ const ids = React95__default.useMemo(() => {
50929
50318
  avlTransitionId += 1;
50930
50319
  return { arrow: `avl-tr-${avlTransitionId}-arrow` };
50931
50320
  }, []);
@@ -51486,7 +50875,7 @@ var AvlStateMachine = ({
51486
50875
  color = "var(--color-primary)",
51487
50876
  animated = false
51488
50877
  }) => {
51489
- const ids = React97__default.useMemo(() => {
50878
+ const ids = React95__default.useMemo(() => {
51490
50879
  avlSmId += 1;
51491
50880
  const base = `avl-sm-${avlSmId}`;
51492
50881
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -51685,7 +51074,7 @@ var AvlOrbitalUnit = ({
51685
51074
  color = "var(--color-primary)",
51686
51075
  animated = false
51687
51076
  }) => {
51688
- const ids = React97__default.useMemo(() => {
51077
+ const ids = React95__default.useMemo(() => {
51689
51078
  avlOuId += 1;
51690
51079
  const base = `avl-ou-${avlOuId}`;
51691
51080
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -51781,7 +51170,7 @@ var AvlClosedCircuit = ({
51781
51170
  color = "var(--color-primary)",
51782
51171
  animated = false
51783
51172
  }) => {
51784
- const ids = React97__default.useMemo(() => {
51173
+ const ids = React95__default.useMemo(() => {
51785
51174
  avlCcId += 1;
51786
51175
  const base = `avl-cc-${avlCcId}`;
51787
51176
  return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
@@ -51936,7 +51325,7 @@ var AvlEmitListen = ({
51936
51325
  color = "var(--color-primary)",
51937
51326
  animated = false
51938
51327
  }) => {
51939
- const ids = React97__default.useMemo(() => {
51328
+ const ids = React95__default.useMemo(() => {
51940
51329
  avlElId += 1;
51941
51330
  const base = `avl-el-${avlElId}`;
51942
51331
  return { arrow: `${base}-arrow`, grad: `${base}-grad` };
@@ -52210,7 +51599,7 @@ function renderNode(node, color, glowId) {
52210
51599
  const baseR = node.type === "operator" ? 20 : 16;
52211
51600
  const r2 = Math.max(baseR, labelLen * 3.5 + 6);
52212
51601
  const nc = nodeColor(node.type, color);
52213
- return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
51602
+ return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
52214
51603
  node.children.map((child, i) => {
52215
51604
  const childR = Math.max(
52216
51605
  child.type === "operator" ? 20 : 16,
@@ -52267,7 +51656,7 @@ var AvlExprTree = ({
52267
51656
  className,
52268
51657
  color = "var(--color-primary)"
52269
51658
  }) => {
52270
- const ids = React97__default.useMemo(() => {
51659
+ const ids = React95__default.useMemo(() => {
52271
51660
  avlEtId += 1;
52272
51661
  return { glow: `avl-et-${avlEtId}-glow` };
52273
51662
  }, []);
@@ -53091,7 +52480,7 @@ var SystemNode = ({ data }) => {
53091
52480
  stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
53092
52481
  const tc = transitionCounts[s.name] ?? 0;
53093
52482
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
53094
- return /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
52483
+ return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
53095
52484
  /* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
53096
52485
  i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
53097
52486
  ] }, s.name);
@@ -54243,7 +53632,7 @@ function resolveLambdaBindings(body, params, item, index) {
54243
53632
  if (Array.isArray(body)) {
54244
53633
  return body.map((b) => recur(b));
54245
53634
  }
54246
- if (body !== null && typeof body === "object" && !React97__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
53635
+ if (body !== null && typeof body === "object" && !React95__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
54247
53636
  const out = {};
54248
53637
  for (const [k, v] of Object.entries(body)) {
54249
53638
  out[k] = recur(v);
@@ -54262,7 +53651,7 @@ function getSlotContentRenderer2() {
54262
53651
  function makeLambdaFn(params, lambdaBody, callerKey) {
54263
53652
  return (item, index) => {
54264
53653
  const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
54265
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React97__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
53654
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React95__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
54266
53655
  return null;
54267
53656
  }
54268
53657
  const record = resolvedBody;
@@ -54281,7 +53670,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
54281
53670
  props: childProps,
54282
53671
  priority: 0
54283
53672
  };
54284
- return React97__default.createElement(SlotContentRenderer2, { content: childContent });
53673
+ return React95__default.createElement(SlotContentRenderer2, { content: childContent });
54285
53674
  };
54286
53675
  }
54287
53676
  function convertNode(node, callerKey) {
@@ -54300,7 +53689,7 @@ function convertNode(node, callerKey) {
54300
53689
  });
54301
53690
  return anyChanged ? mapped : node;
54302
53691
  }
54303
- if (typeof node === "object" && !React97__default.isValidElement(node) && !(node instanceof Date)) {
53692
+ if (typeof node === "object" && !React95__default.isValidElement(node) && !(node instanceof Date)) {
54304
53693
  return convertObjectProps(node);
54305
53694
  }
54306
53695
  return node;
@@ -56313,8 +55702,8 @@ function CanvasDndProvider({
56313
55702
  }) {
56314
55703
  const eventBus = useEventBus();
56315
55704
  const sensors = useAlmadarDndSensors(false);
56316
- const [activePayload, setActivePayload] = React97__default.useState(null);
56317
- const handleDragStart = React97__default.useCallback((e) => {
55705
+ const [activePayload, setActivePayload] = React95__default.useState(null);
55706
+ const handleDragStart = React95__default.useCallback((e) => {
56318
55707
  const data = e.active.data.current;
56319
55708
  const payload = data?.payload;
56320
55709
  if (payload) {
@@ -56325,7 +55714,7 @@ function CanvasDndProvider({
56325
55714
  log11.warn("dragStart:missing-payload", { id: e.active.id });
56326
55715
  }
56327
55716
  }, [eventBus]);
56328
- const handleDragEnd = React97__default.useCallback((e) => {
55717
+ const handleDragEnd = React95__default.useCallback((e) => {
56329
55718
  setActivePayload(null);
56330
55719
  const activeData = e.active.data.current;
56331
55720
  const payload = activeData?.payload;
@@ -56354,7 +55743,7 @@ function CanvasDndProvider({
56354
55743
  const suppressed = onDrop ? onDrop(drop) === true : false;
56355
55744
  if (!suppressed) defaultEmit(eventBus, drop);
56356
55745
  }, [eventBus, onDrop]);
56357
- const handleDragCancel = React97__default.useCallback(() => {
55746
+ const handleDragCancel = React95__default.useCallback(() => {
56358
55747
  setActivePayload(null);
56359
55748
  log11.info("dragCancel");
56360
55749
  }, []);
@@ -57108,7 +56497,7 @@ var OrbPreviewNodeInner = (props) => {
57108
56497
  }
57109
56498
  );
57110
56499
  };
57111
- var OrbPreviewNode = React97__default.memo(OrbPreviewNodeInner);
56500
+ var OrbPreviewNode = React95__default.memo(OrbPreviewNodeInner);
57112
56501
  OrbPreviewNode.displayName = "OrbPreviewNode";
57113
56502
  orbPreviewLog.debug("export-resolved", () => ({
57114
56503
  type: typeof OrbPreviewNode,
@@ -57213,7 +56602,7 @@ var EventFlowEdgeInner = (props) => {
57213
56602
  ) })
57214
56603
  ] });
57215
56604
  };
57216
- var EventFlowEdge = React97__default.memo(EventFlowEdgeInner);
56605
+ var EventFlowEdge = React95__default.memo(EventFlowEdgeInner);
57217
56606
  EventFlowEdge.displayName = "EventFlowEdge";
57218
56607
 
57219
56608
  // components/avl/molecules/BehaviorComposeNode.tsx
@@ -57360,7 +56749,7 @@ var BehaviorComposeNodeInner = (props) => {
57360
56749
  }
57361
56750
  );
57362
56751
  };
57363
- var BehaviorComposeNode = React97__default.memo(BehaviorComposeNodeInner);
56752
+ var BehaviorComposeNode = React95__default.memo(BehaviorComposeNodeInner);
57364
56753
  BehaviorComposeNode.displayName = "BehaviorComposeNode";
57365
56754
 
57366
56755
  // components/avl/molecules/avl-behavior-compose-converter.ts
@@ -57756,8 +57145,8 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
57756
57145
  const explicitValue = patternConfig ? patternConfig[propName] : void 0;
57757
57146
  const defaultValue = ps.default;
57758
57147
  const isImplicit = explicitValue === void 0 && defaultValue !== void 0;
57759
- const currentValue2 = explicitValue !== void 0 ? explicitValue : defaultValue;
57760
- const displayValue = currentValue2 !== void 0 ? typeof currentValue2 === "object" ? JSON.stringify(currentValue2) : String(currentValue2) : "";
57148
+ const currentValue = explicitValue !== void 0 ? explicitValue : defaultValue;
57149
+ const displayValue = currentValue !== void 0 ? typeof currentValue === "object" ? JSON.stringify(currentValue) : String(currentValue) : "";
57761
57150
  inspectorLog.debug("prop-row", () => ({
57762
57151
  patternType: patternDef.type,
57763
57152
  patternId: selectedPattern?.patternId ?? "",
@@ -58372,7 +57761,7 @@ var TraitCardNodeInner = (props) => {
58372
57761
  }
58373
57762
  );
58374
57763
  };
58375
- var TraitCardNode = React97__default.memo(TraitCardNodeInner);
57764
+ var TraitCardNode = React95__default.memo(TraitCardNodeInner);
58376
57765
  TraitCardNode.displayName = "TraitCardNode";
58377
57766
 
58378
57767
  // components/avl/organisms/FlowCanvas.tsx
@@ -58445,7 +57834,7 @@ function FlowCanvasInner({
58445
57834
  initialOrbital
58446
57835
  );
58447
57836
  const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
58448
- const screenSizeUserOverrideRef = React97__default.useRef(false);
57837
+ const screenSizeUserOverrideRef = React95__default.useRef(false);
58449
57838
  const [screenSize, setScreenSize] = useState(
58450
57839
  () => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
58451
57840
  );
@@ -58829,7 +58218,7 @@ var ZoomBreadcrumb = ({
58829
58218
  if (eventName && band === "detail") {
58830
58219
  segments.push({ icon: "\u26A1", label: eventName });
58831
58220
  }
58832
- return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
58221
+ return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
58833
58222
  i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
58834
58223
  /* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
58835
58224
  /* @__PURE__ */ jsx("span", { children: seg.label })
@@ -59170,7 +58559,7 @@ var EventWireOverlay = ({
59170
58559
  containerW,
59171
58560
  containerH
59172
58561
  }) => {
59173
- const ids = React97__default.useMemo(() => {
58562
+ const ids = React95__default.useMemo(() => {
59174
58563
  avlOczWireId += 1;
59175
58564
  return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
59176
58565
  }, []);
@@ -59537,7 +58926,7 @@ var AvlOrbitalsCosmicZoom = ({
59537
58926
  borderRadius: 6,
59538
58927
  border: `1px solid ${color}`
59539
58928
  },
59540
- children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React97__default.Fragment, { children: [
58929
+ children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
59541
58930
  i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
59542
58931
  i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
59543
58932
  Box,