@nivaro/react 0.1.262 → 0.1.264
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 +47 -0
- package/dist/index.js +28041 -27204
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,15 @@ export declare function AddendumPanel({ collection, item, addendumLayoutId, canC
|
|
|
98
98
|
|
|
99
99
|
export declare function agingBucket(hours: number | null): string;
|
|
100
100
|
|
|
101
|
+
export declare function AiAnalyticsView(): JSX.Element;
|
|
102
|
+
|
|
103
|
+
export declare function AiMarkdown({ content, className, autolink }: {
|
|
104
|
+
content: string;
|
|
105
|
+
className?: string;
|
|
106
|
+
/** Turn friendly ids into record links. Default: on whenever a NivaroProvider is present. */
|
|
107
|
+
autolink?: boolean;
|
|
108
|
+
}): JSX.Element;
|
|
109
|
+
|
|
101
110
|
export declare function AiReviewCard({ templateId }: {
|
|
102
111
|
templateId: string;
|
|
103
112
|
}): React_2.JSX.Element;
|
|
@@ -960,6 +969,18 @@ export declare function ConformanceView({ className }: {
|
|
|
960
969
|
className?: string;
|
|
961
970
|
}): JSX.Element;
|
|
962
971
|
|
|
972
|
+
/**
|
|
973
|
+
* `opts.open` is the gate's state AT CONSTRUCTION. A host that starts a
|
|
974
|
+
* hidden tab must pass `false` here rather than calling `setOpen(false)`
|
|
975
|
+
* from an effect: React runs children's effects before the parent's, so
|
|
976
|
+
* every react-query fetch under the provider has already fired by the time
|
|
977
|
+
* a parent effect closes the gate — the first paint of a hidden tab would
|
|
978
|
+
* still cost a full record load.
|
|
979
|
+
*/
|
|
980
|
+
export declare function createGatedClient(client: NivaroClient, opts?: {
|
|
981
|
+
open?: boolean;
|
|
982
|
+
}): GatedClient;
|
|
983
|
+
|
|
963
984
|
export declare function createLeaderSocket(key: string, cbs: LeaderCallbacks): LeaderSocketHandle;
|
|
964
985
|
|
|
965
986
|
export declare function CronBuilder({ value, onChange, disabled }: {
|
|
@@ -1735,6 +1756,20 @@ export declare type FormVisibilityRule = {
|
|
|
1735
1756
|
action: 'show' | 'hide';
|
|
1736
1757
|
};
|
|
1737
1758
|
|
|
1759
|
+
export declare interface GatedClient extends NivaroClient {
|
|
1760
|
+
/** Open = pass everything through; closed = queue reads. */
|
|
1761
|
+
setOpen(open: boolean): void;
|
|
1762
|
+
readonly open: boolean;
|
|
1763
|
+
/**
|
|
1764
|
+
* Release everything still queued and stop gating. Call from the host's
|
|
1765
|
+
* unmount: react-query keeps an in-flight fetch alive after its observers
|
|
1766
|
+
* leave, so a queued request that is never released is a query stuck
|
|
1767
|
+
* "fetching" forever — a remount under the same keys dedupes onto it and
|
|
1768
|
+
* shows skeletons until the page reloads.
|
|
1769
|
+
*/
|
|
1770
|
+
dispose(): void;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1738
1773
|
/** The newer API build being served, or null while this tab is current. */
|
|
1739
1774
|
export declare function getApiUpdate(): ApiVersionInfo | null;
|
|
1740
1775
|
|
|
@@ -4793,6 +4828,16 @@ declare interface UnsavedSummary {
|
|
|
4793
4828
|
text: string;
|
|
4794
4829
|
}
|
|
4795
4830
|
|
|
4831
|
+
/**
|
|
4832
|
+
* `useAfterIdle(ms)` — false on mount, true once the browser has had `ms` of
|
|
4833
|
+
* settle time after the first paint. Gate secondary reads on it (freshness
|
|
4834
|
+
* stamps, cell provenance, lineage explainers, the live integrity check):
|
|
4835
|
+
* they decorate a record the person is already looking at, and on a page
|
|
4836
|
+
* that fans out a hundred reads at once they were competing for the same
|
|
4837
|
+
* connection pool as the reads that PAINT the form.
|
|
4838
|
+
*/
|
|
4839
|
+
export declare function useAfterIdle(ms?: number): boolean;
|
|
4840
|
+
|
|
4796
4841
|
/**
|
|
4797
4842
|
* Base URL + auth for the few raw `fetch` calls (widgets, PDF blobs) that
|
|
4798
4843
|
* can't go through `client.request`. Derives everything from the ambient
|
|
@@ -5304,6 +5349,8 @@ declare interface WidgetSlotProps {
|
|
|
5304
5349
|
onContentChange?: (hasContent: boolean) => void;
|
|
5305
5350
|
}
|
|
5306
5351
|
|
|
5352
|
+
export declare function withGetCoalescing(client: NivaroClient): NivaroClient;
|
|
5353
|
+
|
|
5307
5354
|
export declare function WorkflowPanel({ collection, item }: {
|
|
5308
5355
|
collection: string;
|
|
5309
5356
|
item: string;
|