@nivaro/react 0.1.262 → 0.1.263
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/full.css +1 -1
- package/dist/index.d.ts +38 -0
- package/dist/index.js +23673 -23482
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -960,6 +960,18 @@ export declare function ConformanceView({ className }: {
|
|
|
960
960
|
className?: string;
|
|
961
961
|
}): JSX.Element;
|
|
962
962
|
|
|
963
|
+
/**
|
|
964
|
+
* `opts.open` is the gate's state AT CONSTRUCTION. A host that starts a
|
|
965
|
+
* hidden tab must pass `false` here rather than calling `setOpen(false)`
|
|
966
|
+
* from an effect: React runs children's effects before the parent's, so
|
|
967
|
+
* every react-query fetch under the provider has already fired by the time
|
|
968
|
+
* a parent effect closes the gate — the first paint of a hidden tab would
|
|
969
|
+
* still cost a full record load.
|
|
970
|
+
*/
|
|
971
|
+
export declare function createGatedClient(client: NivaroClient, opts?: {
|
|
972
|
+
open?: boolean;
|
|
973
|
+
}): GatedClient;
|
|
974
|
+
|
|
963
975
|
export declare function createLeaderSocket(key: string, cbs: LeaderCallbacks): LeaderSocketHandle;
|
|
964
976
|
|
|
965
977
|
export declare function CronBuilder({ value, onChange, disabled }: {
|
|
@@ -1735,6 +1747,20 @@ export declare type FormVisibilityRule = {
|
|
|
1735
1747
|
action: 'show' | 'hide';
|
|
1736
1748
|
};
|
|
1737
1749
|
|
|
1750
|
+
export declare interface GatedClient extends NivaroClient {
|
|
1751
|
+
/** Open = pass everything through; closed = queue reads. */
|
|
1752
|
+
setOpen(open: boolean): void;
|
|
1753
|
+
readonly open: boolean;
|
|
1754
|
+
/**
|
|
1755
|
+
* Release everything still queued and stop gating. Call from the host's
|
|
1756
|
+
* unmount: react-query keeps an in-flight fetch alive after its observers
|
|
1757
|
+
* leave, so a queued request that is never released is a query stuck
|
|
1758
|
+
* "fetching" forever — a remount under the same keys dedupes onto it and
|
|
1759
|
+
* shows skeletons until the page reloads.
|
|
1760
|
+
*/
|
|
1761
|
+
dispose(): void;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1738
1764
|
/** The newer API build being served, or null while this tab is current. */
|
|
1739
1765
|
export declare function getApiUpdate(): ApiVersionInfo | null;
|
|
1740
1766
|
|
|
@@ -4793,6 +4819,16 @@ declare interface UnsavedSummary {
|
|
|
4793
4819
|
text: string;
|
|
4794
4820
|
}
|
|
4795
4821
|
|
|
4822
|
+
/**
|
|
4823
|
+
* `useAfterIdle(ms)` — false on mount, true once the browser has had `ms` of
|
|
4824
|
+
* settle time after the first paint. Gate secondary reads on it (freshness
|
|
4825
|
+
* stamps, cell provenance, lineage explainers, the live integrity check):
|
|
4826
|
+
* they decorate a record the person is already looking at, and on a page
|
|
4827
|
+
* that fans out a hundred reads at once they were competing for the same
|
|
4828
|
+
* connection pool as the reads that PAINT the form.
|
|
4829
|
+
*/
|
|
4830
|
+
export declare function useAfterIdle(ms?: number): boolean;
|
|
4831
|
+
|
|
4796
4832
|
/**
|
|
4797
4833
|
* Base URL + auth for the few raw `fetch` calls (widgets, PDF blobs) that
|
|
4798
4834
|
* can't go through `client.request`. Derives everything from the ambient
|
|
@@ -5304,6 +5340,8 @@ declare interface WidgetSlotProps {
|
|
|
5304
5340
|
onContentChange?: (hasContent: boolean) => void;
|
|
5305
5341
|
}
|
|
5306
5342
|
|
|
5343
|
+
export declare function withGetCoalescing(client: NivaroClient): NivaroClient;
|
|
5344
|
+
|
|
5307
5345
|
export declare function WorkflowPanel({ collection, item }: {
|
|
5308
5346
|
collection: string;
|
|
5309
5347
|
item: string;
|