@shipengine/alchemy 4.0.0 → 4.1.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/components/alchemy-provider/alchemy-provider.d.ts +6 -3
- package/components/alchemy-provider/hooks/index.d.ts +0 -1
- package/components/element/utils/get-emotion-cache.d.ts +2 -0
- package/components/element/utils/index.d.ts +1 -1
- package/index.js +283 -275
- package/index.mjs +286 -277
- package/package.json +2 -2
- package/components/alchemy-provider/hooks/use-load-fonts.d.ts +0 -7
- package/components/element/utils/memoized-create-cache.d.ts +0 -1
|
@@ -4,10 +4,11 @@ export type AlchemyErrorHandler = (err: Error) => void;
|
|
|
4
4
|
export type AlchemyContextValue = {
|
|
5
5
|
baseURL: string;
|
|
6
6
|
cdnURL: string;
|
|
7
|
+
container?: HTMLElement;
|
|
7
8
|
getToken: ShipEngineProps["getToken"];
|
|
8
9
|
locale?: string;
|
|
9
10
|
onError: AlchemyErrorHandler;
|
|
10
|
-
scope: string;
|
|
11
|
+
scope: string | null;
|
|
11
12
|
theme: Theme;
|
|
12
13
|
};
|
|
13
14
|
export declare const AlchemyContext: import("react").Context<AlchemyContextValue | undefined>;
|
|
@@ -15,11 +16,13 @@ export interface AlchemyProviderProps {
|
|
|
15
16
|
baseURL?: string;
|
|
16
17
|
cdnURL?: string;
|
|
17
18
|
children: React.ReactNode;
|
|
19
|
+
container?: HTMLElement;
|
|
18
20
|
getToken: ShipEngineProps["getToken"];
|
|
19
21
|
locale?: string;
|
|
20
22
|
onError?: AlchemyErrorHandler;
|
|
21
|
-
|
|
23
|
+
/** Scope of the Alchemy Provider. Can be null to not specify a specific element */
|
|
24
|
+
scope?: string | null;
|
|
22
25
|
themeConfig?: CustomThemeData;
|
|
23
26
|
}
|
|
24
|
-
export declare const AlchemyProvider: ({ baseURL, cdnURL, children, getToken, locale, onError, scope, themeConfig, }: AlchemyProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element
|
|
27
|
+
export declare const AlchemyProvider: ({ baseURL, cdnURL, container, children, getToken, locale: localeProp, onError, scope, themeConfig, }: AlchemyProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
25
28
|
export declare const useAlchemy: () => AlchemyContextValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./get-emotion-cache";
|