@nivaro/react 0.3.17 → 0.3.19
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/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +54 -1
- package/dist/index.js +243 -240
- package/dist/shared/components/CollectionBrowserView.js +439 -438
- package/dist/shared/components/ItemEditForm.js +3758 -3708
- package/dist/shared/components/ProfileView.js +38 -23
- package/dist/shared/components/RecordReadView.js +452 -430
- package/dist/shared/components/bulk/BulkActionButtons.js +113 -106
- package/dist/shared/components/chat/ChannelArchive.js +16 -17
- package/dist/shared/components/chat/ChatPanel.js +992 -930
- package/dist/shared/components/chat/Composer.js +307 -303
- package/dist/shared/components/chat/chat-core.js +8 -4
- package/dist/shared/components/chat/chat-drafts.js +60 -43
- package/dist/shared/components/help-videos/api.js +3 -0
- package/dist/shared/components/help-videos/library/HelpVideoLibrary.js +225 -177
- package/dist/shared/components/item-edit/InlineTableField.js +159 -158
- package/dist/shared/components/item-edit/RecordLiveSync.js +169 -155
- package/dist/shared/components/item-edit/RelationCombobox.js +274 -247
- package/dist/shared/components/item-edit/RowHistorySheet.js +62 -62
- package/dist/shared/components/item-edit/picker-search.js +28 -0
- package/dist/shared/components/panels/RevisionsPanel.js +268 -260
- package/dist/shared/components/profile/BrowserPushCard.js +135 -89
- package/dist/shared/components/profile/push-failure.js +76 -0
- package/dist/shared/lib/display-prefs.js +90 -0
- package/dist/shared/lib/theme-accents.js +21 -16
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { noteReplayEvent as _e, createReplayCheckoutState as De } from "../share
|
|
|
9
9
|
import { emitReplayTap as Te, setReplayRecorderMode as N, registerReplayCapture as qe, clipEndOffset as Le, withClipKind as Pe } from "../shared/lib/replay-capture.js";
|
|
10
10
|
import { instrumentConsole as Ne, instrumentRequests as Fe, redactSecrets as Me } from "../shared/lib/replay-context.js";
|
|
11
11
|
import { instrumentSocket as Oe } from "../shared/lib/replay-socket.js";
|
|
12
|
-
const Ue = "nivaro-react@0.3.
|
|
12
|
+
const Ue = "nivaro-react@0.3.19", j = 1e4, We = 150, He = 3e3, Ke = 600, $e = (n) => `nvr_replay_resume${n ? `:${n}` : ""}`, G = () => typeof navigator > "u" || navigator.onLine !== !1;
|
|
13
13
|
function Be(n) {
|
|
14
14
|
return typeof n.url != "string" || typeof fetch != "function" ? null : (f, a) => {
|
|
15
15
|
const u = typeof n.getToken == "function" ? n.getToken() : void 0, d = { "Content-Type": "application/json" };
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,13 @@ import { UseMutationResult } from '@tanstack/react-query';
|
|
|
30
30
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
31
31
|
import { UserScopesInfo } from '@nivaro/sdk';
|
|
32
32
|
|
|
33
|
+
declare interface AccentTargets {
|
|
34
|
+
/** Custom properties that take the colour as #rrggbb. */
|
|
35
|
+
hex?: string[];
|
|
36
|
+
/** Custom properties that take it as channels ('r g b'). */
|
|
37
|
+
rgb?: string[];
|
|
38
|
+
}
|
|
39
|
+
|
|
33
40
|
export declare function AccessDeniedPanel({ collection, itemId, onBack }: {
|
|
34
41
|
collection: string;
|
|
35
42
|
itemId: string;
|
|
@@ -506,6 +513,12 @@ export declare interface ApiVersionInfo {
|
|
|
506
513
|
from?: string | null;
|
|
507
514
|
}
|
|
508
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Point the shared formatters at the person's preferences and scale the root.
|
|
518
|
+
* `defaultTimezone` = the instance default (#178) for people without a pick.
|
|
519
|
+
*/
|
|
520
|
+
export declare function applyDisplayPrefs(prefs: DisplayPrefs | Record<string, unknown> | null | undefined, defaultTimezone?: string | null, root?: HTMLElement | null): void;
|
|
521
|
+
|
|
509
522
|
export declare function applyValidationRule(rule: FormValidationRule_2, value: unknown, label: string, record?: Record<string, unknown>): string | null;
|
|
510
523
|
|
|
511
524
|
declare interface ArmedFaultsState {
|
|
@@ -2440,6 +2453,26 @@ declare interface DirectoryChannel {
|
|
|
2440
2453
|
/** Forget a run: stops watching it (the server run continues on its own). */
|
|
2441
2454
|
export declare function dismissAutofillRun(id: string): void;
|
|
2442
2455
|
|
|
2456
|
+
/**
|
|
2457
|
+
* Profile → Display preferences (#31/#229/#230/#232/#411/#83), applied by a host.
|
|
2458
|
+
*
|
|
2459
|
+
* Every app that renders the Display card must also APPLY what it saves, or the
|
|
2460
|
+
* card does nothing there (efp-new, until 2026-10-26). Admin's AppLayout and
|
|
2461
|
+
* efp-new's shell both go through `applyDisplayPrefs` — one reading of the
|
|
2462
|
+
* preference object, two hosts. Hosts without admin's own accent chain
|
|
2463
|
+
* (workspace colour, project colour, theme studio) mount `useDisplayPreferences`.
|
|
2464
|
+
*/
|
|
2465
|
+
declare interface DisplayPrefs {
|
|
2466
|
+
timezone?: string | null;
|
|
2467
|
+
time_display?: string | null;
|
|
2468
|
+
number_format?: {
|
|
2469
|
+
locale?: string;
|
|
2470
|
+
compact?: boolean;
|
|
2471
|
+
} | null;
|
|
2472
|
+
font_size?: string | null;
|
|
2473
|
+
theme_accent?: string | null;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2443
2476
|
export declare function DisplayPrefsCard(): JSX.Element;
|
|
2444
2477
|
|
|
2445
2478
|
declare type DmOpener = (userId: string, displayName?: string) => void;
|
|
@@ -3615,6 +3648,9 @@ export declare function helpVideoApi(client: NivaroClient): {
|
|
|
3615
3648
|
setContexts: (id: string, contexts: HelpVideoContext[]) => Promise<unknown>;
|
|
3616
3649
|
setRequirements: (id: string, role_ids: string[]) => Promise<unknown>;
|
|
3617
3650
|
archive: (id: string) => Promise<unknown>;
|
|
3651
|
+
/** Back to draft: viewers stop seeing it; the published version is kept, so `publish` puts the
|
|
3652
|
+
* same cut back with no new render. 409 HELP_VIDEO_NOT_PUBLISHED unless it is published. */
|
|
3653
|
+
unpublish: (id: string) => Promise<HelpVideoDto>;
|
|
3618
3654
|
/** Deletes the video, its versions, files, views and requirements for good. Administrators
|
|
3619
3655
|
* only (403 ADMIN_ONLY otherwise); 404 when it is already gone. */
|
|
3620
3656
|
purge: (id: string) => Promise<unknown>;
|
|
@@ -5374,6 +5410,10 @@ declare interface LayoutGroup {
|
|
|
5374
5410
|
read_width?: string | null;
|
|
5375
5411
|
/** Rows of fields and the empty-section text ride here (lib/form-structure.ts). */
|
|
5376
5412
|
swap_config?: string | null;
|
|
5413
|
+
/** The edit form's group gates, honoured here too: rules the record must meet
|
|
5414
|
+
* (lib/visible-when.ts) and "hide this section while everything in it is empty". */
|
|
5415
|
+
visible_when?: string | null;
|
|
5416
|
+
hide_when_empty?: boolean | number | null;
|
|
5377
5417
|
}
|
|
5378
5418
|
|
|
5379
5419
|
export declare type LayoutItem = FormGroupDescriptor | '__ungrouped__';
|
|
@@ -10319,7 +10359,8 @@ export declare function useChatRooms(): {
|
|
|
10319
10359
|
};
|
|
10320
10360
|
|
|
10321
10361
|
export declare function useChatSearch(q: string, filters?: ChatSearchFilters): {
|
|
10322
|
-
hits:
|
|
10362
|
+
hits: ChatSearchHit[];
|
|
10363
|
+
meaning: "model" | "words" | null;
|
|
10323
10364
|
loading: boolean;
|
|
10324
10365
|
};
|
|
10325
10366
|
|
|
@@ -10360,6 +10401,18 @@ export declare function useDebounced<T>(value: T, delayMs?: number): T;
|
|
|
10360
10401
|
|
|
10361
10402
|
export declare function useDeleteMessage(room: string): UseMutationResult<unknown, Error, number, unknown>;
|
|
10362
10403
|
|
|
10404
|
+
/**
|
|
10405
|
+
* Apply a person's display preferences in a host shell (efp-new). Reads the
|
|
10406
|
+
* instance default timezone and accent palette from GET /settings (public keys).
|
|
10407
|
+
* Only an explicit accent pick is applied — "Brand" leaves the host's own theme
|
|
10408
|
+
* alone. On a dark theme the pick is lifted to stay legible (`darkSurface`).
|
|
10409
|
+
*/
|
|
10410
|
+
export declare function useDisplayPreferences(prefs: Record<string, unknown> | null | undefined, opts?: {
|
|
10411
|
+
accent?: AccentTargets;
|
|
10412
|
+
dark?: boolean;
|
|
10413
|
+
darkSurface?: string;
|
|
10414
|
+
}): void;
|
|
10415
|
+
|
|
10363
10416
|
/** Re-render when do not disturb is due to end, so the mark and the row clear on time. */
|
|
10364
10417
|
export declare function useDndActive(): boolean;
|
|
10365
10418
|
|