@almadar/ui 1.0.24 → 1.0.25
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { apiClient } from './chunk-XSEDIUM6.js';
|
|
2
|
-
import { useEventBus, SelectionContext, entityDataKeys } from './chunk-
|
|
2
|
+
import { useEventBus, SelectionContext, entityDataKeys } from './chunk-HY5EFCOK.js';
|
|
3
3
|
import { subscribe, getSnapshot, clearEntities, removeEntity, updateSingleton, updateEntity, spawnEntity, getSingleton, getAllEntities, getByType, getEntity } from './chunk-N7MVUW4R.js';
|
|
4
4
|
import { useCallback, useState, useEffect, useMemo, useContext, useSyncExternalStore } from 'react';
|
|
5
5
|
import { useQueryClient, useMutation, useQuery } from '@tanstack/react-query';
|
|
@@ -942,7 +942,9 @@ function useUIEvents(dispatch, validEvents, eventBusInstance) {
|
|
|
942
942
|
});
|
|
943
943
|
}
|
|
944
944
|
return () => {
|
|
945
|
-
unsubscribes.forEach((unsub) =>
|
|
945
|
+
unsubscribes.forEach((unsub) => {
|
|
946
|
+
if (typeof unsub === "function") unsub();
|
|
947
|
+
});
|
|
946
948
|
};
|
|
947
949
|
}, [eventBus, dispatch, stableValidEvents]);
|
|
948
950
|
}
|
|
@@ -969,11 +971,11 @@ function useSelectedEntity(eventBusInstance) {
|
|
|
969
971
|
const unsubClose = eventBus.on("UI:CLOSE", handleDeselect);
|
|
970
972
|
const unsubCancel = eventBus.on("UI:CANCEL", handleDeselect);
|
|
971
973
|
return () => {
|
|
972
|
-
unsubSelect(
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
974
|
+
[unsubSelect, unsubView, unsubDeselect, unsubClose, unsubCancel].forEach(
|
|
975
|
+
(unsub) => {
|
|
976
|
+
if (typeof unsub === "function") unsub();
|
|
977
|
+
}
|
|
978
|
+
);
|
|
977
979
|
};
|
|
978
980
|
}, [eventBus, usingContext]);
|
|
979
981
|
if (selectionContext) {
|
|
@@ -71,7 +71,10 @@ function useEventListener(event, handler) {
|
|
|
71
71
|
const wrappedHandler = (evt) => {
|
|
72
72
|
handlerRef.current(evt);
|
|
73
73
|
};
|
|
74
|
-
|
|
74
|
+
const unsub = eventBus.on(event, wrappedHandler);
|
|
75
|
+
return () => {
|
|
76
|
+
if (typeof unsub === "function") unsub();
|
|
77
|
+
};
|
|
75
78
|
}, [event, eventBus]);
|
|
76
79
|
}
|
|
77
80
|
function useEmitEvent() {
|
package/dist/components/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useUISlots } from '../chunk-W5YTXLXL.js';
|
|
2
2
|
import { cn, debugGroup, debug, debugGroupEnd, getNestedValue, isDebugEnabled } from '../chunk-KKCVDUK7.js';
|
|
3
3
|
export { cn } from '../chunk-KKCVDUK7.js';
|
|
4
|
-
import { useQuerySingleton, useSelectedEntity, useAuthContext } from '../chunk-
|
|
5
|
-
export { ENTITY_EVENTS, parseQueryBinding, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useQuerySingleton, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-
|
|
4
|
+
import { useQuerySingleton, useSelectedEntity, useAuthContext } from '../chunk-7IYF4RUG.js';
|
|
5
|
+
export { ENTITY_EVENTS, parseQueryBinding, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useQuerySingleton, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-7IYF4RUG.js';
|
|
6
6
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-7NEWMNNU.js';
|
|
7
7
|
import '../chunk-XSEDIUM6.js';
|
|
8
8
|
import { useTheme } from '../chunk-4UFNDD6B.js';
|
|
9
|
-
import { useEventBus, usePaginatedEntityList, useEntityList, useEntityDetail } from '../chunk-
|
|
10
|
-
export { EntityDataProvider, entityDataKeys, useEmitEvent, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEventBus, useEventListener } from '../chunk-
|
|
9
|
+
import { useEventBus, usePaginatedEntityList, useEntityList, useEntityDetail } from '../chunk-HY5EFCOK.js';
|
|
10
|
+
export { EntityDataProvider, entityDataKeys, useEmitEvent, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEventBus, useEventListener } from '../chunk-HY5EFCOK.js';
|
|
11
11
|
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
12
12
|
import { __publicField } from '../chunk-PKBMQBKP.js';
|
|
13
13
|
import * as React37 from 'react';
|
|
@@ -10291,6 +10291,7 @@ function IsometricCanvas({
|
|
|
10291
10291
|
useEffect(() => {
|
|
10292
10292
|
const el = containerRef.current;
|
|
10293
10293
|
if (!el) return;
|
|
10294
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
10294
10295
|
const observer = new ResizeObserver((entries) => {
|
|
10295
10296
|
const entry = entries[0];
|
|
10296
10297
|
if (entry) {
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ENTITY_EVENTS, parseQueryBinding, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useQuerySingleton, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-
|
|
1
|
+
export { ENTITY_EVENTS, parseQueryBinding, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useQuerySingleton, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-7IYF4RUG.js';
|
|
2
2
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-7NEWMNNU.js';
|
|
3
3
|
import '../chunk-XSEDIUM6.js';
|
|
4
|
-
export { EntityDataProvider, entityDataKeys, useEmitEvent, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEventBus, useEventListener } from '../chunk-
|
|
4
|
+
export { EntityDataProvider, entityDataKeys, useEmitEvent, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEventBus, useEventListener } from '../chunk-HY5EFCOK.js';
|
|
5
5
|
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
6
6
|
import '../chunk-PKBMQBKP.js';
|
package/dist/providers/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemeProvider } from '../chunk-4UFNDD6B.js';
|
|
2
|
-
import { EventBusProvider, SelectionProvider, EntityDataProvider } from '../chunk-
|
|
3
|
-
export { EventBusContext, EventBusProvider, SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-
|
|
2
|
+
import { EventBusProvider, SelectionProvider, EntityDataProvider } from '../chunk-HY5EFCOK.js';
|
|
3
|
+
export { EventBusContext, EventBusProvider, SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-HY5EFCOK.js';
|
|
4
4
|
import { useOfflineExecutor } from '../chunk-PL7MD6GF.js';
|
|
5
5
|
import '../chunk-PKBMQBKP.js';
|
|
6
6
|
import { createContext, useState, useCallback, useMemo, useContext } from 'react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/components/index.js",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"remark-math": "^6.0.0",
|
|
66
66
|
"react-force-graph-2d": "^1.28.0",
|
|
67
67
|
"@almadar/core": "1.0.17",
|
|
68
|
-
"@almadar/
|
|
69
|
-
"@almadar/
|
|
68
|
+
"@almadar/evaluator": "1.0.14",
|
|
69
|
+
"@almadar/patterns": "1.1.1"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": "^18.0.0",
|