@almadar/ui 5.124.0 → 5.126.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/avl/index.cjs +118 -75
- package/dist/avl/index.d.cts +1859 -0
- package/dist/avl/index.d.ts +1859 -0
- package/dist/avl/index.js +119 -76
- package/dist/components/index.cjs +115 -62
- package/dist/components/index.js +115 -62
- package/dist/context/index.cjs +3 -2
- package/dist/context/index.js +3 -2
- package/dist/hooks/index.cjs +3 -2
- package/dist/hooks/index.js +3 -2
- package/dist/marketing/index.d.cts +1086 -0
- package/dist/marketing/index.d.ts +1086 -0
- package/dist/{offline-executor-aRuNznZx.d.cts → offline-executor-Qz4b6GpF.d.cts} +19 -1
- package/dist/{offline-executor-aRuNznZx.d.ts → offline-executor-Qz4b6GpF.d.ts} +19 -1
- package/dist/providers/index.cjs +145 -68
- package/dist/providers/index.d.cts +2 -2
- package/dist/providers/index.d.ts +2 -2
- package/dist/providers/index.js +144 -69
- package/dist/renderer/index.cjs +8 -0
- package/dist/renderer/index.d.cts +2 -2
- package/dist/renderer/index.d.ts +2 -2
- package/dist/renderer/index.js +1 -1
- package/dist/runtime/index.cjs +118 -75
- package/dist/runtime/index.js +119 -76
- package/package.json +11 -10
package/dist/runtime/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React82 from 'react';
|
|
2
2
|
import React82__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
|
-
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntitySchema, getAllPages,
|
|
3
|
+
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntitySchema, getAllPages, matchPathAmong, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge } from '@almadar/ui/providers';
|
|
4
4
|
export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
@@ -18483,17 +18483,27 @@ function getWeekDays(start) {
|
|
|
18483
18483
|
}
|
|
18484
18484
|
return days;
|
|
18485
18485
|
}
|
|
18486
|
-
function generateDefaultTimeSlots() {
|
|
18486
|
+
function generateDefaultTimeSlots(events2) {
|
|
18487
|
+
let first = DEFAULT_FIRST_HOUR;
|
|
18488
|
+
let last = DEFAULT_LAST_HOUR;
|
|
18489
|
+
for (const ev of events2) {
|
|
18490
|
+
const start = new Date(ev.startTime);
|
|
18491
|
+
if (Number.isNaN(start.getTime())) continue;
|
|
18492
|
+
const hour = start.getHours();
|
|
18493
|
+
if (hour < first) first = hour;
|
|
18494
|
+
if (hour > last) last = hour;
|
|
18495
|
+
}
|
|
18487
18496
|
const slots = [];
|
|
18488
|
-
for (let hour =
|
|
18489
|
-
slots.push(
|
|
18497
|
+
for (let hour = first; hour <= last; hour++) {
|
|
18498
|
+
slots.push(slotLabel(hour));
|
|
18490
18499
|
}
|
|
18491
18500
|
return slots;
|
|
18492
18501
|
}
|
|
18493
18502
|
function eventInSlot(event, day, slotTime) {
|
|
18494
18503
|
const eventStart = new Date(event.startTime);
|
|
18495
|
-
|
|
18496
|
-
|
|
18504
|
+
if (Number.isNaN(eventStart.getTime())) return false;
|
|
18505
|
+
const [slotHour] = slotTime.split(":").map(Number);
|
|
18506
|
+
return eventStart.toDateString() === day.toDateString() && eventStart.getHours() === slotHour;
|
|
18497
18507
|
}
|
|
18498
18508
|
function CalendarGrid({
|
|
18499
18509
|
weekStart,
|
|
@@ -18522,8 +18532,8 @@ function CalendarGrid({
|
|
|
18522
18532
|
[resolvedWeekStart]
|
|
18523
18533
|
);
|
|
18524
18534
|
const resolvedTimeSlots = useMemo(
|
|
18525
|
-
() => timeSlots ?? generateDefaultTimeSlots(),
|
|
18526
|
-
[timeSlots]
|
|
18535
|
+
() => timeSlots ?? generateDefaultTimeSlots(evs),
|
|
18536
|
+
[timeSlots, evs]
|
|
18527
18537
|
);
|
|
18528
18538
|
const visibleCount = useDayWindow(dayWindow);
|
|
18529
18539
|
const [dayOffset, setDayOffset] = useState(0);
|
|
@@ -18710,7 +18720,7 @@ function CalendarGrid({
|
|
|
18710
18720
|
}
|
|
18711
18721
|
);
|
|
18712
18722
|
}
|
|
18713
|
-
var SHORT_DATE;
|
|
18723
|
+
var SHORT_DATE, DEFAULT_FIRST_HOUR, DEFAULT_LAST_HOUR, slotLabel;
|
|
18714
18724
|
var init_CalendarGrid = __esm({
|
|
18715
18725
|
"components/core/molecules/CalendarGrid.tsx"() {
|
|
18716
18726
|
"use client";
|
|
@@ -18725,6 +18735,9 @@ var init_CalendarGrid = __esm({
|
|
|
18725
18735
|
init_useEventBus();
|
|
18726
18736
|
init_useSwipeGesture();
|
|
18727
18737
|
SHORT_DATE = { month: "short", day: "numeric" };
|
|
18738
|
+
DEFAULT_FIRST_HOUR = 9;
|
|
18739
|
+
DEFAULT_LAST_HOUR = 17;
|
|
18740
|
+
slotLabel = (hour) => `${hour.toString().padStart(2, "0")}:00`;
|
|
18728
18741
|
CalendarGrid.displayName = "CalendarGrid";
|
|
18729
18742
|
}
|
|
18730
18743
|
});
|
|
@@ -22795,13 +22808,13 @@ function DataGrid({
|
|
|
22795
22808
|
}
|
|
22796
22809
|
),
|
|
22797
22810
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
22798
|
-
titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
22811
|
+
titleValue !== void 0 && titleValue !== null && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center min-w-0", children: [
|
|
22799
22812
|
titleField?.icon && renderIconInput(titleField.icon, { size: "sm", className: "text-primary flex-shrink-0" }),
|
|
22800
22813
|
/* @__PURE__ */ jsx(
|
|
22801
22814
|
Typography,
|
|
22802
22815
|
{
|
|
22803
22816
|
variant: titleField?.variant === "h3" ? "h3" : "h4",
|
|
22804
|
-
className: "font-semibold truncate",
|
|
22817
|
+
className: "font-semibold truncate min-w-0",
|
|
22805
22818
|
children: String(titleValue)
|
|
22806
22819
|
}
|
|
22807
22820
|
)
|
|
@@ -22859,7 +22872,7 @@ function DataGrid({
|
|
|
22859
22872
|
)
|
|
22860
22873
|
] }, field.name);
|
|
22861
22874
|
}) }) }),
|
|
22862
|
-
primaryActions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 mt-auto border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-end", children: [
|
|
22875
|
+
primaryActions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "px-4 py-3 mt-auto border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "justify-end flex-wrap", children: [
|
|
22863
22876
|
(maxInlineActions != null ? primaryActions.slice(0, maxInlineActions) : primaryActions).map((action, idx) => /* @__PURE__ */ jsxs(
|
|
22864
22877
|
Button,
|
|
22865
22878
|
{
|
|
@@ -27808,7 +27821,7 @@ function TableView({
|
|
|
27808
27821
|
col.key
|
|
27809
27822
|
);
|
|
27810
27823
|
}),
|
|
27811
|
-
hasActions && /* @__PURE__ */ jsx(Box, { "aria-hidden": true })
|
|
27824
|
+
hasActions && /* @__PURE__ */ jsx(Box, { "aria-hidden": true, className: "sticky right-0 bg-[var(--color-surface-subtle)]" })
|
|
27812
27825
|
]
|
|
27813
27826
|
}
|
|
27814
27827
|
);
|
|
@@ -27852,41 +27865,54 @@ function TableView({
|
|
|
27852
27865
|
}
|
|
27853
27866
|
return /* @__PURE__ */ jsx(Box, { role: "cell", className: cellBase, children: /* @__PURE__ */ jsx("span", { className: "truncate", children: formatCell(raw, col.format) }) }, col.key);
|
|
27854
27867
|
}),
|
|
27855
|
-
itemActions && itemActions.length > 0 && /* @__PURE__ */ jsxs(
|
|
27856
|
-
|
|
27857
|
-
|
|
27858
|
-
|
|
27859
|
-
|
|
27860
|
-
|
|
27861
|
-
|
|
27862
|
-
|
|
27863
|
-
"
|
|
27864
|
-
|
|
27865
|
-
|
|
27866
|
-
|
|
27867
|
-
|
|
27868
|
-
|
|
27869
|
-
|
|
27870
|
-
|
|
27871
|
-
|
|
27872
|
-
|
|
27873
|
-
|
|
27874
|
-
|
|
27875
|
-
|
|
27876
|
-
|
|
27877
|
-
|
|
27878
|
-
|
|
27879
|
-
|
|
27880
|
-
|
|
27881
|
-
|
|
27882
|
-
|
|
27883
|
-
|
|
27884
|
-
|
|
27885
|
-
|
|
27886
|
-
|
|
27887
|
-
|
|
27888
|
-
|
|
27889
|
-
|
|
27868
|
+
itemActions && itemActions.length > 0 && /* @__PURE__ */ jsxs(
|
|
27869
|
+
HStack,
|
|
27870
|
+
{
|
|
27871
|
+
gap: "xs",
|
|
27872
|
+
className: cn(
|
|
27873
|
+
// Pinned: the fixed column tracks routinely overflow the caller's
|
|
27874
|
+
// scroll container, which used to leave the actions off-screen.
|
|
27875
|
+
// Opaque so scrolled cells pass underneath it.
|
|
27876
|
+
"justify-end flex-shrink-0 sticky right-0 z-[1] transition-colors",
|
|
27877
|
+
lk.striped && index % 2 === 1 ? "bg-[var(--color-surface-subtle)]" : "bg-[var(--color-card)] group-hover:bg-[var(--color-surface-subtle)]"
|
|
27878
|
+
),
|
|
27879
|
+
children: [
|
|
27880
|
+
(maxInlineActions != null ? itemActions.slice(0, maxInlineActions) : itemActions).map((action, i) => /* @__PURE__ */ jsxs(
|
|
27881
|
+
Button,
|
|
27882
|
+
{
|
|
27883
|
+
variant: action.variant ?? "ghost",
|
|
27884
|
+
size: "sm",
|
|
27885
|
+
onClick: handleActionClick(action, row),
|
|
27886
|
+
"data-testid": `action-${action.event}`,
|
|
27887
|
+
"data-row-id": String(row.id),
|
|
27888
|
+
className: cn(action.variant === "danger" && "text-error hover:bg-error/10"),
|
|
27889
|
+
children: [
|
|
27890
|
+
action.icon && renderIconInput3(action.icon, { size: "xs", className: "mr-1" }),
|
|
27891
|
+
action.label
|
|
27892
|
+
]
|
|
27893
|
+
},
|
|
27894
|
+
i
|
|
27895
|
+
)),
|
|
27896
|
+
maxInlineActions != null && itemActions.length > maxInlineActions && /* @__PURE__ */ jsx(
|
|
27897
|
+
Menu,
|
|
27898
|
+
{
|
|
27899
|
+
position: "bottom-end",
|
|
27900
|
+
trigger: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", "aria-label": t("common.actions"), "data-testid": "action-overflow", children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", size: "xs" }) }),
|
|
27901
|
+
items: itemActions.slice(maxInlineActions).map((action) => ({
|
|
27902
|
+
label: action.label,
|
|
27903
|
+
icon: action.icon,
|
|
27904
|
+
event: action.event,
|
|
27905
|
+
variant: action.variant === "danger" ? "danger" : "default",
|
|
27906
|
+
onClick: () => eventBus.emit(`UI:${action.event}`, {
|
|
27907
|
+
id: row.id,
|
|
27908
|
+
row
|
|
27909
|
+
})
|
|
27910
|
+
}))
|
|
27911
|
+
}
|
|
27912
|
+
)
|
|
27913
|
+
]
|
|
27914
|
+
}
|
|
27915
|
+
)
|
|
27890
27916
|
]
|
|
27891
27917
|
}
|
|
27892
27918
|
);
|
|
@@ -36483,6 +36509,16 @@ function normalizeFieldDefs(fields) {
|
|
|
36483
36509
|
return String(f3);
|
|
36484
36510
|
});
|
|
36485
36511
|
}
|
|
36512
|
+
function buildFieldLabelMap(fields) {
|
|
36513
|
+
const map = {};
|
|
36514
|
+
if (!fields) return map;
|
|
36515
|
+
for (const f3 of fields) {
|
|
36516
|
+
if (typeof f3 === "object" && "key" in f3 && f3.header !== void 0 && f3.header !== "") {
|
|
36517
|
+
map[f3.key] = f3.header;
|
|
36518
|
+
}
|
|
36519
|
+
}
|
|
36520
|
+
return map;
|
|
36521
|
+
}
|
|
36486
36522
|
function buildFieldTypeMap(fields) {
|
|
36487
36523
|
const map = {};
|
|
36488
36524
|
if (!fields) return map;
|
|
@@ -36534,6 +36570,8 @@ var init_DetailPanel = __esm({
|
|
|
36534
36570
|
};
|
|
36535
36571
|
const effectiveFieldNames = isFieldDefArray(propFields) ? normalizeFieldDefs(propFields) : fieldNames;
|
|
36536
36572
|
const fieldTypeMap = isFieldDefArray(propFields) ? buildFieldTypeMap(propFields) : {};
|
|
36573
|
+
const fieldLabelMap = isFieldDefArray(propFields) ? buildFieldLabelMap(propFields) : {};
|
|
36574
|
+
const labelFor = (field) => fieldLabelMap[field] ?? formatFieldLabel(field);
|
|
36537
36575
|
const handleActionClick = useCallback(
|
|
36538
36576
|
(action, data2) => {
|
|
36539
36577
|
if (action.navigatesTo) {
|
|
@@ -36569,7 +36607,7 @@ var init_DetailPanel = __esm({
|
|
|
36569
36607
|
if (typeof field === "string") {
|
|
36570
36608
|
const value = getNestedValue(normalizedData, field);
|
|
36571
36609
|
return {
|
|
36572
|
-
label:
|
|
36610
|
+
label: labelFor(field),
|
|
36573
36611
|
value: formatFieldValue(value, field),
|
|
36574
36612
|
icon: getFieldIcon(field)
|
|
36575
36613
|
};
|
|
@@ -36580,7 +36618,10 @@ var init_DetailPanel = __esm({
|
|
|
36580
36618
|
}
|
|
36581
36619
|
if (normalizedData && effectiveFieldNames) {
|
|
36582
36620
|
const primaryField = effectiveFieldNames[0];
|
|
36583
|
-
|
|
36621
|
+
const titleDerivedFromPrimary = Boolean(
|
|
36622
|
+
!title && primaryField && normalizedData[primaryField]
|
|
36623
|
+
);
|
|
36624
|
+
if (titleDerivedFromPrimary) {
|
|
36584
36625
|
title = String(normalizedData[primaryField]);
|
|
36585
36626
|
}
|
|
36586
36627
|
const statusFields = effectiveFieldNames.filter(
|
|
@@ -36599,16 +36640,16 @@ var init_DetailPanel = __esm({
|
|
|
36599
36640
|
(f3) => f3.toLowerCase().includes("description") || f3.toLowerCase().includes("note")
|
|
36600
36641
|
);
|
|
36601
36642
|
const otherFields = effectiveFieldNames.filter(
|
|
36602
|
-
(f3) => f3 !== primaryField && !statusFields.includes(f3) && !progressFields.includes(f3) && !metricFields.includes(f3) && !dateFields.includes(f3) && !descriptionFields.includes(f3)
|
|
36643
|
+
(f3) => (!titleDerivedFromPrimary || f3 !== primaryField) && !statusFields.includes(f3) && !progressFields.includes(f3) && !metricFields.includes(f3) && !dateFields.includes(f3) && !descriptionFields.includes(f3)
|
|
36603
36644
|
);
|
|
36604
36645
|
sections = [];
|
|
36605
36646
|
if (statusFields.length > 0 || otherFields.length > 0) {
|
|
36606
36647
|
const overviewFields = [];
|
|
36607
|
-
[...statusFields, ...otherFields
|
|
36648
|
+
[...statusFields, ...otherFields].forEach((field) => {
|
|
36608
36649
|
const value = getNestedValue(normalizedData, field);
|
|
36609
36650
|
if (value !== void 0 && value !== null) {
|
|
36610
36651
|
overviewFields.push({
|
|
36611
|
-
label:
|
|
36652
|
+
label: labelFor(field),
|
|
36612
36653
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
36613
36654
|
icon: getFieldIcon(field)
|
|
36614
36655
|
});
|
|
@@ -36624,7 +36665,7 @@ var init_DetailPanel = __esm({
|
|
|
36624
36665
|
const value = getNestedValue(normalizedData, field);
|
|
36625
36666
|
if (value !== void 0 && value !== null) {
|
|
36626
36667
|
metricsFields.push({
|
|
36627
|
-
label:
|
|
36668
|
+
label: labelFor(field),
|
|
36628
36669
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
36629
36670
|
icon: getFieldIcon(field)
|
|
36630
36671
|
});
|
|
@@ -36640,7 +36681,7 @@ var init_DetailPanel = __esm({
|
|
|
36640
36681
|
const value = getNestedValue(normalizedData, field);
|
|
36641
36682
|
if (value !== void 0 && value !== null) {
|
|
36642
36683
|
timelineFields.push({
|
|
36643
|
-
label:
|
|
36684
|
+
label: labelFor(field),
|
|
36644
36685
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
36645
36686
|
icon: getFieldIcon(field)
|
|
36646
36687
|
});
|
|
@@ -36656,7 +36697,7 @@ var init_DetailPanel = __esm({
|
|
|
36656
36697
|
const value = getNestedValue(normalizedData, field);
|
|
36657
36698
|
if (value !== void 0 && value !== null) {
|
|
36658
36699
|
descFields.push({
|
|
36659
|
-
label:
|
|
36700
|
+
label: labelFor(field),
|
|
36660
36701
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
36661
36702
|
icon: getFieldIcon(field)
|
|
36662
36703
|
});
|
|
@@ -36704,7 +36745,7 @@ var init_DetailPanel = __esm({
|
|
|
36704
36745
|
if (typeof field === "string") {
|
|
36705
36746
|
const value = normalizedData ? getNestedValue(normalizedData, field) : void 0;
|
|
36706
36747
|
allFields.push({
|
|
36707
|
-
label:
|
|
36748
|
+
label: labelFor(field),
|
|
36708
36749
|
value: renderRichFieldValue(value, field, fieldTypeMap[field]),
|
|
36709
36750
|
icon: getFieldIcon(field)
|
|
36710
36751
|
});
|
|
@@ -43226,6 +43267,13 @@ function MaybeTraitScope({
|
|
|
43226
43267
|
if (wrap) {
|
|
43227
43268
|
return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: sourceTrait, children });
|
|
43228
43269
|
}
|
|
43270
|
+
if (sourceTrait !== void 0 && schemaCtx !== null) {
|
|
43271
|
+
scopeWrapLog.warn("decline", {
|
|
43272
|
+
sourceTrait,
|
|
43273
|
+
orbitalsByTraitSize: schemaCtx.orbitalsByTrait.size,
|
|
43274
|
+
reason: "sourceTrait not in orbitalsByTrait \u2014 children render unscoped"
|
|
43275
|
+
});
|
|
43276
|
+
}
|
|
43229
43277
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
43230
43278
|
}
|
|
43231
43279
|
function UISlotComponent({
|
|
@@ -43523,7 +43571,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
43523
43571
|
const childId = `${parentId}-${index}`;
|
|
43524
43572
|
const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
|
|
43525
43573
|
const childAsRecord = child;
|
|
43526
|
-
const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = childAsRecord;
|
|
43574
|
+
const { type: _childType, props: nestedProps, _id: _childNodeId, _sourceTrait: childSourceTrait, children: _childChildren, ...flatProps } = childAsRecord;
|
|
43527
43575
|
const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
|
|
43528
43576
|
if (_childChildren !== void 0 && nestedProps === void 0) {
|
|
43529
43577
|
resolvedProps.children = _childChildren;
|
|
@@ -43538,11 +43586,14 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
43538
43586
|
// (e.g. form-section inside a stack) can resolve entityDef via
|
|
43539
43587
|
// the trait's linkedEntity for form-field enrichment. The orbCtx
|
|
43540
43588
|
// (slot/transition/state/entity) propagates the same way so every
|
|
43541
|
-
// nested node carries a complete contextual-edit address.
|
|
43542
|
-
|
|
43589
|
+
// nested node carries a complete contextual-edit address. A child
|
|
43590
|
+
// carrying its own `_sourceTrait` (multi-source slot stack) owns it
|
|
43591
|
+
// outright — inheriting the synthetic wrapper's sentinel instead
|
|
43592
|
+
// would erase the real owner.
|
|
43593
|
+
...childSourceTrait !== void 0 ? { sourceTrait: childSourceTrait } : sourceTrait !== void 0 && { sourceTrait },
|
|
43543
43594
|
...orbCtx ?? {}
|
|
43544
43595
|
};
|
|
43545
|
-
|
|
43596
|
+
const renderedChild = /* @__PURE__ */ jsx(
|
|
43546
43597
|
SlotContentRenderer,
|
|
43547
43598
|
{
|
|
43548
43599
|
content: childContent,
|
|
@@ -43551,6 +43602,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
43551
43602
|
},
|
|
43552
43603
|
childId
|
|
43553
43604
|
);
|
|
43605
|
+
return childSourceTrait !== void 0 ? /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait: childSourceTrait, children: renderedChild }, childId) : renderedChild;
|
|
43554
43606
|
});
|
|
43555
43607
|
}
|
|
43556
43608
|
function toDrawableNodes(children) {
|
|
@@ -45834,11 +45886,9 @@ function OrbPreview({
|
|
|
45834
45886
|
}, [parsedSchema]);
|
|
45835
45887
|
const initialPageMatch = useMemo(() => {
|
|
45836
45888
|
if (!initialPagePath) return void 0;
|
|
45837
|
-
|
|
45838
|
-
|
|
45839
|
-
|
|
45840
|
-
}
|
|
45841
|
-
return void 0;
|
|
45889
|
+
const hit = matchPathAmong(pages, initialPagePath, (entry) => entry.page.path);
|
|
45890
|
+
if (!hit) return void 0;
|
|
45891
|
+
return { name: hit.candidate.page.name, params: hit.params };
|
|
45842
45892
|
}, [pages, initialPagePath]);
|
|
45843
45893
|
const initialPageName = initialPageMatch?.name;
|
|
45844
45894
|
const [currentPage, setCurrentPage] = useState(initialPageName);
|
|
@@ -45852,16 +45902,9 @@ function OrbPreview({
|
|
|
45852
45902
|
}
|
|
45853
45903
|
}, [initialPagePath, initialPageName, initialPageMatch]);
|
|
45854
45904
|
const handleNavigate = useCallback((path) => {
|
|
45855
|
-
|
|
45856
|
-
|
|
45857
|
-
|
|
45858
|
-
const m = entry.page.path ? matchPath(entry.page.path, path) : null;
|
|
45859
|
-
if (m !== null) {
|
|
45860
|
-
match = entry;
|
|
45861
|
-
params = m;
|
|
45862
|
-
break;
|
|
45863
|
-
}
|
|
45864
|
-
}
|
|
45905
|
+
const hit = matchPathAmong(pages, path, (entry) => entry.page.path);
|
|
45906
|
+
const match = hit?.candidate;
|
|
45907
|
+
const params = hit?.params ?? {};
|
|
45865
45908
|
navLog.debug("handleNavigate", () => ({
|
|
45866
45909
|
path,
|
|
45867
45910
|
matched: match?.page.name ?? null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.126.0",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
"access": "public"
|
|
118
118
|
},
|
|
119
119
|
"dependencies": {
|
|
120
|
-
"@almadar/core": "^10.
|
|
121
|
-
"@almadar/evaluator": "^2.
|
|
122
|
-
"@almadar/logger": "^1.
|
|
123
|
-
"@almadar/runtime": "^6.
|
|
124
|
-
"@almadar/std": "^16.
|
|
125
|
-
"@almadar/syntax": "^1.
|
|
120
|
+
"@almadar/core": "^10.34.0",
|
|
121
|
+
"@almadar/evaluator": "^2.35.0",
|
|
122
|
+
"@almadar/logger": "^1.10.0",
|
|
123
|
+
"@almadar/runtime": "^6.37.0",
|
|
124
|
+
"@almadar/std": "^16.144.0",
|
|
125
|
+
"@almadar/syntax": "^1.12.0",
|
|
126
126
|
"@dnd-kit/core": "^6.3.1",
|
|
127
127
|
"@dnd-kit/sortable": "^10.0.0",
|
|
128
128
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -208,9 +208,10 @@
|
|
|
208
208
|
"tsup": "^8.0.0",
|
|
209
209
|
"tsx": "^4.7.0",
|
|
210
210
|
"turbo": "^2.8.17",
|
|
211
|
-
"typescript": "^5.4.0",
|
|
212
211
|
"vite": "^5.2.0",
|
|
213
|
-
"vitest": "^3.2.6"
|
|
212
|
+
"vitest": "^3.2.6",
|
|
213
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
214
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
214
215
|
},
|
|
215
216
|
"repository": {
|
|
216
217
|
"type": "git",
|
|
@@ -230,7 +231,7 @@
|
|
|
230
231
|
"@almadar/core": "$@almadar/core"
|
|
231
232
|
},
|
|
232
233
|
"scripts": {
|
|
233
|
-
"build": "NODE_OPTIONS=--max-old-space-size=8192 tsup",
|
|
234
|
+
"build": "rm -rf dist && NODE_OPTIONS=--max-old-space-size=8192 tsup",
|
|
234
235
|
"build:watch": "tsup --watch",
|
|
235
236
|
"typecheck": "tsc --noEmit",
|
|
236
237
|
"lint": "eslint --no-warn-ignored --max-warnings 0 .",
|