@docyrus/rn-assistant 0.4.0 → 0.6.0

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.
Files changed (53) hide show
  1. package/dist/commonjs/components/assistant-screen/assistant-screen.js +1 -1
  2. package/dist/commonjs/components/assistant-screen/assistant-screen.js.map +1 -1
  3. package/dist/commonjs/components/message-parts/message-parts.js +84 -20
  4. package/dist/commonjs/components/message-parts/message-parts.js.map +1 -1
  5. package/dist/commonjs/components/message-parts/tools/data-table-tool.js +417 -0
  6. package/dist/commonjs/components/message-parts/tools/data-table-tool.js.map +1 -0
  7. package/dist/commonjs/components/message-parts/tools/generate-chart-tool.js +240 -0
  8. package/dist/commonjs/components/message-parts/tools/generate-chart-tool.js.map +1 -0
  9. package/dist/commonjs/components/message-parts/tools/index.js +28 -0
  10. package/dist/commonjs/components/message-parts/tools/index.js.map +1 -1
  11. package/dist/commonjs/components/message-parts/tools/mermaid-diagram-tool.js +223 -0
  12. package/dist/commonjs/components/message-parts/tools/mermaid-diagram-tool.js.map +1 -0
  13. package/dist/commonjs/components/message-parts/tools/request-user-input-tool.js +366 -0
  14. package/dist/commonjs/components/message-parts/tools/request-user-input-tool.js.map +1 -0
  15. package/dist/module/components/assistant-screen/assistant-screen.js +1 -1
  16. package/dist/module/components/assistant-screen/assistant-screen.js.map +1 -1
  17. package/dist/module/components/message-parts/message-parts.js +85 -21
  18. package/dist/module/components/message-parts/message-parts.js.map +1 -1
  19. package/dist/module/components/message-parts/tools/data-table-tool.js +413 -0
  20. package/dist/module/components/message-parts/tools/data-table-tool.js.map +1 -0
  21. package/dist/module/components/message-parts/tools/generate-chart-tool.js +236 -0
  22. package/dist/module/components/message-parts/tools/generate-chart-tool.js.map +1 -0
  23. package/dist/module/components/message-parts/tools/index.js +4 -0
  24. package/dist/module/components/message-parts/tools/index.js.map +1 -1
  25. package/dist/module/components/message-parts/tools/mermaid-diagram-tool.js +219 -0
  26. package/dist/module/components/message-parts/tools/mermaid-diagram-tool.js.map +1 -0
  27. package/dist/module/components/message-parts/tools/request-user-input-tool.js +362 -0
  28. package/dist/module/components/message-parts/tools/request-user-input-tool.js.map +1 -0
  29. package/dist/typescript/commonjs/src/components/assistant-screen/assistant-screen.d.ts.map +1 -1
  30. package/dist/typescript/commonjs/src/components/message-parts/message-parts.d.ts.map +1 -1
  31. package/dist/typescript/commonjs/src/components/message-parts/tools/data-table-tool.d.ts +25 -0
  32. package/dist/typescript/commonjs/src/components/message-parts/tools/data-table-tool.d.ts.map +1 -0
  33. package/dist/typescript/commonjs/src/components/message-parts/tools/generate-chart-tool.d.ts +14 -0
  34. package/dist/typescript/commonjs/src/components/message-parts/tools/generate-chart-tool.d.ts.map +1 -0
  35. package/dist/typescript/commonjs/src/components/message-parts/tools/index.d.ts +4 -0
  36. package/dist/typescript/commonjs/src/components/message-parts/tools/index.d.ts.map +1 -1
  37. package/dist/typescript/commonjs/src/components/message-parts/tools/mermaid-diagram-tool.d.ts +13 -0
  38. package/dist/typescript/commonjs/src/components/message-parts/tools/mermaid-diagram-tool.d.ts.map +1 -0
  39. package/dist/typescript/commonjs/src/components/message-parts/tools/request-user-input-tool.d.ts +33 -0
  40. package/dist/typescript/commonjs/src/components/message-parts/tools/request-user-input-tool.d.ts.map +1 -0
  41. package/dist/typescript/module/src/components/assistant-screen/assistant-screen.d.ts.map +1 -1
  42. package/dist/typescript/module/src/components/message-parts/message-parts.d.ts.map +1 -1
  43. package/dist/typescript/module/src/components/message-parts/tools/data-table-tool.d.ts +25 -0
  44. package/dist/typescript/module/src/components/message-parts/tools/data-table-tool.d.ts.map +1 -0
  45. package/dist/typescript/module/src/components/message-parts/tools/generate-chart-tool.d.ts +14 -0
  46. package/dist/typescript/module/src/components/message-parts/tools/generate-chart-tool.d.ts.map +1 -0
  47. package/dist/typescript/module/src/components/message-parts/tools/index.d.ts +4 -0
  48. package/dist/typescript/module/src/components/message-parts/tools/index.d.ts.map +1 -1
  49. package/dist/typescript/module/src/components/message-parts/tools/mermaid-diagram-tool.d.ts +13 -0
  50. package/dist/typescript/module/src/components/message-parts/tools/mermaid-diagram-tool.d.ts.map +1 -0
  51. package/dist/typescript/module/src/components/message-parts/tools/request-user-input-tool.d.ts +33 -0
  52. package/dist/typescript/module/src/components/message-parts/tools/request-user-input-tool.d.ts.map +1 -0
  53. package/package.json +7 -2
@@ -0,0 +1,25 @@
1
+ type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error';
2
+ type ColumnConfig = {
3
+ field?: string;
4
+ title?: string;
5
+ name?: string;
6
+ key?: string;
7
+ width?: number;
8
+ type?: string;
9
+ };
10
+ type DataTableToolProps = {
11
+ state: ToolState;
12
+ data?: string | any[] | Record<string, any>;
13
+ columns?: ColumnConfig[];
14
+ title?: string;
15
+ description?: string;
16
+ errorText?: string;
17
+ height?: number;
18
+ additionalComments?: string;
19
+ };
20
+ export declare function DataTableTool({ state, data, columns, title, description, errorText, height, additionalComments }: DataTableToolProps): import("react").JSX.Element;
21
+ export declare namespace DataTableTool {
22
+ var displayName: string;
23
+ }
24
+ export {};
25
+ //# sourceMappingURL=data-table-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/data-table-tool.tsx"],"names":[],"mappings":"AAWA,KAAK,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE7F,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAsCF,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAChF,EAAE,kBAAkB,+BAqQpB;yBAvQe,aAAa"}
@@ -0,0 +1,14 @@
1
+ type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error';
2
+ type GenerateChartToolProps = {
3
+ state: ToolState;
4
+ spec?: Record<string, any>;
5
+ data?: any;
6
+ errorText?: string;
7
+ title?: string;
8
+ };
9
+ export declare function GenerateChartTool({ state, spec, data, errorText, title }: GenerateChartToolProps): import("react").JSX.Element | null;
10
+ export declare namespace GenerateChartTool {
11
+ var displayName: string;
12
+ }
13
+ export {};
14
+ //# sourceMappingURL=generate-chart-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-chart-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/generate-chart-tool.tsx"],"names":[],"mappings":"AAYA,KAAK,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE7F,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA0CF,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EACpC,EAAE,sBAAsB,sCA0IxB;yBA5Ie,iBAAiB"}
@@ -1,4 +1,8 @@
1
1
  export { ShowImageTool } from './show-image-tool';
2
2
  export { RequestApprovalTool } from './request-approval-tool';
3
3
  export { SearchWebTool } from './search-web-tool';
4
+ export { MermaidDiagramTool } from './mermaid-diagram-tool';
5
+ export { GenerateChartTool } from './generate-chart-tool';
6
+ export { DataTableTool } from './data-table-tool';
7
+ export { RequestUserInputTool } from './request-user-input-tool';
4
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,13 @@
1
+ type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error';
2
+ type MermaidDiagramToolProps = {
3
+ title?: string;
4
+ description?: string;
5
+ mermaidNotation: string;
6
+ state: ToolState;
7
+ };
8
+ export declare function MermaidDiagramTool({ title, description, mermaidNotation, state }: MermaidDiagramToolProps): import("react").JSX.Element | null;
9
+ export declare namespace MermaidDiagramTool {
10
+ var displayName: string;
11
+ }
12
+ export {};
13
+ //# sourceMappingURL=mermaid-diagram-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mermaid-diagram-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/mermaid-diagram-tool.tsx"],"names":[],"mappings":"AAYA,KAAK,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE7F,KAAK,uBAAuB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AA+BF,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAC3C,EAAE,uBAAuB,sCAwHzB;yBA1He,kBAAkB"}
@@ -0,0 +1,33 @@
1
+ type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error';
2
+ type JsonSchema = {
3
+ type?: string;
4
+ properties?: Record<string, SchemaProperty>;
5
+ required?: string[];
6
+ };
7
+ type SchemaProperty = {
8
+ type?: string;
9
+ title?: string;
10
+ description?: string;
11
+ default?: any;
12
+ enum?: any[];
13
+ items?: {
14
+ type?: string;
15
+ enum?: any[];
16
+ };
17
+ };
18
+ type RequestUserInputToolProps = {
19
+ state: ToolState;
20
+ schema: JsonSchema | string;
21
+ title?: string;
22
+ description?: string;
23
+ submitLabel?: string;
24
+ output?: any;
25
+ onSubmit?: (data: Record<string, any>) => void;
26
+ onCancel?: () => void;
27
+ };
28
+ export declare function RequestUserInputTool({ state, schema, title, description, submitLabel, output, onSubmit, onCancel }: RequestUserInputToolProps): import("react").JSX.Element;
29
+ export declare namespace RequestUserInputTool {
30
+ var displayName: string;
31
+ }
32
+ export {};
33
+ //# sourceMappingURL=request-user-input-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-user-input-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/request-user-input-tool.tsx"],"names":[],"mappings":"AAWA,KAAK,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE7F,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;KAAE,CAAC;CACzC,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAcF,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAC3E,EAAE,yBAAyB,+BAoN3B;yBAtNe,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"assistant-screen.d.ts","sourceRoot":"","sources":["../../../../../../src/components/assistant-screen/assistant-screen.tsx"],"names":[],"mappings":"AAEA,OAAO,EACwD,KAAK,SAAS,EAC5E,MAAM,cAAc,CAAC;AA6BtB,OAAO,EACL,KAAK,iBAAiB,EAAkB,KAAK,WAAW,EACzD,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,gCAAgC,EAGtC,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC;IAEvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IAEF;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;OAGG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAElC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;OAEG;IACH,KAAK,CAAC,EAAE,gCAAgC,CAAC;IAEzC;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;IAE9C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAE/C;;;OAGG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B,CAAC;AA2qBF,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,GAAG,KAAK,EACT,EAAE,uBAAuB,+BAMzB;AAgED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,cAAc,GAAG,SAAS,GAAG,oBAAoB,CAAC,+BAMjI;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,cAAc,CAAC,+BAM3F;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,cAAc,GAAG,oBAAoB,CAAC,+BAMlH;AAED,eAAO,MAAM,aAAa,2BAAqB,CAAC;AAChD,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,CAAC"}
1
+ {"version":3,"file":"assistant-screen.d.ts","sourceRoot":"","sources":["../../../../../../src/components/assistant-screen/assistant-screen.tsx"],"names":[],"mappings":"AAEA,OAAO,EACwD,KAAK,SAAS,EAC5E,MAAM,cAAc,CAAC;AA6BtB,OAAO,EACL,KAAK,iBAAiB,EAAkB,KAAK,WAAW,EACzD,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,gCAAgC,EAGtC,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC;IAEvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IAEF;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;OAGG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAElC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;OAEG;IACH,KAAK,CAAC,EAAE,gCAAgC,CAAC;IAEzC;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;IAE9C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAE/C;;;OAGG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B,CAAC;AA4qBF,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,GAAG,KAAK,EACT,EAAE,uBAAuB,+BAMzB;AAgED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,cAAc,GAAG,SAAS,GAAG,oBAAoB,CAAC,+BAMjI;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,cAAc,CAAC,+BAM3F;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,cAAc,GAAG,oBAAoB,CAAC,+BAMlH;AAED,eAAO,MAAM,aAAa,2BAAqB,CAAC;AAChD,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"message-parts.d.ts","sourceRoot":"","sources":["../../../../../../src/components/message-parts/message-parts.tsx"],"names":[],"mappings":"AAuBA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,sCAsNxD;yBAtNe,YAAY"}
1
+ {"version":3,"file":"message-parts.d.ts","sourceRoot":"","sources":["../../../../../../src/components/message-parts/message-parts.tsx"],"names":[],"mappings":"AA0BA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,sCA+RxD;yBA/Re,YAAY"}
@@ -0,0 +1,25 @@
1
+ type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error';
2
+ type ColumnConfig = {
3
+ field?: string;
4
+ title?: string;
5
+ name?: string;
6
+ key?: string;
7
+ width?: number;
8
+ type?: string;
9
+ };
10
+ type DataTableToolProps = {
11
+ state: ToolState;
12
+ data?: string | any[] | Record<string, any>;
13
+ columns?: ColumnConfig[];
14
+ title?: string;
15
+ description?: string;
16
+ errorText?: string;
17
+ height?: number;
18
+ additionalComments?: string;
19
+ };
20
+ export declare function DataTableTool({ state, data, columns, title, description, errorText, height, additionalComments }: DataTableToolProps): import("react").JSX.Element;
21
+ export declare namespace DataTableTool {
22
+ var displayName: string;
23
+ }
24
+ export {};
25
+ //# sourceMappingURL=data-table-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/data-table-tool.tsx"],"names":[],"mappings":"AAWA,KAAK,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE7F,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAsCF,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAChF,EAAE,kBAAkB,+BAqQpB;yBAvQe,aAAa"}
@@ -0,0 +1,14 @@
1
+ type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error';
2
+ type GenerateChartToolProps = {
3
+ state: ToolState;
4
+ spec?: Record<string, any>;
5
+ data?: any;
6
+ errorText?: string;
7
+ title?: string;
8
+ };
9
+ export declare function GenerateChartTool({ state, spec, data, errorText, title }: GenerateChartToolProps): import("react").JSX.Element | null;
10
+ export declare namespace GenerateChartTool {
11
+ var displayName: string;
12
+ }
13
+ export {};
14
+ //# sourceMappingURL=generate-chart-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-chart-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/generate-chart-tool.tsx"],"names":[],"mappings":"AAYA,KAAK,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE7F,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA0CF,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EACpC,EAAE,sBAAsB,sCA0IxB;yBA5Ie,iBAAiB"}
@@ -1,4 +1,8 @@
1
1
  export { ShowImageTool } from './show-image-tool';
2
2
  export { RequestApprovalTool } from './request-approval-tool';
3
3
  export { SearchWebTool } from './search-web-tool';
4
+ export { MermaidDiagramTool } from './mermaid-diagram-tool';
5
+ export { GenerateChartTool } from './generate-chart-tool';
6
+ export { DataTableTool } from './data-table-tool';
7
+ export { RequestUserInputTool } from './request-user-input-tool';
4
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,13 @@
1
+ type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error';
2
+ type MermaidDiagramToolProps = {
3
+ title?: string;
4
+ description?: string;
5
+ mermaidNotation: string;
6
+ state: ToolState;
7
+ };
8
+ export declare function MermaidDiagramTool({ title, description, mermaidNotation, state }: MermaidDiagramToolProps): import("react").JSX.Element | null;
9
+ export declare namespace MermaidDiagramTool {
10
+ var displayName: string;
11
+ }
12
+ export {};
13
+ //# sourceMappingURL=mermaid-diagram-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mermaid-diagram-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/mermaid-diagram-tool.tsx"],"names":[],"mappings":"AAYA,KAAK,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE7F,KAAK,uBAAuB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AA+BF,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAC3C,EAAE,uBAAuB,sCAwHzB;yBA1He,kBAAkB"}
@@ -0,0 +1,33 @@
1
+ type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error';
2
+ type JsonSchema = {
3
+ type?: string;
4
+ properties?: Record<string, SchemaProperty>;
5
+ required?: string[];
6
+ };
7
+ type SchemaProperty = {
8
+ type?: string;
9
+ title?: string;
10
+ description?: string;
11
+ default?: any;
12
+ enum?: any[];
13
+ items?: {
14
+ type?: string;
15
+ enum?: any[];
16
+ };
17
+ };
18
+ type RequestUserInputToolProps = {
19
+ state: ToolState;
20
+ schema: JsonSchema | string;
21
+ title?: string;
22
+ description?: string;
23
+ submitLabel?: string;
24
+ output?: any;
25
+ onSubmit?: (data: Record<string, any>) => void;
26
+ onCancel?: () => void;
27
+ };
28
+ export declare function RequestUserInputTool({ state, schema, title, description, submitLabel, output, onSubmit, onCancel }: RequestUserInputToolProps): import("react").JSX.Element;
29
+ export declare namespace RequestUserInputTool {
30
+ var displayName: string;
31
+ }
32
+ export {};
33
+ //# sourceMappingURL=request-user-input-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-user-input-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/message-parts/tools/request-user-input-tool.tsx"],"names":[],"mappings":"AAWA,KAAK,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE7F,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;KAAE,CAAC;CACzC,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAcF,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAC3E,EAAE,yBAAyB,+BAoN3B;yBAtNe,oBAAoB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docyrus/rn-assistant",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Standalone React Native AI assistant package for Docyrus-compatible backends.",
5
5
  "license": "MIT",
6
6
  "main": "dist/commonjs/index.js",
@@ -125,6 +125,7 @@
125
125
  "react": "19.2.0",
126
126
  "react-native": "0.83.4",
127
127
  "react-native-safe-area-context": "5.6.2",
128
+ "react-native-webview": "^13.16.1",
128
129
  "typescript": "6.0.2"
129
130
  },
130
131
  "peerDependencies": {
@@ -133,7 +134,8 @@
133
134
  "react-native": ">=0.83.0",
134
135
  "react-native-keyboard-controller": ">=1.20.7",
135
136
  "react-native-safe-area-context": ">=5.6.2",
136
- "react-native-svg": ">=15.15.3"
137
+ "react-native-svg": ">=15.15.3",
138
+ "react-native-webview": ">=13.0.0"
137
139
  },
138
140
  "peerDependenciesMeta": {
139
141
  "react-native-keyboard-controller": {
@@ -144,6 +146,9 @@
144
146
  },
145
147
  "react-native-svg": {
146
148
  "optional": false
149
+ },
150
+ "react-native-webview": {
151
+ "optional": true
147
152
  }
148
153
  },
149
154
  "react-native-builder-bob": {