@nivaro/react 0.2.17 → 0.2.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/index.d.ts CHANGED
@@ -9,11 +9,13 @@ import { JSX } from 'react';
9
9
  import { JSXElementConstructor } from 'react';
10
10
  import type { LucideIcon } from 'lucide-react';
11
11
  import { ManagedUser } from '@nivaro/sdk';
12
+ import { MutableRefObject } from 'react';
12
13
  import { NivaroClient } from '@nivaro/sdk';
13
14
  import { default as React_2 } from 'react';
14
15
  import { ReactElement } from 'react';
15
16
  import { ReactNode } from 'react';
16
17
  import { ReactPortal } from 'react';
18
+ import { RefObject } from 'react';
17
19
  import { ReportDateRange } from '@nivaro/sdk';
18
20
  import { ReportEntityFilter } from '@nivaro/sdk';
19
21
  import { ReportQueryWidgetConfig } from '@nivaro/sdk';
@@ -180,6 +182,19 @@ declare type AllocateDrawerConfig = {
180
182
  value_max?: string;
181
183
  };
182
184
 
185
+ declare interface Annotation {
186
+ id: string;
187
+ type: AnnotationType;
188
+ start_ms: number;
189
+ end_ms: number;
190
+ rect: Rect;
191
+ to: Point | null;
192
+ text: string;
193
+ tone: Tone;
194
+ }
195
+
196
+ declare type AnnotationType = 'callout' | 'arrow' | 'box' | 'ripple';
197
+
183
198
  /**
184
199
  * Admin-authored announcement banners ("maintenance Friday 6pm") — polled
185
200
  * every minute, role/window-filtered server-side, dismiss = acknowledge
@@ -353,6 +368,9 @@ declare type AskRelationInput = {
353
368
  option_filter?: Record<string, unknown> | null;
354
369
  };
355
370
 
371
+ /** Admins choose which roles may record and edit videos (admins always can). */
372
+ export declare function AuthorRolesButton(): JSX.Element | null;
373
+
356
374
  declare type AutoAllocateConfig = {
357
375
  /** Button label; defaults to 'Auto allocate'. */
358
376
  label?: string;
@@ -497,6 +515,14 @@ export declare interface BaseMapPin {
497
515
 
498
516
  declare type BinaryOp = '+' | '-' | '*' | '/' | '==' | '!=' | '<' | '<=' | '>' | '>=' | '&&' | '||';
499
517
 
518
+ declare interface Blur {
519
+ id: string;
520
+ start_ms: number;
521
+ end_ms: number;
522
+ rect: Rect;
523
+ strength: number;
524
+ }
525
+
500
526
  export declare function BooleanField({ field, value, onChange, error, disabled, readOnly, inputId, errorId }: FieldComponentProps): JSX.Element;
501
527
 
502
528
  export declare function BroadcastView({ className }: {
@@ -573,6 +599,13 @@ export declare function canPreviewFile(type: string | null | undefined): boolean
573
599
 
574
600
  export declare function canViewAs(): boolean;
575
601
 
602
+ declare interface Caption {
603
+ id: string;
604
+ start_ms: number;
605
+ end_ms: number;
606
+ text: string;
607
+ }
608
+
576
609
  /**
577
610
  * Grab the replay link for an error being reported right now. Resolves null
578
611
  * when no recorder is active (both settings off, recording failed, or the
@@ -701,6 +734,12 @@ declare interface ChannelMeta {
701
734
  default_roles?: string[];
702
735
  }
703
736
 
737
+ declare interface Chapter {
738
+ id: string;
739
+ at_ms: number;
740
+ title: string;
741
+ }
742
+
704
743
  export declare function ChatAnalyticsView(): JSX.Element;
705
744
 
706
745
  /** Where a room view opens: the newest messages, or around a message / day. */
@@ -2484,6 +2523,250 @@ export declare interface HeaderWidgetInfo {
2484
2523
  inputBindings: InputBinding[];
2485
2524
  }
2486
2525
 
2526
+ /** Every mutation, as plain functions over the client. */
2527
+ export declare function helpVideoApi(client: NivaroClient): {
2528
+ create: (body: {
2529
+ upload_id: string;
2530
+ title?: string;
2531
+ contexts?: HelpVideoContext[];
2532
+ }) => Promise<HelpVideoDto>;
2533
+ update: (id: string, body: {
2534
+ title?: string;
2535
+ description?: string | null;
2536
+ category?: string | null;
2537
+ visibility?: Visibility;
2538
+ }) => Promise<HelpVideoDto>;
2539
+ setContexts: (id: string, contexts: HelpVideoContext[]) => Promise<unknown>;
2540
+ setRequirements: (id: string, role_ids: string[]) => Promise<unknown>;
2541
+ archive: (id: string) => Promise<unknown>;
2542
+ /** Deletes the video, its versions, files, views and requirements for good. Administrators
2543
+ * only (403 ADMIN_ONLY otherwise); 404 when it is already gone. */
2544
+ purge: (id: string) => Promise<unknown>;
2545
+ draft: (id: string) => Promise<VersionDto>;
2546
+ /** 409 HELP_VIDEO_EDITS_CONFLICT (with `current_hash`) when `base_hash` is stale;
2547
+ * 422 HELP_VIDEO_EDITS_INVALID when the edits keep under a second. */
2548
+ saveDraft: (id: string, edits: VideoEdits, base_hash?: string) => Promise<VersionDto>;
2549
+ publish: (id: string, watch_again: boolean) => Promise<HelpVideoDto>;
2550
+ rerecord: (id: string, upload_id: string) => Promise<VersionDto>;
2551
+ versions: (id: string) => Promise<(VersionDto & {
2552
+ is_published: boolean;
2553
+ is_draft: boolean;
2554
+ created_by_name: string | null;
2555
+ })[]>;
2556
+ restore: (id: string, versionId: string) => Promise<VersionDto>;
2557
+ rerender: (id: string, draft?: boolean) => Promise<unknown>;
2558
+ progress: (id: string, body: {
2559
+ position_ms: number;
2560
+ watched_ms_delta: number;
2561
+ buckets: string;
2562
+ version_id?: string;
2563
+ }) => Promise<{
2564
+ data: {
2565
+ completed: boolean;
2566
+ };
2567
+ } | undefined>;
2568
+ analytics: (id: string) => Promise<{
2569
+ views: number;
2570
+ unique_viewers: number;
2571
+ completion_rate: number;
2572
+ drop_off: number[];
2573
+ watched_hours: number;
2574
+ }>;
2575
+ openUpload: (mime: string) => Promise<{
2576
+ id: string;
2577
+ next_part: number;
2578
+ }>;
2579
+ /**
2580
+ * Closes an upload and stores the recorder's data with it, as given.
2581
+ * - `duration_ms`: recording time without pauses (the server prefers its
2582
+ * own probe of the file; 0 when unknown).
2583
+ * - `clicks`: `{ t_ms, x, y }` per click on the recorded tab: `t_ms` is
2584
+ * recording time, `x`/`y` are fractions (0–1) of the captured frame.
2585
+ * Null when clicks were not captured.
2586
+ * - `levels`: microphone loudness, one number from 0 (silence) to 1 every
2587
+ * 100 ms of recording time (10 per second), so `levels[i]` covers
2588
+ * `i * 100` ms. Null without a microphone.
2589
+ * Matches `HelpVideoVersion.clicks` / `.levels` in @nivaro/sdk.
2590
+ * 422 UPLOAD_TOO_LONG past 31 minutes, 409 UPLOAD_CLOSED when finished.
2591
+ */
2592
+ finalizeUpload: (id: string, meta: {
2593
+ duration_ms: number;
2594
+ clicks: RecordedClick[] | null;
2595
+ levels: number[] | null;
2596
+ }) => Promise<{
2597
+ file_id: string;
2598
+ duration_ms: number | null;
2599
+ }>;
2600
+ myUploads: () => Promise<{
2601
+ id: string;
2602
+ bytes_received: number;
2603
+ next_part: number;
2604
+ /** `open`, or `finalized`: uploaded but never saved as a video. */
2605
+ status: string;
2606
+ duration_ms: number | null;
2607
+ created_at: string;
2608
+ updated_at: string;
2609
+ }[]>;
2610
+ abandonUpload: (id: string) => Promise<unknown>;
2611
+ registerPage: (key: string, label: string, app?: string) => Promise<unknown>;
2612
+ authorRoles: () => Promise<string[]>;
2613
+ setAuthorRoles: (ids: string[]) => Promise<unknown>;
2614
+ };
2615
+
2616
+ export declare function HelpVideoButton({ collection, item, page, pageLabel, compact }: {
2617
+ collection?: string;
2618
+ item?: string | number;
2619
+ page?: string;
2620
+ /** Name authors see when choosing where a video shows (registered once per 10 min). */
2621
+ pageLabel?: string;
2622
+ compact?: boolean;
2623
+ }): JSX.Element;
2624
+
2625
+ export declare type HelpVideoContext = {
2626
+ kind: 'collection' | 'page';
2627
+ key: string;
2628
+ state_key: string | null;
2629
+ };
2630
+
2631
+ export declare interface HelpVideoDto {
2632
+ id: string;
2633
+ title: string;
2634
+ description: string | null;
2635
+ category: string | null;
2636
+ status: 'draft' | 'published' | 'archived';
2637
+ duration_ms: number | null;
2638
+ /** Ticketed URLs (`?st=`, relative to the API origin): use them as given,
2639
+ * never rebuild them. Tickets expire after 3–6 hours. */
2640
+ poster_url: string | null;
2641
+ stream_url: string | null;
2642
+ captions_url: string | null;
2643
+ contexts: HelpVideoContext[];
2644
+ /** Required for THIS viewer's role (not for the video in general). */
2645
+ required: boolean;
2646
+ published: VersionDto | null;
2647
+ visibility?: Visibility;
2648
+ required_role_ids?: string[];
2649
+ draft?: VersionDto | null;
2650
+ /** Author-only: the draft is exactly the published version (same recording,
2651
+ * same edits), so publishing it would change nothing. */
2652
+ draft_matches_published?: boolean;
2653
+ /** The draft's original recording (already carries `source=1`). */
2654
+ draft_stream_url?: string | null;
2655
+ draft_captions_url?: string | null;
2656
+ created_by_name?: string | null;
2657
+ updated_at: string;
2658
+ my_progress: HelpVideoProgress | null;
2659
+ }
2660
+
2661
+ export declare function HelpVideoEditor({ videoId, onClose }: {
2662
+ videoId: string;
2663
+ onClose?: () => void;
2664
+ }): JSX.Element;
2665
+
2666
+ export declare const helpVideoKeys: {
2667
+ all: readonly ["help-videos"];
2668
+ one: (id: string) => readonly ["help-videos", "one", string];
2669
+ forCtx: (ctx: Record<string, unknown>) => readonly ["help-videos", "for", Record<string, unknown>];
2670
+ library: (p: Record<string, unknown>) => readonly ["help-videos", "library", Record<string, unknown>];
2671
+ required: readonly ["help-videos", "required"];
2672
+ pages: readonly ["help-videos", "pages"];
2673
+ /** The editor's draft load. Outside the `all` prefix on purpose: GET
2674
+ * /draft/edits creates a missing draft, so a broad invalidation must
2675
+ * never refetch it. `n` bumps on Reload. */
2676
+ draftEdits: (id: string, n: number) => readonly ["help-video-draft", string, number];
2677
+ };
2678
+
2679
+ export declare function HelpVideoLibrary({ watchId, editId, onWatch, onEdit, headerExtra }: {
2680
+ watchId: string | null;
2681
+ editId: string | null;
2682
+ onWatch: (id: string | null) => void;
2683
+ onEdit: (id: string | null) => void;
2684
+ /** Host slot beside the Record button (admin puts "Who can record" there). */
2685
+ headerExtra?: React.ReactNode;
2686
+ }): JSX.Element;
2687
+
2688
+ /** Keyed by video id: switching to another video starts a fresh player, so
2689
+ * progress, the resume point and the one-retry flag never carry over. */
2690
+ export declare function HelpVideoPlayer(props: HelpVideoPlayerProps): JSX.Element;
2691
+
2692
+ declare type HelpVideoPlayerProps = {
2693
+ video: HelpVideoDto;
2694
+ /** viewer = rendered file when current; live = always source + edits (authors). */
2695
+ mode?: 'viewer' | 'live';
2696
+ /** Editor working copy (live mode). */
2697
+ edits?: VideoEdits;
2698
+ /** Play the draft (authors in the editor). */
2699
+ useDraft?: boolean;
2700
+ onTime?: (sourceMs: number, editedMs: number) => void;
2701
+ trackProgress?: boolean;
2702
+ autoPlay?: boolean;
2703
+ handleRef?: MutableRefObject<PlayerHandle | null>;
2704
+ className?: string;
2705
+ /** Rendered in frame coordinates above the video, outside the zoom (editor tools). */
2706
+ children?: (frame: {
2707
+ width: number;
2708
+ height: number;
2709
+ }) => ReactNode;
2710
+ };
2711
+
2712
+ declare interface HelpVideoProgress {
2713
+ position_ms: number;
2714
+ completed: boolean;
2715
+ percent: number;
2716
+ }
2717
+
2718
+ /**
2719
+ * Records this tab, a window or the whole screen with optional microphone
2720
+ * narration. Parts upload every five seconds and are kept in this browser
2721
+ * (IndexedDB) before they are sent and until the server confirms each one, so
2722
+ * an outage or a closed tab loses nothing: recording carries on through an
2723
+ * outage, and a refused or interrupted recording stays in the browser until
2724
+ * the person keeps or discards it. Recording stops by itself at 30:00.
2725
+ *
2726
+ * During recording only a small control bar shows. It portals into the
2727
+ * hosting [role="dialog"] when the recorder sits inside one (a modal sheet
2728
+ * makes everything outside it unclickable), else into document.body.
2729
+ */
2730
+ export declare function HelpVideoRecorder({ open, onClose, onDone, videoId, contexts, defaultTitle, barHost: hostOverride }: {
2731
+ open: boolean;
2732
+ onClose: () => void;
2733
+ onDone: (video: HelpVideoDto) => void;
2734
+ videoId?: string;
2735
+ contexts?: HelpVideoContext[];
2736
+ defaultTitle?: string;
2737
+ /** Mount the setup dialog and the recording bar inside this element (the
2738
+ * modal the recording was started from) while it is connected; document.body
2739
+ * after it goes. Without it the recorder follows its own place in the tree. */
2740
+ barHost?: HTMLElement | null;
2741
+ }): JSX.Element | null;
2742
+
2743
+ /**
2744
+ * Holds ONE recorder for the whole app. A walkthrough means clicking through
2745
+ * other screens, and a recorder mounted inside a screen ends the take at the
2746
+ * first route change.
2747
+ *
2748
+ * Placement (hosts: admin, efp-new): mount it ONCE, ABOVE the router outlet
2749
+ * and ABOVE every screen that calls useHelpVideoRecording(), and INSIDE a
2750
+ * QueryClientProvider, a NivaroProvider and an app-level NavigationContext
2751
+ * (navigate plus helpVideosPath). Without a NavigationContext it falls back
2752
+ * to window.location.href and the default /help-videos path.
2753
+ */
2754
+ export declare function HelpVideoRecordingProvider({ children }: {
2755
+ children: ReactNode;
2756
+ }): JSX.Element;
2757
+
2758
+ export declare function HelpVideoSheet({ videoId, open, onOpenChange, upNext, onPick, returnFocusRef }: {
2759
+ videoId: string | null;
2760
+ open: boolean;
2761
+ onOpenChange: (open: boolean) => void;
2762
+ /** Other videos for the same screen, offered under the player. */
2763
+ upNext?: HelpVideoDto[];
2764
+ onPick?: (id: string) => void;
2765
+ /** Where focus goes on close when the opener unmounts while the sheet is
2766
+ * open (a popover row). Absent = whatever had focus when the sheet opened. */
2767
+ returnFocusRef?: RefObject<HTMLElement | null>;
2768
+ }): JSX.Element;
2769
+
2487
2770
  /** Always-visible horizontal scrollbar proxy for the table scroller —
2488
2771
  * overlay-OS scrollbars hide, so wide tables get a persistent draggable
2489
2772
  * track pinned above the pagination footer. */
@@ -3321,7 +3604,7 @@ export declare type ItemEditAuthContextValue = {
3321
3604
  userId: string;
3322
3605
  };
3323
3606
 
3324
- export declare function ItemEditForm({ collection, itemId: itemIdProp, layoutSlug: layoutSlugProp, initialAddendumViewId, onAddendumViewChange, onBack, onSaved, onDeleted, showHeader, headerExtra, focusField, showItemActions, onDirtyChange, documentTitle, registerSaveHandler, onDuplicate, showRevisions, showClone, showPipeline, showWorkflow, showComments, showTasks, showLockBanner, className, headerClassName, renderField, extraTopContent, extraBottomContent, onHeaderWidgets, autofillProposalId, onAutofillConsumed, initialImportResult, initialValues, initialLinks, initialRows }: ItemEditFormProps): JSX.Element;
3607
+ export declare function ItemEditForm({ collection, itemId: itemIdProp, layoutSlug: layoutSlugProp, initialAddendumViewId, onAddendumViewChange, onBack, onSaved, onDeleted, showHeader, headerExtra, focusField, showItemActions, onDirtyChange, documentTitle, registerSaveHandler, onDuplicate, showRevisions, showClone, showPipeline, showWorkflow, showComments, showTasks, showLockBanner, className, headerClassName, renderField, extraTopContent, hideHelpVideoButton, extraBottomContent, onHeaderWidgets, autofillProposalId, onAutofillConsumed, initialImportResult, initialValues, initialLinks, initialRows }: ItemEditFormProps): JSX.Element;
3325
3608
 
3326
3609
  export declare interface ItemEditFormProps {
3327
3610
  collection: string;
@@ -3381,6 +3664,8 @@ export declare interface ItemEditFormProps {
3381
3664
  headerClassName?: string;
3382
3665
  renderField?: (props: RenderFieldProps) => ReactNode;
3383
3666
  extraTopContent?: ReactNode;
3667
+ /** Hide the header's own Videos button, for a host whose top bar already carries it. */
3668
+ hideHelpVideoButton?: boolean;
3384
3669
  extraBottomContent?: ReactNode;
3385
3670
  onHeaderWidgets?: (widgets: HeaderWidgetInfo[]) => void;
3386
3671
  /** Open the new-record form on a stored document proposal (`?autofill=<id>`
@@ -3909,6 +4194,9 @@ export declare type NavigationContextValue = {
3909
4194
  * the link is hidden. Headless hosts that embed the admin elsewhere can
3910
4195
  * return an absolute URL. */
3911
4196
  consoleUrl?: (adminPath: string) => string | null;
4197
+ /** Where the host mounts the help-video library (`?watch=` / `?edit=` are read there).
4198
+ * Absent = `/help-videos` (the admin route). */
4199
+ helpVideosPath?: string;
3912
4200
  };
3913
4201
 
3914
4202
  export declare function networkdaysBetween(a: Date, b: Date): number;
@@ -4887,9 +5175,27 @@ export declare interface PlanGridRowHistoryArgs {
4887
5175
  onClose: () => void;
4888
5176
  }
4889
5177
 
5178
+ export declare type PlayerHandle = {
5179
+ seekEdited(ms: number): void;
5180
+ seekSource(ms: number): void;
5181
+ play(): void;
5182
+ pause(): void;
5183
+ sourceMs(): number;
5184
+ editedMs(): number;
5185
+ frame(): {
5186
+ width: number;
5187
+ height: number;
5188
+ } | null;
5189
+ };
5190
+
4890
5191
  /** Play the configured notification sound. No-op for 'off'/unknown/unavailable audio. */
4891
5192
  export declare function playNotificationSound(kind: NotificationSound | string | null | undefined): void;
4892
5193
 
5194
+ declare type Point = {
5195
+ x: number;
5196
+ y: number;
5197
+ };
5198
+
4893
5199
  declare function pollProposal(opts: {
4894
5200
  fetchResult: () => Promise<ProposalPollAnswer>;
4895
5201
  onRunning?: (documentName?: string) => void;
@@ -5028,6 +5334,16 @@ declare interface QuerySheetDef {
5028
5334
  title?: string;
5029
5335
  width?: number | string;
5030
5336
  config?: QueryWidgetConfig;
5337
+ /** Figures above the tabs from a query of their own (same param tokens as a tab). */
5338
+ header?: {
5339
+ query_slug: string;
5340
+ params?: Record<string, unknown>;
5341
+ stats: QueryWidgetStat[];
5342
+ /** "As of" line under the tiles: label + the latest value of field. */
5343
+ as_of?: SheetHeaderAsOf;
5344
+ };
5345
+ /** Zero-based tab to open first (clamped into range). */
5346
+ initial_tab?: number;
5031
5347
  /** A tab is a nested query view OR a MatrixEditor (`matrix`): its scope is
5032
5348
  * seeded from the clicked row — `scope: {project: '$row.id'}` — and those
5033
5349
  * fields render as fixed context, not pickers. */
@@ -5051,7 +5367,7 @@ export declare function QueryStatStrip({ stats, rows, effectiveParams, loading }
5051
5367
  loading: boolean;
5052
5368
  }): JSX.Element | null;
5053
5369
 
5054
- export declare function QueryTable({ rows, config, onRowClick, pivotYear, rowActions, emptyLabel }: {
5370
+ export declare function QueryTable({ rows, config, onRowClick, pivotYear, rowActions, emptyLabel, emptyText }: {
5055
5371
  rows: Array<Record<string, unknown>>;
5056
5372
  config?: QueryTableConfig;
5057
5373
  /** Makes rows clickable (hover highlight); receives the (post-grouping) row. */
@@ -5060,6 +5376,8 @@ export declare function QueryTable({ rows, config, onRowClick, pivotYear, rowAct
5060
5376
  pivotYear?: number;
5061
5377
  /** Names the empty state ("No deployments yet") instead of a bare "No data". */
5062
5378
  emptyLabel?: string;
5379
+ /** The whole empty-state sentence, rendered as written (beats emptyLabel). */
5380
+ emptyText?: string;
5063
5381
  /** Trailing action buttons per row (and on the totals row, receiving null). */
5064
5382
  rowActions?: Array<{
5065
5383
  label: string;
@@ -5219,6 +5537,8 @@ declare interface QueryWidgetConfig {
5219
5537
  row_click?: QueryRowClick;
5220
5538
  filters?: QueryWidgetFilter[];
5221
5539
  stats?: QueryWidgetStat[];
5540
+ /** Sentence shown, as written, when the query returns no rows. */
5541
+ empty_label?: string;
5222
5542
  /** Trailing action buttons per row (and totals row) opening nested sheets. */
5223
5543
  row_actions?: Array<{
5224
5544
  label: string;
@@ -5583,6 +5903,13 @@ export declare function RecordDrilldownSheet({ collection, itemId, layoutId, roo
5583
5903
  onClose: () => void;
5584
5904
  }): JSX.Element;
5585
5905
 
5906
+ /** One click on the recorded tab: recording time and frame fractions (0–1). */
5907
+ declare type RecordedClick = {
5908
+ t_ms: number;
5909
+ x: number;
5910
+ y: number;
5911
+ };
5912
+
5586
5913
  export declare function RecordGraphExplorer({ collection, itemId, className }: {
5587
5914
  collection: string;
5588
5915
  itemId: string;
@@ -5775,6 +6102,13 @@ export declare function RecordSubscribeButton({ collection, itemId, recordLabel,
5775
6102
  compact?: boolean;
5776
6103
  }): JSX.Element;
5777
6104
 
6105
+ declare type Rect = {
6106
+ x: number;
6107
+ y: number;
6108
+ w: number;
6109
+ h: number;
6110
+ };
6111
+
5778
6112
  /** Register a detail opener for a catalog collection. Returns an unregister
5779
6113
  * cleanup — call it on unmount so a dead host can't leave a stale opener. */
5780
6114
  export declare function registerCatalogItemOpener(collection: string, fn: CatalogItemOpener): () => void;
@@ -5876,6 +6210,8 @@ export declare type RenderFieldProps = {
5876
6210
  requiredParentLabel?: string | null;
5877
6211
  };
5878
6212
 
6213
+ declare type RenderStatus = 'none' | 'queued' | 'rendering' | 'ready' | 'failed' | 'unavailable';
6214
+
5879
6215
  export declare function ReportView({ reportId, showFilterBar, dateRange, initialEntityFilters, refetchInterval, className, emptyState, reportUrl }: ReportViewProps & {
5880
6216
  reportUrl?: (id: string) => string;
5881
6217
  }): JSX.Element;
@@ -5920,6 +6256,10 @@ export declare function ReportWidgetCard({ reportId, widget, dateRange, entityFi
5920
6256
  entityFilters?: ReportEntityFilter[];
5921
6257
  }): JSX.Element;
5922
6258
 
6259
+ export declare function RequiredVideosCard({ className }: {
6260
+ className?: string;
6261
+ }): JSX.Element;
6262
+
5923
6263
  export declare function resolveCollectionIcon(iconName: string | null | undefined): React.ElementType | null;
5924
6264
 
5925
6265
  export declare function resolveNotificationTarget(collection: string | null | undefined, item: string | null | undefined, routes: NotificationRouteMap): NotificationTarget;
@@ -6276,6 +6616,12 @@ export declare function seedQuickPickerSteps(fieldConfig: Array<{
6276
6616
  junction_field: string | null;
6277
6617
  }>, collection: string): string[];
6278
6618
 
6619
+ declare interface Segment {
6620
+ start_ms: number;
6621
+ end_ms: number;
6622
+ speed: Speed;
6623
+ }
6624
+
6279
6625
  export declare function SelectField({ field, value, onChange, error, disabled, readOnly, inputId, errorId }: FieldComponentProps): JSX.Element;
6280
6626
 
6281
6627
  declare interface SendInput {
@@ -6339,6 +6685,20 @@ export declare function setNumberFormat(opts: {
6339
6685
 
6340
6686
  export declare function setTimeDisplay(mode: string | null | undefined): void;
6341
6687
 
6688
+ /**
6689
+ * The pure part of opening a query sheet: which tabs it has, which tab opens
6690
+ * first, and the optional header strip (a query of its own, rendered above
6691
+ * the tabs as stat tiles). `resolveConfig` is the caller's token resolver —
6692
+ * '$row.' / '$param.' / '$filters.' — applied to the header exactly as to a
6693
+ * tab, so the two cannot drift.
6694
+ */
6695
+ /** A quiet "as of" line under the header tiles: `label` followed by the
6696
+ * latest `field` value among the header rows (omitted when no row has one). */
6697
+ declare interface SheetHeaderAsOf {
6698
+ field: string;
6699
+ label: string;
6700
+ }
6701
+
6342
6702
  declare interface SheetItem {
6343
6703
  collection: string;
6344
6704
  item_id: string;
@@ -6481,6 +6841,8 @@ export declare function SnoozeMenu({ signal, signalLabel, rowKey, group, default
6481
6841
  compact?: boolean;
6482
6842
  }): JSX.Element;
6483
6843
 
6844
+ declare type Speed = 1 | 1.5 | 2 | 4;
6845
+
6484
6846
  export declare function splitMessageTokens(text: string, entityPattern: string): MessageToken[];
6485
6847
 
6486
6848
  declare type SpreadPreset = 'even' | 'front' | 'back' | 'shape';
@@ -6505,6 +6867,20 @@ export declare function startAutofillRun(cfg: FetchCfg, run: {
6505
6867
  poll?: typeof pollProposal;
6506
6868
  }): AutofillRun;
6507
6869
 
6870
+ export declare type StartRecordingOptions = {
6871
+ /** Where the new video shows (a new recording only). */
6872
+ contexts?: HelpVideoContext[];
6873
+ /** Re-record this video instead of making a new one. */
6874
+ videoId?: string;
6875
+ /** Called with the saved video when the caller is still mounted. When the
6876
+ * caller is gone (or gave none) the provider opens the editor instead. */
6877
+ onDone?: (video: HelpVideoDto) => void;
6878
+ /** An element of the caller. When it sits inside a modal dialog or sheet, the
6879
+ * setup dialog and the recording bar mount inside that modal (a modal makes
6880
+ * everything outside it unclickable). Absent = the element focused at start. */
6881
+ from?: HTMLElement | null;
6882
+ };
6883
+
6508
6884
  export declare function startRum(opts?: {
6509
6885
  app?: string;
6510
6886
  routePattern?: (path: string) => string;
@@ -6779,6 +7155,8 @@ export declare function titleCase(str: string): string;
6779
7155
 
6780
7156
  export declare type TokenResolver = (path: string) => unknown;
6781
7157
 
7158
+ declare type Tone = 'accent' | 'warning' | 'neutral';
7159
+
6782
7160
  /** Which of the four alert tones an outcome reads as — overdue/failed/missing
6783
7161
  * are the record still does NOT have what it should (danger); pending and
6784
7162
  * skipped are in flight or a deliberate no with a reason (warning, worth a
@@ -7131,6 +7509,33 @@ export declare function useFormStatus(form: UseNivaroFormReturn): FormStatus;
7131
7509
 
7132
7510
  export declare function useGridFlush(): GridFlushContextValue | null;
7133
7511
 
7512
+ export declare function useHelpVideo(id: string | null): UseQueryResult<NoInfer<HelpVideoDto>, Error>;
7513
+
7514
+ /**
7515
+ * Start a recording from anywhere. With a provider above, the recording
7516
+ * survives this component unmounting. Without one, `fallback` is a local
7517
+ * recorder the caller renders (it ends with the caller), so nothing breaks
7518
+ * before a host mounts the provider.
7519
+ */
7520
+ export declare function useHelpVideoRecording(): {
7521
+ /** false when a recording is already in progress (show RECORDING_BUSY). */
7522
+ start: (opts?: StartRecordingOptions) => boolean;
7523
+ active: boolean;
7524
+ /** Render this somewhere in the caller. Null when a provider hosts the recorder. */
7525
+ fallback: ReactNode;
7526
+ };
7527
+
7528
+ export declare function useHelpVideosFor(ctx: {
7529
+ collection?: string;
7530
+ item?: string | number;
7531
+ state?: string;
7532
+ page?: string;
7533
+ }, enabled?: boolean): UseQueryResult<NoInfer<{
7534
+ data: HelpVideoDto[];
7535
+ can_author: boolean;
7536
+ state: string | null;
7537
+ }>, Error>;
7538
+
7134
7539
  export declare function useImportHealth(): UseQueryResult<NoInfer<ImportHealth>, Error>;
7135
7540
 
7136
7541
  export declare function useItemEditAuth(): ItemEditAuthContextValue;
@@ -7371,6 +7776,8 @@ export declare function useRelationOptions(client: NivaroClient | null, relatedC
7371
7776
  error: Error | null;
7372
7777
  };
7373
7778
 
7779
+ export declare function useRequiredVideos(): UseQueryResult<NoInfer<HelpVideoDto[]>, Error>;
7780
+
7374
7781
  export declare function useRoomMembership(): {
7375
7782
  join: UseMutationResult<unknown, Error, string, unknown>;
7376
7783
  leave: UseMutationResult<unknown, Error, string, unknown>;
@@ -7528,6 +7935,45 @@ declare interface ValidationResult {
7528
7935
  unknownTokens: string[];
7529
7936
  }
7530
7937
 
7938
+ declare interface VersionDto {
7939
+ id: string;
7940
+ version: number;
7941
+ edits: VideoEdits;
7942
+ edits_hash: string;
7943
+ source_duration_ms: number | null;
7944
+ width: number | null;
7945
+ height: number | null;
7946
+ render_status: RenderStatus;
7947
+ render_progress: number | null;
7948
+ render_error: string | null;
7949
+ rendered_current: boolean;
7950
+ /** Published version only: false when a non-author would get the 409
7951
+ * HELP_VIDEO_PROCESSING ("still being prepared") from the stream. */
7952
+ playable?: boolean;
7953
+ note: string | null;
7954
+ created_at: string;
7955
+ /** Draft, re-record and restore results only (recorder data). */
7956
+ /** Clicks on the recorded tab: `t_ms` source time, `x`/`y` frame fractions (0–1). */
7957
+ clicks?: Array<{
7958
+ t_ms: number;
7959
+ x: number;
7960
+ y: number;
7961
+ }> | null;
7962
+ /** Microphone loudness 0–1, one value per 100 ms of source time. */
7963
+ levels?: number[] | null;
7964
+ }
7965
+
7966
+ export declare interface VideoEdits {
7967
+ v: 1;
7968
+ segments: Segment[];
7969
+ poster_ms: number;
7970
+ chapters: Chapter[];
7971
+ annotations: Annotation[];
7972
+ zooms: Zoom[];
7973
+ blurs: Blur[];
7974
+ captions: Caption[];
7975
+ }
7976
+
7531
7977
  export declare function viewAs(person: {
7532
7978
  id: string;
7533
7979
  name: string;
@@ -7545,6 +7991,11 @@ declare type ViewAsOpener = (person: {
7545
7991
  name: string;
7546
7992
  }) => void | Promise<void>;
7547
7993
 
7994
+ declare type Visibility = {
7995
+ mode: 'everyone' | 'roles';
7996
+ role_ids: string[];
7997
+ };
7998
+
7548
7999
  export declare function WidgetSlot({ widgetId, inputBindings, itemDraft, itemCollection, ready, label, defaultExpanded, frameless, apiBase: apiBaseProp, compact, strip, onClientAction, onWidgetType, onContentChange }: WidgetSlotProps): JSX.Element | null;
7549
8000
 
7550
8001
  declare interface WidgetSlotProps {
@@ -7578,4 +8029,12 @@ export declare function WorkflowPanel({ collection, item }: {
7578
8029
  item: string;
7579
8030
  }): JSX.Element | null;
7580
8031
 
8032
+ declare interface Zoom {
8033
+ id: string;
8034
+ start_ms: number;
8035
+ end_ms: number;
8036
+ rect: Rect;
8037
+ ease_ms: number;
8038
+ }
8039
+
7581
8040
  export { }