cmcts-c-agent-embedding 1.0.29-cagent → 1.0.30-cagent

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.
@@ -0,0 +1,172 @@
1
+ ================================================================================
2
+ [2025-12-02T03:58:46.762Z]
3
+ In the ChartPlaceholder component at `src/components/bubbles/ChartPlaceholder.tsx`, hide the fullscreen button (lines 50-74) when the message is still streaming.
4
+
5
+ Context:
6
+ - The ChartPlaceholder is rendered inside BotBubble via the `renderChartPlaceholder` function
7
+ - Currently, the fullscreen button shows when `props.config` exists
8
+ - Need to add an `isStreaming` prop to ChartPlaceholder and only show the button when `props.config && !props.isStreaming`
9
+ - Update BotBubble.tsx to pass the streaming state when rendering ChartPlaceholder
10
+
11
+ Investigate how streaming state is tracked in the codebase (look at Bot.tsx for `isProcessingBuffer`, `textBuffer`, or similar streaming indicators) and propagate it properly to ChartPlaceholder.
12
+
13
+ Do not create or modify any markdown document files or code examples. After making changes, run `yarn run lint-fix && yarn run type-check` to validate.
14
+
15
+ ================================================================================
16
+ [2025-12-02T04:03:09.885Z]
17
+ Fix the issue where the fullscreen button in ChartPlaceholder doesn't appear after streaming completes.
18
+
19
+ The problem: In BotBubble.tsx, when `renderChartPlaceholder` is called, it passes `isStreaming` as a static boolean value. This value is captured at render time and doesn't update when streaming finishes.
20
+
21
+ Solution approach:
22
+ 1. Instead of passing `isStreaming` as a static boolean, pass it as a getter function `() => props.isLoading` so it remains reactive
23
+ 2. Update ChartPlaceholder to accept `isStreaming` as either boolean or getter function, or change to use a getter pattern
24
+ 3. The Show condition should call the getter to get the current streaming state
25
+
26
+ Look at how other props are handled reactively in SolidJS when using the `render()` function to mount components.
27
+
28
+ Do not create or modify any markdown document files or code examples. After making changes, run `yarn run lint-fix && yarn run type-check` to validate.
29
+
30
+ ================================================================================
31
+ [2025-12-02T04:09:44.492Z]
32
+ Fix the issue where charts are re-rendered continuously during streaming, causing:
33
+ 1. Button click events not being captured to show popup
34
+ 2. Users cannot interact with charts during streaming
35
+
36
+ The root cause: In BotBubble.tsx, `updateBotMessageContent` sets `innerHTML` which destroys all DOM including rendered chart placeholders. Even though `chartDisposeMap.has(chartId)` check exists, the DOM is already destroyed by innerHTML.
37
+
38
+ Solution approach:
39
+ 1. In `updateBotMessageContent`, instead of replacing entire innerHTML, use a smarter DOM diffing approach:
40
+ - Parse the new HTML content
41
+ - Only update text nodes and elements that changed
42
+ - Preserve chart placeholder elements that are already rendered (have children or are in chartDisposeMap)
43
+
44
+ 2. Alternative simpler approach:
45
+ - Before setting innerHTML, save references to rendered chart placeholder elements
46
+ - After setting innerHTML, find the new placeholder slots and replace them with the saved elements
47
+ - This preserves the rendered charts and their event handlers
48
+
49
+ 3. Or use a flag to skip re-initializing charts that are already rendered - but this won't work because innerHTML destroys the DOM
50
+
51
+ Investigate the best approach and implement a fix. The goal is that during streaming:
52
+ - Text content updates normally
53
+ - Chart placeholders that are already rendered are NOT destroyed/re-created
54
+ - Users can interact with charts (click fullscreen button, hover, etc.)
55
+
56
+ Do not create or modify any markdown document files or code examples. After making changes, run `yarn run lint-fix && yarn run type-check` to validate.
57
+
58
+ ================================================================================
59
+ [2025-12-02T04:14:25.602Z]
60
+ The previous fix didn't work. Charts are still flickering when hovering due to re-rendering when new SSE events arrive.
61
+
62
+ The issue is more fundamental - we need to understand WHY the chart components are being re-rendered during streaming.
63
+
64
+ Please investigate deeply:
65
+
66
+ 1. Use web-search to find solutions for:
67
+ - "SolidJS prevent component re-render during streaming"
68
+ - "SolidJS preserve DOM elements when parent updates"
69
+ - "SolidJS Portal to prevent re-render"
70
+ - "React/SolidJS chart flickering during real-time updates"
71
+
72
+ 2. Trace the full reactive chain:
73
+ - How does `updateLastMessage` in Bot.tsx trigger updates?
74
+ - How does BotBubble receive and react to message changes?
75
+ - Why is `updateBotMessageContent` being called repeatedly?
76
+ - Is there a createEffect somewhere that triggers on message change?
77
+
78
+ 3. Investigate if the issue is:
79
+ - The entire BotBubble component re-rendering
80
+ - Just the `updateBotMessageContent` function being called
81
+ - The chart placeholder DOM being recreated
82
+ - SolidJS reactivity causing unnecessary updates
83
+
84
+ 4. Consider alternative architectures:
85
+ - Using SolidJS Portal to render charts outside the message bubble
86
+ - Using a separate signal/store for chart state that doesn't trigger message re-render
87
+ - Memoizing the chart components
88
+ - Using `untrack` to break reactive dependencies
89
+
90
+ Find the root cause and implement a proper fix that ensures charts don't flicker during streaming.
91
+
92
+ Do not create or modify any markdown document files or code examples. After making changes, run `yarn run lint-fix && yarn run type-check` to validate.
93
+
94
+ ================================================================================
95
+ [2025-12-02T04:28:09.707Z]
96
+ Now that the flickering issue is fixed with the global registry, show the fullscreen button in ChartPlaceholder even during streaming.
97
+
98
+ In `src/components/bubbles/ChartPlaceholder.tsx` line 52, change the condition from:
99
+ `props.config && !props.isStreaming?.()`
100
+ to just:
101
+ `props.config`
102
+
103
+ The button should now work during streaming since the chart DOM is preserved via the global registry.
104
+
105
+ Also, since `isStreaming` prop is no longer needed, you can:
106
+ 1. Remove the `isStreaming` prop from ChartPlaceholderProps interface
107
+ 2. Remove the `isStreaming` prop usage in BotBubble.tsx where ChartPlaceholder is rendered
108
+
109
+ Do not create or modify any markdown document files or code examples. After making changes, run `yarn run lint-fix && yarn run type-check` to validate.
110
+
111
+ ================================================================================
112
+ [2025-12-02T04:34:32.352Z]
113
+ Bug: The fullscreen button in ChartPlaceholder is visible during streaming, but clicking it does nothing - the popup doesn't open.
114
+
115
+ Context:
116
+ - Charts are now preserved via global registry to prevent flickering during streaming
117
+ - The button is rendered with `onClick={openPopup}` handler
118
+ - The popup uses `isPopupOpen` signal and `ChartPopupModal` component
119
+
120
+ Definition of Done:
121
+ - Clicking the fullscreen button during streaming should open the popup modal
122
+ - The popup should display the chart correctly
123
+ - This should work both during streaming and after streaming completes
124
+
125
+ Investigate why the click event or popup is not working when the chart is in the global registry during streaming. Consider:
126
+ - Is the event handler being lost when the element is saved/restored?
127
+ - Is there an issue with the SolidJS reactive context when the component is rendered via `render()` function?
128
+ - Is the popup being rendered but hidden/blocked by something?
129
+
130
+ Do not create or modify any markdown document files or code examples. After making changes, run `yarn run lint-fix && yarn run type-check` to validate.
131
+
132
+ ================================================================================
133
+ [2025-12-02T04:38:56.981Z]
134
+ The previous fix didn't work. The fullscreen button click still doesn't work during streaming.
135
+
136
+ The issue is NOT about DOM elements being destroyed - there's something more fundamental happening.
137
+
138
+ Please investigate deeper:
139
+
140
+ 1. Add console.log statements to debug:
141
+ - In `openPopup` function in ChartPlaceholder.tsx to see if click event fires
142
+ - Log `isPopupOpen()` value before and after `setIsPopupOpen(true)`
143
+ - Log `props.config` to verify it exists
144
+
145
+ 2. Check if the issue is with SolidJS Portal or ChartPopupModal:
146
+ - Is the popup being rendered but invisible?
147
+ - Is there a z-index issue?
148
+ - Is the Portal mounting correctly when component is rendered via `render()` function?
149
+
150
+ 3. Consider if the problem is that when ChartPlaceholder is rendered via SolidJS `render()` function into a detached/reattached DOM element, the reactive context or Portal context is broken.
151
+
152
+ 4. Test by replacing the popup with a simple `alert('clicked')` in openPopup to verify if the click event fires at all.
153
+
154
+ Find the actual root cause and fix it properly.
155
+
156
+ Do not create or modify any markdown document files or code examples. After making changes, run `yarn run lint-fix && yarn run type-check` to validate.
157
+
158
+ ================================================================================
159
+ [2025-12-02T04:45:08.748Z]
160
+ Continue adding debug logs. You added console.log to openPopup and the button onClick. Now:
161
+
162
+ 1. Run lint-fix and type-check to validate
163
+ 2. Tell the user to test and check browser console for the debug messages
164
+
165
+ The debug logs will help identify if:
166
+ - The click event fires at all (alert should show)
167
+ - The openPopup function is called
168
+ - The isPopupOpen signal changes
169
+ - The config exists
170
+
171
+ Do not create or modify any markdown document files or code examples. After making changes, run `yarn run lint-fix && yarn run type-check` to validate.
172
+
@@ -0,0 +1,12 @@
1
+ Continue adding debug logs. You added console.log to openPopup and the button onClick. Now:
2
+
3
+ 1. Run lint-fix and type-check to validate
4
+ 2. Tell the user to test and check browser console for the debug messages
5
+
6
+ The debug logs will help identify if:
7
+ - The click event fires at all (alert should show)
8
+ - The openPopup function is called
9
+ - The isPopupOpen signal changes
10
+ - The config exists
11
+
12
+ Do not create or modify any markdown document files or code examples. After making changes, run `yarn run lint-fix && yarn run type-check` to validate.
@@ -1 +1 @@
1
- {"version":3,"file":"BotBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/BotBubble.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAc,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAM1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAM9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,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AAK,mCAswBrC,CAAC"}
@@ -1,4 +1,68 @@
1
- import type { ChartBubbleProps } from '@/types/chart';
1
+ import type { ChartOptions } from 'chart.js';
2
+ import type { ChartBubbleProps, SupportedChartType } from '@/types/chart';
3
+ /**
4
+ * Vietnamese Government Style Color Palette
5
+ * Based on official Vietnamese flag colors and professional government design standards
6
+ * Primary: Red (#C8102E) - symbolizes revolution and sacrifice
7
+ * Secondary: Gold (#FFCD00) - symbolizes prosperity and national identity
8
+ * Supporting colors for multi-series data visualization with accessibility in mind
9
+ */
10
+ export declare const vnGovColors: {
11
+ primary: string;
12
+ secondary: string;
13
+ palette: string[];
14
+ paletteFill: string[];
15
+ paletteLineFill: string[];
16
+ text: {
17
+ primary: string;
18
+ secondary: string;
19
+ light: string;
20
+ };
21
+ grid: {
22
+ line: string;
23
+ border: string;
24
+ axis: string;
25
+ };
26
+ container: {
27
+ background: string;
28
+ border: string;
29
+ shadow: string;
30
+ };
31
+ };
32
+ /**
33
+ * Professional Vietnamese government chart typography settings
34
+ * Using system sans-serif fonts for clean, official appearance
35
+ */
36
+ export declare const vnGovTypography: {
37
+ fontFamily: string;
38
+ title: {
39
+ size: number;
40
+ weight: "bold";
41
+ lineHeight: number;
42
+ };
43
+ legend: {
44
+ size: number;
45
+ weight: "bold";
46
+ };
47
+ axis: {
48
+ size: number;
49
+ weight: "normal";
50
+ };
51
+ tooltip: {
52
+ size: number;
53
+ weight: "normal";
54
+ };
55
+ };
56
+ /**
57
+ * Applies Vietnamese government color palette to chart datasets
58
+ * Ensures consistent, professional appearance across all chart types
59
+ */
60
+ export declare const applyVnGovColorsToDatasets: (data: ChartBubbleProps['config']['data'], chartType: SupportedChartType) => ChartBubbleProps['config']['data'];
61
+ /**
62
+ * Creates Vietnamese government-styled chart options
63
+ * Professional appearance suitable for official reports and dashboards
64
+ */
65
+ export declare const createVnGovChartOptions: (chartType: SupportedChartType, title: string | undefined, textColor: string) => ChartOptions;
2
66
  /**
3
67
  * SolidJS component that renders a Chart.js chart with Vietnamese government styling.
4
68
  * Features professional color palette, typography, and visual design appropriate
@@ -1 +1 @@
1
- {"version":3,"file":"ChartBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/ChartBubble.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,eAAe,CAAC;AA8d1E;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,mCAwElD,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ChartBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/ChartBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAM1E;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;CA0DvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;CAmB3B,CAAC;AAoGF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,SAC/B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,aAC7B,kBAAkB,KAC5B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAiGnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,cACvB,kBAAkB,SACtB,MAAM,GAAG,SAAS,aACd,MAAM,KAChB,YAkJF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,mCAsElD,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -3,13 +3,15 @@ export interface ChartPlaceholderProps {
3
3
  chartId: string;
4
4
  config?: ChartConfig | null;
5
5
  isLoading?: boolean;
6
+ /** Getter function that returns true while streaming is in progress. Using a getter ensures reactivity when rendered via SolidJS render(). */
7
+ isStreaming?: () => boolean;
6
8
  backgroundColor?: string;
7
9
  textColor?: string;
8
10
  }
9
11
  /**
10
12
  * Simplified placeholder component that renders charts directly inline.
11
13
  * Uses StableChartWrapper to ensure charts are only rendered once when config is available.
12
- * No portal or position tracking needed - charts render in their natural flow position.
14
+ * Includes a fullscreen button to open the chart in a popup modal with zoom/pan capabilities.
13
15
  */
14
16
  export declare const ChartPlaceholder: (props: ChartPlaceholderProps) => import("solid-js").JSX.Element;
15
17
  export default ChartPlaceholder;
@@ -1 +1 @@
1
- {"version":3,"file":"ChartPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/ChartPlaceholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,mCAuB5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ChartPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/ChartPlaceholder.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKjD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8IAA8I;IAC9I,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,mCA2E5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ChartPopupModalProps } from '@/types/chart';
2
+ export declare const ChartPopupModal: (props: ChartPopupModalProps) => import("solid-js").JSX.Element;
3
+ export default ChartPopupModal;
4
+ //# sourceMappingURL=ChartPopupModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartPopupModal.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/ChartPopupModal.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAS1D,eAAO,MAAM,eAAe,UAAW,oBAAoB,mCAiO1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { JSX } from 'solid-js/jsx-runtime';
2
+ export declare const ResetZoomIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
3
+ //# sourceMappingURL=ResetZoomIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResetZoomIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/ResetZoomIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAI3C,eAAO,MAAM,aAAa,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,gBAkBvE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { JSX } from 'solid-js/jsx-runtime';
2
+ export declare const ZoomInIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
3
+ //# sourceMappingURL=ZoomInIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZoomInIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/ZoomInIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAI3C,eAAO,MAAM,UAAU,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,gBAkBpE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { JSX } from 'solid-js/jsx-runtime';
2
+ export declare const ZoomOutIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
3
+ //# sourceMappingURL=ZoomOutIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZoomOutIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/ZoomOutIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAI3C,eAAO,MAAM,WAAW,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,gBAiBrE,CAAC"}
@@ -15,4 +15,7 @@ export * from './FullScreenIcon';
15
15
  export * from './EditIcon';
16
16
  export * from './CopyIcon';
17
17
  export * from './CheckIcon';
18
+ export * from './ZoomInIcon';
19
+ export * from './ZoomOutIcon';
20
+ export * from './ResetZoomIcon';
18
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
@@ -61,6 +61,10 @@ export interface ChartBubbleProps {
61
61
  config: ChartConfig;
62
62
  backgroundColor?: string;
63
63
  textColor?: string;
64
+ /** Enable zoom/pan interactivity (used in popup modal) */
65
+ enableZoom?: boolean;
66
+ /** Callback to open chart in fullscreen popup */
67
+ onOpenFullscreen?: () => void;
64
68
  }
65
69
  /**
66
70
  * Props for ChartLoadingPlaceholder component
@@ -69,4 +73,14 @@ export interface ChartLoadingPlaceholderProps {
69
73
  chartId: string;
70
74
  backgroundColor?: string;
71
75
  }
76
+ /**
77
+ * Props for ChartPopupModal component
78
+ */
79
+ export interface ChartPopupModalProps {
80
+ isOpen: boolean;
81
+ config: ChartConfig;
82
+ onClose: () => void;
83
+ backgroundColor?: string;
84
+ textColor?: string;
85
+ }
72
86
  //# sourceMappingURL=chart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/types/chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,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CAAC;IACX,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,WAAW,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,54 @@
1
+ import { Accessor } from 'solid-js';
2
+ import type { ChartConfig } from '@/types/chart';
3
+ /**
4
+ * Global state manager for chart configurations during streaming.
5
+ * This singleton manages chart config state outside of the component tree,
6
+ * preventing reactivity issues when charts complete during SSE streaming.
7
+ *
8
+ * The problem: When using render() from solid-js/web to mount ChartPlaceholder
9
+ * components into DOM slots, the rendered components are in an isolated reactive
10
+ * root that doesn't share the parent's reactive context. Props passed to these
11
+ * components don't update reactively when the parent's signals change.
12
+ *
13
+ * The solution: Use a global manager with SolidJS signals that can be accessed
14
+ * from any component, regardless of which reactive root it's in.
15
+ */
16
+ declare class ChartConfigManager {
17
+ private _configs;
18
+ private _loadingStates;
19
+ /**
20
+ * Get or create a config signal for a chart
21
+ */
22
+ getConfigSignal(chartId: string): Accessor<ChartConfig | null>;
23
+ /**
24
+ * Get or create a loading state signal for a chart
25
+ */
26
+ getLoadingSignal(chartId: string): Accessor<boolean>;
27
+ /**
28
+ * Set the config for a chart (called when chart streaming completes)
29
+ */
30
+ setConfig(chartId: string, config: ChartConfig): void;
31
+ /**
32
+ * Set the loading state for a chart
33
+ */
34
+ setLoading(chartId: string, loading: boolean): void;
35
+ /**
36
+ * Initialize a chart with optional initial config (for historical messages)
37
+ */
38
+ initChart(chartId: string, config: ChartConfig | null, isLoading: boolean): void;
39
+ /**
40
+ * Check if a chart has a config
41
+ */
42
+ hasConfig(chartId: string): boolean;
43
+ /**
44
+ * Clear all chart configs (useful for cleanup between conversations)
45
+ */
46
+ clear(): void;
47
+ /**
48
+ * Remove a specific chart's config
49
+ */
50
+ removeChart(chartId: string): void;
51
+ }
52
+ export declare const chartConfigManager: ChartConfigManager;
53
+ export {};
54
+ //# sourceMappingURL=chartConfigManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartConfigManager.d.ts","sourceRoot":"","sources":["../../src/utils/chartConfigManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,cAAM,kBAAkB;IAEtB,OAAO,CAAC,QAAQ,CAA2F;IAC3G,OAAO,CAAC,cAAc,CAAsE;IAE5F;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;IAQ9D;;OAEG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC;IAQpD;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;IAWrD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IASnD;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI;IAkBhF;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAKnC;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAInC;AAGD,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { ChartConfig } from '@/types/chart';
2
+ /**
3
+ * Global state manager for chart popup modal.
4
+ * This singleton manages popup state outside of the component tree,
5
+ * preventing state loss during DOM re-renders (e.g., during SSE streaming).
6
+ */
7
+ declare class ChartPopupManager {
8
+ private _isOpen;
9
+ private _config;
10
+ private _backgroundColor;
11
+ private _textColor;
12
+ /**
13
+ * Get the isOpen signal accessor
14
+ */
15
+ get isOpen(): import("solid-js").Accessor<boolean>;
16
+ /**
17
+ * Get the config signal accessor
18
+ */
19
+ get config(): import("solid-js").Accessor<ChartConfig | null>;
20
+ /**
21
+ * Get the backgroundColor signal accessor
22
+ */
23
+ get backgroundColor(): import("solid-js").Accessor<string | undefined>;
24
+ /**
25
+ * Get the textColor signal accessor
26
+ */
27
+ get textColor(): import("solid-js").Accessor<string | undefined>;
28
+ /**
29
+ * Open the popup with the given chart configuration
30
+ */
31
+ open(config: ChartConfig, backgroundColor?: string, textColor?: string): void;
32
+ /**
33
+ * Close the popup
34
+ */
35
+ close(): void;
36
+ /**
37
+ * Reset all state (useful for cleanup)
38
+ */
39
+ reset(): void;
40
+ }
41
+ export declare const chartPopupManager: ChartPopupManager;
42
+ export {};
43
+ //# sourceMappingURL=chartPopupManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartPopupManager.d.ts","sourceRoot":"","sources":["../../src/utils/chartPopupManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;GAIG;AACH,cAAM,iBAAiB;IAErB,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,gBAAgB,CAA+C;IACvE,OAAO,CAAC,UAAU,CAA+C;IAEjE;;OAEG;IACH,IAAI,MAAM,yCAET;IAED;;OAEG;IACH,IAAI,MAAM,oDAET;IAED;;OAEG;IACH,IAAI,eAAe,oDAElB;IAED;;OAEG;IACH,IAAI,SAAS,oDAEZ;IAED;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAO7E;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,KAAK,IAAI,IAAI;CAMd;AAGD,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}