reachat 2.2.0 → 3.0.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 (44) hide show
  1. package/dist/{CSVFileRenderer-BOdL4Jte.js → CSVFileRenderer-C2tuexJf.js} +2 -2
  2. package/dist/{CSVFileRenderer-BOdL4Jte.js.map → CSVFileRenderer-C2tuexJf.js.map} +1 -1
  3. package/dist/Chat.d.ts +12 -0
  4. package/dist/{Markdown/charts/ChartError.d.ts → ComponentCatalog/ComponentError.d.ts} +2 -2
  5. package/dist/ComponentCatalog/ComponentPre.d.ts +18 -0
  6. package/dist/ComponentCatalog/ComponentRenderer.d.ts +17 -0
  7. package/dist/ComponentCatalog/chartComponentDef.d.ts +36 -0
  8. package/dist/ComponentCatalog/componentCatalog.d.ts +44 -0
  9. package/dist/ComponentCatalog/componentCatalog.spec.d.ts +1 -0
  10. package/dist/ComponentCatalog/generatePrompt.d.ts +9 -0
  11. package/dist/ComponentCatalog/generatePrompt.spec.d.ts +1 -0
  12. package/dist/ComponentCatalog/index.d.ts +9 -0
  13. package/dist/ComponentCatalog/types.d.ts +108 -0
  14. package/dist/ComponentCatalog/validateSpec.d.ts +17 -0
  15. package/dist/ComponentCatalog/validateSpec.spec.d.ts +1 -0
  16. package/dist/{DefaultFileRenderer-C2MsQ9wz.js → DefaultFileRenderer-CJ3jwiQa.js} +2 -2
  17. package/dist/{DefaultFileRenderer-C2MsQ9wz.js.map → DefaultFileRenderer-CJ3jwiQa.js.map} +1 -1
  18. package/dist/Markdown/charts/ChartRenderer.d.ts +1 -1
  19. package/dist/Markdown/charts/ComponentError.d.ts +1 -0
  20. package/dist/Markdown/charts/index.d.ts +2 -6
  21. package/dist/Markdown/charts/types.d.ts +21 -0
  22. package/dist/Markdown/plugins/index.d.ts +1 -1
  23. package/dist/Markdown/plugins/remarkComponent.d.ts +27 -0
  24. package/dist/docs.json +259 -77
  25. package/dist/{index-DdRyk11n.js → index-8tlsyFe-.js} +470 -147
  26. package/dist/index-8tlsyFe-.js.map +1 -0
  27. package/dist/index.css +26 -0
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +22 -22
  30. package/dist/index.umd.cjs +454 -131
  31. package/dist/index.umd.cjs.map +1 -1
  32. package/dist/stories/Charts.stories.tsx +118 -130
  33. package/dist/stories/ComponentCatalog.stories.tsx +509 -0
  34. package/dist/stories/{ChartError.stories.tsx → ComponentError.stories.tsx} +14 -11
  35. package/dist/theme.d.ts +3 -0
  36. package/dist/utils/getChildText.d.ts +10 -0
  37. package/dist/utils/getChildText.spec.d.ts +1 -0
  38. package/package.json +4 -6
  39. package/dist/Markdown/charts/ChartPre.d.ts +0 -6
  40. package/dist/Markdown/charts/chartHelpers.d.ts +0 -40
  41. package/dist/Markdown/plugins/remarkChart.d.ts +0 -59
  42. package/dist/index-DdRyk11n.js.map +0 -1
  43. package/dist/stories/Integration.stories.tsx +0 -312
  44. /package/dist/{Markdown/charts/chartHelpers.spec.d.ts → ComponentCatalog/chartComponentDef.spec.d.ts} +0 -0
@@ -1,59 +0,0 @@
1
- import { Plugin } from 'unified';
2
- import { Root } from 'mdast';
3
- /**
4
- * Supported chart types for the remarkChart plugin.
5
- */
6
- export type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'radialBar' | 'radialArea' | 'sparkline';
7
- /**
8
- * Data point structure for charts.
9
- */
10
- export interface ChartDataPoint {
11
- key: string;
12
- data: number | ChartDataPoint[];
13
- }
14
- /**
15
- * Configuration for chart rendering.
16
- */
17
- export interface ChartConfig {
18
- type: ChartType;
19
- data: ChartDataPoint[];
20
- width?: number;
21
- height?: number;
22
- title?: string;
23
- }
24
- /**
25
- * Options for the remarkChart plugin.
26
- */
27
- export interface RemarkChartOptions {
28
- /**
29
- * Default width for charts.
30
- * @default 400
31
- */
32
- defaultWidth?: number;
33
- /**
34
- * Default height for charts.
35
- * @default 300
36
- */
37
- defaultHeight?: number;
38
- }
39
- /**
40
- * A remark plugin that preprocesses fenced code blocks with language "chart"
41
- * by validating and applying default dimensions to the chart configuration.
42
- *
43
- * The actual rendering is handled by the ChartRenderer component via
44
- * chartComponents.
45
- *
46
- * Usage in markdown:
47
- * ```chart
48
- * {
49
- * "type": "bar",
50
- * "data": [
51
- * { "key": "A", "data": 10 },
52
- * { "key": "B", "data": 20 }
53
- * ]
54
- * }
55
- * ```
56
- *
57
- * @param options - Plugin options
58
- */
59
- export declare const remarkChart: Plugin<[RemarkChartOptions?], Root>;