@almadar/ui 6.52.0 → 6.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/{EntityBindingContext-BbxrwSb9.d.ts → AwaitingSkeletonContext-Bh399p1x.d.ts} +17 -2
  2. package/dist/{Canvas3DHost-CWO0tswb.d.ts → Canvas3DHost-B-y2TNij.d.ts} +1 -1
  3. package/dist/{GameAudioProvider-_hPzjqp-.d.ts → GameAudioProvider-DyBvYP2c.d.ts} +1 -1
  4. package/dist/Typography-7QEWUTW3.js +5 -0
  5. package/dist/{UISlotRenderer-CR7SCAMR.js → UISlotRenderer-P7A4SZSK.js} +10 -10
  6. package/dist/avl/index.cjs +40157 -39958
  7. package/dist/avl/index.d.ts +5 -2
  8. package/dist/avl/index.js +34 -21
  9. package/dist/{chunk-XUSSAWKL.js → chunk-2LFBQ4IS.js} +1 -1
  10. package/dist/{chunk-QWDKMVLX.js → chunk-53VTY5CC.js} +141 -82
  11. package/dist/{chunk-MSBMVG3B.js → chunk-6O37FCX4.js} +1 -0
  12. package/dist/{chunk-WB2A6V3I.js → chunk-7KSLPY56.js} +49 -1
  13. package/dist/{chunk-BHZG4PDZ.js → chunk-7LM6I3NA.js} +629 -626
  14. package/dist/{chunk-NCNP2RKZ.js → chunk-E37BYSXY.js} +2 -2
  15. package/dist/{chunk-5GCI6C7J.js → chunk-FUQASYEW.js} +2 -2
  16. package/dist/{chunk-CLSLVFSP.js → chunk-HB4C27KU.js} +2 -2
  17. package/dist/{chunk-EERAGPBW.js → chunk-HUG25TT3.js} +32341 -33067
  18. package/dist/{chunk-TWHYH25Q.js → chunk-JRW33U35.js} +80 -80
  19. package/dist/{chunk-G4GMXYMY.js → chunk-KQXXO42S.js} +93 -171
  20. package/dist/chunk-OKWD7LPO.js +80 -0
  21. package/dist/{chunk-YHY5K2Y7.js → chunk-PEST66PN.js} +6 -0
  22. package/dist/{chunk-V5AGW2JN.js → chunk-QVXLKFUQ.js} +1 -1
  23. package/dist/chunk-UOTYAPV5.js +284 -0
  24. package/dist/{chunk-2QB2PXOO.js → chunk-VHTJRS2N.js} +3 -5
  25. package/dist/components/index.cjs +42813 -42691
  26. package/dist/components/index.d.ts +182 -319
  27. package/dist/components/index.js +621 -13
  28. package/dist/context/index.cjs +8 -3
  29. package/dist/context/index.js +3 -3
  30. package/dist/hooks/index.cjs +56 -4
  31. package/dist/hooks/index.js +7 -7
  32. package/dist/lib/drawable/three/index.cjs +49 -1
  33. package/dist/lib/drawable/three/index.d.ts +5 -5
  34. package/dist/lib/drawable/three/index.js +7 -7
  35. package/dist/lib/index.cjs +50 -1
  36. package/dist/lib/index.d.ts +2 -2
  37. package/dist/lib/index.js +6 -5
  38. package/dist/locales/index.cjs +147 -3
  39. package/dist/locales/index.js +99 -3
  40. package/dist/{paintDispatch-DHo3WhaU.d.ts → paintDispatch-_6EhJCiL.d.ts} +3 -3
  41. package/dist/providers/index.cjs +35850 -35687
  42. package/dist/providers/index.d.ts +33 -8
  43. package/dist/providers/index.js +37 -13
  44. package/dist/renderer/index.cjs +6 -0
  45. package/dist/renderer/index.d.ts +1 -1
  46. package/dist/renderer/index.js +1 -1
  47. package/dist/runtime/index.cjs +42533 -42343
  48. package/dist/runtime/index.d.ts +4 -2
  49. package/dist/runtime/index.js +12 -12
  50. package/dist/ssr/index.cjs +377 -137
  51. package/dist/ssr/index.d.cts +5 -1
  52. package/dist/ssr/index.d.ts +5 -1
  53. package/dist/ssr/index.js +313 -73
  54. package/dist/{verificationRegistry-BYD3cVhS.d.ts → verificationRegistry-CD7Xb40L.d.ts} +1 -1
  55. package/locales/ar.json +49 -1
  56. package/locales/en.json +49 -1
  57. package/locales/sl.json +49 -1
  58. package/package.json +6 -6
  59. package/tailwind-preset.cjs +23 -0
  60. package/themes/_base.css +28 -8
  61. package/themes/_contract.md +5 -0
  62. package/dist/Typography-7FRZOS2H.js +0 -5
  63. package/dist/{avl-3d-context-DLteNEwu.d.ts → avl-3d-context-MAt_NuU9.d.ts} +3 -3
  64. package/dist/{chunk-IN3BVW2Z.js → chunk-64WACXM7.js} +14 -14
package/dist/ssr/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import * as React16 from 'react';
2
- import React16__default, { createContext, useCallback, useState, useRef, useEffect, useContext, useMemo, useSyncExternalStore, useLayoutEffect, useId } from 'react';
1
+ import * as React17 from 'react';
2
+ import React17__default, { createContext, useCallback, useState, useRef, useEffect, useContext, useMemo, useSyncExternalStore, useLayoutEffect, useId } from 'react';
3
3
  import { createLogger } from '@almadar/logger';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import * as LucideIcons2 from 'lucide-react';
@@ -2862,7 +2862,7 @@ var positionStyles = {
2862
2862
  fixed: "fixed",
2863
2863
  sticky: "sticky"
2864
2864
  };
2865
- var Box = React16__default.forwardRef(
2865
+ var Box = React17__default.forwardRef(
2866
2866
  ({
2867
2867
  padding,
2868
2868
  paddingX,
@@ -2931,7 +2931,7 @@ var Box = React16__default.forwardRef(
2931
2931
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
2932
2932
  const isClickable = action || onClick;
2933
2933
  const actionControl = action && rest.role === void 0 && rest.tabIndex === void 0 ? pressableProps(handleClick) : {};
2934
- return React16__default.createElement(
2934
+ return React17__default.createElement(
2935
2935
  Component,
2936
2936
  {
2937
2937
  ref,
@@ -3036,7 +3036,7 @@ var Stack = ({
3036
3036
  };
3037
3037
  const isHorizontal = direction === "horizontal";
3038
3038
  const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
3039
- return React16__default.createElement(
3039
+ return React17__default.createElement(
3040
3040
  Component,
3041
3041
  {
3042
3042
  ...domPassthrough(rest),
@@ -3179,6 +3179,7 @@ var en_default = {
3179
3179
  "aria.removeFilter": "Remove filter",
3180
3180
  "aria.closeDrawer": "Close drawer",
3181
3181
  "aria.closePanel": "Close panel",
3182
+ "aria.dockPanel": "Side panel",
3182
3183
  "aria.previousImage": "Previous image",
3183
3184
  "aria.nextImage": "Next image",
3184
3185
  "aria.dismiss": "Dismiss",
@@ -3200,6 +3201,7 @@ var en_default = {
3200
3201
  "aria.openMenu": "Open menu",
3201
3202
  "aria.closeMenu": "Close menu",
3202
3203
  "aria.openSidebar": "Open sidebar",
3204
+ "aria.openRow": "Open item {{position}}",
3203
3205
  "sidebar.expand": "Expand sidebar",
3204
3206
  "sidebar.collapse": "Collapse sidebar",
3205
3207
  "sidebar.close": "Close sidebar",
@@ -4245,7 +4247,53 @@ var en_default = {
4245
4247
  "aria.walkTraitDone": "completed",
4246
4248
  "aria.walkTraitPending": "pending",
4247
4249
  "aria.walkGraph": "State graph for {{trait}}: {{from}} to {{to}}",
4248
- "aria.loading": "Loading"
4250
+ "aria.loading": "Loading",
4251
+ "agentActivity.toolCall": "Called {{tool}}",
4252
+ "agentActivity.toolResult": "{{tool}} returned",
4253
+ "agentActivity.toolRows": "{{count}} rows",
4254
+ "agentActivity.thinking": "Thinking\u2026",
4255
+ "agentActivity.analyzed": "Analyzed your request \u2014 {{organism}}",
4256
+ "agentActivity.renamed": "Rename {{from}} \u2192 {{to}}",
4257
+ "agentActivity.deleted": "Remove {{orbitalName}}",
4258
+ "agentActivity.roster": "Planning {{count}} orbitals",
4259
+ "agentActivity.orbitalStarted": "Working on {{orbitalName}}\u2026",
4260
+ "agentActivity.orbitalStartedSettled": "Started {{orbitalName}}",
4261
+ "agentActivity.orbitalDone": "{{orbitalName}} ready",
4262
+ "agentActivity.orbitalCounts": "{{traitCount}} traits, {{transitionCount}} transitions",
4263
+ "agentActivity.change.orbital-added": "Added {{orbitalName}}",
4264
+ "agentActivity.change.orbital-removed": "Removed {{orbitalName}}",
4265
+ "agentActivity.change.entity-fields-changed": "Changed the data fields of {{orbitalName}}",
4266
+ "agentActivity.change.trait-added": "Added a behavior to {{orbitalName}}",
4267
+ "agentActivity.change.trait-removed": "Removed a behavior from {{orbitalName}}",
4268
+ "agentActivity.change.state-machine-changed": "Changed the flow of {{orbitalName}}",
4269
+ "agentActivity.change.guard-changed": "Changed a rule in {{orbitalName}}",
4270
+ "agentActivity.change.effect-changed": "Changed what {{orbitalName}} does",
4271
+ "agentActivity.change.render-ui-changed": "Changed the design of {{orbitalName}}",
4272
+ "agentActivity.change.event-wiring-changed": "Changed the connections of {{orbitalName}}",
4273
+ "agentActivity.change.page-changed": "Changed the pages of {{orbitalName}}",
4274
+ "agentActivity.change.behavior-composed": "Composed a behavior into {{orbitalName}}",
4275
+ "agentActivity.done": "Done \u2014 {{count}} orbitals ready",
4276
+ "agentActivity.cancelled": "Cancelled",
4277
+ "agentActivity.jump": "Show",
4278
+ "agentActivity.emptyTitle": "No activity yet",
4279
+ "agentActivity.emptyDescription": "Send a message and the agent's work shows up here.",
4280
+ "agentActivity.fileOperation": "{{operation}}",
4281
+ "agentActivity.schemaDiff": "Edited {{filePath}}",
4282
+ "agentActivity.coordinatorDecision": "Chose {{organism}}",
4283
+ "agentActivity.change.trait-config-changed": "Changed the settings of {{orbitalName}}",
4284
+ "agentActivity.change.theme-changed": "Changed the theme of {{orbitalName}}",
4285
+ "agentActivity.llmResponse": "Raw LLM response",
4286
+ "agentActivity.llmDuration": "{{seconds}}s",
4287
+ "agentActivity.llmTokens": "{{prompt}} in / {{completion}} out tokens",
4288
+ "agentActivity.llmResponseLabel": "Response",
4289
+ "agentActivity.llmSystemPrompt": "System prompt",
4290
+ "agentActivity.llmUserPrompt": "User prompt",
4291
+ "agentActivity.llmToolCalls": "Tool calls",
4292
+ "agentActivity.showRawLlm": "Raw LLM",
4293
+ "agentActivity.earlierConversations": "Earlier conversations ({{count}})",
4294
+ "agentActivity.earlierActivity": "Earlier activity",
4295
+ "tabs.scrollStart": "Scroll tabs back",
4296
+ "tabs.scrollEnd": "Scroll tabs forward"
4249
4297
  };
4250
4298
 
4251
4299
  // lib/format.ts
@@ -4434,7 +4482,7 @@ var Typography = ({
4434
4482
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
4435
4483
  body = formatValue(body, format, fmt);
4436
4484
  }
4437
- return React16__default.createElement(
4485
+ return React17__default.createElement(
4438
4486
  Component,
4439
4487
  {
4440
4488
  ...domPassthrough(rest),
@@ -4640,7 +4688,7 @@ function resolveLucide(name) {
4640
4688
  }
4641
4689
  function makeLucideAdapter(name) {
4642
4690
  const LucideComp = resolveLucide(name);
4643
- const Adapter = React16__default.forwardRef((props, ref) => /* @__PURE__ */ jsx(
4691
+ const Adapter = React17__default.forwardRef((props, ref) => /* @__PURE__ */ jsx(
4644
4692
  LucideComp,
4645
4693
  {
4646
4694
  ref,
@@ -4728,9 +4776,9 @@ var Icon = ({
4728
4776
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
4729
4777
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
4730
4778
  const family = useIconFamily();
4731
- const svgRef = React16__default.useRef(null);
4779
+ const svgRef = React17__default.useRef(null);
4732
4780
  const themeStroke = useThemeIconStrokeApplies(svgRef);
4733
- const RenderedComponent = React16__default.useMemo(() => {
4781
+ const RenderedComponent = React17__default.useMemo(() => {
4734
4782
  if (directIcon) return null;
4735
4783
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
4736
4784
  }, [directIcon, effectiveName, family]);
@@ -4872,13 +4920,13 @@ function AtlasImage({
4872
4920
  "aria-hidden": ariaHidden,
4873
4921
  ...rest
4874
4922
  }) {
4875
- const [, bump] = React16.useReducer((x) => x + 1, 0);
4876
- const canvasRef = React16.useRef(null);
4923
+ const [, bump] = React17.useReducer((x) => x + 1, 0);
4924
+ const canvasRef = React17.useRef(null);
4877
4925
  const sliced = isAtlasAsset(asset);
4878
4926
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
4879
4927
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
4880
4928
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
4881
- React16.useEffect(() => {
4929
+ React17.useEffect(() => {
4882
4930
  const canvas = canvasRef.current;
4883
4931
  if (!canvas || !img || !rect) return;
4884
4932
  canvas.width = rect.sw;
@@ -5043,7 +5091,7 @@ function resolveIconProp(value, sizeClass) {
5043
5091
  const IconComp = value;
5044
5092
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
5045
5093
  }
5046
- if (React16__default.isValidElement(value)) {
5094
+ if (React17__default.isValidElement(value)) {
5047
5095
  return value;
5048
5096
  }
5049
5097
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -5052,7 +5100,7 @@ function resolveIconProp(value, sizeClass) {
5052
5100
  }
5053
5101
  return value;
5054
5102
  }
5055
- var Button = React16__default.forwardRef(
5103
+ var Button = React17__default.forwardRef(
5056
5104
  ({
5057
5105
  className,
5058
5106
  variant = "primary",
@@ -5079,7 +5127,7 @@ var Button = React16__default.forwardRef(
5079
5127
  const navStack = useNavStack();
5080
5128
  const { pending, activate } = usePendingAction();
5081
5129
  const busy = isLoading || pending;
5082
- const [focused, setFocused] = React16__default.useState(false);
5130
+ const [focused, setFocused] = React17__default.useState(false);
5083
5131
  const inert = Boolean(disabled) || busy;
5084
5132
  const emitAction = () => {
5085
5133
  if (!action) return;
@@ -5217,7 +5265,7 @@ var sizeStyles2 = {
5217
5265
  md: "px-2.5 py-1 text-sm",
5218
5266
  lg: "px-3 py-1.5 text-base"
5219
5267
  };
5220
- var Badge = React16__default.forwardRef(
5268
+ var Badge = React17__default.forwardRef(
5221
5269
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, onClick, ...props }, ref) => {
5222
5270
  const { t } = useTranslate();
5223
5271
  const iconSizes = {
@@ -5281,13 +5329,25 @@ var Badge = React16__default.forwardRef(
5281
5329
  }
5282
5330
  );
5283
5331
  Badge.displayName = "Badge";
5332
+ var SurfaceContext = React17__default.createContext(false);
5333
+ function SurfaceBoundary({ children }) {
5334
+ return /* @__PURE__ */ jsx(SurfaceContext.Provider, { value: true, children });
5335
+ }
5336
+ function useContentSurface(surface = "auto") {
5337
+ const onSurface = React17__default.useContext(SurfaceContext);
5338
+ const paints = surface === "auto" && !onSurface;
5339
+ return {
5340
+ className: paints ? "surface-content" : void 0,
5341
+ provide: (node) => paints ? /* @__PURE__ */ jsx(SurfaceBoundary, { children: node }) : /* @__PURE__ */ jsx(Fragment, { children: node })
5342
+ };
5343
+ }
5284
5344
  var sizeStyles3 = {
5285
5345
  xs: "h-3 w-3",
5286
5346
  sm: "h-icon-default w-icon-default",
5287
5347
  md: "h-6 w-6",
5288
5348
  lg: "h-8 w-8"
5289
5349
  };
5290
- var Spinner = React16__default.forwardRef(
5350
+ var Spinner = React17__default.forwardRef(
5291
5351
  ({ className, size = "md", overlay, ...props }, ref) => {
5292
5352
  const { t } = useTranslate();
5293
5353
  if (overlay) {
@@ -5325,16 +5385,12 @@ var Spinner = React16__default.forwardRef(
5325
5385
  Spinner.displayName = "Spinner";
5326
5386
  var variantStyles4 = {
5327
5387
  default: [
5328
- "bg-card surface-material",
5329
- "border-[length:var(--border-width)] border-border",
5330
- "shadow-elevation-card",
5388
+ "surface-content",
5331
5389
  "transition-all duration-normal",
5332
5390
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
5333
5391
  ].join(" "),
5334
5392
  bordered: [
5335
- "bg-card surface-material",
5336
- "border-[length:var(--border-width)] border-border",
5337
- "shadow-elevation-card",
5393
+ "surface-content",
5338
5394
  "transition-all duration-normal",
5339
5395
  "hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
5340
5396
  ].join(" "),
@@ -5376,7 +5432,7 @@ var lookStyles = {
5376
5432
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
5377
5433
  "tile-image-first": "p-0 overflow-hidden"
5378
5434
  };
5379
- var Card = React16__default.forwardRef(
5435
+ var Card = React17__default.forwardRef(
5380
5436
  ({
5381
5437
  className,
5382
5438
  variant = "bordered",
@@ -5419,16 +5475,16 @@ var Card = React16__default.forwardRef(
5419
5475
  title && /* @__PURE__ */ jsx("h3", { className: "text-lg text-card-foreground heading-voice", children: title }),
5420
5476
  subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: subtitle })
5421
5477
  ] }),
5422
- children
5478
+ /* @__PURE__ */ jsx(SurfaceBoundary, { children })
5423
5479
  ]
5424
5480
  }
5425
5481
  );
5426
5482
  }
5427
5483
  );
5428
5484
  Card.displayName = "Card";
5429
- var CardHeader = React16__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
5485
+ var CardHeader = React17__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
5430
5486
  CardHeader.displayName = "CardHeader";
5431
- var CardTitle = React16__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5487
+ var CardTitle = React17__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5432
5488
  "h3",
5433
5489
  {
5434
5490
  ref,
@@ -5441,11 +5497,11 @@ var CardTitle = React16__default.forwardRef(({ className, ...props }, ref) => /*
5441
5497
  }
5442
5498
  ));
5443
5499
  CardTitle.displayName = "CardTitle";
5444
- var CardContent = React16__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
5500
+ var CardContent = React17__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
5445
5501
  CardContent.displayName = "CardContent";
5446
5502
  var CardBody = CardContent;
5447
5503
  CardBody.displayName = "CardBody";
5448
- var CardFooter = React16__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5504
+ var CardFooter = React17__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5449
5505
  "div",
5450
5506
  {
5451
5507
  ref,
@@ -5542,7 +5598,7 @@ var Center = ({
5542
5598
  ...rest
5543
5599
  }) => {
5544
5600
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
5545
- return React16__default.createElement(Component, {
5601
+ return React17__default.createElement(Component, {
5546
5602
  ...domPassthrough(rest),
5547
5603
  className: cn(
5548
5604
  inline ? "inline-flex" : "flex",
@@ -5649,8 +5705,8 @@ var Avatar = ({
5649
5705
  }) => {
5650
5706
  const eventBus = useEventBus();
5651
5707
  const { t } = useTranslate();
5652
- const [imgFailed, setImgFailed] = React16__default.useState(false);
5653
- React16__default.useEffect(() => {
5708
+ const [imgFailed, setImgFailed] = React17__default.useState(false);
5709
+ React17__default.useEffect(() => {
5654
5710
  setImgFailed(false);
5655
5711
  }, [src]);
5656
5712
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -6006,7 +6062,7 @@ var Container = ({
6006
6062
  ...rest
6007
6063
  }) => {
6008
6064
  const resolvedSize = maxWidth ?? size ?? "lg";
6009
- return React16__default.createElement(
6065
+ return React17__default.createElement(
6010
6066
  Component,
6011
6067
  {
6012
6068
  ...domPassthrough(rest),
@@ -6022,6 +6078,186 @@ var Container = ({
6022
6078
  );
6023
6079
  };
6024
6080
  Container.displayName = "Container";
6081
+ var pulseClass = "almadar-shimmer animate-shimmer rounded-container";
6082
+ function SkeletonLine({ className }) {
6083
+ return /* @__PURE__ */ jsx(Box, { className: cn(pulseClass, "h-4", className) });
6084
+ }
6085
+ function SkeletonBlock({ className }) {
6086
+ return /* @__PURE__ */ jsx(Box, { className: cn(pulseClass, className) });
6087
+ }
6088
+ function HeaderSkeleton({ className }) {
6089
+ return /* @__PURE__ */ jsxs(HStack, { className: cn("items-center justify-between px-6 py-5", className), children: [
6090
+ /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "flex-1", children: [
6091
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-7 w-48" }),
6092
+ /* @__PURE__ */ jsx(SkeletonLine, { className: "w-64" })
6093
+ ] }),
6094
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", children: [
6095
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-9 w-24 rounded-interactive" }),
6096
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-9 w-32 rounded-interactive" })
6097
+ ] })
6098
+ ] });
6099
+ }
6100
+ function TableSkeleton({ rows = 5, columns = 4, className }) {
6101
+ return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: cn("border border-border rounded-container overflow-hidden", className), children: [
6102
+ /* @__PURE__ */ jsx(HStack, { className: "px-4 py-3 bg-muted/30 border-b border-border", children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-4 flex-1 mx-2" }, i)) }),
6103
+ Array.from({ length: rows }).map((_, rowIdx) => /* @__PURE__ */ jsx(
6104
+ HStack,
6105
+ {
6106
+ className: cn(
6107
+ "px-4 py-3",
6108
+ rowIdx < rows - 1 && "border-b border-border"
6109
+ ),
6110
+ children: Array.from({ length: columns }).map((_2, colIdx) => /* @__PURE__ */ jsx(SkeletonLine, { className: "flex-1 mx-2" }, colIdx))
6111
+ },
6112
+ rowIdx
6113
+ ))
6114
+ ] });
6115
+ }
6116
+ function FormSkeleton({ fields = 4, className }) {
6117
+ return /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: cn("p-6", className), children: [
6118
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-6 w-40" }),
6119
+ Array.from({ length: fields }).map((_, i) => /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
6120
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-4 w-24" }),
6121
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-10 w-full rounded-interactive" })
6122
+ ] }, i)),
6123
+ /* @__PURE__ */ jsxs(HStack, { gap: "md", className: "justify-end pt-2", children: [
6124
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-10 w-20 rounded-interactive" }),
6125
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-10 w-24 rounded-interactive" })
6126
+ ] })
6127
+ ] });
6128
+ }
6129
+ function CardSkeleton({ className }) {
6130
+ return /* @__PURE__ */ jsxs(
6131
+ VStack,
6132
+ {
6133
+ gap: "md",
6134
+ className: cn(
6135
+ "p-5 border border-border rounded-container",
6136
+ className
6137
+ ),
6138
+ children: [
6139
+ /* @__PURE__ */ jsxs(HStack, { className: "items-center", gap: "md", children: [
6140
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-10 w-10 rounded-full" }),
6141
+ /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1", children: [
6142
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-5 w-32" }),
6143
+ /* @__PURE__ */ jsx(SkeletonLine, { className: "w-48" })
6144
+ ] })
6145
+ ] }),
6146
+ /* @__PURE__ */ jsx(SkeletonLine, { className: "w-full" }),
6147
+ /* @__PURE__ */ jsx(SkeletonLine, { className: "w-3/4" }),
6148
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "pt-2", children: [
6149
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-6 w-16 rounded-full" }),
6150
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-6 w-20 rounded-full" })
6151
+ ] })
6152
+ ]
6153
+ }
6154
+ );
6155
+ }
6156
+ function TextSkeleton({ rows = 3, className }) {
6157
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className, children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsx(
6158
+ SkeletonLine,
6159
+ {
6160
+ className: i === rows - 1 ? "w-2/3" : "w-full"
6161
+ },
6162
+ i
6163
+ )) });
6164
+ }
6165
+ function ListSkeleton({ rows = 5, className }) {
6166
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("border border-border rounded-container overflow-hidden", className), children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxs(HStack, { gap: "md", className: cn("items-center px-4 py-3", i < rows - 1 && "border-b border-border"), children: [
6167
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-10 w-10 rounded-full shrink-0" }),
6168
+ /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
6169
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-4 w-1/3" }),
6170
+ /* @__PURE__ */ jsx(SkeletonLine, { className: "w-2/3 h-3" })
6171
+ ] }),
6172
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-6 w-16 rounded-full" })
6173
+ ] }, i)) });
6174
+ }
6175
+ function GridSkeleton({ rows = 6, className }) {
6176
+ return /* @__PURE__ */ jsx(SimpleGrid, { minChildWidth: "260px", gap: "md", className, children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsx(CardSkeleton, {}, i)) });
6177
+ }
6178
+ function StatsSkeleton({ columns = 4, className }) {
6179
+ return /* @__PURE__ */ jsx(SimpleGrid, { minChildWidth: "180px", gap: "md", className, children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "p-4 border border-border rounded-container", children: [
6180
+ /* @__PURE__ */ jsx(SkeletonLine, { className: "w-1/2 h-3" }),
6181
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-7 w-2/3" })
6182
+ ] }, i)) });
6183
+ }
6184
+ function DetailSkeleton({ rows = 6, className }) {
6185
+ return /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: cn("p-6 border border-border rounded-container", className), children: [
6186
+ /* @__PURE__ */ jsxs(HStack, { className: "items-start justify-between", gap: "md", children: [
6187
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
6188
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-8 w-56" }),
6189
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-6 w-20 rounded-full" })
6190
+ ] }),
6191
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", children: [
6192
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-9 w-24 rounded-interactive" }),
6193
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-9 w-9 rounded-interactive" })
6194
+ ] })
6195
+ ] }),
6196
+ /* @__PURE__ */ jsxs(HStack, { gap: "md", children: [
6197
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-20 flex-1" }),
6198
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-20 flex-1" }),
6199
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-20 flex-1" })
6200
+ ] }),
6201
+ /* @__PURE__ */ jsx(SimpleGrid, { minChildWidth: "200px", maxCols: 3, gap: "md", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
6202
+ /* @__PURE__ */ jsx(SkeletonLine, { className: "w-1/3 h-3" }),
6203
+ /* @__PURE__ */ jsx(SkeletonBlock, { className: "h-5 w-2/3" })
6204
+ ] }, i)) }),
6205
+ /* @__PURE__ */ jsx(TextSkeleton, { rows: 3 })
6206
+ ] });
6207
+ }
6208
+ function Skeleton({
6209
+ variant = "text",
6210
+ spec,
6211
+ rows,
6212
+ columns,
6213
+ fields,
6214
+ className,
6215
+ ...rest
6216
+ }) {
6217
+ const { t } = useTranslate();
6218
+ const shape = spec !== void 0 ? shapeOfSpec(spec) : { variant, rows, columns, fields };
6219
+ if (shape === null) return null;
6220
+ return /* @__PURE__ */ jsx(
6221
+ Box,
6222
+ {
6223
+ ...domPassthrough(rest),
6224
+ role: "status",
6225
+ "aria-busy": "true",
6226
+ "aria-label": rest["aria-label"] ?? t("common.loading"),
6227
+ "data-skeleton": shape.variant,
6228
+ ...{ [LOADING_STATE_MARKER]: "" },
6229
+ className: "w-full",
6230
+ children: renderVariant(shape.variant, shape.rows, shape.columns, shape.fields, className)
6231
+ }
6232
+ );
6233
+ }
6234
+ function shapeOfSpec(spec) {
6235
+ if (spec === "none") return null;
6236
+ return typeof spec === "string" ? { variant: spec } : spec;
6237
+ }
6238
+ function renderVariant(variant, rows, columns, fields, className) {
6239
+ switch (variant) {
6240
+ case "header":
6241
+ return /* @__PURE__ */ jsx(HeaderSkeleton, { className });
6242
+ case "table":
6243
+ return /* @__PURE__ */ jsx(TableSkeleton, { rows, columns, className });
6244
+ case "list":
6245
+ return /* @__PURE__ */ jsx(ListSkeleton, { rows, className });
6246
+ case "grid":
6247
+ return /* @__PURE__ */ jsx(GridSkeleton, { rows, className });
6248
+ case "detail":
6249
+ return /* @__PURE__ */ jsx(DetailSkeleton, { rows, className });
6250
+ case "stats":
6251
+ return /* @__PURE__ */ jsx(StatsSkeleton, { columns, className });
6252
+ case "form":
6253
+ return /* @__PURE__ */ jsx(FormSkeleton, { fields, className });
6254
+ case "card":
6255
+ return /* @__PURE__ */ jsx(CardSkeleton, { className });
6256
+ case "text":
6257
+ return /* @__PURE__ */ jsx(TextSkeleton, { rows, className });
6258
+ }
6259
+ }
6260
+ Skeleton.displayName = "Skeleton";
6025
6261
  var COLOR_VAR = {
6026
6262
  primary: "var(--color-primary)",
6027
6263
  success: "var(--color-success)",
@@ -6081,7 +6317,7 @@ var Sparkline = ({
6081
6317
  Sparkline.displayName = "Sparkline";
6082
6318
  var lookStyles2 = {
6083
6319
  elevated: "",
6084
- flat: "shadow-none border-[length:var(--border-width)] border-border",
6320
+ flat: "shadow-none",
6085
6321
  "progress-backed": "",
6086
6322
  gauge: "",
6087
6323
  sparkline: ""
@@ -6121,9 +6357,12 @@ var StatDisplay = ({
6121
6357
  look = "elevated",
6122
6358
  className,
6123
6359
  isLoading = false,
6360
+ skeleton = { variant: "stats", columns: 1 },
6124
6361
  error = null,
6362
+ surface = "auto",
6125
6363
  ...rest
6126
6364
  }) => {
6365
+ const contentSurface = useContentSurface(surface);
6127
6366
  const eventBus = useEventBus();
6128
6367
  const fmt = useFormatContext();
6129
6368
  const handleClick = useCallback(() => {
@@ -6144,13 +6383,12 @@ var StatDisplay = ({
6144
6383
  const trendSuffix = trendFormat === "percent" ? "%" : "";
6145
6384
  const trendLabel = showTrend ? `${trendUp ? "\u2191" : "\u2193"} ${trendMagnitude}${trendSuffix}` : "";
6146
6385
  if (error) {
6147
- return /* @__PURE__ */ jsx(Card, { ...domPassthrough(rest), className: cn(padSizes[size], className), children: /* @__PURE__ */ jsx(Typography, { variant: "small", color: "error", children: error.message }) });
6386
+ return contentSurface.provide(
6387
+ /* @__PURE__ */ jsx(Box, { ...domPassthrough(rest), className: cn(contentSurface.className, "rounded-container", padSizes[size], className), children: /* @__PURE__ */ jsx(Typography, { variant: "small", color: "error", children: error.message }) })
6388
+ );
6148
6389
  }
6149
6390
  if (isLoading) {
6150
- return /* @__PURE__ */ jsx(Card, { ...domPassthrough(rest), className: cn(padSizes[size], className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "animate-pulse", children: [
6151
- /* @__PURE__ */ jsx(Box, { className: "h-3 bg-muted rounded w-16" }),
6152
- /* @__PURE__ */ jsx(Box, { className: "h-6 bg-muted rounded w-12" })
6153
- ] }) });
6391
+ return /* @__PURE__ */ jsx(Skeleton, { spec: skeleton, className });
6154
6392
  }
6155
6393
  if (compact) {
6156
6394
  return /* @__PURE__ */ jsxs(
@@ -6170,40 +6408,42 @@ var StatDisplay = ({
6170
6408
  }
6171
6409
  );
6172
6410
  }
6173
- return /* @__PURE__ */ jsx(
6174
- Card,
6175
- {
6176
- ...domPassthrough(rest),
6177
- className: cn(padSizes[size], lookStyles2[look], clickEvent && "cursor-pointer hover:shadow-elevation-dialog transition-shadow", className),
6178
- ...pressableProps(clickEvent ? handleClick : void 0),
6179
- children: /* @__PURE__ */ jsxs(HStack, { align: "start", justify: "between", children: [
6180
- /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "space-y-1 flex-1", children: [
6181
- /* @__PURE__ */ jsx(Typography, { variant: "overline", color: "secondary", children: label }),
6182
- /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "end", children: [
6183
- /* @__PURE__ */ jsx(Typography, { variant: "h4", className: cn("", valueSizes[size], variantColor[variant]), children: displayValue }),
6184
- showTrend && /* @__PURE__ */ jsx(
6185
- Typography,
6411
+ return contentSurface.provide(
6412
+ /* @__PURE__ */ jsx(
6413
+ Box,
6414
+ {
6415
+ ...domPassthrough(rest),
6416
+ className: cn(contentSurface.className, "rounded-container", padSizes[size], lookStyles2[look], clickEvent && "cursor-pointer hover:shadow-elevation-dialog transition-shadow", className),
6417
+ ...pressableProps(clickEvent ? handleClick : void 0),
6418
+ children: /* @__PURE__ */ jsxs(HStack, { align: "start", justify: "between", children: [
6419
+ /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "space-y-1 flex-1", children: [
6420
+ /* @__PURE__ */ jsx(Typography, { variant: "overline", color: "secondary", children: label }),
6421
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "end", children: [
6422
+ /* @__PURE__ */ jsx(Typography, { variant: "h4", className: cn("", valueSizes[size], variantColor[variant]), children: displayValue }),
6423
+ showTrend && /* @__PURE__ */ jsx(
6424
+ Typography,
6425
+ {
6426
+ variant: "caption",
6427
+ className: cn("font-semibold pb-1", trendIsGood ? "text-success" : "text-error"),
6428
+ children: trendLabel
6429
+ }
6430
+ )
6431
+ ] }),
6432
+ showTarget && /* @__PURE__ */ jsx(Box, { className: "mt-2 h-1.5 w-full bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
6433
+ Box,
6186
6434
  {
6187
- variant: "caption",
6188
- className: cn("font-semibold pb-1", trendIsGood ? "text-success" : "text-error"),
6189
- children: trendLabel
6435
+ className: cn("h-full rounded-full transition-all", `bg-${variant === "default" ? "primary" : variant}`),
6436
+ style: { width: `${targetPct}%` }
6190
6437
  }
6191
- )
6438
+ ) })
6192
6439
  ] }),
6193
- showTarget && /* @__PURE__ */ jsx(Box, { className: "mt-2 h-1.5 w-full bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
6194
- Box,
6195
- {
6196
- className: cn("h-full rounded-full transition-all", `bg-${variant === "default" ? "primary" : variant}`),
6197
- style: { width: `${targetPct}%` }
6198
- }
6199
- ) })
6200
- ] }),
6201
- /* @__PURE__ */ jsxs(VStack, { gap: "xs", align: "end", children: [
6202
- ResolvedIcon && /* @__PURE__ */ jsx(Box, { className: cn("p-3 rounded-container", iconBg), children: /* @__PURE__ */ jsx(ResolvedIcon, { className: cn(iconSizes[size], iconColor) }) }),
6203
- sparklineData && sparklineData.length > 1 && /* @__PURE__ */ jsx(Sparkline, { data: sparklineData, color: "auto" })
6440
+ /* @__PURE__ */ jsxs(VStack, { gap: "xs", align: "end", children: [
6441
+ ResolvedIcon && /* @__PURE__ */ jsx(Box, { className: cn("p-3 rounded-container", iconBg), children: /* @__PURE__ */ jsx(ResolvedIcon, { className: cn(iconSizes[size], iconColor) }) }),
6442
+ sparklineData && sparklineData.length > 1 && /* @__PURE__ */ jsx(Sparkline, { data: sparklineData, color: "auto" })
6443
+ ] })
6204
6444
  ] })
6205
- ] })
6206
- }
6445
+ }
6446
+ )
6207
6447
  );
6208
6448
  };
6209
6449
  StatDisplay.displayName = "StatDisplay";
@@ -6354,7 +6594,7 @@ var animatedStyles = {
6354
6594
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6355
6595
  "none": {}
6356
6596
  };
6357
- var AnimatedReveal = React16__default.forwardRef(
6597
+ var AnimatedReveal = React17__default.forwardRef(
6358
6598
  ({
6359
6599
  trigger = "scroll",
6360
6600
  animation = "fade-up",
@@ -6507,7 +6747,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
6507
6747
  el.style.opacity = animate ? "1" : "0";
6508
6748
  });
6509
6749
  }
6510
- var AnimatedGraphic = React16__default.forwardRef(
6750
+ var AnimatedGraphic = React17__default.forwardRef(
6511
6751
  ({
6512
6752
  src,
6513
6753
  svgContent,
@@ -6530,7 +6770,7 @@ var AnimatedGraphic = React16__default.forwardRef(
6530
6770
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6531
6771
  const resolvedSvg = svgContent ?? fetchedSvg;
6532
6772
  const prevAnimateRef = useRef(animate);
6533
- const setRef = React16__default.useCallback(
6773
+ const setRef = React17__default.useCallback(
6534
6774
  (node) => {
6535
6775
  containerRef.current = node;
6536
6776
  if (typeof ref === "function") ref(node);
@@ -1,4 +1,4 @@
1
- import { D as DrawableNode } from './paintDispatch-DHo3WhaU.js';
1
+ import { D as DrawableNode } from './paintDispatch-_6EhJCiL.js';
2
2
  import { OrbitalVerificationAPI, TraitStateSnapshot, EventPayload, BusEvent, VerificationCheck, BridgeHealth, VerificationSnapshot, VerificationSummary, TransitionTrace, OrbitalEventRequest, OrbitalEventResponse, ServerResponseTrace, EffectTrace, CheckStatus, ServerEffectResult, AssetLoadStatus } from '@almadar/core';
3
3
  import { EventTransport } from '@almadar/runtime';
4
4