@almadar/ui 5.144.0 → 5.146.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 +8 -3
- package/dist/avl/index.js +9 -4
- package/dist/components/index.cjs +2 -2
- package/dist/components/index.d.cts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +2 -2
- package/dist/providers/index.cjs +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/runtime/index.cjs +8 -3
- package/dist/runtime/index.js +9 -4
- package/package.json +3 -3
package/dist/avl/index.cjs
CHANGED
|
@@ -24926,7 +24926,7 @@ var init_DashboardLayout = __esm({
|
|
|
24926
24926
|
}, [isMobile, sidebarOpen]);
|
|
24927
24927
|
const location = reactRouterDom.useLocation();
|
|
24928
24928
|
const ctxPagePath = providers.useCurrentPagePath();
|
|
24929
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
24929
|
+
const activePath = (currentPath || void 0) ?? ctxPagePath ?? location.pathname;
|
|
24930
24930
|
const { signOut: authSignOut } = useAuthContext();
|
|
24931
24931
|
const user = userProp || (null);
|
|
24932
24932
|
const { t } = hooks.useTranslate();
|
|
@@ -53467,6 +53467,11 @@ function OrbPreview({
|
|
|
53467
53467
|
setRouteParams(initialPageMatch?.params ?? {});
|
|
53468
53468
|
}
|
|
53469
53469
|
}, [initialPagePath, initialPageName, initialPageMatch]);
|
|
53470
|
+
const currentPagePath = React94.useMemo(() => {
|
|
53471
|
+
const activePageName = currentPage ?? pages[0]?.page.name;
|
|
53472
|
+
const resolved = pages.find((p) => p.page.name === activePageName)?.page.path;
|
|
53473
|
+
return resolved ?? initialPagePath;
|
|
53474
|
+
}, [pages, currentPage, initialPagePath]);
|
|
53470
53475
|
const handleNavigate = React94.useCallback((path) => {
|
|
53471
53476
|
const hit = providers.matchPathAmong(pages, path, (entry) => entry.page.path);
|
|
53472
53477
|
const match = hit?.candidate;
|
|
@@ -53540,7 +53545,7 @@ function OrbPreview({
|
|
|
53540
53545
|
style: { height },
|
|
53541
53546
|
children: [
|
|
53542
53547
|
localFallback && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-3 py-2 bg-[var(--color-warning)] bg-opacity-10 border-b border-[var(--color-warning)] flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-[var(--color-warning-foreground)] flex-1", children: "Preview server unreachable \u2014 running locally. Server-side state and persistence are disabled." }) }),
|
|
53543
|
-
/* @__PURE__ */ jsxRuntime.jsx(providers.OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, children: /* @__PURE__ */ jsxRuntime.jsx(context.UISlotProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
53548
|
+
/* @__PURE__ */ jsxRuntime.jsx(providers.CurrentPagePathProvider, { value: currentPagePath, children: /* @__PURE__ */ jsxRuntime.jsx(providers.OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, children: /* @__PURE__ */ jsxRuntime.jsx(context.UISlotProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
53544
53549
|
SchemaRunner,
|
|
53545
53550
|
{
|
|
53546
53551
|
schema: parseResult.schema,
|
|
@@ -53553,7 +53558,7 @@ function OrbPreview({
|
|
|
53553
53558
|
onLocalFallback: handleLocalFallback,
|
|
53554
53559
|
persistence
|
|
53555
53560
|
}
|
|
53556
|
-
) }) })
|
|
53561
|
+
) }) }) })
|
|
53557
53562
|
]
|
|
53558
53563
|
}
|
|
53559
53564
|
);
|
package/dist/avl/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React94 from 'react';
|
|
3
3
|
import React94__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
|
-
import { getAllPages, matchPathAmong, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext, useEntitySchema, useEntitySchemaOptional, useEntityBindingSnapshot, TraitScopeProvider, useTraitScope, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
|
|
4
|
+
import { getAllPages, matchPathAmong, CurrentPagePathProvider, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext, useEntitySchema, useEntitySchemaOptional, useEntityBindingSnapshot, TraitScopeProvider, useTraitScope, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
7
7
|
import { MarkerType, useReactFlow, Handle, Position, getBezierPath, EdgeLabelRenderer, useNodeId, ReactFlowProvider, BaseEdge, useNodesState, useEdgesState, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
|
|
@@ -24850,7 +24850,7 @@ var init_DashboardLayout = __esm({
|
|
|
24850
24850
|
}, [isMobile, sidebarOpen]);
|
|
24851
24851
|
const location = useLocation();
|
|
24852
24852
|
const ctxPagePath = useCurrentPagePath();
|
|
24853
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
24853
|
+
const activePath = (currentPath || void 0) ?? ctxPagePath ?? location.pathname;
|
|
24854
24854
|
const { signOut: authSignOut } = useAuthContext();
|
|
24855
24855
|
const user = userProp || (null);
|
|
24856
24856
|
const { t } = useTranslate();
|
|
@@ -53391,6 +53391,11 @@ function OrbPreview({
|
|
|
53391
53391
|
setRouteParams(initialPageMatch?.params ?? {});
|
|
53392
53392
|
}
|
|
53393
53393
|
}, [initialPagePath, initialPageName, initialPageMatch]);
|
|
53394
|
+
const currentPagePath = useMemo(() => {
|
|
53395
|
+
const activePageName = currentPage ?? pages[0]?.page.name;
|
|
53396
|
+
const resolved = pages.find((p) => p.page.name === activePageName)?.page.path;
|
|
53397
|
+
return resolved ?? initialPagePath;
|
|
53398
|
+
}, [pages, currentPage, initialPagePath]);
|
|
53394
53399
|
const handleNavigate = useCallback((path) => {
|
|
53395
53400
|
const hit = matchPathAmong(pages, path, (entry) => entry.page.path);
|
|
53396
53401
|
const match = hit?.candidate;
|
|
@@ -53464,7 +53469,7 @@ function OrbPreview({
|
|
|
53464
53469
|
style: { height },
|
|
53465
53470
|
children: [
|
|
53466
53471
|
localFallback && /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 bg-[var(--color-warning)] bg-opacity-10 border-b border-[var(--color-warning)] flex items-center gap-2", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-[var(--color-warning-foreground)] flex-1", children: "Preview server unreachable \u2014 running locally. Server-side state and persistence are disabled." }) }),
|
|
53467
|
-
/* @__PURE__ */ jsx(OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, children: /* @__PURE__ */ jsx(UISlotProvider, { children: /* @__PURE__ */ jsx(
|
|
53472
|
+
/* @__PURE__ */ jsx(CurrentPagePathProvider, { value: currentPagePath, children: /* @__PURE__ */ jsx(OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, children: /* @__PURE__ */ jsx(UISlotProvider, { children: /* @__PURE__ */ jsx(
|
|
53468
53473
|
SchemaRunner,
|
|
53469
53474
|
{
|
|
53470
53475
|
schema: parseResult.schema,
|
|
@@ -53477,7 +53482,7 @@ function OrbPreview({
|
|
|
53477
53482
|
onLocalFallback: handleLocalFallback,
|
|
53478
53483
|
persistence
|
|
53479
53484
|
}
|
|
53480
|
-
) }) })
|
|
53485
|
+
) }) }) })
|
|
53481
53486
|
]
|
|
53482
53487
|
}
|
|
53483
53488
|
);
|
|
@@ -20342,7 +20342,7 @@ var init_DashboardLayout = __esm({
|
|
|
20342
20342
|
}, [isMobile, sidebarOpen]);
|
|
20343
20343
|
const location = reactRouterDom.useLocation();
|
|
20344
20344
|
const ctxPagePath = providers.useCurrentPagePath();
|
|
20345
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
20345
|
+
const activePath = (currentPath || void 0) ?? ctxPagePath ?? location.pathname;
|
|
20346
20346
|
const { user: authUser, signOut: authSignOut } = useAuthContext();
|
|
20347
20347
|
const user = userProp || (authUser ? {
|
|
20348
20348
|
name: authUser.displayName || authUser.email?.split("@")[0] || "User",
|
|
@@ -39325,7 +39325,7 @@ function parseLessonSegments(lesson) {
|
|
|
39325
39325
|
content = content.replace(connectResult.fullMatch, "").trim();
|
|
39326
39326
|
}
|
|
39327
39327
|
const tagRegex = new RegExp(
|
|
39328
|
-
'(?<reflect><reflect>(?<reflectClosed>[\\s\\S]*?)<\\/reflect>)|(?<reflectUnclosed><reflect>(?<reflectOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<bloom><bloom\\s+level="(?<bloomLevel>remember|understand|apply|analyze|evaluate|create)">(?<bloomClosed>[\\s\\S]*?)<\\/bloom>)|(?<bloomUnclosed><bloom\\s+level="(?<bloomLevelUn>remember|understand|apply|analyze|evaluate|create)">(?<bloomOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<quiz><question>(?<quizQuestion>[\\s\\S]*?)<\\/question>\\s*<answer>(?<quizAnswer>[\\s\\S]*?)<\\/answer>)|(?<visualize><visualize\\s+type="(?<vizType>
|
|
39328
|
+
'(?<reflect><reflect>(?<reflectClosed>[\\s\\S]*?)<\\/reflect>)|(?<reflectUnclosed><reflect>(?<reflectOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<bloom><bloom\\s+level="(?<bloomLevel>remember|understand|apply|analyze|evaluate|create)">(?<bloomClosed>[\\s\\S]*?)<\\/bloom>)|(?<bloomUnclosed><bloom\\s+level="(?<bloomLevelUn>remember|understand|apply|analyze|evaluate|create)">(?<bloomOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<quiz><question>(?<quizQuestion>[\\s\\S]*?)<\\/question>\\s*<answer>(?<quizAnswer>[\\s\\S]*?)<\\/answer>)|(?<visualize><visualize\\s+type="(?<vizType>algorithms|math|physics|biology|chemistry|probability|freeform)"\\s+description="(?<vizDesc>[^"]*?)"\\s*\\/?>)',
|
|
39329
39329
|
"gi"
|
|
39330
39330
|
);
|
|
39331
39331
|
let lastIndex = 0;
|
|
@@ -6521,7 +6521,7 @@ interface DataGridProps extends DataDndProps {
|
|
|
6521
6521
|
*/
|
|
6522
6522
|
look?: "dense" | "spacious" | "striped" | "borderless" | "card-rows";
|
|
6523
6523
|
}
|
|
6524
|
-
declare function DataGrid({ entity, fields, columns, itemActions, maxInlineActions, scrollX, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataGridProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> |
|
|
6524
|
+
declare function DataGrid({ entity, fields, columns, itemActions, maxInlineActions, scrollX, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataGridProps): string | number | bigint | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
|
|
6525
6525
|
declare namespace DataGrid {
|
|
6526
6526
|
var displayName: string;
|
|
6527
6527
|
}
|
|
@@ -6674,7 +6674,7 @@ interface DataListProps extends DataDndProps {
|
|
|
6674
6674
|
*/
|
|
6675
6675
|
look?: "dense" | "spacious" | "striped" | "borderless" | "card-rows";
|
|
6676
6676
|
}
|
|
6677
|
-
declare function DataList({ entity, fields, columns, itemActions, maxInlineActions, itemClickEvent, gap, variant, groupBy, senderField, senderLabelField, currentUser, emptyMessage, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, sortBy, sortDirection, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataListProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> |
|
|
6677
|
+
declare function DataList({ entity, fields, columns, itemActions, maxInlineActions, itemClickEvent, gap, variant, groupBy, senderField, senderLabelField, currentUser, emptyMessage, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, sortBy, sortDirection, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataListProps): string | number | bigint | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
|
|
6678
6678
|
declare namespace DataList {
|
|
6679
6679
|
var displayName: string;
|
|
6680
6680
|
}
|
|
@@ -9506,7 +9506,7 @@ declare function parseMarkdownWithCodeBlocks(content: string): MixedSegment[];
|
|
|
9506
9506
|
* until the next recognised tag, a section heading (`\n\n#`), or end-of-input.
|
|
9507
9507
|
*/
|
|
9508
9508
|
|
|
9509
|
-
type InteractiveOrbitalType = '
|
|
9509
|
+
type InteractiveOrbitalType = 'algorithms' | 'math' | 'physics' | 'biology' | 'chemistry' | 'probability' | 'freeform';
|
|
9510
9510
|
type LessonSegment = MixedSegment | {
|
|
9511
9511
|
type: 'quiz';
|
|
9512
9512
|
question: string;
|
|
@@ -6521,7 +6521,7 @@ interface DataGridProps extends DataDndProps {
|
|
|
6521
6521
|
*/
|
|
6522
6522
|
look?: "dense" | "spacious" | "striped" | "borderless" | "card-rows";
|
|
6523
6523
|
}
|
|
6524
|
-
declare function DataGrid({ entity, fields, columns, itemActions, maxInlineActions, scrollX, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataGridProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> |
|
|
6524
|
+
declare function DataGrid({ entity, fields, columns, itemActions, maxInlineActions, scrollX, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataGridProps): string | number | bigint | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
|
|
6525
6525
|
declare namespace DataGrid {
|
|
6526
6526
|
var displayName: string;
|
|
6527
6527
|
}
|
|
@@ -6674,7 +6674,7 @@ interface DataListProps extends DataDndProps {
|
|
|
6674
6674
|
*/
|
|
6675
6675
|
look?: "dense" | "spacious" | "striped" | "borderless" | "card-rows";
|
|
6676
6676
|
}
|
|
6677
|
-
declare function DataList({ entity, fields, columns, itemActions, maxInlineActions, itemClickEvent, gap, variant, groupBy, senderField, senderLabelField, currentUser, emptyMessage, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, sortBy, sortDirection, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataListProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> |
|
|
6677
|
+
declare function DataList({ entity, fields, columns, itemActions, maxInlineActions, itemClickEvent, gap, variant, groupBy, senderField, senderLabelField, currentUser, emptyMessage, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, sortBy, sortDirection, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataListProps): string | number | bigint | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
|
|
6678
6678
|
declare namespace DataList {
|
|
6679
6679
|
var displayName: string;
|
|
6680
6680
|
}
|
|
@@ -9506,7 +9506,7 @@ declare function parseMarkdownWithCodeBlocks(content: string): MixedSegment[];
|
|
|
9506
9506
|
* until the next recognised tag, a section heading (`\n\n#`), or end-of-input.
|
|
9507
9507
|
*/
|
|
9508
9508
|
|
|
9509
|
-
type InteractiveOrbitalType = '
|
|
9509
|
+
type InteractiveOrbitalType = 'algorithms' | 'math' | 'physics' | 'biology' | 'chemistry' | 'probability' | 'freeform';
|
|
9510
9510
|
type LessonSegment = MixedSegment | {
|
|
9511
9511
|
type: 'quiz';
|
|
9512
9512
|
question: string;
|
package/dist/components/index.js
CHANGED
|
@@ -20267,7 +20267,7 @@ var init_DashboardLayout = __esm({
|
|
|
20267
20267
|
}, [isMobile, sidebarOpen]);
|
|
20268
20268
|
const location = useLocation();
|
|
20269
20269
|
const ctxPagePath = useCurrentPagePath();
|
|
20270
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
20270
|
+
const activePath = (currentPath || void 0) ?? ctxPagePath ?? location.pathname;
|
|
20271
20271
|
const { user: authUser, signOut: authSignOut } = useAuthContext();
|
|
20272
20272
|
const user = userProp || (authUser ? {
|
|
20273
20273
|
name: authUser.displayName || authUser.email?.split("@")[0] || "User",
|
|
@@ -39250,7 +39250,7 @@ function parseLessonSegments(lesson) {
|
|
|
39250
39250
|
content = content.replace(connectResult.fullMatch, "").trim();
|
|
39251
39251
|
}
|
|
39252
39252
|
const tagRegex = new RegExp(
|
|
39253
|
-
'(?<reflect><reflect>(?<reflectClosed>[\\s\\S]*?)<\\/reflect>)|(?<reflectUnclosed><reflect>(?<reflectOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<bloom><bloom\\s+level="(?<bloomLevel>remember|understand|apply|analyze|evaluate|create)">(?<bloomClosed>[\\s\\S]*?)<\\/bloom>)|(?<bloomUnclosed><bloom\\s+level="(?<bloomLevelUn>remember|understand|apply|analyze|evaluate|create)">(?<bloomOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<quiz><question>(?<quizQuestion>[\\s\\S]*?)<\\/question>\\s*<answer>(?<quizAnswer>[\\s\\S]*?)<\\/answer>)|(?<visualize><visualize\\s+type="(?<vizType>
|
|
39253
|
+
'(?<reflect><reflect>(?<reflectClosed>[\\s\\S]*?)<\\/reflect>)|(?<reflectUnclosed><reflect>(?<reflectOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<bloom><bloom\\s+level="(?<bloomLevel>remember|understand|apply|analyze|evaluate|create)">(?<bloomClosed>[\\s\\S]*?)<\\/bloom>)|(?<bloomUnclosed><bloom\\s+level="(?<bloomLevelUn>remember|understand|apply|analyze|evaluate|create)">(?<bloomOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<quiz><question>(?<quizQuestion>[\\s\\S]*?)<\\/question>\\s*<answer>(?<quizAnswer>[\\s\\S]*?)<\\/answer>)|(?<visualize><visualize\\s+type="(?<vizType>algorithms|math|physics|biology|chemistry|probability|freeform)"\\s+description="(?<vizDesc>[^"]*?)"\\s*\\/?>)',
|
|
39254
39254
|
"gi"
|
|
39255
39255
|
);
|
|
39256
39256
|
let lastIndex = 0;
|
package/dist/providers/index.cjs
CHANGED
|
@@ -22661,7 +22661,7 @@ var init_DashboardLayout = __esm({
|
|
|
22661
22661
|
}, [isMobile, sidebarOpen]);
|
|
22662
22662
|
const location = reactRouterDom.useLocation();
|
|
22663
22663
|
const ctxPagePath = providers.useCurrentPagePath();
|
|
22664
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
22664
|
+
const activePath = (currentPath || void 0) ?? ctxPagePath ?? location.pathname;
|
|
22665
22665
|
const { signOut: authSignOut } = useAuthContext();
|
|
22666
22666
|
const user = userProp || (null);
|
|
22667
22667
|
const { t } = hooks.useTranslate();
|
package/dist/providers/index.js
CHANGED
|
@@ -22587,7 +22587,7 @@ var init_DashboardLayout = __esm({
|
|
|
22587
22587
|
}, [isMobile, sidebarOpen]);
|
|
22588
22588
|
const location = useLocation();
|
|
22589
22589
|
const ctxPagePath = useCurrentPagePath();
|
|
22590
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
22590
|
+
const activePath = (currentPath || void 0) ?? ctxPagePath ?? location.pathname;
|
|
22591
22591
|
const { signOut: authSignOut } = useAuthContext();
|
|
22592
22592
|
const user = userProp || (null);
|
|
22593
22593
|
const { t } = useTranslate();
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -22234,7 +22234,7 @@ var init_DashboardLayout = __esm({
|
|
|
22234
22234
|
}, [isMobile, sidebarOpen]);
|
|
22235
22235
|
const location = reactRouterDom.useLocation();
|
|
22236
22236
|
const ctxPagePath = providers.useCurrentPagePath();
|
|
22237
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
22237
|
+
const activePath = (currentPath || void 0) ?? ctxPagePath ?? location.pathname;
|
|
22238
22238
|
const { signOut: authSignOut } = useAuthContext();
|
|
22239
22239
|
const user = userProp || (null);
|
|
22240
22240
|
const { t } = hooks.useTranslate();
|
|
@@ -47689,6 +47689,11 @@ function OrbPreview({
|
|
|
47689
47689
|
setRouteParams(initialPageMatch?.params ?? {});
|
|
47690
47690
|
}
|
|
47691
47691
|
}, [initialPagePath, initialPageName, initialPageMatch]);
|
|
47692
|
+
const currentPagePath = React85.useMemo(() => {
|
|
47693
|
+
const activePageName = currentPage ?? pages[0]?.page.name;
|
|
47694
|
+
const resolved = pages.find((p) => p.page.name === activePageName)?.page.path;
|
|
47695
|
+
return resolved ?? initialPagePath;
|
|
47696
|
+
}, [pages, currentPage, initialPagePath]);
|
|
47692
47697
|
const handleNavigate = React85.useCallback((path) => {
|
|
47693
47698
|
const hit = providers.matchPathAmong(pages, path, (entry) => entry.page.path);
|
|
47694
47699
|
const match = hit?.candidate;
|
|
@@ -47762,7 +47767,7 @@ function OrbPreview({
|
|
|
47762
47767
|
style: { height },
|
|
47763
47768
|
children: [
|
|
47764
47769
|
localFallback && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-3 py-2 bg-[var(--color-warning)] bg-opacity-10 border-b border-[var(--color-warning)] flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", className: "text-[var(--color-warning-foreground)] flex-1", children: "Preview server unreachable \u2014 running locally. Server-side state and persistence are disabled." }) }),
|
|
47765
|
-
/* @__PURE__ */ jsxRuntime.jsx(providers.OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, children: /* @__PURE__ */ jsxRuntime.jsx(context.UISlotProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
47770
|
+
/* @__PURE__ */ jsxRuntime.jsx(providers.CurrentPagePathProvider, { value: currentPagePath, children: /* @__PURE__ */ jsxRuntime.jsx(providers.OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, children: /* @__PURE__ */ jsxRuntime.jsx(context.UISlotProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
47766
47771
|
SchemaRunner,
|
|
47767
47772
|
{
|
|
47768
47773
|
schema: parseResult.schema,
|
|
@@ -47775,7 +47780,7 @@ function OrbPreview({
|
|
|
47775
47780
|
onLocalFallback: handleLocalFallback,
|
|
47776
47781
|
persistence
|
|
47777
47782
|
}
|
|
47778
|
-
) }) })
|
|
47783
|
+
) }) }) })
|
|
47779
47784
|
]
|
|
47780
47785
|
}
|
|
47781
47786
|
);
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React85 from 'react';
|
|
2
2
|
import React85__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
|
-
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, useEntitySchema, getAllPages, matchPathAmong, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext } from '@almadar/ui/providers';
|
|
3
|
+
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, useEntitySchema, getAllPages, matchPathAmong, CurrentPagePathProvider, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext } 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 { StateMachineManager, collectDeclaredConfigDefaults, resolveCallSitePayloadCaptures, createServerEffectHandlers, EffectExecutor, createContextFromBindings, createTickScheduler, isValidCronExpression, parseDurationString, InMemoryPersistence, normalizeCallSiteConfigToValues, interpolateValue } from '@almadar/runtime';
|
|
@@ -22160,7 +22160,7 @@ var init_DashboardLayout = __esm({
|
|
|
22160
22160
|
}, [isMobile, sidebarOpen]);
|
|
22161
22161
|
const location = useLocation();
|
|
22162
22162
|
const ctxPagePath = useCurrentPagePath();
|
|
22163
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
22163
|
+
const activePath = (currentPath || void 0) ?? ctxPagePath ?? location.pathname;
|
|
22164
22164
|
const { signOut: authSignOut } = useAuthContext();
|
|
22165
22165
|
const user = userProp || (null);
|
|
22166
22166
|
const { t } = useTranslate();
|
|
@@ -47615,6 +47615,11 @@ function OrbPreview({
|
|
|
47615
47615
|
setRouteParams(initialPageMatch?.params ?? {});
|
|
47616
47616
|
}
|
|
47617
47617
|
}, [initialPagePath, initialPageName, initialPageMatch]);
|
|
47618
|
+
const currentPagePath = useMemo(() => {
|
|
47619
|
+
const activePageName = currentPage ?? pages[0]?.page.name;
|
|
47620
|
+
const resolved = pages.find((p) => p.page.name === activePageName)?.page.path;
|
|
47621
|
+
return resolved ?? initialPagePath;
|
|
47622
|
+
}, [pages, currentPage, initialPagePath]);
|
|
47618
47623
|
const handleNavigate = useCallback((path) => {
|
|
47619
47624
|
const hit = matchPathAmong(pages, path, (entry) => entry.page.path);
|
|
47620
47625
|
const match = hit?.candidate;
|
|
@@ -47688,7 +47693,7 @@ function OrbPreview({
|
|
|
47688
47693
|
style: { height },
|
|
47689
47694
|
children: [
|
|
47690
47695
|
localFallback && /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 bg-[var(--color-warning)] bg-opacity-10 border-b border-[var(--color-warning)] flex items-center gap-2", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-[var(--color-warning-foreground)] flex-1", children: "Preview server unreachable \u2014 running locally. Server-side state and persistence are disabled." }) }),
|
|
47691
|
-
/* @__PURE__ */ jsx(OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, children: /* @__PURE__ */ jsx(UISlotProvider, { children: /* @__PURE__ */ jsx(
|
|
47696
|
+
/* @__PURE__ */ jsx(CurrentPagePathProvider, { value: currentPagePath, children: /* @__PURE__ */ jsx(OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, children: /* @__PURE__ */ jsx(UISlotProvider, { children: /* @__PURE__ */ jsx(
|
|
47692
47697
|
SchemaRunner,
|
|
47693
47698
|
{
|
|
47694
47699
|
schema: parseResult.schema,
|
|
@@ -47701,7 +47706,7 @@ function OrbPreview({
|
|
|
47701
47706
|
onLocalFallback: handleLocalFallback,
|
|
47702
47707
|
persistence
|
|
47703
47708
|
}
|
|
47704
|
-
) }) })
|
|
47709
|
+
) }) }) })
|
|
47705
47710
|
]
|
|
47706
47711
|
}
|
|
47707
47712
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.146.0",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -118,10 +118,10 @@
|
|
|
118
118
|
"access": "public"
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@almadar/core": "^10.
|
|
121
|
+
"@almadar/core": "^10.52.0",
|
|
122
122
|
"@almadar/evaluator": "^2.39.0",
|
|
123
123
|
"@almadar/logger": "^1.11.0",
|
|
124
|
-
"@almadar/runtime": "^6.
|
|
124
|
+
"@almadar/runtime": "^6.51.0",
|
|
125
125
|
"@almadar/std": "^16.163.0",
|
|
126
126
|
"@almadar/syntax": "^1.14.0",
|
|
127
127
|
"@dnd-kit/core": "^6.3.1",
|