@overmap-ai/core 1.0.57-export-overmap-reducer.0 → 1.0.57-export-overmap-reducer.1
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.
|
@@ -5,11 +5,11 @@ import { OvermapRootState } from "../../typings";
|
|
|
5
5
|
export interface ISDKContext {
|
|
6
6
|
sdk: OvermapSDK;
|
|
7
7
|
}
|
|
8
|
-
interface SDKProviderProps {
|
|
8
|
+
interface SDKProviderProps<TStore extends ToolkitStore<OvermapRootState>> {
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
API_URL: string;
|
|
11
|
-
store:
|
|
11
|
+
store: TStore;
|
|
12
12
|
}
|
|
13
13
|
declare const SDKContext: React.Context<ISDKContext>;
|
|
14
|
-
declare const SDKProvider:
|
|
14
|
+
declare const SDKProvider: <TStore extends ToolkitStore<OvermapRootState, import("redux").AnyAction, readonly import("redux").Middleware<{}, OvermapRootState, import("redux").Dispatch<import("redux").AnyAction>>[]>>(props: SDKProviderProps<TStore>) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export { SDKProvider, SDKContext };
|
package/dist/overmap-core.js
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
import * as React from "react";
|
|
9
|
-
import React__default, { useState, useEffect, useRef,
|
|
9
|
+
import React__default, { useState, useEffect, useRef, useMemo, memo, useCallback, createContext, createElement, useContext, forwardRef, Children, isValidElement, cloneElement, Fragment as Fragment$1, useLayoutEffect, useReducer, lazy, Suspense } from "react";
|
|
10
10
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
11
11
|
import { unsafeShowToast, AlertDialogProvider, ToastProvider, DefaultTheme, Flex as Flex$1, IconButton, RiIcon, Text as Text$1, useSeverityColor, TextArea, Select, useToast, Badge, MultiSelect, Overlay, Button, Spinner, useViewportSize, ButtonGroup, IconColorUtility, Tooltip, Popover, useSize, ToggleButton, Separator, OvermapItem, ButtonList, divButtonProps, OvermapDropdownMenu, Checkbox as Checkbox$1, Input, useAlertDialog } from "@overmap-ai/blocks";
|
|
12
12
|
import { DepGraph } from "dependency-graph";
|
|
@@ -3236,6 +3236,8 @@ const initialState$8 = {
|
|
|
3236
3236
|
},
|
|
3237
3237
|
appearance: "dark",
|
|
3238
3238
|
isFetchingInitialData: false,
|
|
3239
|
+
// TODO: this is being used only in the custom hook in /web called useRetrySDK, which has something to do with licences
|
|
3240
|
+
// this has no purpose of being put into /core, it should be removed from here. But licences need to be fixed before this is done.
|
|
3239
3241
|
isLoading: false
|
|
3240
3242
|
};
|
|
3241
3243
|
const settingSlice = createSlice({
|
|
@@ -8353,14 +8355,14 @@ class OvermapSDK {
|
|
|
8353
8355
|
}
|
|
8354
8356
|
const makeClient = (apiUrl, store) => new OvermapSDK(apiUrl, store);
|
|
8355
8357
|
const SDKContext = React__default.createContext({});
|
|
8356
|
-
const SDKProvider =
|
|
8358
|
+
const SDKProvider = genericMemo(function SDKProvider2(props) {
|
|
8359
|
+
const { children, API_URL, store } = props;
|
|
8357
8360
|
const client = useMemo(() => makeClient(API_URL, store), [API_URL, store]);
|
|
8358
8361
|
useEffect(() => {
|
|
8359
8362
|
setClientStore(store);
|
|
8360
8363
|
}, [store]);
|
|
8361
8364
|
return /* @__PURE__ */ jsx(SDKContext.Provider, { value: { sdk: client }, children });
|
|
8362
8365
|
});
|
|
8363
|
-
SDKProvider.displayName = "SDKProvider";
|
|
8364
8366
|
const useSDK = () => {
|
|
8365
8367
|
return React__default.useContext(SDKContext);
|
|
8366
8368
|
};
|