BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/retab-ui/split-consensus-viewer-block

Split Consensus

retab-ui/split-consensus-viewer-block
FreeBlock

A split result with multi-run consensus visible in the sidebar: the page rail stays beside output-level likelihoods and each vote used to build the final split.

Install it

npx shadcn@latest add https://ui.retab.com/r/split-consensus-viewer-block.json

Source

registry/new-york-v4/blocks/split-consensus-viewer-block.tsxui.retab.com/r/split-consensus-viewer-block.json · first 6 KB
1"use client";
2
3import * as React from "react";
4import { GitBranch, Vote } from "lucide-react";
5
6import { cn } from "@/lib/utils";
7import {
8 FileViewer,
9 FileViewerContent,
10 FileViewerControls,
11 FileViewerHeader,
12 FileViewerInset,
13 FileViewerLegend,
14 FileViewerProvider,
15 FileViewerSidebar,
16 FileViewerSidebarContent,
17 FileViewerSidebarHeader,
18 FileViewerSidebarTrigger,
19 FileViewerTitle,
20} from "@/components/ui/file-viewer";
21import { Label } from "@/components/ui/label";
22import { PdfViewerPages, PdfViewerProvider } from "@/components/ui/pdf-viewer";
23import { Switch } from "@/components/ui/switch";
24import type {
25 SplitResult,
26 SplitSubdocumentLikelihood,
27 SplitView,
28} from "@/components/viewers/lib/split-types";
29import {
30 SplitViewerDocument,
31 SplitViewerLegend,
32 SplitViewerPageRail,
33 SplitViewerProvider,
34 useSplitViewerDocumentControls,
35} from "@/components/viewers/split/split-viewer";
36
37const PDF_SOURCE = {
38 kind: "url" as const,
39 url: "/samples/an-image-is-worth-16x16-words.pdf",
40 fileName: "an-image-is-worth-16x16-words.pdf",
41};
42
43const SPLIT_OUTPUT: SplitResult[] = [
44 { name: "Title, Abstract & Introduction", pages: [1] },
45 { name: "Related Work", pages: [2] },
46 { name: "Method", pages: [3] },
47 { name: "Experiments", pages: pages(4, 8) },
48 { name: "Conclusion", pages: [9] },
49 { name: "References", pages: pages(10, 12) },
50 { name: "Appendix", pages: pages(13, 22) },
51];
52
53const SPLIT_CONSENSUS_CHOICES: SplitResult[][] = [
54 SPLIT_OUTPUT,
55 [
56 { name: "Title, Abstract & Introduction", pages: [1] },
57 { name: "Related Work", pages: [2] },
58 { name: "Method", pages: [3, 4] },
59 { name: "Experiments", pages: pages(5, 8) },
60 { name: "Conclusion & References", pages: pages(9, 12) },
61 { name: "Appendix", pages: pages(13, 22) },
62 ],
63 [
64 { name: "Title, Abstract & Introduction", pages: [1] },
65 { name: "Related Work", pages: [2] },
66 { name: "Method", pages: [3] },
67 { name: "Experiments", pages: pages(4, 8) },
68 { name: "Conclusion", pages: [9] },
69 { name: "References", pages: pages(10, 12) },
70 { name: "Appendix", pages: pages(13, 22) },
71 ],
72];
73
74const SPLIT_CONSENSUS_LIKELIHOODS: SplitSubdocumentLikelihood[] = [
75 { name: 0.98, pages: [0.98] },
76 { name: 0.92, pages: [0.91] },
77 { name: 0.89, pages: [0.86] },
78 { name: 0.95, pages: [0.96, 0.95, 0.95, 0.94, 0.96] },
79 { name: 0.8, pages: [0.77] },
80 { name: 0.82, pages: [0.81, 0.83, 0.82] },
81 {
82 name: 0.99,
83// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • @retab/file-viewer
  • @retab/pdf-viewer
  • @retab/label
  • @retab/switch
  • @retab/segment-legend
  • @retab/segment-page-rail
  • @retab/use-segment-interaction

Files it writes

  • registry/new-york-v4/blocks/split-consensus-viewer-block.tsx
  • components/viewers/lib/partition-types.ts
  • components/viewers/lib/split-types.ts
  • components/viewers/split/split-viewer.tsx
  • registry/new-york-v4/ui/segmented-document-model.ts
  • registry/new-york-v4/ui/segmented-document-provider.tsx
  • registry/new-york-v4/ui/use-segment-viewport-controller.ts

Facts

Registry
retab-ui
Type
registry:block
Access
Free
Files written
7
Licence
NOASSERTION
First indexed
2026-08-04
Last confirmed
today

Go to the source

ui.retab.com retab-dev/retab-ui on GitHub Raw registry item This item as JSON

More from retab-ui

All 130 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Classify Consensusclassify-consensus-viewer-blockretab-uiBlocksFree1 dep · 4 files
CSV Sourcescsv-sources-blockretab-uiBlocksFreeno deps · 2 files
DOCX Sourcesdocx-sources-blockretab-uiBlocksFreeno deps · 2 files
Avatar Image Slotdropzone-avatar-image-slotretab-uiBlocksFree1 dep · 2 files
Dropzonedropzone-blockretab-uiBlocksFree1 dep · 26 files
Comparison Pairdropzone-comparison-pair-uploadretab-uiBlocksFree1 dep · 2 files
Controlled Queuedropzone-controlled-queueretab-uiBlocksFree1 dep · 2 files
Custom Thumbnail Griddropzone-custom-thumbnail-gridretab-uiBlocksFree1 dep · 2 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex