@almadar/shell-web 0.1.0 → 1.1.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 (131) hide show
  1. package/dist/{ArbitraryClassCompiler-Mzabq-UB.d.ts → ArbitraryClassCompiler-CO_iASBn.d.ts} +99 -4
  2. package/dist/AvlGlyph-PIXU6QH5.js +5 -0
  3. package/dist/AvlStateMachine-CKGMECMG.js +8 -0
  4. package/dist/AvlTransitionDetail-QZX6G5KJ.js +10 -0
  5. package/dist/AvlTransitionExplainer-26WLEIC6.js +11 -0
  6. package/dist/BehaviorView-JLZ4PKWY.js +10 -0
  7. package/dist/{EventBusProvider-CVwjkV_2.d.ts → EventBusProvider-BFFHfN4O.d.ts} +12 -0
  8. package/dist/{FileTree-BCFnBEuQ.d.ts → FileTree-B3GDAjaQ.d.ts} +131 -4
  9. package/dist/FlowCanvas-RPII4V24.js +23 -0
  10. package/dist/{BehaviorValueFrame-SSEMEBTG.css → FlowCanvas-VWUPMBKB.css} +189 -191
  11. package/dist/{GameAudioProvider-Cm9BnvmP.d.ts → GameAudioProvider-D7wo5ryN.d.ts} +5 -8
  12. package/dist/KernelEngineContext-CPeWQMAz.d.ts +46 -0
  13. package/dist/LayersPanel-M2LHWUFF.js +6 -0
  14. package/dist/ModuleCard-NJD6JQGD.js +6 -0
  15. package/dist/OrbInspector-OWWKPOBF.js +23 -0
  16. package/dist/{TraitValueFrame-4G3KOUBR.css → OrbInspector-VMTMZHNQ.css} +189 -191
  17. package/dist/{Select-mDZIwNqN.d.ts → Select-C2Uq6t86.d.ts} +17 -31
  18. package/dist/ServerBridge-Bqsj-lOU.d.ts +124 -0
  19. package/dist/{FlowCanvas-3JRMNJLV.css → UISlotRenderer-BIS6KT7T.css} +189 -191
  20. package/dist/UISlotRenderer-PY7FIJXN.js +23 -0
  21. package/dist/auth/browser/index.js +1 -0
  22. package/dist/auth/react/index.d.ts +8 -1
  23. package/dist/auth/react/index.js +40 -2
  24. package/dist/avl/index.css +189 -191
  25. package/dist/avl/index.d.ts +107 -85
  26. package/dist/avl/index.js +170 -39
  27. package/dist/{chunk-P4LNHAFI.js → chunk-2WGR4TDJ.js} +465 -36
  28. package/dist/{chunk-GKIFONTE.js → chunk-3S54FWRC.js} +2 -2
  29. package/dist/{chunk-KVQS4GXU.js → chunk-4YJ53G7S.js} +18 -8
  30. package/dist/{chunk-MBQAMMSE.js → chunk-4YXBKHHM.js} +269 -658
  31. package/dist/{chunk-YDNJLLG6.js → chunk-57DC34LY.js} +19 -10
  32. package/dist/{chunk-FP3WIKTC.js → chunk-7N6ZPHQ5.js} +9 -1
  33. package/dist/{chunk-AILY3XPS.js → chunk-AE7VCQB6.js} +5 -6
  34. package/dist/{chunk-L677XGY3.js → chunk-AGVSO4WY.js} +4 -5
  35. package/dist/{chunk-FAJDTHWC.js → chunk-AGXD77SL.js} +2 -2
  36. package/dist/chunk-AU7O65OX.js +66 -0
  37. package/dist/{chunk-DFNZUYX4.js → chunk-FAKU5F62.js} +273 -29
  38. package/dist/{chunk-U6QRZASX.js → chunk-ILQXJ2AR.js} +1 -1
  39. package/dist/chunk-M74BCDBQ.js +490 -0
  40. package/dist/{chunk-GYTPOFVC.js → chunk-MS4K3K2R.js} +12095 -13329
  41. package/dist/{chunk-SGM3FASH.js → chunk-OWNG4JZI.js} +13 -12
  42. package/dist/{chunk-VFF5OO47.js → chunk-PCR37T3U.js} +15 -38
  43. package/dist/{chunk-SJGJJKBY.js → chunk-PRLHKBXG.js} +5 -3
  44. package/dist/{chunk-R5O5AUPI.js → chunk-PRXQGGCO.js} +93 -86
  45. package/dist/{chunk-42FY4RYA.js → chunk-REXYVBUO.js} +2 -2
  46. package/dist/{chunk-EQAMU2ZC.js → chunk-UTDC2NEA.js} +1 -1
  47. package/dist/{chunk-73SRAB4P.js → chunk-UU57VNS2.js} +2 -2
  48. package/dist/{chunk-TESBIVUA.js → chunk-VHC2M26B.js} +2 -2
  49. package/dist/{chunk-L2DEKY4J.js → chunk-VO2TTLS5.js} +3 -6
  50. package/dist/{chunk-2PY54Z44.js → chunk-VUIACGDU.js} +4 -5
  51. package/dist/{chunk-DLZF4PVE.js → chunk-YYIHRIDH.js} +3 -3
  52. package/dist/{chunk-DYEKAA4L.js → chunk-ZDRDJKYB.js} +243 -252
  53. package/dist/components/index.css +189 -191
  54. package/dist/components/index.d.ts +739 -289
  55. package/dist/components/index.js +25 -28
  56. package/dist/context/index.d.ts +2 -3
  57. package/dist/context/index.js +4 -3
  58. package/dist/core.d.ts +95 -19
  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/{fx-CmQjnHmT.d.ts → fx-Br8zjvu9.d.ts} +6 -6
  63. package/dist/hooks/index.d.ts +40 -5
  64. package/dist/hooks/index.js +5 -4
  65. package/dist/index.d.ts +40 -114
  66. package/dist/index.js +174 -34
  67. package/dist/kernel-client-JW6OH5FX.js +537 -0
  68. package/dist/kernel-wire-DGAySGhX.d.ts +95 -0
  69. package/dist/lib/index.d.ts +3 -4
  70. package/dist/lib/index.js +4 -4
  71. package/dist/{prism-AIWGN2X5.js → prism-X5YWKXO5.js} +5 -3
  72. package/dist/providers/index.css +189 -191
  73. package/dist/providers/index.d.ts +41 -28
  74. package/dist/providers/index.js +19 -24
  75. package/dist/renderer/index.d.ts +0 -2
  76. package/dist/renderer/index.js +1 -0
  77. package/dist/runtime/index.css +189 -191
  78. package/dist/runtime/index.d.ts +57 -253
  79. package/dist/runtime/index.js +18 -24
  80. package/dist/ssr/index.cjs +2643 -535
  81. package/dist/ssr/index.d.cts +0 -23
  82. package/dist/ssr/index.d.ts +0 -23
  83. package/dist/ssr/index.js +2639 -535
  84. package/dist/storage/browser/index.js +1 -0
  85. package/dist/test-support.d.ts +15 -8
  86. package/dist/test-support.js +91 -24
  87. package/dist/{paintDispatch-ChW5mVuK.d.ts → verificationRegistry-oopV1J1n.d.ts} +132 -30
  88. package/package.json +14 -38
  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/BehaviorView-RFEE5J6E.js +0 -10
  100. package/dist/Canvas3DHost-_Y-5uLM_.d.ts +0 -552
  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/OrbInspector-MHLJ6OEE.css +0 -1756
  107. package/dist/ServerBridge-Cm1On51b.d.ts +0 -233
  108. package/dist/TraitValueFrame-2PJGLLVI.js +0 -28
  109. package/dist/UISlotRenderer-JKFSX24W.js +0 -27
  110. package/dist/UISlotRenderer-KVFO6J7R.css +0 -1756
  111. package/dist/UserContext-DqWeZkUZ.d.ts +0 -100
  112. package/dist/avl-3d-context-BIRKWpaL.d.ts +0 -204
  113. package/dist/avl-schema-parser-CtJxJ9KU.d.ts +0 -132
  114. package/dist/avl-zoom-state-CKMVuBFg.d.ts +0 -17
  115. package/dist/chunk-2QOH2HWM.js +0 -95
  116. package/dist/chunk-6P3MWXYE.js +0 -440
  117. package/dist/chunk-B4BU77LT.js +0 -432
  118. package/dist/chunk-DJ433ET5.js +0 -1327
  119. package/dist/chunk-DZ42OJQC.js +0 -176
  120. package/dist/chunk-EOWMARUB.js +0 -16
  121. package/dist/chunk-FIW6WN23.js +0 -508
  122. package/dist/chunk-GAR5TQ5B.js +0 -199
  123. package/dist/chunk-PC7K4SK7.js +0 -1384
  124. package/dist/chunk-ZO6MXAS3.js +0 -69
  125. package/dist/kernel-client-ZH4PSMCN.js +0 -367
  126. package/dist/kernel-wire-B4S8pnP3.d.ts +0 -65
  127. package/dist/three/index.css +0 -503
  128. package/dist/three/index.d.ts +0 -1185
  129. package/dist/three/index.js +0 -3896
  130. package/dist/useKeyboardRouter-Dsq553Ur.d.ts +0 -42
  131. package/dist/verificationRegistry-CabxhfTv.d.ts +0 -122
@@ -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,4 +1,4 @@
1
- import { STATE_COLORS } from './chunk-DFNZUYX4.js';
1
+ import { STATE_COLORS } from './chunk-FAKU5F62.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,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,7 +1,6 @@
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-7N6ZPHQ5.js';
2
+ import { OPERATOR_CATEGORY_COLORS, AvlEffect } from './chunk-FAKU5F62.js';
3
+ import { useTranslate, Box, Typography, domPassthrough } from './chunk-4YXBKHHM.js';
5
4
  import React, { useRef, useState, useLayoutEffect } from 'react';
6
5
  import { jsxs, jsx } from 'react/jsx-runtime';
7
6
 
@@ -637,7 +636,7 @@ var AVL_GLYPH_KINDS = [
637
636
  "sexpr",
638
637
  "literal"
639
638
  ];
640
- var HEIGHT = { sm: 32, md: 56, lg: 88 };
639
+ var HEIGHT = { xs: 16, sm: 32, md: 56, lg: 88 };
641
640
  var PAD = 6;
642
641
  function Symbol({ kind, label, effectType, fieldType, persistence, namespace }) {
643
642
  switch (kind) {
@@ -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,4 +1,5 @@
1
1
  import { createLogger } from '@almadar/logger';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
3
 
3
4
  var log = createLogger("almadar:ui:theme-color");
4
5
  var THEME_SERIES = [
@@ -164,10 +165,6 @@ var EFFECT_OPERATOR_CATEGORY = {
164
165
  "persist": "data",
165
166
  "fetch": "data",
166
167
  "fetch-stream": "data",
167
- "ref": "data",
168
- "deref": "data",
169
- "swap": "data",
170
- "watch": "data",
171
168
  "emit": "communication",
172
169
  "notify": "communication",
173
170
  "send-server": "communication",
@@ -180,7 +177,6 @@ var EFFECT_OPERATOR_CATEGORY = {
180
177
  "when": "control",
181
178
  "let": "control",
182
179
  "log": "control",
183
- "atomic": "control",
184
180
  "wait": "async",
185
181
  "prob/seed": "compute",
186
182
  "prob/condition": "compute",
@@ -191,6 +187,7 @@ var EFFECT_OPERATOR_CATEGORY = {
191
187
  "workspace/archive-orbital": "system",
192
188
  "behavior/catalog": "system",
193
189
  "behavior/describe": "system",
190
+ "behavior/packages": "system",
194
191
  "behavior/source": "system",
195
192
  "behavior/resolve": "system",
196
193
  "behavior/dependencies": "system",
@@ -198,27 +195,59 @@ var EFFECT_OPERATOR_CATEGORY = {
198
195
  "program/print": "system",
199
196
  "program/eval": "system",
200
197
  "program/validate": "system",
198
+ "program/prove": "system",
199
+ "program/os-grants": "system",
201
200
  "program/compose": "system",
202
201
  "program/step": "system",
202
+ "program/navigate": "system",
203
+ "program/resolve-rows": "system",
204
+ "program/self": "system",
205
+ "program/tick": "system",
203
206
  "program/inputs": "system",
204
207
  "program/dispatch": "system",
205
208
  "program/live": "system",
209
+ "program/open": "system",
210
+ "program/close": "system",
206
211
  "persist/read-named": "system",
207
- "http": "communication",
208
- "redis": "communication",
209
- "postgres": "communication",
210
- "oauth-authorize": "communication",
211
- "oauth-connection-status": "communication",
212
- "oauth-connection-forget": "communication",
213
212
  "credential-status": "system",
214
213
  "credential-forget": "system",
215
214
  "random-bytes": "compute",
215
+ "oauth-authorize": "system",
216
+ "oauth-connection-status": "system",
217
+ "oauth-connection-forget": "system",
216
218
  "credential-list": "system",
217
219
  "credential-set": "system",
218
220
  "credential-remove": "system",
219
221
  "credential-test": "system",
220
222
  "credential-mode": "system",
221
- "credential-rotate": "system"
223
+ "credential-rotate": "system",
224
+ "credential-connect": "system",
225
+ "mem/arena-new": "system",
226
+ "mem/arena-drop": "system",
227
+ "mem/alloc": "system",
228
+ "mem/free": "system",
229
+ "mem/borrow": "system",
230
+ "mem/release": "system",
231
+ "mem/write": "system",
232
+ "mem/freeze": "system",
233
+ "mem/atomic-load": "system",
234
+ "mem/atomic-store": "system",
235
+ "mem/atomic-add": "system",
236
+ "mem/atomic-cas": "system",
237
+ "kernel/queue-front": "communication",
238
+ "kernel/queue-back": "communication",
239
+ "ffi/call": "system",
240
+ "gpu/device-open": "system",
241
+ "gpu/device-close": "system",
242
+ "gpu/buffer-create": "system",
243
+ "gpu/texture-create": "system",
244
+ "gpu/sampler-create": "system",
245
+ "gpu/query-create": "system",
246
+ "gpu/shader-create": "system",
247
+ "gpu/pipeline-create": "system",
248
+ "gpu/bind-group-create": "system",
249
+ "gpu/submit": "system",
250
+ "gpu/release": "system"
222
251
  };
223
252
  var EFFECT_FAMILY_CATEGORY = {
224
253
  agent: "system",
@@ -228,7 +257,12 @@ var EFFECT_FAMILY_CATEGORY = {
228
257
  session: "system",
229
258
  trace: "control",
230
259
  memory: "data",
231
- application: "system"
260
+ kv: "data",
261
+ application: "system",
262
+ audio: "ui",
263
+ auth: "system",
264
+ identity: "system",
265
+ theme: "ui"
232
266
  };
233
267
  var EFFECT_OPERATOR_ZONE = {
234
268
  "access-check": "system",
@@ -236,10 +270,6 @@ var EFFECT_OPERATOR_ZONE = {
236
270
  "navigate": "route",
237
271
  "navigate-back": "route",
238
272
  "set": "entity",
239
- "swap": "entity",
240
- "ref": "store",
241
- "deref": "store",
242
- "watch": "store",
243
273
  "persist": "store",
244
274
  "fetch": "store",
245
275
  "fetch-stream": "store",
@@ -255,7 +285,6 @@ var EFFECT_OPERATOR_ZONE = {
255
285
  "when": "flow",
256
286
  "let": "flow",
257
287
  "log": "flow",
258
- "atomic": "flow",
259
288
  "wait": "timer",
260
289
  "prob/seed": "model",
261
290
  "prob/condition": "model",
@@ -266,6 +295,7 @@ var EFFECT_OPERATOR_ZONE = {
266
295
  "workspace/archive-orbital": "system",
267
296
  "behavior/catalog": "system",
268
297
  "behavior/describe": "system",
298
+ "behavior/packages": "system",
269
299
  "behavior/source": "system",
270
300
  "behavior/resolve": "system",
271
301
  "behavior/dependencies": "system",
@@ -273,27 +303,59 @@ var EFFECT_OPERATOR_ZONE = {
273
303
  "program/print": "system",
274
304
  "program/eval": "system",
275
305
  "program/validate": "system",
306
+ "program/prove": "system",
307
+ "program/os-grants": "system",
276
308
  "program/compose": "system",
277
309
  "program/step": "system",
310
+ "program/navigate": "system",
311
+ "program/resolve-rows": "system",
312
+ "program/self": "system",
313
+ "program/tick": "system",
278
314
  "program/inputs": "system",
279
315
  "program/dispatch": "system",
280
316
  "program/live": "system",
317
+ "program/open": "system",
318
+ "program/close": "system",
281
319
  "persist/read-named": "system",
282
- "http": "remote",
283
- "redis": "remote",
284
- "postgres": "remote",
285
- "oauth-authorize": "remote",
286
- "oauth-connection-status": "remote",
287
- "oauth-connection-forget": "remote",
288
320
  "credential-status": "system",
289
321
  "credential-forget": "system",
290
322
  "random-bytes": "system",
323
+ "oauth-authorize": "remote",
324
+ "oauth-connection-status": "remote",
325
+ "oauth-connection-forget": "remote",
291
326
  "credential-list": "system",
292
327
  "credential-set": "system",
293
328
  "credential-remove": "system",
294
329
  "credential-test": "system",
295
330
  "credential-mode": "system",
296
- "credential-rotate": "system"
331
+ "credential-rotate": "system",
332
+ "credential-connect": "system",
333
+ "mem/arena-new": "system",
334
+ "mem/arena-drop": "system",
335
+ "mem/alloc": "system",
336
+ "mem/free": "system",
337
+ "mem/borrow": "system",
338
+ "mem/release": "system",
339
+ "mem/write": "system",
340
+ "mem/freeze": "system",
341
+ "mem/atomic-load": "system",
342
+ "mem/atomic-store": "system",
343
+ "mem/atomic-add": "system",
344
+ "mem/atomic-cas": "system",
345
+ "kernel/queue-front": "bus",
346
+ "kernel/queue-back": "bus",
347
+ "ffi/call": "system",
348
+ "gpu/device-open": "system",
349
+ "gpu/device-close": "system",
350
+ "gpu/buffer-create": "system",
351
+ "gpu/texture-create": "system",
352
+ "gpu/sampler-create": "system",
353
+ "gpu/query-create": "system",
354
+ "gpu/shader-create": "system",
355
+ "gpu/pipeline-create": "system",
356
+ "gpu/bind-group-create": "system",
357
+ "gpu/submit": "system",
358
+ "gpu/release": "system"
297
359
  };
298
360
  var EFFECT_FAMILY_ZONE = {
299
361
  agent: "system",
@@ -303,7 +365,12 @@ var EFFECT_FAMILY_ZONE = {
303
365
  session: "system",
304
366
  trace: "flow",
305
367
  memory: "store",
306
- application: "system"
368
+ kv: "store",
369
+ application: "system",
370
+ audio: "system",
371
+ auth: "remote",
372
+ identity: "remote",
373
+ theme: "system"
307
374
  };
308
375
  function isEffectOperator(head) {
309
376
  return head in EFFECT_OPERATOR_CATEGORY;
@@ -361,9 +428,16 @@ var OPERATOR_CATEGORY_COLORS = {
361
428
  "std-llm": avlBlend("var(--color-accent)", 70, "var(--color-primary)"),
362
429
  "std-workspace": avlBlend("var(--color-muted-foreground)", 60, "var(--color-warning)"),
363
430
  "std-session": avlBlend("var(--color-muted-foreground)", 60, "var(--color-success)"),
364
- "std-memory": avlBlend("var(--color-info)", 60, "var(--color-accent)"),
431
+ "std-audio": avlBlend("var(--color-accent)", 50, "var(--color-warning)"),
432
+ "std-auth": avlBlend("var(--color-warning)", 60, "var(--color-primary)"),
365
433
  "std-trace": "var(--color-muted-foreground)",
366
- "std-behavior": avlBlend("var(--color-accent)", 60, "var(--color-success)")
434
+ "std-behavior": avlBlend("var(--color-accent)", 60, "var(--color-success)"),
435
+ "std-mem": avlBlend("var(--color-muted-foreground)", 70, "var(--color-error)"),
436
+ "std-mem-read": avlBlend("var(--color-muted-foreground)", 70, "var(--color-info)"),
437
+ "std-kernel": avlBlend("var(--color-muted-foreground)", 70, "var(--color-accent)"),
438
+ "std-kernel-read": avlBlend("var(--color-muted-foreground)", 70, "var(--color-success)"),
439
+ "std-ffi": avlBlend("var(--color-muted-foreground)", 70, "var(--color-warning)"),
440
+ "std-gpu": avlBlend("var(--color-muted-foreground)", 60, "var(--color-accent)")
367
441
  };
368
442
  function effectZoneOf(head) {
369
443
  if (isEffectOperator(head)) return EFFECT_OPERATOR_ZONE[head];
@@ -374,5 +448,175 @@ function effectZoneOf(head) {
374
448
  }
375
449
  return null;
376
450
  }
451
+ var log2 = createLogger("almadar:ui:avl:effect");
452
+ function headIcon(type, x, y, s, color) {
453
+ switch (type) {
454
+ case "render-ui":
455
+ return /* @__PURE__ */ jsxs("g", { children: [
456
+ /* @__PURE__ */ jsx("rect", { x: x - s, y: y - s, width: s * 2, height: s * 2, fill: "none", stroke: color, strokeWidth: 1.5, rx: 1 }),
457
+ /* @__PURE__ */ jsx("line", { x1: x, y1: y - s, x2: x, y2: y + s, stroke: color, strokeWidth: 1 }),
458
+ /* @__PURE__ */ jsx("line", { x1: x - s, y1: y, x2: x + s, y2: y, stroke: color, strokeWidth: 1 })
459
+ ] });
460
+ case "set":
461
+ return /* @__PURE__ */ jsx(
462
+ "path",
463
+ {
464
+ d: `M${x - s * 0.6},${y + s} L${x - s},${y + s * 0.4} L${x + s * 0.4},${y - s} L${x + s},${y - s * 0.4} Z`,
465
+ fill: "none",
466
+ stroke: color,
467
+ strokeWidth: 1.5,
468
+ strokeLinejoin: "round"
469
+ }
470
+ );
471
+ case "persist":
472
+ return /* @__PURE__ */ jsxs("g", { children: [
473
+ /* @__PURE__ */ jsx("ellipse", { cx: x, cy: y - s * 0.6, rx: s, ry: s * 0.4, fill: "none", stroke: color, strokeWidth: 1.5 }),
474
+ /* @__PURE__ */ jsx("line", { x1: x - s, y1: y - s * 0.6, x2: x - s, y2: y + s * 0.4, stroke: color, strokeWidth: 1.5 }),
475
+ /* @__PURE__ */ jsx("line", { x1: x + s, y1: y - s * 0.6, x2: x + s, y2: y + s * 0.4, stroke: color, strokeWidth: 1.5 }),
476
+ /* @__PURE__ */ jsx("ellipse", { cx: x, cy: y + s * 0.4, rx: s, ry: s * 0.4, fill: "none", stroke: color, strokeWidth: 1.5 })
477
+ ] });
478
+ case "fetch":
479
+ return /* @__PURE__ */ jsxs("g", { children: [
480
+ /* @__PURE__ */ jsx("line", { x1: x, y1: y - s, x2: x, y2: y + s * 0.6, stroke: color, strokeWidth: 1.5 }),
481
+ /* @__PURE__ */ jsx("polyline", { points: `${x - s * 0.5},${y + s * 0.1} ${x},${y + s} ${x + s * 0.5},${y + s * 0.1}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" })
482
+ ] });
483
+ case "emit":
484
+ return /* @__PURE__ */ jsxs("g", { children: [
485
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s * 0.3, fill: color }),
486
+ /* @__PURE__ */ jsx("path", { d: `M${x - s * 0.7},${y - s * 0.7} A${s},${s} 0 0,1 ${x + s * 0.7},${y - s * 0.7}`, fill: "none", stroke: color, strokeWidth: 1.5 }),
487
+ /* @__PURE__ */ jsx("path", { d: `M${x - s},${y - s} A${s * 1.4},${s * 1.4} 0 0,1 ${x + s},${y - s}`, fill: "none", stroke: color, strokeWidth: 1, opacity: 0.6 })
488
+ ] });
489
+ case "navigate":
490
+ return /* @__PURE__ */ jsxs("g", { children: [
491
+ /* @__PURE__ */ jsx("line", { x1: x - s, y1: y, x2: x + s * 0.6, y2: y, stroke: color, strokeWidth: 1.5 }),
492
+ /* @__PURE__ */ jsx("polyline", { points: `${x + s * 0.1},${y - s * 0.5} ${x + s},${y} ${x + s * 0.1},${y + s * 0.5}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" })
493
+ ] });
494
+ case "call-service":
495
+ return /* @__PURE__ */ jsxs("g", { children: [
496
+ /* @__PURE__ */ jsx("line", { x1: x - s, y1: y - s * 0.3, x2: x + s, y2: y - s * 0.3, stroke: color, strokeWidth: 1.5 }),
497
+ /* @__PURE__ */ jsx("polyline", { points: `${x + s * 0.5},${y - s * 0.7} ${x + s},${y - s * 0.3} ${x + s * 0.5},${y + s * 0.1}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" }),
498
+ /* @__PURE__ */ jsx("line", { x1: x + s, y1: y + s * 0.3, x2: x - s, y2: y + s * 0.3, stroke: color, strokeWidth: 1.5 }),
499
+ /* @__PURE__ */ jsx("polyline", { points: `${x - s * 0.5},${y - s * 0.1} ${x - s},${y + s * 0.3} ${x - s * 0.5},${y + s * 0.7}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" })
500
+ ] });
501
+ case "spawn":
502
+ return /* @__PURE__ */ jsxs("g", { children: [
503
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.5 }),
504
+ /* @__PURE__ */ jsx("line", { x1: x - s * 0.5, y1: y, x2: x + s * 0.5, y2: y, stroke: color, strokeWidth: 1.5 }),
505
+ /* @__PURE__ */ jsx("line", { x1: x, y1: y - s * 0.5, x2: x, y2: y + s * 0.5, stroke: color, strokeWidth: 1.5 })
506
+ ] });
507
+ case "despawn":
508
+ return /* @__PURE__ */ jsxs("g", { children: [
509
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.5 }),
510
+ /* @__PURE__ */ jsx("line", { x1: x - s * 0.5, y1: y, x2: x + s * 0.5, y2: y, stroke: color, strokeWidth: 1.5 })
511
+ ] });
512
+ case "do":
513
+ return /* @__PURE__ */ jsxs("g", { children: [
514
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.5 }),
515
+ /* @__PURE__ */ jsx("polygon", { points: `${x - s * 0.3},${y - s * 0.5} ${x + s * 0.5},${y} ${x - s * 0.3},${y + s * 0.5}`, fill: color })
516
+ ] });
517
+ case "if":
518
+ return /* @__PURE__ */ jsx(
519
+ "polygon",
520
+ {
521
+ points: `${x},${y - s} ${x + s * 0.7},${y} ${x},${y + s} ${x - s * 0.7},${y}`,
522
+ fill: "none",
523
+ stroke: color,
524
+ strokeWidth: 1.5,
525
+ strokeLinejoin: "round"
526
+ }
527
+ );
528
+ case "log":
529
+ return /* @__PURE__ */ jsx(
530
+ "text",
531
+ {
532
+ x,
533
+ y,
534
+ textAnchor: "middle",
535
+ dominantBaseline: "central",
536
+ fill: color,
537
+ fontSize: s * 2.2,
538
+ fontFamily: "serif",
539
+ children: "\xB6"
540
+ }
541
+ );
542
+ default:
543
+ return null;
544
+ }
545
+ }
546
+ var clock = (x, y, s, color) => /* @__PURE__ */ jsxs("g", { children: [
547
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.5 }),
548
+ /* @__PURE__ */ jsx("polyline", { points: `${x},${y - s * 0.6} ${x},${y} ${x + s * 0.5},${y + s * 0.3}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" })
549
+ ] });
550
+ var neuron = (x, y, s, color) => /* @__PURE__ */ jsxs("g", { children: [
551
+ /* @__PURE__ */ jsx("line", { x1: x - s, y1: y - s * 0.6, x2: x + s * 0.8, y2: y, stroke: color, strokeWidth: 1 }),
552
+ /* @__PURE__ */ jsx("line", { x1: x - s, y1: y + s * 0.6, x2: x + s * 0.8, y2: y, stroke: color, strokeWidth: 1 }),
553
+ /* @__PURE__ */ jsx("circle", { cx: x - s, cy: y - s * 0.6, r: s * 0.3, fill: color }),
554
+ /* @__PURE__ */ jsx("circle", { cx: x - s, cy: y + s * 0.6, r: s * 0.3, fill: color }),
555
+ /* @__PURE__ */ jsx("circle", { cx: x + s * 0.8, cy: y, r: s * 0.35, fill: color })
556
+ ] });
557
+ var gear = (x, y, s, color) => /* @__PURE__ */ jsxs("g", { children: [
558
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s * 0.75, fill: "none", stroke: color, strokeWidth: 1.5, strokeDasharray: `${s * 0.5} ${s * 0.3}` }),
559
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s * 0.3, fill: color })
560
+ ] });
561
+ var unknown = (x, y, s, color) => /* @__PURE__ */ jsxs("g", { children: [
562
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.2, strokeDasharray: "2 2" }),
563
+ /* @__PURE__ */ jsx("text", { x, y, textAnchor: "middle", dominantBaseline: "central", fill: color, fontSize: s * 1.4, children: "?" })
564
+ ] });
565
+ var CATEGORY_GLYPH = {
566
+ ui: (x, y, s, c) => headIcon("render-ui", x, y, s, c),
567
+ data: (x, y, s, c) => headIcon("set", x, y, s, c),
568
+ communication: (x, y, s, c) => headIcon("emit", x, y, s, c),
569
+ lifecycle: (x, y, s, c) => headIcon("spawn", x, y, s, c),
570
+ control: (x, y, s, c) => headIcon("if", x, y, s, c),
571
+ async: clock,
572
+ compute: neuron,
573
+ system: gear
574
+ };
575
+ function effectIcon(type, x, y, s, color) {
576
+ const op = asEffectOperator(type);
577
+ const own = op ? headIcon(op, x, y, s, color) : null;
578
+ if (own) return own;
579
+ const category = effectCategoryOf(type);
580
+ if (category) return CATEGORY_GLYPH[category](x, y, s, color);
581
+ log2.error("unknown-effect-operator", { effectType: type });
582
+ return unknown(x, y, s, color);
583
+ }
584
+ var AvlEffect = ({
585
+ x = 0,
586
+ y = 0,
587
+ effectType,
588
+ size = 8,
589
+ label,
590
+ color = "var(--color-primary)",
591
+ opacity = 1,
592
+ className,
593
+ showBackground = false
594
+ }) => {
595
+ const category = effectCategoryOf(effectType);
596
+ const catColors = category ? EFFECT_CATEGORY_COLORS[category] : null;
597
+ const iconColor = showBackground && catColors ? catColors.color : color;
598
+ return /* @__PURE__ */ jsxs("g", { className, opacity, children: [
599
+ showBackground && catColors && /* @__PURE__ */ jsxs(Fragment, { children: [
600
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: size * 1.2, fill: catColors.bg }),
601
+ /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: size * 1.2, fill: "none", stroke: catColors.color, strokeWidth: 0.5, opacity: 0.3 })
602
+ ] }),
603
+ effectIcon(effectType, x, y, size, iconColor),
604
+ label && /* @__PURE__ */ jsx(
605
+ "text",
606
+ {
607
+ x,
608
+ y: y + size + 10,
609
+ textAnchor: "middle",
610
+ fill: iconColor,
611
+ fontSize: 11,
612
+ fontWeight: 500,
613
+ fontFamily: "inherit",
614
+ opacity: 0.7,
615
+ children: label
616
+ }
617
+ )
618
+ ] });
619
+ };
620
+ AvlEffect.displayName = "AvlEffect";
377
621
 
378
- export { AVL_FONT, AVL_INK, AVL_STROKE, CONNECTION_COLORS, EFFECT_CATEGORY_COLORS, OPERATOR_CATEGORY_COLORS, STATE_COLORS, THEME_SERIES, asEffectOperator, avlBlend, avlSeries, avlTint, effectCategoryOf, effectZoneOf, getStateRole, parseComputedColor, resolveThemeColor };
622
+ export { AVL_FONT, AVL_INK, AVL_STROKE, AvlEffect, CONNECTION_COLORS, EFFECT_CATEGORY_COLORS, OPERATOR_CATEGORY_COLORS, STATE_COLORS, THEME_SERIES, avlBlend, avlSeries, avlTint, effectCategoryOf, effectZoneOf, getStateRole, parseComputedColor, resolveThemeColor };
@@ -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