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/docx-document-resource

DOCX Document Resource

retab-ui/docx-document-resource
FreeUtility

Load and cache DOCX bytes without viewer chrome.

Install it

npx shadcn@latest add https://ui.retab.com/r/docx-document-resource.json

Source

registry/new-york-v4/lib/docx-document-resource.tsui.retab.com/r/docx-document-resource.json
1import type {
2 ViewerContentBytes,
3 ViewerContentIdentity,
4} from "@/lib/viewer-resource";
5
6const bufferCache = new Map<string, Promise<ArrayBuffer>>();
7
8export function getDocxDocumentResource(
9 content: ViewerContentBytes,
10 options: { retainRejected?: boolean } = {},
11): Promise<ArrayBuffer> {
12 const loadKey = content.key;
13 const cached = bufferCache.get(loadKey);
14 if (cached) return cached;
15
16 const promise = readDocxBytes(content).catch((error) => {
17 if (!options.retainRejected && bufferCache.get(loadKey) === promise) {
18 bufferCache.delete(loadKey);
19 }
20 throw error;
21 });
22 bufferCache.set(loadKey, promise);
23 return promise;
24}
25
26export function clearDocxDocumentResource(content: ViewerContentIdentity) {
27 bufferCache.delete(content.key);
28}
29
30export function resetDocxDocumentResourceCacheForTests() {
31 bufferCache.clear();
32}
33
34function readDocxBytes(content: ViewerContentBytes): Promise<ArrayBuffer> {
35 return content.readBytes();
36}

Files it writes

  • registry/new-york-v4/lib/docx-document-resource.ts
  • registry/new-york-v4/lib/viewer-resource.ts
  • registry/new-york-v4/lib/viewer-download-actions.ts
  • registry/new-york-v4/lib/viewer-errors.ts
  • registry/new-york-v4/lib/viewer-source.ts

Facts

Registry
retab-ui
Type
registry:lib
Access
Free
Files written
5
Licence
NOASSERTION
In the index
at or before 2026-08-10
Last confirmed
yesterday

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
CSV parsercsvretab-uiUtilitiesFreeno deps · 4 files
Document source modeldocument-sourceretab-uiUtilitiesFreeno deps
Effect Keyeffect-keyretab-uiUtilitiesFreeno deps
PDF Document Resourcepdf-document-resourceretab-uiUtilitiesFree1 dep · 6 files
Segment Interactionsegment-interactionretab-uiUtilitiesFreeno deps
Segments modelsegmentsretab-uiUtilitiesFreeno deps
Utilsutilsretab-uiUtilitiesFree2 deps
XLSX SheetJS flattenerxlsx-sheetjs-flattenerretab-uiUtilitiesFree1 dep

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex