memorax-ai/dsh-render-engine--packages-structured-render ↗★ 1

@ch4acko3/dsh-structured-render

安全渲染可折叠的结构化JSON数据 适合需要在Web界面中展示复杂、可展开折叠的JSON或对象数据的开发者。

包名
@ch4acko3/dsh-structured-render
兼容性
待验证
Cordis 依赖范围
^4.0.1
版本
0.1.3
许可证
MIT
最近更新
2026年9月24日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:memorax-ai/dsh-render-engine#9582bf138d3a6d7381a84359a4a0b878a1ea8952&path:packages/structured-render

@ch4acko3/dsh-structured-render

Safe, theme-aware structured data rendering for DeepSeek Harness Web plugins.

export const inject = ['structuredRenderer']

export function apply(ctx) {
  const result = ctx.structuredRenderer.render({
    label: 'response',
    value: { ready: true, items: [{ id: 1 }, { id: 2 }] },
    expandedDepth: 2,
  })

  console.log(result.html)
  console.log(result.nodeCount)
}

The service accepts JSON-compatible values, escapes labels and strings, and uses native `` elements for keyboard-accessible disclosure. expandedDepth controls how many levels begin open and defaults to 1.