orbcafe-ui 1.1.1 → 1.1.3

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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  - 组件可直接通过 NPM 安装并使用。
8
8
  - 组件 API 稳定、类型完整、目录结构一致。
9
- - 组件内部逻辑可复用(通过 Hooks),文档可追踪(README 规范化)。
9
+ - 组件公共 API、类型契约与回调契约稳定,文档与 examples 可追踪。
10
10
 
11
11
  ---
12
12
 
@@ -24,12 +24,13 @@
24
24
  | `CustomizeAgent` | AI 参数与 Prompt 模板设置弹窗 | `src/components/CustomizeAgent` | `src/components/CustomizeAgent/README.md` |
25
25
  | `DetailInfo` | 标准详情页容器(信息块 + Tabs + 底部表格 + AI/搜索) | `src/components/DetailInfo` | `src/components/DetailInfo/README.md` |
26
26
  | `PageLayout` | 页面壳层(Header + Navigation + Content) | `src/components/PageLayout` | `src/components/PageLayout/README.md` |
27
+ | `AgentUI` | 聊天 UI 与 Copilot UI(StdChat / CopilotChat / AgentPanel) | `src/components/AgentUI` | `src/components/AgentUI/README.md` |
27
28
 
28
29
  ### 文档查阅顺序(推荐)
29
30
 
30
31
  1. 先看模块根 README:了解能力边界、最小接入示例。
31
- 2. 再看模块 `Hooks/README.md`:确认状态管理、参数、返回值与联动方式。
32
- 3. 最后看模块详细设计文档(如 `graphreport.md`):理解内部结构与扩展点。
32
+ 2. 如果该模块公开导出 hooks,再看模块 `Hooks/README.md`:确认状态管理、参数、返回值与联动方式。
33
+ 3. 最后看模块详细设计文档或 AI 契约索引:理解内部结构、标准案例与扩展点。
33
34
 
34
35
  ### 常用文档索引
35
36
 
@@ -38,6 +39,76 @@
38
39
  - `StdReport Hooks`:`src/components/StdReport/Hooks/README.md`
39
40
  - `PageLayout Hooks`:`src/components/PageLayout/Hooks/README.md`
40
41
  - `DetailInfo` 模块文档:`src/components/DetailInfo/README.md`
42
+ - `AgentUI` 模块文档:`src/components/AgentUI/README.md`
43
+ - `AI 模块契约索引`:`skills/orbcafe-ui-component-usage/references/module-contracts.md`
44
+
45
+ ---
46
+
47
+ ## AgentUI(聊天与 Copilot)
48
+
49
+ `AgentUI` 是库里负责聊天类交互的标准模块,当前建议直接使用以下公共 API:
50
+
51
+ - `AgentPanel`: 带头部的标准聊天容器。
52
+ - `StdChat`: 适合整页、弹窗、工作台内嵌聊天。
53
+ - `CopilotChat`: 适合右下角 Copilot 浮窗内容层。
54
+ - `AgentUICardHooks` / `AgentUICardHookEvent`: 卡片交互事件回调类型。
55
+
56
+ ### Import
57
+
58
+ ```tsx
59
+ import {
60
+ AgentPanel,
61
+ StdChat,
62
+ CopilotChat,
63
+ type ChatMessage,
64
+ type AgentUICardHooks
65
+ } from 'orbcafe-ui'
66
+ ```
67
+
68
+ ### 使用约定
69
+
70
+ - `AgentUI` 当前没有独立导出的自定义 hooks,对外稳定接口是组件 props 和回调契约。
71
+ - 标准消息状态以 `messages + isResponding` 为主。
72
+ - 卡片交互统一通过 `cardHooks.onCardEvent` 承接。
73
+ - `StdChat` 负责标准聊天布局,`CopilotChat` 只负责 Copilot 面板内容层,不负责浮窗壳、拖拽和缩放。
74
+
75
+ 详细接入方式、example 拆解和封装边界说明见 `src/components/AgentUI/README.md`。
76
+
77
+ ---
78
+
79
+ ## AI-First Integration
80
+
81
+ 如果目标是让 AI 在 vibe coding 场景里稳定使用 ORBCAFE UI,推荐遵循这条顺序:
82
+
83
+ 1. 先用 `skills/orbcafe-ui-component-usage` 判定目标模块。
84
+ 2. 再看 `skills/orbcafe-ui-component-usage/references/module-contracts.md`,确认:
85
+ - 公共导出入口
86
+ - 推荐标准组件
87
+ - 是否公开 hooks
88
+ - 最小状态结构
89
+ - 标准 example
90
+ - 验证与排障清单
91
+ 3. 最后才看具体模块 README 和官方 examples。
92
+
93
+ ### 当前标准化原则
94
+
95
+ - 只使用 `src/index.ts` 可达的公共导出。
96
+ - 优先走 canonical example,不从内部组件自由拼装。
97
+ - 每个模块都要回答 5 个问题:
98
+ - 用哪个公共入口组件或 hook
99
+ - 最小状态是什么
100
+ - 必须回调有哪些
101
+ - 标准 example 是哪个
102
+ - 怎么验证“真的生效了”
103
+
104
+ ### 关于 Hooks
105
+
106
+ 不是所有模块都以 hooks 为主入口。
107
+
108
+ - `StdReport`、`DetailInfo`、`PivotTable`、`AINav`、`PageLayout` 明确公开了 hooks。
109
+ - `AgentUI` 当前不公开自定义 hook,稳定入口是组件 props 和回调契约。
110
+
111
+ 这条规则对 AI 很重要,因为它决定了应该生成“hook 驱动代码”还是“组件 + callbacks 驱动代码”。
41
112
 
42
113
  ---
43
114
 
@@ -186,15 +257,24 @@ Hydration mismatch 常见来源:
186
257
  提交前建议至少执行:
187
258
 
188
259
  ```bash
189
- # 1) 构建组件库
260
+ # 1) 校验 AI 契约与公开导出一致
261
+ npm run check:ai-contracts
262
+
263
+ # 2) 构建组件库
190
264
  npm run build
191
265
 
192
- # 2) 校验 examples
266
+ # 3) 校验 examples
193
267
  cd examples
194
268
  npm run lint
195
269
  npx tsc --noEmit
196
270
  ```
197
271
 
272
+ 如果要做一轮更完整的发布前检查:
273
+
274
+ ```bash
275
+ npm run release:check
276
+ ```
277
+
198
278
  如果只想快速看运行效果:
199
279
 
200
280
  ```bash
@@ -202,6 +282,16 @@ cd examples
202
282
  npm run dev
203
283
  ```
204
284
 
285
+ ### 发布前 AI 契约清单
286
+
287
+ 每次发布前至少确认:
288
+
289
+ 1. `src/index.ts` 的公共导出与 skill 文档一致。
290
+ 2. `skills/orbcafe-ui-component-usage/references/module-contracts.md` 和 `.json` 已同步更新。
291
+ 3. 新模块已声明 `Hook-first` / `Component-first`。
292
+ 4. 每个模块至少有一个 canonical example。
293
+ 5. router skill 已能把新模块正确分流。
294
+
205
295
  ---
206
296
 
207
297
  ## Internationalization (i18n)
@@ -0,0 +1 @@
1
+ export{b as COrbCanvas}from'./chunk-74Z76O3S.mjs';
@@ -0,0 +1,183 @@
1
+ import {Renderer,Triangle,Program,Vec3,Mesh}from'ogl';import {useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';var U=Object.defineProperty;var B=(t,o,n)=>o in t?U(t,o,{enumerable:true,configurable:true,writable:true,value:n}):t[o]=n;var X=(t,o,n)=>B(t,typeof o!="symbol"?o+"":o,n);function J({hue:t=0,hoverIntensity:o=.2,rotateOnHover:n=true,forceHoverState:s=false,backgroundColor:a="transparent"}){let c=useRef(null),g=`
2
+ precision highp float;
3
+ attribute vec2 position;
4
+ attribute vec2 uv;
5
+ varying vec2 vUv;
6
+ void main() {
7
+ vUv = uv;
8
+ gl_Position = vec4(position, 0.0, 1.0);
9
+ }
10
+ `,h=`
11
+ precision highp float;
12
+
13
+ uniform float iTime;
14
+ uniform vec3 iResolution;
15
+ uniform float hue;
16
+ uniform float hover;
17
+ uniform float rot;
18
+ uniform float hoverIntensity;
19
+ uniform vec3 backgroundColor;
20
+ varying vec2 vUv;
21
+
22
+ vec3 rgb2yiq(vec3 c) {
23
+ float y = dot(c, vec3(0.299, 0.587, 0.114));
24
+ float i = dot(c, vec3(0.596, -0.274, -0.322));
25
+ float q = dot(c, vec3(0.211, -0.523, 0.312));
26
+ return vec3(y, i, q);
27
+ }
28
+
29
+ vec3 yiq2rgb(vec3 c) {
30
+ float r = c.x + 0.956 * c.y + 0.621 * c.z;
31
+ float g = c.x - 0.272 * c.y - 0.647 * c.z;
32
+ float b = c.x - 1.106 * c.y + 1.703 * c.z;
33
+ return vec3(r, g, b);
34
+ }
35
+
36
+ vec3 adjustHue(vec3 color, float hueDeg) {
37
+ float hueRad = hueDeg * 3.14159265 / 180.0;
38
+ vec3 yiq = rgb2yiq(color);
39
+ float cosA = cos(hueRad);
40
+ float sinA = sin(hueRad);
41
+ float i = yiq.y * cosA - yiq.z * sinA;
42
+ float q = yiq.y * sinA + yiq.z * cosA;
43
+ yiq.y = i;
44
+ yiq.z = q;
45
+ return yiq2rgb(yiq);
46
+ }
47
+
48
+ vec3 hash33(vec3 p3) {
49
+ p3 = fract(p3 * vec3(0.1031, 0.11369, 0.13787));
50
+ p3 += dot(p3, p3.yxz + 19.19);
51
+ return -1.0 + 2.0 * fract(vec3(
52
+ p3.x + p3.y,
53
+ p3.x + p3.z,
54
+ p3.y + p3.z
55
+ ) * p3.zyx);
56
+ }
57
+
58
+ float snoise3(vec3 p) {
59
+ const float K1 = 0.333333333;
60
+ const float K2 = 0.166666667;
61
+ vec3 i = floor(p + (p.x + p.y + p.z) * K1);
62
+ vec3 d0 = p - (i - (i.x + i.y + i.z) * K2);
63
+ vec3 e = step(vec3(0.0), d0 - d0.yzx);
64
+ vec3 i1 = e * (1.0 - e.zxy);
65
+ vec3 i2 = 1.0 - e.zxy * (1.0 - e);
66
+ vec3 d1 = d0 - (i1 - K2);
67
+ vec3 d2 = d0 - (i2 - K1);
68
+ vec3 d3 = d0 - 0.5;
69
+ vec4 h = max(0.6 - vec4(
70
+ dot(d0, d0),
71
+ dot(d1, d1),
72
+ dot(d2, d2),
73
+ dot(d3, d3)
74
+ ), 0.0);
75
+ vec4 n = h * h * h * h * vec4(
76
+ dot(d0, hash33(i)),
77
+ dot(d1, hash33(i + i1)),
78
+ dot(d2, hash33(i + i2)),
79
+ dot(d3, hash33(i + 1.0))
80
+ );
81
+ return dot(vec4(31.316), n);
82
+ }
83
+
84
+ vec4 extractAlpha(vec3 colorIn) {
85
+ float a = max(max(colorIn.r, colorIn.g), colorIn.b);
86
+ return vec4(colorIn.rgb / (a + 1e-5), a);
87
+ }
88
+
89
+ const vec3 baseColor1 = vec3(0.611765, 0.262745, 0.996078);
90
+ const vec3 baseColor2 = vec3(0.298039, 0.760784, 0.913725);
91
+ const vec3 baseColor3 = vec3(0.062745, 0.078431, 0.600000);
92
+ // Make it solid by reducing inner radius to near zero
93
+ const float innerRadius = 0.0;
94
+ const float noiseScale = 1.0;
95
+
96
+ float light1(float intensity, float attenuation, float dist) {
97
+ return intensity / (1.0 + dist * attenuation);
98
+ }
99
+ float light2(float intensity, float attenuation, float dist) {
100
+ return intensity / (1.0 + dist * dist * attenuation);
101
+ }
102
+
103
+ vec4 draw(vec2 uv) {
104
+ vec3 color1 = adjustHue(baseColor1, hue);
105
+ vec3 color2 = adjustHue(baseColor2, hue);
106
+ vec3 color3 = adjustHue(baseColor3, hue);
107
+
108
+ float ang = atan(uv.y, uv.x);
109
+ float len = length(uv);
110
+ float invLen = len > 0.0 ? 1.0 / len : 0.0;
111
+
112
+ float bgLuminance = dot(backgroundColor, vec3(0.299, 0.587, 0.114));
113
+
114
+ float n0 = snoise3(vec3(uv * noiseScale, iTime * 0.5)) * 0.5 + 0.5;
115
+
116
+ // Increased outer radius factor from 1.0 to 1.8 to make the orb larger
117
+ float r0 = mix(mix(innerRadius, 1.2, 0.4), mix(innerRadius, 1.8, 0.6), n0);
118
+
119
+ float d0 = distance(uv, (r0 * invLen) * uv);
120
+ float v0 = light1(1.0, 10.0, d0);
121
+ v0 *= smoothstep(r0 * 1.05, r0, len);
122
+
123
+ // Remove inner fade to keep the center solid
124
+ float innerFade = 1.0;
125
+
126
+ v0 *= mix(innerFade, 1.0, bgLuminance * 0.7);
127
+ float cl = cos(ang + iTime * 2.0) * 0.5 + 0.5;
128
+
129
+ float a = iTime * -1.0;
130
+ vec2 pos = vec2(cos(a), sin(a)) * r0;
131
+ float d = distance(uv, pos);
132
+ float v1 = light2(1.5, 5.0, d);
133
+ v1 *= light1(1.0, 50.0, d0);
134
+
135
+ float v2 = smoothstep(1.0, mix(innerRadius, 1.0, n0 * 0.5), len);
136
+
137
+ // Keep center solid instead of fading out
138
+ float v3 = 1.0;
139
+
140
+ vec3 colBase = mix(color1, color2, cl);
141
+ float fadeAmount = mix(1.0, 0.1, bgLuminance);
142
+
143
+ vec3 darkCol = mix(color3, colBase, v0);
144
+ darkCol = (darkCol + v1) * v2 * v3;
145
+ darkCol = clamp(darkCol, 0.0, 1.0);
146
+
147
+ vec3 lightCol = (colBase + v1) * mix(1.0, v2 * v3, fadeAmount);
148
+ lightCol = mix(backgroundColor, lightCol, v0);
149
+ lightCol = clamp(lightCol, 0.0, 1.0);
150
+
151
+ vec3 finalCol = mix(darkCol, lightCol, bgLuminance);
152
+
153
+ return extractAlpha(finalCol);
154
+ }
155
+
156
+ vec4 mainImage(vec2 fragCoord) {
157
+ vec2 center = iResolution.xy * 0.5;
158
+ // Use max dimension to ensure the orb covers the area (creating an ambient effect)
159
+ // rather than fitting inside (which would be tiny in a header)
160
+ float size = max(iResolution.x, iResolution.y);
161
+ vec2 uv = (fragCoord - center) / size * 2.0;
162
+
163
+ // Add randomness/waviness to UV coordinates
164
+ uv.x += sin(uv.y * 3.0 + iTime * 0.5) * 0.1;
165
+ uv.y += cos(uv.x * 3.0 + iTime * 0.5) * 0.1;
166
+
167
+ float angle = rot;
168
+ float s = sin(angle);
169
+ float c = cos(angle);
170
+ uv = vec2(c * uv.x - s * uv.y, s * uv.x + c * uv.y);
171
+
172
+ uv.x += hover * hoverIntensity * 0.1 * sin(uv.y * 10.0 + iTime);
173
+ uv.y += hover * hoverIntensity * 0.1 * sin(uv.x * 10.0 + iTime);
174
+
175
+ return draw(uv);
176
+ }
177
+
178
+ void main() {
179
+ vec2 fragCoord = vUv * iResolution.xy;
180
+ vec4 col = mainImage(fragCoord);
181
+ gl_FragColor = vec4(col.rgb * col.a, col.a);
182
+ }
183
+ `;return useEffect(()=>{let i=c.current;if(!i)return;let l=new Renderer({alpha:true,premultipliedAlpha:false}),e=l.gl;e.clearColor(0,0,0,0),i.appendChild(e.canvas);let r=new Triangle(e),v=new Program(e,{vertex:g,fragment:h,uniforms:{iTime:{value:0},iResolution:{value:new Vec3(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height)},hue:{value:t},hover:{value:0},rot:{value:0},hoverIntensity:{value:o},backgroundColor:{value:k(a)}}}),E=new Mesh(e,{geometry:r,program:v});function y(){if(!i)return;let u=window.devicePixelRatio||1,d=i.clientWidth,f=i.clientHeight;l.setSize(d*u,f*u),e.canvas.style.width=d+"px",e.canvas.style.height=f+"px",v.uniforms.iResolution.value.set(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height);}window.addEventListener("resize",y),y();let p=0,x=0,C=0,M=.3,w=u=>{let d=i.getBoundingClientRect(),f=u.clientX-d.left,H=u.clientY-d.top,R=d.width,q=d.height,A=Math.min(R,q),K=R/2,F=q/2,L=(f-K)/A*2,T=(H-F)/A*2;Math.sqrt(L*L+T*T)<.8?p=1:p=0;},z=()=>{p=0;};i.addEventListener("mousemove",w),i.addEventListener("mouseleave",z);let b,I=u=>{b=requestAnimationFrame(I);let d=(u-x)*.001;x=u,v.uniforms.iTime.value=u*.001,v.uniforms.hue.value=t,v.uniforms.hoverIntensity.value=o,v.uniforms.backgroundColor.value=k(a);let f=s?1:p;v.uniforms.hover.value+=(f-v.uniforms.hover.value)*.1,n&&f>.5&&(C+=d*M),v.uniforms.rot.value=C,l.render({scene:E});};return b=requestAnimationFrame(I),()=>{cancelAnimationFrame(b),window.removeEventListener("resize",y),i.removeEventListener("mousemove",w),i.removeEventListener("mouseleave",z),e.canvas.parentNode===i&&i.removeChild(e.canvas),e.getExtension("WEBGL_lose_context")?.loseContext();}},[t,o,n,s,a]),jsx("div",{ref:c,className:"w-full h-full"})}function V(t,o,n){let s,a,c;if(o===0)s=a=c=n;else {let g=(l,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?l+(e-l)*6*r:r<.5?e:r<.6666666666666666?l+(e-l)*(.6666666666666666-r)*6:l),h=n<.5?n*(1+o):n+o-n*o,i=2*n-h;s=g(i,h,t+1/3),a=g(i,h,t),c=g(i,h,t-1/3);}return new Vec3(s,a,c)}function k(t){if(t==="transparent")return new Vec3(0,0,0);if(t.startsWith("#")){let s=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,c=parseInt(t.slice(5,7),16)/255;return new Vec3(s,a,c)}let o=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o)return new Vec3(parseInt(o[1])/255,parseInt(o[2])/255,parseInt(o[3])/255);let n=t.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%/);if(n){let s=parseInt(n[1])/360,a=parseInt(n[2])/100,c=parseInt(n[3])/100;return V(s,a,c)}return new Vec3(0,0,0)}export{X as a,J as b};
package/dist/index.d.mts CHANGED
@@ -772,8 +772,12 @@ interface UseStandardReportOptions {
772
772
  fetchData?: (params: any) => Promise<any>;
773
773
  initialRowsPerPage?: number;
774
774
  rowsPerPageOptions?: number[];
775
+ tableKey?: string;
776
+ mode?: CStandardPageProps['mode'];
777
+ serviceUrl?: string;
778
+ variantService?: IVariantService;
775
779
  }
776
- declare const useStandardReport: ({ metadata, fetchData, initialRowsPerPage, rowsPerPageOptions, }: UseStandardReportOptions) => {
780
+ declare const useStandardReport: ({ metadata, fetchData, initialRowsPerPage, rowsPerPageOptions, tableKey, mode, serviceUrl, variantService, }: UseStandardReportOptions) => {
777
781
  pageProps: CStandardPageProps;
778
782
  filters: Record<string, any>;
779
783
  rows: any[];
@@ -1196,6 +1200,12 @@ declare const en: {
1196
1200
  readonly 'pivot.agg.avg': "Average";
1197
1201
  readonly 'pivot.agg.min': "Min";
1198
1202
  readonly 'pivot.agg.max': "Max";
1203
+ readonly 'pivot.preset.selectPlaceholder': "Select preset";
1204
+ readonly 'pivot.preset.save': "Save preset";
1205
+ readonly 'pivot.preset.delete': "Delete preset";
1206
+ readonly 'pivot.preset.saveDialogTitle': "Save current preset";
1207
+ readonly 'pivot.preset.nameLabel': "Preset name";
1208
+ readonly 'pivot.preset.defaultName': "Preset {index}";
1199
1209
  readonly 'smartFilter.adaptFilters': "Adapt Filters";
1200
1210
  readonly 'smartFilter.addFilters': "Add Filters";
1201
1211
  readonly 'smartFilter.go': "Go";
@@ -1400,6 +1410,13 @@ interface PivotLayoutConfig {
1400
1410
  values?: PivotValueFieldConfig[];
1401
1411
  }
1402
1412
  type PivotFilterSelections = Record<string, string[]>;
1413
+ interface PivotTablePreset {
1414
+ id: string;
1415
+ name: string;
1416
+ layout: PivotLayoutConfig;
1417
+ filterSelections?: PivotFilterSelections;
1418
+ showGrandTotal?: boolean;
1419
+ }
1403
1420
  interface PivotTableModel {
1404
1421
  rowFields: string[];
1405
1422
  setRowFields: React__default.Dispatch<React__default.SetStateAction<string[]>>;
@@ -1424,6 +1441,12 @@ interface CPivotTableProps {
1424
1441
  emptyText?: string;
1425
1442
  maxPreviewHeight?: number | string;
1426
1443
  model?: PivotTableModel;
1444
+ enablePresetManagement?: boolean;
1445
+ presets?: PivotTablePreset[];
1446
+ defaultPresets?: PivotTablePreset[];
1447
+ onPresetsChange?: (presets: PivotTablePreset[]) => void;
1448
+ initialPresetId?: string;
1449
+ onPresetApplied?: (preset: PivotTablePreset) => void;
1427
1450
  }
1428
1451
 
1429
1452
  declare const CPivotTable: React__default.FC<CPivotTableProps>;
@@ -1455,6 +1478,164 @@ interface UsePivotTableResult {
1455
1478
  }
1456
1479
  declare const usePivotTable: ({ fields, initialLayout, initialFilterSelections, initialShowGrandTotal, initialConfiguratorCollapsed, }: UsePivotTableOptions) => UsePivotTableResult;
1457
1480
 
1481
+ interface UseVoiceInputOptions {
1482
+ onTextUpdate?: (text: string) => void;
1483
+ onComplete: (text: string) => void | Promise<void>;
1484
+ onError?: (error: string) => void;
1485
+ wsUrl?: string;
1486
+ silenceThresholdMs?: number;
1487
+ minVolumeRms?: number;
1488
+ }
1489
+ interface UseVoiceInputResult {
1490
+ isRecording: boolean;
1491
+ startRecording: () => Promise<void>;
1492
+ stopRecording: () => void;
1493
+ }
1494
+ interface CVoiceWaveOverlayProps {
1495
+ isRecording: boolean;
1496
+ }
1497
+ interface CAINavProviderProps {
1498
+ children: ReactNode;
1499
+ onVoiceSubmit: (text: string) => void | Promise<void>;
1500
+ onVoicePartial?: (text: string) => void;
1501
+ onVoiceError?: (error: string) => void;
1502
+ longPressMs?: number;
1503
+ disableSpaceTrigger?: boolean;
1504
+ ignoreWhenFocusedInput?: boolean;
1505
+ renderOverlay?: boolean;
1506
+ wsUrl?: string;
1507
+ silenceThresholdMs?: number;
1508
+ minVolumeRms?: number;
1509
+ }
1510
+ interface AINavContextValue {
1511
+ isRecording: boolean;
1512
+ isHotkeyRecording: boolean;
1513
+ isSubmitting: boolean;
1514
+ startRecording: () => Promise<void>;
1515
+ stopRecording: () => void;
1516
+ }
1517
+ type VoiceNavigatorProviderProps = CAINavProviderProps;
1518
+ type VoiceNavigatorContextValue = AINavContextValue;
1519
+ type VoiceWaveOverlayProps = CVoiceWaveOverlayProps;
1520
+
1521
+ declare function CAINavProvider({ children, onVoiceSubmit, onVoicePartial, onVoiceError, longPressMs, disableSpaceTrigger, ignoreWhenFocusedInput, renderOverlay, wsUrl, silenceThresholdMs, minVolumeRms }: CAINavProviderProps): react_jsx_runtime.JSX.Element;
1522
+ declare function useAINav(): AINavContextValue;
1523
+ declare const VoiceNavigatorProvider: typeof CAINavProvider;
1524
+ declare const useVoiceNavigator: typeof useAINav;
1525
+
1526
+ declare function useVoiceInput({ onTextUpdate, onComplete, onError, wsUrl, silenceThresholdMs, minVolumeRms }: UseVoiceInputOptions): UseVoiceInputResult;
1527
+
1528
+ declare function CVoiceWaveOverlay({ isRecording }: CVoiceWaveOverlayProps): react_jsx_runtime.JSX.Element;
1529
+ declare const VoiceWaveOverlay: typeof CVoiceWaveOverlay;
1530
+
1531
+ interface COrbCanvasProps {
1532
+ hue?: number;
1533
+ hoverIntensity?: number;
1534
+ rotateOnHover?: boolean;
1535
+ forceHoverState?: boolean;
1536
+ backgroundColor?: string;
1537
+ }
1538
+ declare function COrbCanvas({ hue, hoverIntensity, rotateOnHover, forceHoverState, backgroundColor }: COrbCanvasProps): react_jsx_runtime.JSX.Element;
1539
+
1540
+ interface TableTypeContent {
1541
+ type: 'table';
1542
+ data: any;
1543
+ }
1544
+ interface ChartCardTypeContent {
1545
+ type: 'bar-chart-card' | 'line-chart-card' | 'pie-chart-card' | 'combo-chart-card' | 'heatmap-chart-card' | 'fishbone-chart-card' | 'waterfall-chart-card' | 'google-map-card' | 'amap-card';
1546
+ title: string;
1547
+ subtitle?: string;
1548
+ data: any[];
1549
+ config?: any;
1550
+ }
1551
+ interface SAPCardTypeContent {
1552
+ type: 'sap-analytical-card' | 'sap-list-card' | 'sap-object-card' | 'sap-component-card';
1553
+ manifest: any;
1554
+ }
1555
+ interface AgentUICardTypeContent {
1556
+ type: 'error-card' | 'warning-card' | 'suggestions-card' | 'tool-result-card';
1557
+ [key: string]: any;
1558
+ }
1559
+ type ParsedCardData = TableTypeContent | ChartCardTypeContent | SAPCardTypeContent | AgentUICardTypeContent;
1560
+ type AgentUICardType = ParsedCardData['type'];
1561
+ type AgentUICardAction = 'render' | 'close' | 'retry' | 'confirm' | 'action' | 'suggestion-click';
1562
+ interface AgentUICardHookEvent {
1563
+ messageId?: string;
1564
+ cardType: AgentUICardType;
1565
+ action: AgentUICardAction;
1566
+ title?: string;
1567
+ payload?: unknown;
1568
+ rawData?: unknown;
1569
+ }
1570
+ interface AgentUICardHooks {
1571
+ onCardEvent?: (event: AgentUICardHookEvent) => void;
1572
+ }
1573
+
1574
+ interface AssistantActionContext {
1575
+ isLatestAssistant: boolean;
1576
+ onRegenerate?: () => Promise<void>;
1577
+ }
1578
+ interface ChatMessageProps {
1579
+ message: ChatMessage;
1580
+ onStreamingComplete?: () => void;
1581
+ assistantActions?: AssistantActionContext;
1582
+ streamIntervalMs?: number;
1583
+ streamChunkSize?: number;
1584
+ cardHooks?: AgentUICardHooks;
1585
+ }
1586
+ interface ChatMessage {
1587
+ id: string;
1588
+ type: 'user' | 'assistant';
1589
+ content: string;
1590
+ timestamp: Date;
1591
+ isStreaming?: boolean;
1592
+ }
1593
+ declare const ChatMessage: React__default.FC<ChatMessageProps>;
1594
+
1595
+ interface StdChatProps {
1596
+ messages: ChatMessage[];
1597
+ onSend: (content: string, files?: File[]) => Promise<void>;
1598
+ onStop?: () => void;
1599
+ onRegenerate?: (messageId: string) => Promise<void>;
1600
+ isResponding?: boolean;
1601
+ className?: string;
1602
+ placeholder?: string;
1603
+ streamIntervalMs?: number;
1604
+ streamChunkSize?: number;
1605
+ onMessageStreamingComplete?: (messageId: string) => void;
1606
+ cardHooks?: AgentUICardHooks;
1607
+ }
1608
+ declare const StdChat: React__default.FC<StdChatProps>;
1609
+
1610
+ interface AgentPanelProps extends StdChatProps {
1611
+ title?: string;
1612
+ description?: string;
1613
+ headerActions?: React__default.ReactNode;
1614
+ }
1615
+ declare const AgentPanel: React__default.FC<AgentPanelProps>;
1616
+
1617
+ type CopilotCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
1618
+ interface CopilotChatProps {
1619
+ messages: ChatMessage[];
1620
+ onSend: (content: string, files?: File[]) => Promise<void>;
1621
+ onStop?: () => void;
1622
+ onRegenerate?: (messageId: string) => Promise<void>;
1623
+ isResponding?: boolean;
1624
+ className?: string;
1625
+ placeholder?: string;
1626
+ title?: string;
1627
+ corner?: CopilotCorner;
1628
+ onCollapse?: () => void;
1629
+ onHeaderPointerDown?: (e: React__default.PointerEvent<HTMLDivElement>) => void;
1630
+ onPlusClick?: () => void;
1631
+ onMicClick?: () => void;
1632
+ streamIntervalMs?: number;
1633
+ streamChunkSize?: number;
1634
+ onMessageStreamingComplete?: (messageId: string) => void;
1635
+ cardHooks?: AgentUICardHooks;
1636
+ }
1637
+ declare const CopilotChat: React__default.FC<CopilotChatProps>;
1638
+
1458
1639
  interface MarkdownRendererProps {
1459
1640
  markdown?: string;
1460
1641
  content?: string;
@@ -1549,4 +1730,4 @@ declare const PAGE_TRANSITION_PRESETS: {
1549
1730
  };
1550
1731
  };
1551
1732
 
1552
- export { type AmapEmbedOptions, Button, type ButtonProps, CAmapChart, type CAmapChartProps, CAppHeader, type CAppHeaderProps, type CAppHeaderUser, type CAppHeaderUserMenuItem, CAppPageLayout, type CAppPageLayoutProps, CBarChart, type CBarChartProps, CChartCard, type CChartCardProps, CComboChart, type CComboChartProps, CCustomizeAgent, type CCustomizeAgentProps, CDetailInfoPage, type CDetailInfoPageProps, CDetailSearchAiBar, type CDetailSearchAiBarProps, CDetailSectionCard, type CDetailSectionCardProps, CFishboneChart, type CFishboneChartProps, CGoogleMapChart, type CGoogleMapChartProps, CGraphCharts, CGraphKpiCards, CGraphReport, type CGraphReportProps, CHeatmapChart, type CHeatmapChartProps, CLayoutManagement, type CLayoutManagementProps, CLayoutManager, type CLayoutManagerProps, CLineChart, type CLineChartProps, CMessageBox, type CMessageBoxProps, type CMessageBoxType, CPageLayout, type CPageLayoutProps, CPageTransition, type CPageTransitionProps, CPieChart, type CPieChartProps, CPivotTable, type CPivotTableProps, CSmartFilter, type CSmartFilterProps, CSmartTable, CStandardPage, type CStandardPageProps, CTable, CTableBody, type CTableBodyProps, CTableCell, type CTableCellProps, CTableContainer, type CTableContainerProps, CTableHead, type CTableHeadProps, type CTableProps, type CTableQuickCreateConfig, type CTableQuickDeleteConfig, type CTableQuickEditConfig, CTableRow, type CTableRowProps, CVariantManagement, type CVariantManagementProps, CVariantManager, CWaterfallChart, type CWaterfallChartProps, CodeBlock, type CodeBlockProps, type CustomizeAgentSavePayload, type CustomizeAgentSettings, type CustomizeAgentTemplateOption, type DateOperator, type DetailInfoAiConfig, type DetailInfoField, type DetailInfoSearchHit, type DetailInfoSearchMode, type DetailInfoSection, type DetailInfoTab, type DetailInfoTableConfig, type FilterField, type FilterOperator, type FilterType, type FilterValue, GlobalMessage, type GoogleMapEmbedOptions, type GraphBarDatum, type GraphComboDatum, type GraphFishboneBranch, type GraphHeatmapDatum, type GraphLineDatum, type GraphMapLocation, type GraphPieDatum, type GraphReportConfig, type GraphReportFieldMapping, type GraphReportInteractionState, type GraphReportKpis, type GraphReportModel, type GraphRow, type GraphTableColumn, type GraphWaterfallDatum, type IVariantService, type LayoutMetadata, MarkdownRenderer, type MarkdownRendererProps, MathBlock, type MathBlockProps, MermaidBlock, type MermaidBlockProps, type MessageContent, type MessageEvent, type MessageOptions, NavigationIsland, type NavigationIslandProps, type NumberOperator, ORBCAFE_I18N_MESSAGES, type OrbcafeI18nContextValue, OrbcafeI18nProvider, type OrbcafeI18nProviderProps, type OrbcafeLocale, type OrbcafeLocaleMessages, type OrbcafeMessageKey, type OrbcafeMessageParams, PAGE_TRANSITION_PRESETS, type PageTransitionVariant, type ParsedMarkdownTable, type PivotAggregation, type PivotFieldDefinition, type PivotFieldType, type PivotFilterSelections, type PivotLayoutConfig, type PivotTableModel, type PivotValueFieldConfig, type PivotValueFieldState, type ReportColumn, type ReportFilter, type ReportMetadata, type SelectOperator, type TableAlign, TableBlock, type TableBlockProps, type TextOperator, ThinkBlock, type ThinkBlockProps, TreeMenu, type TreeMenuItem, type UseAmapEmbedUrlOptions, type UseDetailInfoOptions, type UseDetailInfoResult, type UseGoogleMapEmbedUrlOptions, type UseGraphChartDataOptions, type UseGraphChartDataResult, type UseGraphInteractionResult, type UseGraphReportOptions, type UseGraphReportResult, type UseNavigationIslandOptions, type UseNavigationIslandResult, type UsePageLayoutOptions, type UsePivotTableOptions, type UsePivotTableResult, type UseStandardReportOptions, type VariantMetadata, buildAmapEmbedUrl, buildGoogleMapEmbedUrl, buildGoogleMapIframe, buttonVariants, message, messageManager, parseMarkdownTable, renderMarkdown, resolveVariantFilters, resolveVariantLayout, useAmapEmbedUrl, useDetailInfo, useGoogleMapEmbedUrl, useGraphChartData, useGraphInteraction, useGraphReport, useNavigationIsland, useOrbcafeI18n, usePageLayout, usePivotTable, useStandardReport };
1733
+ export { type AINavContextValue, AgentPanel, type AgentPanelProps, type AgentUICardAction, type AgentUICardHookEvent, type AgentUICardHooks, type AgentUICardType, type AmapEmbedOptions, Button, type ButtonProps, CAINavProvider, type CAINavProviderProps, CAmapChart, type CAmapChartProps, CAppHeader, type CAppHeaderProps, type CAppHeaderUser, type CAppHeaderUserMenuItem, CAppPageLayout, type CAppPageLayoutProps, CBarChart, type CBarChartProps, CChartCard, type CChartCardProps, CComboChart, type CComboChartProps, CCustomizeAgent, type CCustomizeAgentProps, CDetailInfoPage, type CDetailInfoPageProps, CDetailSearchAiBar, type CDetailSearchAiBarProps, CDetailSectionCard, type CDetailSectionCardProps, CFishboneChart, type CFishboneChartProps, CGoogleMapChart, type CGoogleMapChartProps, CGraphCharts, CGraphKpiCards, CGraphReport, type CGraphReportProps, CHeatmapChart, type CHeatmapChartProps, CLayoutManagement, type CLayoutManagementProps, CLayoutManager, type CLayoutManagerProps, CLineChart, type CLineChartProps, CMessageBox, type CMessageBoxProps, type CMessageBoxType, COrbCanvas, type COrbCanvasProps, CPageLayout, type CPageLayoutProps, CPageTransition, type CPageTransitionProps, CPieChart, type CPieChartProps, CPivotTable, type CPivotTableProps, CSmartFilter, type CSmartFilterProps, CSmartTable, CStandardPage, type CStandardPageProps, CTable, CTableBody, type CTableBodyProps, CTableCell, type CTableCellProps, CTableContainer, type CTableContainerProps, CTableHead, type CTableHeadProps, type CTableProps, type CTableQuickCreateConfig, type CTableQuickDeleteConfig, type CTableQuickEditConfig, CTableRow, type CTableRowProps, CVariantManagement, type CVariantManagementProps, CVariantManager, CVoiceWaveOverlay, type CVoiceWaveOverlayProps, CWaterfallChart, type CWaterfallChartProps, ChatMessage, CodeBlock, type CodeBlockProps, CopilotChat, type CopilotChatProps, type CustomizeAgentSavePayload, type CustomizeAgentSettings, type CustomizeAgentTemplateOption, type DateOperator, type DetailInfoAiConfig, type DetailInfoField, type DetailInfoSearchHit, type DetailInfoSearchMode, type DetailInfoSection, type DetailInfoTab, type DetailInfoTableConfig, type FilterField, type FilterOperator, type FilterType, type FilterValue, GlobalMessage, type GoogleMapEmbedOptions, type GraphBarDatum, type GraphComboDatum, type GraphFishboneBranch, type GraphHeatmapDatum, type GraphLineDatum, type GraphMapLocation, type GraphPieDatum, type GraphReportConfig, type GraphReportFieldMapping, type GraphReportInteractionState, type GraphReportKpis, type GraphReportModel, type GraphRow, type GraphTableColumn, type GraphWaterfallDatum, type IVariantService, type LayoutMetadata, MarkdownRenderer, type MarkdownRendererProps, MathBlock, type MathBlockProps, MermaidBlock, type MermaidBlockProps, type MessageContent, type MessageEvent, type MessageOptions, NavigationIsland, type NavigationIslandProps, type NumberOperator, ORBCAFE_I18N_MESSAGES, type OrbcafeI18nContextValue, OrbcafeI18nProvider, type OrbcafeI18nProviderProps, type OrbcafeLocale, type OrbcafeLocaleMessages, type OrbcafeMessageKey, type OrbcafeMessageParams, PAGE_TRANSITION_PRESETS, type PageTransitionVariant, type ParsedMarkdownTable, type PivotAggregation, type PivotFieldDefinition, type PivotFieldType, type PivotFilterSelections, type PivotLayoutConfig, type PivotTableModel, type PivotTablePreset, type PivotValueFieldConfig, type PivotValueFieldState, type ReportColumn, type ReportFilter, type ReportMetadata, type SelectOperator, StdChat, type StdChatProps, type TableAlign, TableBlock, type TableBlockProps, type TextOperator, ThinkBlock, type ThinkBlockProps, TreeMenu, type TreeMenuItem, type UseAmapEmbedUrlOptions, type UseDetailInfoOptions, type UseDetailInfoResult, type UseGoogleMapEmbedUrlOptions, type UseGraphChartDataOptions, type UseGraphChartDataResult, type UseGraphInteractionResult, type UseGraphReportOptions, type UseGraphReportResult, type UseNavigationIslandOptions, type UseNavigationIslandResult, type UsePageLayoutOptions, type UsePivotTableOptions, type UsePivotTableResult, type UseStandardReportOptions, type UseVoiceInputOptions, type UseVoiceInputResult, type VariantMetadata, type VoiceNavigatorContextValue, VoiceNavigatorProvider, type VoiceNavigatorProviderProps, VoiceWaveOverlay, type VoiceWaveOverlayProps, buildAmapEmbedUrl, buildGoogleMapEmbedUrl, buildGoogleMapIframe, buttonVariants, message, messageManager, parseMarkdownTable, renderMarkdown, resolveVariantFilters, resolveVariantLayout, useAINav, useAmapEmbedUrl, useDetailInfo, useGoogleMapEmbedUrl, useGraphChartData, useGraphInteraction, useGraphReport, useNavigationIsland, useOrbcafeI18n, usePageLayout, usePivotTable, useStandardReport, useVoiceInput, useVoiceNavigator };