@embarkai/ui-kit 0.2.0 → 0.2.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.
package/dist/index.d.cts CHANGED
@@ -329,6 +329,7 @@ interface UIContextType {
329
329
  config: MutableRefObject<ProviderConfig>;
330
330
  updateConfig: (updates: Partial<ProviderConfig>) => void;
331
331
  callbacks?: CallbacksConfig;
332
+ updateCallbacks: (updates: Partial<CallbacksConfig> | null) => void;
332
333
  }
333
334
  interface ProviderProps {
334
335
  children: ReactNode;
package/dist/index.d.ts CHANGED
@@ -329,6 +329,7 @@ interface UIContextType {
329
329
  config: MutableRefObject<ProviderConfig>;
330
330
  updateConfig: (updates: Partial<ProviderConfig>) => void;
331
331
  callbacks?: CallbacksConfig;
332
+ updateCallbacks: (updates: Partial<CallbacksConfig> | null) => void;
332
333
  }
333
334
  interface ProviderProps {
334
335
  children: ReactNode;
package/dist/index.js CHANGED
@@ -15470,7 +15470,7 @@ var init_package = __esm({
15470
15470
  "package.json"() {
15471
15471
  package_default = {
15472
15472
  name: "@embarkai/ui-kit",
15473
- version: "0.2.0",
15473
+ version: "0.2.1",
15474
15474
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
15475
15475
  type: "module",
15476
15476
  main: "./dist/index.cjs",
@@ -19299,6 +19299,11 @@ function Provider(props) {
19299
19299
  if (updates.translations) next.translations = { ...next.translations, ...updates.translations };
19300
19300
  config.current = next;
19301
19301
  }, []);
19302
+ const updateCallbacks = useCallback24((updates) => {
19303
+ const prev = callbacksRef.current;
19304
+ const next = updates ? { ...prev, ...updates } : void 0;
19305
+ callbacksRef.current = next;
19306
+ }, []);
19302
19307
  useEffect38(() => {
19303
19308
  if (typeof window === "undefined" || !projectId) return;
19304
19309
  const mergedConfig = merge3(DEFAULT_PROVIDER_CONFIG, initialConfig);
@@ -19346,7 +19351,10 @@ function Provider(props) {
19346
19351
  console.error("[PROVIDER] Error setting up iframe manager:", error);
19347
19352
  }
19348
19353
  }, [projectId]);
19349
- const contextValue = useMemo10(() => ({ config, updateConfig, callbacks }), [config, updateConfig, callbacks]);
19354
+ const contextValue = useMemo10(
19355
+ () => ({ config, updateConfig, callbacks, updateCallbacks }),
19356
+ [config, updateConfig, callbacks, updateCallbacks]
19357
+ );
19350
19358
  if (!!initialConfig?.wallet?.enabled)
19351
19359
  return /* @__PURE__ */ jsx96(WagmiProvider2, { children: /* @__PURE__ */ jsx96(UIContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx96(RainbowKitProvider, { children: /* @__PURE__ */ jsx96(SessionProvider, { children }) }) }) });
19352
19360
  return /* @__PURE__ */ jsx96(WagmiProvider2, { children: /* @__PURE__ */ jsx96(UIContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx96(SessionProvider, { children }) }) });