@nivaro/react 0.3.3 → 0.3.5

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.
@@ -8,7 +8,7 @@ import { normalizeReplaySampling as x, replaySampleDraw as Ae, currentReplayRout
8
8
  import { emitReplayTap as Ce, setReplayRecorderMode as N, registerReplayCapture as Ie, clipEndOffset as _e, withClipKind as De } from "../shared/lib/replay-capture.js";
9
9
  import { instrumentConsole as qe, instrumentRequests as Le, redactSecrets as Te } from "../shared/lib/replay-context.js";
10
10
  import { instrumentSocket as Pe } from "../shared/lib/replay-socket.js";
11
- const Ne = "nivaro-react@0.3.3", j = 1e4, Me = 150, Oe = 3e3, Ue = 600, We = (n) => `nvr_replay_resume${n ? `:${n}` : ""}`, G = () => typeof navigator > "u" || navigator.onLine !== !1;
11
+ const Ne = "nivaro-react@0.3.5", j = 1e4, Me = 150, Oe = 3e3, Ue = 600, We = (n) => `nvr_replay_resume${n ? `:${n}` : ""}`, G = () => typeof navigator > "u" || navigator.onLine !== !1;
12
12
  function Fe(n) {
13
13
  return typeof n.url != "string" || typeof fetch != "function" ? null : (f, a) => {
14
14
  const l = typeof n.getToken == "function" ? n.getToken() : void 0, d = { "Content-Type": "application/json" };
package/dist/index.d.ts CHANGED
@@ -1675,7 +1675,8 @@ declare interface CMSRelation {
1675
1675
  /** M2A only — the junction column naming which collection each row's `item` id
1676
1676
  * belongs to (usually 'collection'); one_collection is null on those rows. */
1677
1677
  one_collection_field?: string | null;
1678
- one_allowed_collections?: string | null;
1678
+ /** Array from the API, or JSON / comma text — read with parseAllowedCollections. */
1679
+ one_allowed_collections?: string | string[] | null;
1679
1680
  }
1680
1681
 
1681
1682
  declare interface CoalescingOptions {
@@ -7128,6 +7129,17 @@ export declare function QualityRulesView({ className }: {
7128
7129
  className?: string;
7129
7130
  }): JSX.Element;
7130
7131
 
7132
+ declare type QueryCacheLike = {
7133
+ subscribe(listener: (event: {
7134
+ type: string;
7135
+ query: {
7136
+ state: {
7137
+ fetchStatus?: string;
7138
+ };
7139
+ };
7140
+ }) => void): () => void;
7141
+ };
7142
+
7131
7143
  declare type QueryRowClick = {
7132
7144
  picker?: {
7133
7145
  collection: string;
@@ -8224,6 +8236,26 @@ export declare type RelationOption = {
8224
8236
  raw: Record<string, unknown>;
8225
8237
  };
8226
8238
 
8239
+ /**
8240
+ * Release every read that closed gates are holding, leaving each gate closed for
8241
+ * what comes next. The hosts share ONE react-query cache across their record
8242
+ * tabs, so a hidden tab's queued read and the visible tab's identical query are
8243
+ * the same query: the visible tab joins the fetch the hidden tab started and
8244
+ * waits on a gate nobody will open — a form stuck on skeletons with no error
8245
+ * until the hidden tab is shown (staging, 2026-10-22). releaseGatedReadsOnSharedFetch
8246
+ * calls this whenever an observer joins a query that is already fetching.
8247
+ */
8248
+ export declare function releaseGatedReads(): void;
8249
+
8250
+ /**
8251
+ * Wire releaseGatedReads to a react-query cache: when a component starts
8252
+ * observing a query that is already fetching, that fetch may be one a closed
8253
+ * gate is holding, so release the gates' queues. Returns the unsubscribe; call
8254
+ * it once at the host that mounts gated tabs (e.g. in an effect over the
8255
+ * QueryClient's getQueryCache()).
8256
+ */
8257
+ export declare function releaseGatedReadsOnSharedFetch(cache: QueryCacheLike): () => void;
8258
+
8227
8259
  export declare function releaseHeld(): HeldItem[];
8228
8260
 
8229
8261
  export declare type RenderFieldProps = {