Khorsheed/dsh-plugins--packages-ui-content-preview ↗★ 0

@khorsheed/dsh-client-ui-content-preview

Shared client-side content-preview kernel for community file surfaces: the kind-union content pane (markdown / JSON / CSV / image / code, plus the Tier0/Tier1 sandboxed HTML render with its capability bridge), rendered-content search, and the per-file host-open chrome. Consumed at the SOURCE plane — each surface's tsdown client bundle inlines it — never mounted as a plugin row. 作为其他文件浏览插件的底层预览内核,不作为插件单独安装。

Package
@khorsheed/dsh-client-ui-content-preview
Compatibility
Unverified
Harness peer range
^0.1.0-rc.6
Version
0.1.1
License
MIT
Last updated
Sep 28, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

使用

import { ContentPane, buildSrcDoc, attachBridge, structuredPreview, useRenderedSearch } from '@khorsheed/dsh-client-ui-content-preview/src/client/index.ts'

文案由调用方提供:内核不持有任何 locale 命名空间,所有字符串经调用方用自己字典构造的 PreviewTranslator 与 StructuredLabels 注入;PREVIEW_KEYS 常量实体化全部 key,消费方的包级测试断言每个 key 在自己的字典里可解析——缺 key 是测试失败,而不是中文 UI 里蹦英文。