@almadar/ui 6.52.0 → 6.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EntityBindingContext-BbxrwSb9.d.ts → AwaitingSkeletonContext-Bh399p1x.d.ts} +17 -2
- package/dist/{Canvas3DHost-CWO0tswb.d.ts → Canvas3DHost-B-y2TNij.d.ts} +1 -1
- package/dist/{GameAudioProvider-_hPzjqp-.d.ts → GameAudioProvider-DyBvYP2c.d.ts} +1 -1
- package/dist/Typography-7QEWUTW3.js +5 -0
- package/dist/{UISlotRenderer-CR7SCAMR.js → UISlotRenderer-P7A4SZSK.js} +10 -10
- package/dist/avl/index.cjs +40157 -39958
- package/dist/avl/index.d.ts +5 -2
- package/dist/avl/index.js +34 -21
- package/dist/{chunk-XUSSAWKL.js → chunk-2LFBQ4IS.js} +1 -1
- package/dist/{chunk-QWDKMVLX.js → chunk-53VTY5CC.js} +141 -82
- package/dist/{chunk-MSBMVG3B.js → chunk-6O37FCX4.js} +1 -0
- package/dist/{chunk-WB2A6V3I.js → chunk-7KSLPY56.js} +49 -1
- package/dist/{chunk-BHZG4PDZ.js → chunk-7LM6I3NA.js} +629 -626
- package/dist/{chunk-NCNP2RKZ.js → chunk-E37BYSXY.js} +2 -2
- package/dist/{chunk-5GCI6C7J.js → chunk-FUQASYEW.js} +2 -2
- package/dist/{chunk-CLSLVFSP.js → chunk-HB4C27KU.js} +2 -2
- package/dist/{chunk-EERAGPBW.js → chunk-HUG25TT3.js} +32341 -33067
- package/dist/{chunk-TWHYH25Q.js → chunk-JRW33U35.js} +80 -80
- package/dist/{chunk-G4GMXYMY.js → chunk-KQXXO42S.js} +93 -171
- package/dist/chunk-OKWD7LPO.js +80 -0
- package/dist/{chunk-YHY5K2Y7.js → chunk-PEST66PN.js} +6 -0
- package/dist/{chunk-V5AGW2JN.js → chunk-QVXLKFUQ.js} +1 -1
- package/dist/chunk-UOTYAPV5.js +284 -0
- package/dist/{chunk-2QB2PXOO.js → chunk-VHTJRS2N.js} +3 -5
- package/dist/components/index.cjs +42813 -42691
- package/dist/components/index.d.ts +182 -319
- package/dist/components/index.js +621 -13
- package/dist/context/index.cjs +8 -3
- package/dist/context/index.js +3 -3
- package/dist/hooks/index.cjs +56 -4
- package/dist/hooks/index.js +7 -7
- package/dist/lib/drawable/three/index.cjs +49 -1
- package/dist/lib/drawable/three/index.d.ts +5 -5
- package/dist/lib/drawable/three/index.js +7 -7
- package/dist/lib/index.cjs +50 -1
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +6 -5
- package/dist/locales/index.cjs +147 -3
- package/dist/locales/index.js +99 -3
- package/dist/{paintDispatch-DHo3WhaU.d.ts → paintDispatch-_6EhJCiL.d.ts} +3 -3
- package/dist/providers/index.cjs +35850 -35687
- package/dist/providers/index.d.ts +33 -8
- package/dist/providers/index.js +37 -13
- package/dist/renderer/index.cjs +6 -0
- package/dist/renderer/index.d.ts +1 -1
- package/dist/renderer/index.js +1 -1
- package/dist/runtime/index.cjs +42533 -42343
- package/dist/runtime/index.d.ts +4 -2
- package/dist/runtime/index.js +12 -12
- package/dist/ssr/index.cjs +377 -137
- package/dist/ssr/index.d.cts +5 -1
- package/dist/ssr/index.d.ts +5 -1
- package/dist/ssr/index.js +313 -73
- package/dist/{verificationRegistry-BYD3cVhS.d.ts → verificationRegistry-CD7Xb40L.d.ts} +1 -1
- package/locales/ar.json +49 -1
- package/locales/en.json +49 -1
- package/locales/sl.json +49 -1
- package/package.json +6 -6
- package/tailwind-preset.cjs +23 -0
- package/themes/_base.css +28 -8
- package/themes/_contract.md +5 -0
- package/dist/Typography-7FRZOS2H.js +0 -5
- package/dist/{avl-3d-context-DLteNEwu.d.ts → avl-3d-context-MAt_NuU9.d.ts} +3 -3
- package/dist/{chunk-IN3BVW2Z.js → chunk-64WACXM7.js} +14 -14
|
@@ -1,673 +1,676 @@
|
|
|
1
1
|
import { useTapReveal } from './chunk-XJTHMW4G.js';
|
|
2
2
|
import { useEventBus } from './chunk-6EV3OEBQ.js';
|
|
3
3
|
import { updateAssetStatus } from './chunk-O7OLVVBR.js';
|
|
4
|
-
import { cn, domPassthrough } from './chunk-
|
|
4
|
+
import { cn, domPassthrough } from './chunk-64WACXM7.js';
|
|
5
|
+
import { createLogger } from '@almadar/logger';
|
|
5
6
|
import React, { useCallback, createContext, useContext } from 'react';
|
|
6
7
|
import { useThemeScope } from '@almadar/ui/context';
|
|
7
8
|
import { jsx } from 'react/jsx-runtime';
|
|
8
|
-
import { createLogger } from '@almadar/logger';
|
|
9
9
|
import { renderUiEntriesOf } from '@almadar/core/patterns';
|
|
10
10
|
import { isInlineTrait } from '@almadar/core';
|
|
11
11
|
import { parseListenSource } from '@almadar/runtime';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
var log = createLogger("almadar:ui:theme-color");
|
|
14
|
+
var THEME_SERIES = [
|
|
15
|
+
"var(--color-primary)",
|
|
16
|
+
"var(--color-success)",
|
|
17
|
+
"var(--color-warning)",
|
|
18
|
+
"var(--color-error)",
|
|
19
|
+
"var(--color-info)",
|
|
20
|
+
"var(--color-accent)"
|
|
21
|
+
];
|
|
22
|
+
function channel(value, unitScale) {
|
|
23
|
+
return Math.round(Math.min(255, Math.max(0, Number(value) * unitScale)));
|
|
16
24
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
const { disabled = false } = options;
|
|
20
|
-
return {
|
|
21
|
-
role: "button",
|
|
22
|
-
tabIndex: disabled ? -1 : 0,
|
|
23
|
-
...disabled ? { "aria-disabled": true } : void 0,
|
|
24
|
-
onClick: (e) => {
|
|
25
|
-
if (!disabled) onPress(e);
|
|
26
|
-
},
|
|
27
|
-
onKeyDown: (e) => {
|
|
28
|
-
if (disabled || e.target !== e.currentTarget) return;
|
|
29
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
30
|
-
e.preventDefault();
|
|
31
|
-
clickElement(e.currentTarget);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
25
|
+
function make(r, g, b, a) {
|
|
26
|
+
return { r, g, b, a, css: `rgb(${r}, ${g}, ${b})` };
|
|
35
27
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
28
|
+
function parseComputedColor(value) {
|
|
29
|
+
const v = value.trim();
|
|
30
|
+
const hex = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(v);
|
|
31
|
+
if (hex) {
|
|
32
|
+
const h = hex[1].length === 3 ? hex[1].split("").map((c) => c + c).join("") : hex[1];
|
|
33
|
+
return make(parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16), 1);
|
|
34
|
+
}
|
|
35
|
+
const rgb = /^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)\s*(?:[,/]\s*([\d.]+)\s*)?\)$/i.exec(v);
|
|
36
|
+
if (rgb) {
|
|
37
|
+
return make(channel(rgb[1], 1), channel(rgb[2], 1), channel(rgb[3], 1), rgb[4] === void 0 ? 1 : Number(rgb[4]));
|
|
38
|
+
}
|
|
39
|
+
const srgb = /^color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*(?:\/\s*([\d.]+)\s*)?\)$/i.exec(v);
|
|
40
|
+
if (srgb) {
|
|
41
|
+
return make(channel(srgb[1], 255), channel(srgb[2], 255), channel(srgb[3], 255), srgb[4] === void 0 ? 1 : Number(srgb[4]));
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
var SENTINEL = "rgb(1, 2, 3)";
|
|
46
|
+
function getComputedSentinel(doc) {
|
|
47
|
+
const s = doc.createElement("span");
|
|
48
|
+
s.style.display = "none";
|
|
49
|
+
s.style.color = SENTINEL;
|
|
50
|
+
doc.body.appendChild(s);
|
|
51
|
+
const c = getComputedStyle(s).color;
|
|
52
|
+
doc.body.removeChild(s);
|
|
53
|
+
return c;
|
|
54
|
+
}
|
|
55
|
+
function resolveThemeColor(value, scope) {
|
|
56
|
+
const doc = scope.ownerDocument;
|
|
57
|
+
const wrapper = doc.createElement("span");
|
|
58
|
+
wrapper.style.display = "none";
|
|
59
|
+
wrapper.style.color = SENTINEL;
|
|
60
|
+
const probe = doc.createElement("span");
|
|
61
|
+
probe.style.color = value;
|
|
62
|
+
wrapper.appendChild(probe);
|
|
63
|
+
scope.appendChild(wrapper);
|
|
64
|
+
const computed = probe.style.color === "" ? "" : getComputedStyle(probe).color;
|
|
65
|
+
scope.removeChild(wrapper);
|
|
66
|
+
const parsed = computed === getComputedSentinel(doc) ? null : parseComputedColor(computed);
|
|
67
|
+
if (!parsed) log.error("unresolvable-theme-color", { value, computed });
|
|
68
|
+
return parsed;
|
|
47
69
|
}
|
|
48
70
|
|
|
49
|
-
//
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var paddingYStyles = {
|
|
69
|
-
none: "py-0",
|
|
70
|
-
xs: "py-1",
|
|
71
|
-
sm: "py-2",
|
|
72
|
-
md: "py-4",
|
|
73
|
-
lg: "py-6",
|
|
74
|
-
xl: "py-8",
|
|
75
|
-
"2xl": "py-12"
|
|
76
|
-
};
|
|
77
|
-
var marginStyles = {
|
|
78
|
-
none: "m-0",
|
|
79
|
-
xs: "m-1",
|
|
80
|
-
sm: "m-2",
|
|
81
|
-
md: "m-4",
|
|
82
|
-
lg: "m-6",
|
|
83
|
-
xl: "m-8",
|
|
84
|
-
"2xl": "m-12",
|
|
85
|
-
auto: "m-auto"
|
|
86
|
-
};
|
|
87
|
-
var marginXStyles = {
|
|
88
|
-
none: "mx-0",
|
|
89
|
-
xs: "mx-1",
|
|
90
|
-
sm: "mx-2",
|
|
91
|
-
md: "mx-4",
|
|
92
|
-
lg: "mx-6",
|
|
93
|
-
xl: "mx-8",
|
|
94
|
-
"2xl": "mx-12",
|
|
95
|
-
auto: "mx-auto"
|
|
96
|
-
};
|
|
97
|
-
var marginYStyles = {
|
|
98
|
-
none: "my-0",
|
|
99
|
-
xs: "my-1",
|
|
100
|
-
sm: "my-2",
|
|
101
|
-
md: "my-4",
|
|
102
|
-
lg: "my-6",
|
|
103
|
-
xl: "my-8",
|
|
104
|
-
"2xl": "my-12",
|
|
105
|
-
auto: "my-auto"
|
|
106
|
-
};
|
|
107
|
-
var bgStyles = {
|
|
108
|
-
transparent: "bg-transparent",
|
|
109
|
-
primary: "bg-primary text-primary-foreground",
|
|
110
|
-
secondary: "bg-secondary text-secondary-foreground",
|
|
111
|
-
muted: "bg-muted text-foreground",
|
|
112
|
-
accent: "bg-accent text-accent-foreground",
|
|
113
|
-
surface: "bg-card",
|
|
114
|
-
overlay: "bg-card/80 backdrop-blur-sm"
|
|
71
|
+
// lib/avl-theme.ts
|
|
72
|
+
function avlTint(token, percent) {
|
|
73
|
+
return `color-mix(in srgb, ${token} ${percent}%, transparent)`;
|
|
74
|
+
}
|
|
75
|
+
function avlBlend(token, percent, other) {
|
|
76
|
+
return `color-mix(in srgb, ${token} ${percent}%, ${other})`;
|
|
77
|
+
}
|
|
78
|
+
var AVL_INK = {
|
|
79
|
+
text: "var(--color-foreground)",
|
|
80
|
+
quiet: "var(--color-muted-foreground)",
|
|
81
|
+
line: "var(--color-border)",
|
|
82
|
+
surface: "var(--color-card)",
|
|
83
|
+
wash: "var(--color-muted)",
|
|
84
|
+
canvas: "var(--color-background)",
|
|
85
|
+
focus: "var(--color-primary)",
|
|
86
|
+
onFocus: "var(--color-primary-foreground)",
|
|
87
|
+
pass: "var(--color-success)",
|
|
88
|
+
fail: "var(--color-error)",
|
|
89
|
+
caution: "var(--color-warning)"
|
|
115
90
|
};
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
lg: "rounded-lg",
|
|
121
|
-
xl: "rounded-xl",
|
|
122
|
-
"2xl": "rounded-xl",
|
|
123
|
-
full: "rounded-full"
|
|
91
|
+
var AVL_STROKE = {
|
|
92
|
+
hairline: 1,
|
|
93
|
+
wire: 1.5,
|
|
94
|
+
active: 2.5
|
|
124
95
|
};
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
md: "shadow",
|
|
129
|
-
lg: "shadow-lg",
|
|
130
|
-
xl: "shadow-lg"
|
|
96
|
+
var AVL_FONT = {
|
|
97
|
+
body: "var(--font-family-body, var(--font-family))",
|
|
98
|
+
mono: "var(--font-family-mono, monospace)"
|
|
131
99
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
100
|
+
function avlSeries(i) {
|
|
101
|
+
const base = THEME_SERIES[i % THEME_SERIES.length];
|
|
102
|
+
const band = Math.floor(i / THEME_SERIES.length) % 3;
|
|
103
|
+
if (band === 0) return base;
|
|
104
|
+
return avlBlend(base, 65, band === 1 ? AVL_INK.text : AVL_INK.canvas);
|
|
105
|
+
}
|
|
106
|
+
var STATE_COLORS = {
|
|
107
|
+
initial: { fill: avlTint("var(--color-success)", 12), border: "var(--color-success)" },
|
|
108
|
+
terminal: { fill: avlTint("var(--color-foreground)", 6), border: "var(--color-foreground)" },
|
|
109
|
+
hub: { fill: avlTint("var(--color-info)", 12), border: "var(--color-info)" },
|
|
110
|
+
default: { fill: avlTint("var(--color-muted-foreground)", 8), border: "var(--color-muted-foreground)" }
|
|
139
111
|
};
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
112
|
+
function getStateRole(isInitial, isTerminal, transitionCount, maxTransitionCount) {
|
|
113
|
+
if (isInitial) return "initial";
|
|
114
|
+
if (isTerminal) return "terminal";
|
|
115
|
+
if (transitionCount != null && maxTransitionCount != null && transitionCount === maxTransitionCount && transitionCount >= 3) return "hub";
|
|
116
|
+
return "default";
|
|
117
|
+
}
|
|
118
|
+
var CONNECTION_COLORS = {
|
|
119
|
+
forward: { color: "var(--color-muted-foreground)", width: 1.5, dash: "none" },
|
|
120
|
+
backward: { color: "var(--color-muted-foreground)", width: 1.5, dash: "5 4" },
|
|
121
|
+
selfLoop: { color: "var(--color-muted-foreground)", width: 1, dash: "3 2" },
|
|
122
|
+
emitListen: { color: "var(--color-warning)", width: 1.5, dash: "4 3" }
|
|
145
123
|
};
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
124
|
+
var EFFECT_CATEGORY_COLORS = {
|
|
125
|
+
ui: { color: "var(--color-accent)", bg: avlTint("var(--color-accent)", 10) },
|
|
126
|
+
data: { color: "var(--color-info)", bg: avlTint("var(--color-info)", 10) },
|
|
127
|
+
communication: { color: "var(--color-warning)", bg: avlTint("var(--color-warning)", 10) },
|
|
128
|
+
lifecycle: { color: "var(--color-success)", bg: avlTint("var(--color-success)", 10) },
|
|
129
|
+
control: { color: "var(--color-muted-foreground)", bg: avlTint("var(--color-muted-foreground)", 10) },
|
|
130
|
+
async: { color: avlBlend("var(--color-info)", 50, "var(--color-accent)"), bg: avlTint(avlBlend("var(--color-info)", 50, "var(--color-accent)"), 10) },
|
|
131
|
+
compute: { color: "var(--color-primary)", bg: avlTint("var(--color-primary)", 10) },
|
|
132
|
+
system: { color: avlBlend("var(--color-muted-foreground)", 60, "var(--color-primary)"), bg: avlTint("var(--color-muted-foreground)", 10) }
|
|
151
133
|
};
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
|
|
210
|
-
}, [hoverEvent, eventBus]),
|
|
211
|
-
onDismiss: useCallback(() => {
|
|
212
|
-
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
|
|
213
|
-
}, [hoverEvent, eventBus])
|
|
214
|
-
});
|
|
215
|
-
const handlePointerDown = useCallback((e) => {
|
|
216
|
-
if (hoverEvent && tapReveal) triggerProps.onPointerDown(e);
|
|
217
|
-
onPointerDown?.(e);
|
|
218
|
-
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
219
|
-
const isClickable = action || onClick;
|
|
220
|
-
const actionControl = action && rest.role === void 0 && rest.tabIndex === void 0 ? pressableProps(handleClick) : {};
|
|
221
|
-
return React.createElement(
|
|
222
|
-
Component,
|
|
223
|
-
{
|
|
224
|
-
ref,
|
|
225
|
-
className: cn(
|
|
226
|
-
padding && paddingStyles[padding],
|
|
227
|
-
paddingX && paddingXStyles[paddingX],
|
|
228
|
-
paddingY && paddingYStyles[paddingY],
|
|
229
|
-
margin && marginStyles[margin],
|
|
230
|
-
marginX && marginXStyles[marginX],
|
|
231
|
-
marginY && marginYStyles[marginY],
|
|
232
|
-
bgStyles[bg],
|
|
233
|
-
border && "border-[length:var(--border-width)] border-border",
|
|
234
|
-
roundedStyles[rounded],
|
|
235
|
-
shadowStyles[shadow],
|
|
236
|
-
display && displayStyles[display],
|
|
237
|
-
fullWidth && "w-full",
|
|
238
|
-
fullHeight && "h-full",
|
|
239
|
-
overflow && overflowStyles[overflow],
|
|
240
|
-
position && positionStyles[position],
|
|
241
|
-
isClickable && "cursor-pointer",
|
|
242
|
-
className
|
|
243
|
-
),
|
|
244
|
-
onClick: isClickable ? handleClick : void 0,
|
|
245
|
-
...actionControl,
|
|
246
|
-
onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
|
|
247
|
-
onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
|
|
248
|
-
onPointerDown: hoverEvent && tapReveal || onPointerDown ? handlePointerDown : void 0,
|
|
249
|
-
style: maxWidth ? { maxWidth, ...rest.style } : rest.style,
|
|
250
|
-
...rest,
|
|
251
|
-
"data-theme": dataTheme
|
|
252
|
-
},
|
|
253
|
-
children
|
|
254
|
-
);
|
|
255
|
-
}
|
|
256
|
-
);
|
|
257
|
-
Box.displayName = "Box";
|
|
258
|
-
var gapStyles = {
|
|
259
|
-
none: "gap-0",
|
|
260
|
-
xs: "gap-1",
|
|
261
|
-
sm: "gap-2",
|
|
262
|
-
md: "gap-4",
|
|
263
|
-
lg: "gap-6",
|
|
264
|
-
xl: "gap-8",
|
|
265
|
-
"2xl": "gap-12"
|
|
134
|
+
var EFFECT_OPERATOR_CATEGORY = {
|
|
135
|
+
"render-ui": "ui",
|
|
136
|
+
"navigate": "ui",
|
|
137
|
+
"navigate-back": "ui",
|
|
138
|
+
"set": "data",
|
|
139
|
+
"persist": "data",
|
|
140
|
+
"fetch": "data",
|
|
141
|
+
"fetch-stream": "data",
|
|
142
|
+
"ref": "data",
|
|
143
|
+
"deref": "data",
|
|
144
|
+
"swap": "data",
|
|
145
|
+
"watch": "data",
|
|
146
|
+
"emit": "communication",
|
|
147
|
+
"notify": "communication",
|
|
148
|
+
"send-server": "communication",
|
|
149
|
+
"call-service": "communication",
|
|
150
|
+
"integration/http": "communication",
|
|
151
|
+
"integration/github-get-repo": "communication",
|
|
152
|
+
"integration/github-create-issue": "communication",
|
|
153
|
+
"spawn": "lifecycle",
|
|
154
|
+
"despawn": "lifecycle",
|
|
155
|
+
"do": "control",
|
|
156
|
+
"if": "control",
|
|
157
|
+
"when": "control",
|
|
158
|
+
"let": "control",
|
|
159
|
+
"log": "control",
|
|
160
|
+
"atomic": "control",
|
|
161
|
+
"wait": "async",
|
|
162
|
+
"async/delay": "async",
|
|
163
|
+
"async/debounce": "async",
|
|
164
|
+
"async/throttle": "async",
|
|
165
|
+
"async/interval": "async",
|
|
166
|
+
"async/race": "async",
|
|
167
|
+
"async/all": "async",
|
|
168
|
+
"async/sequence": "async",
|
|
169
|
+
"async/timeout": "async",
|
|
170
|
+
"async/retry": "async",
|
|
171
|
+
"forward": "compute",
|
|
172
|
+
"train": "compute",
|
|
173
|
+
"evaluate": "compute",
|
|
174
|
+
"checkpoint/save": "compute",
|
|
175
|
+
"checkpoint/load": "compute",
|
|
176
|
+
"nn/setWeights": "compute",
|
|
177
|
+
"train/loop": "compute",
|
|
178
|
+
"train/step": "compute",
|
|
179
|
+
"train/clipGradients": "compute",
|
|
180
|
+
"train/clipWeights": "compute",
|
|
181
|
+
"train/sgd": "compute",
|
|
182
|
+
"train/adam": "compute",
|
|
183
|
+
"prob/seed": "compute",
|
|
184
|
+
"prob/condition": "compute",
|
|
185
|
+
"workspace/write-orbital": "system",
|
|
186
|
+
"workspace/write-file": "system",
|
|
187
|
+
"workspace/write-schema": "system",
|
|
188
|
+
"workspace/write-plan": "system",
|
|
189
|
+
"workspace/archive-orbital": "system",
|
|
190
|
+
"lolo/emit-body": "system"
|
|
266
191
|
};
|
|
267
|
-
var
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
192
|
+
var EFFECT_FAMILY_CATEGORY = {
|
|
193
|
+
agent: "system",
|
|
194
|
+
os: "system",
|
|
195
|
+
browser: "system",
|
|
196
|
+
llm: "system",
|
|
197
|
+
behavior: "system",
|
|
198
|
+
validate: "control",
|
|
199
|
+
session: "system",
|
|
200
|
+
compose: "system",
|
|
201
|
+
trace: "control",
|
|
202
|
+
memory: "data",
|
|
203
|
+
application: "system"
|
|
273
204
|
};
|
|
274
|
-
var
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
205
|
+
var EFFECT_OPERATOR_ZONE = {
|
|
206
|
+
"render-ui": "screen",
|
|
207
|
+
"navigate": "route",
|
|
208
|
+
"navigate-back": "route",
|
|
209
|
+
"set": "entity",
|
|
210
|
+
"swap": "entity",
|
|
211
|
+
"ref": "store",
|
|
212
|
+
"deref": "store",
|
|
213
|
+
"watch": "store",
|
|
214
|
+
"persist": "store",
|
|
215
|
+
"fetch": "store",
|
|
216
|
+
"fetch-stream": "store",
|
|
217
|
+
"emit": "bus",
|
|
218
|
+
"send-server": "bus",
|
|
219
|
+
"notify": "toast",
|
|
220
|
+
"call-service": "remote",
|
|
221
|
+
"integration/http": "remote",
|
|
222
|
+
"integration/github-get-repo": "remote",
|
|
223
|
+
"integration/github-create-issue": "remote",
|
|
224
|
+
"spawn": "instances",
|
|
225
|
+
"despawn": "instances",
|
|
226
|
+
"do": "flow",
|
|
227
|
+
"if": "flow",
|
|
228
|
+
"when": "flow",
|
|
229
|
+
"let": "flow",
|
|
230
|
+
"log": "flow",
|
|
231
|
+
"atomic": "flow",
|
|
232
|
+
"wait": "timer",
|
|
233
|
+
"async/delay": "timer",
|
|
234
|
+
"async/debounce": "timer",
|
|
235
|
+
"async/throttle": "timer",
|
|
236
|
+
"async/interval": "timer",
|
|
237
|
+
"async/race": "timer",
|
|
238
|
+
"async/all": "timer",
|
|
239
|
+
"async/sequence": "timer",
|
|
240
|
+
"async/timeout": "timer",
|
|
241
|
+
"async/retry": "timer",
|
|
242
|
+
"forward": "model",
|
|
243
|
+
"train": "model",
|
|
244
|
+
"evaluate": "model",
|
|
245
|
+
"checkpoint/save": "model",
|
|
246
|
+
"checkpoint/load": "model",
|
|
247
|
+
"nn/setWeights": "model",
|
|
248
|
+
"train/loop": "model",
|
|
249
|
+
"train/step": "model",
|
|
250
|
+
"train/clipGradients": "model",
|
|
251
|
+
"train/clipWeights": "model",
|
|
252
|
+
"train/sgd": "model",
|
|
253
|
+
"train/adam": "model",
|
|
254
|
+
"prob/seed": "model",
|
|
255
|
+
"prob/condition": "model",
|
|
256
|
+
"workspace/write-orbital": "system",
|
|
257
|
+
"workspace/write-file": "system",
|
|
258
|
+
"workspace/write-schema": "system",
|
|
259
|
+
"workspace/write-plan": "system",
|
|
260
|
+
"workspace/archive-orbital": "system",
|
|
261
|
+
"lolo/emit-body": "system"
|
|
281
262
|
};
|
|
282
|
-
var
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
onClick,
|
|
295
|
-
onKeyDown,
|
|
296
|
-
role,
|
|
297
|
-
tabIndex,
|
|
298
|
-
action,
|
|
299
|
-
actionPayload,
|
|
300
|
-
responsive = false,
|
|
301
|
-
...rest
|
|
302
|
-
}) => {
|
|
303
|
-
const eventBus = useEventBus();
|
|
304
|
-
const handleClick = (e) => {
|
|
305
|
-
if (action) {
|
|
306
|
-
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
307
|
-
}
|
|
308
|
-
onClick?.(e);
|
|
309
|
-
};
|
|
310
|
-
const isHorizontal = direction === "horizontal";
|
|
311
|
-
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
312
|
-
return React.createElement(
|
|
313
|
-
Component,
|
|
314
|
-
{
|
|
315
|
-
...domPassthrough(rest),
|
|
316
|
-
className: cn(
|
|
317
|
-
"flex",
|
|
318
|
-
directionClass,
|
|
319
|
-
gapStyles[gap],
|
|
320
|
-
alignStyles[align],
|
|
321
|
-
justifyStyles[justify],
|
|
322
|
-
wrap && "flex-wrap",
|
|
323
|
-
flex && "flex-1",
|
|
324
|
-
className
|
|
325
|
-
),
|
|
326
|
-
style,
|
|
327
|
-
onClick: action || onClick ? handleClick : void 0,
|
|
328
|
-
onKeyDown,
|
|
329
|
-
role,
|
|
330
|
-
tabIndex
|
|
331
|
-
},
|
|
332
|
-
children
|
|
333
|
-
);
|
|
263
|
+
var EFFECT_FAMILY_ZONE = {
|
|
264
|
+
agent: "system",
|
|
265
|
+
os: "system",
|
|
266
|
+
browser: "system",
|
|
267
|
+
llm: "remote",
|
|
268
|
+
behavior: "system",
|
|
269
|
+
validate: "flow",
|
|
270
|
+
session: "system",
|
|
271
|
+
compose: "system",
|
|
272
|
+
trace: "flow",
|
|
273
|
+
memory: "store",
|
|
274
|
+
application: "system"
|
|
334
275
|
};
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
var log = createLogger("almadar:ui:theme-color");
|
|
338
|
-
var THEME_SERIES = [
|
|
339
|
-
"var(--color-primary)",
|
|
340
|
-
"var(--color-success)",
|
|
341
|
-
"var(--color-warning)",
|
|
342
|
-
"var(--color-error)",
|
|
343
|
-
"var(--color-info)",
|
|
344
|
-
"var(--color-accent)"
|
|
345
|
-
];
|
|
346
|
-
function channel(value, unitScale) {
|
|
347
|
-
return Math.round(Math.min(255, Math.max(0, Number(value) * unitScale)));
|
|
276
|
+
function isEffectOperator(head) {
|
|
277
|
+
return head in EFFECT_OPERATOR_CATEGORY;
|
|
348
278
|
}
|
|
349
|
-
function
|
|
350
|
-
return
|
|
279
|
+
function isEffectFamily(prefix) {
|
|
280
|
+
return prefix in EFFECT_FAMILY_CATEGORY;
|
|
351
281
|
}
|
|
352
|
-
function
|
|
353
|
-
|
|
354
|
-
const
|
|
355
|
-
if (
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
const rgb = /^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)\s*(?:[,/]\s*([\d.]+)\s*)?\)$/i.exec(v);
|
|
360
|
-
if (rgb) {
|
|
361
|
-
return make(channel(rgb[1], 1), channel(rgb[2], 1), channel(rgb[3], 1), rgb[4] === void 0 ? 1 : Number(rgb[4]));
|
|
362
|
-
}
|
|
363
|
-
const srgb = /^color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*(?:\/\s*([\d.]+)\s*)?\)$/i.exec(v);
|
|
364
|
-
if (srgb) {
|
|
365
|
-
return make(channel(srgb[1], 255), channel(srgb[2], 255), channel(srgb[3], 255), srgb[4] === void 0 ? 1 : Number(srgb[4]));
|
|
282
|
+
function effectCategoryOf(head) {
|
|
283
|
+
if (isEffectOperator(head)) return EFFECT_OPERATOR_CATEGORY[head];
|
|
284
|
+
const slash = head.indexOf("/");
|
|
285
|
+
if (slash > 0) {
|
|
286
|
+
const prefix = head.slice(0, slash);
|
|
287
|
+
if (isEffectFamily(prefix)) return EFFECT_FAMILY_CATEGORY[prefix];
|
|
366
288
|
}
|
|
367
289
|
return null;
|
|
368
290
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
const s = doc.createElement("span");
|
|
372
|
-
s.style.display = "none";
|
|
373
|
-
s.style.color = SENTINEL;
|
|
374
|
-
doc.body.appendChild(s);
|
|
375
|
-
const c = getComputedStyle(s).color;
|
|
376
|
-
doc.body.removeChild(s);
|
|
377
|
-
return c;
|
|
291
|
+
function asEffectOperator(head) {
|
|
292
|
+
return isEffectOperator(head) ? head : null;
|
|
378
293
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
294
|
+
var OPERATOR_CATEGORY_COLORS = {
|
|
295
|
+
"arithmetic": "var(--color-primary)",
|
|
296
|
+
"comparison": "var(--color-warning)",
|
|
297
|
+
"logic": "var(--color-accent)",
|
|
298
|
+
"control": "var(--color-error)",
|
|
299
|
+
"effect": avlBlend("var(--color-warning)", 60, "var(--color-error)"),
|
|
300
|
+
"collection": "var(--color-info)",
|
|
301
|
+
"std-math": "var(--color-primary)",
|
|
302
|
+
"std-str": "var(--color-success)",
|
|
303
|
+
"std-array": "var(--color-info)",
|
|
304
|
+
"std-object": avlBlend("var(--color-info)", 60, "var(--color-foreground)"),
|
|
305
|
+
"std-validate": "var(--color-warning)",
|
|
306
|
+
"std-json": avlBlend("var(--color-success)", 60, "var(--color-foreground)"),
|
|
307
|
+
"std-time": avlBlend("var(--color-info)", 50, "var(--color-success)"),
|
|
308
|
+
"std-format": avlBlend("var(--color-success)", 60, "var(--color-background)"),
|
|
309
|
+
"std-async": avlBlend("var(--color-accent)", 50, "var(--color-error)"),
|
|
310
|
+
"std-nn": avlBlend("var(--color-primary)", 60, "var(--color-accent)"),
|
|
311
|
+
"std-tensor": avlBlend("var(--color-primary)", 60, "var(--color-info)"),
|
|
312
|
+
"std-train": avlBlend("var(--color-primary)", 60, "var(--color-warning)"),
|
|
313
|
+
"std-prob": avlBlend("var(--color-accent)", 60, "var(--color-warning)"),
|
|
314
|
+
"std-os": avlBlend("var(--color-muted-foreground)", 60, "var(--color-primary)"),
|
|
315
|
+
"std-browser": avlBlend("var(--color-muted-foreground)", 60, "var(--color-info)"),
|
|
316
|
+
"std-composition": avlBlend("var(--color-accent)", 60, "var(--color-foreground)"),
|
|
317
|
+
"std-vec": avlBlend("var(--color-primary)", 60, "var(--color-background)"),
|
|
318
|
+
"std-geo": avlBlend("var(--color-success)", 50, "var(--color-info)"),
|
|
319
|
+
"std-grid": avlBlend("var(--color-info)", 60, "var(--color-background)"),
|
|
320
|
+
"std-anim": avlBlend("var(--color-accent)", 60, "var(--color-background)"),
|
|
321
|
+
"std-ease": avlBlend("var(--color-accent)", 50, "var(--color-info)"),
|
|
322
|
+
"std-noise": avlBlend("var(--color-muted-foreground)", 60, "var(--color-accent)"),
|
|
323
|
+
"std-path": avlBlend("var(--color-success)", 60, "var(--color-primary)"),
|
|
324
|
+
"ml-arch": avlBlend("var(--color-primary)", 70, "var(--color-foreground)"),
|
|
325
|
+
"ml-effect": avlBlend("var(--color-primary)", 50, "var(--color-error)"),
|
|
326
|
+
"ml-tensor": avlBlend("var(--color-primary)", 50, "var(--color-info)"),
|
|
327
|
+
"ml-graph": avlBlend("var(--color-primary)", 50, "var(--color-success)"),
|
|
328
|
+
"ml-contract": avlBlend("var(--color-primary)", 50, "var(--color-warning)"),
|
|
329
|
+
"ml-data": avlBlend("var(--color-primary)", 50, "var(--color-background)"),
|
|
330
|
+
"std-llm": avlBlend("var(--color-accent)", 70, "var(--color-primary)"),
|
|
331
|
+
"std-workspace": avlBlend("var(--color-muted-foreground)", 60, "var(--color-warning)"),
|
|
332
|
+
"std-session": avlBlend("var(--color-muted-foreground)", 60, "var(--color-success)"),
|
|
333
|
+
"std-memory": avlBlend("var(--color-info)", 60, "var(--color-accent)"),
|
|
334
|
+
"std-trace": "var(--color-muted-foreground)",
|
|
335
|
+
"std-behavior": avlBlend("var(--color-accent)", 60, "var(--color-success)"),
|
|
336
|
+
"std-integration": avlBlend("var(--color-warning)", 60, "var(--color-info)")
|
|
337
|
+
};
|
|
338
|
+
function effectZoneOf(head) {
|
|
339
|
+
if (isEffectOperator(head)) return EFFECT_OPERATOR_ZONE[head];
|
|
340
|
+
const slash = head.indexOf("/");
|
|
341
|
+
if (slash > 0) {
|
|
342
|
+
const prefix = head.slice(0, slash);
|
|
343
|
+
if (isEffectFamily(prefix)) return EFFECT_FAMILY_ZONE[prefix];
|
|
344
|
+
}
|
|
345
|
+
return null;
|
|
393
346
|
}
|
|
394
347
|
|
|
395
|
-
// lib/
|
|
396
|
-
function
|
|
397
|
-
|
|
348
|
+
// lib/pressable.ts
|
|
349
|
+
function clickElement(el) {
|
|
350
|
+
el.dispatchEvent(new MouseEvent("click", { bubbles: true, cancelable: true }));
|
|
398
351
|
}
|
|
399
|
-
function
|
|
400
|
-
|
|
352
|
+
function pressableProps(onPress, options = {}) {
|
|
353
|
+
if (!onPress) return {};
|
|
354
|
+
const { disabled = false } = options;
|
|
355
|
+
return {
|
|
356
|
+
role: "button",
|
|
357
|
+
tabIndex: disabled ? -1 : 0,
|
|
358
|
+
...disabled ? { "aria-disabled": true } : void 0,
|
|
359
|
+
onClick: (e) => {
|
|
360
|
+
if (!disabled) onPress(e);
|
|
361
|
+
},
|
|
362
|
+
onKeyDown: (e) => {
|
|
363
|
+
if (disabled || e.target !== e.currentTarget) return;
|
|
364
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
365
|
+
e.preventDefault();
|
|
366
|
+
clickElement(e.currentTarget);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
};
|
|
401
370
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
371
|
+
function rowOpenControlProps(enabled) {
|
|
372
|
+
if (!enabled) return {};
|
|
373
|
+
return {
|
|
374
|
+
role: "button",
|
|
375
|
+
tabIndex: 0,
|
|
376
|
+
onKeyDown: (e) => {
|
|
377
|
+
if (e.target !== e.currentTarget || e.key !== "Enter" && e.key !== " ") return;
|
|
378
|
+
e.preventDefault();
|
|
379
|
+
clickElement(e.currentTarget);
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
var STRETCHED_CONTROL = "after:absolute after:inset-0 after:content-[''] after:rounded-[inherit] focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-primary focus-visible:after:ring-inset";
|
|
384
|
+
var STRETCHED_ABOVE = "relative z-[1]";
|
|
385
|
+
|
|
386
|
+
// components/core/atoms/Box.tsx
|
|
387
|
+
var paddingStyles = {
|
|
388
|
+
none: "p-0",
|
|
389
|
+
xs: "p-1",
|
|
390
|
+
sm: "p-2",
|
|
391
|
+
md: "p-4",
|
|
392
|
+
lg: "p-6",
|
|
393
|
+
xl: "p-8",
|
|
394
|
+
"2xl": "p-12"
|
|
395
|
+
};
|
|
396
|
+
var paddingXStyles = {
|
|
397
|
+
none: "px-0",
|
|
398
|
+
xs: "px-1",
|
|
399
|
+
sm: "px-2",
|
|
400
|
+
md: "px-4",
|
|
401
|
+
lg: "px-6",
|
|
402
|
+
xl: "px-8",
|
|
403
|
+
"2xl": "px-12"
|
|
414
404
|
};
|
|
415
|
-
var
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
405
|
+
var paddingYStyles = {
|
|
406
|
+
none: "py-0",
|
|
407
|
+
xs: "py-1",
|
|
408
|
+
sm: "py-2",
|
|
409
|
+
md: "py-4",
|
|
410
|
+
lg: "py-6",
|
|
411
|
+
xl: "py-8",
|
|
412
|
+
"2xl": "py-12"
|
|
419
413
|
};
|
|
420
|
-
var
|
|
421
|
-
|
|
422
|
-
|
|
414
|
+
var marginStyles = {
|
|
415
|
+
none: "m-0",
|
|
416
|
+
xs: "m-1",
|
|
417
|
+
sm: "m-2",
|
|
418
|
+
md: "m-4",
|
|
419
|
+
lg: "m-6",
|
|
420
|
+
xl: "m-8",
|
|
421
|
+
"2xl": "m-12",
|
|
422
|
+
auto: "m-auto"
|
|
423
423
|
};
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
hub: { fill: avlTint("var(--color-info)", 12), border: "var(--color-info)" },
|
|
434
|
-
default: { fill: avlTint("var(--color-muted-foreground)", 8), border: "var(--color-muted-foreground)" }
|
|
424
|
+
var marginXStyles = {
|
|
425
|
+
none: "mx-0",
|
|
426
|
+
xs: "mx-1",
|
|
427
|
+
sm: "mx-2",
|
|
428
|
+
md: "mx-4",
|
|
429
|
+
lg: "mx-6",
|
|
430
|
+
xl: "mx-8",
|
|
431
|
+
"2xl": "mx-12",
|
|
432
|
+
auto: "mx-auto"
|
|
435
433
|
};
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
selfLoop: { color: "var(--color-muted-foreground)", width: 1, dash: "3 2" },
|
|
446
|
-
emitListen: { color: "var(--color-warning)", width: 1.5, dash: "4 3" }
|
|
434
|
+
var marginYStyles = {
|
|
435
|
+
none: "my-0",
|
|
436
|
+
xs: "my-1",
|
|
437
|
+
sm: "my-2",
|
|
438
|
+
md: "my-4",
|
|
439
|
+
lg: "my-6",
|
|
440
|
+
xl: "my-8",
|
|
441
|
+
"2xl": "my-12",
|
|
442
|
+
auto: "my-auto"
|
|
447
443
|
};
|
|
448
|
-
var
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
system: { color: avlBlend("var(--color-muted-foreground)", 60, "var(--color-primary)"), bg: avlTint("var(--color-muted-foreground)", 10) }
|
|
444
|
+
var bgStyles = {
|
|
445
|
+
transparent: "bg-transparent",
|
|
446
|
+
primary: "bg-primary text-primary-foreground",
|
|
447
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
448
|
+
muted: "bg-muted text-foreground",
|
|
449
|
+
accent: "bg-accent text-accent-foreground",
|
|
450
|
+
surface: "bg-card",
|
|
451
|
+
overlay: "bg-card/80 backdrop-blur-sm"
|
|
457
452
|
};
|
|
458
|
-
var
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
"
|
|
465
|
-
|
|
466
|
-
"ref": "data",
|
|
467
|
-
"deref": "data",
|
|
468
|
-
"swap": "data",
|
|
469
|
-
"watch": "data",
|
|
470
|
-
"emit": "communication",
|
|
471
|
-
"notify": "communication",
|
|
472
|
-
"send-server": "communication",
|
|
473
|
-
"call-service": "communication",
|
|
474
|
-
"integration/http": "communication",
|
|
475
|
-
"integration/github-get-repo": "communication",
|
|
476
|
-
"integration/github-create-issue": "communication",
|
|
477
|
-
"spawn": "lifecycle",
|
|
478
|
-
"despawn": "lifecycle",
|
|
479
|
-
"do": "control",
|
|
480
|
-
"if": "control",
|
|
481
|
-
"when": "control",
|
|
482
|
-
"let": "control",
|
|
483
|
-
"log": "control",
|
|
484
|
-
"atomic": "control",
|
|
485
|
-
"wait": "async",
|
|
486
|
-
"async/delay": "async",
|
|
487
|
-
"async/debounce": "async",
|
|
488
|
-
"async/throttle": "async",
|
|
489
|
-
"async/interval": "async",
|
|
490
|
-
"async/race": "async",
|
|
491
|
-
"async/all": "async",
|
|
492
|
-
"async/sequence": "async",
|
|
493
|
-
"async/timeout": "async",
|
|
494
|
-
"async/retry": "async",
|
|
495
|
-
"forward": "compute",
|
|
496
|
-
"train": "compute",
|
|
497
|
-
"evaluate": "compute",
|
|
498
|
-
"checkpoint/save": "compute",
|
|
499
|
-
"checkpoint/load": "compute",
|
|
500
|
-
"nn/setWeights": "compute",
|
|
501
|
-
"train/loop": "compute",
|
|
502
|
-
"train/step": "compute",
|
|
503
|
-
"train/clipGradients": "compute",
|
|
504
|
-
"train/clipWeights": "compute",
|
|
505
|
-
"train/sgd": "compute",
|
|
506
|
-
"train/adam": "compute",
|
|
507
|
-
"prob/seed": "compute",
|
|
508
|
-
"prob/condition": "compute",
|
|
509
|
-
"workspace/write-orbital": "system",
|
|
510
|
-
"workspace/write-file": "system",
|
|
511
|
-
"workspace/write-schema": "system",
|
|
512
|
-
"workspace/write-plan": "system",
|
|
513
|
-
"workspace/archive-orbital": "system",
|
|
514
|
-
"lolo/emit-body": "system"
|
|
453
|
+
var roundedStyles = {
|
|
454
|
+
none: "rounded-none",
|
|
455
|
+
sm: "rounded-sm",
|
|
456
|
+
md: "rounded-md",
|
|
457
|
+
lg: "rounded-lg",
|
|
458
|
+
xl: "rounded-xl",
|
|
459
|
+
"2xl": "rounded-xl",
|
|
460
|
+
full: "rounded-full"
|
|
515
461
|
};
|
|
516
|
-
var
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
462
|
+
var shadowStyles = {
|
|
463
|
+
none: "shadow-none",
|
|
464
|
+
sm: "shadow-sm",
|
|
465
|
+
md: "shadow",
|
|
466
|
+
lg: "shadow-lg",
|
|
467
|
+
xl: "shadow-lg"
|
|
468
|
+
};
|
|
469
|
+
var displayStyles = {
|
|
470
|
+
block: "block",
|
|
471
|
+
inline: "inline",
|
|
472
|
+
"inline-block": "inline-block",
|
|
473
|
+
flex: "flex",
|
|
474
|
+
"inline-flex": "inline-flex",
|
|
475
|
+
grid: "grid"
|
|
476
|
+
};
|
|
477
|
+
var overflowStyles = {
|
|
478
|
+
auto: "overflow-auto",
|
|
479
|
+
hidden: "overflow-hidden",
|
|
480
|
+
visible: "overflow-visible",
|
|
481
|
+
scroll: "overflow-scroll"
|
|
482
|
+
};
|
|
483
|
+
var positionStyles = {
|
|
484
|
+
relative: "relative",
|
|
485
|
+
absolute: "absolute",
|
|
486
|
+
fixed: "fixed",
|
|
487
|
+
sticky: "sticky"
|
|
488
|
+
};
|
|
489
|
+
var Box = React.forwardRef(
|
|
490
|
+
({
|
|
491
|
+
padding,
|
|
492
|
+
paddingX,
|
|
493
|
+
paddingY,
|
|
494
|
+
margin,
|
|
495
|
+
marginX,
|
|
496
|
+
marginY,
|
|
497
|
+
bg = "transparent",
|
|
498
|
+
border = false,
|
|
499
|
+
rounded = "none",
|
|
500
|
+
shadow = "none",
|
|
501
|
+
display,
|
|
502
|
+
fullWidth = false,
|
|
503
|
+
fullHeight = false,
|
|
504
|
+
overflow,
|
|
505
|
+
position,
|
|
506
|
+
className,
|
|
507
|
+
children,
|
|
508
|
+
as: Component = "div",
|
|
509
|
+
action,
|
|
510
|
+
actionPayload,
|
|
511
|
+
hoverEvent,
|
|
512
|
+
tapReveal = true,
|
|
513
|
+
maxWidth,
|
|
514
|
+
onClick,
|
|
515
|
+
onMouseEnter,
|
|
516
|
+
onMouseLeave,
|
|
517
|
+
onPointerDown,
|
|
518
|
+
...rest
|
|
519
|
+
}, ref) => {
|
|
520
|
+
const eventBus = useEventBus();
|
|
521
|
+
const { override: themeOverride } = useThemeScope();
|
|
522
|
+
const declaredTheme = rest["data-theme"];
|
|
523
|
+
const dataTheme = declaredTheme !== void 0 && themeOverride ? themeOverride : declaredTheme;
|
|
524
|
+
const handleClick = useCallback((e) => {
|
|
525
|
+
if (action) {
|
|
526
|
+
e.stopPropagation();
|
|
527
|
+
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
528
|
+
}
|
|
529
|
+
onClick?.(e);
|
|
530
|
+
}, [action, actionPayload, eventBus, onClick]);
|
|
531
|
+
const handleMouseEnter = useCallback((e) => {
|
|
532
|
+
if (hoverEvent) {
|
|
533
|
+
eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
|
|
534
|
+
}
|
|
535
|
+
onMouseEnter?.(e);
|
|
536
|
+
}, [hoverEvent, eventBus, onMouseEnter]);
|
|
537
|
+
const handleMouseLeave = useCallback((e) => {
|
|
538
|
+
if (hoverEvent) {
|
|
539
|
+
eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
|
|
540
|
+
}
|
|
541
|
+
onMouseLeave?.(e);
|
|
542
|
+
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
543
|
+
const { triggerProps } = useTapReveal({
|
|
544
|
+
enabled: tapReveal && !!hoverEvent,
|
|
545
|
+
onReveal: useCallback(() => {
|
|
546
|
+
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
|
|
547
|
+
}, [hoverEvent, eventBus]),
|
|
548
|
+
onDismiss: useCallback(() => {
|
|
549
|
+
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
|
|
550
|
+
}, [hoverEvent, eventBus])
|
|
551
|
+
});
|
|
552
|
+
const handlePointerDown = useCallback((e) => {
|
|
553
|
+
if (hoverEvent && tapReveal) triggerProps.onPointerDown(e);
|
|
554
|
+
onPointerDown?.(e);
|
|
555
|
+
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
556
|
+
const isClickable = action || onClick;
|
|
557
|
+
const actionControl = action && rest.role === void 0 && rest.tabIndex === void 0 ? pressableProps(handleClick) : {};
|
|
558
|
+
return React.createElement(
|
|
559
|
+
Component,
|
|
560
|
+
{
|
|
561
|
+
ref,
|
|
562
|
+
className: cn(
|
|
563
|
+
padding && paddingStyles[padding],
|
|
564
|
+
paddingX && paddingXStyles[paddingX],
|
|
565
|
+
paddingY && paddingYStyles[paddingY],
|
|
566
|
+
margin && marginStyles[margin],
|
|
567
|
+
marginX && marginXStyles[marginX],
|
|
568
|
+
marginY && marginYStyles[marginY],
|
|
569
|
+
bgStyles[bg],
|
|
570
|
+
border && "border-[length:var(--border-width)] border-border",
|
|
571
|
+
roundedStyles[rounded],
|
|
572
|
+
shadowStyles[shadow],
|
|
573
|
+
display && displayStyles[display],
|
|
574
|
+
fullWidth && "w-full",
|
|
575
|
+
fullHeight && "h-full",
|
|
576
|
+
overflow && overflowStyles[overflow],
|
|
577
|
+
position && positionStyles[position],
|
|
578
|
+
isClickable && "cursor-pointer",
|
|
579
|
+
className
|
|
580
|
+
),
|
|
581
|
+
onClick: isClickable ? handleClick : void 0,
|
|
582
|
+
...actionControl,
|
|
583
|
+
onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
|
|
584
|
+
onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
|
|
585
|
+
onPointerDown: hoverEvent && tapReveal || onPointerDown ? handlePointerDown : void 0,
|
|
586
|
+
style: maxWidth ? { maxWidth, ...rest.style } : rest.style,
|
|
587
|
+
...rest,
|
|
588
|
+
"data-theme": dataTheme
|
|
589
|
+
},
|
|
590
|
+
children
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
);
|
|
594
|
+
Box.displayName = "Box";
|
|
595
|
+
var gapStyles = {
|
|
596
|
+
none: "gap-0",
|
|
597
|
+
xs: "gap-1",
|
|
598
|
+
sm: "gap-2",
|
|
599
|
+
md: "gap-4",
|
|
600
|
+
lg: "gap-6",
|
|
601
|
+
xl: "gap-8",
|
|
602
|
+
"2xl": "gap-12"
|
|
528
603
|
};
|
|
529
|
-
var
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
"ref": "store",
|
|
536
|
-
"deref": "store",
|
|
537
|
-
"watch": "store",
|
|
538
|
-
"persist": "store",
|
|
539
|
-
"fetch": "store",
|
|
540
|
-
"fetch-stream": "store",
|
|
541
|
-
"emit": "bus",
|
|
542
|
-
"send-server": "bus",
|
|
543
|
-
"notify": "toast",
|
|
544
|
-
"call-service": "remote",
|
|
545
|
-
"integration/http": "remote",
|
|
546
|
-
"integration/github-get-repo": "remote",
|
|
547
|
-
"integration/github-create-issue": "remote",
|
|
548
|
-
"spawn": "instances",
|
|
549
|
-
"despawn": "instances",
|
|
550
|
-
"do": "flow",
|
|
551
|
-
"if": "flow",
|
|
552
|
-
"when": "flow",
|
|
553
|
-
"let": "flow",
|
|
554
|
-
"log": "flow",
|
|
555
|
-
"atomic": "flow",
|
|
556
|
-
"wait": "timer",
|
|
557
|
-
"async/delay": "timer",
|
|
558
|
-
"async/debounce": "timer",
|
|
559
|
-
"async/throttle": "timer",
|
|
560
|
-
"async/interval": "timer",
|
|
561
|
-
"async/race": "timer",
|
|
562
|
-
"async/all": "timer",
|
|
563
|
-
"async/sequence": "timer",
|
|
564
|
-
"async/timeout": "timer",
|
|
565
|
-
"async/retry": "timer",
|
|
566
|
-
"forward": "model",
|
|
567
|
-
"train": "model",
|
|
568
|
-
"evaluate": "model",
|
|
569
|
-
"checkpoint/save": "model",
|
|
570
|
-
"checkpoint/load": "model",
|
|
571
|
-
"nn/setWeights": "model",
|
|
572
|
-
"train/loop": "model",
|
|
573
|
-
"train/step": "model",
|
|
574
|
-
"train/clipGradients": "model",
|
|
575
|
-
"train/clipWeights": "model",
|
|
576
|
-
"train/sgd": "model",
|
|
577
|
-
"train/adam": "model",
|
|
578
|
-
"prob/seed": "model",
|
|
579
|
-
"prob/condition": "model",
|
|
580
|
-
"workspace/write-orbital": "system",
|
|
581
|
-
"workspace/write-file": "system",
|
|
582
|
-
"workspace/write-schema": "system",
|
|
583
|
-
"workspace/write-plan": "system",
|
|
584
|
-
"workspace/archive-orbital": "system",
|
|
585
|
-
"lolo/emit-body": "system"
|
|
604
|
+
var alignStyles = {
|
|
605
|
+
start: "items-start",
|
|
606
|
+
center: "items-center",
|
|
607
|
+
end: "items-end",
|
|
608
|
+
stretch: "items-stretch",
|
|
609
|
+
baseline: "items-baseline"
|
|
586
610
|
};
|
|
587
|
-
var
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
session: "system",
|
|
595
|
-
compose: "system",
|
|
596
|
-
trace: "flow",
|
|
597
|
-
memory: "store",
|
|
598
|
-
application: "system"
|
|
611
|
+
var justifyStyles = {
|
|
612
|
+
start: "justify-start",
|
|
613
|
+
center: "justify-center",
|
|
614
|
+
end: "justify-end",
|
|
615
|
+
between: "justify-between",
|
|
616
|
+
around: "justify-around",
|
|
617
|
+
evenly: "justify-evenly"
|
|
599
618
|
};
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
"
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
"ml-contract": avlBlend("var(--color-primary)", 50, "var(--color-warning)"),
|
|
653
|
-
"ml-data": avlBlend("var(--color-primary)", 50, "var(--color-background)"),
|
|
654
|
-
"std-llm": avlBlend("var(--color-accent)", 70, "var(--color-primary)"),
|
|
655
|
-
"std-workspace": avlBlend("var(--color-muted-foreground)", 60, "var(--color-warning)"),
|
|
656
|
-
"std-session": avlBlend("var(--color-muted-foreground)", 60, "var(--color-success)"),
|
|
657
|
-
"std-memory": avlBlend("var(--color-info)", 60, "var(--color-accent)"),
|
|
658
|
-
"std-trace": "var(--color-muted-foreground)",
|
|
659
|
-
"std-behavior": avlBlend("var(--color-accent)", 60, "var(--color-success)"),
|
|
660
|
-
"std-integration": avlBlend("var(--color-warning)", 60, "var(--color-info)")
|
|
619
|
+
var Stack = ({
|
|
620
|
+
direction = "vertical",
|
|
621
|
+
gap = "md",
|
|
622
|
+
align = "stretch",
|
|
623
|
+
justify = "start",
|
|
624
|
+
wrap = false,
|
|
625
|
+
reverse = false,
|
|
626
|
+
flex = false,
|
|
627
|
+
className,
|
|
628
|
+
style,
|
|
629
|
+
children,
|
|
630
|
+
as: Component = "div",
|
|
631
|
+
onClick,
|
|
632
|
+
onKeyDown,
|
|
633
|
+
role,
|
|
634
|
+
tabIndex,
|
|
635
|
+
action,
|
|
636
|
+
actionPayload,
|
|
637
|
+
responsive = false,
|
|
638
|
+
...rest
|
|
639
|
+
}) => {
|
|
640
|
+
const eventBus = useEventBus();
|
|
641
|
+
const handleClick = (e) => {
|
|
642
|
+
if (action) {
|
|
643
|
+
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
644
|
+
}
|
|
645
|
+
onClick?.(e);
|
|
646
|
+
};
|
|
647
|
+
const isHorizontal = direction === "horizontal";
|
|
648
|
+
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
649
|
+
return React.createElement(
|
|
650
|
+
Component,
|
|
651
|
+
{
|
|
652
|
+
...domPassthrough(rest),
|
|
653
|
+
className: cn(
|
|
654
|
+
"flex",
|
|
655
|
+
directionClass,
|
|
656
|
+
gapStyles[gap],
|
|
657
|
+
alignStyles[align],
|
|
658
|
+
justifyStyles[justify],
|
|
659
|
+
wrap && "flex-wrap",
|
|
660
|
+
flex && "flex-1",
|
|
661
|
+
className
|
|
662
|
+
),
|
|
663
|
+
style,
|
|
664
|
+
onClick: action || onClick ? handleClick : void 0,
|
|
665
|
+
onKeyDown,
|
|
666
|
+
role,
|
|
667
|
+
tabIndex
|
|
668
|
+
},
|
|
669
|
+
children
|
|
670
|
+
);
|
|
661
671
|
};
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
const slash = head.indexOf("/");
|
|
665
|
-
if (slash > 0) {
|
|
666
|
-
const prefix = head.slice(0, slash);
|
|
667
|
-
if (isEffectFamily(prefix)) return EFFECT_FAMILY_ZONE[prefix];
|
|
668
|
-
}
|
|
669
|
-
return null;
|
|
670
|
-
}
|
|
672
|
+
var VStack = (props) => /* @__PURE__ */ jsx(Stack, { direction: "vertical", ...props });
|
|
673
|
+
var HStack = (props) => /* @__PURE__ */ jsx(Stack, { direction: "horizontal", ...props });
|
|
671
674
|
function instanceOf(orbital, orbitalId, ref) {
|
|
672
675
|
const at = orbitalId === void 0 ? { orbital } : { orbital, orbitalId };
|
|
673
676
|
if (isInlineTrait(ref)) return { ...at, name: ref.name, trait: ref };
|
|
@@ -1996,4 +1999,4 @@ function rotatePoint(p, center, radians) {
|
|
|
1996
1999
|
return { x: center.x + dx * cos - dy * sin, y: center.y + dx * sin + dy * cos };
|
|
1997
2000
|
}
|
|
1998
2001
|
|
|
1999
|
-
export { AVL_FONT, AVL_INK, AVL_STROKE, Box, CONFETTI_BURST_KEYFRAMES, CONNECTION_COLORS, DrawFxLayer, DrawGroup, DrawMesh, DrawShape, DrawSkinnedMesh, DrawableRegistryContext, EFFECT_CATEGORY_COLORS, HStack, OPERATOR_CATEGORY_COLORS, SPRITE_FALLBACK_FILL, SPRITE_FALLBACK_STROKE, STATE_COLORS, Stack, THEME_SERIES, VStack, applyMeshAnimation, applyShapeAnimation, asEffectOperator, atlasFailed, atlasUrlOf, avlBlend, avlSeries, avlTint, blit, buildHitIndex, clampSegments, collectDrawnItems, createConfettiParticles, effectCategoryOf, effectZoneOf, expandFxLayer, fxHash01, getAtlas, getImageStatus, getOrLoadImage, getStateRole, hitTestSprites, isAnimatedGroup, isAnimatedMesh, isAnimatedShape, isAtlasAsset, isSpriteSheetAtlas, isValidScenePos, paintShape, paintSkinnedMesh, parseApplicationLevel, parseOrbitalLevel, parseTraitLevel, parseTransitionLevel, polyhedronBounds, pressableProps, resolveAssetSource, resolveThemeColor,
|
|
2002
|
+
export { AVL_FONT, AVL_INK, AVL_STROKE, Box, CONFETTI_BURST_KEYFRAMES, CONNECTION_COLORS, DrawFxLayer, DrawGroup, DrawMesh, DrawShape, DrawSkinnedMesh, DrawableRegistryContext, EFFECT_CATEGORY_COLORS, HStack, OPERATOR_CATEGORY_COLORS, SPRITE_FALLBACK_FILL, SPRITE_FALLBACK_STROKE, STATE_COLORS, STRETCHED_ABOVE, STRETCHED_CONTROL, Stack, THEME_SERIES, VStack, applyMeshAnimation, applyShapeAnimation, asEffectOperator, atlasFailed, atlasUrlOf, avlBlend, avlSeries, avlTint, blit, buildHitIndex, clampSegments, collectDrawnItems, createConfettiParticles, effectCategoryOf, effectZoneOf, expandFxLayer, fxHash01, getAtlas, getImageStatus, getOrLoadImage, getStateRole, hitTestSprites, isAnimatedGroup, isAnimatedMesh, isAnimatedShape, isAtlasAsset, isSpriteSheetAtlas, isValidScenePos, paintShape, paintSkinnedMesh, parseApplicationLevel, parseOrbitalLevel, parseTraitLevel, parseTransitionLevel, polyhedronBounds, pressableProps, resolveAssetSource, resolveThemeColor, rowOpenControlProps, spriteAssetState, spriteRect, subRectFor, traitEventWires, traitLevelFromTrait, traitTransitionRenderUi, withPreviewPosition };
|