@almadar/shell-web 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/{ArbitraryClassCompiler-Mzabq-UB.d.ts → ArbitraryClassCompiler-CO_iASBn.d.ts} +99 -4
  2. package/dist/AvlGlyph-EPJKFEO3.js +6 -0
  3. package/dist/AvlStateMachine-RKZIKNGC.js +9 -0
  4. package/dist/AvlTransitionDetail-63SD6GZF.js +11 -0
  5. package/dist/AvlTransitionExplainer-ZBTLOM3T.js +12 -0
  6. package/dist/BehaviorView-YS5G4GNB.js +11 -0
  7. package/dist/{Canvas3DHost-_Y-5uLM_.d.ts → Canvas3DHost-BkZQB5l2.d.ts} +1 -1
  8. package/dist/{EventBusProvider-CVwjkV_2.d.ts → EventBusProvider-BFFHfN4O.d.ts} +12 -0
  9. package/dist/FlowCanvas-AUMTWMNG.js +26 -0
  10. package/dist/{GameAudioProvider-Cm9BnvmP.d.ts → GameAudioProvider-ceM_n0ey.d.ts} +4 -7
  11. package/dist/KernelEngineContext-CcxGYtlr.d.ts +33 -0
  12. package/dist/LayersPanel-M2LHWUFF.js +6 -0
  13. package/dist/ModuleCard-QHDGK5XK.js +7 -0
  14. package/dist/OrbInspector-QCPEPUPH.js +26 -0
  15. package/dist/{Select-mDZIwNqN.d.ts → Select-B-iDdnvE.d.ts} +16 -30
  16. package/dist/ServerBridge-Bqsj-lOU.d.ts +124 -0
  17. package/dist/UISlotRenderer-C7WWOK43.js +26 -0
  18. package/dist/auth/browser/index.js +1 -0
  19. package/dist/auth/react/index.d.ts +8 -1
  20. package/dist/auth/react/index.js +40 -2
  21. package/dist/avl/index.d.ts +89 -79
  22. package/dist/avl/index.js +38 -38
  23. package/dist/{avl-3d-context-BIRKWpaL.d.ts → avl-3d-context-BycmO6tG.d.ts} +9 -12
  24. package/dist/{chunk-GKIFONTE.js → chunk-3S54FWRC.js} +2 -2
  25. package/dist/{chunk-DYEKAA4L.js → chunk-3VZ36ZKO.js} +240 -252
  26. package/dist/{chunk-PC7K4SK7.js → chunk-4T3P43NS.js} +18 -269
  27. package/dist/{chunk-MBQAMMSE.js → chunk-4YXBKHHM.js} +269 -658
  28. package/dist/{chunk-YDNJLLG6.js → chunk-57DC34LY.js} +19 -10
  29. package/dist/{chunk-SJGJJKBY.js → chunk-AB3X7QTE.js} +6 -3
  30. package/dist/{chunk-AILY3XPS.js → chunk-AE7VCQB6.js} +5 -6
  31. package/dist/{chunk-FAJDTHWC.js → chunk-AGXD77SL.js} +2 -2
  32. package/dist/chunk-AU7O65OX.js +66 -0
  33. package/dist/{chunk-L677XGY3.js → chunk-CPLN6NBQ.js} +5 -5
  34. package/dist/{chunk-DZ42OJQC.js → chunk-DZBQA2OW.js} +1 -1
  35. package/dist/{chunk-2PY54Z44.js → chunk-E6KA4J6N.js} +5 -5
  36. package/dist/{chunk-DJ433ET5.js → chunk-GFXCPUMX.js} +11 -4
  37. package/dist/{chunk-FP3WIKTC.js → chunk-HH5KSMH5.js} +9 -1
  38. package/dist/{chunk-U6QRZASX.js → chunk-ILQXJ2AR.js} +1 -1
  39. package/dist/{chunk-B4BU77LT.js → chunk-ILZ7ORX7.js} +1 -1
  40. package/dist/{chunk-SGM3FASH.js → chunk-K4MOPSEL.js} +14 -12
  41. package/dist/{chunk-GYTPOFVC.js → chunk-LHP2TK7O.js} +7402 -6970
  42. package/dist/{chunk-VFF5OO47.js → chunk-PCR37T3U.js} +15 -38
  43. package/dist/{chunk-R5O5AUPI.js → chunk-PRXQGGCO.js} +93 -86
  44. package/dist/{chunk-42FY4RYA.js → chunk-REXYVBUO.js} +2 -2
  45. package/dist/{chunk-DLZF4PVE.js → chunk-ROICKAU7.js} +3 -3
  46. package/dist/{chunk-KVQS4GXU.js → chunk-SP5CDJ6K.js} +18 -8
  47. package/dist/{chunk-P4LNHAFI.js → chunk-TUPZWTRE.js} +2 -2
  48. package/dist/chunk-TXAUOLWZ.js +490 -0
  49. package/dist/{chunk-EQAMU2ZC.js → chunk-UTDC2NEA.js} +1 -1
  50. package/dist/{chunk-73SRAB4P.js → chunk-UU57VNS2.js} +2 -2
  51. package/dist/{chunk-DFNZUYX4.js → chunk-UXLE3IPR.js} +70 -27
  52. package/dist/{chunk-L2DEKY4J.js → chunk-VO2TTLS5.js} +3 -6
  53. package/dist/{chunk-TESBIVUA.js → chunk-X3DMMX27.js} +2 -2
  54. package/dist/components/index.d.ts +331 -125
  55. package/dist/components/index.js +28 -28
  56. package/dist/context/index.d.ts +2 -3
  57. package/dist/context/index.js +4 -3
  58. package/dist/core.d.ts +93 -17
  59. package/dist/core.js +2 -1
  60. package/dist/design-classes/index.cjs +3 -1
  61. package/dist/design-classes/index.js +3 -1
  62. package/dist/hooks/index.d.ts +40 -5
  63. package/dist/hooks/index.js +5 -4
  64. package/dist/index.d.ts +36 -114
  65. package/dist/index.js +174 -34
  66. package/dist/kernel-client-TZKGHJRY.js +516 -0
  67. package/dist/kernel-wire-wNdAPfhJ.d.ts +88 -0
  68. package/dist/lib/index.d.ts +3 -3
  69. package/dist/lib/index.js +5 -4
  70. package/dist/{paintDispatch-ChW5mVuK.d.ts → paintDispatch-CuJLsr9Y.d.ts} +5 -15
  71. package/dist/{prism-AIWGN2X5.js → prism-X5YWKXO5.js} +5 -3
  72. package/dist/providers/index.d.ts +42 -27
  73. package/dist/providers/index.js +22 -23
  74. package/dist/renderer/index.d.ts +0 -2
  75. package/dist/renderer/index.js +1 -0
  76. package/dist/runtime/index.d.ts +52 -253
  77. package/dist/runtime/index.js +21 -24
  78. package/dist/ssr/index.cjs +2643 -535
  79. package/dist/ssr/index.d.cts +0 -23
  80. package/dist/ssr/index.d.ts +0 -23
  81. package/dist/ssr/index.js +2639 -535
  82. package/dist/storage/browser/index.js +1 -0
  83. package/dist/test-support.d.ts +15 -8
  84. package/dist/test-support.js +91 -24
  85. package/dist/three/index.d.ts +6 -6
  86. package/dist/three/index.js +49 -37
  87. package/dist/{verificationRegistry-CabxhfTv.d.ts → verificationRegistry-CVrcxG1s.d.ts} +3 -3
  88. package/package.json +13 -9
  89. package/src/core/lib/band-shapes.json +7 -0
  90. package/src/core/locales/ar.json +18 -5
  91. package/src/core/locales/en.json +18 -5
  92. package/src/core/locales/sl.json +18 -5
  93. package/tailwind-preset.cjs +30 -1
  94. package/dist/AvlGlyph-JKJOAH23.js +0 -6
  95. package/dist/AvlStateMachine-PI4YGREK.js +0 -8
  96. package/dist/AvlTransitionDetail-ZH7V24UG.js +0 -12
  97. package/dist/AvlTransitionExplainer-ZSRT7L6Y.js +0 -13
  98. package/dist/BehaviorValueFrame-6RUJXT4A.js +0 -29
  99. package/dist/BehaviorValueFrame-SSEMEBTG.css +0 -1756
  100. package/dist/BehaviorView-RFEE5J6E.js +0 -10
  101. package/dist/FlowCanvas-STDC4OWK.js +0 -27
  102. package/dist/KernelEngineContext-BOCQoFwk.d.ts +0 -43
  103. package/dist/LayersPanel-BBQ54IVG.js +0 -7
  104. package/dist/ModuleCard-3TT2X7IW.js +0 -7
  105. package/dist/OrbInspector-K6T6O7GI.js +0 -27
  106. package/dist/ServerBridge-Cm1On51b.d.ts +0 -233
  107. package/dist/TraitValueFrame-2PJGLLVI.js +0 -28
  108. package/dist/TraitValueFrame-4G3KOUBR.css +0 -1756
  109. package/dist/UISlotRenderer-JKFSX24W.js +0 -27
  110. package/dist/UserContext-DqWeZkUZ.d.ts +0 -100
  111. package/dist/chunk-2QOH2HWM.js +0 -95
  112. package/dist/chunk-6P3MWXYE.js +0 -440
  113. package/dist/chunk-FIW6WN23.js +0 -508
  114. package/dist/chunk-GAR5TQ5B.js +0 -199
  115. package/dist/chunk-ZO6MXAS3.js +0 -69
  116. package/dist/kernel-client-ZH4PSMCN.js +0 -367
  117. package/dist/kernel-wire-B4S8pnP3.d.ts +0 -65
  118. package/dist/useKeyboardRouter-Dsq553Ur.d.ts +0 -42
@@ -1,5 +1,5 @@
1
- import { useDraggable, useDropZone } from './chunk-L2DEKY4J.js';
2
- import { Box, domPassthrough, useTranslate, Icon, pressableProps, Typography } from './chunk-MBQAMMSE.js';
1
+ import { useDraggable, useDropZone } from './chunk-VO2TTLS5.js';
2
+ import { Box, domPassthrough, useTranslate, Icon, pressableProps, Typography } from './chunk-4YXBKHHM.js';
3
3
  import React, { createContext, useState, useCallback, useRef, useEffect, useContext } from 'react';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
 
@@ -253,6 +253,9 @@ var FlatTreeNodeItem = ({
253
253
  const nav = look === "nav";
254
254
  const rowRef = useRef(null);
255
255
  const treeNav = useContext(TreeNavContext);
256
+ React.useEffect(() => {
257
+ if (isSelected) rowRef.current?.scrollIntoView({ block: "center" });
258
+ }, [isSelected]);
256
259
  const handleClick = useCallback(() => {
257
260
  if (hasChildren && !onNodeSelect) onToggle(item.id, expanded);
258
261
  onNodeSelect?.(item.id);
@@ -390,6 +393,7 @@ function ancestorsOf(id, byId) {
390
393
  var FlatFileTree = ({
391
394
  items,
392
395
  selectedId,
396
+ expandedPaths,
393
397
  look = "files",
394
398
  onNodeSelect,
395
399
  onNodeAction,
@@ -403,20 +407,24 @@ var FlatFileTree = ({
403
407
  const [overrides, setOverrides] = useState(() => /* @__PURE__ */ new Map());
404
408
  const byId = React.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
405
409
  const selectedAncestors = React.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
406
- const lastSelectedRef = React.useRef(selectedId);
410
+ const listedKey = (expandedPaths ?? []).join("\n");
411
+ const listed = React.useMemo(() => new Set(expandedPaths ?? []), [listedKey]);
412
+ const lastRevealRef = React.useRef(`${selectedId ?? ""}\0${listedKey}`);
407
413
  React.useEffect(() => {
408
- if (selectedId === lastSelectedRef.current) return;
409
- lastSelectedRef.current = selectedId;
414
+ const reveal = `${selectedId ?? ""}\0${listedKey}`;
415
+ if (reveal === lastRevealRef.current) return;
416
+ lastRevealRef.current = reveal;
417
+ const opened = [...selectedAncestors, ...listed];
410
418
  setOverrides((prev) => {
411
- if (![...selectedAncestors].some((a) => prev.get(a) === false)) return prev;
419
+ if (!opened.some((a) => prev.get(a) === false)) return prev;
412
420
  const next = new Map(prev);
413
- for (const a of selectedAncestors) if (next.get(a) === false) next.delete(a);
421
+ for (const a of opened) if (next.get(a) === false) next.delete(a);
414
422
  return next;
415
423
  });
416
- }, [selectedId, selectedAncestors]);
424
+ }, [selectedId, selectedAncestors, listedKey, listed]);
417
425
  const isExpanded = useCallback(
418
- (id, depth) => overrides.get(id) ?? (depth < 1 || selectedAncestors.has(id)),
419
- [overrides, selectedAncestors]
426
+ (id, depth) => overrides.get(id) ?? (depth < 1 || selectedAncestors.has(id) || listed.has(id)),
427
+ [overrides, selectedAncestors, listed]
420
428
  );
421
429
  const onToggle = useCallback((id, effective) => {
422
430
  setOverrides((prev) => {
@@ -484,6 +492,7 @@ var FileTree = ({
484
492
  ...rest,
485
493
  items,
486
494
  selectedId,
495
+ expandedPaths,
487
496
  look,
488
497
  onNodeSelect,
489
498
  onNodeAction,
@@ -1,6 +1,6 @@
1
- import { AvlEffect } from './chunk-DZ42OJQC.js';
2
- import { effectCategoryOf } from './chunk-DFNZUYX4.js';
3
- import { useThemeScope, Box, useTapReveal, Typography, cn, domPassthrough, usePresence, useDialogBehavior, SurfaceBoundary, VStack, useTranslate } from './chunk-MBQAMMSE.js';
1
+ import { AvlEffect } from './chunk-DZBQA2OW.js';
2
+ import { effectCategoryOf } from './chunk-UXLE3IPR.js';
3
+ import { useThemeScope, Box, useTapReveal, Typography, cn, domPassthrough, usePresence, useDialogBehavior, SurfaceBoundary, VStack, useTranslate } from './chunk-4YXBKHHM.js';
4
4
  import { createPortal } from 'react-dom';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  import React, { useId, useState, useRef, useLayoutEffect, useEffect } from 'react';
@@ -420,6 +420,9 @@ var Popover = ({
420
420
  style: {
421
421
  left: placement.left,
422
422
  top: placement.top,
423
+ // Sized by its content, not by the room right of `left`: a placement-dependent width re-places it forever.
424
+ width: "max-content",
425
+ maxWidth: `calc(100vw - ${2 * VIEWPORT_EDGE_PADDING}px)`,
423
426
  ...popoverWidth === 0 ? { visibility: "hidden" } : void 0
424
427
  },
425
428
  ...domPassthrough(rest),
@@ -1,9 +1,9 @@
1
1
  import { resolveThemeForRuntime, themeTokensToCssVars } from './chunk-3BBUBJFF.js';
2
2
  import { useUISlotManager } from './chunk-YHMRX6YA.js';
3
- import { useThemeScope, useTheme, keyInViewerMode, ThemeScopeContext, Box, cn } from './chunk-MBQAMMSE.js';
3
+ import { useThemeScope, useTheme, keyInViewerMode, ThemeScopeContext, Box, cn } from './chunk-4YXBKHHM.js';
4
4
  import { createContext, useMemo, useContext, useCallback, useEffect } from 'react';
5
5
  import { jsx, Fragment } from 'react/jsx-runtime';
6
- import { ANONYMOUS_USER, isThemeRegistryKey } from '@almadar/core';
6
+ import { ANONYMOUS_USER, isThemeRegistryKey, toPayloadValue } from '@almadar/core';
7
7
  export { ANONYMOUS_USER } from '@almadar/core';
8
8
  import { createLogger } from '@almadar/logger';
9
9
 
@@ -127,8 +127,6 @@ function useUserForEvaluation() {
127
127
  const { user, isLoggedIn } = useUser();
128
128
  return isLoggedIn && user ? user : void 0;
129
129
  }
130
-
131
- // src/lib/design-classes.ts
132
130
  var DESIGN_COLOR_TOKENS = [
133
131
  "primary",
134
132
  "primary-foreground",
@@ -459,7 +457,7 @@ function collectClasses(value, found) {
459
457
  }
460
458
  function classesOfPart(part) {
461
459
  const found = /* @__PURE__ */ new Set();
462
- collectClasses(JSON.parse(JSON.stringify(part)), found);
460
+ collectClasses(toPayloadValue(part), found);
463
461
  return [...found];
464
462
  }
465
463
  var classesByOrbital = /* @__PURE__ */ new WeakMap();
@@ -541,7 +539,8 @@ function OrbitalThemeProvider({ theme: declared, override, children }) {
541
539
  const darkTypeScale = resolvedMode === "dark" ? resolved?.variants?.dark?.typeScale : void 0;
542
540
  useFontImport(darkTypeScale?.fontImport ?? resolved?.tokens.typeScale?.fontImport);
543
541
  if (isThemeRegistryKey(theme)) {
544
- const { key, mode: keyMode } = keyInViewerMode(theme, availableThemes, resolvedMode);
542
+ const inherited = !override && parent.override ? { key: parent.override, mode: parent.mode } : void 0;
543
+ const { key, mode: keyMode } = inherited ?? keyInViewerMode(theme, availableThemes, resolvedMode);
545
544
  const mode = keyMode ?? parent.mode;
546
545
  return /* @__PURE__ */ jsx(
547
546
  ThemeScopeContext.Provider,
@@ -1,4 +1,4 @@
1
- import { useEventBus, useTranslate, Box, VStack, Icon, cn, Typography, Button, domPassthrough } from './chunk-MBQAMMSE.js';
1
+ import { useEventBus, useTranslate, Box, VStack, Icon, cn, Typography, Button, domPassthrough } from './chunk-4YXBKHHM.js';
2
2
  import { EMPTY_STATE_MARKER } from '@almadar/core';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
@@ -34,7 +34,7 @@ var EmptyState = ({
34
34
  onAction?.();
35
35
  };
36
36
  const iconName = typeof icon === "string" ? ICON_NAME_ALIASES[icon] ?? icon : void 0;
37
- const iconComponent = typeof icon === "function" ? icon : void 0;
37
+ const iconComponent = typeof icon === "string" ? void 0 : icon;
38
38
  const hasIcon = Boolean(iconName || iconComponent);
39
39
  const isDestructive = destructive || variant === "error";
40
40
  const isSuccess = variant === "success";
@@ -0,0 +1,66 @@
1
+ import { applyFrame } from '@almadar/shell-runtime/kernel/frame-applier';
2
+
3
+ function runTickFrame(ports, now) {
4
+ return applyFrame(ports.kernel.frame(now()), ports.client, ports.post);
5
+ }
6
+ function createTickDriver(ports) {
7
+ let handle;
8
+ let pending = false;
9
+ let stopped = true;
10
+ let unsubscribe;
11
+ const disarm = () => {
12
+ if (handle !== void 0) ports.cancelFrame(handle);
13
+ handle = void 0;
14
+ };
15
+ const arm = () => {
16
+ if (stopped || handle !== void 0 || ports.visibility.hidden()) return;
17
+ handle = ports.requestFrame(onFrame);
18
+ };
19
+ const runFrame = async () => {
20
+ const applied = await runTickFrame(ports, ports.now);
21
+ if (applied.firedCount > 0 || applied.errors.length > 0) ports.onApplied?.(applied);
22
+ };
23
+ function onFrame() {
24
+ handle = void 0;
25
+ if (stopped) return;
26
+ if (ports.kernel.tickCount() === 0) {
27
+ stopped = true;
28
+ unsubscribe?.();
29
+ unsubscribe = void 0;
30
+ return;
31
+ }
32
+ arm();
33
+ if (pending) return;
34
+ pending = true;
35
+ runFrame().catch((error) => ports.onError?.(error)).finally(() => {
36
+ pending = false;
37
+ });
38
+ }
39
+ const onVisibility = () => {
40
+ if (stopped) return;
41
+ if (ports.visibility.hidden()) {
42
+ ports.kernel.framePause();
43
+ disarm();
44
+ } else {
45
+ ports.kernel.frameResume();
46
+ arm();
47
+ }
48
+ };
49
+ return {
50
+ start() {
51
+ if (!stopped || ports.kernel.tickCount() === 0) return;
52
+ stopped = false;
53
+ unsubscribe = ports.visibility.onChange(onVisibility);
54
+ if (ports.visibility.hidden()) ports.kernel.framePause();
55
+ arm();
56
+ },
57
+ stop() {
58
+ stopped = true;
59
+ disarm();
60
+ unsubscribe?.();
61
+ unsubscribe = void 0;
62
+ }
63
+ };
64
+ }
65
+
66
+ export { createTickDriver, runTickFrame };
@@ -1,7 +1,7 @@
1
- import { AvlFieldType, AvlState, AvlPage, AvlEntity } from './chunk-FP3WIKTC.js';
2
- import { AvlEffect } from './chunk-DZ42OJQC.js';
3
- import { OPERATOR_CATEGORY_COLORS } from './chunk-DFNZUYX4.js';
4
- import { useTranslate, Box, Typography, domPassthrough } from './chunk-MBQAMMSE.js';
1
+ import { AvlFieldType, AvlState, AvlPage, AvlEntity } from './chunk-HH5KSMH5.js';
2
+ import { AvlEffect } from './chunk-DZBQA2OW.js';
3
+ import { OPERATOR_CATEGORY_COLORS } from './chunk-UXLE3IPR.js';
4
+ import { useTranslate, Box, Typography, domPassthrough } from './chunk-4YXBKHHM.js';
5
5
  import React, { useRef, useState, useLayoutEffect } from 'react';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
7
7
 
@@ -637,7 +637,7 @@ var AVL_GLYPH_KINDS = [
637
637
  "sexpr",
638
638
  "literal"
639
639
  ];
640
- var HEIGHT = { sm: 32, md: 56, lg: 88 };
640
+ var HEIGHT = { xs: 16, sm: 32, md: 56, lg: 88 };
641
641
  var PAD = 6;
642
642
  function Symbol({ kind, label, effectType, fieldType, persistence, namespace }) {
643
643
  switch (kind) {
@@ -1,4 +1,4 @@
1
- import { effectCategoryOf, EFFECT_CATEGORY_COLORS, asEffectOperator } from './chunk-DFNZUYX4.js';
1
+ import { effectCategoryOf, EFFECT_CATEGORY_COLORS, asEffectOperator } from './chunk-UXLE3IPR.js';
2
2
  import { createLogger } from '@almadar/logger';
3
3
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
4
4
 
@@ -1,8 +1,8 @@
1
- import { AvlState, AvlEntity, AvlFieldType, AvlPage } from './chunk-FP3WIKTC.js';
2
- import { AvlExplain, useEffectLines } from './chunk-SJGJJKBY.js';
3
- import { AvlEffect } from './chunk-DZ42OJQC.js';
4
- import { getStateRole, CONNECTION_COLORS } from './chunk-DFNZUYX4.js';
5
- import { useTranslate, Box, cn, domPassthrough } from './chunk-MBQAMMSE.js';
1
+ import { AvlState, AvlEntity, AvlFieldType, AvlPage } from './chunk-HH5KSMH5.js';
2
+ import { AvlExplain, useEffectLines } from './chunk-AB3X7QTE.js';
3
+ import { AvlEffect } from './chunk-DZBQA2OW.js';
4
+ import { getStateRole, CONNECTION_COLORS } from './chunk-UXLE3IPR.js';
5
+ import { useTranslate, Box, cn, domPassthrough } from './chunk-4YXBKHHM.js';
6
6
  import { useNodeId, ReactFlowProvider, Handle, Position } from '@xyflow/react';
7
7
  import React from 'react';
8
8
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  import { useAvl3DPalette } from './chunk-EOWMARUB.js';
2
- import { avlBlend, AVL_INK, EFFECT_CATEGORY_COLORS, OPERATOR_CATEGORY_COLORS, avlTint, effectCategoryOf } from './chunk-DFNZUYX4.js';
3
- import { Typography, Box, VStack, useTranslate } from './chunk-MBQAMMSE.js';
2
+ import { avlBlend, AVL_INK, EFFECT_CATEGORY_COLORS, OPERATOR_CATEGORY_COLORS, avlTint, effectCategoryOf } from './chunk-UXLE3IPR.js';
3
+ import { Typography, Box, VStack, useTranslate, usePrefersReducedMotion } from './chunk-4YXBKHHM.js';
4
4
  import { Vector3, QuadraticBezierCurve3, MathUtils, Quaternion } from 'three';
5
5
  import { EntityPersistenceSchema } from '@almadar/core';
6
6
  import { getStdOperatorMeta } from '@almadar/std/registry';
@@ -513,8 +513,13 @@ var Avl3DOrbitalNode = ({
513
513
  const scale = useMemo(() => 0.6 + Math.min(traitCount, 8) * 0.3, [traitCount]);
514
514
  const currentScale = useRef(scale);
515
515
  const targetScale = hovered ? scale * 1.06 : scale;
516
+ const reducedMotion = usePrefersReducedMotion();
516
517
  useFrame((_, delta) => {
517
518
  if (!groupRef.current) return;
519
+ if (reducedMotion) {
520
+ currentScale.current = targetScale;
521
+ return;
522
+ }
518
523
  groupRef.current.rotation.y += delta * (hovered ? 0.4 : 0.2);
519
524
  groupRef.current.rotation.x += delta * 0.05;
520
525
  currentScale.current = MathUtils.damp(currentScale.current, targetScale, 6, delta);
@@ -717,8 +722,9 @@ var Avl3DEntityCore = ({
717
722
  const coreRef = useRef(null);
718
723
  const palette = useAvl3DPalette();
719
724
  const { t } = useTranslate();
725
+ const reducedMotion = usePrefersReducedMotion();
720
726
  useFrame((_, delta) => {
721
- if (!coreRef.current) return;
727
+ if (!coreRef.current || reducedMotion) return;
722
728
  coreRef.current.rotation.y += delta * 0.3;
723
729
  coreRef.current.rotation.x += delta * 0.1;
724
730
  });
@@ -872,8 +878,9 @@ var Avl3DStateNode = ({
872
878
  const { t } = useTranslate();
873
879
  const targetScale = hovered ? 1.08 : 1;
874
880
  const currentScale = useRef(1);
881
+ const reducedMotion = usePrefersReducedMotion();
875
882
  useFrame((_, delta) => {
876
- currentScale.current = MathUtils.damp(currentScale.current, targetScale, 6, delta);
883
+ currentScale.current = reducedMotion ? targetScale : MathUtils.damp(currentScale.current, targetScale, 6, delta);
877
884
  });
878
885
  const scale = currentScale.current;
879
886
  if (!palette) return null;
@@ -1,4 +1,4 @@
1
- import { STATE_COLORS } from './chunk-DFNZUYX4.js';
1
+ import { STATE_COLORS } from './chunk-UXLE3IPR.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { isTypeVariable } from '@almadar/core';
4
4
 
@@ -204,6 +204,14 @@ var FIELD_TYPE_SHAPES = {
204
204
  number: "triangle",
205
205
  int: "triangle",
206
206
  money: "triangle",
207
+ i8: "triangle",
208
+ i16: "triangle",
209
+ i32: "triangle",
210
+ u8: "triangle",
211
+ u16: "triangle",
212
+ u32: "triangle",
213
+ u64: "triangle",
214
+ f32: "triangle",
207
215
  boolean: "square",
208
216
  date: "diamond",
209
217
  timestamp: "diamond",
@@ -1,4 +1,4 @@
1
- import { cn, Typography, useTranslate, VStack, HStack, Icon, Button, Switch, Input } from './chunk-MBQAMMSE.js';
1
+ import { cn, Typography, useTranslate, VStack, HStack, Icon, Button, Switch, Input } from './chunk-4YXBKHHM.js';
2
2
  import React from 'react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
@@ -188,7 +188,7 @@ function recordOrbitalResponse(orbitalName, request, response) {
188
188
  transitioned: response.transitioned,
189
189
  emitted: response.emittedEvents.map((e) => ({ event: e.event, ...e.payload !== void 0 ? { payload: e.payload } : {} })),
190
190
  emittedEvents: response.emittedEvents.map((e) => e.event),
191
- clientEffects: response.clientEffects?.length ?? 0,
191
+ clientEffects: response.clientEffectsByTrait?.length ?? 0,
192
192
  dataEntities: Object.fromEntries(Object.entries(response.data ?? {}).map(([name, rows]) => [name, rows.length])),
193
193
  ...response.error !== void 0 ? { error: response.error } : {},
194
194
  effectResults: serverEffectTraces(response.effectResults)
@@ -1,14 +1,14 @@
1
- import { JsonTreeEditor } from './chunk-U6QRZASX.js';
2
- import { transitionPlayback, Accordion } from './chunk-42FY4RYA.js';
3
- import { EmptyState } from './chunk-FAJDTHWC.js';
4
- import { useContainerWidth, roundedEdgePath } from './chunk-GAR5TQ5B.js';
5
- import { AvlExplain, AvlEffectChip } from './chunk-SJGJJKBY.js';
6
- import { AvlEffect } from './chunk-DZ42OJQC.js';
7
- import { parseTraitLevel } from './chunk-VFF5OO47.js';
8
- import { AVL_INK, AVL_FONT, effectZoneOf, avlTint, OPERATOR_CATEGORY_COLORS, avlBlend } from './chunk-DFNZUYX4.js';
9
- import { useTranslate, useMediaQuery, Box, Typography, Card, VStack, HStack, Badge, Button } from './chunk-MBQAMMSE.js';
1
+ import { JsonTreeEditor } from './chunk-ILQXJ2AR.js';
2
+ import { transitionPlayback, Accordion } from './chunk-REXYVBUO.js';
3
+ import { EmptyState } from './chunk-AGXD77SL.js';
4
+ import { useContainerWidth, roundedEdgePath } from './chunk-TXAUOLWZ.js';
5
+ import { AvlExplain, AvlEffectChip } from './chunk-AB3X7QTE.js';
6
+ import { AvlEffect } from './chunk-DZBQA2OW.js';
7
+ import { parseTraitLevel } from './chunk-PCR37T3U.js';
8
+ import { AVL_INK, AVL_FONT, effectZoneOf, avlTint, OPERATOR_CATEGORY_COLORS, avlBlend } from './chunk-UXLE3IPR.js';
9
+ import { useTranslate, useMediaQuery, Box, Typography, Card, VStack, HStack, Badge, Button } from './chunk-4YXBKHHM.js';
10
10
  import { useRef, useMemo, useState } from 'react';
11
- import { formatSExpr, isBinding } from '@almadar/core';
11
+ import { formatSExpr, JsonValueSchema, isJsonObject, isBinding } from '@almadar/core';
12
12
  import { operatorVisualForm, getStdOperatorMeta } from '@almadar/std/registry';
13
13
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
14
14
 
@@ -587,7 +587,6 @@ var AvlCircuit = ({ expr, trace, cursor, title, showCode = true, className }) =>
587
587
  ] });
588
588
  };
589
589
  AvlCircuit.displayName = "AvlCircuit";
590
- var isConfigObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
591
590
  var EffectHeader = ({ type, failed, failedLabel, note }) => /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", children: [
592
591
  /* @__PURE__ */ jsx(AvlEffectChip, { effectType: type, size: 18, note }),
593
592
  /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: type }),
@@ -640,7 +639,10 @@ var TransitionDetailBody = ({ orbital, trait, transition, annotations, playback,
640
639
  stepEvent ? /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
641
640
  /* @__PURE__ */ jsx(Typography, { variant: "overline", color: "muted", children: t("avl.play.payload") }),
642
641
  /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "start", children: [
643
- /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx(JsonTreeEditor, { value: payload, onChange: (next) => setPayload(isConfigObject(next) ? next : {}) }) }),
642
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx(JsonTreeEditor, { value: payload, onChange: (next) => {
643
+ const json = JsonValueSchema.safeParse(next);
644
+ setPayload(json.success && isJsonObject(json.data) ? json.data : {});
645
+ } }) }),
644
646
  /* @__PURE__ */ jsx(Button, { variant: "primary", size: "sm", action: stepEvent, actionPayload: request, leftIcon: "skip-forward", children: t("avl.play.step") })
645
647
  ] })
646
648
  ] }) : null,