@almadar/ui 6.26.0 → 6.28.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.
- package/dist/{EntityBindingContext-CTZw2DbY.d.cts → EntityBindingContext-C6FgxdfG.d.cts} +16 -3
- package/dist/{EntityBindingContext-CTZw2DbY.d.ts → EntityBindingContext-C6FgxdfG.d.ts} +16 -3
- package/dist/avl/index.cjs +264 -8
- package/dist/avl/index.js +264 -8
- package/dist/components/index.cjs +247 -2
- package/dist/components/index.d.cts +72 -1
- package/dist/components/index.d.ts +72 -1
- package/dist/components/index.js +246 -2
- package/dist/providers/index.cjs +248 -4
- package/dist/providers/index.d.cts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +248 -4
- package/dist/runtime/index.cjs +264 -8
- package/dist/runtime/index.d.cts +2 -2
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js +264 -8
- package/package.json +5 -5
package/dist/runtime/index.cjs
CHANGED
|
@@ -32045,6 +32045,247 @@ var init_WizardNavigation = __esm({
|
|
|
32045
32045
|
WizardNavigation.displayName = "WizardNavigation";
|
|
32046
32046
|
}
|
|
32047
32047
|
});
|
|
32048
|
+
function parseDay(value) {
|
|
32049
|
+
if (value === void 0 || value === null || value === "") return null;
|
|
32050
|
+
const d = value instanceof Date ? new Date(value.getTime()) : new Date(value);
|
|
32051
|
+
if (Number.isNaN(d.getTime())) return null;
|
|
32052
|
+
d.setHours(0, 0, 0, 0);
|
|
32053
|
+
return d;
|
|
32054
|
+
}
|
|
32055
|
+
function Gantt({
|
|
32056
|
+
tasks = [],
|
|
32057
|
+
links = [],
|
|
32058
|
+
titleField = "title",
|
|
32059
|
+
startField = "start",
|
|
32060
|
+
endField = "end",
|
|
32061
|
+
durationField,
|
|
32062
|
+
statusField = "status",
|
|
32063
|
+
groupField = "",
|
|
32064
|
+
rangeStart,
|
|
32065
|
+
rangeEnd,
|
|
32066
|
+
showToday = true,
|
|
32067
|
+
dayWidth = 28,
|
|
32068
|
+
barClickEvent,
|
|
32069
|
+
className,
|
|
32070
|
+
isLoading = false,
|
|
32071
|
+
error = null
|
|
32072
|
+
}) {
|
|
32073
|
+
const { t } = hooks.useTranslate();
|
|
32074
|
+
const placed = React87.useMemo(() => {
|
|
32075
|
+
const rows = Array.isArray(tasks) ? tasks : tasks ? [tasks] : [];
|
|
32076
|
+
const out = [];
|
|
32077
|
+
rows.forEach((row, idx) => {
|
|
32078
|
+
const start = parseDay(core.getNestedValue(row, startField));
|
|
32079
|
+
if (!start) return;
|
|
32080
|
+
let end = parseDay(core.getNestedValue(row, endField));
|
|
32081
|
+
if (!end && durationField) {
|
|
32082
|
+
const days2 = Number(core.getNestedValue(row, durationField));
|
|
32083
|
+
if (Number.isFinite(days2) && days2 > 0) {
|
|
32084
|
+
end = new Date(start.getTime() + days2 * DAY_MS);
|
|
32085
|
+
}
|
|
32086
|
+
}
|
|
32087
|
+
if (!end || end.getTime() < start.getTime()) end = new Date(start.getTime() + DAY_MS);
|
|
32088
|
+
out.push({
|
|
32089
|
+
row,
|
|
32090
|
+
id: String(row.id ?? idx),
|
|
32091
|
+
label: String(core.getNestedValue(row, titleField) ?? ""),
|
|
32092
|
+
status: String(core.getNestedValue(row, statusField) ?? "").toLowerCase(),
|
|
32093
|
+
group: groupField ? String(core.getNestedValue(row, groupField) ?? "") : "",
|
|
32094
|
+
start,
|
|
32095
|
+
end
|
|
32096
|
+
});
|
|
32097
|
+
});
|
|
32098
|
+
return out;
|
|
32099
|
+
}, [tasks, titleField, startField, endField, durationField, statusField, groupField]);
|
|
32100
|
+
const [axisStart, axisEnd] = React87.useMemo(() => {
|
|
32101
|
+
const lo = parseDay(rangeStart) ?? (placed.length ? new Date(Math.min(...placed.map((p) => p.start.getTime())) - 2 * DAY_MS) : new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)));
|
|
32102
|
+
const hi = parseDay(rangeEnd) ?? (placed.length ? new Date(Math.max(...placed.map((p) => p.end.getTime())) + 2 * DAY_MS) : new Date(lo.getTime() + 30 * DAY_MS));
|
|
32103
|
+
return hi.getTime() > lo.getTime() ? [lo, hi] : [lo, new Date(lo.getTime() + DAY_MS)];
|
|
32104
|
+
}, [rangeStart, rangeEnd, placed]);
|
|
32105
|
+
const totalDays = Math.round((axisEnd.getTime() - axisStart.getTime()) / DAY_MS);
|
|
32106
|
+
const chartWidth = totalDays * dayWidth;
|
|
32107
|
+
const dayOffset = (d) => (d.getTime() - axisStart.getTime()) / DAY_MS * dayWidth;
|
|
32108
|
+
const displayItems = React87.useMemo(() => {
|
|
32109
|
+
if (!groupField) return placed.map((task) => ({ kind: "task", task }));
|
|
32110
|
+
const items = [];
|
|
32111
|
+
const seen = /* @__PURE__ */ new Set();
|
|
32112
|
+
for (const task of placed) {
|
|
32113
|
+
if (!seen.has(task.group)) {
|
|
32114
|
+
seen.add(task.group);
|
|
32115
|
+
items.push({ kind: "group", label: task.group || "\u2014" });
|
|
32116
|
+
}
|
|
32117
|
+
items.push({ kind: "task", task });
|
|
32118
|
+
}
|
|
32119
|
+
return items;
|
|
32120
|
+
}, [placed, groupField]);
|
|
32121
|
+
const barGeometry = React87.useMemo(() => {
|
|
32122
|
+
const offset = (d) => (d.getTime() - axisStart.getTime()) / DAY_MS * dayWidth;
|
|
32123
|
+
const map = /* @__PURE__ */ new Map();
|
|
32124
|
+
displayItems.forEach((item, idx) => {
|
|
32125
|
+
if (item.kind !== "task") return;
|
|
32126
|
+
const x0 = offset(item.task.start);
|
|
32127
|
+
const x1 = Math.max(offset(item.task.end), x0 + dayWidth / 2);
|
|
32128
|
+
map.set(item.task.id, { x0, x1, y: HEADER_HEIGHT + idx * ROW_HEIGHT + ROW_HEIGHT / 2 });
|
|
32129
|
+
});
|
|
32130
|
+
return map;
|
|
32131
|
+
}, [displayItems, axisStart, dayWidth]);
|
|
32132
|
+
const days = React87.useMemo(() => {
|
|
32133
|
+
const out = [];
|
|
32134
|
+
for (let i = 0; i < totalDays; i++) out.push(new Date(axisStart.getTime() + i * DAY_MS));
|
|
32135
|
+
return out;
|
|
32136
|
+
}, [axisStart, totalDays]);
|
|
32137
|
+
const todayOffset = React87.useMemo(() => {
|
|
32138
|
+
const today = parseDay(/* @__PURE__ */ new Date());
|
|
32139
|
+
if (!today || today < axisStart || today > axisEnd) return null;
|
|
32140
|
+
return (today.getTime() - axisStart.getTime()) / DAY_MS * dayWidth;
|
|
32141
|
+
}, [axisStart, axisEnd, dayWidth]);
|
|
32142
|
+
if (isLoading) {
|
|
32143
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LoadingState, { message: t("common.loading"), className });
|
|
32144
|
+
}
|
|
32145
|
+
if (error) {
|
|
32146
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("p-4", className), children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "error", children: error.message }) });
|
|
32147
|
+
}
|
|
32148
|
+
if (placed.length === 0) {
|
|
32149
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32150
|
+
EmptyState,
|
|
32151
|
+
{
|
|
32152
|
+
title: t("empty.noData"),
|
|
32153
|
+
className
|
|
32154
|
+
}
|
|
32155
|
+
);
|
|
32156
|
+
}
|
|
32157
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32158
|
+
Box,
|
|
32159
|
+
{
|
|
32160
|
+
className: cn("w-full overflow-auto rounded-md border border-border bg-card", className),
|
|
32161
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "relative", style: { width: LABEL_WIDTH + chartWidth, minWidth: "100%" }, children: [
|
|
32162
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "none", className: "sticky top-0 z-20 bg-card border-b border-border", style: { height: HEADER_HEIGHT }, children: [
|
|
32163
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "sticky left-0 z-10 shrink-0 bg-card border-r border-border", style: { width: LABEL_WIDTH, height: HEADER_HEIGHT } }),
|
|
32164
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative", style: { width: chartWidth, height: HEADER_HEIGHT }, children: days.map((day, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
32165
|
+
Box,
|
|
32166
|
+
{
|
|
32167
|
+
className: cn(
|
|
32168
|
+
"absolute top-0 bottom-0 border-l border-border/50 flex items-end justify-center pb-1",
|
|
32169
|
+
day.getDay() === 0 || day.getDay() === 6 ? "bg-muted/40" : void 0
|
|
32170
|
+
),
|
|
32171
|
+
style: { left: i * dayWidth, width: dayWidth },
|
|
32172
|
+
children: dayWidth >= 20 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "secondary", children: day.getDate() })
|
|
32173
|
+
},
|
|
32174
|
+
i
|
|
32175
|
+
)) })
|
|
32176
|
+
] }),
|
|
32177
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "relative", children: [
|
|
32178
|
+
displayItems.map(
|
|
32179
|
+
(item, idx) => item.kind === "group" ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32180
|
+
HStack,
|
|
32181
|
+
{
|
|
32182
|
+
gap: "none",
|
|
32183
|
+
className: "border-b border-border bg-muted/30",
|
|
32184
|
+
style: { height: ROW_HEIGHT },
|
|
32185
|
+
children: [
|
|
32186
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "sticky left-0 z-10 shrink-0 bg-muted/30 px-3 flex items-center border-r border-border", style: { width: LABEL_WIDTH, height: ROW_HEIGHT }, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", weight: "semibold", children: item.label }) }),
|
|
32187
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { style: { width: chartWidth, height: ROW_HEIGHT } })
|
|
32188
|
+
]
|
|
32189
|
+
},
|
|
32190
|
+
`g-${idx}`
|
|
32191
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32192
|
+
HStack,
|
|
32193
|
+
{
|
|
32194
|
+
gap: "none",
|
|
32195
|
+
className: "border-b border-border/50",
|
|
32196
|
+
style: { height: ROW_HEIGHT },
|
|
32197
|
+
children: [
|
|
32198
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "sticky left-0 z-10 shrink-0 bg-card px-3 flex items-center border-r border-border", style: { width: LABEL_WIDTH, height: ROW_HEIGHT }, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "truncate", children: item.task.label }) }),
|
|
32199
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative", style: { width: chartWidth, height: ROW_HEIGHT }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32200
|
+
Box,
|
|
32201
|
+
{
|
|
32202
|
+
className: cn(
|
|
32203
|
+
"absolute top-1/2 -translate-y-1/2 h-4 rounded-sm transition-colors",
|
|
32204
|
+
STATUS_BAR[item.task.status] ?? "bg-primary/80 hover:bg-primary",
|
|
32205
|
+
barClickEvent ? "cursor-pointer" : void 0
|
|
32206
|
+
),
|
|
32207
|
+
style: {
|
|
32208
|
+
left: dayOffset(item.task.start),
|
|
32209
|
+
width: Math.max(dayOffset(item.task.end) - dayOffset(item.task.start), dayWidth / 2)
|
|
32210
|
+
},
|
|
32211
|
+
action: barClickEvent,
|
|
32212
|
+
actionPayload: { id: item.task.id }
|
|
32213
|
+
}
|
|
32214
|
+
) })
|
|
32215
|
+
]
|
|
32216
|
+
},
|
|
32217
|
+
item.task.id
|
|
32218
|
+
)
|
|
32219
|
+
),
|
|
32220
|
+
links.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32221
|
+
"svg",
|
|
32222
|
+
{
|
|
32223
|
+
className: "absolute pointer-events-none",
|
|
32224
|
+
style: { left: LABEL_WIDTH, top: 0 },
|
|
32225
|
+
width: chartWidth,
|
|
32226
|
+
height: HEADER_HEIGHT + displayItems.length * ROW_HEIGHT,
|
|
32227
|
+
children: [
|
|
32228
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("marker", { id: "gantt-arrow", markerWidth: "8", markerHeight: "8", refX: "7", refY: "4", orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0,0 L8,4 L0,8 z", fill: "var(--muted-foreground, currentColor)" }) }) }),
|
|
32229
|
+
links.map((link, i) => {
|
|
32230
|
+
const from = barGeometry.get(link.from);
|
|
32231
|
+
const to = barGeometry.get(link.to);
|
|
32232
|
+
if (!from || !to) return null;
|
|
32233
|
+
const midX = from.x1 + Math.max(8, (to.x0 - from.x1) / 2);
|
|
32234
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32235
|
+
"path",
|
|
32236
|
+
{
|
|
32237
|
+
d: `M ${from.x1} ${from.y} L ${midX} ${from.y} L ${midX} ${to.y} L ${to.x0} ${to.y}`,
|
|
32238
|
+
fill: "none",
|
|
32239
|
+
stroke: "var(--muted-foreground, currentColor)",
|
|
32240
|
+
strokeWidth: 1.5,
|
|
32241
|
+
markerEnd: "url(#gantt-arrow)"
|
|
32242
|
+
},
|
|
32243
|
+
i
|
|
32244
|
+
);
|
|
32245
|
+
})
|
|
32246
|
+
]
|
|
32247
|
+
}
|
|
32248
|
+
),
|
|
32249
|
+
showToday && todayOffset !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32250
|
+
Box,
|
|
32251
|
+
{
|
|
32252
|
+
className: "absolute top-0 bottom-0 w-0.5 bg-error/70 pointer-events-none",
|
|
32253
|
+
style: { left: LABEL_WIDTH + todayOffset }
|
|
32254
|
+
}
|
|
32255
|
+
)
|
|
32256
|
+
] })
|
|
32257
|
+
] })
|
|
32258
|
+
}
|
|
32259
|
+
);
|
|
32260
|
+
}
|
|
32261
|
+
var DAY_MS, ROW_HEIGHT, HEADER_HEIGHT, LABEL_WIDTH, STATUS_BAR;
|
|
32262
|
+
var init_Gantt = __esm({
|
|
32263
|
+
"components/core/molecules/Gantt.tsx"() {
|
|
32264
|
+
"use client";
|
|
32265
|
+
init_cn();
|
|
32266
|
+
init_getNestedValue();
|
|
32267
|
+
init_Box();
|
|
32268
|
+
init_Stack();
|
|
32269
|
+
init_Typography();
|
|
32270
|
+
init_LoadingState();
|
|
32271
|
+
init_EmptyState();
|
|
32272
|
+
DAY_MS = 24 * 60 * 60 * 1e3;
|
|
32273
|
+
ROW_HEIGHT = 36;
|
|
32274
|
+
HEADER_HEIGHT = 44;
|
|
32275
|
+
LABEL_WIDTH = 192;
|
|
32276
|
+
STATUS_BAR = {
|
|
32277
|
+
complete: "bg-success/80 hover:bg-success",
|
|
32278
|
+
done: "bg-success/80 hover:bg-success",
|
|
32279
|
+
active: "bg-primary/80 hover:bg-primary",
|
|
32280
|
+
"in-progress": "bg-primary/80 hover:bg-primary",
|
|
32281
|
+
blocked: "bg-error/80 hover:bg-error",
|
|
32282
|
+
error: "bg-error/80 hover:bg-error",
|
|
32283
|
+
"at-risk": "bg-warning/80 hover:bg-warning",
|
|
32284
|
+
pending: "bg-muted-foreground/50 hover:bg-muted-foreground/70"
|
|
32285
|
+
};
|
|
32286
|
+
Gantt.displayName = "Gantt";
|
|
32287
|
+
}
|
|
32288
|
+
});
|
|
32048
32289
|
var RepeatableFormSection;
|
|
32049
32290
|
var init_RepeatableFormSection = __esm({
|
|
32050
32291
|
"components/core/molecules/RepeatableFormSection.tsx"() {
|
|
@@ -51473,6 +51714,7 @@ var init_component_registry_generated = __esm({
|
|
|
51473
51714
|
init_GameIcon();
|
|
51474
51715
|
init_GameMenu();
|
|
51475
51716
|
init_GameShell();
|
|
51717
|
+
init_Gantt();
|
|
51476
51718
|
init_GenericAppTemplate();
|
|
51477
51719
|
init_GeometricPattern();
|
|
51478
51720
|
init_GradientDivider();
|
|
@@ -51752,6 +51994,7 @@ var init_component_registry_generated = __esm({
|
|
|
51752
51994
|
"GameIcon": GameIcon,
|
|
51753
51995
|
"GameMenu": GameMenu,
|
|
51754
51996
|
"GameShell": GameShell,
|
|
51997
|
+
"Gantt": Gantt,
|
|
51755
51998
|
"GenericAppTemplate": GenericAppTemplate,
|
|
51756
51999
|
"GeometricPattern": GeometricPattern,
|
|
51757
52000
|
"GradientDivider": GradientDivider,
|
|
@@ -54819,7 +55062,7 @@ function NavStackRefBridge({ apiRef }) {
|
|
|
54819
55062
|
}, [api, apiRef]);
|
|
54820
55063
|
return null;
|
|
54821
55064
|
}
|
|
54822
|
-
function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onNavigateBack, onLocalFallback, localFallbackTimeoutMs, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, callsiteCaptureChildrenByTrait, serverActiveTraits, children }) {
|
|
55065
|
+
function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onNavigateBack, onLocalFallback, localFallbackTimeoutMs, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, callsiteCaptureChildrenByTrait, serverActiveTraits, user, children }) {
|
|
54823
55066
|
const bridge = providers.useServerBridge();
|
|
54824
55067
|
const activeTraitNames = React87.useMemo(
|
|
54825
55068
|
() => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
|
|
@@ -54851,12 +55094,12 @@ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNaviga
|
|
|
54851
55094
|
void bridge.sendEvent(name, event, withActiveTraits(payload), tick, sourceTrait);
|
|
54852
55095
|
continue;
|
|
54853
55096
|
}
|
|
54854
|
-
void bridge.sendEvent(name, event, withActiveTraits(payload), void 0, void 0, locallyEmitted, results, entityByTrait).then(({ effects, meta }) => {
|
|
55097
|
+
void bridge.sendEvent(name, event, withActiveTraits(payload), void 0, void 0, locallyEmitted, results, entityByTrait, user ?? void 0).then(({ effects, meta }) => {
|
|
54855
55098
|
recordServerResponse(name, event, { ...meta, effectResults: effectResultsToTraces(meta.effectResults) });
|
|
54856
55099
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNamesRef.current, onNavigateBack);
|
|
54857
55100
|
});
|
|
54858
55101
|
}
|
|
54859
|
-
}, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, onNavigateBack, embeddedTraits, activeTraitNames, withActiveTraits]);
|
|
55102
|
+
}, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, onNavigateBack, embeddedTraits, activeTraitNames, withActiveTraits, user]);
|
|
54860
55103
|
const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate, navigateBack: onNavigateBack, traitConfigsByName, orbitalsByTrait, embeddedTraits, callsiteCaptureChildrenByTrait, initPayload: routeParams } : { navigate: onNavigate, navigateBack: onNavigateBack, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, callsiteCaptureChildrenByTrait, initPayload: routeParams };
|
|
54861
55104
|
const { sendEvent, entityBindingSource } = useTraitStateMachine(traits2, uiSlots, opts);
|
|
54862
55105
|
const initSentRef = React87.useRef(false);
|
|
@@ -54898,7 +55141,17 @@ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNaviga
|
|
|
54898
55141
|
initSentRef.current = true;
|
|
54899
55142
|
(async () => {
|
|
54900
55143
|
for (const name of orbitalNames) {
|
|
54901
|
-
const { effects, meta } = await bridge.sendEvent(
|
|
55144
|
+
const { effects, meta } = await bridge.sendEvent(
|
|
55145
|
+
name,
|
|
55146
|
+
"INIT",
|
|
55147
|
+
withActiveTraits({ ...routeParams ?? {} }),
|
|
55148
|
+
void 0,
|
|
55149
|
+
void 0,
|
|
55150
|
+
void 0,
|
|
55151
|
+
void 0,
|
|
55152
|
+
void 0,
|
|
55153
|
+
user ?? void 0
|
|
55154
|
+
);
|
|
54902
55155
|
recordServerResponse(name, "INIT", { ...meta, effectResults: effectResultsToTraces(meta.effectResults) });
|
|
54903
55156
|
const effectTraces = [
|
|
54904
55157
|
{ type: "fetch", args: [], status: "executed" },
|
|
@@ -54919,7 +55172,7 @@ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNaviga
|
|
|
54919
55172
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNamesRef.current, onNavigateBack);
|
|
54920
55173
|
}
|
|
54921
55174
|
})();
|
|
54922
|
-
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, onNavigateBack, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
|
|
55175
|
+
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, onNavigateBack, embeddedTraits, activeTraitNames, withActiveTraits, routeParams, user]);
|
|
54923
55176
|
return /* @__PURE__ */ jsxRuntime.jsx(providers.EntityBindingContext.Provider, { value: entityBindingSource, children });
|
|
54924
55177
|
}
|
|
54925
55178
|
function FitToBox({ children }) {
|
|
@@ -54946,7 +55199,7 @@ function FitToBox({ children }) {
|
|
|
54946
55199
|
}, []);
|
|
54947
55200
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: outerRef, className: "relative h-full w-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: innerRef, style: { transform: `scale(${scale})`, transformOrigin: "top left", width: "fit-content" }, children }) });
|
|
54948
55201
|
}
|
|
54949
|
-
function SchemaRunner({ schema, serverUrl, transport, getAccessToken, mockData, pageName, routeParams, onNavigate, onNavigateBack, onLocalFallback, localFallbackTimeoutMs, persistence }) {
|
|
55202
|
+
function SchemaRunner({ schema, serverUrl, transport, getAccessToken, mockData, pageName, routeParams, onNavigate, onNavigateBack, onLocalFallback, localFallbackTimeoutMs, persistence, user }) {
|
|
54950
55203
|
const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
|
|
54951
55204
|
const allPageTraits = React87.useMemo(() => {
|
|
54952
55205
|
let base;
|
|
@@ -55111,6 +55364,7 @@ function SchemaRunner({ schema, serverUrl, transport, getAccessToken, mockData,
|
|
|
55111
55364
|
onLocalFallback,
|
|
55112
55365
|
localFallbackTimeoutMs,
|
|
55113
55366
|
persistence,
|
|
55367
|
+
user,
|
|
55114
55368
|
children: /* @__PURE__ */ jsxRuntime.jsx(providers.OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-full min-h-full overflow-auto p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
|
|
55115
55369
|
}
|
|
55116
55370
|
)
|
|
@@ -55317,7 +55571,8 @@ function OrbPreview({
|
|
|
55317
55571
|
onNavigateBack: handleNavigateBack,
|
|
55318
55572
|
onLocalFallback: handleLocalFallback,
|
|
55319
55573
|
localFallbackTimeoutMs,
|
|
55320
|
-
persistence
|
|
55574
|
+
persistence,
|
|
55575
|
+
user
|
|
55321
55576
|
}
|
|
55322
55577
|
) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
55323
55578
|
SchemaRunner,
|
|
@@ -55333,7 +55588,8 @@ function OrbPreview({
|
|
|
55333
55588
|
onNavigateBack: handleNavigateBack,
|
|
55334
55589
|
onLocalFallback: handleLocalFallback,
|
|
55335
55590
|
localFallbackTimeoutMs,
|
|
55336
|
-
persistence
|
|
55591
|
+
persistence,
|
|
55592
|
+
user
|
|
55337
55593
|
}
|
|
55338
55594
|
) }) })
|
|
55339
55595
|
]
|
package/dist/runtime/index.d.cts
CHANGED
|
@@ -5,8 +5,8 @@ import * as _almadar_runtime from '@almadar/runtime';
|
|
|
5
5
|
import { TraitState, TransitionResult, EffectHandlers } from '@almadar/runtime';
|
|
6
6
|
import { K as KeyCaptureTable } from '../useKeyboardRouter-CVn8lfiX.cjs';
|
|
7
7
|
import { c as useUISlots } from '../UISlotContext-BlRDbHDy.cjs';
|
|
8
|
-
import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-
|
|
9
|
-
export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-
|
|
8
|
+
import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-C6FgxdfG.cjs';
|
|
9
|
+
export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-C6FgxdfG.cjs';
|
|
10
10
|
import '../verificationRegistry-DTrKDRoa.cjs';
|
|
11
11
|
export { PERF_NAMESPACE, PerfEntry, PreparedPreviewSchema, adjustSchemaForMockData, buildMockData, clearPerf, perfEnd, perfStart, perfTime, prepareSchemaForPreview, wrapCallbackForEvent } from '@almadar/runtime/ui';
|
|
12
12
|
import React__default, { ReactNode } from 'react';
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import * as _almadar_runtime from '@almadar/runtime';
|
|
|
5
5
|
import { TraitState, TransitionResult, EffectHandlers } from '@almadar/runtime';
|
|
6
6
|
import { K as KeyCaptureTable } from '../useKeyboardRouter-B1pIi9jo.js';
|
|
7
7
|
import { c as useUISlots } from '../UISlotContext-CB89mv7N.js';
|
|
8
|
-
import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-
|
|
9
|
-
export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-
|
|
8
|
+
import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-C6FgxdfG.js';
|
|
9
|
+
export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-C6FgxdfG.js';
|
|
10
10
|
import '../verificationRegistry-Cwa52VyK.js';
|
|
11
11
|
export { PERF_NAMESPACE, PerfEntry, PreparedPreviewSchema, adjustSchemaForMockData, buildMockData, clearPerf, perfEnd, perfStart, perfTime, prepareSchemaForPreview, wrapCallbackForEvent } from '@almadar/runtime/ui';
|
|
12
12
|
import React__default, { ReactNode } from 'react';
|