@nivaro/react 0.3.106 → 0.3.107

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.
@@ -10,7 +10,7 @@ import { noteReplayEvent as Fe, createReplayCheckoutState as Me } from "../share
10
10
  import { emitReplayTap as Ne, setReplayRecorderMode as O, registerReplayCapture as Oe, clipEndOffset as Ue, withClipKind as We } from "../shared/lib/replay-capture.js";
11
11
  import { instrumentConsole as He, instrumentRequests as Ke, redactSecrets as $e } from "../shared/lib/replay-context.js";
12
12
  import { instrumentSocket as Be } from "../shared/lib/replay-socket.js";
13
- const ze = "nivaro-react@0.3.106", Q = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, V = () => typeof navigator > "u" || navigator.onLine !== !1;
13
+ const ze = "nivaro-react@0.3.107", Q = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, V = () => typeof navigator > "u" || navigator.onLine !== !1;
14
14
  function Je(o) {
15
15
  return typeof o.url != "string" || typeof fetch != "function" ? null : (f, u) => {
16
16
  const l = typeof o.getToken == "function" ? o.getToken() : void 0, d = { "Content-Type": "application/json" };
package/dist/index.d.ts CHANGED
@@ -3167,6 +3167,51 @@ export declare function encodePrefill(values: Record<string, unknown>): string;
3167
3167
 
3168
3168
  export declare function endHelpVideoWalk(): void;
3169
3169
 
3170
+ /** The band itself (also the live preview in Settings → This Instance). */
3171
+ export declare function EnvironmentBand({ label, message, productionUrl, preview }: {
3172
+ label: string;
3173
+ message: string;
3174
+ productionUrl: string | null;
3175
+ /** A preview (Settings): no alert role, the link does not navigate. */
3176
+ preview?: boolean;
3177
+ }): JSX.Element;
3178
+
3179
+ /**
3180
+ * Inside the signed-in admin app (when the notice says so): a tape edge along the very top of the window plus a small tag,
3181
+ * and the tab title starts with the environment. Takes no layout space and no clicks.
3182
+ */
3183
+ export declare function EnvironmentEdge({ apiBase }: {
3184
+ apiBase?: string;
3185
+ }): JSX.Element | null;
3186
+
3187
+ /**
3188
+ * "This is not production" (Rob 2026-11-13: people signed in to staging thinking it was the
3189
+ * real portal). Each environment configures its own notice in Settings → This Instance; the
3190
+ * instance hands it out on the public GET /api/app-info (`environment_notice`), before anyone
3191
+ * signs in. No notice, an unknown answer or a failed read show nothing.
3192
+ *
3193
+ * Hazard-tape yellow and ink, the same in light and dark: no app theme uses that pairing, so it
3194
+ * never reads as brand colour (EFP's light accent is amber).
3195
+ */
3196
+ export declare interface EnvironmentInfo {
3197
+ /** The big word ("Staging"). */
3198
+ label: string;
3199
+ /** The sentence beside it. */
3200
+ message: string;
3201
+ /** "Go to production" target (https), or null. */
3202
+ productionUrl: string | null;
3203
+ /** Also mark the signed-in admin app. */
3204
+ inAdminApp: boolean;
3205
+ }
3206
+
3207
+ /**
3208
+ * The sign-in page band: full width across the top, impossible to miss. Says what this is,
3209
+ * that nothing here reaches production, and (when the server knows it) where production is.
3210
+ */
3211
+ export declare function EnvironmentLoginBanner({ apiBase }: {
3212
+ apiBase?: string;
3213
+ }): JSX.Element | null;
3214
+
3170
3215
  export declare function ErpFailureBanner({ collection, itemId }: {
3171
3216
  collection: string;
3172
3217
  itemId: string;
@@ -12087,6 +12132,8 @@ export declare function useIdleNextPage(opts: {
12087
12132
 
12088
12133
  export declare function useImportHealth(): UseQueryResult<NoInfer<ImportHealth>, Error>;
12089
12134
 
12135
+ export declare function useInstanceEnvironment(apiBase?: string): EnvironmentInfo | null;
12136
+
12090
12137
  /** Mount once in an app shell (inside the QueryClientProvider). */
12091
12138
  export declare function useIntentPrefetch(opts: IntentPrefetchOptions & {
12092
12139
  enabled?: boolean;