@nivaro/react 0.3.16 → 0.3.18

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.
Files changed (28) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +51 -1
  4. package/dist/index.js +243 -240
  5. package/dist/shared/components/CollectionBrowserView.js +439 -438
  6. package/dist/shared/components/ItemEditForm.js +3758 -3708
  7. package/dist/shared/components/ProfileView.js +38 -23
  8. package/dist/shared/components/RecordReadView.js +452 -430
  9. package/dist/shared/components/bulk/BulkActionButtons.js +113 -106
  10. package/dist/shared/components/chat/ChannelArchive.js +16 -17
  11. package/dist/shared/components/chat/ChatAnalyticsView.js +2 -2
  12. package/dist/shared/components/chat/ChatPanel.js +992 -930
  13. package/dist/shared/components/chat/Composer.js +307 -303
  14. package/dist/shared/components/chat/chat-core.js +8 -4
  15. package/dist/shared/components/chat/chat-drafts.js +60 -43
  16. package/dist/shared/components/item-edit/InlineTableField.js +159 -158
  17. package/dist/shared/components/item-edit/RecordLiveSync.js +169 -155
  18. package/dist/shared/components/item-edit/RelationCombobox.js +274 -247
  19. package/dist/shared/components/item-edit/RowHistorySheet.js +62 -62
  20. package/dist/shared/components/item-edit/picker-search.js +28 -0
  21. package/dist/shared/components/panels/RevisionsPanel.js +268 -260
  22. package/dist/shared/components/pipeline/PipelineEditorView.js +1672 -1568
  23. package/dist/shared/components/profile/BrowserPushCard.js +135 -89
  24. package/dist/shared/components/profile/push-failure.js +76 -0
  25. package/dist/shared/lib/display-prefs.js +90 -0
  26. package/dist/shared/lib/request-gate.js +140 -127
  27. package/dist/shared/lib/theme-accents.js +21 -16
  28. 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.16", j = 1e4, We = 150, He = 3e3, Ke = 600, $e = (n) => `nvr_replay_resume${n ? `:${n}` : ""}`, G = () => typeof navigator > "u" || navigator.onLine !== !1;
12
+ const Ue = "nivaro-react@0.3.18", 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;
@@ -5374,6 +5407,10 @@ declare interface LayoutGroup {
5374
5407
  read_width?: string | null;
5375
5408
  /** Rows of fields and the empty-section text ride here (lib/form-structure.ts). */
5376
5409
  swap_config?: string | null;
5410
+ /** The edit form's group gates, honoured here too: rules the record must meet
5411
+ * (lib/visible-when.ts) and "hide this section while everything in it is empty". */
5412
+ visible_when?: string | null;
5413
+ hide_when_empty?: boolean | number | null;
5377
5414
  }
5378
5415
 
5379
5416
  export declare type LayoutItem = FormGroupDescriptor | '__ungrouped__';
@@ -10319,7 +10356,8 @@ export declare function useChatRooms(): {
10319
10356
  };
10320
10357
 
10321
10358
  export declare function useChatSearch(q: string, filters?: ChatSearchFilters): {
10322
- hits: NoInfer<ChatSearchHit[]>;
10359
+ hits: ChatSearchHit[];
10360
+ meaning: "model" | "words" | null;
10323
10361
  loading: boolean;
10324
10362
  };
10325
10363
 
@@ -10360,6 +10398,18 @@ export declare function useDebounced<T>(value: T, delayMs?: number): T;
10360
10398
 
10361
10399
  export declare function useDeleteMessage(room: string): UseMutationResult<unknown, Error, number, unknown>;
10362
10400
 
10401
+ /**
10402
+ * Apply a person's display preferences in a host shell (efp-new). Reads the
10403
+ * instance default timezone and accent palette from GET /settings (public keys).
10404
+ * Only an explicit accent pick is applied — "Brand" leaves the host's own theme
10405
+ * alone. On a dark theme the pick is lifted to stay legible (`darkSurface`).
10406
+ */
10407
+ export declare function useDisplayPreferences(prefs: Record<string, unknown> | null | undefined, opts?: {
10408
+ accent?: AccentTargets;
10409
+ dark?: boolean;
10410
+ darkSurface?: string;
10411
+ }): void;
10412
+
10363
10413
  /** Re-render when do not disturb is due to end, so the mark and the row clear on time. */
10364
10414
  export declare function useDndActive(): boolean;
10365
10415