@longzai-intelligence-cli/tui 0.0.11 → 0.0.12
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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -156,7 +156,7 @@ type InfoPanelProps = {
|
|
|
156
156
|
* @param options - 组件属性对象:title 为面板标题,children 为内容区子元素
|
|
157
157
|
* @returns 渲染青色粗体标题与内容区的纵向 Ink Box。
|
|
158
158
|
*/
|
|
159
|
-
declare const InfoPanel:
|
|
159
|
+
declare const InfoPanel: (options: InfoPanelProps) => import("react").JSX.Element;
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region src/components/empty-state.d.ts
|
|
162
162
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BqT_7tdF.js";import{Box as e,Text as t,render as n}from"ink";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(e){return n(e)}const o=({text:n=`暂无数据`})=>/* @__PURE__ */ r(e,{padding:1,children:/* @__PURE__ */ r(t,{dimColor:!0,children:n})});function s(e,t){if(typeof t==`function`)return t(e);let n=e[t];return n==null?`-`:String(n)}function c(n){let{columns:a,rows:c,title:l,total:u,emptyText:d=`暂无数据`,rowKey:f}=n;if(c.length===0)return/* @__PURE__ */ r(o,{text:d});let p=a.reduce((e,t)=>e+t.width,0);return/* @__PURE__ */ i(e,{flexDirection:`column`,padding:1,children:[l!==void 0&&/* @__PURE__ */ i(t,{color:`cyan`,bold:!0,children:[l,u===void 0?``:`(共 ${u} 条)`]}),/* @__PURE__ */ i(e,{marginTop:l===void 0?0:1,flexDirection:`column`,children:[/* @__PURE__ */ r(e,{children:a.map(n=>/* @__PURE__ */ r(e,{width:n.width,children:/* @__PURE__ */ r(t,{bold:!0,color:`gray`,children:n.header})},n.header))}),/* @__PURE__ */ r(t,{dimColor:!0,children:`─`.repeat(p)}),c.map((n,i)=>/* @__PURE__ */ r(e,{children:a.map(i=>{let a=s(n,i.cell);return/* @__PURE__ */ r(e,{width:i.width,children:i.color===void 0?/* @__PURE__ */ r(t,{children:a}):/* @__PURE__ */ r(t,{color:i.color,children:a})},i.header)})},f?.(n,i)??String(i)))]})]})}const l=
|
|
1
|
+
import"./rolldown-runtime-BqT_7tdF.js";import{Box as e,Text as t,render as n}from"ink";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(e){return n(e)}const o=({text:n=`暂无数据`})=>/* @__PURE__ */ r(e,{padding:1,children:/* @__PURE__ */ r(t,{dimColor:!0,children:n})});function s(e,t){if(typeof t==`function`)return t(e);let n=e[t];return n==null?`-`:String(n)}function c(n){let{columns:a,rows:c,title:l,total:u,emptyText:d=`暂无数据`,rowKey:f}=n;if(c.length===0)return/* @__PURE__ */ r(o,{text:d});let p=a.reduce((e,t)=>e+t.width,0);return/* @__PURE__ */ i(e,{flexDirection:`column`,padding:1,children:[l!==void 0&&/* @__PURE__ */ i(t,{color:`cyan`,bold:!0,children:[l,u===void 0?``:`(共 ${u} 条)`]}),/* @__PURE__ */ i(e,{marginTop:l===void 0?0:1,flexDirection:`column`,children:[/* @__PURE__ */ r(e,{children:a.map(n=>/* @__PURE__ */ r(e,{width:n.width,children:/* @__PURE__ */ r(t,{bold:!0,color:`gray`,children:n.header})},n.header))}),/* @__PURE__ */ r(t,{dimColor:!0,children:`─`.repeat(p)}),c.map((n,i)=>/* @__PURE__ */ r(e,{children:a.map(i=>{let a=s(n,i.cell);return/* @__PURE__ */ r(e,{width:i.width,children:i.color===void 0?/* @__PURE__ */ r(t,{children:a}):/* @__PURE__ */ r(t,{color:i.color,children:a})},i.header)})},f?.(n,i)??String(i)))]})]})}const l=n=>{let{title:a,children:o}=n;return/* @__PURE__ */ i(e,{flexDirection:`column`,padding:1,children:[/* @__PURE__ */ r(t,{color:`cyan`,bold:!0,children:a}),/* @__PURE__ */ r(e,{marginTop:1,flexDirection:`column`,children:o})]})};export{c as DataTable,o as EmptyState,l as InfoPanel,a as renderApp};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longzai-intelligence-cli/tui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Longzai Intelligence CLI 终端 TUI 交互预设",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"longzai-intelligence",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"clean": "lzi-dev-cli clean"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@longzai-intelligence-cli/core": "0.0.
|
|
43
|
+
"@longzai-intelligence-cli/core": "0.0.12",
|
|
44
44
|
"ink": "^5.0.1",
|
|
45
45
|
"react": "^19.2.6"
|
|
46
46
|
},
|