@almadar/ui 6.59.0 → 6.62.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 (91) hide show
  1. package/dist/BehaviorValueFrame-3ORZHPWQ.css +1252 -0
  2. package/dist/BehaviorValueFrame-QYFJEMN5.js +18 -0
  3. package/dist/TraitValueFrame-2WMYJOA5.css +1252 -0
  4. package/dist/TraitValueFrame-X6IL3UST.js +17 -0
  5. package/dist/Typography-KBATMU2V.js +5 -0
  6. package/dist/{UISlotRenderer-YNY7V2UJ.js → UISlotRenderer-NZBV5BUI.js} +12 -10
  7. package/dist/avl/index.cjs +32263 -28103
  8. package/dist/avl/index.d.ts +36 -13
  9. package/dist/avl/index.js +298 -6130
  10. package/dist/{avl-3d-context-BpBKZIbc.d.ts → avl-3d-context-Dxun3-ri.d.ts} +2 -0
  11. package/dist/{chunk-YYYHH5BA.js → chunk-7JRWELUC.js} +4 -6
  12. package/dist/{chunk-723MJUU3.js → chunk-CXQENFO2.js} +1 -1
  13. package/dist/chunk-D4NAA2JW.js +49 -0
  14. package/dist/{chunk-I5QOYW2Z.js → chunk-DXPCAQJU.js} +205 -2
  15. package/dist/{chunk-J755QADM.js → chunk-EDPUQ2ZJ.js} +327 -18
  16. package/dist/{chunk-4ZGXIW3B.js → chunk-ERDYADVZ.js} +1 -1
  17. package/dist/{chunk-7CVXM2KS.js → chunk-EZ5FSNOE.js} +2 -2
  18. package/dist/{chunk-E6MWYQVZ.js → chunk-G6EFTACU.js} +9713 -786
  19. package/dist/{chunk-MZIDOJMD.js → chunk-GVQOTA7T.js} +2 -1
  20. package/dist/{chunk-Q47ZN2DW.js → chunk-N23SVGTH.js} +83 -1
  21. package/dist/{chunk-KJGVLXEN.js → chunk-N4IJS5DD.js} +50 -116
  22. package/dist/{chunk-LZRW6GXG.js → chunk-QOV3TUAA.js} +2 -3
  23. package/dist/chunk-WBWXBA5H.js +434 -0
  24. package/dist/{chunk-V3FGTQUE.js → chunk-ZR45FGW3.js} +7 -1
  25. package/dist/{cn-DIql5232.d.ts → cn-CDIhHCUC.d.ts} +40 -16
  26. package/dist/components/index.cjs +14779 -4354
  27. package/dist/components/index.d.ts +200 -180
  28. package/dist/components/index.js +16 -17
  29. package/dist/context/index.cjs +9 -1
  30. package/dist/context/index.js +3 -1
  31. package/dist/hooks/index.cjs +78 -9
  32. package/dist/hooks/index.d.ts +43 -2
  33. package/dist/hooks/index.js +6 -7
  34. package/dist/lib/drawable/three/index.cjs +361 -27
  35. package/dist/lib/drawable/three/index.d.ts +2 -2
  36. package/dist/lib/drawable/three/index.js +28 -7
  37. package/dist/lib/index.cjs +117 -5
  38. package/dist/lib/index.d.ts +2 -2
  39. package/dist/lib/index.js +99 -6
  40. package/dist/locales/index.cjs +6 -9
  41. package/dist/locales/index.js +2 -2
  42. package/dist/providers/index.cjs +14137 -1311
  43. package/dist/providers/index.d.ts +36 -4
  44. package/dist/providers/index.js +37 -17
  45. package/dist/runtime/index.cjs +28769 -18640
  46. package/dist/runtime/index.d.ts +70 -3
  47. package/dist/runtime/index.js +15 -381
  48. package/dist/ssr/index.cjs +508 -134
  49. package/dist/ssr/index.d.cts +56 -4
  50. package/dist/ssr/index.d.ts +56 -4
  51. package/dist/ssr/index.js +446 -72
  52. package/dist/{verificationRegistry-B3dj1Zl8.d.ts → verificationRegistry-B5aGl7WF.d.ts} +2 -1
  53. package/locales/ar.json +2 -3
  54. package/locales/en.json +2 -3
  55. package/locales/sl.json +2 -3
  56. package/package.json +8 -8
  57. package/tailwind-preset.cjs +78 -8
  58. package/themes/_base.css +27 -0
  59. package/themes/_contract.md +6 -0
  60. package/themes/_fonts.css +4 -4
  61. package/themes/_foundation.css +11 -0
  62. package/themes/_presets.css +2 -0
  63. package/themes/almadar-website.css +10 -0
  64. package/themes/almadar.css +10 -0
  65. package/themes/atelier.css +10 -0
  66. package/themes/bauhaus.css +10 -0
  67. package/themes/bloomberg-dense.css +10 -0
  68. package/themes/clay.css +10 -0
  69. package/themes/corporate.css +10 -0
  70. package/themes/gazette.css +10 -0
  71. package/themes/glass.css +10 -0
  72. package/themes/kflow.css +5 -0
  73. package/themes/kiosk.css +10 -0
  74. package/themes/linear-clean.css +10 -0
  75. package/themes/material.css +10 -0
  76. package/themes/minimalist.css +10 -0
  77. package/themes/nata.css +304 -0
  78. package/themes/neon.css +10 -0
  79. package/themes/notion-editorial.css +10 -0
  80. package/themes/orb.css +10 -0
  81. package/themes/prism.css +10 -0
  82. package/themes/rawi.css +304 -0
  83. package/themes/retro.css +10 -0
  84. package/themes/risograph.css +10 -0
  85. package/themes/scandi.css +10 -0
  86. package/themes/solarpunk.css +10 -0
  87. package/themes/terminal.css +138 -128
  88. package/dist/Typography-LZTP72Y4.js +0 -5
  89. package/dist/chunk-D2E44ODB.js +0 -350
  90. package/dist/chunk-N7JIG57B.js +0 -138
  91. package/dist/chunk-QJIAJ6EH.js +0 -2256
@@ -2238,6 +2238,10 @@ function resolveCanvasTheme(scope) {
2238
2238
  const c = r.color(toneVar(tone));
2239
2239
  tones[tone] = c ? colorCss(c) : "currentColor";
2240
2240
  }
2241
+ const surface = (name) => {
2242
+ const c = r.color(name);
2243
+ return c ? colorCss(c) : "transparent";
2244
+ };
2241
2245
  const ground = r.color("--surface-diagram");
2242
2246
  const text = {};
2243
2247
  const TEXT_FALLBACK = { xs: 12, sm: 14, base: 16, lg: 18, xl: 20, "2xl": 24 };
@@ -2245,6 +2249,11 @@ function resolveCanvasTheme(scope) {
2245
2249
  const body = r.family("--font-family-body", r.family("--font-family", "system-ui, sans-serif"));
2246
2250
  return {
2247
2251
  ground: ground ? colorCss(ground) : "transparent",
2252
+ surfaces: {
2253
+ muted: surface("--color-muted"),
2254
+ card: surface("--color-card"),
2255
+ onPrimary: surface("--color-primary-foreground")
2256
+ },
2248
2257
  tones,
2249
2258
  series: SERIES_TONES.map((t) => tones[t]),
2250
2259
  strokes: {
@@ -2332,6 +2341,25 @@ function useCanvasTheme(scopeRef) {
2332
2341
  }, [appliedTheme, scopeKey, scopeRef]);
2333
2342
  return state;
2334
2343
  }
2344
+ function useOnScreen(ref, margin = "200px") {
2345
+ const [intersecting, setIntersecting] = React3.useState(true);
2346
+ const [pageVisible, setPageVisible] = React3.useState(true);
2347
+ React3.useEffect(() => {
2348
+ const el = ref.current;
2349
+ if (!el || typeof IntersectionObserver === "undefined") return;
2350
+ const observer = new IntersectionObserver(([entry]) => setIntersecting(entry.isIntersecting), { rootMargin: margin });
2351
+ observer.observe(el);
2352
+ return () => observer.disconnect();
2353
+ }, [ref, margin]);
2354
+ React3.useEffect(() => {
2355
+ if (typeof document === "undefined") return;
2356
+ const update = () => setPageVisible(document.visibilityState !== "hidden");
2357
+ update();
2358
+ document.addEventListener("visibilitychange", update);
2359
+ return () => document.removeEventListener("visibilitychange", update);
2360
+ }, []);
2361
+ return intersecting && pageVisible;
2362
+ }
2335
2363
 
2336
2364
  // lib/drawable/themeDrawables.ts
2337
2365
  function opt(value, resolve) {
@@ -2540,6 +2568,7 @@ var Canvas3DHost = React3.forwardRef(
2540
2568
  moveEvent
2541
2569
  }, ref) => {
2542
2570
  const containerRef = React3.useRef(null);
2571
+ const onScreen = useOnScreen(containerRef);
2543
2572
  const controlsRef = React3.useRef(null);
2544
2573
  const [internalError, setInternalError] = React3.useState(null);
2545
2574
  const eventBus = useEventBus();
@@ -2845,6 +2874,7 @@ var Canvas3DHost = React3.forwardRef(
2845
2874
  children: /* @__PURE__ */ jsxRuntime.jsxs(
2846
2875
  fiber.Canvas,
2847
2876
  {
2877
+ frameloop: onScreen ? "always" : "never",
2848
2878
  shadows,
2849
2879
  flat: lighting?.toneMapping === "none",
2850
2880
  gl: { preserveDrawingBuffer: true },
@@ -4177,6 +4207,44 @@ var SpatialHashGrid = class {
4177
4207
  };
4178
4208
  }
4179
4209
  };
4210
+
4211
+ // lib/bandShapes.ts
4212
+ var shape = (d) => `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><path d='${d}'/></svg>")`;
4213
+ var BAND_SHAPES = {
4214
+ wave: shape("M0 60 C240 100 480 100 720 60 C960 20 1200 20 1440 60 V100 H0 Z"),
4215
+ arc: shape("M0 100 Q720 0 1440 100 Z"),
4216
+ tilt: shape("M0 100 L1440 0 V100 Z"),
4217
+ step: shape("M0 100 V75 H360 V50 H720 V25 H1080 V0 H1440 V100 Z"),
4218
+ scallop: shape("M0 100 V40 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 V100 Z")
4219
+ };
4220
+ var BAND_EDGE_HEIGHT = "clamp(24px, 6vw, 96px)";
4221
+ var BAND_ACCENT_FALLBACK = "linear-gradient(180deg, color-mix(in oklab, var(--color-primary) 12%, var(--color-background)), var(--color-background))";
4222
+ var BAND_EDGE_FILL = {
4223
+ background: "var(--surface-page-image, none), var(--color-background)",
4224
+ muted: "var(--color-muted)",
4225
+ surface: "var(--color-card)",
4226
+ gradient: `var(--surface-accent-image, ${BAND_ACCENT_FALLBACK}), var(--color-muted)`,
4227
+ inverse: "var(--color-foreground)"
4228
+ };
4229
+ function bandEdgeMask(edge) {
4230
+ return edge === "curve" ? "var(--surface-edge-mask, none)" : BAND_SHAPES[edge];
4231
+ }
4232
+ function bandEdgeHeight(edge) {
4233
+ return edge === "curve" ? `var(--surface-edge-height, ${BAND_EDGE_HEIGHT})` : BAND_EDGE_HEIGHT;
4234
+ }
4235
+ function bandEdgeLayerStyle(edge, side, flip, color) {
4236
+ const mask = bandEdgeMask(edge);
4237
+ const turn = side === "top" ? flip ? "scaleY(-1)" : "rotate(180deg)" : flip ? "scaleX(-1)" : void 0;
4238
+ const style = { height: bandEdgeHeight(edge), background: BAND_EDGE_FILL[color], maskImage: mask, WebkitMaskImage: mask, transform: turn };
4239
+ if (color === "background") {
4240
+ style.backgroundSize = "var(--surface-page-image-size, auto), auto";
4241
+ style.backgroundAttachment = "fixed";
4242
+ }
4243
+ return style;
4244
+ }
4245
+ function bandPadding(basePad, edge) {
4246
+ return edge === "none" ? void 0 : `calc(${basePad} + ${bandEdgeHeight(edge)})`;
4247
+ }
4180
4248
  function useTapReveal(options = {}) {
4181
4249
  const { onReveal, onDismiss, refs, enabled = true } = options;
4182
4250
  const [revealed, setRevealed] = React3.useState(false);
@@ -4245,7 +4313,237 @@ function pressableProps(onPress, options = {}) {
4245
4313
  };
4246
4314
  }
4247
4315
 
4248
- // components/core/atoms/Box.tsx
4316
+ // lib/domPassthrough.ts
4317
+ var GLOBAL_ATTRIBUTES = /* @__PURE__ */ new Set(["role", "id", "lang", "dir", "tabIndex"]);
4318
+ function domPassthrough(props) {
4319
+ const out = {};
4320
+ for (const [key, value] of Object.entries(props)) {
4321
+ if (key.startsWith("aria-") || key.startsWith("data-") || GLOBAL_ATTRIBUTES.has(key)) {
4322
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === void 0) {
4323
+ out[key] = value;
4324
+ }
4325
+ }
4326
+ }
4327
+ return out;
4328
+ }
4329
+ var motionEnabledCache = null;
4330
+ function isMotionEnabled() {
4331
+ if (typeof document === "undefined") return true;
4332
+ if (motionEnabledCache !== null) return motionEnabledCache;
4333
+ const v = getComputedStyle(document.documentElement).getPropertyValue("--motion-enable").trim().toLowerCase();
4334
+ motionEnabledCache = v !== "off";
4335
+ return motionEnabledCache;
4336
+ }
4337
+
4338
+ // lib/motion-tokens.ts
4339
+ function cssTimeMs(value) {
4340
+ const v = value.trim();
4341
+ if (v.endsWith("ms")) return Number.parseFloat(v);
4342
+ if (v.endsWith("s")) return Number.parseFloat(v) * 1e3;
4343
+ return Number.NaN;
4344
+ }
4345
+ function tokenAt(el, name) {
4346
+ for (let at = el; at !== null; at = at.parentElement) {
4347
+ const value = getComputedStyle(at).getPropertyValue(name).trim();
4348
+ if (value !== "") return value;
4349
+ }
4350
+ return "";
4351
+ }
4352
+ function motionTiming(durationToken, easingToken, scope) {
4353
+ const duration = cssTimeMs(tokenAt(scope ?? document.documentElement, durationToken));
4354
+ const easing = tokenAt(scope ?? document.documentElement, easingToken);
4355
+ const reduced = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
4356
+ if (!isMotionEnabled() || reduced || !Number.isFinite(duration) || easing === "") return void 0;
4357
+ return { duration, easing };
4358
+ }
4359
+ function layoutScale(el) {
4360
+ const layoutWidth = el instanceof HTMLElement ? el.offsetWidth : 0;
4361
+ const screenWidth = el.getBoundingClientRect().width;
4362
+ return layoutWidth > 0 && screenWidth > 0 ? screenWidth / layoutWidth : 1;
4363
+ }
4364
+
4365
+ // lib/animate-changes.ts
4366
+ function ownMotion(el) {
4367
+ return el.closest("[data-item-move]") !== null || /\balmadar-enter-/.test(el.getAttribute("class") ?? "");
4368
+ }
4369
+ function boxesOf(el) {
4370
+ return getComputedStyle(el).display === "contents" ? boxedChildren(el) : [el];
4371
+ }
4372
+ function boxedChildren(el) {
4373
+ return [...el.children].flatMap(boxesOf);
4374
+ }
4375
+ var GHOST_STYLE = ["font", "letterSpacing", "lineHeight", "color", "textAlign", "whiteSpace", "textTransform"];
4376
+ function roll(el, oldText, timing) {
4377
+ const box = el.getBoundingClientRect();
4378
+ const scale2 = layoutScale(el);
4379
+ const computed = getComputedStyle(el);
4380
+ const holder = document.createElement("span");
4381
+ holder.setAttribute("aria-hidden", "true");
4382
+ Object.assign(holder.style, {
4383
+ position: "fixed",
4384
+ left: `${box.left}px`,
4385
+ top: `${box.top}px`,
4386
+ width: `${box.width / scale2}px`,
4387
+ height: `${box.height / scale2}px`,
4388
+ transform: scale2 === 1 ? "" : `scale(${scale2})`,
4389
+ transformOrigin: "top left",
4390
+ pointerEvents: "none",
4391
+ zIndex: "2147483647"
4392
+ });
4393
+ const ghost = document.createElement("span");
4394
+ ghost.setAttribute("data-change-ghost", "");
4395
+ ghost.setAttribute("aria-hidden", "true");
4396
+ ghost.textContent = oldText;
4397
+ for (const prop of GHOST_STYLE) ghost.style[prop] = computed[prop];
4398
+ Object.assign(ghost.style, { display: "block", width: "100%", height: "100%", overflow: "visible" });
4399
+ holder.appendChild(ghost);
4400
+ document.body.appendChild(holder);
4401
+ const out = ghost.animate(
4402
+ [{ opacity: 1, transform: "none" }, { opacity: 0, transform: "translateY(-40%)", offset: 0.5 }, { opacity: 0, transform: "translateY(-40%)" }],
4403
+ timing
4404
+ );
4405
+ if (out === void 0) holder.remove();
4406
+ else {
4407
+ out.addEventListener("finish", () => holder.remove());
4408
+ out.addEventListener("cancel", () => holder.remove());
4409
+ }
4410
+ el.animate(
4411
+ [{ opacity: 0, transform: "translateY(40%)" }, { opacity: 0, transform: "translateY(40%)", offset: 0.4 }, { opacity: 1, transform: "none" }],
4412
+ timing
4413
+ );
4414
+ }
4415
+ var textOnly = (el) => el instanceof HTMLElement && el.childNodes.length > 0 && [...el.childNodes].every((n) => n.nodeType === Node.TEXT_NODE);
4416
+ function settle(root, added, changed) {
4417
+ const timing = motionTiming("--duration-normal", "--easing-emphasized", root);
4418
+ if (timing === void 0) return;
4419
+ for (const el of added) {
4420
+ if (ownMotion(el) || el.parentElement !== null && [...added].some((other) => other !== el && other.contains(el))) continue;
4421
+ for (const box of boxesOf(el)) {
4422
+ if (ownMotion(box)) continue;
4423
+ box.animate([{ opacity: 0, transform: "translateY(6px)" }, { opacity: 1, transform: "none" }], timing);
4424
+ }
4425
+ }
4426
+ for (const [el, oldText] of changed) {
4427
+ if (ownMotion(el) || [...added].some((a) => a.contains(el))) continue;
4428
+ if (oldText !== void 0 && oldText !== el.textContent && textOnly(el)) roll(el, oldText, timing);
4429
+ else el.animate([{ opacity: 0.25 }, { opacity: 1 }], timing);
4430
+ }
4431
+ }
4432
+ function blocks(root) {
4433
+ const seen = /* @__PURE__ */ new Set();
4434
+ for (const wrapper of root.querySelectorAll("[data-pattern]")) {
4435
+ for (const box of boxesOf(wrapper)) if (!ownMotion(box)) seen.add(box);
4436
+ }
4437
+ return [...seen];
4438
+ }
4439
+ function glidePushed(root, places) {
4440
+ const timing = motionTiming("--duration-normal", "--easing-emphasized", root);
4441
+ const origin = root.getBoundingClientRect();
4442
+ const applied = /* @__PURE__ */ new Map();
4443
+ const present = /* @__PURE__ */ new Set();
4444
+ for (const el of blocks(root)) {
4445
+ present.add(el);
4446
+ if ((el.getAnimations?.() ?? []).length > 0) {
4447
+ places.delete(el);
4448
+ continue;
4449
+ }
4450
+ const box = el.getBoundingClientRect();
4451
+ const now = { x: box.left - origin.left, y: box.top - origin.top };
4452
+ const was = places.get(el);
4453
+ places.set(el, now);
4454
+ if (was === void 0 || timing === void 0) continue;
4455
+ let inherited = { x: 0, y: 0 };
4456
+ for (let up = el.parentElement; up !== null && up !== root; up = up.parentElement) {
4457
+ const a = applied.get(up);
4458
+ if (a !== void 0) {
4459
+ inherited = a;
4460
+ break;
4461
+ }
4462
+ }
4463
+ const dx = was.x - now.x - inherited.x;
4464
+ const dy = was.y - now.y - inherited.y;
4465
+ if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) {
4466
+ if (inherited.x !== 0 || inherited.y !== 0) applied.set(el, inherited);
4467
+ continue;
4468
+ }
4469
+ const scale2 = layoutScale(el);
4470
+ el.animate([{ transform: `translate(${dx / scale2}px, ${dy / scale2}px)` }, { transform: "none" }], { ...timing, composite: "add" });
4471
+ applied.set(el, { x: inherited.x + dx, y: inherited.y + dy });
4472
+ }
4473
+ for (const el of places.keys()) if (!present.has(el)) places.delete(el);
4474
+ }
4475
+ function easeHeight(root) {
4476
+ if (typeof ResizeObserver === "undefined") return () => void 0;
4477
+ let rest;
4478
+ let glide;
4479
+ const sizes = new ResizeObserver(() => {
4480
+ const scale2 = layoutScale(root);
4481
+ const shown = root.getBoundingClientRect().height / scale2;
4482
+ const gliding = glide !== void 0 && glide.playState === "running";
4483
+ glide?.cancel();
4484
+ glide = void 0;
4485
+ const height = root.getBoundingClientRect().height / scale2;
4486
+ const from = gliding ? shown : rest;
4487
+ rest = height;
4488
+ const timing = motionTiming("--duration-normal", "--easing-emphasized", root);
4489
+ if (from === void 0 || timing === void 0 || Math.abs(from - height) < 1) return;
4490
+ glide = root.animate(
4491
+ [{ height: `${from}px`, overflow: "clip" }, { height: `${height}px`, overflow: "clip" }],
4492
+ timing
4493
+ ) ?? void 0;
4494
+ });
4495
+ let watched = [];
4496
+ const watch = () => {
4497
+ const next = boxedChildren(root);
4498
+ if (next.length === watched.length && next.every((el, i) => el === watched[i])) return;
4499
+ watched = next;
4500
+ sizes.disconnect();
4501
+ for (const el of next) sizes.observe(el);
4502
+ };
4503
+ watch();
4504
+ const children = new MutationObserver(watch);
4505
+ children.observe(root, { childList: true, subtree: true });
4506
+ return () => {
4507
+ children.disconnect();
4508
+ sizes.disconnect();
4509
+ };
4510
+ }
4511
+ function useAnimateChanges(ref, enabled) {
4512
+ React3.useEffect(() => {
4513
+ const root = ref.current;
4514
+ if (!enabled || root === null) return;
4515
+ return easeHeight(root);
4516
+ }, [ref, enabled]);
4517
+ React3.useEffect(() => {
4518
+ const root = ref.current;
4519
+ if (!enabled || root === null || typeof MutationObserver === "undefined") return;
4520
+ const observer = new MutationObserver((records) => {
4521
+ const added = /* @__PURE__ */ new Set();
4522
+ const changed = /* @__PURE__ */ new Map();
4523
+ for (const record of records) {
4524
+ if (record.type === "childList") {
4525
+ for (const node of record.addedNodes) {
4526
+ if (node instanceof Element) added.add(node);
4527
+ else if (node.nodeType === Node.TEXT_NODE && node.parentElement !== null && changed.get(node.parentElement) === void 0) {
4528
+ const removed = [...record.removedNodes].filter((n) => n.nodeType === Node.TEXT_NODE);
4529
+ changed.set(node.parentElement, removed.length > 0 ? removed.map((n) => n.textContent ?? "").join("") : void 0);
4530
+ }
4531
+ }
4532
+ } else if (record.type === "characterData") {
4533
+ const el = record.target.parentElement;
4534
+ if (el === null || changed.get(el) !== void 0) continue;
4535
+ changed.set(el, [...el.childNodes].map((n) => n === record.target ? record.oldValue ?? "" : n.textContent ?? "").join(""));
4536
+ }
4537
+ }
4538
+ glidePushed(root, places);
4539
+ settle(root, added, changed);
4540
+ });
4541
+ const places = /* @__PURE__ */ new Map();
4542
+ glidePushed(root, places);
4543
+ observer.observe(root, { subtree: true, childList: true, characterData: true, characterDataOldValue: true });
4544
+ return () => observer.disconnect();
4545
+ }, [ref, enabled]);
4546
+ }
4249
4547
  var paddingStyles = {
4250
4548
  none: "p-0",
4251
4549
  xs: "p-1",
@@ -4310,7 +4608,18 @@ var bgStyles = {
4310
4608
  muted: "bg-muted text-foreground",
4311
4609
  accent: "bg-accent text-accent-foreground",
4312
4610
  surface: "bg-card",
4313
- overlay: "bg-card/80 backdrop-blur-sm"
4611
+ overlay: "bg-card/80 backdrop-blur-sm",
4612
+ gradient: "band-gradient",
4613
+ inverse: "band-inverse"
4614
+ };
4615
+ var paddingRem = {
4616
+ none: "0rem",
4617
+ xs: "0.25rem",
4618
+ sm: "0.5rem",
4619
+ md: "1rem",
4620
+ lg: "1.5rem",
4621
+ xl: "2rem",
4622
+ "2xl": "3rem"
4314
4623
  };
4315
4624
  var roundedStyles = {
4316
4625
  none: "rounded-none",
@@ -4373,6 +4682,13 @@ var Box = React3__default.default.forwardRef(
4373
4682
  hoverEvent,
4374
4683
  tapReveal = true,
4375
4684
  maxWidth,
4685
+ edgeTop = "none",
4686
+ edgeBottom = "none",
4687
+ edgeColor = "background",
4688
+ edgeFlip = false,
4689
+ texture = false,
4690
+ animateChanges = false,
4691
+ backdrop,
4376
4692
  onClick,
4377
4693
  onMouseEnter,
4378
4694
  onMouseLeave,
@@ -4380,6 +4696,13 @@ var Box = React3__default.default.forwardRef(
4380
4696
  ...rest
4381
4697
  }, ref) => {
4382
4698
  const eventBus = useEventBus();
4699
+ const ownRef = React3.useRef(null);
4700
+ useAnimateChanges(ownRef, animateChanges);
4701
+ const setRef = React3.useCallback((node) => {
4702
+ ownRef.current = node;
4703
+ if (typeof ref === "function") ref(node);
4704
+ else if (ref !== null) ref.current = node;
4705
+ }, [ref]);
4383
4706
  const { override: themeOverride } = context.useThemeScope();
4384
4707
  const declaredTheme = rest["data-theme"];
4385
4708
  const dataTheme = declaredTheme !== void 0 && themeOverride ? themeOverride : declaredTheme;
@@ -4415,12 +4738,25 @@ var Box = React3__default.default.forwardRef(
4415
4738
  if (hoverEvent && tapReveal) triggerProps.onPointerDown(e);
4416
4739
  onPointerDown?.(e);
4417
4740
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
4741
+ const isBand = backdrop != null || texture || edgeTop !== "none" || edgeBottom !== "none";
4742
+ const padKey = paddingY ?? padding;
4743
+ const bandStyle = {};
4744
+ const padTop = padKey ? bandPadding(paddingRem[padKey], edgeTop) : void 0;
4745
+ const padBottom = padKey ? bandPadding(paddingRem[padKey], edgeBottom) : void 0;
4746
+ if (padTop) bandStyle.paddingTop = padTop;
4747
+ if (padBottom) bandStyle.paddingBottom = padBottom;
4748
+ const bandLayers = isBand ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4749
+ backdrop != null && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", "data-band-layer": "", "aria-hidden": true, className: "band-backdrop", children: backdrop }),
4750
+ texture && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", "data-band-layer": "", "aria-hidden": true, className: "band-texture" }),
4751
+ edgeTop !== "none" && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", "data-band-layer": "", "aria-hidden": true, className: "band-edge band-edge-top", style: bandEdgeLayerStyle(edgeTop, "top", edgeFlip, edgeColor) }),
4752
+ edgeBottom !== "none" && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", "data-band-layer": "", "aria-hidden": true, className: "band-edge band-edge-bottom", style: bandEdgeLayerStyle(edgeBottom, "bottom", edgeFlip, edgeColor) })
4753
+ ] }) : null;
4418
4754
  const isClickable = action || onClick;
4419
4755
  const actionControl = action && rest.role === void 0 && rest.tabIndex === void 0 ? pressableProps(handleClick) : {};
4420
4756
  return React3__default.default.createElement(
4421
4757
  Component2,
4422
4758
  {
4423
- ref,
4759
+ ref: setRef,
4424
4760
  className: cn(
4425
4761
  padding && paddingStyles[padding],
4426
4762
  paddingX && paddingXStyles[paddingX],
@@ -4438,6 +4774,7 @@ var Box = React3__default.default.forwardRef(
4438
4774
  overflow && overflowStyles[overflow],
4439
4775
  position && positionStyles[position],
4440
4776
  isClickable && "cursor-pointer",
4777
+ isBand && "band",
4441
4778
  className
4442
4779
  ),
4443
4780
  onClick: isClickable ? handleClick : void 0,
@@ -4445,11 +4782,15 @@ var Box = React3__default.default.forwardRef(
4445
4782
  onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
4446
4783
  onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
4447
4784
  onPointerDown: hoverEvent && tapReveal || onPointerDown ? handlePointerDown : void 0,
4448
- style: maxWidth ? { maxWidth, ...rest.style } : rest.style,
4785
+ style: maxWidth || isBand ? { ...maxWidth ? { maxWidth } : {}, ...bandStyle, ...rest.style } : rest.style,
4449
4786
  ...rest,
4450
- "data-theme": dataTheme
4787
+ "data-theme": dataTheme,
4788
+ "data-motion": animateChanges ? "presentation" : void 0
4451
4789
  },
4452
- children
4790
+ isBand ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4791
+ bandLayers,
4792
+ children
4793
+ ] }) : children
4453
4794
  );
4454
4795
  }
4455
4796
  );
@@ -4591,7 +4932,6 @@ var en_default = {
4591
4932
  "aria.upvote": "Upvote",
4592
4933
  "aria.downvote": "Downvote",
4593
4934
  "aria.qrScanner": "QR scanner",
4594
- "aria.mockScanDev": "Mock scan (dev)",
4595
4935
  "aria.openMenu": "Open menu",
4596
4936
  "aria.closeMenu": "Close menu",
4597
4937
  "aria.openSidebar": "Open sidebar",
@@ -4789,7 +5129,6 @@ var en_default = {
4789
5129
  "qrScanner.pauseScanning": "Pause scanning",
4790
5130
  "qrScanner.switchToFrontCamera": "Switch to front camera",
4791
5131
  "qrScanner.switchToRearCamera": "Switch to rear camera",
4792
- "qrScanner.mockScan": "Mock Scan",
4793
5132
  "docSearch.placeholder": "Search documentation...",
4794
5133
  "stateMachine.loading": "Loading state machine\u2026",
4795
5134
  "stateMachine.noStateMachine": "No state machine to visualize",
@@ -5711,7 +6050,8 @@ var en_default = {
5711
6050
  "avl.stateInitial": "start",
5712
6051
  "avl.stateTerminal": "end",
5713
6052
  "avl.guardCaption": "The transition only fires when this check is true.",
5714
- "avl.effectsCaption": "What runs, in order, when the transition fires."
6053
+ "avl.effectsCaption": "What runs, in order, when the transition fires.",
6054
+ "aria.carousel": "carousel"
5715
6055
  };
5716
6056
 
5717
6057
  // lib/format.ts
@@ -5773,20 +6113,6 @@ function formatValue(value, format, fmt = {}) {
5773
6113
 
5774
6114
  // lib/inlineText.ts
5775
6115
  var INLINE_TEXT_ATTR = "data-inline-text";
5776
-
5777
- // lib/domPassthrough.ts
5778
- var GLOBAL_ATTRIBUTES = /* @__PURE__ */ new Set(["role", "id", "lang", "dir", "tabIndex"]);
5779
- function domPassthrough(props) {
5780
- const out = {};
5781
- for (const [key, value] of Object.entries(props)) {
5782
- if (key.startsWith("aria-") || key.startsWith("data-") || GLOBAL_ATTRIBUTES.has(key)) {
5783
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === void 0) {
5784
- out[key] = value;
5785
- }
5786
- }
5787
- }
5788
- return out;
5789
- }
5790
6116
  var variantStyles = {
5791
6117
  h1: "text-4xl heading-voice text-foreground",
5792
6118
  h2: "text-3xl heading-voice text-foreground",
@@ -6502,17 +6828,20 @@ var EFFECT_OPERATOR_CATEGORY = {
6502
6828
  "workspace/write-schema": "system",
6503
6829
  "workspace/write-plan": "system",
6504
6830
  "workspace/archive-orbital": "system",
6505
- "lolo/emit-body": "system"
6831
+ "behavior/catalog": "system",
6832
+ "behavior/describe": "system",
6833
+ "behavior/source": "system",
6834
+ "program/read": "system",
6835
+ "program/print": "system",
6836
+ "program/eval": "system",
6837
+ "program/compose": "system"
6506
6838
  };
6507
6839
  var EFFECT_FAMILY_CATEGORY = {
6508
6840
  agent: "system",
6509
6841
  os: "system",
6510
6842
  browser: "system",
6511
6843
  llm: "system",
6512
- behavior: "system",
6513
- validate: "control",
6514
6844
  session: "system",
6515
- compose: "system",
6516
6845
  trace: "control",
6517
6846
  memory: "data",
6518
6847
  application: "system"
@@ -6532,7 +6861,12 @@ function effectCategoryOf(head) {
6532
6861
  }
6533
6862
  return null;
6534
6863
  }
6864
+ var PENDING_STD_CATEGORY_COLORS = {
6865
+ "std-behavior-value": avlBlend("var(--color-accent)", 40, "var(--color-success)"),
6866
+ "std-program": avlBlend("var(--color-accent)", 60, "var(--color-info)")
6867
+ };
6535
6868
  var OPERATOR_CATEGORY_COLORS = {
6869
+ ...PENDING_STD_CATEGORY_COLORS,
6536
6870
  "arithmetic": "var(--color-primary)",
6537
6871
  "comparison": "var(--color-warning)",
6538
6872
  "logic": "var(--color-accent)",
@@ -5,8 +5,8 @@ import * as THREE from 'three';
5
5
  import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
6
6
  import { JsonObject, EventEmit, OrbitalSchema } from '@almadar/core';
7
7
  import { Z as ZoomLevel } from '../../../avl-zoom-state-CKMVuBFg.js';
8
- import { b as Avl3DModelOverrides } from '../../../avl-3d-context-BpBKZIbc.js';
9
- export { d as AVL_3D_COLORS, A as Avl3DConfig, a as Avl3DContext, C as CAMERA_POSITIONS, P as Position3D, e as arcCurve3D, f as fibonacciSpherePositions, g as goldenSpiralPositions, o as orbitRingPositions, s as selfLoopCurve3D, t as treeLayout3D, u as useAvl3DConfig } from '../../../avl-3d-context-BpBKZIbc.js';
8
+ import { b as Avl3DModelOverrides } from '../../../avl-3d-context-Dxun3-ri.js';
9
+ export { d as AVL_3D_COLORS, A as Avl3DConfig, a as Avl3DContext, C as CAMERA_POSITIONS, P as Position3D, e as arcCurve3D, f as fibonacciSpherePositions, g as goldenSpiralPositions, o as orbitRingPositions, s as selfLoopCurve3D, t as treeLayout3D, u as useAvl3DConfig } from '../../../avl-3d-context-Dxun3-ri.js';
10
10
  import { A as ApplicationLevelData, b as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-CH1QoZw1.js';
11
11
  import '../../../paintDispatch-Cp1_S93j.js';
12
12
  import 'lucide-react';
@@ -1,13 +1,13 @@
1
- import { goldenSpiralPositions, forceDirectedPositions, Avl3DOrbitalNode, Avl3DCrossWire, Avl3DEntityCore, fibonacciSpherePositions, Avl3DLabel, Avl3DStateNode, Avl3DTransitionArc, Avl3DExprTree, AVL_3D_COLORS, zoomReducer, initialZoomState, CAMERA_POSITIONS, getBreadcrumbs, Avl3DTooltip } from '../../../chunk-7CVXM2KS.js';
2
- export { AVL_3D_COLORS, CAMERA_POSITIONS, arcCurve3D, fibonacciSpherePositions, goldenSpiralPositions, orbitRingPositions, selfLoopCurve3D, treeLayout3D } from '../../../chunk-7CVXM2KS.js';
3
- import { useCanvasTheme, withSeries, resolveDrawableColors, markColor, applySceneMaterials, collectDrawnItems, buildHitIndex, withPreviewPosition, isValidScenePos, isAnimatedShape, applyShapeAnimation, expandFxLayer, isAnimatedGroup, applyMeshAnimation, spriteAssetState, SPRITE_FALLBACK_FILL, isAnimatedMesh, clampSegments, isAtlasAsset, getAtlas, subRectFor, polyhedronBounds, AVL_INK, parseTransitionLevel, parseTraitLevel, parseOrbitalLevel, parseApplicationLevel, Box, HStack, pressableProps, resolveThemeColor } from '../../../chunk-J755QADM.js';
4
- import { Typography } from '../../../chunk-4ZGXIW3B.js';
1
+ import { goldenSpiralPositions, forceDirectedPositions, Avl3DOrbitalNode, Avl3DCrossWire, Avl3DEntityCore, fibonacciSpherePositions, Avl3DLabel, Avl3DStateNode, Avl3DTransitionArc, Avl3DExprTree, AVL_3D_COLORS, zoomReducer, initialZoomState, CAMERA_POSITIONS, getBreadcrumbs, Avl3DTooltip } from '../../../chunk-EZ5FSNOE.js';
2
+ export { AVL_3D_COLORS, CAMERA_POSITIONS, arcCurve3D, fibonacciSpherePositions, goldenSpiralPositions, orbitRingPositions, selfLoopCurve3D, treeLayout3D } from '../../../chunk-EZ5FSNOE.js';
3
+ import { useCanvasTheme, withSeries, resolveDrawableColors, markColor, applySceneMaterials, collectDrawnItems, buildHitIndex, withPreviewPosition, isValidScenePos, isAnimatedShape, applyShapeAnimation, expandFxLayer, isAnimatedGroup, applyMeshAnimation, spriteAssetState, SPRITE_FALLBACK_FILL, isAnimatedMesh, clampSegments, isAtlasAsset, getAtlas, subRectFor, polyhedronBounds, AVL_INK, parseTransitionLevel, parseTraitLevel, parseOrbitalLevel, parseApplicationLevel, Box, HStack, pressableProps, resolveThemeColor } from '../../../chunk-EDPUQ2ZJ.js';
4
+ import { Typography } from '../../../chunk-ERDYADVZ.js';
5
5
  import '../../../chunk-XJTHMW4G.js';
6
6
  import { useEventBus, useEmitEvent } from '../../../chunk-CHNC4UYE.js';
7
- import { keyMapCode, resolveKeyMapEvent } from '../../../chunk-Q47ZN2DW.js';
7
+ import { keyMapCode, resolveKeyMapEvent } from '../../../chunk-N23SVGTH.js';
8
8
  import { cn } from '../../../chunk-64WACXM7.js';
9
- import '../../../chunk-723MJUU3.js';
10
- import '../../../chunk-LZRW6GXG.js';
9
+ import '../../../chunk-CXQENFO2.js';
10
+ import '../../../chunk-QOV3TUAA.js';
11
11
  import { __publicField } from '../../../chunk-QPXIAUJD.js';
12
12
  import React3, { createContext, forwardRef, useRef, useState, useMemo, useEffect, useCallback, useImperativeHandle, Component, useContext, useReducer, useLayoutEffect } from 'react';
13
13
  import { useTranslate } from '@almadar/ui/hooks';
@@ -1274,6 +1274,25 @@ function FxLayer3D({
1274
1274
  const children = expandFxLayer(node, epochNow, "3d", void 0, void 0);
1275
1275
  return /* @__PURE__ */ jsx(Fragment, { children: children.map((c, i) => /* @__PURE__ */ jsx(Drawable3D, { node: c, projector, groupOpacity }, i)) });
1276
1276
  }
1277
+ function useOnScreen(ref, margin = "200px") {
1278
+ const [intersecting, setIntersecting] = useState(true);
1279
+ const [pageVisible, setPageVisible] = useState(true);
1280
+ useEffect(() => {
1281
+ const el = ref.current;
1282
+ if (!el || typeof IntersectionObserver === "undefined") return;
1283
+ const observer = new IntersectionObserver(([entry]) => setIntersecting(entry.isIntersecting), { rootMargin: margin });
1284
+ observer.observe(el);
1285
+ return () => observer.disconnect();
1286
+ }, [ref, margin]);
1287
+ useEffect(() => {
1288
+ if (typeof document === "undefined") return;
1289
+ const update = () => setPageVisible(document.visibilityState !== "hidden");
1290
+ update();
1291
+ document.addEventListener("visibilitychange", update);
1292
+ return () => document.removeEventListener("visibilitychange", update);
1293
+ }, []);
1294
+ return intersecting && pageVisible;
1295
+ }
1277
1296
  var DEFAULT_GRID_CONFIG = {
1278
1297
  cellSize: 1};
1279
1298
  var EDIT_SELECTION_RADIUS = 0.6;
@@ -1350,6 +1369,7 @@ var Canvas3DHost = forwardRef(
1350
1369
  moveEvent
1351
1370
  }, ref) => {
1352
1371
  const containerRef = useRef(null);
1372
+ const onScreen = useOnScreen(containerRef);
1353
1373
  const controlsRef = useRef(null);
1354
1374
  const [internalError, setInternalError] = useState(null);
1355
1375
  const eventBus = useEventBus();
@@ -1655,6 +1675,7 @@ var Canvas3DHost = forwardRef(
1655
1675
  children: /* @__PURE__ */ jsxs(
1656
1676
  Canvas,
1657
1677
  {
1678
+ frameloop: onScreen ? "always" : "never",
1658
1679
  shadows,
1659
1680
  flat: lighting?.toneMapping === "none",
1660
1681
  gl: { preserveDrawingBuffer: true },