@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { ResolvedEntity, EventPayload, EntityRow, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding, TraitConfig } from '@almadar/core';
|
|
3
|
+
import { ResolvedEntity, EventPayload, EntityRow, UserContext, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding, TraitConfig } from '@almadar/core';
|
|
4
4
|
import { AnyPatternConfig } from '@almadar/core/patterns';
|
|
5
5
|
import { ServerEffectResult, TransitionResult } from '@almadar/runtime';
|
|
6
6
|
|
|
@@ -169,7 +169,18 @@ interface ServerBridgeContextValue {
|
|
|
169
169
|
result: TransitionResult;
|
|
170
170
|
}>,
|
|
171
171
|
/** Part G: the client's own current entity snapshot per trait. */
|
|
172
|
-
entityByTrait?: Readonly<Record<string, EntityRow
|
|
172
|
+
entityByTrait?: Readonly<Record<string, EntityRow>>,
|
|
173
|
+
/**
|
|
174
|
+
* The current viewer (persona), for `@user.X` guard/effect bindings.
|
|
175
|
+
* The persona-switcher's picked viewer never used to reach server-side
|
|
176
|
+
* effects on the stateless path — it only ever drove client-side guard
|
|
177
|
+
* evaluation — so a `fetch`/`persist` comparing against `@user.id`
|
|
178
|
+
* (e.g. a chat channel's `member == @user.id` scope filter, a profile
|
|
179
|
+
* page's self-lookup) always compared against `undefined` (confirmed
|
|
180
|
+
* 2026-09-17). `undefined` here sends the request unauthenticated,
|
|
181
|
+
* exactly as before this field existed.
|
|
182
|
+
*/
|
|
183
|
+
user?: UserContext) => Promise<SendEventResult>;
|
|
173
184
|
}
|
|
174
185
|
/**
|
|
175
186
|
* Transport adapter for ServerBridgeProvider. Decouples the bridge's
|
|
@@ -213,7 +224,9 @@ interface ServerBridgeTransport {
|
|
|
213
224
|
* misrouted to the standalone `std-project-manager` orbital of the
|
|
214
225
|
* same name). An unmodified server ignores the extra field.
|
|
215
226
|
*/
|
|
216
|
-
behaviorHint?: string
|
|
227
|
+
behaviorHint?: string,
|
|
228
|
+
/** See `ServerBridgeContextValue.sendEvent`'s `user` param. */
|
|
229
|
+
user?: UserContext) => Promise<OrbitalEventResponse>;
|
|
217
230
|
}
|
|
218
231
|
/**
|
|
219
232
|
* Supplies the bearer token the hosting server authenticates with. Resolved
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { ResolvedEntity, EventPayload, EntityRow, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding, TraitConfig } from '@almadar/core';
|
|
3
|
+
import { ResolvedEntity, EventPayload, EntityRow, UserContext, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding, TraitConfig } from '@almadar/core';
|
|
4
4
|
import { AnyPatternConfig } from '@almadar/core/patterns';
|
|
5
5
|
import { ServerEffectResult, TransitionResult } from '@almadar/runtime';
|
|
6
6
|
|
|
@@ -169,7 +169,18 @@ interface ServerBridgeContextValue {
|
|
|
169
169
|
result: TransitionResult;
|
|
170
170
|
}>,
|
|
171
171
|
/** Part G: the client's own current entity snapshot per trait. */
|
|
172
|
-
entityByTrait?: Readonly<Record<string, EntityRow
|
|
172
|
+
entityByTrait?: Readonly<Record<string, EntityRow>>,
|
|
173
|
+
/**
|
|
174
|
+
* The current viewer (persona), for `@user.X` guard/effect bindings.
|
|
175
|
+
* The persona-switcher's picked viewer never used to reach server-side
|
|
176
|
+
* effects on the stateless path — it only ever drove client-side guard
|
|
177
|
+
* evaluation — so a `fetch`/`persist` comparing against `@user.id`
|
|
178
|
+
* (e.g. a chat channel's `member == @user.id` scope filter, a profile
|
|
179
|
+
* page's self-lookup) always compared against `undefined` (confirmed
|
|
180
|
+
* 2026-09-17). `undefined` here sends the request unauthenticated,
|
|
181
|
+
* exactly as before this field existed.
|
|
182
|
+
*/
|
|
183
|
+
user?: UserContext) => Promise<SendEventResult>;
|
|
173
184
|
}
|
|
174
185
|
/**
|
|
175
186
|
* Transport adapter for ServerBridgeProvider. Decouples the bridge's
|
|
@@ -213,7 +224,9 @@ interface ServerBridgeTransport {
|
|
|
213
224
|
* misrouted to the standalone `std-project-manager` orbital of the
|
|
214
225
|
* same name). An unmodified server ignores the extra field.
|
|
215
226
|
*/
|
|
216
|
-
behaviorHint?: string
|
|
227
|
+
behaviorHint?: string,
|
|
228
|
+
/** See `ServerBridgeContextValue.sendEvent`'s `user` param. */
|
|
229
|
+
user?: UserContext) => Promise<OrbitalEventResponse>;
|
|
217
230
|
}
|
|
218
231
|
/**
|
|
219
232
|
* Supplies the bearer token the hosting server authenticates with. Resolved
|
package/dist/avl/index.cjs
CHANGED
|
@@ -34818,6 +34818,247 @@ var init_WizardNavigation = __esm({
|
|
|
34818
34818
|
WizardNavigation.displayName = "WizardNavigation";
|
|
34819
34819
|
}
|
|
34820
34820
|
});
|
|
34821
|
+
function parseDay(value) {
|
|
34822
|
+
if (value === void 0 || value === null || value === "") return null;
|
|
34823
|
+
const d = value instanceof Date ? new Date(value.getTime()) : new Date(value);
|
|
34824
|
+
if (Number.isNaN(d.getTime())) return null;
|
|
34825
|
+
d.setHours(0, 0, 0, 0);
|
|
34826
|
+
return d;
|
|
34827
|
+
}
|
|
34828
|
+
function Gantt({
|
|
34829
|
+
tasks = [],
|
|
34830
|
+
links = [],
|
|
34831
|
+
titleField = "title",
|
|
34832
|
+
startField = "start",
|
|
34833
|
+
endField = "end",
|
|
34834
|
+
durationField,
|
|
34835
|
+
statusField = "status",
|
|
34836
|
+
groupField = "",
|
|
34837
|
+
rangeStart,
|
|
34838
|
+
rangeEnd,
|
|
34839
|
+
showToday = true,
|
|
34840
|
+
dayWidth = 28,
|
|
34841
|
+
barClickEvent,
|
|
34842
|
+
className,
|
|
34843
|
+
isLoading = false,
|
|
34844
|
+
error = null
|
|
34845
|
+
}) {
|
|
34846
|
+
const { t } = hooks.useTranslate();
|
|
34847
|
+
const placed = React96.useMemo(() => {
|
|
34848
|
+
const rows = Array.isArray(tasks) ? tasks : tasks ? [tasks] : [];
|
|
34849
|
+
const out = [];
|
|
34850
|
+
rows.forEach((row, idx) => {
|
|
34851
|
+
const start = parseDay(core.getNestedValue(row, startField));
|
|
34852
|
+
if (!start) return;
|
|
34853
|
+
let end = parseDay(core.getNestedValue(row, endField));
|
|
34854
|
+
if (!end && durationField) {
|
|
34855
|
+
const days2 = Number(core.getNestedValue(row, durationField));
|
|
34856
|
+
if (Number.isFinite(days2) && days2 > 0) {
|
|
34857
|
+
end = new Date(start.getTime() + days2 * DAY_MS);
|
|
34858
|
+
}
|
|
34859
|
+
}
|
|
34860
|
+
if (!end || end.getTime() < start.getTime()) end = new Date(start.getTime() + DAY_MS);
|
|
34861
|
+
out.push({
|
|
34862
|
+
row,
|
|
34863
|
+
id: String(row.id ?? idx),
|
|
34864
|
+
label: String(core.getNestedValue(row, titleField) ?? ""),
|
|
34865
|
+
status: String(core.getNestedValue(row, statusField) ?? "").toLowerCase(),
|
|
34866
|
+
group: groupField ? String(core.getNestedValue(row, groupField) ?? "") : "",
|
|
34867
|
+
start,
|
|
34868
|
+
end
|
|
34869
|
+
});
|
|
34870
|
+
});
|
|
34871
|
+
return out;
|
|
34872
|
+
}, [tasks, titleField, startField, endField, durationField, statusField, groupField]);
|
|
34873
|
+
const [axisStart, axisEnd] = React96.useMemo(() => {
|
|
34874
|
+
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)));
|
|
34875
|
+
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));
|
|
34876
|
+
return hi.getTime() > lo.getTime() ? [lo, hi] : [lo, new Date(lo.getTime() + DAY_MS)];
|
|
34877
|
+
}, [rangeStart, rangeEnd, placed]);
|
|
34878
|
+
const totalDays = Math.round((axisEnd.getTime() - axisStart.getTime()) / DAY_MS);
|
|
34879
|
+
const chartWidth = totalDays * dayWidth;
|
|
34880
|
+
const dayOffset = (d) => (d.getTime() - axisStart.getTime()) / DAY_MS * dayWidth;
|
|
34881
|
+
const displayItems = React96.useMemo(() => {
|
|
34882
|
+
if (!groupField) return placed.map((task) => ({ kind: "task", task }));
|
|
34883
|
+
const items = [];
|
|
34884
|
+
const seen = /* @__PURE__ */ new Set();
|
|
34885
|
+
for (const task of placed) {
|
|
34886
|
+
if (!seen.has(task.group)) {
|
|
34887
|
+
seen.add(task.group);
|
|
34888
|
+
items.push({ kind: "group", label: task.group || "\u2014" });
|
|
34889
|
+
}
|
|
34890
|
+
items.push({ kind: "task", task });
|
|
34891
|
+
}
|
|
34892
|
+
return items;
|
|
34893
|
+
}, [placed, groupField]);
|
|
34894
|
+
const barGeometry = React96.useMemo(() => {
|
|
34895
|
+
const offset = (d) => (d.getTime() - axisStart.getTime()) / DAY_MS * dayWidth;
|
|
34896
|
+
const map = /* @__PURE__ */ new Map();
|
|
34897
|
+
displayItems.forEach((item, idx) => {
|
|
34898
|
+
if (item.kind !== "task") return;
|
|
34899
|
+
const x0 = offset(item.task.start);
|
|
34900
|
+
const x1 = Math.max(offset(item.task.end), x0 + dayWidth / 2);
|
|
34901
|
+
map.set(item.task.id, { x0, x1, y: HEADER_HEIGHT + idx * ROW_HEIGHT + ROW_HEIGHT / 2 });
|
|
34902
|
+
});
|
|
34903
|
+
return map;
|
|
34904
|
+
}, [displayItems, axisStart, dayWidth]);
|
|
34905
|
+
const days = React96.useMemo(() => {
|
|
34906
|
+
const out = [];
|
|
34907
|
+
for (let i = 0; i < totalDays; i++) out.push(new Date(axisStart.getTime() + i * DAY_MS));
|
|
34908
|
+
return out;
|
|
34909
|
+
}, [axisStart, totalDays]);
|
|
34910
|
+
const todayOffset = React96.useMemo(() => {
|
|
34911
|
+
const today = parseDay(/* @__PURE__ */ new Date());
|
|
34912
|
+
if (!today || today < axisStart || today > axisEnd) return null;
|
|
34913
|
+
return (today.getTime() - axisStart.getTime()) / DAY_MS * dayWidth;
|
|
34914
|
+
}, [axisStart, axisEnd, dayWidth]);
|
|
34915
|
+
if (isLoading) {
|
|
34916
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LoadingState, { message: t("common.loading"), className });
|
|
34917
|
+
}
|
|
34918
|
+
if (error) {
|
|
34919
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("p-4", className), children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "error", children: error.message }) });
|
|
34920
|
+
}
|
|
34921
|
+
if (placed.length === 0) {
|
|
34922
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34923
|
+
EmptyState,
|
|
34924
|
+
{
|
|
34925
|
+
title: t("empty.noData"),
|
|
34926
|
+
className
|
|
34927
|
+
}
|
|
34928
|
+
);
|
|
34929
|
+
}
|
|
34930
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34931
|
+
Box,
|
|
34932
|
+
{
|
|
34933
|
+
className: cn("w-full overflow-auto rounded-md border border-border bg-card", className),
|
|
34934
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "relative", style: { width: LABEL_WIDTH + chartWidth, minWidth: "100%" }, children: [
|
|
34935
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "none", className: "sticky top-0 z-20 bg-card border-b border-border", style: { height: HEADER_HEIGHT }, children: [
|
|
34936
|
+
/* @__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 } }),
|
|
34937
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative", style: { width: chartWidth, height: HEADER_HEIGHT }, children: days.map((day, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
34938
|
+
Box,
|
|
34939
|
+
{
|
|
34940
|
+
className: cn(
|
|
34941
|
+
"absolute top-0 bottom-0 border-l border-border/50 flex items-end justify-center pb-1",
|
|
34942
|
+
day.getDay() === 0 || day.getDay() === 6 ? "bg-muted/40" : void 0
|
|
34943
|
+
),
|
|
34944
|
+
style: { left: i * dayWidth, width: dayWidth },
|
|
34945
|
+
children: dayWidth >= 20 && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "secondary", children: day.getDate() })
|
|
34946
|
+
},
|
|
34947
|
+
i
|
|
34948
|
+
)) })
|
|
34949
|
+
] }),
|
|
34950
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "relative", children: [
|
|
34951
|
+
displayItems.map(
|
|
34952
|
+
(item, idx) => item.kind === "group" ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
34953
|
+
HStack,
|
|
34954
|
+
{
|
|
34955
|
+
gap: "none",
|
|
34956
|
+
className: "border-b border-border bg-muted/30",
|
|
34957
|
+
style: { height: ROW_HEIGHT },
|
|
34958
|
+
children: [
|
|
34959
|
+
/* @__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 }) }),
|
|
34960
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { style: { width: chartWidth, height: ROW_HEIGHT } })
|
|
34961
|
+
]
|
|
34962
|
+
},
|
|
34963
|
+
`g-${idx}`
|
|
34964
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
34965
|
+
HStack,
|
|
34966
|
+
{
|
|
34967
|
+
gap: "none",
|
|
34968
|
+
className: "border-b border-border/50",
|
|
34969
|
+
style: { height: ROW_HEIGHT },
|
|
34970
|
+
children: [
|
|
34971
|
+
/* @__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 }) }),
|
|
34972
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "relative", style: { width: chartWidth, height: ROW_HEIGHT }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34973
|
+
Box,
|
|
34974
|
+
{
|
|
34975
|
+
className: cn(
|
|
34976
|
+
"absolute top-1/2 -translate-y-1/2 h-4 rounded-sm transition-colors",
|
|
34977
|
+
STATUS_BAR[item.task.status] ?? "bg-primary/80 hover:bg-primary",
|
|
34978
|
+
barClickEvent ? "cursor-pointer" : void 0
|
|
34979
|
+
),
|
|
34980
|
+
style: {
|
|
34981
|
+
left: dayOffset(item.task.start),
|
|
34982
|
+
width: Math.max(dayOffset(item.task.end) - dayOffset(item.task.start), dayWidth / 2)
|
|
34983
|
+
},
|
|
34984
|
+
action: barClickEvent,
|
|
34985
|
+
actionPayload: { id: item.task.id }
|
|
34986
|
+
}
|
|
34987
|
+
) })
|
|
34988
|
+
]
|
|
34989
|
+
},
|
|
34990
|
+
item.task.id
|
|
34991
|
+
)
|
|
34992
|
+
),
|
|
34993
|
+
links.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
34994
|
+
"svg",
|
|
34995
|
+
{
|
|
34996
|
+
className: "absolute pointer-events-none",
|
|
34997
|
+
style: { left: LABEL_WIDTH, top: 0 },
|
|
34998
|
+
width: chartWidth,
|
|
34999
|
+
height: HEADER_HEIGHT + displayItems.length * ROW_HEIGHT,
|
|
35000
|
+
children: [
|
|
35001
|
+
/* @__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)" }) }) }),
|
|
35002
|
+
links.map((link, i) => {
|
|
35003
|
+
const from = barGeometry.get(link.from);
|
|
35004
|
+
const to = barGeometry.get(link.to);
|
|
35005
|
+
if (!from || !to) return null;
|
|
35006
|
+
const midX = from.x1 + Math.max(8, (to.x0 - from.x1) / 2);
|
|
35007
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35008
|
+
"path",
|
|
35009
|
+
{
|
|
35010
|
+
d: `M ${from.x1} ${from.y} L ${midX} ${from.y} L ${midX} ${to.y} L ${to.x0} ${to.y}`,
|
|
35011
|
+
fill: "none",
|
|
35012
|
+
stroke: "var(--muted-foreground, currentColor)",
|
|
35013
|
+
strokeWidth: 1.5,
|
|
35014
|
+
markerEnd: "url(#gantt-arrow)"
|
|
35015
|
+
},
|
|
35016
|
+
i
|
|
35017
|
+
);
|
|
35018
|
+
})
|
|
35019
|
+
]
|
|
35020
|
+
}
|
|
35021
|
+
),
|
|
35022
|
+
showToday && todayOffset !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
35023
|
+
Box,
|
|
35024
|
+
{
|
|
35025
|
+
className: "absolute top-0 bottom-0 w-0.5 bg-error/70 pointer-events-none",
|
|
35026
|
+
style: { left: LABEL_WIDTH + todayOffset }
|
|
35027
|
+
}
|
|
35028
|
+
)
|
|
35029
|
+
] })
|
|
35030
|
+
] })
|
|
35031
|
+
}
|
|
35032
|
+
);
|
|
35033
|
+
}
|
|
35034
|
+
var DAY_MS, ROW_HEIGHT, HEADER_HEIGHT, LABEL_WIDTH, STATUS_BAR;
|
|
35035
|
+
var init_Gantt = __esm({
|
|
35036
|
+
"components/core/molecules/Gantt.tsx"() {
|
|
35037
|
+
"use client";
|
|
35038
|
+
init_cn();
|
|
35039
|
+
init_getNestedValue();
|
|
35040
|
+
init_Box();
|
|
35041
|
+
init_Stack();
|
|
35042
|
+
init_Typography();
|
|
35043
|
+
init_LoadingState();
|
|
35044
|
+
init_EmptyState();
|
|
35045
|
+
DAY_MS = 24 * 60 * 60 * 1e3;
|
|
35046
|
+
ROW_HEIGHT = 36;
|
|
35047
|
+
HEADER_HEIGHT = 44;
|
|
35048
|
+
LABEL_WIDTH = 192;
|
|
35049
|
+
STATUS_BAR = {
|
|
35050
|
+
complete: "bg-success/80 hover:bg-success",
|
|
35051
|
+
done: "bg-success/80 hover:bg-success",
|
|
35052
|
+
active: "bg-primary/80 hover:bg-primary",
|
|
35053
|
+
"in-progress": "bg-primary/80 hover:bg-primary",
|
|
35054
|
+
blocked: "bg-error/80 hover:bg-error",
|
|
35055
|
+
error: "bg-error/80 hover:bg-error",
|
|
35056
|
+
"at-risk": "bg-warning/80 hover:bg-warning",
|
|
35057
|
+
pending: "bg-muted-foreground/50 hover:bg-muted-foreground/70"
|
|
35058
|
+
};
|
|
35059
|
+
Gantt.displayName = "Gantt";
|
|
35060
|
+
}
|
|
35061
|
+
});
|
|
34821
35062
|
var RepeatableFormSection;
|
|
34822
35063
|
var init_RepeatableFormSection = __esm({
|
|
34823
35064
|
"components/core/molecules/RepeatableFormSection.tsx"() {
|
|
@@ -53975,6 +54216,7 @@ var init_component_registry_generated = __esm({
|
|
|
53975
54216
|
init_GameIcon();
|
|
53976
54217
|
init_GameMenu();
|
|
53977
54218
|
init_GameShell();
|
|
54219
|
+
init_Gantt();
|
|
53978
54220
|
init_GenericAppTemplate();
|
|
53979
54221
|
init_GeometricPattern();
|
|
53980
54222
|
init_GradientDivider();
|
|
@@ -54254,6 +54496,7 @@ var init_component_registry_generated = __esm({
|
|
|
54254
54496
|
"GameIcon": GameIcon,
|
|
54255
54497
|
"GameMenu": GameMenu,
|
|
54256
54498
|
"GameShell": GameShell,
|
|
54499
|
+
"Gantt": Gantt,
|
|
54257
54500
|
"GenericAppTemplate": GenericAppTemplate,
|
|
54258
54501
|
"GeometricPattern": GeometricPattern,
|
|
54259
54502
|
"GradientDivider": GradientDivider,
|
|
@@ -60592,7 +60835,7 @@ function NavStackRefBridge({ apiRef }) {
|
|
|
60592
60835
|
}, [api, apiRef]);
|
|
60593
60836
|
return null;
|
|
60594
60837
|
}
|
|
60595
|
-
function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onNavigateBack, onLocalFallback, localFallbackTimeoutMs, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, callsiteCaptureChildrenByTrait, serverActiveTraits, children }) {
|
|
60838
|
+
function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNavigate, onNavigateBack, onLocalFallback, localFallbackTimeoutMs, persistence, traitConfigsByName, orbitalsByTrait, embeddedTraits, callsiteCaptureChildrenByTrait, serverActiveTraits, user, children }) {
|
|
60596
60839
|
const bridge = providers.useServerBridge();
|
|
60597
60840
|
const activeTraitNames = React96.useMemo(
|
|
60598
60841
|
() => new Set(traits2.map((b) => b.trait.name).filter((n) => !!n)),
|
|
@@ -60624,12 +60867,12 @@ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNaviga
|
|
|
60624
60867
|
void bridge.sendEvent(name, event, withActiveTraits(payload), tick, sourceTrait);
|
|
60625
60868
|
continue;
|
|
60626
60869
|
}
|
|
60627
|
-
void bridge.sendEvent(name, event, withActiveTraits(payload), void 0, void 0, locallyEmitted, results, entityByTrait).then(({ effects, meta }) => {
|
|
60870
|
+
void bridge.sendEvent(name, event, withActiveTraits(payload), void 0, void 0, locallyEmitted, results, entityByTrait, user ?? void 0).then(({ effects, meta }) => {
|
|
60628
60871
|
recordServerResponse(name, event, { ...meta, effectResults: effectResultsToTraces(meta.effectResults) });
|
|
60629
60872
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNamesRef.current, onNavigateBack);
|
|
60630
60873
|
});
|
|
60631
60874
|
}
|
|
60632
|
-
}, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, onNavigateBack, embeddedTraits, activeTraitNames, withActiveTraits]);
|
|
60875
|
+
}, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate, onNavigateBack, embeddedTraits, activeTraitNames, withActiveTraits, user]);
|
|
60633
60876
|
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 };
|
|
60634
60877
|
const { sendEvent, entityBindingSource } = useTraitStateMachine(traits2, uiSlots, opts);
|
|
60635
60878
|
const initSentRef = React96.useRef(false);
|
|
@@ -60671,7 +60914,17 @@ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNaviga
|
|
|
60671
60914
|
initSentRef.current = true;
|
|
60672
60915
|
(async () => {
|
|
60673
60916
|
for (const name of orbitalNames) {
|
|
60674
|
-
const { effects, meta } = await bridge.sendEvent(
|
|
60917
|
+
const { effects, meta } = await bridge.sendEvent(
|
|
60918
|
+
name,
|
|
60919
|
+
"INIT",
|
|
60920
|
+
withActiveTraits({ ...routeParams ?? {} }),
|
|
60921
|
+
void 0,
|
|
60922
|
+
void 0,
|
|
60923
|
+
void 0,
|
|
60924
|
+
void 0,
|
|
60925
|
+
void 0,
|
|
60926
|
+
user ?? void 0
|
|
60927
|
+
);
|
|
60675
60928
|
recordServerResponse(name, "INIT", { ...meta, effectResults: effectResultsToTraces(meta.effectResults) });
|
|
60676
60929
|
const effectTraces = [
|
|
60677
60930
|
{ type: "fetch", args: [], status: "executed" },
|
|
@@ -60692,7 +60945,7 @@ function TraitInitializer({ traits: traits2, routeParams, orbitalNames, onNaviga
|
|
|
60692
60945
|
applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits, activeTraitNamesRef.current, onNavigateBack);
|
|
60693
60946
|
}
|
|
60694
60947
|
})();
|
|
60695
|
-
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, onNavigateBack, embeddedTraits, activeTraitNames, withActiveTraits, routeParams]);
|
|
60948
|
+
}, [bridge.connected, orbitalNames, bridge.sendEvent, uiSlots, onNavigate, onNavigateBack, embeddedTraits, activeTraitNames, withActiveTraits, routeParams, user]);
|
|
60696
60949
|
return /* @__PURE__ */ jsxRuntime.jsx(providers.EntityBindingContext.Provider, { value: entityBindingSource, children });
|
|
60697
60950
|
}
|
|
60698
60951
|
function FitToBox({ children }) {
|
|
@@ -60719,7 +60972,7 @@ function FitToBox({ children }) {
|
|
|
60719
60972
|
}, []);
|
|
60720
60973
|
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 }) });
|
|
60721
60974
|
}
|
|
60722
|
-
function SchemaRunner({ schema, serverUrl, transport, getAccessToken, mockData, pageName, routeParams, onNavigate, onNavigateBack, onLocalFallback, localFallbackTimeoutMs, persistence }) {
|
|
60975
|
+
function SchemaRunner({ schema, serverUrl, transport, getAccessToken, mockData, pageName, routeParams, onNavigate, onNavigateBack, onLocalFallback, localFallbackTimeoutMs, persistence, user }) {
|
|
60723
60976
|
const { traits: traits2, allEntities, allTraits, ir } = useResolvedSchema(schema, pageName);
|
|
60724
60977
|
const allPageTraits = React96.useMemo(() => {
|
|
60725
60978
|
let base;
|
|
@@ -60884,6 +61137,7 @@ function SchemaRunner({ schema, serverUrl, transport, getAccessToken, mockData,
|
|
|
60884
61137
|
onLocalFallback,
|
|
60885
61138
|
localFallbackTimeoutMs,
|
|
60886
61139
|
persistence,
|
|
61140
|
+
user,
|
|
60887
61141
|
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 }) }) })
|
|
60888
61142
|
}
|
|
60889
61143
|
)
|
|
@@ -61090,7 +61344,8 @@ function OrbPreview({
|
|
|
61090
61344
|
onNavigateBack: handleNavigateBack,
|
|
61091
61345
|
onLocalFallback: handleLocalFallback,
|
|
61092
61346
|
localFallbackTimeoutMs,
|
|
61093
|
-
persistence
|
|
61347
|
+
persistence,
|
|
61348
|
+
user
|
|
61094
61349
|
}
|
|
61095
61350
|
) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
61096
61351
|
SchemaRunner,
|
|
@@ -61106,7 +61361,8 @@ function OrbPreview({
|
|
|
61106
61361
|
onNavigateBack: handleNavigateBack,
|
|
61107
61362
|
onLocalFallback: handleLocalFallback,
|
|
61108
61363
|
localFallbackTimeoutMs,
|
|
61109
|
-
persistence
|
|
61364
|
+
persistence,
|
|
61365
|
+
user
|
|
61110
61366
|
}
|
|
61111
61367
|
) }) })
|
|
61112
61368
|
]
|