@ikonai/sdk-react-ui 1.0.59 → 1.0.61

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.
@@ -94,6 +94,12 @@ export interface UseIkonAppResult {
94
94
  * When set, the app should show an access denied screen instead of the normal UI.
95
95
  */
96
96
  accessDeniedReason: string | null;
97
+ /**
98
+ * True when the server rejected the connection because it is at capacity (the app instance
99
+ * reached its maximum client limit). Terminal — the SDK does not retry. The app should show an
100
+ * "at capacity" message (the offline overlay) rather than a transient offline/reconnecting state.
101
+ */
102
+ isServerFull: boolean;
97
103
  /**
98
104
  * UI stores for rendering.
99
105
  */
@@ -126,6 +132,11 @@ export interface UseIkonAppResult {
126
132
  * Whether the connection is ready to render UI.
127
133
  */
128
134
  isReady: boolean;
135
+ /**
136
+ * True when the backend asked the client to display the platform branding banner (set for
137
+ * low-tier app creators by the connect handshake). Defaults to false until connected.
138
+ */
139
+ brandingRequired: boolean;
129
140
  /**
130
141
  * True after `connectionState === 'connecting'` has lasted longer than the slow-connection
131
142
  * threshold (default 5s, configurable via `timeouts.slowConnectionThresholdMs`). The connecting
@@ -18,6 +18,10 @@ export interface UseIkonDebugResult {
18
18
  forcedError: string | null;
19
19
  /** Non-null when the access-denied override is active. */
20
20
  forcedAccessDenied: string | null;
21
+ /** True when the branding-banner override is active (forces the banner on regardless of tier). */
22
+ forcedBranding: boolean;
23
+ /** True when the debug-overlay override is active (forces the on-screen overlay visible). */
24
+ forcedDebugOverlay: boolean;
21
25
  /** True when the debug shortcuts are active in this environment. */
22
26
  debugEnabled: boolean;
23
27
  }
@@ -35,6 +39,8 @@ export interface UseIkonDebugResult {
35
39
  * - Digit4 → force `offline` (no error)
36
40
  * - Digit5 → force `offline` with synthetic error
37
41
  * - Digit6 → force access-denied (synthetic reason — exercises the accessDeniedScreen path)
42
+ * - Digit7 → toggle the platform branding banner (normally driven by the backend tier flag)
43
+ * - Digit8 → toggle the on-screen debug overlay (normally gated on `?ikon-debug-overlay=true`)
38
44
  * - Digit0 → clear all state overrides
39
45
  * - KeyE → toggle empty-stores override (simulates "initial connection never produced UI")
40
46
  */
@@ -0,0 +1,24 @@
1
+ /**
2
+ * On-screen debug overlay, enabled with `?ikon-debug-overlay=true`.
3
+ *
4
+ * Surfaces the environment, connection-state timeline, and ALL captured JS errors + SDK log
5
+ * events directly on screen — invaluable for debugging on devices with no usable console
6
+ * (smart TVs, phones, kiosks). This is a DISTINCT opt-in from `ikon-debug` (verbose logging /
7
+ * devtools): debug mode does NOT force the visual overlay, since on a desktop you usually want
8
+ * a console, not a panel over the UI.
9
+ *
10
+ * Rendered automatically by {@link IkonApp} and the (deprecated) ConnectionStateRenderer, so
11
+ * apps get it for free; it returns null unless the param is set, making it zero-cost when off.
12
+ */
13
+ export declare const DEBUG_OVERLAY_ENABLED: boolean;
14
+ export interface DebugOverlayProps {
15
+ /** Current connection state, shown in the header. When 'connected'/'reconnecting' the panel
16
+ * renders as a small collapsible corner badge instead of a full-screen panel. */
17
+ state?: string;
18
+ /** Force the overlay visible even without `?ikon-debug-overlay=true` (debug keyboard toggle). */
19
+ forceVisible?: boolean;
20
+ }
21
+ /**
22
+ * The overlay component. Returns null unless `?ikon-debug-overlay=true` is set or `forceVisible`.
23
+ */
24
+ export declare function DebugOverlay({ state, forceVisible }: DebugOverlayProps): import("react/jsx-runtime").JSX.Element | null;
package/index.d.ts CHANGED
@@ -17,3 +17,5 @@ export { ConnectionStateRenderer, type ConnectedRenderProps, type ConnectionStat
17
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';
20
+ export { DebugOverlay, DEBUG_OVERLAY_ENABLED, type DebugOverlayProps } from './debug/debug-overlay';
21
+ export { randomUuid } from '../../sdk/src/index.ts';