@almadar/ui 1.0.23 → 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) {
|
|
@@ -1396,7 +1398,7 @@ function useAuthContext() {
|
|
|
1396
1398
|
signOut: void 0
|
|
1397
1399
|
};
|
|
1398
1400
|
}
|
|
1399
|
-
var API_BASE = import.meta.env.VITE_API_URL
|
|
1401
|
+
var API_BASE = typeof import.meta !== "undefined" && import.meta.env?.VITE_API_URL ? import.meta.env.VITE_API_URL : "http://localhost:3000";
|
|
1400
1402
|
function getUserId() {
|
|
1401
1403
|
return localStorage.getItem("userId") || "anonymous";
|
|
1402
1404
|
}
|
|
@@ -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
|
-
import { useQuerySingleton, useSelectedEntity, useAuthContext } from '../chunk-ITRZURGQ.js';
|
|
3
|
-
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-ITRZURGQ.js';
|
|
4
|
-
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-7NEWMNNU.js';
|
|
5
2
|
import { cn, debugGroup, debug, debugGroupEnd, getNestedValue, isDebugEnabled } from '../chunk-KKCVDUK7.js';
|
|
6
3
|
export { cn } from '../chunk-KKCVDUK7.js';
|
|
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
|
+
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';
|