@ikonai/sdk-react-ui 1.0.53 → 1.0.54

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/hooks/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { useLazyFont } from './use-lazy-font';
2
2
  export { useToasts, type Toast } from './use-toasts';
3
3
  export { useIkonReactive } from './use-ikon-reactive';
4
+ export { useReactive } from './use-reactive';
@@ -0,0 +1,15 @@
1
+ import { IkonClient } from '../../../sdk/src/index.ts';
2
+ /**
3
+ * Subscribe to a server-side <c>Reactive&lt;T&gt;</c> by the C# member name it
4
+ * was declared with. Resolves the stable id once via the framework function
5
+ * <c>Ikon.Reactive.GetStableIdByName</c>, then delegates to
6
+ * <c>useIkonReactive</c>.
7
+ *
8
+ * Pass <c>null</c> for <c>client</c> while bootstrapping — the hook will
9
+ * resolve and subscribe once a connected client is provided.
10
+ *
11
+ * Prefer this over <c>useIkonReactive</c> when you want to address a reactive
12
+ * by its C# field/property name (e.g. <c>_counter</c>) instead of shipping a
13
+ * per-app helper RPC to fetch the hashed stable id.
14
+ */
15
+ export declare function useReactive<T>(client: IkonClient | null | undefined, memberName: string, initialValue: T): T;
package/index.d.ts CHANGED
@@ -14,6 +14,6 @@ export { UiStreamStore, type UiStylePayload } from '../../sdk-ui/src/index.ts';
14
14
  export { renderMotionLetters } from './shared/render-motion-letters';
15
15
  export { type AuthConfig, type AuthContextValue, type AuthSession, type AuthState, type AuthUser, type LoginMethod, clearAuthSession, loadAuthSession, saveAuthSession, sessionToUser, authenticateAnonymous, buildOAuthRedirectUrl, clearOAuthParams, parseOAuthCallback, parseOAuthError, sendLoginCode, verifyLoginCode, type OAuthCallbackResult, type SendLoginCodeOptions, type VerifyLoginCodeOptions, AuthProvider, useAuth, useAuthOptional, type AuthProviderProps, useAuthGuard, type UseAuthGuardOptions, type UseAuthGuardResult, } from './auth';
16
16
  export { ConnectionStateRenderer, type ConnectedRenderProps, type ConnectionStateRendererProps, useIkonApp, type IkonUiModuleRegistration, type UseIkonAppOptions, type UseIkonAppResult, } from './app';
17
- export { useLazyFont, useToasts, useIkonReactive, type Toast } from './hooks';
17
+ export { useLazyFont, useToasts, useIkonReactive, useReactive, type Toast } from './hooks';
18
18
  export { I18nProvider, useI18n, type I18nContextValue, type I18nProviderProps } from './i18n';
19
19
  export { InspectOverlay, type InspectElementPayload } from './inspect/inspect-overlay';