@almadar/ui 4.25.0 → 4.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import * as React113 from 'react';
2
- import React113__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
1
+ import * as React104 from 'react';
2
+ import React104__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
3
3
  import { EventBusContext, useTraitScope, OrbitalProvider, TraitScopeProvider, VerificationProvider } from '@almadar/ui/providers';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { clsx } from 'clsx';
@@ -8,7 +8,6 @@ import * as LucideIcons from 'lucide-react';
8
8
  import { X, AlertTriangle, Info, AlertCircle, CheckCircle, Loader2, List, Printer, ChevronRight, ChevronLeft, Check, Copy, Code, FileText, WrapText, Trash2, Menu as Menu$1, Search, Bell, ChevronDown, LogOut, ZoomOut, ZoomIn, Download, FileQuestion, Inbox, XCircle, Filter, Plus, Pause, Play, RotateCcw, Package, Calendar, Pencil, Eye, MoreHorizontal, Image as Image$1, Upload, Minus, ArrowLeft, HelpCircle, ChevronUp, Eraser, Star, TrendingUp, TrendingDown, ArrowUp, ArrowDown, MoreVertical, Sun, Moon, Circle, Clock, CheckCircle2, ArrowRight, FileWarning, SkipForward, Bug, Send, Wrench, User, Tag, DollarSign, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
9
9
  import { evaluate, createMinimalContext } from '@almadar/evaluator';
10
10
  import { useUISlots, UISlotProvider } from '@almadar/ui/context';
11
- import { getPatternDefinition, getComponentForPattern as getComponentForPattern$1 } from '@almadar/patterns';
12
11
  import { createPortal } from 'react-dom';
13
12
  import { Link, Outlet, useLocation } from 'react-router-dom';
14
13
  import ReactMarkdown from 'react-markdown';
@@ -35,7 +34,7 @@ import langToml from 'react-syntax-highlighter/dist/esm/languages/prism/toml.js'
35
34
  import langGo from 'react-syntax-highlighter/dist/esm/languages/prism/go.js';
36
35
  import langGraphql from 'react-syntax-highlighter/dist/esm/languages/prism/graphql.js';
37
36
  import { isCircuitEvent, schemaToIR, getPage, clearSchemaCache as clearSchemaCache$1, isEntityCall, isInlineTrait } from '@almadar/core';
38
- import '@tanstack/react-query';
37
+ import { getPatternDefinition, getComponentForPattern as getComponentForPattern$1 } from '@almadar/patterns';
39
38
  import { StateMachineManager, createContextFromBindings, interpolateValue, collectDeclaredConfigDefaults, createServerEffectHandlers, EffectExecutor, InMemoryPersistence } from '@almadar/runtime';
40
39
  import { OrbitalServerRuntime } from '@almadar/runtime/OrbitalServerRuntime';
41
40
 
@@ -1016,7 +1015,7 @@ var init_Box = __esm({
1016
1015
  fixed: "fixed",
1017
1016
  sticky: "sticky"
1018
1017
  };
1019
- Box = React113__default.forwardRef(
1018
+ Box = React104__default.forwardRef(
1020
1019
  ({
1021
1020
  padding,
1022
1021
  paddingX,
@@ -1715,7 +1714,7 @@ function resolveIconProp(value, sizeClass) {
1715
1714
  const IconComp = value;
1716
1715
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1717
1716
  }
1718
- if (React113__default.isValidElement(value)) {
1717
+ if (React104__default.isValidElement(value)) {
1719
1718
  return value;
1720
1719
  }
1721
1720
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -1791,7 +1790,7 @@ var init_Button = __esm({
1791
1790
  md: "h-4 w-4",
1792
1791
  lg: "h-5 w-5"
1793
1792
  };
1794
- Button = React113__default.forwardRef(
1793
+ Button = React104__default.forwardRef(
1795
1794
  ({
1796
1795
  className,
1797
1796
  variant = "primary",
@@ -1894,7 +1893,7 @@ var init_Badge = __esm({
1894
1893
  md: "px-2.5 py-1 text-sm",
1895
1894
  lg: "px-3 py-1.5 text-base"
1896
1895
  };
1897
- Badge = React113__default.forwardRef(
1896
+ Badge = React104__default.forwardRef(
1898
1897
  ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
1899
1898
  const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
1900
1899
  const resolvedIcon = typeof icon === "string" ? (() => {
@@ -2041,11 +2040,11 @@ function refId(obj) {
2041
2040
  refIds.set(obj, id);
2042
2041
  return id;
2043
2042
  }
2044
- var slotLog2, refIds, nextRefId;
2043
+ var slotLog, refIds, nextRefId;
2045
2044
  var init_slot_types = __esm({
2046
2045
  "runtime/ui/slot-types.ts"() {
2047
2046
  init_logger();
2048
- slotLog2 = createLogger("almadar:ui:slot-render");
2047
+ slotLog = createLogger("almadar:ui:slot-render");
2049
2048
  refIds = /* @__PURE__ */ new WeakMap();
2050
2049
  nextRefId = 1;
2051
2050
  }
@@ -2054,7 +2053,7 @@ var Input;
2054
2053
  var init_Input = __esm({
2055
2054
  "components/atoms/Input.tsx"() {
2056
2055
  init_cn();
2057
- Input = React113__default.forwardRef(
2056
+ Input = React104__default.forwardRef(
2058
2057
  ({
2059
2058
  className,
2060
2059
  inputType,
@@ -2172,7 +2171,7 @@ var Label;
2172
2171
  var init_Label = __esm({
2173
2172
  "components/atoms/Label.tsx"() {
2174
2173
  init_cn();
2175
- Label = React113__default.forwardRef(
2174
+ Label = React104__default.forwardRef(
2176
2175
  ({ className, required, children, ...props }, ref) => {
2177
2176
  return /* @__PURE__ */ jsxs(
2178
2177
  "label",
@@ -2198,7 +2197,7 @@ var Textarea;
2198
2197
  var init_Textarea = __esm({
2199
2198
  "components/atoms/Textarea.tsx"() {
2200
2199
  init_cn();
2201
- Textarea = React113__default.forwardRef(
2200
+ Textarea = React104__default.forwardRef(
2202
2201
  ({ className, error, ...props }, ref) => {
2203
2202
  return /* @__PURE__ */ jsx(
2204
2203
  "textarea",
@@ -2227,7 +2226,7 @@ var Select;
2227
2226
  var init_Select = __esm({
2228
2227
  "components/atoms/Select.tsx"() {
2229
2228
  init_cn();
2230
- Select = React113__default.forwardRef(
2229
+ Select = React104__default.forwardRef(
2231
2230
  ({ className, options, placeholder, error, ...props }, ref) => {
2232
2231
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2233
2232
  /* @__PURE__ */ jsxs(
@@ -2269,7 +2268,7 @@ var Checkbox;
2269
2268
  var init_Checkbox = __esm({
2270
2269
  "components/atoms/Checkbox.tsx"() {
2271
2270
  init_cn();
2272
- Checkbox = React113__default.forwardRef(
2271
+ Checkbox = React104__default.forwardRef(
2273
2272
  ({ className, label, id, ...props }, ref) => {
2274
2273
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
2275
2274
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -2351,7 +2350,7 @@ var init_Card = __esm({
2351
2350
  md: "shadow",
2352
2351
  lg: "shadow-lg"
2353
2352
  };
2354
- Card = React113__default.forwardRef(
2353
+ Card = React104__default.forwardRef(
2355
2354
  ({
2356
2355
  className,
2357
2356
  variant = "bordered",
@@ -2387,9 +2386,9 @@ var init_Card = __esm({
2387
2386
  }
2388
2387
  );
2389
2388
  Card.displayName = "Card";
2390
- CardHeader = React113__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2389
+ CardHeader = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2391
2390
  CardHeader.displayName = "CardHeader";
2392
- CardTitle = React113__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2391
+ CardTitle = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2393
2392
  "h3",
2394
2393
  {
2395
2394
  ref,
@@ -2402,11 +2401,11 @@ var init_Card = __esm({
2402
2401
  }
2403
2402
  ));
2404
2403
  CardTitle.displayName = "CardTitle";
2405
- CardContent = React113__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2404
+ CardContent = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2406
2405
  CardContent.displayName = "CardContent";
2407
2406
  CardBody = CardContent;
2408
2407
  CardBody.displayName = "CardBody";
2409
- CardFooter = React113__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2408
+ CardFooter = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2410
2409
  "div",
2411
2410
  {
2412
2411
  ref,
@@ -2427,7 +2426,7 @@ var init_Spinner = __esm({
2427
2426
  md: "h-6 w-6",
2428
2427
  lg: "h-8 w-8"
2429
2428
  };
2430
- Spinner = React113__default.forwardRef(
2429
+ Spinner = React104__default.forwardRef(
2431
2430
  ({ className, size = "md", ...props }, ref) => {
2432
2431
  return /* @__PURE__ */ jsx(
2433
2432
  "div",
@@ -2875,7 +2874,7 @@ var Radio;
2875
2874
  var init_Radio = __esm({
2876
2875
  "components/atoms/Radio.tsx"() {
2877
2876
  init_cn();
2878
- Radio = React113__default.forwardRef(
2877
+ Radio = React104__default.forwardRef(
2879
2878
  ({
2880
2879
  label,
2881
2880
  helperText,
@@ -2889,7 +2888,7 @@ var init_Radio = __esm({
2889
2888
  }, ref) => {
2890
2889
  const radioId = id || `radio-${Math.random().toString(36).substr(2, 9)}`;
2891
2890
  const hasError = !!error;
2892
- const sizeClasses6 = {
2891
+ const sizeClasses5 = {
2893
2892
  sm: "w-4 h-4",
2894
2893
  md: "w-5 h-5",
2895
2894
  lg: "w-6 h-6"
@@ -2923,7 +2922,7 @@ var init_Radio = __esm({
2923
2922
  className: cn(
2924
2923
  "flex items-center justify-center",
2925
2924
  "border-[length:var(--border-width)] transition-all cursor-pointer",
2926
- sizeClasses6[size],
2925
+ sizeClasses5[size],
2927
2926
  hasError ? "border-error peer-focus:ring-error/20" : "border-border peer-focus:ring-ring/20",
2928
2927
  checked ? hasError ? "border-error" : "border-primary bg-primary" : "",
2929
2928
  "peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2",
@@ -2986,7 +2985,7 @@ var init_Switch = __esm({
2986
2985
  "components/atoms/Switch.tsx"() {
2987
2986
  "use client";
2988
2987
  init_cn();
2989
- Switch = React113.forwardRef(
2988
+ Switch = React104.forwardRef(
2990
2989
  ({
2991
2990
  checked,
2992
2991
  defaultChecked = false,
@@ -2997,10 +2996,10 @@ var init_Switch = __esm({
2997
2996
  name,
2998
2997
  className
2999
2998
  }, ref) => {
3000
- const [isChecked, setIsChecked] = React113.useState(
2999
+ const [isChecked, setIsChecked] = React104.useState(
3001
3000
  checked !== void 0 ? checked : defaultChecked
3002
3001
  );
3003
- React113.useEffect(() => {
3002
+ React104.useEffect(() => {
3004
3003
  if (checked !== void 0) {
3005
3004
  setIsChecked(checked);
3006
3005
  }
@@ -3439,12 +3438,6 @@ var init_ThemeToggle = __esm({
3439
3438
  ThemeToggle.displayName = "ThemeToggle";
3440
3439
  }
3441
3440
  });
3442
- var init_ThemeSelector = __esm({
3443
- "components/atoms/ThemeSelector.tsx"() {
3444
- "use client";
3445
- init_ThemeContext();
3446
- }
3447
- });
3448
3441
  var FlipContainer;
3449
3442
  var init_FlipContainer = __esm({
3450
3443
  "components/atoms/FlipContainer.tsx"() {
@@ -3551,8 +3544,8 @@ var init_LawReferenceTooltip = __esm({
3551
3544
  position = "top",
3552
3545
  className
3553
3546
  }) => {
3554
- const [isVisible, setIsVisible] = React113__default.useState(false);
3555
- const timeoutRef = React113__default.useRef(null);
3547
+ const [isVisible, setIsVisible] = React104__default.useState(false);
3548
+ const timeoutRef = React104__default.useRef(null);
3556
3549
  const handleMouseEnter = () => {
3557
3550
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
3558
3551
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -3561,7 +3554,7 @@ var init_LawReferenceTooltip = __esm({
3561
3554
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
3562
3555
  setIsVisible(false);
3563
3556
  };
3564
- React113__default.useEffect(() => {
3557
+ React104__default.useEffect(() => {
3565
3558
  return () => {
3566
3559
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
3567
3560
  };
@@ -3771,7 +3764,7 @@ var init_StatusDot = __esm({
3771
3764
  md: "w-2.5 h-2.5",
3772
3765
  lg: "w-3 h-3"
3773
3766
  };
3774
- StatusDot = React113__default.forwardRef(
3767
+ StatusDot = React104__default.forwardRef(
3775
3768
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
3776
3769
  return /* @__PURE__ */ jsx(
3777
3770
  "span",
@@ -3824,7 +3817,7 @@ var init_TrendIndicator = __esm({
3824
3817
  down: TrendingDown,
3825
3818
  flat: ArrowRight
3826
3819
  };
3827
- TrendIndicator = React113__default.forwardRef(
3820
+ TrendIndicator = React104__default.forwardRef(
3828
3821
  ({
3829
3822
  className,
3830
3823
  value,
@@ -3891,7 +3884,7 @@ var init_RangeSlider = __esm({
3891
3884
  md: "w-4 h-4",
3892
3885
  lg: "w-5 h-5"
3893
3886
  };
3894
- RangeSlider = React113__default.forwardRef(
3887
+ RangeSlider = React104__default.forwardRef(
3895
3888
  ({
3896
3889
  className,
3897
3890
  min = 0,
@@ -4365,899 +4358,6 @@ var init_TypewriterText = __esm({
4365
4358
  TypewriterText.displayName = "TypewriterText";
4366
4359
  }
4367
4360
  });
4368
- var levelToVariant, alignClasses, alignToStack, SectionHeader;
4369
- var init_SectionHeader = __esm({
4370
- "components/atoms/SectionHeader.tsx"() {
4371
- init_cn();
4372
- init_Stack();
4373
- init_Typography();
4374
- levelToVariant = {
4375
- 1: "h1",
4376
- 2: "h2",
4377
- 3: "h3"
4378
- };
4379
- alignClasses = {
4380
- center: "text-center",
4381
- left: "text-left",
4382
- right: "text-right"
4383
- };
4384
- alignToStack = {
4385
- center: "center",
4386
- left: "start",
4387
- right: "end"
4388
- };
4389
- SectionHeader = ({ title, subtitle, align = "center", level = 2, className }) => {
4390
- const variant = levelToVariant[level];
4391
- return /* @__PURE__ */ jsxs(
4392
- VStack,
4393
- {
4394
- gap: "sm",
4395
- align: alignToStack[align],
4396
- className: cn(alignClasses[align], className),
4397
- children: [
4398
- /* @__PURE__ */ jsx(Typography, { variant, weight: "bold", children: title }),
4399
- subtitle ? /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: subtitle }) : null
4400
- ]
4401
- }
4402
- );
4403
- };
4404
- SectionHeader.displayName = "SectionHeader";
4405
- }
4406
- });
4407
- var sizeClasses5, MarketingStatCard;
4408
- var init_StatCard = __esm({
4409
- "components/atoms/StatCard.tsx"() {
4410
- init_cn();
4411
- init_Stack();
4412
- init_Typography();
4413
- sizeClasses5 = {
4414
- sm: "text-2xl",
4415
- md: "text-4xl",
4416
- lg: "text-5xl"
4417
- };
4418
- MarketingStatCard = ({ value, label, size = "md", className }) => {
4419
- return /* @__PURE__ */ jsxs(VStack, { gap: "xs", align: "center", className: cn(className), children: [
4420
- /* @__PURE__ */ jsx(
4421
- Typography,
4422
- {
4423
- weight: "bold",
4424
- color: "primary",
4425
- className: cn(sizeClasses5[size]),
4426
- children: value
4427
- }
4428
- ),
4429
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: label })
4430
- ] });
4431
- };
4432
- MarketingStatCard.displayName = "MarketingStatCard";
4433
- }
4434
- });
4435
- var backgroundClasses, paddingClasses, ContentSection;
4436
- var init_ContentSection = __esm({
4437
- "components/atoms/ContentSection.tsx"() {
4438
- init_cn();
4439
- init_Box();
4440
- backgroundClasses = {
4441
- default: "",
4442
- alt: "bg-surface",
4443
- dark: "bg-foreground text-background",
4444
- gradient: [
4445
- "bg-gradient-to-b",
4446
- "from-[var(--color-primary)]/5",
4447
- "to-[var(--color-secondary)]/5"
4448
- ].join(" ")
4449
- };
4450
- paddingClasses = {
4451
- sm: "py-12",
4452
- md: "py-16",
4453
- lg: "py-24"
4454
- };
4455
- ContentSection = React113__default.forwardRef(
4456
- ({ children, background = "default", padding = "lg", id, className }, ref) => {
4457
- return /* @__PURE__ */ jsx(
4458
- Box,
4459
- {
4460
- ref,
4461
- as: "section",
4462
- id,
4463
- className: cn(
4464
- backgroundClasses[background],
4465
- paddingClasses[padding],
4466
- className
4467
- ),
4468
- children: /* @__PURE__ */ jsx(Box, { className: "mx-auto max-w-7xl px-4 sm:px-6 lg:px-8", children })
4469
- }
4470
- );
4471
- }
4472
- );
4473
- ContentSection.displayName = "ContentSection";
4474
- }
4475
- });
4476
- function lineIntersection(x1, y1, x2, y2, x3, y3, x4, y4) {
4477
- const denom = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
4478
- if (Math.abs(denom) < 1e-10) return [(x1 + x3) / 2, (y1 + y3) / 2];
4479
- const t = ((x1 - x3) * (y3 - y4) - (y1 - y3) * (x3 - x4)) / denom;
4480
- return [x1 + t * (x2 - x1), y1 + t * (y2 - y1)];
4481
- }
4482
- function f(n) {
4483
- return n.toFixed(3);
4484
- }
4485
- function picStar(cx, cy, R, n, theta, extent) {
4486
- const verts = [];
4487
- for (let k = 0; k < n; k++) {
4488
- const angle = PI / n + k * (2 * PI) / n;
4489
- verts.push([cx + R * Math.cos(angle), cy + R * Math.sin(angle)]);
4490
- }
4491
- const mids = [];
4492
- for (let k = 0; k < n; k++) {
4493
- const next = (k + 1) % n;
4494
- mids.push([(verts[k][0] + verts[next][0]) / 2, (verts[k][1] + verts[next][1]) / 2]);
4495
- }
4496
- const innerPts = [];
4497
- for (let k = 0; k < n; k++) {
4498
- const next = (k + 1) % n;
4499
- const M1 = mids[k];
4500
- const M2 = mids[next];
4501
- const edx1 = verts[(k + 1) % n][0] - verts[k][0];
4502
- const edy1 = verts[(k + 1) % n][1] - verts[k][1];
4503
- const elen1 = Math.sqrt(edx1 * edx1 + edy1 * edy1);
4504
- const tx1 = edx1 / elen1;
4505
- const ty1 = edy1 / elen1;
4506
- const r1x = tx1 * Math.cos(theta) + ty1 * Math.sin(theta);
4507
- const r1y = -tx1 * Math.sin(theta) + ty1 * Math.cos(theta);
4508
- const edx2 = verts[(next + 1) % n][0] - verts[next][0];
4509
- const edy2 = verts[(next + 1) % n][1] - verts[next][1];
4510
- const elen2 = Math.sqrt(edx2 * edx2 + edy2 * edy2);
4511
- const tx2 = edx2 / elen2;
4512
- const ty2 = edy2 / elen2;
4513
- const bTheta = PI - theta;
4514
- const r2x = tx2 * Math.cos(bTheta) + ty2 * Math.sin(bTheta);
4515
- const r2y = -tx2 * Math.sin(bTheta) + ty2 * Math.cos(bTheta);
4516
- const P = lineIntersection(
4517
- M1[0],
4518
- M1[1],
4519
- M1[0] + r1x * extent,
4520
- M1[1] + r1y * extent,
4521
- M2[0],
4522
- M2[1],
4523
- M2[0] + r2x * extent,
4524
- M2[1] + r2y * extent
4525
- );
4526
- innerPts.push(P);
4527
- }
4528
- const starPath = mids.map((m, k) => {
4529
- const inner = innerPts[k];
4530
- const nextMid = mids[(k + 1) % n];
4531
- return `M ${f(m[0])},${f(m[1])} L ${f(inner[0])},${f(inner[1])} L ${f(nextMid[0])},${f(nextMid[1])}`;
4532
- }).join(" ");
4533
- return { starPath, mids, verts };
4534
- }
4535
- function Star8({ size, color, strokeWidth }) {
4536
- const s = size;
4537
- const cx = s / 2;
4538
- const cy = s / 2;
4539
- const a = s / (1 + Math.SQRT2);
4540
- const R = a / (2 * Math.sin(PI / 8));
4541
- const theta = 67.5 * PI / 180;
4542
- const { starPath, mids } = picStar(cx, cy, R, 8, theta, s);
4543
- const corners = [[0, 0], [s, 0], [s, s], [0, s]];
4544
- const crossPaths = [];
4545
- for (const [cornX, cornY] of corners) {
4546
- const dists = mids.map((m, i) => ({ i, d: Math.hypot(m[0] - cornX, m[1] - cornY) }));
4547
- dists.sort((a2, b) => a2.d - b.d);
4548
- const m1 = mids[dists[0].i];
4549
- const m2 = mids[dists[1].i];
4550
- crossPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(cornX)},${f(cornY)} L ${f(m2[0])},${f(m2[1])}`);
4551
- }
4552
- return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4553
- /* @__PURE__ */ jsx("path", { d: starPath }),
4554
- crossPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i))
4555
- ] });
4556
- }
4557
- function Star6({ size, color, strokeWidth }) {
4558
- const w = size;
4559
- const h = size * (2 / Math.sqrt(3));
4560
- const cx = w / 2;
4561
- const cy = h / 2;
4562
- const a = w / Math.sqrt(3);
4563
- const R = a;
4564
- const theta = 60 * PI / 180;
4565
- const { starPath, mids, verts } = picStar(cx, cy, R, 6, theta, w);
4566
- const triPaths = [];
4567
- for (let k = 0; k < 6; k++) {
4568
- const v = verts[k];
4569
- const m1 = mids[(k + 5) % 6];
4570
- const m2 = mids[k];
4571
- triPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(v[0])},${f(v[1])} L ${f(m2[0])},${f(m2[1])}`);
4572
- }
4573
- return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4574
- /* @__PURE__ */ jsx("path", { d: starPath }),
4575
- triPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i))
4576
- ] });
4577
- }
4578
- function Khatam({ size, color, strokeWidth }) {
4579
- const s = size;
4580
- const cx = s / 2;
4581
- const cy = s / 2;
4582
- const a = s / (1 + Math.SQRT2);
4583
- const R = a / (2 * Math.sin(PI / 8));
4584
- const theta = 72 * PI / 180;
4585
- const { starPath, mids } = picStar(cx, cy, R, 8, theta, s);
4586
- const corners = [[0, 0], [s, 0], [s, s], [0, s]];
4587
- const crossPaths = [];
4588
- for (const [cornX, cornY] of corners) {
4589
- const dists = mids.map((m, i) => ({ i, d: Math.hypot(m[0] - cornX, m[1] - cornY) }));
4590
- dists.sort((a2, b) => a2.d - b.d);
4591
- const m1 = mids[dists[0].i];
4592
- const m2 = mids[dists[1].i];
4593
- crossPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(cornX)},${f(cornY)} L ${f(m2[0])},${f(m2[1])}`);
4594
- }
4595
- const orbitR = R * 0.35;
4596
- return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4597
- /* @__PURE__ */ jsx("path", { d: starPath }),
4598
- crossPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)),
4599
- /* @__PURE__ */ jsx("circle", { cx, cy, r: orbitR, opacity: "0.4" })
4600
- ] });
4601
- }
4602
- function RosetteDouble({ size, color, strokeWidth }) {
4603
- const s = size;
4604
- const cx = s / 2;
4605
- const cy = s / 2;
4606
- const a = s / (1 + Math.SQRT2);
4607
- const Router = a / (2 * Math.sin(PI / 8));
4608
- const Rinner = Router * 0.45;
4609
- const outer = picStar(cx, cy, Router, 8, 72 * PI / 180, s);
4610
- const inner = picStar(cx, cy, Rinner, 8, 68 * PI / 180, s);
4611
- const corners = [[0, 0], [s, 0], [s, s], [0, s]];
4612
- const crossPaths = [];
4613
- for (const [cornX, cornY] of corners) {
4614
- const dists = outer.mids.map((m, i) => ({ i, d: Math.hypot(m[0] - cornX, m[1] - cornY) }));
4615
- dists.sort((a2, b) => a2.d - b.d);
4616
- const m1 = outer.mids[dists[0].i];
4617
- const m2 = outer.mids[dists[1].i];
4618
- crossPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(cornX)},${f(cornY)} L ${f(m2[0])},${f(m2[1])}`);
4619
- }
4620
- const connectors = [];
4621
- for (let k = 0; k < 8; k++) {
4622
- const om = outer.mids[k];
4623
- const im = inner.mids[k];
4624
- connectors.push(`M ${f(im[0])},${f(im[1])} L ${f(om[0])},${f(om[1])}`);
4625
- }
4626
- return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4627
- /* @__PURE__ */ jsx("path", { d: outer.starPath }),
4628
- /* @__PURE__ */ jsx("path", { d: inner.starPath, opacity: "0.7" }),
4629
- crossPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, `c${i}`)),
4630
- connectors.map((d, i) => /* @__PURE__ */ jsx("path", { d, opacity: "0.4" }, `n${i}`))
4631
- ] });
4632
- }
4633
- function RosetteFilled({ size, color, strokeWidth }) {
4634
- const s = size;
4635
- const cx = s / 2;
4636
- const cy = s / 2;
4637
- const a = s / (1 + Math.SQRT2);
4638
- const Router = a / (2 * Math.sin(PI / 8));
4639
- const theta = 72 * PI / 180;
4640
- const outer = picStar(cx, cy, Router, 8, theta, s);
4641
- const Rinner = Router * 0.35;
4642
- const inner6 = picStar(cx, cy, Rinner, 6, 60 * PI / 180, s);
4643
- const corners = [[0, 0], [s, 0], [s, s], [0, s]];
4644
- const crossPaths = [];
4645
- for (const [cornX, cornY] of corners) {
4646
- const dists = outer.mids.map((m, i) => ({ i, d: Math.hypot(m[0] - cornX, m[1] - cornY) }));
4647
- dists.sort((a2, b) => a2.d - b.d);
4648
- const m1 = outer.mids[dists[0].i];
4649
- const m2 = outer.mids[dists[1].i];
4650
- crossPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(cornX)},${f(cornY)} L ${f(m2[0])},${f(m2[1])}`);
4651
- }
4652
- const triPaths = [];
4653
- for (let k = 0; k < 6; k++) {
4654
- const v = inner6.verts[k];
4655
- const m1 = inner6.mids[(k + 5) % 6];
4656
- const m2 = inner6.mids[k];
4657
- triPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(v[0])},${f(v[1])} L ${f(m2[0])},${f(m2[1])}`);
4658
- }
4659
- const orbitR = Router * 0.35;
4660
- return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4661
- /* @__PURE__ */ jsx("path", { d: outer.starPath }),
4662
- crossPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, `c${i}`)),
4663
- /* @__PURE__ */ jsx("circle", { cx, cy, r: orbitR, opacity: "0.3" }),
4664
- /* @__PURE__ */ jsx("path", { d: inner6.starPath, opacity: "0.6" }),
4665
- triPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d, opacity: "0.5" }, `t${i}`))
4666
- ] });
4667
- }
4668
- function Star10({ size, color, strokeWidth }) {
4669
- const s = size;
4670
- const cx = s / 2;
4671
- const cy = s / 2;
4672
- const R = s * 0.42;
4673
- const theta = 72 * PI / 180;
4674
- const { starPath, mids, verts } = picStar(cx, cy, R, 10, theta, s);
4675
- const edgePaths = [];
4676
- for (let k = 0; k < 10; k++) {
4677
- const v = verts[k];
4678
- const m1 = mids[(k + 9) % 10];
4679
- const m2 = mids[k];
4680
- edgePaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(v[0])},${f(v[1])} L ${f(m2[0])},${f(m2[1])}`);
4681
- }
4682
- return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4683
- /* @__PURE__ */ jsx("path", { d: starPath }),
4684
- edgePaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i))
4685
- ] });
4686
- }
4687
- function Star12({ size, color, strokeWidth }) {
4688
- const s = size;
4689
- const cx = s / 2;
4690
- const cy = s / 2;
4691
- const R = s * 0.44;
4692
- const theta = 75 * PI / 180;
4693
- const { starPath, mids, verts } = picStar(cx, cy, R, 12, theta, s);
4694
- const triPaths = [];
4695
- for (let k = 0; k < 12; k++) {
4696
- const v = verts[k];
4697
- const m1 = mids[(k + 11) % 12];
4698
- const m2 = mids[k];
4699
- triPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(v[0])},${f(v[1])} L ${f(m2[0])},${f(m2[1])}`);
4700
- }
4701
- return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4702
- /* @__PURE__ */ jsx("path", { d: starPath }),
4703
- triPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i))
4704
- ] });
4705
- }
4706
- function Seigaiha({ size, color, strokeWidth }) {
4707
- const s = size;
4708
- const r = s / 2;
4709
- const paths = [];
4710
- const centers = [
4711
- [s / 2, s * 0.6],
4712
- [0, s * 0.1],
4713
- [s, s * 0.1]
4714
- ];
4715
- for (const [cx, cy] of centers) {
4716
- for (let ring = 1; ring <= 3; ring++) {
4717
- const cr = r * (ring / 3);
4718
- paths.push(
4719
- `M ${f(cx - cr)},${f(cy)} A ${f(cr)} ${f(cr)} 0 0 1 ${f(cx + cr)},${f(cy)}`
4720
- );
4721
- }
4722
- }
4723
- return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
4724
- }
4725
- function GreekKey({ size, color, strokeWidth }) {
4726
- const s = size;
4727
- const u = s / 4;
4728
- const paths = [
4729
- // Outer frame
4730
- `M 0,0 L ${f(s)},0`,
4731
- `M 0,${f(s)} L ${f(s)},${f(s)}`,
4732
- // Spiral from left
4733
- `M 0,${f(u)} L ${f(3 * u)},${f(u)} L ${f(3 * u)},${f(3 * u)} L ${f(u)},${f(3 * u)} L ${f(u)},${f(2 * u)} L ${f(2 * u)},${f(2 * u)}`,
4734
- // Spiral from right (mirrored, offset)
4735
- `M ${f(s)},${f(3 * u)} L ${f(s - 3 * u)},${f(3 * u)} L ${f(s - 3 * u)},${f(u)} L ${f(s - u)},${f(u)} L ${f(s - u)},${f(2 * u)} L ${f(s - 2 * u)},${f(2 * u)}`,
4736
- // Vertical connectors at edges
4737
- `M 0,0 L 0,${f(u)}`,
4738
- `M ${f(s)},0 L ${f(s)},${f(u)}`,
4739
- `M 0,${f(3 * u)} L 0,${f(s)}`,
4740
- `M ${f(s)},${f(3 * u)} L ${f(s)},${f(s)}`
4741
- ];
4742
- return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
4743
- }
4744
- function CelticKnot({ size, color, strokeWidth }) {
4745
- const s = size;
4746
- const q = s / 4;
4747
- const r = q * 0.9;
4748
- const paths = [
4749
- // Band 1: diagonal with curves at crossings
4750
- `M 0,0 Q ${f(q)},${f(q)} ${f(2 * q)},${f(2 * q)}`,
4751
- `M ${f(2 * q)},${f(2 * q)} Q ${f(3 * q)},${f(3 * q)} ${f(s)},${f(s)}`,
4752
- // Band 2: other diagonal
4753
- `M ${f(s)},0 Q ${f(3 * q)},${f(q)} ${f(2 * q)},${f(2 * q)}`,
4754
- `M ${f(2 * q)},${f(2 * q)} Q ${f(q)},${f(3 * q)} 0,${f(s)}`,
4755
- // Outer loops that connect bands at tile edges for continuous weave
4756
- `M 0,0 Q ${f(-q * 0.3)},${f(2 * q)} 0,${f(s)}`,
4757
- `M ${f(s)},0 Q ${f(s + q * 0.3)},${f(2 * q)} ${f(s)},${f(s)}`,
4758
- `M 0,0 Q ${f(2 * q)},${f(-q * 0.3)} ${f(s)},0`,
4759
- `M 0,${f(s)} Q ${f(2 * q)},${f(s + q * 0.3)} ${f(s)},${f(s)}`,
4760
- // Inner circle at crossing
4761
- `M ${f(2 * q + r * 0.3)},${f(2 * q)} A ${f(r * 0.3)} ${f(r * 0.3)} 0 1 1 ${f(2 * q + r * 0.3)},${f(2 * q + 1e-3)}`
4762
- ];
4763
- return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
4764
- }
4765
- function Kolam({ size, color, strokeWidth }) {
4766
- const s = size;
4767
- const u = s / 4;
4768
- const dotR = s * 0.015;
4769
- const dots = [];
4770
- for (let row = 1; row <= 3; row++) {
4771
- for (let col = 1; col <= 3; col++) {
4772
- dots.push([col * u, row * u]);
4773
- }
4774
- }
4775
- const curves = [];
4776
- for (let row = 1; row <= 3; row++) {
4777
- const y = row * u;
4778
- for (let col = 1; col < 3; col++) {
4779
- const x1 = col * u;
4780
- const x2 = (col + 1) * u;
4781
- const mx = (x1 + x2) / 2;
4782
- const bulge = u * 0.4;
4783
- curves.push(`M ${f(x1)},${f(y)} C ${f(mx)},${f(y - bulge)} ${f(mx)},${f(y - bulge)} ${f(x2)},${f(y)}`);
4784
- curves.push(`M ${f(x1)},${f(y)} C ${f(mx)},${f(y + bulge)} ${f(mx)},${f(y + bulge)} ${f(x2)},${f(y)}`);
4785
- }
4786
- }
4787
- for (let col = 1; col <= 3; col++) {
4788
- const x = col * u;
4789
- for (let row = 1; row < 3; row++) {
4790
- const y1 = row * u;
4791
- const y2 = (row + 1) * u;
4792
- const my = (y1 + y2) / 2;
4793
- const bulge = u * 0.4;
4794
- curves.push(`M ${f(x)},${f(y1)} C ${f(x - bulge)},${f(my)} ${f(x - bulge)},${f(my)} ${f(x)},${f(y2)}`);
4795
- curves.push(`M ${f(x)},${f(y1)} C ${f(x + bulge)},${f(my)} ${f(x + bulge)},${f(my)} ${f(x)},${f(y2)}`);
4796
- }
4797
- }
4798
- for (let k = 1; k <= 3; k++) {
4799
- curves.push(`M ${f(k * u)},${f(u)} C ${f(k * u)},${f(u * 0.5)} ${f(k * u)},${f(u * 0.5)} ${f(k * u)},0`);
4800
- curves.push(`M ${f(k * u)},${f(3 * u)} C ${f(k * u)},${f(3.5 * u)} ${f(k * u)},${f(3.5 * u)} ${f(k * u)},${f(s)}`);
4801
- curves.push(`M ${f(u)},${f(k * u)} C ${f(u * 0.5)},${f(k * u)} ${f(u * 0.5)},${f(k * u)} 0,${f(k * u)}`);
4802
- curves.push(`M ${f(3 * u)},${f(k * u)} C ${f(3.5 * u)},${f(k * u)} ${f(3.5 * u)},${f(k * u)} ${f(s)},${f(k * u)}`);
4803
- }
4804
- return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4805
- curves.map((d, i) => /* @__PURE__ */ jsx("path", { d }, `c${i}`)),
4806
- dots.map(([x, y], i) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: dotR, fill: color, opacity: "0.5" }, `d${i}`))
4807
- ] });
4808
- }
4809
- function Arch({ size, color, strokeWidth }) {
4810
- const w = size;
4811
- const h = size * 1.5;
4812
- const cx = w / 2;
4813
- const paths = [];
4814
- for (let ring = 0; ring < 4; ring++) {
4815
- const scale = 1 - ring * 0.2;
4816
- const archW = w * 0.48 * scale;
4817
- const archH = h * 0.7 * scale;
4818
- const baseY = h * 0.85;
4819
- const tipY = baseY - archH;
4820
- const lx = cx - archW;
4821
- const rx = cx + archW;
4822
- const offset = archW * 0.3;
4823
- const lcx = lx + offset;
4824
- const rdx = cx - lcx;
4825
- const rdy = baseY - tipY;
4826
- const radius = Math.sqrt(rdx * rdx + rdy * rdy);
4827
- paths.push(
4828
- `M ${f(lx)},${f(baseY)} A ${f(radius)} ${f(radius)} 0 0 1 ${f(cx)},${f(tipY)} A ${f(radius)} ${f(radius)} 0 0 1 ${f(rx)},${f(baseY)}`
4829
- );
4830
- if (ring === 0) {
4831
- paths.push(`M ${f(lx)},${f(baseY)} L ${f(rx)},${f(baseY)}`);
4832
- }
4833
- }
4834
- const innerScale = 1 - 3 * 0.2;
4835
- const keyR = w * 0.48 * innerScale * 0.35;
4836
- const keyY = h * 0.85 - h * 0.7 * innerScale * 0.4;
4837
- paths.push(
4838
- `M ${f(cx + keyR)},${f(keyY)} A ${f(keyR)} ${f(keyR)} 0 1 1 ${f(cx + keyR)},${f(keyY + 1e-3)}`
4839
- );
4840
- const spR = w * 0.15;
4841
- paths.push(`M 0,0 A ${f(spR)} ${f(spR)} 0 0 0 ${f(spR)},${f(spR)}`);
4842
- paths.push(`M ${f(w)},0 A ${f(spR)} ${f(spR)} 0 0 1 ${f(w - spR)},${f(spR)}`);
4843
- return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
4844
- }
4845
- function ArabesqueVine({ size, color, strokeWidth }) {
4846
- const w = size;
4847
- const h = size * 1.2;
4848
- const cx = w / 2;
4849
- const paths = [];
4850
- const amp = w * 0.3;
4851
- const segments = 3;
4852
- const segH = h / segments;
4853
- for (let i = 0; i < segments; i++) {
4854
- const y0 = i * segH;
4855
- const y1 = y0 + segH;
4856
- const dir = i % 2 === 0 ? 1 : -1;
4857
- paths.push(
4858
- `M ${f(cx)},${f(y0)} C ${f(cx + amp * dir)},${f(y0 + segH * 0.33)} ${f(cx - amp * dir)},${f(y0 + segH * 0.66)} ${f(cx)},${f(y1)}`
4859
- );
4860
- const branchY = y0 + segH * 0.5;
4861
- const branchX = cx + amp * dir * 0.15;
4862
- const tendrilLen = w * 0.25;
4863
- const tlx = branchX - tendrilLen;
4864
- const tly = branchY - tendrilLen * 0.4;
4865
- paths.push(
4866
- `M ${f(branchX)},${f(branchY)} C ${f(branchX - tendrilLen * 0.5)},${f(branchY - tendrilLen * 0.8)} ${f(tlx - tendrilLen * 0.2)},${f(tly + tendrilLen * 0.3)} ${f(tlx)},${f(tly)}`
4867
- );
4868
- paths.push(
4869
- `M ${f(tlx)},${f(tly)} C ${f(tlx + tendrilLen * 0.3)},${f(tly + tendrilLen * 0.5)} ${f(branchX - tendrilLen * 0.2)},${f(branchY + tendrilLen * 0.3)} ${f(branchX)},${f(branchY)}`
4870
- );
4871
- const trx = branchX + tendrilLen;
4872
- const try_ = branchY + tendrilLen * 0.4;
4873
- paths.push(
4874
- `M ${f(branchX)},${f(branchY)} C ${f(branchX + tendrilLen * 0.5)},${f(branchY + tendrilLen * 0.8)} ${f(trx + tendrilLen * 0.2)},${f(try_ - tendrilLen * 0.3)} ${f(trx)},${f(try_)}`
4875
- );
4876
- paths.push(
4877
- `M ${f(trx)},${f(try_)} C ${f(trx - tendrilLen * 0.3)},${f(try_ - tendrilLen * 0.5)} ${f(branchX + tendrilLen * 0.2)},${f(branchY - tendrilLen * 0.3)} ${f(branchX)},${f(branchY)}`
4878
- );
4879
- const spiralR = tendrilLen * 0.15;
4880
- paths.push(
4881
- `M ${f(tlx)},${f(tly)} A ${f(spiralR)} ${f(spiralR)} 0 1 0 ${f(tlx + spiralR * 2)},${f(tly)}`
4882
- );
4883
- paths.push(
4884
- `M ${f(trx)},${f(try_)} A ${f(spiralR)} ${f(spiralR)} 0 1 1 ${f(trx - spiralR * 2)},${f(try_)}`
4885
- );
4886
- }
4887
- return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
4888
- }
4889
- function ArabesqueNet({ size, color, strokeWidth }) {
4890
- const s = size;
4891
- const cells = 4;
4892
- const cellW = s / cells;
4893
- const cellH = s / cells;
4894
- const paths = [];
4895
- for (let row = 0; row < cells; row++) {
4896
- for (let col = 0; col < cells; col++) {
4897
- const cx = col * cellW + cellW / 2;
4898
- const cy = row * cellH + cellH / 2;
4899
- const hw = cellW * 0.5;
4900
- const hh = cellH * 0.5;
4901
- const bulge = cellW * 0.25;
4902
- paths.push(
4903
- `M ${f(cx)},${f(cy - hh)} Q ${f(cx + bulge)},${f(cy - bulge)} ${f(cx + hw)},${f(cy)}`
4904
- );
4905
- paths.push(
4906
- `M ${f(cx + hw)},${f(cy)} Q ${f(cx + bulge)},${f(cy + bulge)} ${f(cx)},${f(cy + hh)}`
4907
- );
4908
- paths.push(
4909
- `M ${f(cx)},${f(cy + hh)} Q ${f(cx - bulge)},${f(cy + bulge)} ${f(cx - hw)},${f(cy)}`
4910
- );
4911
- paths.push(
4912
- `M ${f(cx - hw)},${f(cy)} Q ${f(cx - bulge)},${f(cy - bulge)} ${f(cx)},${f(cy - hh)}`
4913
- );
4914
- }
4915
- }
4916
- return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
4917
- }
4918
- function getTileDimensions(variant, size) {
4919
- if (variant === "star6") {
4920
- return { width: size, height: size * (2 / Math.sqrt(3)) };
4921
- }
4922
- if (variant === "arch") {
4923
- return { width: size, height: size * 1.5 };
4924
- }
4925
- if (variant === "arabesque-vine") {
4926
- return { width: size, height: size * 1.2 };
4927
- }
4928
- return { width: size, height: size };
4929
- }
4930
- var PI, VARIANT_MAP, PatternTile;
4931
- var init_PatternTile = __esm({
4932
- "components/atoms/PatternTile.tsx"() {
4933
- "use client";
4934
- PI = Math.PI;
4935
- VARIANT_MAP = {
4936
- "star8": Star8,
4937
- "star6": Star6,
4938
- "khatam": Khatam,
4939
- "star10": Star10,
4940
- "star12": Star12,
4941
- "rosette-double": RosetteDouble,
4942
- "rosette-filled": RosetteFilled,
4943
- "seigaiha": Seigaiha,
4944
- "greek-key": GreekKey,
4945
- "celtic-knot": CelticKnot,
4946
- "kolam": Kolam,
4947
- "arch": Arch,
4948
- "arabesque-vine": ArabesqueVine,
4949
- "arabesque-net": ArabesqueNet
4950
- };
4951
- PatternTile = ({
4952
- variant = "star8",
4953
- size = 60,
4954
- color = "var(--color-primary)",
4955
- strokeWidth = 0.5,
4956
- className
4957
- }) => {
4958
- const Variant = VARIANT_MAP[variant];
4959
- return /* @__PURE__ */ jsx("g", { className, children: /* @__PURE__ */ jsx(Variant, { size, color, strokeWidth }) });
4960
- };
4961
- PatternTile.displayName = "PatternTile";
4962
- }
4963
- });
4964
- var initialStyles, animatedStyles, AnimatedReveal;
4965
- var init_AnimatedReveal = __esm({
4966
- "components/atoms/AnimatedReveal.tsx"() {
4967
- "use client";
4968
- init_cn();
4969
- initialStyles = {
4970
- "fade-up": { opacity: 0, transform: "translateY(24px)" },
4971
- "fade-down": { opacity: 0, transform: "translateY(-24px)" },
4972
- "fade-in": { opacity: 0 },
4973
- "fade-left": { opacity: 0, transform: "translateX(24px)" },
4974
- "fade-right": { opacity: 0, transform: "translateX(-24px)" },
4975
- "scale": { opacity: 0, transform: "scale(0.92)" },
4976
- "scale-up": { opacity: 0, transform: "scale(0.92) translateY(16px)" },
4977
- "none": {}
4978
- };
4979
- animatedStyles = {
4980
- "fade-up": { opacity: 1, transform: "translateY(0)" },
4981
- "fade-down": { opacity: 1, transform: "translateY(0)" },
4982
- "fade-in": { opacity: 1 },
4983
- "fade-left": { opacity: 1, transform: "translateX(0)" },
4984
- "fade-right": { opacity: 1, transform: "translateX(0)" },
4985
- "scale": { opacity: 1, transform: "scale(1)" },
4986
- "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
4987
- "none": {}
4988
- };
4989
- AnimatedReveal = React113__default.forwardRef(
4990
- ({
4991
- trigger = "scroll",
4992
- animation = "fade-up",
4993
- duration = 600,
4994
- delay = 0,
4995
- threshold = 0.15,
4996
- once = true,
4997
- animate: manualAnimate,
4998
- easing = "cubic-bezier(0.16, 1, 0.3, 1)",
4999
- children,
5000
- className,
5001
- style,
5002
- ...props
5003
- }, forwardedRef) => {
5004
- const [isAnimated, setIsAnimated] = useState(false);
5005
- const internalRef = useRef(null);
5006
- const hasAnimated = useRef(false);
5007
- const setRef = useCallback(
5008
- (node) => {
5009
- internalRef.current = node;
5010
- if (typeof forwardedRef === "function") forwardedRef(node);
5011
- else if (forwardedRef) forwardedRef.current = node;
5012
- },
5013
- [forwardedRef]
5014
- );
5015
- useEffect(() => {
5016
- if (trigger !== "scroll") return;
5017
- const el = internalRef.current;
5018
- if (!el) return;
5019
- const observer = new IntersectionObserver(
5020
- ([entry]) => {
5021
- if (entry.isIntersecting) {
5022
- if (once && hasAnimated.current) return;
5023
- hasAnimated.current = true;
5024
- setIsAnimated(true);
5025
- } else if (!once) {
5026
- setIsAnimated(false);
5027
- }
5028
- },
5029
- { threshold }
5030
- );
5031
- observer.observe(el);
5032
- return () => observer.disconnect();
5033
- }, [trigger, threshold, once]);
5034
- const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
5035
- const handleMouseLeave = trigger === "hover" ? () => {
5036
- if (!once || !hasAnimated.current) {
5037
- hasAnimated.current = true;
5038
- setIsAnimated(false);
5039
- }
5040
- } : void 0;
5041
- useEffect(() => {
5042
- if (trigger === "manual" && manualAnimate !== void 0) {
5043
- setIsAnimated(manualAnimate);
5044
- }
5045
- }, [trigger, manualAnimate]);
5046
- const active = isAnimated;
5047
- const currentStyle = active ? animatedStyles[animation] : initialStyles[animation];
5048
- return /* @__PURE__ */ jsx(
5049
- "div",
5050
- {
5051
- ref: setRef,
5052
- className: cn("will-change-[opacity,transform]", className),
5053
- style: {
5054
- ...currentStyle,
5055
- transitionProperty: "opacity, transform",
5056
- transitionDuration: `${duration}ms`,
5057
- transitionDelay: `${delay}ms`,
5058
- transitionTimingFunction: easing,
5059
- ...style
5060
- },
5061
- onMouseEnter: handleMouseEnter,
5062
- onMouseLeave: handleMouseLeave,
5063
- ...props,
5064
- children: typeof children === "function" ? children(active) : children
5065
- }
5066
- );
5067
- }
5068
- );
5069
- AnimatedReveal.displayName = "AnimatedReveal";
5070
- }
5071
- });
5072
- function useFetchedSvg(src) {
5073
- const [svg, setSvg] = useState(null);
5074
- const cache = useRef({});
5075
- useEffect(() => {
5076
- if (!src) {
5077
- setSvg(null);
5078
- return;
5079
- }
5080
- if (cache.current[src]) {
5081
- setSvg(cache.current[src]);
5082
- return;
5083
- }
5084
- let cancelled = false;
5085
- fetch(src).then((res) => {
5086
- if (!res.ok) throw new Error(`Failed to fetch SVG: ${res.status}`);
5087
- return res.text();
5088
- }).then((text) => {
5089
- if (cancelled) return;
5090
- cache.current[src] = text;
5091
- setSvg(text);
5092
- }).catch(() => {
5093
- if (!cancelled) setSvg(null);
5094
- });
5095
- return () => {
5096
- cancelled = true;
5097
- };
5098
- }, [src]);
5099
- return svg;
5100
- }
5101
- function applyDrawAnimation(container, animate, duration, delay, easing) {
5102
- const paths = container.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
5103
- paths.forEach((el) => {
5104
- if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
5105
- const len = el.getTotalLength();
5106
- el.style.strokeDasharray = `${len}`;
5107
- el.style.strokeDashoffset = animate ? "0" : `${len}`;
5108
- el.style.transition = `stroke-dashoffset ${duration}ms ${easing} ${delay}ms`;
5109
- }
5110
- });
5111
- }
5112
- function applyFillAnimation(container, animate, duration, delay, easing, fillColor) {
5113
- const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
5114
- paths.forEach((el) => {
5115
- if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
5116
- const geom = el;
5117
- const len = geom.getTotalLength();
5118
- geom.style.strokeDasharray = `${len}`;
5119
- geom.style.strokeDashoffset = animate ? "0" : `${len}`;
5120
- geom.style.transition = `stroke-dashoffset ${duration * 0.6}ms ${easing} ${delay}ms, fill-opacity ${duration * 0.4}ms ${easing} ${delay + duration * 0.6}ms`;
5121
- }
5122
- if (fillColor) el.style.fill = fillColor;
5123
- el.style.fillOpacity = animate ? "1" : "0";
5124
- });
5125
- }
5126
- function applyPulseAnimation(container, animate, duration) {
5127
- const svg = container.querySelector("svg");
5128
- if (!svg) return;
5129
- if (animate) {
5130
- svg.style.animation = `ag-pulse ${duration}ms ease-in-out infinite`;
5131
- } else {
5132
- svg.style.animation = "none";
5133
- }
5134
- }
5135
- function applyMorphAnimation(container, animate, duration, delay, easing) {
5136
- const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
5137
- paths.forEach((el) => {
5138
- el.style.transition = `all ${duration}ms ${easing} ${delay}ms`;
5139
- el.style.transform = animate ? "scale(1)" : "scale(0)";
5140
- el.style.transformOrigin = "center";
5141
- el.style.opacity = animate ? "1" : "0";
5142
- });
5143
- }
5144
- var AnimatedGraphic;
5145
- var init_AnimatedGraphic = __esm({
5146
- "components/atoms/AnimatedGraphic.tsx"() {
5147
- "use client";
5148
- init_cn();
5149
- AnimatedGraphic = React113__default.forwardRef(
5150
- ({
5151
- src,
5152
- svgContent,
5153
- animation = "draw",
5154
- animate = false,
5155
- duration = 1200,
5156
- delay = 0,
5157
- easing = "cubic-bezier(0.16, 1, 0.3, 1)",
5158
- width,
5159
- height,
5160
- strokeColor,
5161
- fillColor,
5162
- alt,
5163
- className,
5164
- style,
5165
- children,
5166
- ...props
5167
- }, ref) => {
5168
- const containerRef = useRef(null);
5169
- const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
5170
- const resolvedSvg = svgContent ?? fetchedSvg;
5171
- const prevAnimateRef = useRef(animate);
5172
- const setRef = React113__default.useCallback(
5173
- (node) => {
5174
- containerRef.current = node;
5175
- if (typeof ref === "function") ref(node);
5176
- else if (ref) ref.current = node;
5177
- },
5178
- [ref]
5179
- );
5180
- useEffect(() => {
5181
- const el = containerRef.current;
5182
- if (!el || !strokeColor) return;
5183
- const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
5184
- paths.forEach((p2) => {
5185
- p2.style.stroke = strokeColor;
5186
- });
5187
- }, [resolvedSvg, strokeColor]);
5188
- useEffect(() => {
5189
- const el = containerRef.current;
5190
- if (!el || !resolvedSvg) return;
5191
- if (animation === "draw" || animation === "fill") {
5192
- const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
5193
- paths.forEach((p2) => {
5194
- if ("getTotalLength" in p2 && typeof p2.getTotalLength === "function") {
5195
- const len = p2.getTotalLength();
5196
- p2.style.strokeDasharray = `${len}`;
5197
- p2.style.strokeDashoffset = `${len}`;
5198
- }
5199
- if (animation === "fill") {
5200
- p2.style.fillOpacity = "0";
5201
- }
5202
- });
5203
- }
5204
- if (animation === "morph") {
5205
- const paths = el.querySelectorAll("path, circle, ellipse, rect, polygon");
5206
- paths.forEach((p2) => {
5207
- p2.style.transform = "scale(0)";
5208
- p2.style.transformOrigin = "center";
5209
- p2.style.opacity = "0";
5210
- });
5211
- }
5212
- }, [resolvedSvg, animation]);
5213
- useEffect(() => {
5214
- const el = containerRef.current;
5215
- if (!el) return;
5216
- const id = requestAnimationFrame(() => {
5217
- switch (animation) {
5218
- case "draw":
5219
- applyDrawAnimation(el, animate, duration, delay, easing);
5220
- break;
5221
- case "fill":
5222
- applyFillAnimation(el, animate, duration, delay, easing, fillColor);
5223
- break;
5224
- case "pulse":
5225
- applyPulseAnimation(el, animate, duration);
5226
- break;
5227
- case "morph":
5228
- applyMorphAnimation(el, animate, duration, delay, easing);
5229
- break;
5230
- }
5231
- });
5232
- prevAnimateRef.current = animate;
5233
- return () => cancelAnimationFrame(id);
5234
- }, [animate, animation, duration, delay, easing, fillColor, resolvedSvg]);
5235
- return /* @__PURE__ */ jsxs(Fragment, { children: [
5236
- /* @__PURE__ */ jsx("style", { children: `@keyframes ag-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: 0.85; } }` }),
5237
- /* @__PURE__ */ jsx(
5238
- "div",
5239
- {
5240
- ref: setRef,
5241
- className: cn("inline-flex items-center justify-center", className),
5242
- style: { width, height, ...style },
5243
- role: alt ? "img" : void 0,
5244
- "aria-label": alt,
5245
- ...props,
5246
- children: resolvedSvg ? /* @__PURE__ */ jsx(
5247
- "div",
5248
- {
5249
- className: "w-full h-full [&>svg]:w-full [&>svg]:h-full",
5250
- dangerouslySetInnerHTML: { __html: resolvedSvg }
5251
- }
5252
- ) : children
5253
- }
5254
- )
5255
- ] });
5256
- }
5257
- );
5258
- AnimatedGraphic.displayName = "AnimatedGraphic";
5259
- }
5260
- });
5261
4361
  function useTraitContent(traitName) {
5262
4362
  const slotManager = useUISlots();
5263
4363
  const [content, setContent] = useState(
@@ -5394,9 +4494,9 @@ function ScoreDisplay({
5394
4494
  ...rest
5395
4495
  }) {
5396
4496
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
5397
- const [displayValue, setDisplayValue] = React113.useState(resolvedValue);
5398
- const [isAnimating, setIsAnimating] = React113.useState(false);
5399
- React113.useEffect(() => {
4497
+ const [displayValue, setDisplayValue] = React104.useState(resolvedValue);
4498
+ const [isAnimating, setIsAnimating] = React104.useState(false);
4499
+ React104.useEffect(() => {
5400
4500
  if (!animated || displayValue === resolvedValue) {
5401
4501
  setDisplayValue(resolvedValue);
5402
4502
  return;
@@ -5466,9 +4566,9 @@ function ControlButton({
5466
4566
  className
5467
4567
  }) {
5468
4568
  const eventBus = useEventBus();
5469
- const [isPressed, setIsPressed] = React113.useState(false);
4569
+ const [isPressed, setIsPressed] = React104.useState(false);
5470
4570
  const actualPressed = pressed ?? isPressed;
5471
- const handlePointerDown = React113.useCallback(
4571
+ const handlePointerDown = React104.useCallback(
5472
4572
  (e) => {
5473
4573
  e.preventDefault();
5474
4574
  if (disabled) return;
@@ -5478,7 +4578,7 @@ function ControlButton({
5478
4578
  },
5479
4579
  [disabled, pressEvent, eventBus, onPress]
5480
4580
  );
5481
- const handlePointerUp = React113.useCallback(
4581
+ const handlePointerUp = React104.useCallback(
5482
4582
  (e) => {
5483
4583
  e.preventDefault();
5484
4584
  if (disabled) return;
@@ -5488,7 +4588,7 @@ function ControlButton({
5488
4588
  },
5489
4589
  [disabled, releaseEvent, eventBus, onRelease]
5490
4590
  );
5491
- const handlePointerLeave = React113.useCallback(
4591
+ const handlePointerLeave = React104.useCallback(
5492
4592
  (e) => {
5493
4593
  if (isPressed) {
5494
4594
  setIsPressed(false);
@@ -6386,9 +5486,9 @@ function MiniMap({
6386
5486
  viewportRect,
6387
5487
  className
6388
5488
  }) {
6389
- const canvasRef = React113.useRef(null);
6390
- const frameRef = React113.useRef(0);
6391
- React113.useEffect(() => {
5489
+ const canvasRef = React104.useRef(null);
5490
+ const frameRef = React104.useRef(0);
5491
+ React104.useEffect(() => {
6392
5492
  const canvas = canvasRef.current;
6393
5493
  if (!canvas) return;
6394
5494
  const ctx = canvas.getContext("2d");
@@ -6473,24 +5573,6 @@ var init_MiniMap = __esm({
6473
5573
  // components/atoms/game/index.ts
6474
5574
  var init_game = __esm({
6475
5575
  "components/atoms/game/index.ts"() {
6476
- init_HealthBar();
6477
- init_ScoreDisplay();
6478
- init_ControlButton();
6479
- init_Sprite();
6480
- init_StateIndicator();
6481
- init_TimerDisplay();
6482
- init_ResourceCounter();
6483
- init_ItemSlot();
6484
- init_TurnIndicator();
6485
- init_ComboCounter();
6486
- init_XPBar();
6487
- init_WaypointMarker();
6488
- init_StatusEffect();
6489
- init_DamageNumber();
6490
- init_DialogueBubble();
6491
- init_ChoiceButton();
6492
- init_ActionButton();
6493
- init_MiniMap();
6494
5576
  }
6495
5577
  });
6496
5578
 
@@ -6499,8 +5581,6 @@ var init_atoms = __esm({
6499
5581
  "components/atoms/index.ts"() {
6500
5582
  init_Button();
6501
5583
  init_Input();
6502
- init_Label();
6503
- init_Textarea();
6504
5584
  init_Select();
6505
5585
  init_Checkbox();
6506
5586
  init_Card();
@@ -6508,38 +5588,12 @@ var init_atoms = __esm({
6508
5588
  init_Spinner();
6509
5589
  init_Avatar();
6510
5590
  init_Box();
6511
- init_Center();
6512
5591
  init_Divider();
6513
5592
  init_Icon();
6514
5593
  init_ProgressBar();
6515
- init_Radio();
6516
- init_Switch();
6517
- init_Spacer();
6518
5594
  init_Stack();
6519
- init_TextHighlight();
6520
5595
  init_Typography();
6521
5596
  init_ThemeToggle();
6522
- init_ThemeSelector();
6523
- init_Overlay();
6524
- init_FlipContainer();
6525
- init_ConditionalWrapper();
6526
- init_LawReferenceTooltip();
6527
- init_DayCell();
6528
- init_TimeSlotCell();
6529
- init_StatusDot();
6530
- init_TrendIndicator();
6531
- init_RangeSlider();
6532
- init_AnimatedCounter();
6533
- init_InfiniteScrollSentinel();
6534
- init_ConfettiEffect();
6535
- init_TypewriterText();
6536
- init_SectionHeader();
6537
- init_StatCard();
6538
- init_ContentSection();
6539
- init_PatternTile();
6540
- init_AnimatedReveal();
6541
- init_AnimatedGraphic();
6542
- init_TraitFrame();
6543
5597
  init_game();
6544
5598
  }
6545
5599
  });
@@ -6596,7 +5650,7 @@ var init_ErrorBoundary = __esm({
6596
5650
  "use client";
6597
5651
  init_cn();
6598
5652
  init_ErrorState();
6599
- ErrorBoundary = class extends React113__default.Component {
5653
+ ErrorBoundary = class extends React104__default.Component {
6600
5654
  constructor(props) {
6601
5655
  super(props);
6602
5656
  __publicField(this, "reset", () => {
@@ -6759,33 +5813,6 @@ var init_Skeleton = __esm({
6759
5813
  }
6760
5814
  });
6761
5815
 
6762
- // renderer/pattern-resolver.ts
6763
- var init_pattern_resolver = __esm({
6764
- "renderer/pattern-resolver.ts"() {
6765
- }
6766
- });
6767
-
6768
- // renderer/client-effect-executor.ts
6769
- var init_client_effect_executor = __esm({
6770
- "renderer/client-effect-executor.ts"() {
6771
- }
6772
- });
6773
- var ClientEffectConfigContext;
6774
- var init_useClientEffects = __esm({
6775
- "renderer/useClientEffects.ts"() {
6776
- "use client";
6777
- init_client_effect_executor();
6778
- ClientEffectConfigContext = createContext(null);
6779
- ClientEffectConfigContext.Provider;
6780
- }
6781
- });
6782
-
6783
- // renderer/data-resolver.ts
6784
- var init_data_resolver = __esm({
6785
- "renderer/data-resolver.ts"() {
6786
- }
6787
- });
6788
-
6789
5816
  // renderer/slot-definitions.ts
6790
5817
  function isPortalSlot(slot) {
6791
5818
  return SLOT_DEFINITIONS[slot]?.type === "portal";
@@ -6862,12 +5889,6 @@ var init_slot_definitions = __esm({
6862
5889
  };
6863
5890
  }
6864
5891
  });
6865
- var init_offline_executor = __esm({
6866
- "renderer/offline-executor.ts"() {
6867
- "use client";
6868
- init_client_effect_executor();
6869
- }
6870
- });
6871
5892
  function isInlineOrbital(orbital) {
6872
5893
  return "name" in orbital && typeof orbital.name === "string";
6873
5894
  }
@@ -6894,23 +5915,11 @@ var init_navigation = __esm({
6894
5915
  createContext(null);
6895
5916
  }
6896
5917
  });
6897
- var init_init = __esm({
6898
- "renderer/init.ts"() {
6899
- init_pattern_resolver();
6900
- }
6901
- });
6902
5918
 
6903
5919
  // renderer/index.ts
6904
5920
  var init_renderer = __esm({
6905
5921
  "renderer/index.ts"() {
6906
- init_pattern_resolver();
6907
- init_client_effect_executor();
6908
- init_useClientEffects();
6909
- init_data_resolver();
6910
5922
  init_slot_definitions();
6911
- init_offline_executor();
6912
- init_navigation();
6913
- init_init();
6914
5923
  }
6915
5924
  });
6916
5925
 
@@ -7088,8 +6097,8 @@ var init_Tooltip = __esm({
7088
6097
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
7089
6098
  };
7090
6099
  }, []);
7091
- const triggerElement = React113__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7092
- const trigger = React113__default.cloneElement(triggerElement, {
6100
+ const triggerElement = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
6101
+ const trigger = React104__default.cloneElement(triggerElement, {
7093
6102
  ref: triggerRef,
7094
6103
  onMouseEnter: handleMouseEnter,
7095
6104
  onMouseLeave: handleMouseLeave,
@@ -7210,8 +6219,8 @@ var init_Popover = __esm({
7210
6219
  onMouseEnter: handleOpen,
7211
6220
  onMouseLeave: handleClose
7212
6221
  };
7213
- const childElement = React113__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
7214
- const triggerElement = React113__default.cloneElement(
6222
+ const childElement = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
6223
+ const triggerElement = React104__default.cloneElement(
7215
6224
  childElement,
7216
6225
  {
7217
6226
  ref: triggerRef,
@@ -7328,8 +6337,8 @@ var init_Menu = __esm({
7328
6337
  "bottom-start": "top-full left-0 mt-2",
7329
6338
  "bottom-end": "top-full right-0 mt-2"
7330
6339
  };
7331
- const triggerChild = React113__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
7332
- const triggerElement = React113__default.cloneElement(
6340
+ const triggerChild = React104__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
6341
+ const triggerElement = React104__default.cloneElement(
7333
6342
  triggerChild,
7334
6343
  {
7335
6344
  ref: triggerRef,
@@ -7848,13 +6857,13 @@ var init_MapView = __esm({
7848
6857
  shadowSize: [41, 41]
7849
6858
  });
7850
6859
  L.Marker.prototype.options.icon = defaultIcon;
7851
- const { useEffect: useEffect70, useRef: useRef64, useCallback: useCallback109, useState: useState102 } = React113__default;
6860
+ const { useEffect: useEffect61, useRef: useRef58, useCallback: useCallback88, useState: useState83 } = React104__default;
7852
6861
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
7853
6862
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
7854
6863
  function MapUpdater({ centerLat, centerLng, zoom }) {
7855
6864
  const map = useMap();
7856
- const prevRef = useRef64({ centerLat, centerLng, zoom });
7857
- useEffect70(() => {
6865
+ const prevRef = useRef58({ centerLat, centerLng, zoom });
6866
+ useEffect61(() => {
7858
6867
  const prev = prevRef.current;
7859
6868
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
7860
6869
  map.setView([centerLat, centerLng], zoom);
@@ -7865,7 +6874,7 @@ var init_MapView = __esm({
7865
6874
  }
7866
6875
  function MapClickHandler({ onMapClick }) {
7867
6876
  const map = useMap();
7868
- useEffect70(() => {
6877
+ useEffect61(() => {
7869
6878
  if (!onMapClick) return;
7870
6879
  const handler = (e) => {
7871
6880
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -7892,8 +6901,8 @@ var init_MapView = __esm({
7892
6901
  showAttribution = true
7893
6902
  }) {
7894
6903
  const eventBus = useEventBus2();
7895
- const [clickedPosition, setClickedPosition] = useState102(null);
7896
- const handleMapClick = useCallback109((lat, lng) => {
6904
+ const [clickedPosition, setClickedPosition] = useState83(null);
6905
+ const handleMapClick = useCallback88((lat, lng) => {
7897
6906
  if (showClickedPin) {
7898
6907
  setClickedPosition({ lat, lng });
7899
6908
  }
@@ -7902,7 +6911,7 @@ var init_MapView = __esm({
7902
6911
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
7903
6912
  }
7904
6913
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
7905
- const handleMarkerClick = useCallback109((marker) => {
6914
+ const handleMarkerClick = useCallback88((marker) => {
7906
6915
  onMarkerClick?.(marker);
7907
6916
  if (markerClickEvent) {
7908
6917
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -8079,7 +7088,7 @@ function InputPattern({
8079
7088
  fieldName
8080
7089
  }) {
8081
7090
  const { emit } = useEventBus();
8082
- const [localValue, setLocalValue] = React113__default.useState(value);
7091
+ const [localValue, setLocalValue] = React104__default.useState(value);
8083
7092
  const handleChange = (e) => {
8084
7093
  setLocalValue(e.target.value);
8085
7094
  if (onChange) {
@@ -8117,7 +7126,7 @@ function TextareaPattern({
8117
7126
  fieldName
8118
7127
  }) {
8119
7128
  const { emit } = useEventBus();
8120
- const [localValue, setLocalValue] = React113__default.useState(value);
7129
+ const [localValue, setLocalValue] = React104__default.useState(value);
8121
7130
  const handleChange = (e) => {
8122
7131
  setLocalValue(e.target.value);
8123
7132
  if (onChange) {
@@ -8149,7 +7158,7 @@ function SelectPattern({
8149
7158
  fieldName
8150
7159
  }) {
8151
7160
  const { emit } = useEventBus();
8152
- const [localValue, setLocalValue] = React113__default.useState(value);
7161
+ const [localValue, setLocalValue] = React104__default.useState(value);
8153
7162
  const handleChange = (e) => {
8154
7163
  setLocalValue(e.target.value);
8155
7164
  if (onChange) {
@@ -8178,7 +7187,7 @@ function CheckboxPattern({
8178
7187
  className
8179
7188
  }) {
8180
7189
  const { emit } = useEventBus();
8181
- const [localChecked, setLocalChecked] = React113__default.useState(checked);
7190
+ const [localChecked, setLocalChecked] = React104__default.useState(checked);
8182
7191
  const handleChange = (e) => {
8183
7192
  setLocalChecked(e.target.checked);
8184
7193
  if (onChange) {
@@ -8409,8 +7418,8 @@ function ActionButtons({
8409
7418
  disabled
8410
7419
  }) {
8411
7420
  const eventBus = useEventBus();
8412
- const [activeButtons, setActiveButtons] = React113.useState(/* @__PURE__ */ new Set());
8413
- const handlePress = React113.useCallback(
7421
+ const [activeButtons, setActiveButtons] = React104.useState(/* @__PURE__ */ new Set());
7422
+ const handlePress = React104.useCallback(
8414
7423
  (id) => {
8415
7424
  setActiveButtons((prev) => new Set(prev).add(id));
8416
7425
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -8418,7 +7427,7 @@ function ActionButtons({
8418
7427
  },
8419
7428
  [actionEvent, eventBus, onAction]
8420
7429
  );
8421
- const handleRelease = React113.useCallback(
7430
+ const handleRelease = React104.useCallback(
8422
7431
  (id) => {
8423
7432
  setActiveButtons((prev) => {
8424
7433
  const next = new Set(prev);
@@ -8927,7 +7936,7 @@ function getSummary() {
8927
7936
  pending: allChecks.filter((c) => c.status === "pending").length
8928
7937
  };
8929
7938
  }
8930
- function getSnapshot2() {
7939
+ function getSnapshot() {
8931
7940
  return {
8932
7941
  checks: getAllChecks(),
8933
7942
  transitions: getTransitions(),
@@ -8955,7 +7964,7 @@ function exposeOnWindow() {
8955
7964
  if (typeof window === "undefined") return;
8956
7965
  if (!window.__orbitalVerification) {
8957
7966
  window.__orbitalVerification = {
8958
- getSnapshot: getSnapshot2,
7967
+ getSnapshot,
8959
7968
  getChecks: getAllChecks,
8960
7969
  getTransitions,
8961
7970
  getBridge: getBridgeHealth,
@@ -9272,10 +8281,10 @@ function IsometricCanvas({
9272
8281
  [unitsProp]
9273
8282
  );
9274
8283
  const features = useMemo(
9275
- () => featuresProp.map((f3) => {
9276
- if (f3.type) return f3;
9277
- const raw = f3;
9278
- return raw.featureType ? { ...f3, type: raw.featureType } : f3;
8284
+ () => featuresProp.map((f) => {
8285
+ if (f.type) return f;
8286
+ const raw = f;
8287
+ return raw.featureType ? { ...f, type: raw.featureType } : f;
9279
8288
  }),
9280
8289
  [featuresProp]
9281
8290
  );
@@ -9958,7 +8967,6 @@ var init_IsometricCanvas = __esm({
9958
8967
  var init_IsometricCanvas2 = __esm({
9959
8968
  "components/organisms/game/IsometricCanvas.tsx"() {
9960
8969
  init_IsometricCanvas();
9961
- init_IsometricCanvas();
9962
8970
  }
9963
8971
  });
9964
8972
  function BattleBoard({
@@ -10442,9 +9450,9 @@ var init_ScaledDiagram = __esm({
10442
9450
  }
10443
9451
  });
10444
9452
 
10445
- // node_modules/.pnpm/katex@0.16.45/node_modules/katex/dist/katex.min.css
9453
+ // node_modules/katex/dist/katex.min.css
10446
9454
  var init_katex_min = __esm({
10447
- "node_modules/.pnpm/katex@0.16.45/node_modules/katex/dist/katex.min.css"() {
9455
+ "node_modules/katex/dist/katex.min.css"() {
10448
9456
  }
10449
9457
  });
10450
9458
  var MarkdownContent;
@@ -10454,7 +9462,7 @@ var init_MarkdownContent = __esm({
10454
9462
  init_Box();
10455
9463
  init_useTranslate();
10456
9464
  init_cn();
10457
- MarkdownContent = React113__default.memo(
9465
+ MarkdownContent = React104__default.memo(
10458
9466
  ({ content, direction, className }) => {
10459
9467
  const { t: _t } = useTranslate();
10460
9468
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -10671,7 +9679,7 @@ var init_CodeBlock = __esm({
10671
9679
  loloStyle = { ...dark, ...loloStyleOverrides };
10672
9680
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
10673
9681
  HIDDEN_LINE_NUMBERS = { display: "none" };
10674
- CodeBlock = React113__default.memo(
9682
+ CodeBlock = React104__default.memo(
10675
9683
  ({
10676
9684
  code: rawCode,
10677
9685
  language = "text",
@@ -11930,7 +10938,7 @@ var init_StateMachineView = __esm({
11930
10938
  style: { top: title ? 30 : 0 },
11931
10939
  children: [
11932
10940
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
11933
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React113__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
10941
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React104__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
11934
10942
  StateNode,
11935
10943
  {
11936
10944
  state,
@@ -12341,7 +11349,7 @@ function renderStateMachineToDomData(stateMachine, options = {}, config = DEFAUL
12341
11349
  const boxHeight = Math.max(80, fieldCount * 22 + 50);
12342
11350
  domEntity = {
12343
11351
  name: entity.name || "Entity",
12344
- fields: entity.fields?.map((f3) => typeof f3 === "string" ? f3 : f3.name) || [],
11352
+ fields: entity.fields?.map((f) => typeof f === "string" ? f : f.name) || [],
12345
11353
  x: 20,
12346
11354
  y: height / 2 - boxHeight / 2,
12347
11355
  width: boxWidth,
@@ -12456,7 +11464,7 @@ function extractEntityFields(schema) {
12456
11464
  if (!entity || typeof entity !== "object" || !("fields" in entity)) return [];
12457
11465
  const inlineEntity = entity;
12458
11466
  if (!inlineEntity.fields) return [];
12459
- return inlineEntity.fields.map((f3) => f3.name).filter((n) => typeof n === "string" && n.length > 0);
11467
+ return inlineEntity.fields.map((f) => f.name).filter((n) => typeof n === "string" && n.length > 0);
12460
11468
  }
12461
11469
  function toStateMachineDefinition(sm) {
12462
11470
  return {
@@ -14429,7 +13437,7 @@ function getAllEffectSpriteUrls(manifest) {
14429
13437
  if (manifest.animations) {
14430
13438
  for (const frames of Object.values(manifest.animations)) {
14431
13439
  if (Array.isArray(frames)) {
14432
- frames.forEach((f3) => urls.push(`${base}/${f3}`));
13440
+ frames.forEach((f) => urls.push(`${base}/${f}`));
14433
13441
  }
14434
13442
  }
14435
13443
  }
@@ -14474,8 +13482,8 @@ function createCombatPresets(manifest) {
14474
13482
  spread: 8,
14475
13483
  velocityMin: 40,
14476
13484
  velocityMax: 120,
14477
- angleMin: -PI2 * 0.8,
14478
- angleMax: -PI2 * 0.2,
13485
+ angleMin: -PI * 0.8,
13486
+ angleMax: -PI * 0.2,
14479
13487
  gravity: 0,
14480
13488
  tint: { r: 255, g: 60, b: 40 },
14481
13489
  scaleMin: 0.3,
@@ -14492,8 +13500,8 @@ function createCombatPresets(manifest) {
14492
13500
  spread: 12,
14493
13501
  velocityMin: 20,
14494
13502
  velocityMax: 60,
14495
- angleMin: -PI2 * 0.9,
14496
- angleMax: -PI2 * 0.1,
13503
+ angleMin: -PI * 0.9,
13504
+ angleMax: -PI * 0.1,
14497
13505
  gravity: 120,
14498
13506
  tint: { r: 180, g: 140, b: 90 },
14499
13507
  scaleMin: 0.15,
@@ -14510,8 +13518,8 @@ function createCombatPresets(manifest) {
14510
13518
  spread: 5,
14511
13519
  velocityMin: 10,
14512
13520
  velocityMax: 30,
14513
- angleMin: -PI2 * 0.7,
14514
- angleMax: -PI2 * 0.3,
13521
+ angleMin: -PI * 0.7,
13522
+ angleMax: -PI * 0.3,
14515
13523
  gravity: 0,
14516
13524
  tint: { r: 255, g: 200, b: 150 },
14517
13525
  scaleMin: 0.25,
@@ -14553,8 +13561,8 @@ function createCombatPresets(manifest) {
14553
13561
  spread: 4,
14554
13562
  velocityMin: 60,
14555
13563
  velocityMax: 150,
14556
- angleMin: -PI2 * 0.6,
14557
- angleMax: -PI2 * 0.4,
13564
+ angleMin: -PI * 0.6,
13565
+ angleMax: -PI * 0.4,
14558
13566
  gravity: 0,
14559
13567
  tint: { r: 255, g: 220, b: 100 },
14560
13568
  scaleMin: 0.2,
@@ -14571,8 +13579,8 @@ function createCombatPresets(manifest) {
14571
13579
  spread: 3,
14572
13580
  velocityMin: 100,
14573
13581
  velocityMax: 200,
14574
- angleMin: -PI2 * 0.55,
14575
- angleMax: -PI2 * 0.45,
13582
+ angleMin: -PI * 0.55,
13583
+ angleMax: -PI * 0.45,
14576
13584
  gravity: 0,
14577
13585
  tint: { r: 255, g: 200, b: 80 },
14578
13586
  scaleMin: 0.15,
@@ -14589,8 +13597,8 @@ function createCombatPresets(manifest) {
14589
13597
  spread: 6,
14590
13598
  velocityMin: 10,
14591
13599
  velocityMax: 30,
14592
- angleMin: -PI2 * 0.8,
14593
- angleMax: -PI2 * 0.2,
13600
+ angleMin: -PI * 0.8,
13601
+ angleMax: -PI * 0.2,
14594
13602
  gravity: -20,
14595
13603
  tint: { r: 200, g: 200, b: 200 },
14596
13604
  scaleMin: 0.2,
@@ -14633,7 +13641,7 @@ function createCombatPresets(manifest) {
14633
13641
  velocityMin: 20,
14634
13642
  velocityMax: 80,
14635
13643
  angleMin: 0,
14636
- angleMax: PI2 * 2,
13644
+ angleMax: PI * 2,
14637
13645
  gravity: -30,
14638
13646
  tint: { r: 180, g: 80, b: 255 },
14639
13647
  scaleMin: 0.2,
@@ -14654,7 +13662,7 @@ function createCombatPresets(manifest) {
14654
13662
  velocityMin: 30,
14655
13663
  velocityMax: 100,
14656
13664
  angleMin: 0,
14657
- angleMax: PI2 * 2,
13665
+ angleMax: PI * 2,
14658
13666
  gravity: -15,
14659
13667
  tint: { r: 200, g: 120, b: 255 },
14660
13668
  scaleMin: 0.1,
@@ -14672,7 +13680,7 @@ function createCombatPresets(manifest) {
14672
13680
  spread: 10,
14673
13681
  velocityMin: 15,
14674
13682
  velocityMax: 50,
14675
- angleMin: -PI2,
13683
+ angleMin: -PI,
14676
13684
  angleMax: 0,
14677
13685
  gravity: -40,
14678
13686
  tint: { r: 220, g: 180, b: 255 },
@@ -14721,8 +13729,8 @@ function createCombatPresets(manifest) {
14721
13729
  spread: 15,
14722
13730
  velocityMin: 10,
14723
13731
  velocityMax: 40,
14724
- angleMin: -PI2,
14725
- angleMax: -PI2 * 0.3,
13732
+ angleMin: -PI,
13733
+ angleMax: -PI * 0.3,
14726
13734
  gravity: -50,
14727
13735
  tint: { r: 80, g: 255, b: 120 },
14728
13736
  scaleMin: 0.15,
@@ -14740,8 +13748,8 @@ function createCombatPresets(manifest) {
14740
13748
  spread: 12,
14741
13749
  velocityMin: 15,
14742
13750
  velocityMax: 50,
14743
- angleMin: -PI2 * 0.9,
14744
- angleMax: -PI2 * 0.1,
13751
+ angleMin: -PI * 0.9,
13752
+ angleMax: -PI * 0.1,
14745
13753
  gravity: -60,
14746
13754
  tint: { r: 100, g: 255, b: 140 },
14747
13755
  scaleMin: 0.1,
@@ -14790,7 +13798,7 @@ function createCombatPresets(manifest) {
14790
13798
  velocityMin: 10,
14791
13799
  velocityMax: 35,
14792
13800
  angleMin: 0,
14793
- angleMax: PI2 * 2,
13801
+ angleMax: PI * 2,
14794
13802
  gravity: 0,
14795
13803
  tint: { r: 80, g: 160, b: 255 },
14796
13804
  scaleMin: 0.12,
@@ -14839,7 +13847,7 @@ function createCombatPresets(manifest) {
14839
13847
  velocityMin: 8,
14840
13848
  velocityMax: 30,
14841
13849
  angleMin: 0,
14842
- angleMax: PI2 * 2,
13850
+ angleMax: PI * 2,
14843
13851
  gravity: 0,
14844
13852
  tint: { r: 60, g: 180, b: 255 },
14845
13853
  scaleMin: 0.1,
@@ -14890,7 +13898,7 @@ function createCombatPresets(manifest) {
14890
13898
  velocityMin: 50,
14891
13899
  velocityMax: 150,
14892
13900
  angleMin: 0,
14893
- angleMax: PI2 * 2,
13901
+ angleMax: PI * 2,
14894
13902
  gravity: 80,
14895
13903
  tint: { r: 255, g: 180, b: 50 },
14896
13904
  scaleMin: 0.08,
@@ -14931,7 +13939,7 @@ function createCombatPresets(manifest) {
14931
13939
  velocityMin: 60,
14932
13940
  velocityMax: 180,
14933
13941
  angleMin: 0,
14934
- angleMax: PI2 * 2,
13942
+ angleMax: PI * 2,
14935
13943
  gravity: 60,
14936
13944
  tint: { r: 255, g: 120, b: 30 },
14937
13945
  scaleMin: 0.15,
@@ -14949,7 +13957,7 @@ function createCombatPresets(manifest) {
14949
13957
  velocityMin: 80,
14950
13958
  velocityMax: 200,
14951
13959
  angleMin: 0,
14952
- angleMax: PI2 * 2,
13960
+ angleMax: PI * 2,
14953
13961
  gravity: 100,
14954
13962
  tint: { r: 255, g: 200, b: 60 },
14955
13963
  scaleMin: 0.06,
@@ -14992,7 +14000,7 @@ function createCombatPresets(manifest) {
14992
14000
  velocityMin: 30,
14993
14001
  velocityMax: 100,
14994
14002
  angleMin: 0,
14995
- angleMax: PI2 * 2,
14003
+ angleMax: PI * 2,
14996
14004
  gravity: 100,
14997
14005
  tint: { r: 140, g: 140, b: 140 },
14998
14006
  scaleMin: 0.15,
@@ -15058,7 +14066,7 @@ function createCombatPresets(manifest) {
15058
14066
  spread: 15,
15059
14067
  velocityMin: 15,
15060
14068
  velocityMax: 50,
15061
- angleMin: -PI2,
14069
+ angleMin: -PI,
15062
14070
  angleMax: 0,
15063
14071
  gravity: -30,
15064
14072
  tint: { r: 255, g: 215, b: 50 },
@@ -15077,8 +14085,8 @@ function createCombatPresets(manifest) {
15077
14085
  spread: 8,
15078
14086
  velocityMin: 5,
15079
14087
  velocityMax: 20,
15080
- angleMin: -PI2 * 0.7,
15081
- angleMax: -PI2 * 0.3,
14088
+ angleMin: -PI * 0.7,
14089
+ angleMax: -PI * 0.3,
15082
14090
  gravity: -20,
15083
14091
  tint: { r: 255, g: 230, b: 100 },
15084
14092
  scaleMin: 0.2,
@@ -15126,7 +14134,7 @@ function createCombatPresets(manifest) {
15126
14134
  spread: 12,
15127
14135
  velocityMin: 15,
15128
14136
  velocityMax: 40,
15129
- angleMin: -PI2,
14137
+ angleMin: -PI,
15130
14138
  angleMax: 0,
15131
14139
  gravity: -20,
15132
14140
  tint: { r: 120, g: 40, b: 160 },
@@ -15144,8 +14152,8 @@ function createCombatPresets(manifest) {
15144
14152
  spread: 10,
15145
14153
  velocityMin: 8,
15146
14154
  velocityMax: 25,
15147
- angleMin: -PI2 * 0.8,
15148
- angleMax: -PI2 * 0.2,
14155
+ angleMin: -PI * 0.8,
14156
+ angleMax: -PI * 0.2,
15149
14157
  gravity: -15,
15150
14158
  tint: { r: 100, g: 50, b: 140 },
15151
14159
  scaleMin: 0.2,
@@ -15192,7 +14200,7 @@ function createCombatPresets(manifest) {
15192
14200
  velocityMin: 40,
15193
14201
  velocityMax: 140,
15194
14202
  angleMin: 0,
15195
- angleMax: PI2 * 2,
14203
+ angleMax: PI * 2,
15196
14204
  gravity: 40,
15197
14205
  tint: { r: 255, g: 140, b: 30 },
15198
14206
  scaleMin: 0.2,
@@ -15210,7 +14218,7 @@ function createCombatPresets(manifest) {
15210
14218
  velocityMin: 60,
15211
14219
  velocityMax: 200,
15212
14220
  angleMin: 0,
15213
- angleMax: PI2 * 2,
14221
+ angleMax: PI * 2,
15214
14222
  gravity: 60,
15215
14223
  tint: { r: 255, g: 180, b: 60 },
15216
14224
  scaleMin: 0.06,
@@ -15241,10 +14249,10 @@ function createCombatPresets(manifest) {
15241
14249
  }
15242
14250
  };
15243
14251
  }
15244
- var PI2;
14252
+ var PI;
15245
14253
  var init_combatPresets = __esm({
15246
14254
  "components/organisms/game/utils/combatPresets.ts"() {
15247
- PI2 = Math.PI;
14255
+ PI = Math.PI;
15248
14256
  }
15249
14257
  });
15250
14258
  function CanvasEffectEngine({
@@ -15700,7 +14708,7 @@ var init_Pagination = __esm({
15700
14708
  });
15701
14709
  function normalizeFields(fields) {
15702
14710
  if (!fields) return [];
15703
- return fields.map((f3) => typeof f3 === "string" ? f3 : f3.key ?? f3.name ?? "");
14711
+ return fields.map((f) => typeof f === "string" ? f : f.key ?? f.name ?? "");
15704
14712
  }
15705
14713
  function fieldLabel(key) {
15706
14714
  return key.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
@@ -15790,8 +14798,8 @@ var init_CardGrid = __esm({
15790
14798
  eventBus.emit("UI:PAGINATE", { page: newPage, pageSize });
15791
14799
  };
15792
14800
  const titleField = effectiveFieldNames?.[0];
15793
- const statusField = effectiveFieldNames?.find((f3) => STATUS_FIELDS.has(f3.toLowerCase()));
15794
- const bodyFields = effectiveFieldNames?.filter((f3) => f3 !== titleField && f3 !== statusField) ?? [];
14801
+ const statusField = effectiveFieldNames?.find((f) => STATUS_FIELDS.has(f.toLowerCase()));
14802
+ const bodyFields = effectiveFieldNames?.filter((f) => f !== titleField && f !== statusField) ?? [];
15795
14803
  const primaryActions = itemActions?.filter((a) => a.variant !== "danger") ?? [];
15796
14804
  const dangerActions = itemActions?.filter((a) => a.variant === "danger") ?? [];
15797
14805
  const handleActionClick = (action, itemData) => (e) => {
@@ -16222,7 +15230,7 @@ function CastleBoard({
16222
15230
  const [selectedFeature, setSelectedFeature] = useState(null);
16223
15231
  const hoveredFeature = useMemo(() => {
16224
15232
  if (!hoveredTile) return null;
16225
- return features.find((f3) => f3.x === hoveredTile.x && f3.y === hoveredTile.y) ?? null;
15233
+ return features.find((f) => f.x === hoveredTile.x && f.y === hoveredTile.y) ?? null;
16226
15234
  }, [hoveredTile, features]);
16227
15235
  const hoveredUnit = useMemo(() => {
16228
15236
  if (!hoveredTile) return null;
@@ -16237,7 +15245,7 @@ function CastleBoard({
16237
15245
  [scale, baseOffsetX]
16238
15246
  );
16239
15247
  const handleTileClick = useCallback((x, y) => {
16240
- const feature = features.find((f3) => f3.x === x && f3.y === y);
15248
+ const feature = features.find((f) => f.x === x && f.y === y);
16241
15249
  if (feature) {
16242
15250
  setSelectedFeature(feature);
16243
15251
  onFeatureClick?.(feature);
@@ -17650,7 +16658,7 @@ function CraftingRecipe({
17650
16658
  className
17651
16659
  }) {
17652
16660
  const eventBus = useEventBus();
17653
- const handleCraft = React113.useCallback(() => {
16661
+ const handleCraft = React104.useCallback(() => {
17654
16662
  onCraft?.();
17655
16663
  if (craftEvent) {
17656
16664
  eventBus.emit(craftEvent, { output: output.label });
@@ -17667,7 +16675,7 @@ function CraftingRecipe({
17667
16675
  children: [
17668
16676
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
17669
16677
  const hasSufficient = ingredient.available >= ingredient.required;
17670
- return /* @__PURE__ */ jsxs(React113.Fragment, { children: [
16678
+ return /* @__PURE__ */ jsxs(React104.Fragment, { children: [
17671
16679
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
17672
16680
  ItemSlot,
17673
16681
  {
@@ -17961,8 +16969,8 @@ function DPad({
17961
16969
  }) {
17962
16970
  const eventBus = useEventBus();
17963
16971
  const sizes = sizeMap15[size];
17964
- const [activeDirections, setActiveDirections] = React113.useState(/* @__PURE__ */ new Set());
17965
- const handlePress = React113.useCallback(
16972
+ const [activeDirections, setActiveDirections] = React104.useState(/* @__PURE__ */ new Set());
16973
+ const handlePress = React104.useCallback(
17966
16974
  (direction) => {
17967
16975
  setActiveDirections((prev) => new Set(prev).add(direction));
17968
16976
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -17970,7 +16978,7 @@ function DPad({
17970
16978
  },
17971
16979
  [directionEvent, eventBus, onDirection]
17972
16980
  );
17973
- const handleRelease = React113.useCallback(
16981
+ const handleRelease = React104.useCallback(
17974
16982
  (direction) => {
17975
16983
  setActiveDirections((prev) => {
17976
16984
  const next = new Set(prev);
@@ -18110,6 +17118,7 @@ var init_DashboardLayout = __esm({
18110
17118
  showSearch = false,
18111
17119
  searchEvent,
18112
17120
  onSearchSubmit,
17121
+ topBarActions = [],
18113
17122
  notifications,
18114
17123
  notificationClickEvent,
18115
17124
  onNotificationClick,
@@ -18130,6 +17139,9 @@ var init_DashboardLayout = __esm({
18130
17139
  if (notificationClickEvent) eventBus.emit(`UI:${notificationClickEvent}`, {});
18131
17140
  if (onNotificationClick) onNotificationClick();
18132
17141
  };
17142
+ const handleTopBarActionClick = (event) => {
17143
+ eventBus.emit(`UI:${event}`, {});
17144
+ };
18133
17145
  const [sidebarOpen, setSidebarOpen] = useState(false);
18134
17146
  const [userMenuOpen, setUserMenuOpen] = useState(false);
18135
17147
  const location = useLocation();
@@ -18256,6 +17268,30 @@ var init_DashboardLayout = __esm({
18256
17268
  /* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
18257
17269
  headerActions,
18258
17270
  showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
17271
+ topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
17272
+ Button,
17273
+ {
17274
+ variant: "ghost",
17275
+ className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
17276
+ onClick: () => handleTopBarActionClick(action.event),
17277
+ "aria-label": action.label ?? action.icon,
17278
+ children: [
17279
+ /* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
17280
+ action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
17281
+ Box,
17282
+ {
17283
+ as: "span",
17284
+ className: cn(
17285
+ "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
17286
+ action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
17287
+ ),
17288
+ children: action.badge
17289
+ }
17290
+ )
17291
+ ]
17292
+ },
17293
+ `${action.event}-${idx}`
17294
+ )),
18259
17295
  notificationsEnabled && /* @__PURE__ */ jsxs(
18260
17296
  Button,
18261
17297
  {
@@ -18498,9 +17534,9 @@ function DataGrid({
18498
17534
  return next;
18499
17535
  });
18500
17536
  }, [data, selectionEvent, eventBus]);
18501
- const titleField = fieldDefs.find((f3) => f3.variant === "h3" || f3.variant === "h4") ?? fieldDefs[0];
18502
- const badgeFields = fieldDefs.filter((f3) => f3.variant === "badge" && f3 !== titleField);
18503
- const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
17537
+ const titleField = fieldDefs.find((f) => f.variant === "h3" || f.variant === "h4") ?? fieldDefs[0];
17538
+ const badgeFields = fieldDefs.filter((f) => f.variant === "badge" && f !== titleField);
17539
+ const bodyFields = fieldDefs.filter((f) => f !== titleField && !badgeFields.includes(f));
18504
17540
  const primaryActions = itemActions?.filter((a) => a.variant !== "danger") ?? [];
18505
17541
  const dangerActions = itemActions?.filter((a) => a.variant === "danger") ?? [];
18506
17542
  const handleActionClick = (action, itemData) => (e) => {
@@ -18855,13 +17891,13 @@ function DataList({
18855
17891
  }) {
18856
17892
  const eventBus = useEventBus();
18857
17893
  const { t } = useTranslate();
18858
- const [visibleCount, setVisibleCount] = React113__default.useState(pageSize || Infinity);
17894
+ const [visibleCount, setVisibleCount] = React104__default.useState(pageSize || Infinity);
18859
17895
  const fieldDefs = fields ?? columns ?? [];
18860
17896
  const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
18861
17897
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
18862
17898
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
18863
17899
  const hasRenderProp = typeof children === "function";
18864
- React113__default.useEffect(() => {
17900
+ React104__default.useEffect(() => {
18865
17901
  const renderItemTypeOf = typeof schemaRenderItem;
18866
17902
  const childrenTypeOf = typeof children;
18867
17903
  if (data.length > 0 && !hasRenderProp) {
@@ -18881,11 +17917,11 @@ function DataList({
18881
17917
  });
18882
17918
  }
18883
17919
  }, [data, hasRenderProp, schemaRenderItem, children, fieldDefs]);
18884
- const titleField = fieldDefs.find((f3) => f3.variant === "h3" || f3.variant === "h4") ?? fieldDefs[0];
18885
- const badgeFields = fieldDefs.filter((f3) => f3.variant === "badge" && f3 !== titleField);
18886
- const progressFields = fieldDefs.filter((f3) => f3.variant === "progress");
17920
+ const titleField = fieldDefs.find((f) => f.variant === "h3" || f.variant === "h4") ?? fieldDefs[0];
17921
+ const badgeFields = fieldDefs.filter((f) => f.variant === "badge" && f !== titleField);
17922
+ const progressFields = fieldDefs.filter((f) => f.variant === "progress");
18887
17923
  const bodyFields = fieldDefs.filter(
18888
- (f3) => f3 !== titleField && !badgeFields.includes(f3) && !progressFields.includes(f3)
17924
+ (f) => f !== titleField && !badgeFields.includes(f) && !progressFields.includes(f)
18889
17925
  );
18890
17926
  const handleActionClick = (action, itemData) => (e) => {
18891
17927
  e.stopPropagation();
@@ -18917,14 +17953,14 @@ function DataList({
18917
17953
  const items2 = data.map((item) => item);
18918
17954
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
18919
17955
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
18920
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React113__default.Fragment, { children: [
17956
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
18921
17957
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
18922
17958
  group.items.map((itemData, index) => {
18923
17959
  const id = itemData.id || `${gi}-${index}`;
18924
17960
  const sender = senderField ? String(getNestedValue(itemData, senderField) ?? "") : "";
18925
17961
  const isSent = Boolean(currentUser && sender === currentUser);
18926
17962
  const content = getNestedValue(itemData, contentField);
18927
- const timestampField = fieldDefs.find((f3) => f3.format === "date");
17963
+ const timestampField = fieldDefs.find((f) => f.format === "date");
18928
17964
  const timestamp = timestampField ? getNestedValue(itemData, timestampField.name) : null;
18929
17965
  return /* @__PURE__ */ jsx(
18930
17966
  Box,
@@ -19108,7 +18144,7 @@ function DataList({
19108
18144
  className
19109
18145
  ),
19110
18146
  children: [
19111
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React113__default.Fragment, { children: [
18147
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
19112
18148
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
19113
18149
  group.items.map(
19114
18150
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -19163,135 +18199,6 @@ var init_DataList = __esm({
19163
18199
  DataList.displayName = "DataList";
19164
18200
  }
19165
18201
  });
19166
- function fileIcon(name) {
19167
- const ext = name.split(".").pop()?.toLowerCase() ?? "";
19168
- switch (ext) {
19169
- case "ts":
19170
- case "tsx":
19171
- return "file-code";
19172
- case "js":
19173
- case "jsx":
19174
- return "file-code";
19175
- case "json":
19176
- case "orb":
19177
- return "file-json";
19178
- case "css":
19179
- case "scss":
19180
- return "file-text";
19181
- case "md":
19182
- return "file-text";
19183
- case "py":
19184
- return "file-code";
19185
- case "html":
19186
- return "file-code";
19187
- default:
19188
- return "file";
19189
- }
19190
- }
19191
- var TreeNodeItem, FileTree;
19192
- var init_FileTree = __esm({
19193
- "components/molecules/FileTree.tsx"() {
19194
- "use client";
19195
- init_Box();
19196
- init_Typography();
19197
- init_Icon();
19198
- TreeNodeItem = ({
19199
- node,
19200
- depth,
19201
- indent,
19202
- selectedPath,
19203
- onFileSelect,
19204
- defaultExpanded = false
19205
- }) => {
19206
- const [expanded, setExpanded] = useState(defaultExpanded || depth < 1);
19207
- const isDir = node.type === "dir";
19208
- const isSelected = node.path === selectedPath;
19209
- const handleClick = useCallback(() => {
19210
- if (isDir) {
19211
- setExpanded((prev) => !prev);
19212
- } else {
19213
- onFileSelect?.(node.path);
19214
- }
19215
- }, [isDir, node.path, onFileSelect]);
19216
- return /* @__PURE__ */ jsxs(Fragment, { children: [
19217
- /* @__PURE__ */ jsxs(
19218
- Box,
19219
- {
19220
- className: `flex items-center gap-1.5 py-0.5 px-2 cursor-pointer rounded-sm transition-colors ${isSelected ? "bg-[var(--color-primary)] bg-opacity-15 text-[var(--color-primary)]" : "hover:bg-[var(--color-muted)] hover:bg-opacity-30"}`,
19221
- style: { paddingLeft: depth * indent + 8 },
19222
- onClick: handleClick,
19223
- role: "treeitem",
19224
- "aria-selected": isSelected,
19225
- "aria-expanded": isDir ? expanded : void 0,
19226
- children: [
19227
- isDir ? /* @__PURE__ */ jsx(
19228
- Icon,
19229
- {
19230
- name: expanded ? "chevron-down" : "chevron-right",
19231
- size: "xs",
19232
- className: "text-[var(--color-muted-foreground)] flex-shrink-0"
19233
- }
19234
- ) : /* @__PURE__ */ jsx(Box, { style: { width: 12, flexShrink: 0 } }),
19235
- /* @__PURE__ */ jsx(
19236
- Icon,
19237
- {
19238
- name: isDir ? expanded ? "folder-open" : "folder" : fileIcon(node.name),
19239
- size: "xs",
19240
- className: isDir ? "text-[var(--color-warning)]" : "text-[var(--color-muted-foreground)]"
19241
- }
19242
- ),
19243
- /* @__PURE__ */ jsx(
19244
- Typography,
19245
- {
19246
- variant: "caption",
19247
- className: `truncate font-mono text-[11px] ${isSelected ? "font-semibold" : ""}`,
19248
- children: node.name
19249
- }
19250
- ),
19251
- !isDir && node.size !== void 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-[var(--color-muted-foreground)] text-[9px] ml-auto flex-shrink-0", children: node.size < 1024 ? `${node.size}B` : `${Math.round(node.size / 1024)}KB` })
19252
- ]
19253
- }
19254
- ),
19255
- isDir && expanded && node.children && /* @__PURE__ */ jsx(Box, { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsx(
19256
- TreeNodeItem,
19257
- {
19258
- node: child,
19259
- depth: depth + 1,
19260
- indent,
19261
- selectedPath,
19262
- onFileSelect,
19263
- defaultExpanded: depth < 0
19264
- },
19265
- child.path
19266
- )) })
19267
- ] });
19268
- };
19269
- FileTree = ({
19270
- tree,
19271
- selectedPath,
19272
- onFileSelect,
19273
- className,
19274
- indent = 16
19275
- }) => {
19276
- if (tree.length === 0) {
19277
- return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "No files" }) });
19278
- }
19279
- return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
19280
- TreeNodeItem,
19281
- {
19282
- node,
19283
- depth: 0,
19284
- indent,
19285
- selectedPath,
19286
- onFileSelect,
19287
- defaultExpanded: true
19288
- },
19289
- node.path
19290
- )) });
19291
- };
19292
- FileTree.displayName = "FileTree";
19293
- }
19294
- });
19295
18202
  var FormField;
19296
18203
  var init_FormField = __esm({
19297
18204
  "components/molecules/FormField.tsx"() {
@@ -19578,7 +18485,7 @@ var init_FilterGroup = __esm({
19578
18485
  ) }, filter.field)),
19579
18486
  activeFilterCount > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
19580
18487
  Object.entries(selectedValues).map(([field, value]) => {
19581
- const filterDef = filters.find((f3) => f3.field === field);
18488
+ const filterDef = filters.find((f) => f.field === field);
19582
18489
  return /* @__PURE__ */ jsxs(
19583
18490
  Badge,
19584
18491
  {
@@ -20320,7 +19227,7 @@ var init_WizardProgress = __esm({
20320
19227
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
20321
19228
  const isActive = index === currentStep;
20322
19229
  const isCompleted = index < currentStep;
20323
- return /* @__PURE__ */ jsxs(React113__default.Fragment, { children: [
19230
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
20324
19231
  /* @__PURE__ */ jsx(
20325
19232
  "button",
20326
19233
  {
@@ -21231,7 +20138,7 @@ function InventoryGrid({
21231
20138
  const eventBus = useEventBus();
21232
20139
  const slotCount = totalSlots ?? items.length;
21233
20140
  const emptySlotCount = Math.max(0, slotCount - items.length);
21234
- const handleSelect = React113.useCallback(
20141
+ const handleSelect = React104.useCallback(
21235
20142
  (id) => {
21236
20143
  onSelect?.(id);
21237
20144
  if (selectEvent) {
@@ -21444,15 +20351,15 @@ function GameCanvas2D({
21444
20351
  fps = 60,
21445
20352
  className
21446
20353
  }) {
21447
- const canvasRef = React113.useRef(null);
21448
- const rafRef = React113.useRef(0);
21449
- const frameRef = React113.useRef(0);
21450
- const lastTimeRef = React113.useRef(0);
21451
- const onDrawRef = React113.useRef(onDraw);
20354
+ const canvasRef = React104.useRef(null);
20355
+ const rafRef = React104.useRef(0);
20356
+ const frameRef = React104.useRef(0);
20357
+ const lastTimeRef = React104.useRef(0);
20358
+ const onDrawRef = React104.useRef(onDraw);
21452
20359
  onDrawRef.current = onDraw;
21453
- const onTickRef = React113.useRef(onTick);
20360
+ const onTickRef = React104.useRef(onTick);
21454
20361
  onTickRef.current = onTick;
21455
- React113.useEffect(() => {
20362
+ React104.useEffect(() => {
21456
20363
  const canvas = canvasRef.current;
21457
20364
  if (!canvas) return;
21458
20365
  const ctx = canvas.getContext("2d");
@@ -21741,7 +20648,7 @@ function TurnPanel({
21741
20648
  className
21742
20649
  }) {
21743
20650
  const eventBus = useEventBus();
21744
- const handleAction = React113.useCallback(
20651
+ const handleAction = React104.useCallback(
21745
20652
  (event) => {
21746
20653
  if (event) {
21747
20654
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -21887,7 +20794,7 @@ function UnitCommandBar({
21887
20794
  className
21888
20795
  }) {
21889
20796
  const eventBus = useEventBus();
21890
- const handleCommand = React113.useCallback(
20797
+ const handleCommand = React104.useCallback(
21891
20798
  (event) => {
21892
20799
  if (event) {
21893
20800
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -22372,7 +21279,7 @@ function GameMenu({
22372
21279
  } catch {
22373
21280
  }
22374
21281
  const eventBus = eventBusProp || eventBusFromHook;
22375
- const handleOptionClick = React113.useCallback(
21282
+ const handleOptionClick = React104.useCallback(
22376
21283
  (option) => {
22377
21284
  if (option.event && eventBus) {
22378
21285
  eventBus.emit(`UI:${option.event}`, { option });
@@ -22486,7 +21393,7 @@ function GameOverScreen({
22486
21393
  } catch {
22487
21394
  }
22488
21395
  const eventBus = eventBusProp || eventBusFromHook;
22489
- const handleActionClick = React113.useCallback(
21396
+ const handleActionClick = React104.useCallback(
22490
21397
  (action) => {
22491
21398
  if (action.event && eventBus) {
22492
21399
  eventBus.emit(`UI:${action.event}`, { action });
@@ -22856,28 +21763,6 @@ var init_PlatformerCanvas = __esm({
22856
21763
  // components/molecules/game/index.ts
22857
21764
  var init_game2 = __esm({
22858
21765
  "components/molecules/game/index.ts"() {
22859
- init_DPad();
22860
- init_ActionButtons();
22861
- init_StatBadge();
22862
- init_InventoryGrid();
22863
- init_QuestTracker();
22864
- init_CraftingRecipe();
22865
- init_PowerupSlots();
22866
- init_GameCanvas2D();
22867
- init_HealthPanel();
22868
- init_ScoreBoard();
22869
- init_ResourceBar();
22870
- init_TurnPanel();
22871
- init_EnemyPlate();
22872
- init_UnitCommandBar();
22873
- init_GameHud();
22874
- init_DialogueBox();
22875
- init_CombatLog();
22876
- init_InventoryPanel();
22877
- init_GameMenu();
22878
- init_GameOverScreen();
22879
- init_PlatformerCanvas();
22880
- init_IsometricCanvas();
22881
21766
  }
22882
21767
  });
22883
21768
  function resolveNodeColor(node, groups) {
@@ -23615,7 +22500,7 @@ var init_UploadDropZone = __esm({
23615
22500
  if (action) {
23616
22501
  eventBus.emit(`UI:${action}`, {
23617
22502
  ...actionPayload,
23618
- files: valid.map((f3) => ({ name: f3.name, size: f3.size, type: f3.type }))
22503
+ files: valid.map((f) => ({ name: f.name, size: f.size, type: f.type }))
23619
22504
  });
23620
22505
  }
23621
22506
  }
@@ -24626,1758 +23511,13 @@ var init_PullToRefresh = __esm({
24626
23511
  PullToRefresh.displayName = "PullToRefresh";
24627
23512
  }
24628
23513
  });
24629
- var InstallBox;
24630
- var init_InstallBox = __esm({
24631
- "components/molecules/InstallBox.tsx"() {
24632
- "use client";
24633
- init_cn();
24634
- init_Box();
24635
- init_Typography();
24636
- init_Button();
24637
- InstallBox = ({
24638
- command,
24639
- label,
24640
- className
24641
- }) => {
24642
- const [copied, setCopied] = useState(false);
24643
- const handleCopy = useCallback(() => {
24644
- void navigator.clipboard.writeText(command);
24645
- setCopied(true);
24646
- const timer = setTimeout(() => setCopied(false), 2e3);
24647
- return () => clearTimeout(timer);
24648
- }, [command]);
24649
- return /* @__PURE__ */ jsxs(Box, { className: cn("inline-block", className), children: [
24650
- label && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "mb-1", children: label }),
24651
- /* @__PURE__ */ jsx(
24652
- Box,
24653
- {
24654
- className: "bg-surface rounded-md border-[length:var(--border-width)] border-border",
24655
- padding: "md",
24656
- children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3", children: [
24657
- /* @__PURE__ */ jsx(
24658
- Typography,
24659
- {
24660
- variant: "body2",
24661
- className: "font-mono flex-1 min-w-0 select-all",
24662
- truncate: true,
24663
- children: command
24664
- }
24665
- ),
24666
- /* @__PURE__ */ jsx(
24667
- Button,
24668
- {
24669
- variant: "ghost",
24670
- size: "sm",
24671
- leftIcon: copied ? "check" : "copy",
24672
- onClick: handleCopy,
24673
- className: "flex-shrink-0",
24674
- "aria-label": copied ? "Copied" : "Copy to clipboard",
24675
- children: copied ? "Copied" : "Copy"
24676
- }
24677
- )
24678
- ] })
24679
- }
24680
- )
24681
- ] });
24682
- };
24683
- InstallBox.displayName = "InstallBox";
24684
- }
24685
- });
24686
- var iconSizeMap, gapMap, FeatureCard;
24687
- var init_FeatureCard = __esm({
24688
- "components/molecules/FeatureCard.tsx"() {
24689
- "use client";
24690
- init_cn();
24691
- init_Card();
24692
- init_Stack();
24693
- init_Icon();
24694
- init_Typography();
24695
- init_Button();
24696
- iconSizeMap = {
24697
- sm: "lg",
24698
- md: "xl",
24699
- lg: "xl"
24700
- };
24701
- gapMap = {
24702
- sm: "sm",
24703
- md: "md",
24704
- lg: "lg"
24705
- };
24706
- FeatureCard = ({
24707
- icon,
24708
- title,
24709
- description,
24710
- href,
24711
- linkLabel = "Learn more",
24712
- variant = "bordered",
24713
- size = "md",
24714
- className
24715
- }) => {
24716
- const renderIcon = () => {
24717
- if (!icon) return null;
24718
- if (typeof icon === "string") {
24719
- return /* @__PURE__ */ jsx(
24720
- Icon,
24721
- {
24722
- name: icon,
24723
- size: iconSizeMap[size],
24724
- className: "text-accent"
24725
- }
24726
- );
24727
- }
24728
- return icon;
24729
- };
24730
- const handleLinkClick = () => {
24731
- if (href) {
24732
- window.open(href, "_blank", "noopener,noreferrer");
24733
- }
24734
- };
24735
- return /* @__PURE__ */ jsx(
24736
- Card,
24737
- {
24738
- variant,
24739
- padding: size,
24740
- className: cn(
24741
- variant === "interactive" && "hover:border-primary",
24742
- className
24743
- ),
24744
- onClick: variant === "interactive" && href ? handleLinkClick : void 0,
24745
- children: /* @__PURE__ */ jsxs(VStack, { gap: gapMap[size], align: "start", children: [
24746
- renderIcon(),
24747
- /* @__PURE__ */ jsx(Typography, { variant: "h4", className: size === "sm" ? "text-base" : void 0, children: title }),
24748
- /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: description }),
24749
- href && variant !== "interactive" && /* @__PURE__ */ jsx(
24750
- Button,
24751
- {
24752
- variant: "ghost",
24753
- size: "sm",
24754
- onClick: handleLinkClick,
24755
- className: "text-primary -ml-2",
24756
- children: linkLabel
24757
- }
24758
- )
24759
- ] })
24760
- }
24761
- );
24762
- };
24763
- FeatureCard.displayName = "FeatureCard";
24764
- }
24765
- });
24766
- var FeatureGrid;
24767
- var init_FeatureGrid = __esm({
24768
- "components/molecules/FeatureGrid.tsx"() {
24769
- "use client";
24770
- init_cn();
24771
- init_SimpleGrid();
24772
- init_FeatureCard();
24773
- FeatureGrid = ({
24774
- items,
24775
- columns = 3,
24776
- gap = "md",
24777
- className
24778
- }) => {
24779
- return /* @__PURE__ */ jsx(
24780
- SimpleGrid,
24781
- {
24782
- cols: columns,
24783
- gap,
24784
- className: cn(className),
24785
- children: items.map((item, index) => /* @__PURE__ */ jsx(FeatureCard, { ...item }, `${item.title}-${index}`))
24786
- }
24787
- );
24788
- };
24789
- FeatureGrid.displayName = "FeatureGrid";
24790
- }
24791
- });
24792
- var CTABanner;
24793
- var init_CTABanner = __esm({
24794
- "components/molecules/CTABanner.tsx"() {
24795
- "use client";
24796
- init_cn();
24797
- init_Box();
24798
- init_Stack();
24799
- init_Typography();
24800
- init_Button();
24801
- CTABanner = ({
24802
- title,
24803
- subtitle,
24804
- primaryAction,
24805
- secondaryAction,
24806
- background = "alt",
24807
- align = "center",
24808
- className
24809
- }) => {
24810
- const handleAction = (href) => {
24811
- window.open(href, "_blank", "noopener,noreferrer");
24812
- };
24813
- return /* @__PURE__ */ jsx(
24814
- Box,
24815
- {
24816
- className: cn(
24817
- "py-16",
24818
- background === "alt" && "bg-surface",
24819
- background === "dark" && "bg-surface",
24820
- background === "gradient" && "bg-surface",
24821
- background === "primary" && "bg-surface",
24822
- className
24823
- ),
24824
- children: /* @__PURE__ */ jsxs(
24825
- VStack,
24826
- {
24827
- gap: "lg",
24828
- align: align === "center" ? "center" : "start",
24829
- className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",
24830
- children: [
24831
- /* @__PURE__ */ jsx(Typography, { variant: "h2", align, children: title }),
24832
- subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", align, children: subtitle }),
24833
- (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "center", children: [
24834
- primaryAction && /* @__PURE__ */ jsx(
24835
- Button,
24836
- {
24837
- variant: "primary",
24838
- size: "lg",
24839
- onClick: () => handleAction(primaryAction.href),
24840
- children: primaryAction.label
24841
- }
24842
- ),
24843
- secondaryAction && /* @__PURE__ */ jsx(
24844
- Button,
24845
- {
24846
- variant: "secondary",
24847
- size: "lg",
24848
- onClick: () => handleAction(secondaryAction.href),
24849
- children: secondaryAction.label
24850
- }
24851
- )
24852
- ] })
24853
- ]
24854
- }
24855
- )
24856
- }
24857
- );
24858
- };
24859
- CTABanner.displayName = "CTABanner";
24860
- }
24861
- });
24862
- var tagVariantMap, MarketingImage, HeroSection;
24863
- var init_HeroSection = __esm({
24864
- "components/molecules/HeroSection.tsx"() {
24865
- "use client";
24866
- init_cn();
24867
- init_Box();
24868
- init_Stack();
24869
- init_Badge();
24870
- init_Typography();
24871
- init_Button();
24872
- init_InstallBox();
24873
- tagVariantMap = {
24874
- primary: "primary",
24875
- secondary: "secondary",
24876
- accent: "info"
24877
- };
24878
- MarketingImage = ({ src, alt, className }) => /* @__PURE__ */ jsx(
24879
- Box,
24880
- {
24881
- className: cn(
24882
- "overflow-hidden rounded-lg bg-cover bg-center bg-no-repeat",
24883
- className
24884
- ),
24885
- style: { backgroundImage: `url(${src})` },
24886
- role: "img",
24887
- "aria-label": alt
24888
- }
24889
- );
24890
- MarketingImage.displayName = "MarketingImage";
24891
- HeroSection = ({
24892
- tag,
24893
- tagVariant = "primary",
24894
- title,
24895
- titleAccent,
24896
- subtitle,
24897
- primaryAction,
24898
- secondaryAction,
24899
- installCommand,
24900
- image,
24901
- imagePosition = "below",
24902
- background = "subtle",
24903
- align = "center",
24904
- backgroundElement,
24905
- children,
24906
- className
24907
- }) => {
24908
- const isCenter = align === "center";
24909
- const isDark = background === "dark";
24910
- const titleNode = titleAccent ? /* @__PURE__ */ jsxs(
24911
- Typography,
24912
- {
24913
- variant: "h1",
24914
- align: isCenter ? "center" : "left",
24915
- className: cn(
24916
- "max-w-3xl leading-tight",
24917
- isDark && "text-background"
24918
- ),
24919
- children: [
24920
- title,
24921
- " ",
24922
- /* @__PURE__ */ jsx(
24923
- Typography,
24924
- {
24925
- as: "span",
24926
- variant: "h1",
24927
- className: "text-primary",
24928
- children: titleAccent
24929
- }
24930
- )
24931
- ]
24932
- }
24933
- ) : /* @__PURE__ */ jsx(
24934
- Typography,
24935
- {
24936
- variant: "h1",
24937
- align: isCenter ? "center" : "left",
24938
- className: cn(
24939
- "max-w-3xl leading-tight",
24940
- isDark && "text-background"
24941
- ),
24942
- children: title
24943
- }
24944
- );
24945
- const textContent = /* @__PURE__ */ jsxs(
24946
- VStack,
24947
- {
24948
- gap: "lg",
24949
- align: isCenter ? "center" : "start",
24950
- className: cn(
24951
- isCenter && "items-center",
24952
- imagePosition === "right" ? "flex-1" : "w-full"
24953
- ),
24954
- children: [
24955
- tag && /* @__PURE__ */ jsx(Badge, { variant: tagVariantMap[tagVariant] ?? "primary", size: "md", children: tag }),
24956
- titleNode,
24957
- /* @__PURE__ */ jsx(
24958
- Typography,
24959
- {
24960
- variant: "body1",
24961
- color: "muted",
24962
- align: isCenter ? "center" : "left",
24963
- className: "max-w-xl",
24964
- children: subtitle
24965
- }
24966
- ),
24967
- installCommand && /* @__PURE__ */ jsx(InstallBox, { command: installCommand }),
24968
- (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "center", children: [
24969
- primaryAction && /* @__PURE__ */ jsx(
24970
- "a",
24971
- {
24972
- href: primaryAction.href,
24973
- target: primaryAction.href.startsWith("http") ? "_blank" : void 0,
24974
- rel: primaryAction.href.startsWith("http") ? "noopener noreferrer" : void 0,
24975
- className: "no-underline",
24976
- children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", children: primaryAction.label })
24977
- }
24978
- ),
24979
- secondaryAction && /* @__PURE__ */ jsx(
24980
- "a",
24981
- {
24982
- href: secondaryAction.href,
24983
- target: secondaryAction.href.startsWith("http") ? "_blank" : void 0,
24984
- rel: secondaryAction.href.startsWith("http") ? "noopener noreferrer" : void 0,
24985
- className: "no-underline",
24986
- children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "lg", children: secondaryAction.label })
24987
- }
24988
- )
24989
- ] }),
24990
- children
24991
- ]
24992
- }
24993
- );
24994
- const imageNode = image && /* @__PURE__ */ jsx(
24995
- MarketingImage,
24996
- {
24997
- src: image.src,
24998
- alt: image.alt,
24999
- className: cn(
25000
- imagePosition === "right" ? "w-full max-w-[280px] max-h-[280px]" : "w-full min-h-[400px]"
25001
- )
25002
- }
25003
- );
25004
- const innerContent = image && imagePosition === "right" ? /* @__PURE__ */ jsxs(HStack, { gap: "xl", align: "center", className: "w-full max-w-7xl", responsive: true, children: [
25005
- textContent,
25006
- imageNode
25007
- ] }) : /* @__PURE__ */ jsxs(VStack, { gap: "xl", align: isCenter ? "center" : "start", className: "w-full max-w-7xl", children: [
25008
- textContent,
25009
- image && imagePosition === "below" && imageNode
25010
- ] });
25011
- return /* @__PURE__ */ jsxs(
25012
- Box,
25013
- {
25014
- as: "header",
25015
- className: cn(
25016
- "w-full min-h-[60vh] flex items-center justify-center",
25017
- "py-20",
25018
- "relative overflow-hidden",
25019
- className
25020
- ),
25021
- children: [
25022
- backgroundElement,
25023
- image && imagePosition === "background" && /* @__PURE__ */ jsx(
25024
- MarketingImage,
25025
- {
25026
- src: image.src,
25027
- alt: image.alt,
25028
- className: "absolute inset-0 w-full h-full opacity-20"
25029
- }
25030
- ),
25031
- /* @__PURE__ */ jsx(Box, { className: "relative z-10 w-full flex justify-center px-4 sm:px-6 lg:px-8", children: innerContent })
25032
- ]
25033
- }
25034
- );
25035
- };
25036
- HeroSection.displayName = "HeroSection";
25037
- }
25038
- });
25039
- var PricingCard;
25040
- var init_PricingCard = __esm({
25041
- "components/molecules/PricingCard.tsx"() {
25042
- "use client";
25043
- init_cn();
25044
- init_Card();
25045
- init_Stack();
25046
- init_Badge();
25047
- init_Typography();
25048
- init_Icon();
25049
- init_Divider();
25050
- init_Spacer();
25051
- init_Button();
25052
- PricingCard = ({
25053
- name,
25054
- price,
25055
- description,
25056
- features,
25057
- action,
25058
- highlighted = false,
25059
- badge,
25060
- className
25061
- }) => {
25062
- return /* @__PURE__ */ jsx(
25063
- Card,
25064
- {
25065
- variant: highlighted ? "elevated" : "bordered",
25066
- padding: "lg",
25067
- className: cn(
25068
- "flex flex-col h-full",
25069
- "hover:-translate-y-1 transition-all",
25070
- highlighted && [
25071
- "border-[length:2px] border-primary",
25072
- "shadow-lg",
25073
- "scale-[1.05]",
25074
- "ring-2 ring-primary"
25075
- ],
25076
- className
25077
- ),
25078
- children: /* @__PURE__ */ jsxs(VStack, { gap: "md", className: "flex-1", children: [
25079
- badge && /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: badge }),
25080
- /* @__PURE__ */ jsx(Typography, { variant: "h3", children: name }),
25081
- /* @__PURE__ */ jsx(
25082
- Typography,
25083
- {
25084
- variant: "h2",
25085
- className: "text-primary font-bold",
25086
- children: price
25087
- }
25088
- ),
25089
- description && /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: description }),
25090
- /* @__PURE__ */ jsx(Divider, {}),
25091
- /* @__PURE__ */ jsx(VStack, { gap: "sm", children: features.map((feature) => /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", children: [
25092
- /* @__PURE__ */ jsx(
25093
- Icon,
25094
- {
25095
- icon: Check,
25096
- size: "sm",
25097
- className: "flex-shrink-0 text-success"
25098
- }
25099
- ),
25100
- /* @__PURE__ */ jsx(Typography, { variant: "body2", children: feature })
25101
- ] }, feature)) }),
25102
- /* @__PURE__ */ jsx(Spacer, {}),
25103
- /* @__PURE__ */ jsx(
25104
- Button,
25105
- {
25106
- variant: highlighted ? "primary" : "secondary",
25107
- size: "lg",
25108
- className: "w-full",
25109
- children: action.label
25110
- }
25111
- )
25112
- ] })
25113
- }
25114
- );
25115
- };
25116
- PricingCard.displayName = "PricingCard";
25117
- }
25118
- });
25119
- var PricingGrid;
25120
- var init_PricingGrid = __esm({
25121
- "components/molecules/PricingGrid.tsx"() {
25122
- "use client";
25123
- init_cn();
25124
- init_SimpleGrid();
25125
- init_PricingCard();
25126
- PricingGrid = ({
25127
- plans,
25128
- className
25129
- }) => {
25130
- const cols = Math.min(plans.length, 4);
25131
- return /* @__PURE__ */ jsx(
25132
- SimpleGrid,
25133
- {
25134
- cols: cols > 0 ? cols : 1,
25135
- gap: "lg",
25136
- className: cn("items-stretch", className),
25137
- children: plans.map((plan) => /* @__PURE__ */ jsx(PricingCard, { ...plan }, plan.name))
25138
- }
25139
- );
25140
- };
25141
- PricingGrid.displayName = "PricingGrid";
25142
- }
25143
- });
25144
- var StatsGrid;
25145
- var init_StatsGrid = __esm({
25146
- "components/molecules/StatsGrid.tsx"() {
25147
- "use client";
25148
- init_cn();
25149
- init_SimpleGrid();
25150
- init_Stack();
25151
- init_Typography();
25152
- StatsGrid = ({
25153
- stats,
25154
- columns = 3,
25155
- className
25156
- }) => {
25157
- return /* @__PURE__ */ jsx(SimpleGrid, { cols: columns, gap: "lg", className: cn("w-full", className), children: stats.map((stat) => /* @__PURE__ */ jsxs(VStack, { gap: "xs", align: "center", className: "py-4", children: [
25158
- /* @__PURE__ */ jsx(
25159
- Typography,
25160
- {
25161
- variant: "h2",
25162
- className: "font-bold text-primary",
25163
- children: stat.value
25164
- }
25165
- ),
25166
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: stat.label })
25167
- ] }, stat.label)) });
25168
- };
25169
- StatsGrid.displayName = "StatsGrid";
25170
- }
25171
- });
25172
- var ServiceCatalog;
25173
- var init_ServiceCatalog = __esm({
25174
- "components/molecules/ServiceCatalog.tsx"() {
25175
- "use client";
25176
- init_cn();
25177
- init_Card();
25178
- init_Stack();
25179
- init_Badge();
25180
- init_Typography();
25181
- init_SimpleGrid();
25182
- ServiceCatalog = ({
25183
- services,
25184
- className
25185
- }) => {
25186
- return /* @__PURE__ */ jsx(SimpleGrid, { cols: 4, gap: "sm", className: cn(className), children: services.map((service) => /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "sm", children: /* @__PURE__ */ jsxs(VStack, { gap: "xs", align: "start", children: [
25187
- /* @__PURE__ */ jsx(
25188
- Badge,
25189
- {
25190
- size: "sm",
25191
- className: service.layerColor,
25192
- children: service.layer
25193
- }
25194
- ),
25195
- /* @__PURE__ */ jsx(Typography, { variant: "body", children: service.name })
25196
- ] }) }, service.name)) });
25197
- };
25198
- ServiceCatalog.displayName = "ServiceCatalog";
25199
- }
25200
- });
25201
- var CaseStudyCard;
25202
- var init_CaseStudyCard = __esm({
25203
- "components/molecules/CaseStudyCard.tsx"() {
25204
- "use client";
25205
- init_cn();
25206
- init_Card();
25207
- init_Stack();
25208
- init_Badge();
25209
- init_Typography();
25210
- init_Button();
25211
- CaseStudyCard = ({
25212
- title,
25213
- description,
25214
- category,
25215
- categoryColor,
25216
- href,
25217
- linkLabel = "Read more",
25218
- className
25219
- }) => {
25220
- const handleClick = () => {
25221
- window.open(href, "_blank", "noopener,noreferrer");
25222
- };
25223
- return /* @__PURE__ */ jsx(Card, { variant: "interactive", className: cn(className), children: /* @__PURE__ */ jsxs(VStack, { gap: "md", align: "start", children: [
25224
- /* @__PURE__ */ jsx(
25225
- Badge,
25226
- {
25227
- size: "sm",
25228
- style: categoryColor ? { backgroundColor: categoryColor, color: "white" } : void 0,
25229
- children: category
25230
- }
25231
- ),
25232
- /* @__PURE__ */ jsx(Typography, { variant: "h3", children: title }),
25233
- /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: description }),
25234
- /* @__PURE__ */ jsxs(
25235
- Button,
25236
- {
25237
- variant: "ghost",
25238
- size: "sm",
25239
- onClick: handleClick,
25240
- className: "text-primary -ml-2",
25241
- children: [
25242
- linkLabel,
25243
- " \u2192"
25244
- ]
25245
- }
25246
- )
25247
- ] }) });
25248
- };
25249
- CaseStudyCard.displayName = "CaseStudyCard";
25250
- }
25251
- });
25252
- var ArticleSection;
25253
- var init_ArticleSection = __esm({
25254
- "components/molecules/ArticleSection.tsx"() {
25255
- "use client";
25256
- init_cn();
25257
- init_Box();
25258
- init_Stack();
25259
- init_Typography();
25260
- ArticleSection = ({
25261
- title,
25262
- children,
25263
- maxWidth = "md",
25264
- className
25265
- }) => {
25266
- return /* @__PURE__ */ jsx(
25267
- Box,
25268
- {
25269
- className: cn(
25270
- "w-full",
25271
- className
25272
- ),
25273
- padding: "md",
25274
- children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "start", children: [
25275
- /* @__PURE__ */ jsx(Typography, { variant: "h2", children: title }),
25276
- /* @__PURE__ */ jsx(Box, { className: "w-full", children })
25277
- ] })
25278
- }
25279
- );
25280
- };
25281
- ArticleSection.displayName = "ArticleSection";
25282
- }
25283
- });
25284
- var CodeExample;
25285
- var init_CodeExample = __esm({
25286
- "components/molecules/CodeExample.tsx"() {
25287
- "use client";
25288
- init_cn();
25289
- init_Box();
25290
- init_Stack();
25291
- init_Typography();
25292
- init_Button();
25293
- init_Spacer();
25294
- CodeExample = ({
25295
- code,
25296
- language,
25297
- title,
25298
- copyable = false,
25299
- maxHeight,
25300
- className
25301
- }) => {
25302
- const [copied, setCopied] = useState(false);
25303
- const handleCopy = useCallback(() => {
25304
- void navigator.clipboard.writeText(code);
25305
- setCopied(true);
25306
- const timer = setTimeout(() => setCopied(false), 2e3);
25307
- return () => clearTimeout(timer);
25308
- }, [code]);
25309
- const showHeader = title || copyable;
25310
- return /* @__PURE__ */ jsxs(
25311
- Box,
25312
- {
25313
- className: cn(
25314
- "bg-foreground",
25315
- "rounded-md",
25316
- "border-[length:var(--border-width)] border-border",
25317
- "overflow-hidden",
25318
- className
25319
- ),
25320
- children: [
25321
- showHeader && /* @__PURE__ */ jsx(
25322
- Box,
25323
- {
25324
- className: "bg-foreground border-b-[length:var(--border-width)] border-border",
25325
- padding: "sm",
25326
- children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", children: [
25327
- title ? /* @__PURE__ */ jsx(
25328
- Typography,
25329
- {
25330
- variant: "caption",
25331
- className: "text-background opacity-70",
25332
- children: title
25333
- }
25334
- ) : /* @__PURE__ */ jsx(
25335
- Typography,
25336
- {
25337
- variant: "caption",
25338
- className: "text-background opacity-50",
25339
- children: language
25340
- }
25341
- ),
25342
- /* @__PURE__ */ jsx(Spacer, {}),
25343
- copyable && /* @__PURE__ */ jsx(
25344
- Button,
25345
- {
25346
- variant: "ghost",
25347
- size: "sm",
25348
- onClick: handleCopy,
25349
- className: "text-background hover:text-background opacity-70 hover:opacity-100",
25350
- children: copied ? "Copied!" : "Copy"
25351
- }
25352
- )
25353
- ] })
25354
- }
25355
- ),
25356
- /* @__PURE__ */ jsx(
25357
- Box,
25358
- {
25359
- className: "overflow-auto",
25360
- padding: "md",
25361
- style: maxHeight ? { maxHeight } : void 0,
25362
- children: /* @__PURE__ */ jsx(
25363
- Typography,
25364
- {
25365
- variant: "body2",
25366
- className: "font-mono text-sm whitespace-pre text-background select-all",
25367
- children: code
25368
- }
25369
- )
25370
- }
25371
- )
25372
- ]
25373
- }
25374
- );
25375
- };
25376
- CodeExample.displayName = "CodeExample";
25377
- }
25378
- });
25379
- var LogosVariant, QuotesVariant, BadgesVariant, SocialProof;
25380
- var init_SocialProof = __esm({
25381
- "components/molecules/SocialProof.tsx"() {
25382
- "use client";
25383
- init_cn();
25384
- init_Box();
25385
- init_Stack();
25386
- init_Stack();
25387
- init_Card();
25388
- init_Badge();
25389
- init_Typography();
25390
- init_SimpleGrid();
25391
- LogosVariant = ({ items }) => /* @__PURE__ */ jsx(HStack, { gap: "xl", justify: "center", className: "flex-wrap", children: items.map((item) => /* @__PURE__ */ jsx(
25392
- Box,
25393
- {
25394
- className: "opacity-60 hover:opacity-100 transition-opacity cursor-default",
25395
- children: /* @__PURE__ */ jsxs(VStack, { gap: "xs", align: "center", children: [
25396
- item.logo && /* @__PURE__ */ jsx(
25397
- Box,
25398
- {
25399
- className: "w-12 h-12 bg-contain bg-center bg-no-repeat",
25400
- style: { backgroundImage: `url(${item.logo})` }
25401
- }
25402
- ),
25403
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: item.name })
25404
- ] })
25405
- },
25406
- item.name
25407
- )) });
25408
- LogosVariant.displayName = "SocialProof.LogosVariant";
25409
- QuotesVariant = ({ items }) => {
25410
- const cols = items.length >= 3 ? 3 : items.length >= 2 ? 2 : 1;
25411
- return /* @__PURE__ */ jsx(SimpleGrid, { cols, gap: "md", children: items.map((item) => /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "md", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "start", children: [
25412
- item.quote && /* @__PURE__ */ jsxs(Typography, { variant: "body", className: "italic", children: [
25413
- "\u201C",
25414
- item.quote,
25415
- "\u201D"
25416
- ] }),
25417
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: item.name })
25418
- ] }) }, item.name)) });
25419
- };
25420
- QuotesVariant.displayName = "SocialProof.QuotesVariant";
25421
- BadgesVariant = ({ items }) => /* @__PURE__ */ jsx(HStack, { gap: "sm", justify: "center", className: "flex-wrap", children: items.map((item) => /* @__PURE__ */ jsx(Badge, { size: "md", children: item.name }, item.name)) });
25422
- BadgesVariant.displayName = "SocialProof.BadgesVariant";
25423
- SocialProof = ({
25424
- items,
25425
- variant = "logos",
25426
- className
25427
- }) => {
25428
- return /* @__PURE__ */ jsxs(Box, { className: cn(className), children: [
25429
- variant === "logos" && /* @__PURE__ */ jsx(LogosVariant, { items }),
25430
- variant === "quotes" && /* @__PURE__ */ jsx(QuotesVariant, { items }),
25431
- variant === "badges" && /* @__PURE__ */ jsx(BadgesVariant, { items })
25432
- ] });
25433
- };
25434
- SocialProof.displayName = "SocialProof";
25435
- }
25436
- });
25437
- var StepCircle, StepFlow;
25438
- var init_StepFlow = __esm({
25439
- "components/molecules/StepFlow.tsx"() {
25440
- "use client";
25441
- init_cn();
25442
- init_Box();
25443
- init_Stack();
25444
- init_Center();
25445
- init_Typography();
25446
- init_Icon();
25447
- init_Divider();
25448
- StepCircle = ({ step, index }) => {
25449
- if (step.icon) {
25450
- return /* @__PURE__ */ jsx(
25451
- Center,
25452
- {
25453
- className: cn(
25454
- "w-10 h-10 rounded-full flex-shrink-0",
25455
- "flex items-center justify-center",
25456
- "bg-primary text-primary-foreground"
25457
- ),
25458
- children: /* @__PURE__ */ jsx(Icon, { name: step.icon, size: "sm", className: "text-primary-foreground" })
25459
- }
25460
- );
25461
- }
25462
- return /* @__PURE__ */ jsx(
25463
- Center,
25464
- {
25465
- className: cn(
25466
- "w-10 h-10 rounded-full flex-shrink-0",
25467
- "flex items-center justify-center",
25468
- "bg-primary text-primary-foreground"
25469
- ),
25470
- children: /* @__PURE__ */ jsx("span", { className: "font-semibold text-sm text-primary-foreground leading-none", children: step.number ?? index + 1 })
25471
- }
25472
- );
25473
- };
25474
- StepCircle.displayName = "StepCircle";
25475
- StepFlow = ({
25476
- steps,
25477
- orientation = "horizontal",
25478
- showConnectors = true,
25479
- className
25480
- }) => {
25481
- if (orientation === "vertical") {
25482
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React113__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
25483
- /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
25484
- /* @__PURE__ */ jsx(StepCircle, { step, index }),
25485
- showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
25486
- ] }),
25487
- /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 pt-1", children: [
25488
- /* @__PURE__ */ jsx(Typography, { variant: "h4", children: step.title }),
25489
- /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: step.description })
25490
- ] })
25491
- ] }) }, index)) });
25492
- }
25493
- 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(React113__default.Fragment, { children: [
25494
- /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
25495
- /* @__PURE__ */ jsx(StepCircle, { step, index }),
25496
- /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
25497
- /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "text-center", children: step.description })
25498
- ] }),
25499
- showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 self-center py-2 md:pt-5 md:py-0 md:px-2", children: /* @__PURE__ */ jsx(Divider, { orientation: "horizontal", className: "w-12 md:w-12" }) })
25500
- ] }, index)) });
25501
- };
25502
- StepFlow.displayName = "StepFlow";
25503
- }
25504
- });
25505
- var SplitSection;
25506
- var init_SplitSection = __esm({
25507
- "components/molecules/SplitSection.tsx"() {
25508
- "use client";
25509
- init_cn();
25510
- init_Box();
25511
- init_Stack();
25512
- init_Typography();
25513
- init_Icon();
25514
- SplitSection = ({
25515
- title,
25516
- description,
25517
- bullets,
25518
- image,
25519
- imagePosition = "right",
25520
- background = "default",
25521
- children,
25522
- className
25523
- }) => {
25524
- const textContent = /* @__PURE__ */ jsxs(VStack, { gap: "md", className: "flex-1 min-w-0", children: [
25525
- /* @__PURE__ */ jsx(Typography, { variant: "h2", children: title }),
25526
- typeof description === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: description }) : description,
25527
- bullets && bullets.length > 0 && /* @__PURE__ */ jsx(VStack, { gap: "sm", children: bullets.map((bullet, index) => /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", className: "mt-0.5", children: [
25528
- /* @__PURE__ */ jsx(
25529
- Icon,
25530
- {
25531
- name: "check",
25532
- size: "sm",
25533
- className: "text-primary flex-shrink-0 mt-0.5"
25534
- }
25535
- ),
25536
- /* @__PURE__ */ jsx(Typography, { variant: "body2", children: bullet })
25537
- ] }, index)) })
25538
- ] });
25539
- const mediaContent = children ?? (image ? /* @__PURE__ */ jsx(
25540
- Box,
25541
- {
25542
- className: cn(
25543
- "flex-1 min-w-0 min-h-[240px] rounded-md",
25544
- "bg-cover bg-center"
25545
- ),
25546
- style: { backgroundImage: `url(${image.src})` },
25547
- role: "img",
25548
- "aria-label": image.alt
25549
- }
25550
- ) : null);
25551
- const isImageLeft = imagePosition === "left";
25552
- return /* @__PURE__ */ jsx(
25553
- Box,
25554
- {
25555
- className: cn(
25556
- "w-full",
25557
- background === "alt" ? "bg-muted" : "bg-background",
25558
- className
25559
- ),
25560
- padding: "lg",
25561
- children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col lg:flex-row gap-10 lg:gap-16 items-center", isImageLeft && "lg:flex-row-reverse"), children: [
25562
- /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 lg:min-w-[45%]", children: textContent }),
25563
- /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 lg:max-w-[50%]", children: mediaContent })
25564
- ] })
25565
- }
25566
- );
25567
- };
25568
- SplitSection.displayName = "SplitSection";
25569
- }
25570
- });
25571
- function normalizeTags(tags) {
25572
- if (tags.length === 0) return [];
25573
- if (typeof tags[0] === "string") {
25574
- return tags.map((label) => ({ label }));
25575
- }
25576
- return tags;
25577
- }
25578
- var variantMap4, TagCloud;
25579
- var init_TagCloud = __esm({
25580
- "components/molecules/TagCloud.tsx"() {
25581
- "use client";
25582
- init_cn();
25583
- init_Stack();
25584
- init_Badge();
25585
- variantMap4 = {
25586
- default: "default",
25587
- primary: "primary",
25588
- accent: "info"
25589
- };
25590
- TagCloud = ({
25591
- tags,
25592
- variant = "default",
25593
- className
25594
- }) => {
25595
- const normalizedTags = normalizeTags(tags);
25596
- return /* @__PURE__ */ jsx(HStack, { gap: "sm", className: cn("flex-wrap justify-center", className), children: normalizedTags.map((tag, index) => {
25597
- const badgeVariant = tag.variant ? variantMap4[tag.variant] ?? "default" : variantMap4[variant] ?? "default";
25598
- return /* @__PURE__ */ jsx(Badge, { variant: badgeVariant, label: tag.label }, index);
25599
- }) });
25600
- };
25601
- TagCloud.displayName = "TagCloud";
25602
- }
25603
- });
25604
- function formatCount(count) {
25605
- if (count >= 1e3) {
25606
- return `${(count / 1e3).toFixed(1)}k`;
25607
- }
25608
- return String(count);
25609
- }
25610
- var CommunityLinks;
25611
- var init_CommunityLinks = __esm({
25612
- "components/molecules/CommunityLinks.tsx"() {
25613
- "use client";
25614
- init_Stack();
25615
- init_Typography();
25616
- init_Button();
25617
- init_Icon();
25618
- CommunityLinks = ({
25619
- github,
25620
- discord,
25621
- twitter,
25622
- heading,
25623
- subtitle,
25624
- className
25625
- }) => {
25626
- const openLink = (url) => () => {
25627
- window.open(url, "_blank", "noopener,noreferrer");
25628
- };
25629
- return /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "center", className, children: [
25630
- heading && /* @__PURE__ */ jsx(Typography, { variant: "h2", className: "text-center", children: heading }),
25631
- subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", className: "text-center", children: subtitle }),
25632
- /* @__PURE__ */ jsxs(HStack, { gap: "md", className: "flex-wrap justify-center", children: [
25633
- github && /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: openLink(github.url), children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", children: [
25634
- /* @__PURE__ */ jsx(Icon, { name: "github", size: "sm" }),
25635
- /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-inherit", children: github.stars != null ? `GitHub (${formatCount(github.stars)} stars)` : "GitHub" })
25636
- ] }) }),
25637
- discord && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: openLink(discord.url), children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", children: [
25638
- /* @__PURE__ */ jsx(Icon, { name: "message-circle", size: "sm" }),
25639
- /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-inherit", children: discord.members != null ? `Discord (${formatCount(discord.members)} members)` : "Discord" })
25640
- ] }) }),
25641
- twitter && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: openLink(twitter.url), children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", children: [
25642
- /* @__PURE__ */ jsx(Icon, { name: "twitter", size: "sm" }),
25643
- /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-inherit", children: twitter.followers != null ? `Twitter (${formatCount(twitter.followers)} followers)` : "Twitter" })
25644
- ] }) })
25645
- ] })
25646
- ] });
25647
- };
25648
- CommunityLinks.displayName = "CommunityLinks";
25649
- }
25650
- });
25651
- var TeamCard;
25652
- var init_TeamCard = __esm({
25653
- "components/molecules/TeamCard.tsx"() {
25654
- "use client";
25655
- init_cn();
25656
- init_Box();
25657
- init_Card();
25658
- init_Stack();
25659
- init_Avatar();
25660
- init_Typography();
25661
- TeamCard = ({
25662
- name,
25663
- nameAr,
25664
- role,
25665
- bio,
25666
- avatar,
25667
- className
25668
- }) => {
25669
- const avatarSrc = typeof avatar === "string" ? avatar : void 0;
25670
- const avatarInitials = typeof avatar === "object" && avatar !== null ? avatar.initials : void 0;
25671
- return /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: cn("w-full", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "md", align: "center", children: [
25672
- /* @__PURE__ */ jsx(
25673
- Avatar,
25674
- {
25675
- src: avatarSrc,
25676
- initials: avatarInitials,
25677
- name: !avatarSrc && !avatarInitials ? name : void 0,
25678
- size: "lg"
25679
- }
25680
- ),
25681
- /* @__PURE__ */ jsx(Typography, { variant: "h3", className: "text-center", children: name }),
25682
- nameAr && /* @__PURE__ */ jsx(Box, { className: "text-center", style: { direction: "rtl" }, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: nameAr }) }),
25683
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: role }),
25684
- /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-center", children: bio })
25685
- ] }) });
25686
- };
25687
- TeamCard.displayName = "TeamCard";
25688
- }
25689
- });
25690
- var ShowcaseCard;
25691
- var init_ShowcaseCard = __esm({
25692
- "components/molecules/ShowcaseCard.tsx"() {
25693
- "use client";
25694
- init_cn();
25695
- init_Card();
25696
- init_Box();
25697
- init_Stack();
25698
- init_Badge();
25699
- init_Typography();
25700
- ShowcaseCard = ({
25701
- title,
25702
- description,
25703
- image,
25704
- href,
25705
- badge,
25706
- accentColor,
25707
- className
25708
- }) => {
25709
- const cardVariant = href ? "interactive" : "bordered";
25710
- const handleClick = () => {
25711
- if (href) {
25712
- window.open(href, "_blank", "noopener,noreferrer");
25713
- }
25714
- };
25715
- return /* @__PURE__ */ jsxs(
25716
- Card,
25717
- {
25718
- variant: cardVariant,
25719
- padding: "none",
25720
- className: cn("overflow-hidden w-full", className),
25721
- style: accentColor ? { borderTopColor: accentColor, borderTopWidth: "3px" } : void 0,
25722
- onClick: href ? handleClick : void 0,
25723
- children: [
25724
- /* @__PURE__ */ jsx(
25725
- Box,
25726
- {
25727
- className: cn(
25728
- "w-full aspect-video bg-cover bg-center",
25729
- "rounded-t-md"
25730
- ),
25731
- style: { backgroundImage: `url(${image.src})` },
25732
- role: "img",
25733
- "aria-label": image.alt
25734
- }
25735
- ),
25736
- /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "p-4", children: [
25737
- badge && /* @__PURE__ */ jsx(Badge, { variant: "primary", label: badge }),
25738
- /* @__PURE__ */ jsx(Typography, { variant: "h3", children: title }),
25739
- description && /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: description })
25740
- ] })
25741
- ]
25742
- }
25743
- );
25744
- };
25745
- ShowcaseCard.displayName = "ShowcaseCard";
25746
- }
25747
- });
25748
- function PatternDefs({
25749
- patternId,
25750
- variant,
25751
- size,
25752
- color,
25753
- strokeWidth
25754
- }) {
25755
- const dims = getTileDimensions(variant, size);
25756
- return /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
25757
- "pattern",
25758
- {
25759
- id: patternId,
25760
- x: "0",
25761
- y: "0",
25762
- width: dims.width,
25763
- height: dims.height,
25764
- patternUnits: "userSpaceOnUse",
25765
- children: /* @__PURE__ */ jsx(
25766
- PatternTile,
25767
- {
25768
- variant,
25769
- size,
25770
- color,
25771
- strokeWidth
25772
- }
25773
- )
25774
- }
25775
- ) });
25776
- }
25777
- function BackgroundMode({
25778
- patternId,
25779
- variant,
25780
- size,
25781
- color,
25782
- strokeWidth,
25783
- opacity,
25784
- className
25785
- }) {
25786
- return /* @__PURE__ */ jsxs(
25787
- "svg",
25788
- {
25789
- className: cn("absolute inset-0 w-full h-full pointer-events-none", className),
25790
- preserveAspectRatio: "none",
25791
- "aria-hidden": "true",
25792
- children: [
25793
- /* @__PURE__ */ jsx(
25794
- PatternDefs,
25795
- {
25796
- patternId,
25797
- variant,
25798
- size,
25799
- color,
25800
- strokeWidth
25801
- }
25802
- ),
25803
- /* @__PURE__ */ jsx(
25804
- "rect",
25805
- {
25806
- width: "100%",
25807
- height: "100%",
25808
- fill: `url(#${patternId})`,
25809
- opacity
25810
- }
25811
- )
25812
- ]
25813
- }
25814
- );
25815
- }
25816
- function SideMode({
25817
- patternId,
25818
- variant,
25819
- size,
25820
- color,
25821
- strokeWidth,
25822
- opacity,
25823
- side,
25824
- className
25825
- }) {
25826
- const maskId = `${patternId}-mask`;
25827
- const gradientId = `${patternId}-grad`;
25828
- const x1 = side === "left" ? "0%" : "100%";
25829
- const x2 = side === "left" ? "60%" : "40%";
25830
- return /* @__PURE__ */ jsxs(
25831
- "svg",
25832
- {
25833
- className: cn("absolute inset-0 w-full h-full pointer-events-none", className),
25834
- preserveAspectRatio: "none",
25835
- "aria-hidden": "true",
25836
- children: [
25837
- /* @__PURE__ */ jsx(
25838
- PatternDefs,
25839
- {
25840
- patternId,
25841
- variant,
25842
- size,
25843
- color,
25844
- strokeWidth
25845
- }
25846
- ),
25847
- /* @__PURE__ */ jsxs("defs", { children: [
25848
- /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1, y1: "0%", x2, y2: "0%", children: [
25849
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "1" }),
25850
- /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "0" })
25851
- ] }),
25852
- /* @__PURE__ */ jsx("mask", { id: maskId, children: /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${gradientId})` }) })
25853
- ] }),
25854
- /* @__PURE__ */ jsx(
25855
- "rect",
25856
- {
25857
- width: "100%",
25858
- height: "100%",
25859
- fill: `url(#${patternId})`,
25860
- mask: `url(#${maskId})`,
25861
- opacity
25862
- }
25863
- )
25864
- ]
25865
- }
25866
- );
25867
- }
25868
- function DualMode({
25869
- patternId,
25870
- variant,
25871
- size,
25872
- color,
25873
- strokeWidth,
25874
- opacity,
25875
- className
25876
- }) {
25877
- const maskId = `${patternId}-dmask`;
25878
- const gradientId = `${patternId}-dgrad`;
25879
- return /* @__PURE__ */ jsxs(
25880
- "svg",
25881
- {
25882
- className: cn("absolute inset-0 w-full h-full pointer-events-none", className),
25883
- preserveAspectRatio: "none",
25884
- "aria-hidden": "true",
25885
- children: [
25886
- /* @__PURE__ */ jsx(
25887
- PatternDefs,
25888
- {
25889
- patternId,
25890
- variant,
25891
- size,
25892
- color,
25893
- strokeWidth
25894
- }
25895
- ),
25896
- /* @__PURE__ */ jsxs("defs", { children: [
25897
- /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
25898
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "1" }),
25899
- /* @__PURE__ */ jsx("stop", { offset: "35%", stopColor: "white", stopOpacity: "0" }),
25900
- /* @__PURE__ */ jsx("stop", { offset: "65%", stopColor: "white", stopOpacity: "0" }),
25901
- /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "1" })
25902
- ] }),
25903
- /* @__PURE__ */ jsx("mask", { id: maskId, children: /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${gradientId})` }) })
25904
- ] }),
25905
- /* @__PURE__ */ jsx(
25906
- "rect",
25907
- {
25908
- width: "100%",
25909
- height: "100%",
25910
- fill: `url(#${patternId})`,
25911
- mask: `url(#${maskId})`,
25912
- opacity
25913
- }
25914
- )
25915
- ]
25916
- }
25917
- );
25918
- }
25919
- function AroundMode({
25920
- patternId,
25921
- variant,
25922
- size,
25923
- color,
25924
- strokeWidth,
25925
- opacity,
25926
- className
25927
- }) {
25928
- const maskId = `${patternId}-amask`;
25929
- const gradientId = `${patternId}-agrad`;
25930
- return /* @__PURE__ */ jsxs(
25931
- "svg",
25932
- {
25933
- className: cn("absolute inset-0 w-full h-full pointer-events-none", className),
25934
- preserveAspectRatio: "none",
25935
- "aria-hidden": "true",
25936
- children: [
25937
- /* @__PURE__ */ jsx(
25938
- PatternDefs,
25939
- {
25940
- patternId,
25941
- variant,
25942
- size,
25943
- color,
25944
- strokeWidth
25945
- }
25946
- ),
25947
- /* @__PURE__ */ jsxs("defs", { children: [
25948
- /* @__PURE__ */ jsxs("radialGradient", { id: gradientId, cx: "50%", cy: "50%", r: "50%", children: [
25949
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "0" }),
25950
- /* @__PURE__ */ jsx("stop", { offset: "55%", stopColor: "white", stopOpacity: "0" }),
25951
- /* @__PURE__ */ jsx("stop", { offset: "85%", stopColor: "white", stopOpacity: "1" }),
25952
- /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "1" })
25953
- ] }),
25954
- /* @__PURE__ */ jsx("mask", { id: maskId, children: /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${gradientId})` }) })
25955
- ] }),
25956
- /* @__PURE__ */ jsx(
25957
- "rect",
25958
- {
25959
- width: "100%",
25960
- height: "100%",
25961
- fill: `url(#${patternId})`,
25962
- mask: `url(#${maskId})`,
25963
- opacity
25964
- }
25965
- )
25966
- ]
25967
- }
25968
- );
25969
- }
25970
- function FrameStrip({
25971
- patternId,
25972
- variant,
25973
- size,
25974
- color,
25975
- strokeWidth,
25976
- opacity,
25977
- height
25978
- }) {
25979
- return /* @__PURE__ */ jsxs(
25980
- "svg",
25981
- {
25982
- className: "w-full pointer-events-none",
25983
- style: { height },
25984
- preserveAspectRatio: "none",
25985
- "aria-hidden": "true",
25986
- children: [
25987
- /* @__PURE__ */ jsx(
25988
- PatternDefs,
25989
- {
25990
- patternId,
25991
- variant,
25992
- size,
25993
- color,
25994
- strokeWidth
25995
- }
25996
- ),
25997
- /* @__PURE__ */ jsx(
25998
- "rect",
25999
- {
26000
- width: "100%",
26001
- height: "100%",
26002
- fill: `url(#${patternId})`,
26003
- opacity
26004
- }
26005
- )
26006
- ]
26007
- }
26008
- );
26009
- }
26010
- var GeometricPattern;
26011
- var init_GeometricPattern = __esm({
26012
- "components/molecules/GeometricPattern.tsx"() {
26013
- "use client";
26014
- init_cn();
26015
- init_PatternTile();
26016
- init_Box();
26017
- GeometricPattern = ({
26018
- variant = "star8",
26019
- mode = "background",
26020
- opacity = 0.06,
26021
- color = "var(--color-primary)",
26022
- scale = 1,
26023
- strokeWidth = 0.5,
26024
- children,
26025
- className
26026
- }) => {
26027
- const reactId = useId();
26028
- const patternId = `gp${reactId.replace(/:/g, "")}`;
26029
- const size = 60 * scale;
26030
- const stripHeight = 40 * scale;
26031
- if (mode === "frame") {
26032
- const topId = `${patternId}-top`;
26033
- const botId = `${patternId}-bot`;
26034
- return /* @__PURE__ */ jsxs(Box, { className: cn("relative", className), children: [
26035
- /* @__PURE__ */ jsx(
26036
- FrameStrip,
26037
- {
26038
- patternId: topId,
26039
- variant,
26040
- size,
26041
- color,
26042
- strokeWidth,
26043
- opacity,
26044
- height: stripHeight
26045
- }
26046
- ),
26047
- children,
26048
- /* @__PURE__ */ jsx(
26049
- FrameStrip,
26050
- {
26051
- patternId: botId,
26052
- variant,
26053
- size,
26054
- color,
26055
- strokeWidth,
26056
- opacity,
26057
- height: stripHeight
26058
- }
26059
- )
26060
- ] });
26061
- }
26062
- if (mode === "around") {
26063
- return /* @__PURE__ */ jsx(
26064
- AroundMode,
26065
- {
26066
- patternId,
26067
- variant,
26068
- size,
26069
- color,
26070
- strokeWidth,
26071
- opacity,
26072
- className
26073
- }
26074
- );
26075
- }
26076
- if (mode === "dual") {
26077
- return /* @__PURE__ */ jsx(
26078
- DualMode,
26079
- {
26080
- patternId,
26081
- variant,
26082
- size,
26083
- color,
26084
- strokeWidth,
26085
- opacity,
26086
- className
26087
- }
26088
- );
26089
- }
26090
- if (mode === "left" || mode === "right") {
26091
- return /* @__PURE__ */ jsx(
26092
- SideMode,
26093
- {
26094
- patternId,
26095
- variant,
26096
- size,
26097
- color,
26098
- strokeWidth,
26099
- opacity,
26100
- side: mode,
26101
- className
26102
- }
26103
- );
26104
- }
26105
- return /* @__PURE__ */ jsx(
26106
- BackgroundMode,
26107
- {
26108
- patternId,
26109
- variant,
26110
- size,
26111
- color,
26112
- strokeWidth,
26113
- opacity,
26114
- className
26115
- }
26116
- );
26117
- };
26118
- GeometricPattern.displayName = "GeometricPattern";
26119
- }
26120
- });
26121
- function ArchSVG({
26122
- facing,
26123
- w,
26124
- h,
26125
- color,
26126
- strokeWidth
26127
- }) {
26128
- const paths = [];
26129
- const archCount = 3;
26130
- const archH = h / archCount;
26131
- const rings = 5;
26132
- for (let a = 0; a < archCount; a++) {
26133
- const baseY = a * archH + archH;
26134
- const topY = a * archH + archH * 0.05;
26135
- for (let r = 0; r < rings; r++) {
26136
- const scale = 1 - r * 0.17;
26137
- const archW = w * 0.95 * scale;
26138
- const aTopY = topY + (1 - scale) * (baseY - topY) * 0.5;
26139
- const aBaseY = baseY - (1 - scale) * archH * 0.05;
26140
- const edgeX2 = facing === "right" ? w : 0;
26141
- const innerX2 = facing === "right" ? w - archW : archW;
26142
- const midY = (aTopY + aBaseY) / 2;
26143
- const radius = Math.sqrt(archW * archW + (aBaseY - midY) * (aBaseY - midY));
26144
- if (facing === "right") {
26145
- paths.push(
26146
- `M ${f2(edgeX2)},${f2(aBaseY)} A ${f2(radius)} ${f2(radius)} 0 0 0 ${f2(innerX2)},${f2(aTopY + (aBaseY - aTopY) * 0.5)} A ${f2(radius)} ${f2(radius)} 0 0 0 ${f2(edgeX2)},${f2(aTopY)}`
26147
- );
26148
- } else {
26149
- paths.push(
26150
- `M ${f2(edgeX2)},${f2(aBaseY)} A ${f2(radius)} ${f2(radius)} 0 0 1 ${f2(innerX2)},${f2(aTopY + (aBaseY - aTopY) * 0.5)} A ${f2(radius)} ${f2(radius)} 0 0 1 ${f2(edgeX2)},${f2(aTopY)}`
26151
- );
26152
- }
26153
- }
26154
- const edgeX = facing === "right" ? w : 0;
26155
- const innerX = facing === "right" ? w * 0.05 : w * 0.95;
26156
- paths.push(`M ${f2(edgeX)},${f2(baseY)} L ${f2(innerX)},${f2(baseY)}`);
26157
- }
26158
- return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
26159
- }
26160
- function VineSVG({
26161
- facing,
26162
- w,
26163
- h,
26164
- color,
26165
- strokeWidth
26166
- }) {
26167
- const paths = [];
26168
- const dir = facing === "right" ? -1 : 1;
26169
- const edgeX = facing === "right" ? w * 0.85 : w * 0.15;
26170
- const segments = 5;
26171
- const segH = h / segments;
26172
- for (let i = 0; i < segments; i++) {
26173
- const y0 = i * segH;
26174
- const y1 = y0 + segH;
26175
- const sway = w * 0.12 * (i % 2 === 0 ? 1 : -1);
26176
- paths.push(
26177
- `M ${f2(edgeX + sway)},${f2(y0)} C ${f2(edgeX - sway)},${f2(y0 + segH * 0.33)} ${f2(edgeX + sway)},${f2(y0 + segH * 0.66)} ${f2(edgeX - sway)},${f2(y1)}`
26178
- );
26179
- const branchY = y0 + segH * 0.35;
26180
- const branchX = edgeX;
26181
- const leafW = w * 0.55;
26182
- const leafH = segH * 0.35;
26183
- const leafTipX = branchX + dir * leafW;
26184
- const leafTipY = branchY - leafH * 0.2;
26185
- paths.push(
26186
- `M ${f2(branchX)},${f2(branchY)} C ${f2(branchX + dir * leafW * 0.3)},${f2(branchY - leafH)} ${f2(leafTipX - dir * leafW * 0.1)},${f2(leafTipY - leafH * 0.3)} ${f2(leafTipX)},${f2(leafTipY)}`
26187
- );
26188
- paths.push(
26189
- `M ${f2(leafTipX)},${f2(leafTipY)} C ${f2(leafTipX - dir * leafW * 0.2)},${f2(leafTipY + leafH * 0.6)} ${f2(branchX + dir * leafW * 0.15)},${f2(branchY + leafH * 0.4)} ${f2(branchX)},${f2(branchY + leafH * 0.1)}`
26190
- );
26191
- const tendrilY = y0 + segH * 0.7;
26192
- const tendrilW = w * 0.35;
26193
- const tendrilTipX = edgeX + dir * tendrilW;
26194
- paths.push(
26195
- `M ${f2(edgeX)},${f2(tendrilY)} Q ${f2(edgeX + dir * tendrilW * 0.6)},${f2(tendrilY - segH * 0.12)} ${f2(tendrilTipX)},${f2(tendrilY + segH * 0.05)}`
26196
- );
26197
- const spR = leafW * 0.08;
26198
- paths.push(
26199
- `M ${f2(leafTipX)},${f2(leafTipY)} A ${f2(spR)} ${f2(spR)} 0 1 ${facing === "right" ? 0 : 1} ${f2(leafTipX + dir * spR * 0.5)},${f2(leafTipY + spR)}`
26200
- );
26201
- }
26202
- return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
26203
- }
26204
- function LatticeSVG({
26205
- facing,
26206
- w,
26207
- h,
26208
- color,
26209
- strokeWidth
26210
- }) {
26211
- const paths = [];
26212
- const cols = 5;
26213
- const rows = Math.ceil(h / (w / cols));
26214
- const cellW = w / cols;
26215
- const cellH = cellW;
26216
- const bulge = cellW * 0.3;
26217
- for (let row = 0; row < rows; row++) {
26218
- for (let col = 0; col < cols; col++) {
26219
- const cx = col * cellW + cellW / 2;
26220
- const cy = row * cellH + cellH / 2;
26221
- const hw = cellW * 0.5;
26222
- const hh = cellH * 0.5;
26223
- paths.push(
26224
- `M ${f2(cx)},${f2(cy - hh)} Q ${f2(cx + bulge)},${f2(cy)} ${f2(cx)},${f2(cy + hh)}`
26225
- );
26226
- paths.push(
26227
- `M ${f2(cx)},${f2(cy - hh)} Q ${f2(cx - bulge)},${f2(cy)} ${f2(cx)},${f2(cy + hh)}`
26228
- );
26229
- paths.push(
26230
- `M ${f2(cx - hw)},${f2(cy)} Q ${f2(cx)},${f2(cy - bulge * 0.5)} ${f2(cx + hw)},${f2(cy)}`
26231
- );
26232
- paths.push(
26233
- `M ${f2(cx - hw)},${f2(cy)} Q ${f2(cx)},${f2(cy + bulge * 0.5)} ${f2(cx + hw)},${f2(cy)}`
26234
- );
26235
- }
26236
- }
26237
- return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
26238
- }
26239
- function f2(n) {
26240
- return n.toFixed(2);
26241
- }
26242
- var VARIANT_MAP2, EdgeDecoration;
26243
- var init_EdgeDecoration = __esm({
26244
- "components/molecules/EdgeDecoration.tsx"() {
26245
- "use client";
26246
- init_cn();
26247
- VARIANT_MAP2 = {
26248
- arch: ArchSVG,
26249
- vine: VineSVG,
26250
- lattice: LatticeSVG
26251
- };
26252
- EdgeDecoration = ({
26253
- variant = "arch",
26254
- side = "both",
26255
- opacity = 0.15,
26256
- color = "var(--color-primary)",
26257
- strokeWidth = 0.5,
26258
- width = 15,
26259
- className
26260
- }) => {
26261
- const id = useId();
26262
- const Variant = VARIANT_MAP2[variant];
26263
- const sides = side === "both" ? ["left", "right"] : [side];
26264
- return /* @__PURE__ */ jsx(Fragment, { children: sides.map((s) => /* @__PURE__ */ jsx(
26265
- "svg",
26266
- {
26267
- className: cn(
26268
- "absolute top-0 h-full pointer-events-none",
26269
- s === "left" ? "left-0" : "right-0",
26270
- className
26271
- ),
26272
- style: {
26273
- width: `${width}%`,
26274
- opacity
26275
- },
26276
- viewBox: `0 0 200 ${200 * 3}`,
26277
- preserveAspectRatio: "none",
26278
- "aria-hidden": "true",
26279
- children: /* @__PURE__ */ jsx(
26280
- Variant,
26281
- {
26282
- facing: s,
26283
- w: 200,
26284
- h: 600,
26285
- color,
26286
- strokeWidth
26287
- }
26288
- )
26289
- },
26290
- `${id}-${s}`
26291
- )) });
26292
- };
26293
- EdgeDecoration.displayName = "EdgeDecoration";
26294
- }
26295
- });
26296
23514
 
26297
23515
  // components/molecules/index.ts
26298
23516
  var init_molecules = __esm({
26299
23517
  "components/molecules/index.ts"() {
26300
- init_ErrorBoundary();
26301
- init_FileTree();
26302
- init_FormField();
26303
23518
  init_EmptyState();
26304
- init_LoadingState();
26305
- init_ErrorState();
26306
- init_Skeleton();
26307
- init_Accordion();
26308
- init_Alert();
26309
- init_Breadcrumb();
26310
- init_ButtonGroup();
26311
- init_FilterGroup();
26312
- init_Card2();
26313
- init_Container();
26314
- init_Flex();
26315
- init_FloatingActionButton();
26316
- init_Grid();
26317
- init_InputGroup();
26318
- init_Menu();
26319
- init_Modal();
26320
23519
  init_Pagination();
26321
- init_Popover();
26322
- init_RelationSelect();
26323
- init_SearchInput();
26324
- init_SidePanel();
26325
- init_SimpleGrid();
26326
- init_Tabs();
26327
- init_Toast();
26328
- init_Tooltip();
26329
- init_Drawer();
26330
- init_WizardProgress();
26331
- init_WizardNavigation();
26332
- init_MarkdownContent();
26333
- init_CodeBlock();
26334
- init_QuizBlock();
26335
- init_ScaledDiagram();
26336
- init_CalendarGrid();
26337
- init_RepeatableFormSection();
26338
- init_ViolationAlert();
26339
- init_FormSectionHeader();
26340
- init_FlipCard();
26341
- init_DateRangeSelector();
26342
- init_ChartLegend();
26343
- init_LineChart();
26344
- init_ProgressDots();
26345
23520
  init_game2();
26346
- init_GraphView();
26347
- init_MapView();
26348
- init_NumberStepper();
26349
- init_StarRating();
26350
- init_UploadDropZone();
26351
- init_Lightbox();
26352
- init_DataGrid();
26353
- init_DataList();
26354
- init_StatDisplay();
26355
- init_Meter();
26356
- init_SwipeableRow();
26357
- init_SortableList();
26358
- init_Carousel();
26359
- init_PullToRefresh();
26360
- init_InstallBox();
26361
- init_FeatureCard();
26362
- init_FeatureGrid();
26363
- init_CTABanner();
26364
- init_HeroSection();
26365
- init_PricingCard();
26366
- init_PricingGrid();
26367
- init_StatsGrid();
26368
- init_ServiceCatalog();
26369
- init_CaseStudyCard();
26370
- init_ArticleSection();
26371
- init_CodeExample();
26372
- init_SocialProof();
26373
- init_StepFlow();
26374
- init_SplitSection();
26375
- init_TagCloud();
26376
- init_CommunityLinks();
26377
- init_TeamCard();
26378
- init_ShowcaseCard();
26379
- init_GeometricPattern();
26380
- init_EdgeDecoration();
26381
23521
  }
26382
23522
  });
26383
23523
 
@@ -27043,19 +24183,19 @@ function renderRichFieldValue(value, fieldName, fieldType) {
27043
24183
  }
27044
24184
  function normalizeFieldDefs(fields) {
27045
24185
  if (!fields) return [];
27046
- return fields.map((f3) => {
27047
- if (typeof f3 === "string") return f3;
27048
- if ("key" in f3) return f3.key;
27049
- if ("name" in f3) return f3.name;
27050
- return String(f3);
24186
+ return fields.map((f) => {
24187
+ if (typeof f === "string") return f;
24188
+ if ("key" in f) return f.key;
24189
+ if ("name" in f) return f.name;
24190
+ return String(f);
27051
24191
  });
27052
24192
  }
27053
24193
  function buildFieldTypeMap(fields) {
27054
24194
  const map = {};
27055
24195
  if (!fields) return map;
27056
- for (const f3 of fields) {
27057
- if (typeof f3 === "object" && "name" in f3 && "type" in f3) {
27058
- map[f3.name] = f3.type;
24196
+ for (const f of fields) {
24197
+ if (typeof f === "object" && "name" in f && "type" in f) {
24198
+ map[f.name] = f.type;
27059
24199
  }
27060
24200
  }
27061
24201
  return map;
@@ -27152,22 +24292,22 @@ var init_DetailPanel = __esm({
27152
24292
  title = String(normalizedData[primaryField]);
27153
24293
  }
27154
24294
  const statusFields = effectiveFieldNames.filter(
27155
- (f3) => f3.toLowerCase().includes("status") || f3.toLowerCase().includes("priority")
24295
+ (f) => f.toLowerCase().includes("status") || f.toLowerCase().includes("priority")
27156
24296
  );
27157
24297
  const progressFields = effectiveFieldNames.filter(
27158
- (f3) => f3.toLowerCase().includes("progress") || f3.toLowerCase().includes("percent")
24298
+ (f) => f.toLowerCase().includes("progress") || f.toLowerCase().includes("percent")
27159
24299
  );
27160
24300
  const metricFields = effectiveFieldNames.filter(
27161
- (f3) => (f3.toLowerCase().includes("budget") || f3.toLowerCase().includes("cost") || f3.toLowerCase().includes("count")) && !progressFields.includes(f3)
24301
+ (f) => (f.toLowerCase().includes("budget") || f.toLowerCase().includes("cost") || f.toLowerCase().includes("count")) && !progressFields.includes(f)
27162
24302
  );
27163
24303
  const dateFields = effectiveFieldNames.filter(
27164
- (f3) => f3.toLowerCase().includes("date") || f3.toLowerCase().includes("time")
24304
+ (f) => f.toLowerCase().includes("date") || f.toLowerCase().includes("time")
27165
24305
  );
27166
24306
  const descriptionFields = effectiveFieldNames.filter(
27167
- (f3) => f3.toLowerCase().includes("description") || f3.toLowerCase().includes("note")
24307
+ (f) => f.toLowerCase().includes("description") || f.toLowerCase().includes("note")
27168
24308
  );
27169
24309
  const otherFields = effectiveFieldNames.filter(
27170
- (f3) => f3 !== primaryField && !statusFields.includes(f3) && !progressFields.includes(f3) && !metricFields.includes(f3) && !dateFields.includes(f3) && !descriptionFields.includes(f3)
24310
+ (f) => f !== primaryField && !statusFields.includes(f) && !progressFields.includes(f) && !metricFields.includes(f) && !dateFields.includes(f) && !descriptionFields.includes(f)
27171
24311
  );
27172
24312
  sections = [];
27173
24313
  if (statusFields.length > 0 || otherFields.length > 0) {
@@ -27321,7 +24461,7 @@ var init_DetailPanel = __esm({
27321
24461
  subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: subtitle }),
27322
24462
  /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
27323
24463
  normalizedData && effectiveFieldNames && effectiveFieldNames.filter(
27324
- (f3) => f3.toLowerCase().includes("status") || f3.toLowerCase().includes("priority")
24464
+ (f) => f.toLowerCase().includes("status") || f.toLowerCase().includes("priority")
27325
24465
  ).map((field) => {
27326
24466
  const value = getNestedValue(normalizedData, field);
27327
24467
  if (!value) return null;
@@ -27337,7 +24477,7 @@ var init_DetailPanel = __esm({
27337
24477
  status && /* @__PURE__ */ jsx(Badge, { variant: status.variant ?? "default", children: status.label })
27338
24478
  ] }),
27339
24479
  normalizedData && effectiveFieldNames && effectiveFieldNames.filter(
27340
- (f3) => f3.toLowerCase().includes("progress") || f3.toLowerCase().includes("percent")
24480
+ (f) => f.toLowerCase().includes("progress") || f.toLowerCase().includes("percent")
27341
24481
  ).map((field) => {
27342
24482
  const value = getNestedValue(normalizedData, field);
27343
24483
  if (value === void 0 || value === null || typeof value !== "number")
@@ -27604,7 +24744,7 @@ var init_DocumentViewer = __esm({
27604
24744
  }
27605
24745
  });
27606
24746
  function extractTitle(children) {
27607
- if (!React113__default.isValidElement(children)) return void 0;
24747
+ if (!React104__default.isValidElement(children)) return void 0;
27608
24748
  const props = children.props;
27609
24749
  if (typeof props.title === "string") {
27610
24750
  return props.title;
@@ -27659,7 +24799,7 @@ function LinearView({
27659
24799
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
27660
24800
  const isDone = i < currentIdx;
27661
24801
  const isCurrent = i === currentIdx;
27662
- return /* @__PURE__ */ jsxs(React113__default.Fragment, { children: [
24802
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
27663
24803
  i > 0 && /* @__PURE__ */ jsx(
27664
24804
  Typography,
27665
24805
  {
@@ -28443,51 +25583,51 @@ var init_Form = __esm({
28443
25583
  const isSchemaEntity = isOrbitalEntitySchema(entity);
28444
25584
  const resolvedEntity = isSchemaEntity ? entity : void 0;
28445
25585
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
28446
- const normalizedInitialData = React113__default.useMemo(() => {
25586
+ const normalizedInitialData = React104__default.useMemo(() => {
28447
25587
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
28448
25588
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
28449
25589
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
28450
25590
  }, [entity, initialData]);
28451
- const entityDerivedFields = React113__default.useMemo(() => {
25591
+ const entityDerivedFields = React104__default.useMemo(() => {
28452
25592
  if (fields && fields.length > 0) return void 0;
28453
25593
  if (!resolvedEntity) return void 0;
28454
25594
  return resolvedEntity.fields.map(
28455
- (f3) => ({
28456
- name: f3.name,
28457
- type: f3.type,
28458
- required: f3.required,
28459
- defaultValue: f3.default,
28460
- values: f3.values,
28461
- min: f3.min,
28462
- max: f3.max,
28463
- relation: f3.relation ? { entity: f3.relation.entity } : void 0
25595
+ (f) => ({
25596
+ name: f.name,
25597
+ type: f.type,
25598
+ required: f.required,
25599
+ defaultValue: f.default,
25600
+ values: f.values,
25601
+ min: f.min,
25602
+ max: f.max,
25603
+ relation: f.relation ? { entity: f.relation.entity } : void 0
28464
25604
  })
28465
25605
  );
28466
25606
  }, [entity, fields]);
28467
25607
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
28468
25608
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
28469
25609
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
28470
- const [formData, setFormData] = React113__default.useState(
25610
+ const [formData, setFormData] = React104__default.useState(
28471
25611
  normalizedInitialData
28472
25612
  );
28473
- const [collapsedSections, setCollapsedSections] = React113__default.useState(
25613
+ const [collapsedSections, setCollapsedSections] = React104__default.useState(
28474
25614
  /* @__PURE__ */ new Set()
28475
25615
  );
28476
25616
  const formMode = props.mode;
28477
- const mountedRef = React113__default.useRef(false);
25617
+ const mountedRef = React104__default.useRef(false);
28478
25618
  if (!mountedRef.current) {
28479
25619
  mountedRef.current = true;
28480
25620
  debug("forms", "mount", {
28481
25621
  mode: formMode,
28482
25622
  submitEvent,
28483
25623
  cancelEvent,
28484
- fieldNames: (fields ?? []).map((f3) => f3.name ?? f3.field).filter(Boolean),
25624
+ fieldNames: (fields ?? []).map((f) => f.name ?? f.field).filter(Boolean),
28485
25625
  initialDataKeys: Object.keys(normalizedInitialData),
28486
25626
  initialData: normalizedInitialData
28487
25627
  });
28488
25628
  }
28489
25629
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
28490
- const evalContext = React113__default.useMemo(
25630
+ const evalContext = React104__default.useMemo(
28491
25631
  () => ({
28492
25632
  formValues: formData,
28493
25633
  globalVariables: externalContext?.globalVariables ?? {},
@@ -28496,7 +25636,7 @@ var init_Form = __esm({
28496
25636
  }),
28497
25637
  [formData, externalContext]
28498
25638
  );
28499
- React113__default.useEffect(() => {
25639
+ React104__default.useEffect(() => {
28500
25640
  debug("forms", "initialData-sync", {
28501
25641
  mode: formMode,
28502
25642
  normalizedInitialData,
@@ -28507,7 +25647,7 @@ var init_Form = __esm({
28507
25647
  setFormData(normalizedInitialData);
28508
25648
  }
28509
25649
  }, [normalizedInitialData]);
28510
- const processCalculations = React113__default.useCallback(
25650
+ const processCalculations = React104__default.useCallback(
28511
25651
  (changedFieldId, newFormData) => {
28512
25652
  if (!hiddenCalculations.length) return;
28513
25653
  const context = {
@@ -28532,7 +25672,7 @@ var init_Form = __esm({
28532
25672
  },
28533
25673
  [hiddenCalculations, externalContext, eventBus]
28534
25674
  );
28535
- const checkViolations = React113__default.useCallback(
25675
+ const checkViolations = React104__default.useCallback(
28536
25676
  (changedFieldId, newFormData) => {
28537
25677
  if (!violationTriggers.length) return;
28538
25678
  const context = {
@@ -28570,7 +25710,7 @@ var init_Form = __esm({
28570
25710
  processCalculations(name, newFormData);
28571
25711
  checkViolations(name, newFormData);
28572
25712
  };
28573
- const isFieldVisible = React113__default.useCallback(
25713
+ const isFieldVisible = React104__default.useCallback(
28574
25714
  (fieldName) => {
28575
25715
  const condition = conditionalFields[fieldName];
28576
25716
  if (!condition) return true;
@@ -28578,7 +25718,7 @@ var init_Form = __esm({
28578
25718
  },
28579
25719
  [conditionalFields, evalContext]
28580
25720
  );
28581
- const isSectionVisible = React113__default.useCallback(
25721
+ const isSectionVisible = React104__default.useCallback(
28582
25722
  (section) => {
28583
25723
  if (!section.condition) return true;
28584
25724
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -28622,7 +25762,7 @@ var init_Form = __esm({
28622
25762
  eventBus.emit(`UI:${onCancel}`);
28623
25763
  }
28624
25764
  };
28625
- const renderField = React113__default.useCallback(
25765
+ const renderField = React104__default.useCallback(
28626
25766
  (field) => {
28627
25767
  const fieldName = field.name || field.field;
28628
25768
  if (!fieldName) return null;
@@ -28643,11 +25783,11 @@ var init_Form = __esm({
28643
25783
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
28644
25784
  );
28645
25785
  const effectiveFields = entityDerivedFields ?? fields;
28646
- const normalizedFields = React113__default.useMemo(() => {
25786
+ const normalizedFields = React104__default.useMemo(() => {
28647
25787
  if (!effectiveFields || effectiveFields.length === 0) return [];
28648
25788
  return effectiveFields.map((field) => {
28649
25789
  if (typeof field === "string") {
28650
- const entityField = resolvedEntity?.fields?.find((f3) => f3.name === field);
25790
+ const entityField = resolvedEntity?.fields?.find((f) => f.name === field);
28651
25791
  if (entityField) {
28652
25792
  return {
28653
25793
  name: field,
@@ -28665,7 +25805,7 @@ var init_Form = __esm({
28665
25805
  return field;
28666
25806
  });
28667
25807
  }, [effectiveFields, resolvedEntity]);
28668
- const schemaFields = React113__default.useMemo(() => {
25808
+ const schemaFields = React104__default.useMemo(() => {
28669
25809
  if (normalizedFields.length === 0) return null;
28670
25810
  if (isDebugEnabled()) {
28671
25811
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -28675,7 +25815,7 @@ var init_Form = __esm({
28675
25815
  }
28676
25816
  return normalizedFields.map(renderField).filter(Boolean);
28677
25817
  }, [normalizedFields, renderField, entityName, conditionalFields]);
28678
- const sectionElements = React113__default.useMemo(() => {
25818
+ const sectionElements = React104__default.useMemo(() => {
28679
25819
  if (!sections || sections.length === 0) return null;
28680
25820
  return sections.map((section) => {
28681
25821
  if (!isSectionVisible(section)) {
@@ -29980,7 +27120,7 @@ var init_InventoryPanel2 = __esm({
29980
27120
  });
29981
27121
  function normalizeFields2(fields) {
29982
27122
  if (!fields) return [];
29983
- return fields.map((f3) => typeof f3 === "string" ? f3 : f3.key ?? f3.name ?? "");
27123
+ return fields.map((f) => typeof f === "string" ? f : f.key ?? f.name ?? "");
29984
27124
  }
29985
27125
  function entityFieldsFromListItem(item) {
29986
27126
  const {
@@ -30199,7 +27339,7 @@ var init_List = __esm({
30199
27339
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
30200
27340
  return [];
30201
27341
  }, [entity]);
30202
- const getItemActions = React113__default.useCallback(
27342
+ const getItemActions = React104__default.useCallback(
30203
27343
  (item) => {
30204
27344
  if (!itemActions) return [];
30205
27345
  if (typeof itemActions === "function") {
@@ -30303,19 +27443,19 @@ var init_List = __esm({
30303
27443
  const rowActionPayload = { row: entityFieldsFromListItem(item) };
30304
27444
  const primaryField = effectiveFieldNames?.[0];
30305
27445
  const statusField = effectiveFieldNames?.find(
30306
- (f3) => f3.toLowerCase().includes("status")
27446
+ (f) => f.toLowerCase().includes("status")
30307
27447
  );
30308
27448
  const priorityField = effectiveFieldNames?.find(
30309
- (f3) => f3.toLowerCase().includes("priority")
27449
+ (f) => f.toLowerCase().includes("priority")
30310
27450
  );
30311
27451
  const progressField = effectiveFieldNames?.find(
30312
- (f3) => f3.toLowerCase().includes("progress") || f3.toLowerCase().includes("percent")
27452
+ (f) => f.toLowerCase().includes("progress") || f.toLowerCase().includes("percent")
30313
27453
  );
30314
27454
  const dateFields = effectiveFieldNames?.filter(
30315
- (f3) => f3.toLowerCase().includes("date") || f3.toLowerCase().includes("due")
27455
+ (f) => f.toLowerCase().includes("date") || f.toLowerCase().includes("due")
30316
27456
  ) || [];
30317
27457
  const metadataFields = effectiveFieldNames?.filter(
30318
- (f3) => f3 !== primaryField && f3 !== statusField && f3 !== priorityField && f3 !== progressField && !dateFields.includes(f3)
27458
+ (f) => f !== primaryField && f !== statusField && f !== priorityField && f !== progressField && !dateFields.includes(f)
30319
27459
  ).slice(0, 2) || [];
30320
27460
  const statusValue = statusField ? item._fields?.[statusField] : null;
30321
27461
  statusValue ? getStatusStyle(statusField, String(statusValue)) : null;
@@ -30636,7 +27776,7 @@ var init_MediaGallery = __esm({
30636
27776
  [selectable, selectedItems, selectionEvent, eventBus]
30637
27777
  );
30638
27778
  const entityData = Array.isArray(entity) ? entity : [];
30639
- const items = React113__default.useMemo(() => {
27779
+ const items = React104__default.useMemo(() => {
30640
27780
  if (propItems) return propItems;
30641
27781
  if (entityData.length === 0) return [];
30642
27782
  return entityData.map((record, idx) => ({
@@ -30800,7 +27940,7 @@ var init_MediaGallery = __esm({
30800
27940
  }
30801
27941
  });
30802
27942
  function extractTitle2(children) {
30803
- if (!React113__default.isValidElement(children)) return void 0;
27943
+ if (!React104__default.isValidElement(children)) return void 0;
30804
27944
  const props = children.props;
30805
27945
  if (typeof props.title === "string") {
30806
27946
  return props.title;
@@ -31513,7 +28653,7 @@ var init_PageHeader = __esm({
31513
28653
  info: "bg-info/10 text-info"
31514
28654
  };
31515
28655
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
31516
- 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(React113__default.Fragment, { children: [
28656
+ 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(React104__default.Fragment, { children: [
31517
28657
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
31518
28658
  crumb.href ? /* @__PURE__ */ jsx(
31519
28659
  "a",
@@ -31706,7 +28846,7 @@ var init_debugRegistry = __esm({
31706
28846
  }
31707
28847
  });
31708
28848
  function useDebugData() {
31709
- const [data, setData] = React113.useState(() => ({
28849
+ const [data, setData] = React104.useState(() => ({
31710
28850
  traits: [],
31711
28851
  ticks: [],
31712
28852
  guards: [],
@@ -31720,7 +28860,7 @@ function useDebugData() {
31720
28860
  },
31721
28861
  lastUpdate: Date.now()
31722
28862
  }));
31723
- React113.useEffect(() => {
28863
+ React104.useEffect(() => {
31724
28864
  const updateData = () => {
31725
28865
  setData({
31726
28866
  traits: getAllTraits(),
@@ -31829,12 +28969,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
31829
28969
  return positions;
31830
28970
  }
31831
28971
  function WalkMinimap() {
31832
- const [walkStep, setWalkStep] = React113.useState(null);
31833
- const [traits2, setTraits] = React113.useState([]);
31834
- const [coveredEdges, setCoveredEdges] = React113.useState([]);
31835
- const [completedTraits, setCompletedTraits] = React113.useState(/* @__PURE__ */ new Set());
31836
- const prevTraitRef = React113.useRef(null);
31837
- React113.useEffect(() => {
28972
+ const [walkStep, setWalkStep] = React104.useState(null);
28973
+ const [traits2, setTraits] = React104.useState([]);
28974
+ const [coveredEdges, setCoveredEdges] = React104.useState([]);
28975
+ const [completedTraits, setCompletedTraits] = React104.useState(/* @__PURE__ */ new Set());
28976
+ const prevTraitRef = React104.useRef(null);
28977
+ React104.useEffect(() => {
31838
28978
  const interval = setInterval(() => {
31839
28979
  const w = window;
31840
28980
  const step = w.__orbitalWalkStep;
@@ -32281,15 +29421,15 @@ var init_EntitiesTab = __esm({
32281
29421
  }
32282
29422
  });
32283
29423
  function EventFlowTab({ events: events2 }) {
32284
- const [filter, setFilter] = React113.useState("all");
32285
- const containerRef = React113.useRef(null);
32286
- const [autoScroll, setAutoScroll] = React113.useState(true);
32287
- React113.useEffect(() => {
29424
+ const [filter, setFilter] = React104.useState("all");
29425
+ const containerRef = React104.useRef(null);
29426
+ const [autoScroll, setAutoScroll] = React104.useState(true);
29427
+ React104.useEffect(() => {
32288
29428
  if (autoScroll && containerRef.current) {
32289
29429
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
32290
29430
  }
32291
29431
  }, [events2.length, autoScroll]);
32292
- const filteredEvents = React113.useMemo(() => {
29432
+ const filteredEvents = React104.useMemo(() => {
32293
29433
  if (filter === "all") return events2;
32294
29434
  return events2.filter((e) => e.type === filter);
32295
29435
  }, [events2, filter]);
@@ -32408,7 +29548,7 @@ var init_EventFlowTab = __esm({
32408
29548
  }
32409
29549
  });
32410
29550
  function GuardsPanel({ guards }) {
32411
- const [filter, setFilter] = React113.useState("all");
29551
+ const [filter, setFilter] = React104.useState("all");
32412
29552
  if (guards.length === 0) {
32413
29553
  return /* @__PURE__ */ jsx(
32414
29554
  EmptyState,
@@ -32421,7 +29561,7 @@ function GuardsPanel({ guards }) {
32421
29561
  }
32422
29562
  const passedCount = guards.filter((g) => g.result).length;
32423
29563
  const failedCount = guards.length - passedCount;
32424
- const filteredGuards = React113.useMemo(() => {
29564
+ const filteredGuards = React104.useMemo(() => {
32425
29565
  if (filter === "all") return guards;
32426
29566
  if (filter === "passed") return guards.filter((g) => g.result);
32427
29567
  return guards.filter((g) => !g.result);
@@ -32582,10 +29722,10 @@ function EffectBadge({ effect }) {
32582
29722
  ] });
32583
29723
  }
32584
29724
  function TransitionTimeline({ transitions }) {
32585
- const containerRef = React113.useRef(null);
32586
- const [autoScroll, setAutoScroll] = React113.useState(true);
32587
- const [expandedId, setExpandedId] = React113.useState(null);
32588
- React113.useEffect(() => {
29725
+ const containerRef = React104.useRef(null);
29726
+ const [autoScroll, setAutoScroll] = React104.useState(true);
29727
+ const [expandedId, setExpandedId] = React104.useState(null);
29728
+ React104.useEffect(() => {
32589
29729
  if (autoScroll && containerRef.current) {
32590
29730
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
32591
29731
  }
@@ -32809,9 +29949,9 @@ function extractPayloadFields(schema, eventName) {
32809
29949
  for (const evt of events2) {
32810
29950
  if (evt.name !== eventName) continue;
32811
29951
  const payload = evt.payload ?? [];
32812
- return payload.map((f3) => ({
32813
- name: f3.name,
32814
- type: f3.type ?? "string"
29952
+ return payload.map((f) => ({
29953
+ name: f.name,
29954
+ type: f.type ?? "string"
32815
29955
  }));
32816
29956
  }
32817
29957
  }
@@ -32871,9 +30011,9 @@ function getAllEvents(traits2) {
32871
30011
  }
32872
30012
  function EventDispatcherTab({ traits: traits2, schema }) {
32873
30013
  const eventBus = useEventBus();
32874
- const [log3, setLog] = React113.useState([]);
32875
- const prevStatesRef = React113.useRef(/* @__PURE__ */ new Map());
32876
- React113.useEffect(() => {
30014
+ const [log3, setLog] = React104.useState([]);
30015
+ const prevStatesRef = React104.useRef(/* @__PURE__ */ new Map());
30016
+ React104.useEffect(() => {
32877
30017
  for (const trait of traits2) {
32878
30018
  const prev = prevStatesRef.current.get(trait.id);
32879
30019
  if (prev && prev !== trait.currentState) {
@@ -33043,10 +30183,10 @@ function VerifyModePanel({
33043
30183
  serverCount,
33044
30184
  localCount
33045
30185
  }) {
33046
- const [expanded, setExpanded] = React113.useState(true);
33047
- const scrollRef = React113.useRef(null);
33048
- const prevCountRef = React113.useRef(0);
33049
- React113.useEffect(() => {
30186
+ const [expanded, setExpanded] = React104.useState(true);
30187
+ const scrollRef = React104.useRef(null);
30188
+ const prevCountRef = React104.useRef(0);
30189
+ React104.useEffect(() => {
33050
30190
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
33051
30191
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
33052
30192
  }
@@ -33112,10 +30252,10 @@ function RuntimeDebugger({
33112
30252
  defaultTab,
33113
30253
  schema
33114
30254
  }) {
33115
- const [isCollapsed, setIsCollapsed] = React113.useState(mode === "verify" ? true : defaultCollapsed);
33116
- const [isVisible, setIsVisible] = React113.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
30255
+ const [isCollapsed, setIsCollapsed] = React104.useState(mode === "verify" ? true : defaultCollapsed);
30256
+ const [isVisible, setIsVisible] = React104.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
33117
30257
  const debugData = useDebugData();
33118
- React113.useEffect(() => {
30258
+ React104.useEffect(() => {
33119
30259
  if (mode === "inline") return;
33120
30260
  return onDebugToggle((enabled) => {
33121
30261
  setIsVisible(enabled);
@@ -33124,7 +30264,7 @@ function RuntimeDebugger({
33124
30264
  }
33125
30265
  });
33126
30266
  }, [mode]);
33127
- React113.useEffect(() => {
30267
+ React104.useEffect(() => {
33128
30268
  if (mode === "inline") return;
33129
30269
  const handleKeyDown = (e) => {
33130
30270
  if (e.key === "`" && isVisible) {
@@ -33673,7 +30813,7 @@ function SequenceBar({
33673
30813
  onSlotRemove(index);
33674
30814
  }, [onSlotRemove, playing]);
33675
30815
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
33676
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React113__default.Fragment, { children: [
30816
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
33677
30817
  i > 0 && /* @__PURE__ */ jsx(
33678
30818
  Typography,
33679
30819
  {
@@ -33817,7 +30957,7 @@ function SequencerBoard({
33817
30957
  setPlayState("idle");
33818
30958
  setCurrentStep(-1);
33819
30959
  emit("UI:PLAY_SOUND", { key: "fail" });
33820
- const correctCount2 = feedback.filter((f3) => f3 === "correct").length;
30960
+ const correctCount2 = feedback.filter((f) => f === "correct").length;
33821
30961
  for (let ci = 0; ci < correctCount2; ci++) {
33822
30962
  setTimeout(() => {
33823
30963
  emit("UI:PLAY_SOUND", { key: "correctSlot" });
@@ -33844,8 +30984,8 @@ function SequencerBoard({
33844
30984
  };
33845
30985
  const usedIds = entity.allowDuplicates === false ? slots.filter(Boolean).map((s) => s?.id || "") : [];
33846
30986
  const showHint = attempts >= 3 && !!entity.hint;
33847
- const hasFeedback = slotFeedback.some((f3) => f3 !== null);
33848
- const correctCount = slotFeedback.filter((f3) => f3 === "correct").length;
30987
+ const hasFeedback = slotFeedback.some((f) => f !== null);
30988
+ const correctCount = slotFeedback.filter((f) => f === "correct").length;
33849
30989
  const encourageKey = ENCOURAGEMENT_KEYS2[Math.min(attempts - 1, ENCOURAGEMENT_KEYS2.length - 1)] ?? ENCOURAGEMENT_KEYS2[0];
33850
30990
  return /* @__PURE__ */ jsxs(
33851
30991
  VStack,
@@ -34981,7 +32121,7 @@ var init_SplitPane = __esm({
34981
32121
  }
34982
32122
  });
34983
32123
  var StatCard;
34984
- var init_StatCard2 = __esm({
32124
+ var init_StatCard = __esm({
34985
32125
  "components/organisms/StatCard.tsx"() {
34986
32126
  "use client";
34987
32127
  init_cn();
@@ -35018,7 +32158,7 @@ var init_StatCard2 = __esm({
35018
32158
  const labelToUse = propLabel ?? propTitle;
35019
32159
  const eventBus = useEventBus();
35020
32160
  const { t } = useTranslate();
35021
- const handleActionClick = React113__default.useCallback(() => {
32161
+ const handleActionClick = React104__default.useCallback(() => {
35022
32162
  if (action?.event) {
35023
32163
  eventBus.emit(`UI:${action.event}`, {});
35024
32164
  }
@@ -35029,7 +32169,7 @@ var init_StatCard2 = __esm({
35029
32169
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
35030
32170
  const isLoading = externalLoading ?? false;
35031
32171
  const error = externalError;
35032
- const computeMetricValue = React113__default.useCallback(
32172
+ const computeMetricValue = React104__default.useCallback(
35033
32173
  (metric, items) => {
35034
32174
  if (metric.value !== void 0) {
35035
32175
  return metric.value;
@@ -35068,7 +32208,7 @@ var init_StatCard2 = __esm({
35068
32208
  },
35069
32209
  []
35070
32210
  );
35071
- const schemaStats = React113__default.useMemo(() => {
32211
+ const schemaStats = React104__default.useMemo(() => {
35072
32212
  if (!metrics || metrics.length === 0) return null;
35073
32213
  return metrics.map((metric) => ({
35074
32214
  label: metric.label,
@@ -35076,7 +32216,7 @@ var init_StatCard2 = __esm({
35076
32216
  format: metric.format
35077
32217
  }));
35078
32218
  }, [metrics, data, computeMetricValue]);
35079
- const calculatedTrend = React113__default.useMemo(() => {
32219
+ const calculatedTrend = React104__default.useMemo(() => {
35080
32220
  if (manualTrend !== void 0) return manualTrend;
35081
32221
  if (previousValue === void 0 || currentValue === void 0)
35082
32222
  return void 0;
@@ -36060,23 +33200,23 @@ var init_Timeline = __esm({
36060
33200
  }) => {
36061
33201
  const { t } = useTranslate();
36062
33202
  const entityData = Array.isArray(entity) ? entity : [];
36063
- const items = React113__default.useMemo(() => {
33203
+ const items = React104__default.useMemo(() => {
36064
33204
  if (propItems) return propItems;
36065
33205
  if (entityData.length === 0) return [];
36066
33206
  return entityData.map((record, idx) => {
36067
- const resolveField = (f3) => {
36068
- if (typeof f3 === "string") return f3;
36069
- if (f3 && typeof f3 === "object" && "name" in f3) return String(f3.name);
33207
+ const resolveField = (f) => {
33208
+ if (typeof f === "string") return f;
33209
+ if (f && typeof f === "object" && "name" in f) return String(f.name);
36070
33210
  return "";
36071
33211
  };
36072
33212
  const resolvedFields = fields?.map(resolveField) ?? [];
36073
33213
  const titleField = resolvedFields[0] || "title";
36074
33214
  const descField = resolvedFields[1] || "description";
36075
33215
  const dateField = resolvedFields.find(
36076
- (f3) => f3.toLowerCase().includes("date")
33216
+ (f) => f.toLowerCase().includes("date")
36077
33217
  ) || "date";
36078
33218
  const statusField = resolvedFields.find(
36079
- (f3) => f3.toLowerCase().includes("status")
33219
+ (f) => f.toLowerCase().includes("status")
36080
33220
  ) || "status";
36081
33221
  return {
36082
33222
  id: String(record.id ?? idx),
@@ -36167,7 +33307,7 @@ var init_Timeline = __esm({
36167
33307
  }
36168
33308
  });
36169
33309
  function extractToastProps(children) {
36170
- if (!React113__default.isValidElement(children)) {
33310
+ if (!React104__default.isValidElement(children)) {
36171
33311
  if (typeof children === "string") {
36172
33312
  return { message: children };
36173
33313
  }
@@ -36205,7 +33345,7 @@ var init_ToastSlot = __esm({
36205
33345
  eventBus.emit("UI:CLOSE");
36206
33346
  };
36207
33347
  if (!isVisible) return null;
36208
- const isCustomContent = React113__default.isValidElement(children) && !message;
33348
+ const isCustomContent = React104__default.isValidElement(children) && !message;
36209
33349
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
36210
33350
  Toast,
36211
33351
  {
@@ -36474,7 +33614,7 @@ var init_WizardContainer = __esm({
36474
33614
  const isCompleted = index < currentStep;
36475
33615
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
36476
33616
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
36477
- return /* @__PURE__ */ jsxs(React113__default.Fragment, { children: [
33617
+ return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
36478
33618
  /* @__PURE__ */ jsx(
36479
33619
  Button,
36480
33620
  {
@@ -36856,12 +33996,12 @@ var init_WorldMapTemplate = __esm({
36856
33996
  }
36857
33997
  });
36858
33998
  function lazyThree(name, loader) {
36859
- const Lazy = React113__default.lazy(() => loader().then((m) => ({ default: m[name] })));
33999
+ const Lazy = React104__default.lazy(() => loader().then((m) => ({ default: m[name] })));
36860
34000
  function ThreeWrapper(props) {
36861
- return React113__default.createElement(
36862
- React113__default.Suspense,
34001
+ return React104__default.createElement(
34002
+ React104__default.Suspense,
36863
34003
  { fallback: null },
36864
- React113__default.createElement(Lazy, props)
34004
+ React104__default.createElement(Lazy, props)
36865
34005
  );
36866
34006
  }
36867
34007
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -37017,7 +34157,7 @@ var init_component_registry_generated = __esm({
37017
34157
  init_Stack();
37018
34158
  init_StarRating();
37019
34159
  init_StatBadge();
37020
- init_StatCard2();
34160
+ init_StatCard();
37021
34161
  init_StatDisplay();
37022
34162
  init_StateArchitectBoard();
37023
34163
  init_StateIndicator();
@@ -37349,7 +34489,7 @@ function SuspenseConfigProvider({
37349
34489
  config,
37350
34490
  children
37351
34491
  }) {
37352
- return React113__default.createElement(
34492
+ return React104__default.createElement(
37353
34493
  SuspenseConfigContext.Provider,
37354
34494
  { value: config },
37355
34495
  children
@@ -37370,7 +34510,7 @@ function getComponentForPattern(patternType) {
37370
34510
  return COMPONENT_REGISTRY[name] ?? null;
37371
34511
  }
37372
34512
  function enrichFormFields(fields, entityDef) {
37373
- const fieldMap = new Map(entityDef.fields.map((f3) => [f3.name, f3]));
34513
+ const fieldMap = new Map(entityDef.fields.map((f) => [f.name, f]));
37374
34514
  return fields.map((field) => {
37375
34515
  if (typeof field === "string") {
37376
34516
  const entityField = fieldMap.get(field);
@@ -37832,7 +34972,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
37832
34972
  const key = `${parentId}-${index}-trait:${traitName}`;
37833
34973
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
37834
34974
  }
37835
- return /* @__PURE__ */ jsx(React113__default.Fragment, { children: child }, `${parentId}-${index}`);
34975
+ return /* @__PURE__ */ jsx(React104__default.Fragment, { children: child }, `${parentId}-${index}`);
37836
34976
  }
37837
34977
  if (!child || typeof child !== "object") return null;
37838
34978
  const childId = `${parentId}-${index}`;
@@ -37869,14 +35009,14 @@ function isPatternConfig(value) {
37869
35009
  if (value === null || value === void 0) return false;
37870
35010
  if (typeof value !== "object") return false;
37871
35011
  if (Array.isArray(value)) return false;
37872
- if (React113__default.isValidElement(value)) return false;
35012
+ if (React104__default.isValidElement(value)) return false;
37873
35013
  if (value instanceof Date) return false;
37874
35014
  if (typeof value === "function") return false;
37875
35015
  const record = value;
37876
35016
  return "type" in record && typeof record.type === "string";
37877
35017
  }
37878
35018
  function isPlainConfigObject(value) {
37879
- if (React113__default.isValidElement(value)) return false;
35019
+ if (React104__default.isValidElement(value)) return false;
37880
35020
  if (value instanceof Date) return false;
37881
35021
  const proto = Object.getPrototypeOf(value);
37882
35022
  return proto === Object.prototype || proto === null;
@@ -37937,7 +35077,7 @@ function SlotContentRenderer({
37937
35077
  }) {
37938
35078
  const entityProp = content.props.entity;
37939
35079
  if (content.pattern === "form-section") {
37940
- slotLog2.debug("SlotContentRenderer:form-section-render", {
35080
+ slotLog.debug("SlotContentRenderer:form-section-render", {
37941
35081
  contentId: content.id,
37942
35082
  sourceTrait: content.sourceTrait,
37943
35083
  entityRefId: refId(entityProp),
@@ -38165,60 +35305,6 @@ var init_UISlotRenderer = __esm({
38165
35305
  // hooks/index.ts
38166
35306
  init_useEventBus();
38167
35307
 
38168
- // hooks/useUISlots.ts
38169
- init_logger();
38170
- createLogger("almadar:ui:useUISlots");
38171
- var ALL_SLOTS = [
38172
- "main",
38173
- "sidebar",
38174
- "modal",
38175
- "drawer",
38176
- "overlay",
38177
- "center",
38178
- "toast",
38179
- "hud-top",
38180
- "hud-bottom",
38181
- "hud-left",
38182
- "hud-right",
38183
- "floating"
38184
- ];
38185
- ALL_SLOTS.reduce(
38186
- (acc, slot) => {
38187
- acc[slot] = null;
38188
- return acc;
38189
- },
38190
- {}
38191
- );
38192
- ALL_SLOTS.reduce(
38193
- (acc, slot) => {
38194
- acc[slot] = {};
38195
- return acc;
38196
- },
38197
- {}
38198
- );
38199
-
38200
- // hooks/useUIEvents.ts
38201
- init_useEventBus();
38202
-
38203
- // hooks/index.ts
38204
- init_useQuerySingleton();
38205
-
38206
- // hooks/index.ts
38207
- init_useTranslate();
38208
- init_useAuthContext();
38209
- init_useSwipeGesture();
38210
- init_useLongPress();
38211
- init_useDragReorder();
38212
- init_useInfiniteScroll();
38213
- init_usePullToRefresh();
38214
-
38215
- // hooks/useDraggable.ts
38216
- init_useEventBus();
38217
-
38218
- // hooks/useDropZone.ts
38219
- init_useEventBus();
38220
- typeof process !== "undefined" && process.env?.VITE_API_URL ? process.env.VITE_API_URL : "http://localhost:3000";
38221
-
38222
35308
  // runtime/useTraitStateMachine.ts
38223
35309
  init_logger();
38224
35310
 
@@ -38284,7 +35370,7 @@ function resolveLambdaBindings(body, argName, arg) {
38284
35370
  if (Array.isArray(body)) {
38285
35371
  return body.map((b) => resolveLambdaBindings(b, argName, arg));
38286
35372
  }
38287
- if (body !== null && typeof body === "object" && !React113__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
35373
+ if (body !== null && typeof body === "object" && !React104__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
38288
35374
  const out = {};
38289
35375
  for (const [k, v] of Object.entries(body)) {
38290
35376
  out[k] = resolveLambdaBindings(v, argName, arg);
@@ -38303,7 +35389,7 @@ function getSlotContentRenderer2() {
38303
35389
  function makeLambdaFn(argName, lambdaBody, callerKey) {
38304
35390
  return (item, index) => {
38305
35391
  const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
38306
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React113__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
35392
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React104__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
38307
35393
  return null;
38308
35394
  }
38309
35395
  const record = resolvedBody;
@@ -38321,7 +35407,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
38321
35407
  props: childProps,
38322
35408
  priority: 0
38323
35409
  };
38324
- return React113__default.createElement(SlotContentRenderer2, { content: childContent });
35410
+ return React104__default.createElement(SlotContentRenderer2, { content: childContent });
38325
35411
  };
38326
35412
  }
38327
35413
  function convertNode(node, callerKey) {
@@ -38340,7 +35426,7 @@ function convertNode(node, callerKey) {
38340
35426
  });
38341
35427
  return anyChanged ? mapped : node;
38342
35428
  }
38343
- if (typeof node === "object" && !React113__default.isValidElement(node) && !(node instanceof Date)) {
35429
+ if (typeof node === "object" && !React104__default.isValidElement(node) && !(node instanceof Date)) {
38344
35430
  return convertObjectProps(node);
38345
35431
  }
38346
35432
  return node;
@@ -38496,8 +35582,8 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
38496
35582
  states: trait.states.map((s) => s.name),
38497
35583
  transitions: trait.transitions.flatMap((t) => {
38498
35584
  const froms = Array.isArray(t.from) ? t.from : [t.from];
38499
- return froms.map((f3) => ({
38500
- from: f3,
35585
+ return froms.map((f) => ({
35586
+ from: f,
38501
35587
  to: t.to,
38502
35588
  event: t.event,
38503
35589
  guard: t.guard ? String(t.guard) : void 0
@@ -39438,9 +36524,9 @@ init_navigation();
39438
36524
  init_verificationRegistry();
39439
36525
  function generateEntityRow(entity, idx) {
39440
36526
  const row = { id: String(idx) };
39441
- for (const f3 of entity.fields) {
39442
- if (f3.name === void 0 || f3.name === "id") continue;
39443
- row[f3.name] = generateFieldValue(entity.name, f3, idx);
36527
+ for (const f of entity.fields) {
36528
+ if (f.name === void 0 || f.name === "id") continue;
36529
+ row[f.name] = generateFieldValue(entity.name, f, idx);
39444
36530
  }
39445
36531
  return row;
39446
36532
  }