@carto/ps-react-ui 4.4.0-chat-ui.5 → 4.4.0-chat-ui.7
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/category-DwaeYjpX.js +656 -0
- package/dist/category-DwaeYjpX.js.map +1 -0
- package/dist/change-column-Cidl_M-4.js +1110 -0
- package/dist/change-column-Cidl_M-4.js.map +1 -0
- package/dist/chat.js +622 -673
- package/dist/chat.js.map +1 -1
- package/dist/components.js.map +1 -1
- package/dist/data-zoom-layout-DVYB8mIx.js +29 -0
- package/dist/data-zoom-layout-DVYB8mIx.js.map +1 -0
- package/dist/download-config-C7hf33ip.js +58 -0
- package/dist/download-config-C7hf33ip.js.map +1 -0
- package/dist/echart-CU0KmClP.js +176 -0
- package/dist/echart-CU0KmClP.js.map +1 -0
- package/dist/exports-Cr43OCul.js.map +1 -1
- package/dist/exports-Cx-f6m6U.js +63 -0
- package/dist/exports-Cx-f6m6U.js.map +1 -0
- package/dist/formatter-B9Bxn1k7.js +6 -0
- package/dist/formatter-B9Bxn1k7.js.map +1 -0
- package/dist/formula-DuC0NQLH.js +79 -0
- package/dist/formula-DuC0NQLH.js.map +1 -0
- package/dist/lasso-tool-BYbxrJ-7.js.map +1 -1
- package/dist/markdown-BD1jcknS.js +8326 -0
- package/dist/markdown-BD1jcknS.js.map +1 -0
- package/dist/option-builders-F-c9ELi1.js +122 -0
- package/dist/option-builders-F-c9ELi1.js.map +1 -0
- package/dist/options-CthfUJDz.js +46 -0
- package/dist/options-CthfUJDz.js.map +1 -0
- package/dist/png-item-CS4z1iSH.js +45 -0
- package/dist/png-item-CS4z1iSH.js.map +1 -0
- package/dist/range-l4fNHLEg.js +213 -0
- package/dist/range-l4fNHLEg.js.map +1 -0
- package/dist/resolve-theme-color-BdojIw0K.js +47 -0
- package/dist/resolve-theme-color-BdojIw0K.js.map +1 -0
- package/dist/row-DZSP99LW.js +34 -0
- package/dist/row-DZSP99LW.js.map +1 -0
- package/dist/series-DLNHDWs0.js +90 -0
- package/dist/series-DLNHDWs0.js.map +1 -0
- package/dist/shared-resize-observer-98b1SK1e.js +17 -0
- package/dist/shared-resize-observer-98b1SK1e.js.map +1 -0
- package/dist/smart-tooltip-D4vwQpFf.js.map +1 -1
- package/dist/spread-CngWB5KF.js +68 -0
- package/dist/spread-CngWB5KF.js.map +1 -0
- package/dist/style-DVnT6HC1.js +131 -0
- package/dist/style-DVnT6HC1.js.map +1 -0
- package/dist/styles-cohnxh9F.js +23 -0
- package/dist/styles-cohnxh9F.js.map +1 -0
- package/dist/table-CQCAnDLb.js +388 -0
- package/dist/table-CQCAnDLb.js.map +1 -0
- package/dist/tooltip-BDnrRKrp.js.map +1 -1
- package/dist/transforms-Cdx4fkU5.js +106 -0
- package/dist/transforms-Cdx4fkU5.js.map +1 -0
- package/dist/types/chat/containers/chat-content.d.ts +2 -2
- package/dist/types/chat/containers/styles.d.ts +10 -27
- package/dist/types/chat/feedback/chat-tool-code-area.d.ts +1 -3
- package/dist/types/chat/index.d.ts +1 -1
- package/dist/types/chat/types.d.ts +35 -3
- package/dist/types/components/basemaps/basemaps.d.ts +20 -0
- package/dist/types/components/geolocation-controls/geolocation-controls.d.ts +11 -0
- package/dist/types/components/lasso-tool/lasso-tool-inline.d.ts +17 -0
- package/dist/types/components/lasso-tool/lasso-tool.d.ts +21 -0
- package/dist/types/components/list-data/list-data.d.ts +16 -0
- package/dist/types/components/measurement-tools/measurement-tools.d.ts +20 -0
- package/dist/types/components/smart-tooltip/smart-tooltip.d.ts +17 -0
- package/dist/types/components/tooltip/tooltip.d.ts +13 -0
- package/dist/types/components/zoom-controls/zoom-controls.d.ts +16 -0
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/use-widget-ref.d.ts +9 -6
- package/dist/types/widgets/actions/brush-toggle/brush-overlay.d.ts +24 -0
- package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +29 -0
- package/dist/types/widgets/actions/brush-toggle/hit-test.d.ts +19 -0
- package/dist/types/widgets/actions/brush-toggle/hit-test.test.d.ts +1 -0
- package/dist/types/widgets/actions/brush-toggle/style.d.ts +21 -0
- package/dist/types/widgets/actions/brush-toggle/types.d.ts +73 -0
- package/dist/types/widgets/actions/download/download.d.ts +11 -0
- package/dist/types/widgets/actions/download/exports.d.ts +15 -0
- package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +13 -0
- package/dist/types/widgets/actions/index.d.ts +7 -5
- package/dist/types/widgets/actions/lock-selection/types.d.ts +2 -0
- package/dist/types/widgets/actions/relative-data/relative-data.d.ts +8 -2
- package/dist/types/widgets/actions/relative-data/types.d.ts +2 -0
- package/dist/types/widgets/actions/zoom-toggle/zoom-toggle.d.ts +4 -0
- package/dist/types/widgets/bar/config.d.ts +8 -4
- package/dist/types/widgets/category/category-ui.d.ts +3 -0
- package/dist/types/widgets/category/components/category-bar.d.ts +3 -0
- package/dist/types/widgets/category/components/category-legend.d.ts +3 -0
- package/dist/types/widgets/category/components/category-row-multi.d.ts +5 -1
- package/dist/types/widgets/category/components/category-row-other.d.ts +3 -0
- package/dist/types/widgets/category/components/category-row-single.d.ts +5 -1
- package/dist/types/widgets/category/config.d.ts +11 -0
- package/dist/types/widgets/category/index.d.ts +10 -2
- package/dist/types/widgets/category/style.d.ts +1 -0
- package/dist/types/widgets/category/types.d.ts +1 -0
- package/dist/types/widgets/echart/echart-ui.d.ts +7 -0
- package/dist/types/widgets/echart/echart.d.ts +6 -0
- package/dist/types/widgets/echart/options.d.ts +7 -0
- package/dist/types/widgets/echart/shared-resize-observer.d.ts +12 -0
- package/dist/types/widgets/echart/types.d.ts +5 -1
- package/dist/types/widgets/echart/utils.d.ts +54 -7
- package/dist/types/widgets/echart/utils.test.d.ts +1 -0
- package/dist/types/widgets/error/error.d.ts +10 -0
- package/dist/types/widgets/formula/components/item.d.ts +3 -0
- package/dist/types/widgets/formula/components/prefix.d.ts +3 -0
- package/dist/types/widgets/formula/components/row.d.ts +3 -0
- package/dist/types/widgets/formula/components/series.d.ts +3 -0
- package/dist/types/widgets/formula/components/suffix.d.ts +3 -0
- package/dist/types/widgets/formula/components/value.d.ts +3 -0
- package/dist/types/widgets/formula/config.d.ts +11 -0
- package/dist/types/widgets/formula/config.test.d.ts +1 -0
- package/dist/types/widgets/formula/formula-ui.d.ts +3 -0
- package/dist/types/widgets/histogram/config.d.ts +18 -2
- package/dist/types/widgets/histogram/index.d.ts +2 -1
- package/dist/types/widgets/histogram/types.d.ts +6 -3
- package/dist/types/widgets/loader/loader.d.ts +22 -0
- package/dist/types/widgets/loader/utils.d.ts +26 -3
- package/dist/types/widgets/markdown/config.d.ts +10 -0
- package/dist/types/widgets/markdown/markdown-ui.d.ts +7 -0
- package/dist/types/widgets/markdown/markdown.d.ts +3 -0
- package/dist/types/widgets/no-data/no-data.d.ts +3 -2
- package/dist/types/widgets/no-data/types.d.ts +5 -1
- package/dist/types/widgets/note/note.d.ts +10 -0
- package/dist/types/widgets/pie/config.d.ts +8 -4
- package/dist/types/widgets/range/components/range-item.d.ts +3 -0
- package/dist/types/widgets/range/config.d.ts +5 -0
- package/dist/types/widgets/range/range-ui.d.ts +3 -0
- package/dist/types/widgets/scatterplot/config.d.ts +7 -3
- package/dist/types/widgets/selection-summary/selection-summary.d.ts +11 -0
- package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +10 -0
- package/dist/types/widgets/spread/components/max-value.d.ts +3 -0
- package/dist/types/widgets/spread/components/min-value.d.ts +3 -0
- package/dist/types/widgets/spread/components/separator.d.ts +3 -0
- package/dist/types/widgets/spread/config.d.ts +11 -0
- package/dist/types/widgets/spread/spread-ui.d.ts +3 -0
- package/dist/types/widgets/stores/index.d.ts +3 -2
- package/dist/types/widgets/stores/types.d.ts +12 -10
- package/dist/types/widgets/stores/use-widget-selector.d.ts +35 -0
- package/dist/types/widgets/stores/widget-store-branches.test.d.ts +1 -0
- package/dist/types/widgets/stores/widget-store-performance.test.d.ts +1 -0
- package/dist/types/widgets/stores/widget-store.d.ts +48 -27
- package/dist/types/widgets/subheader/subheader.d.ts +11 -0
- package/dist/types/widgets/table/config.d.ts +8 -3
- package/dist/types/widgets/table/config.test.d.ts +1 -0
- package/dist/types/widgets/table/hooks/use-pagination.d.ts +11 -3
- package/dist/types/widgets/table/hooks/use-selection.d.ts +11 -2
- package/dist/types/widgets/table/hooks/use-sort.d.ts +11 -3
- package/dist/types/widgets/table/index.d.ts +6 -2
- package/dist/types/widgets/table/types.d.ts +1 -1
- package/dist/types/widgets/timeseries/config.d.ts +8 -4
- package/dist/types/widgets/utils/chart-config/download-config.d.ts +3 -0
- package/dist/types/widgets/{_shared → utils}/chart-config/index.d.ts +3 -1
- package/dist/types/widgets/{_shared → utils}/chart-config/option-builders.d.ts +41 -9
- package/dist/types/widgets/utils/chart-config/option-builders.test.d.ts +1 -0
- package/dist/types/widgets/utils/formatter.d.ts +2 -0
- package/dist/types/widgets/utils/index.d.ts +7 -0
- package/dist/types/widgets/wrapper/components/actions.d.ts +3 -0
- package/dist/types/widgets/wrapper/components/options.d.ts +3 -0
- package/dist/types/widgets/wrapper/components/title.d.ts +3 -0
- package/dist/types/widgets/wrapper/wrapper-ui.d.ts +14 -0
- package/dist/types/widgets/wrapper/wrapper.d.ts +14 -0
- package/dist/types/widgets-v2/actions/brush-toggle/brush-toggle.d.ts +56 -0
- package/dist/types/widgets-v2/actions/brush-toggle/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/brush-toggle/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/brush-toggle/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/brush-toggle/transforms.d.ts +11 -0
- package/dist/types/widgets-v2/actions/change-column/change-column-icon.d.ts +2 -0
- package/dist/types/widgets-v2/actions/change-column/change-column.d.ts +29 -0
- package/dist/types/widgets-v2/actions/change-column/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/change-column/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/change-column/sortable-column-item.d.ts +14 -0
- package/dist/types/widgets-v2/actions/change-column/style.d.ts +33 -0
- package/dist/types/widgets-v2/actions/change-column/types.d.ts +10 -0
- package/dist/types/widgets-v2/actions/download/download.d.ts +18 -0
- package/dist/types/widgets-v2/actions/download/exports.d.ts +37 -0
- package/dist/types/widgets-v2/actions/download/icons.d.ts +12 -0
- package/dist/types/widgets-v2/actions/download/index.d.ts +6 -0
- package/dist/types/widgets-v2/actions/download/labels.d.ts +11 -0
- package/dist/types/widgets-v2/actions/download/png-item.d.ts +24 -0
- package/dist/types/widgets-v2/actions/download/style.d.ts +1 -0
- package/dist/types/widgets-v2/actions/download/types.d.ts +35 -0
- package/dist/types/widgets-v2/actions/fullscreen/fullscreen.d.ts +59 -0
- package/dist/types/widgets-v2/actions/fullscreen/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/fullscreen/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/fullscreen/style.d.ts +48 -0
- package/dist/types/widgets-v2/actions/fullscreen/types.d.ts +14 -0
- package/dist/types/widgets-v2/actions/index.d.ts +9 -0
- package/dist/types/widgets-v2/actions/lock-selection/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/lock-selection/labels.d.ts +6 -0
- package/dist/types/widgets-v2/actions/lock-selection/lock-selection.d.ts +36 -0
- package/dist/types/widgets-v2/actions/lock-selection/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/lock-selection/transforms.d.ts +6 -0
- package/dist/types/widgets-v2/actions/relative-data/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/relative-data/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/relative-data/relative-data.d.ts +39 -0
- package/dist/types/widgets-v2/actions/relative-data/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/relative-data/transforms.d.ts +30 -0
- package/dist/types/widgets-v2/actions/relative-data/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/actions/searcher/filter.d.ts +6 -0
- package/dist/types/widgets-v2/actions/searcher/index.d.ts +4 -0
- package/dist/types/widgets-v2/actions/searcher/labels.d.ts +7 -0
- package/dist/types/widgets-v2/actions/searcher/searcher-toggle.d.ts +23 -0
- package/dist/types/widgets-v2/actions/searcher/searcher.d.ts +11 -0
- package/dist/types/widgets-v2/actions/searcher/style.d.ts +16 -0
- package/dist/types/widgets-v2/actions/stack-toggle/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/stack-toggle/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/stack-toggle/stack-toggle.d.ts +10 -0
- package/dist/types/widgets-v2/actions/stack-toggle/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/stack-toggle/transforms.d.ts +13 -0
- package/dist/types/widgets-v2/actions/stack-toggle/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/transforms.d.ts +51 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/zoom-toggle.d.ts +35 -0
- package/dist/types/widgets-v2/bar/download.d.ts +24 -0
- package/dist/types/widgets-v2/bar/index.d.ts +4 -0
- package/dist/types/widgets-v2/bar/options.d.ts +43 -0
- package/dist/types/widgets-v2/bar/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/bar/skeleton.d.ts +6 -0
- package/dist/types/widgets-v2/bar/types.d.ts +46 -0
- package/dist/types/widgets-v2/category/category-ui.d.ts +81 -0
- package/dist/types/widgets-v2/category/category.d.ts +48 -0
- package/dist/types/widgets-v2/category/components/category-bar-stacked.d.ts +28 -0
- package/dist/types/widgets-v2/category/components/category-bar.d.ts +23 -0
- package/dist/types/widgets-v2/category/components/category-legend.d.ts +18 -0
- package/dist/types/widgets-v2/category/components/category-row-multi.d.ts +31 -0
- package/dist/types/widgets-v2/category/components/category-row-other.d.ts +13 -0
- package/dist/types/widgets-v2/category/components/category-row-single.d.ts +28 -0
- package/dist/types/widgets-v2/category/components/category-row-stacked.d.ts +38 -0
- package/dist/types/widgets-v2/category/download.d.ts +16 -0
- package/dist/types/widgets-v2/category/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/category/index.d.ts +10 -0
- package/dist/types/widgets-v2/category/skeleton.d.ts +11 -0
- package/dist/types/widgets-v2/category/style.d.ts +166 -0
- package/dist/types/widgets-v2/category/types.d.ts +53 -0
- package/dist/types/widgets-v2/echart/echart-ui.d.ts +44 -0
- package/dist/types/widgets-v2/echart/echart.d.ts +75 -0
- package/dist/types/widgets-v2/echart/index.d.ts +4 -0
- package/dist/types/widgets-v2/echart/shared-resize-observer.d.ts +5 -0
- package/dist/types/widgets-v2/echart/shared-resize-observer.test.d.ts +1 -0
- package/dist/types/widgets-v2/echart/style.d.ts +6 -0
- package/dist/types/widgets-v2/echart/use-chart-selection.d.ts +51 -0
- package/dist/types/widgets-v2/formula/delta.d.ts +22 -0
- package/dist/types/widgets-v2/formula/download.d.ts +20 -0
- package/dist/types/widgets-v2/formula/formula-ui.d.ts +20 -0
- package/dist/types/widgets-v2/formula/formula.d.ts +8 -0
- package/dist/types/widgets-v2/formula/index.d.ts +11 -0
- package/dist/types/widgets-v2/formula/note.d.ts +11 -0
- package/dist/types/widgets-v2/formula/prefix.d.ts +12 -0
- package/dist/types/widgets-v2/formula/series.d.ts +16 -0
- package/dist/types/widgets-v2/formula/skeleton.d.ts +4 -0
- package/dist/types/widgets-v2/formula/style.d.ts +29 -0
- package/dist/types/widgets-v2/formula/suffix.d.ts +12 -0
- package/dist/types/widgets-v2/formula/types.d.ts +43 -0
- package/dist/types/widgets-v2/formula/value.d.ts +14 -0
- package/dist/types/widgets-v2/histogram/download.d.ts +17 -0
- package/dist/types/widgets-v2/histogram/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/histogram/index.d.ts +5 -0
- package/dist/types/widgets-v2/histogram/options.d.ts +42 -0
- package/dist/types/widgets-v2/histogram/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/histogram/skeleton.d.ts +9 -0
- package/dist/types/widgets-v2/histogram/transforms.d.ts +17 -0
- package/dist/types/widgets-v2/histogram/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/histogram/types.d.ts +51 -0
- package/dist/types/widgets-v2/index.d.ts +108 -0
- package/dist/types/widgets-v2/markdown/download.d.ts +16 -0
- package/dist/types/widgets-v2/markdown/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/markdown/index.d.ts +6 -0
- package/dist/types/widgets-v2/markdown/markdown-content.d.ts +34 -0
- package/dist/types/widgets-v2/markdown/markdown-ui.d.ts +12 -0
- package/dist/types/widgets-v2/markdown/markdown.d.ts +6 -0
- package/dist/types/widgets-v2/markdown/skeleton.d.ts +4 -0
- package/dist/types/widgets-v2/markdown/style.d.ts +61 -0
- package/dist/types/widgets-v2/markdown/types.d.ts +4 -0
- package/dist/types/widgets-v2/note/labels.d.ts +5 -0
- package/dist/types/widgets-v2/note/style.d.ts +26 -0
- package/dist/types/widgets-v2/note/widget-note.d.ts +46 -0
- package/dist/types/widgets-v2/pie/download.d.ts +17 -0
- package/dist/types/widgets-v2/pie/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/pie/index.d.ts +4 -0
- package/dist/types/widgets-v2/pie/options.d.ts +35 -0
- package/dist/types/widgets-v2/pie/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/pie/skeleton.d.ts +4 -0
- package/dist/types/widgets-v2/pie/types.d.ts +57 -0
- package/dist/types/widgets-v2/provider/widget-provider.d.ts +32 -0
- package/dist/types/widgets-v2/range/index.d.ts +4 -0
- package/dist/types/widgets-v2/range/range-ui.d.ts +27 -0
- package/dist/types/widgets-v2/range/range.d.ts +24 -0
- package/dist/types/widgets-v2/range/skeleton.d.ts +9 -0
- package/dist/types/widgets-v2/range/style.d.ts +40 -0
- package/dist/types/widgets-v2/range/types.d.ts +37 -0
- package/dist/types/widgets-v2/scatterplot/download.d.ts +16 -0
- package/dist/types/widgets-v2/scatterplot/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/scatterplot/index.d.ts +5 -0
- package/dist/types/widgets-v2/scatterplot/options.d.ts +42 -0
- package/dist/types/widgets-v2/scatterplot/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/scatterplot/skeleton.d.ts +12 -0
- package/dist/types/widgets-v2/scatterplot/transforms.d.ts +17 -0
- package/dist/types/widgets-v2/scatterplot/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/scatterplot/types.d.ts +54 -0
- package/dist/types/widgets-v2/selection-summary/labels.d.ts +6 -0
- package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +22 -0
- package/dist/types/widgets-v2/selection-summary/style.d.ts +23 -0
- package/dist/types/widgets-v2/spread/download.d.ts +15 -0
- package/dist/types/widgets-v2/spread/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/spread/index.d.ts +6 -0
- package/dist/types/widgets-v2/spread/separator.d.ts +7 -0
- package/dist/types/widgets-v2/spread/skeleton.d.ts +9 -0
- package/dist/types/widgets-v2/spread/spread-ui.d.ts +18 -0
- package/dist/types/widgets-v2/spread/spread.d.ts +5 -0
- package/dist/types/widgets-v2/spread/types.d.ts +25 -0
- package/dist/types/widgets-v2/state/labels.d.ts +7 -0
- package/dist/types/widgets-v2/state/labels.test.d.ts +1 -0
- package/dist/types/widgets-v2/state/style.d.ts +19 -0
- package/dist/types/widgets-v2/state/widget-state.d.ts +19 -0
- package/dist/types/widgets-v2/stores/index.d.ts +8 -0
- package/dist/types/widgets-v2/stores/pipeline-middleware.d.ts +5 -0
- package/dist/types/widgets-v2/stores/pipeline-middleware.test.d.ts +1 -0
- package/dist/types/widgets-v2/stores/transforms.d.ts +4 -0
- package/dist/types/widgets-v2/stores/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/stores/types.d.ts +55 -0
- package/dist/types/widgets-v2/stores/use-echart-instance.d.ts +15 -0
- package/dist/types/widgets-v2/stores/use-transform-enabled.d.ts +17 -0
- package/dist/types/widgets-v2/stores/use-transform.d.ts +12 -0
- package/dist/types/widgets-v2/stores/widget-context.d.ts +2 -0
- package/dist/types/widgets-v2/stores/widget-store-registry.d.ts +74 -0
- package/dist/types/widgets-v2/stores/widget-store-registry.test.d.ts +1 -0
- package/dist/types/widgets-v2/subheader/style.d.ts +10 -0
- package/dist/types/widgets-v2/subheader/subheader.d.ts +11 -0
- package/dist/types/widgets-v2/table/download.d.ts +18 -0
- package/dist/types/widgets-v2/table/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/table/helpers.d.ts +32 -0
- package/dist/types/widgets-v2/table/helpers.test.d.ts +1 -0
- package/dist/types/widgets-v2/table/index.d.ts +7 -0
- package/dist/types/widgets-v2/table/labels.d.ts +22 -0
- package/dist/types/widgets-v2/table/skeleton.d.ts +22 -0
- package/dist/types/widgets-v2/table/style.d.ts +40 -0
- package/dist/types/widgets-v2/table/table-ui.d.ts +44 -0
- package/dist/types/widgets-v2/table/table.d.ts +50 -0
- package/dist/types/widgets-v2/table/types.d.ts +48 -0
- package/dist/types/widgets-v2/test-utils.d.ts +52 -0
- package/dist/types/widgets-v2/timeseries/download.d.ts +17 -0
- package/dist/types/widgets-v2/timeseries/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/timeseries/index.d.ts +4 -0
- package/dist/types/widgets-v2/timeseries/options.d.ts +39 -0
- package/dist/types/widgets-v2/timeseries/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/timeseries/skeleton.d.ts +8 -0
- package/dist/types/widgets-v2/timeseries/types.d.ts +60 -0
- package/dist/types/widgets-v2/toolbox/labels.d.ts +5 -0
- package/dist/types/widgets-v2/toolbox/style.d.ts +30 -0
- package/dist/types/widgets-v2/toolbox/toolbox.d.ts +49 -0
- package/dist/types/widgets-v2/types.d.ts +25 -0
- package/dist/types/widgets-v2/utils/data-zoom-layout.d.ts +11 -0
- package/dist/types/widgets-v2/utils/index.d.ts +3 -0
- package/dist/types/widgets-v2/utils/merge-options.d.ts +12 -0
- package/dist/types/widgets-v2/utils/merge-options.test.d.ts +1 -0
- package/dist/types/widgets-v2/utils/resolve-theme-color.d.ts +18 -0
- package/dist/types/widgets-v2/utils/resolve-theme-color.test.d.ts +1 -0
- package/dist/types/widgets-v2/wrapper/index.d.ts +4 -0
- package/dist/types/widgets-v2/wrapper/labels.d.ts +6 -0
- package/dist/types/widgets-v2/wrapper/style.d.ts +111 -0
- package/dist/types/widgets-v2/wrapper/widget-actions.d.ts +22 -0
- package/dist/types/widgets-v2/wrapper/widget-content.d.ts +12 -0
- package/dist/types/widgets-v2/wrapper/widget-wrapper.d.ts +51 -0
- package/dist/use-transform-DXPN3nY7.js +110 -0
- package/dist/use-transform-DXPN3nY7.js.map +1 -0
- package/dist/use-widget-ref-Ddr_SlJJ.js +22 -0
- package/dist/use-widget-ref-Ddr_SlJJ.js.map +1 -0
- package/dist/use-widget-selector-DFl2hW0R.js +12 -0
- package/dist/use-widget-selector-DFl2hW0R.js.map +1 -0
- package/dist/{utils-idmvq0Oa.js → utils-BOhInag6.js} +95 -70
- package/dist/utils-BOhInag6.js.map +1 -0
- package/dist/widget-context-DTGO0Yta.js +13 -0
- package/dist/widget-context-DTGO0Yta.js.map +1 -0
- package/dist/widget-store-Bw5zRUGg.js +261 -0
- package/dist/widget-store-Bw5zRUGg.js.map +1 -0
- package/dist/widget-store-registry-_W4Z4xp-.js +178 -0
- package/dist/widget-store-registry-_W4Z4xp-.js.map +1 -0
- package/dist/widgets/actions.js +1120 -760
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +87 -97
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +247 -236
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +100 -99
- package/dist/widgets/echart.js.map +1 -1
- package/dist/widgets/error.js +37 -2
- package/dist/widgets/error.js.map +1 -1
- package/dist/widgets/formula.js +78 -67
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +116 -92
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/loader.js +53 -60
- package/dist/widgets/loader.js.map +1 -1
- package/dist/widgets/markdown.js +55 -53
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/no-data.js +58 -2
- package/dist/widgets/no-data.js.map +1 -1
- package/dist/widgets/note.js +121 -2
- package/dist/widgets/note.js.map +1 -1
- package/dist/widgets/pie.js +148 -112
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/range.js +147 -144
- package/dist/widgets/range.js.map +1 -1
- package/dist/widgets/scatterplot.js +52 -65
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/selection-summary.js.map +1 -1
- package/dist/widgets/skeleton-loader.js +18 -17
- package/dist/widgets/skeleton-loader.js.map +1 -1
- package/dist/widgets/spread.js +108 -90
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/stores.js +5 -2
- package/dist/widgets/stores.js.map +1 -1
- package/dist/widgets/subheader.js +29 -29
- package/dist/widgets/subheader.js.map +1 -1
- package/dist/widgets/table.js +429 -440
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +56 -69
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/toolbar-actions.js +50 -50
- package/dist/widgets/utils.js +34 -0
- package/dist/widgets/utils.js.map +1 -0
- package/dist/widgets/wrapper.js +156 -158
- package/dist/widgets/wrapper.js.map +1 -1
- package/dist/widgets-v2/actions.js +43 -0
- package/dist/widgets-v2/actions.js.map +1 -0
- package/dist/widgets-v2/bar.js +331 -0
- package/dist/widgets-v2/bar.js.map +1 -0
- package/dist/widgets-v2/category.js +105 -0
- package/dist/widgets-v2/category.js.map +1 -0
- package/dist/widgets-v2/echart.js +57 -0
- package/dist/widgets-v2/echart.js.map +1 -0
- package/dist/widgets-v2/formula.js +75 -0
- package/dist/widgets-v2/formula.js.map +1 -0
- package/dist/widgets-v2/histogram.js +354 -0
- package/dist/widgets-v2/histogram.js.map +1 -0
- package/dist/widgets-v2/markdown.js +69 -0
- package/dist/widgets-v2/markdown.js.map +1 -0
- package/dist/widgets-v2/pie.js +388 -0
- package/dist/widgets-v2/pie.js.map +1 -0
- package/dist/widgets-v2/range.js +52 -0
- package/dist/widgets-v2/range.js.map +1 -0
- package/dist/widgets-v2/scatterplot.js +412 -0
- package/dist/widgets-v2/scatterplot.js.map +1 -0
- package/dist/widgets-v2/spread.js +73 -0
- package/dist/widgets-v2/spread.js.map +1 -0
- package/dist/widgets-v2/stores.js +42 -0
- package/dist/widgets-v2/stores.js.map +1 -0
- package/dist/widgets-v2/table.js +79 -0
- package/dist/widgets-v2/table.js.map +1 -0
- package/dist/widgets-v2/timeseries.js +359 -0
- package/dist/widgets-v2/timeseries.js.map +1 -0
- package/dist/widgets-v2/utils.js +8 -0
- package/dist/widgets-v2/utils.js.map +1 -0
- package/dist/widgets-v2.js +954 -0
- package/dist/widgets-v2.js.map +1 -0
- package/package.json +84 -13
- package/src/chat/containers/chat-content.test.tsx +260 -6
- package/src/chat/containers/chat-content.tsx +137 -27
- package/src/chat/containers/chat-starter.tsx +2 -2
- package/src/chat/containers/styles.ts +16 -36
- package/src/chat/feedback/chat-tool-code-area.tsx +1 -1
- package/src/chat/feedback/chat-tool-group.tsx +1 -1
- package/src/chat/feedback/chat-tool-trace.tsx +6 -1
- package/src/chat/index.ts +1 -1
- package/src/chat/types.ts +36 -4
- package/src/components/basemaps/basemaps.tsx +20 -0
- package/src/components/geolocation-controls/geolocation-controls.tsx +11 -0
- package/src/components/lasso-tool/chip.test.tsx +176 -0
- package/src/components/lasso-tool/lasso-tool-inline.test.tsx +171 -0
- package/src/components/lasso-tool/lasso-tool-inline.tsx +17 -0
- package/src/components/lasso-tool/lasso-tool.test.tsx +198 -0
- package/src/components/lasso-tool/lasso-tool.tsx +21 -0
- package/src/components/list-data/list-data.test.tsx +73 -0
- package/src/components/list-data/list-data.tsx +16 -0
- package/src/components/measurement-tools/measurement-tools.tsx +20 -0
- package/src/components/no-data-alert/no-data-alert.test.tsx +38 -0
- package/src/components/responsive-drawer/responsive-drawer.test.tsx +68 -0
- package/src/components/smart-tooltip/smart-tooltip.tsx +17 -0
- package/src/components/tooltip/tooltip.tsx +13 -0
- package/src/components/zoom-controls/zoom-controls.tsx +16 -0
- package/src/hooks/index.ts +0 -1
- package/src/hooks/use-widget-ref.ts +10 -10
- package/src/widgets/README.md +13 -13
- package/src/widgets/actions/brush-toggle/brush-overlay.test.tsx +465 -0
- package/src/widgets/actions/brush-toggle/brush-overlay.tsx +408 -0
- package/src/widgets/actions/brush-toggle/brush-toggle.test.tsx +208 -0
- package/src/widgets/actions/brush-toggle/brush-toggle.tsx +133 -0
- package/src/widgets/actions/brush-toggle/hit-test.test.ts +65 -0
- package/src/widgets/actions/brush-toggle/hit-test.ts +45 -0
- package/src/widgets/actions/brush-toggle/style.ts +46 -0
- package/src/widgets/actions/brush-toggle/types.ts +78 -0
- package/src/widgets/actions/change-column/change-column-dnd.test.tsx +193 -0
- package/src/widgets/actions/change-column/change-column.test.tsx +1 -1
- package/src/widgets/actions/change-column/change-column.tsx +15 -15
- package/src/widgets/actions/change-column/sortable-column-item.test.tsx +124 -0
- package/src/widgets/actions/change-column/sortable-column-item.tsx +3 -1
- package/src/widgets/actions/download/download.test.tsx +1 -1
- package/src/widgets/actions/download/download.tsx +15 -3
- package/src/widgets/actions/download/exports.tsx +15 -0
- package/src/widgets/actions/fullscreen/fullscreen.tsx +20 -11
- package/src/widgets/actions/index.ts +21 -2
- package/src/widgets/actions/lock-selection/lock-selection.test.tsx +14 -0
- package/src/widgets/actions/lock-selection/lock-selection.tsx +26 -31
- package/src/widgets/actions/lock-selection/types.ts +2 -0
- package/src/widgets/actions/relative-data/relative-data.test.tsx +276 -1
- package/src/widgets/actions/relative-data/relative-data.tsx +113 -54
- package/src/widgets/actions/relative-data/types.ts +2 -0
- package/src/widgets/actions/searcher/searcher-toggle.tsx +11 -12
- package/src/widgets/actions/searcher/searcher.tsx +39 -42
- package/src/widgets/actions/stack-toggle/stack-toggle.test.tsx +4 -4
- package/src/widgets/actions/stack-toggle/stack-toggle.tsx +24 -32
- package/src/widgets/actions/zoom-toggle/zoom-toggle.test.tsx +322 -0
- package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +62 -80
- package/src/widgets/bar/config.ts +39 -34
- package/src/widgets/bar/style.ts +1 -1
- package/src/widgets/category/category-ui.tsx +41 -34
- package/src/widgets/category/components/category-bar.tsx +3 -0
- package/src/widgets/category/components/category-legend.tsx +3 -0
- package/src/widgets/category/components/category-row-multi.tsx +9 -2
- package/src/widgets/category/components/category-row-other.tsx +3 -0
- package/src/widgets/category/components/category-row-single.tsx +8 -1
- package/src/widgets/category/components/category-rows.test.tsx +213 -0
- package/src/widgets/category/config.ts +11 -0
- package/src/widgets/category/index.ts +13 -14
- package/src/widgets/category/style.ts +1 -0
- package/src/widgets/category/types.ts +1 -0
- package/src/widgets/echart/echart-ui.test.tsx +20 -16
- package/src/widgets/echart/echart-ui.tsx +18 -14
- package/src/widgets/echart/echart.tsx +19 -27
- package/src/widgets/echart/options.ts +8 -4
- package/src/widgets/echart/shared-resize-observer.ts +45 -0
- package/src/widgets/echart/types.ts +5 -1
- package/src/widgets/echart/utils.test.ts +277 -0
- package/src/widgets/echart/utils.ts +94 -21
- package/src/widgets/error/error.tsx +17 -9
- package/src/widgets/formula/components/item.tsx +3 -0
- package/src/widgets/formula/components/prefix.tsx +7 -6
- package/src/widgets/formula/components/row.tsx +7 -4
- package/src/widgets/formula/components/series.tsx +7 -6
- package/src/widgets/formula/components/suffix.tsx +7 -6
- package/src/widgets/formula/components/value.tsx +13 -18
- package/src/widgets/formula/config.test.ts +37 -0
- package/src/widgets/formula/config.ts +11 -0
- package/src/widgets/formula/formula-ui.tsx +4 -1
- package/src/widgets/histogram/config.ts +99 -24
- package/src/widgets/histogram/index.ts +6 -1
- package/src/widgets/histogram/style.ts +1 -1
- package/src/widgets/histogram/types.ts +9 -3
- package/src/widgets/loader/loader.tsx +53 -44
- package/src/widgets/loader/utils.ts +26 -3
- package/src/widgets/markdown/config.ts +10 -0
- package/src/widgets/markdown/markdown-ui.tsx +7 -0
- package/src/widgets/markdown/markdown.tsx +7 -7
- package/src/widgets/no-data/no-data.test.tsx +90 -40
- package/src/widgets/no-data/no-data.tsx +12 -13
- package/src/widgets/no-data/types.ts +5 -1
- package/src/widgets/note/note.tsx +10 -0
- package/src/widgets/pie/config.ts +102 -33
- package/src/widgets/pie/style.ts +1 -1
- package/src/widgets/range/components/range-item.test.tsx +243 -0
- package/src/widgets/range/components/range-item.tsx +25 -20
- package/src/widgets/range/config.ts +5 -0
- package/src/widgets/range/range-ui.tsx +3 -0
- package/src/widgets/scatterplot/config.ts +21 -23
- package/src/widgets/scatterplot/style.ts +1 -1
- package/src/widgets/selection-summary/selection-summary.tsx +11 -0
- package/src/widgets/skeleton-loader/skeleton-loader.tsx +12 -5
- package/src/widgets/spread/components/max-value.tsx +18 -18
- package/src/widgets/spread/components/min-value.tsx +18 -18
- package/src/widgets/spread/components/separator.tsx +3 -0
- package/src/widgets/spread/config.ts +11 -0
- package/src/widgets/spread/spread-ui.tsx +4 -1
- package/src/widgets/stores/index.ts +4 -1
- package/src/widgets/stores/types.ts +12 -18
- package/src/widgets/stores/use-widget-selector.ts +47 -0
- package/src/widgets/stores/widget-store-branches.test.ts +275 -0
- package/src/widgets/stores/widget-store-performance.test.ts +750 -0
- package/src/widgets/stores/widget-store.test.ts +213 -13
- package/src/widgets/stores/widget-store.ts +240 -65
- package/src/widgets/subheader/subheader.tsx +22 -3
- package/src/widgets/table/config.test.ts +65 -0
- package/src/widgets/table/config.ts +8 -4
- package/src/widgets/table/hooks/use-pagination.ts +39 -55
- package/src/widgets/table/hooks/use-selection.ts +31 -26
- package/src/widgets/table/hooks/use-sort.ts +33 -42
- package/src/widgets/table/index.ts +6 -4
- package/src/widgets/table/table-ui.tsx +1 -1
- package/src/widgets/table/types.ts +1 -1
- package/src/widgets/timeseries/config.ts +34 -33
- package/src/widgets/timeseries/style.ts +1 -1
- package/src/widgets/utils/chart-config/download-config.ts +22 -0
- package/src/widgets/{_shared → utils}/chart-config/index.ts +6 -0
- package/src/widgets/utils/chart-config/option-builders.test.ts +332 -0
- package/src/widgets/{_shared → utils}/chart-config/option-builders.ts +79 -13
- package/src/widgets/utils/formatter.ts +2 -0
- package/src/widgets/utils/index.ts +26 -0
- package/src/widgets/wrapper/components/actions.tsx +3 -0
- package/src/widgets/wrapper/components/options.tsx +3 -0
- package/src/widgets/wrapper/components/title.tsx +3 -0
- package/src/widgets/wrapper/wrapper-ui.tsx +26 -13
- package/src/widgets/wrapper/wrapper.tsx +18 -6
- package/src/widgets-v2/PERFORMANCE.md +189 -0
- package/src/widgets-v2/actions/brush-toggle/brush-toggle.test.tsx +180 -0
- package/src/widgets-v2/actions/brush-toggle/brush-toggle.tsx +154 -0
- package/src/widgets-v2/actions/brush-toggle/index.ts +3 -0
- package/src/widgets-v2/actions/brush-toggle/labels.ts +9 -0
- package/src/widgets-v2/actions/brush-toggle/style.ts +11 -0
- package/src/widgets-v2/actions/brush-toggle/transforms.test.ts +47 -0
- package/src/widgets-v2/actions/brush-toggle/transforms.ts +31 -0
- package/src/widgets-v2/actions/change-column/change-column-icon.tsx +14 -0
- package/src/widgets-v2/actions/change-column/change-column.test.tsx +59 -0
- package/src/widgets-v2/actions/change-column/change-column.tsx +180 -0
- package/src/widgets-v2/actions/change-column/index.ts +7 -0
- package/src/widgets-v2/actions/change-column/labels.ts +9 -0
- package/src/widgets-v2/actions/change-column/sortable-column-item.tsx +56 -0
- package/src/widgets-v2/actions/change-column/style.ts +32 -0
- package/src/widgets-v2/actions/change-column/types.ts +11 -0
- package/src/widgets-v2/actions/download/download.test.tsx +327 -0
- package/src/widgets-v2/actions/download/download.tsx +144 -0
- package/src/widgets-v2/actions/download/exports.test.tsx +198 -0
- package/src/widgets-v2/actions/download/exports.ts +115 -0
- package/src/widgets-v2/actions/download/icons.tsx +26 -0
- package/src/widgets-v2/actions/download/index.ts +13 -0
- package/src/widgets-v2/actions/download/labels.ts +16 -0
- package/src/widgets-v2/actions/download/png-item.test.tsx +72 -0
- package/src/widgets-v2/actions/download/png-item.tsx +52 -0
- package/src/widgets-v2/actions/download/style.ts +3 -0
- package/src/widgets-v2/actions/download/types.ts +32 -0
- package/src/widgets-v2/actions/fullscreen/fullscreen.test.tsx +150 -0
- package/src/widgets-v2/actions/fullscreen/fullscreen.tsx +230 -0
- package/src/widgets-v2/actions/fullscreen/index.ts +7 -0
- package/src/widgets-v2/actions/fullscreen/labels.ts +9 -0
- package/src/widgets-v2/actions/fullscreen/style.ts +59 -0
- package/src/widgets-v2/actions/fullscreen/types.ts +15 -0
- package/src/widgets-v2/actions/index.ts +82 -0
- package/src/widgets-v2/actions/lock-selection/index.ts +10 -0
- package/src/widgets-v2/actions/lock-selection/labels.ts +11 -0
- package/src/widgets-v2/actions/lock-selection/lock-selection.test.tsx +187 -0
- package/src/widgets-v2/actions/lock-selection/lock-selection.tsx +130 -0
- package/src/widgets-v2/actions/lock-selection/style.ts +11 -0
- package/src/widgets-v2/actions/lock-selection/transforms.ts +27 -0
- package/src/widgets-v2/actions/relative-data/index.ts +3 -0
- package/src/widgets-v2/actions/relative-data/labels.ts +9 -0
- package/src/widgets-v2/actions/relative-data/relative-data.test.tsx +71 -0
- package/src/widgets-v2/actions/relative-data/relative-data.tsx +107 -0
- package/src/widgets-v2/actions/relative-data/style.ts +11 -0
- package/src/widgets-v2/actions/relative-data/transforms.test.ts +151 -0
- package/src/widgets-v2/actions/relative-data/transforms.ts +70 -0
- package/src/widgets-v2/actions/searcher/filter.ts +28 -0
- package/src/widgets-v2/actions/searcher/index.ts +8 -0
- package/src/widgets-v2/actions/searcher/labels.ts +13 -0
- package/src/widgets-v2/actions/searcher/searcher-toggle.tsx +91 -0
- package/src/widgets-v2/actions/searcher/searcher.test.tsx +92 -0
- package/src/widgets-v2/actions/searcher/searcher.tsx +112 -0
- package/src/widgets-v2/actions/searcher/style.ts +15 -0
- package/src/widgets-v2/actions/stack-toggle/index.ts +3 -0
- package/src/widgets-v2/actions/stack-toggle/labels.ts +9 -0
- package/src/widgets-v2/actions/stack-toggle/stack-toggle.test.tsx +61 -0
- package/src/widgets-v2/actions/stack-toggle/stack-toggle.tsx +54 -0
- package/src/widgets-v2/actions/stack-toggle/style.ts +11 -0
- package/src/widgets-v2/actions/stack-toggle/transforms.test.ts +43 -0
- package/src/widgets-v2/actions/stack-toggle/transforms.ts +25 -0
- package/src/widgets-v2/actions/zoom-toggle/index.ts +9 -0
- package/src/widgets-v2/actions/zoom-toggle/labels.ts +9 -0
- package/src/widgets-v2/actions/zoom-toggle/style.ts +11 -0
- package/src/widgets-v2/actions/zoom-toggle/transforms.test.ts +148 -0
- package/src/widgets-v2/actions/zoom-toggle/transforms.ts +171 -0
- package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.test.tsx +107 -0
- package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.tsx +106 -0
- package/src/widgets-v2/bar/download.test.tsx +91 -0
- package/src/widgets-v2/bar/download.tsx +66 -0
- package/src/widgets-v2/bar/index.ts +10 -0
- package/src/widgets-v2/bar/options.test.ts +334 -0
- package/src/widgets-v2/bar/options.ts +332 -0
- package/src/widgets-v2/bar/skeleton.test.tsx +19 -0
- package/src/widgets-v2/bar/skeleton.tsx +69 -0
- package/src/widgets-v2/bar/types.ts +51 -0
- package/src/widgets-v2/category/category-ui.test.tsx +746 -0
- package/src/widgets-v2/category/category-ui.tsx +389 -0
- package/src/widgets-v2/category/category.relative-data.test.tsx +107 -0
- package/src/widgets-v2/category/category.stack-toggle.test.tsx +85 -0
- package/src/widgets-v2/category/category.test.tsx +305 -0
- package/src/widgets-v2/category/category.tsx +121 -0
- package/src/widgets-v2/category/components/category-bar-stacked.test.tsx +121 -0
- package/src/widgets-v2/category/components/category-bar-stacked.tsx +73 -0
- package/src/widgets-v2/category/components/category-bar.test.tsx +64 -0
- package/src/widgets-v2/category/components/category-bar.tsx +49 -0
- package/src/widgets-v2/category/components/category-legend.test.tsx +51 -0
- package/src/widgets-v2/category/components/category-legend.tsx +39 -0
- package/src/widgets-v2/category/components/category-row-multi.tsx +86 -0
- package/src/widgets-v2/category/components/category-row-other.test.tsx +28 -0
- package/src/widgets-v2/category/components/category-row-other.tsx +33 -0
- package/src/widgets-v2/category/components/category-row-single.tsx +76 -0
- package/src/widgets-v2/category/components/category-row-stacked.test.tsx +244 -0
- package/src/widgets-v2/category/components/category-row-stacked.tsx +99 -0
- package/src/widgets-v2/category/download.test.ts +71 -0
- package/src/widgets-v2/category/download.ts +54 -0
- package/src/widgets-v2/category/index.ts +32 -0
- package/src/widgets-v2/category/skeleton.test.tsx +26 -0
- package/src/widgets-v2/category/skeleton.tsx +74 -0
- package/src/widgets-v2/category/style.ts +290 -0
- package/src/widgets-v2/category/types.ts +59 -0
- package/src/widgets-v2/echart/echart-ui.test.tsx +232 -0
- package/src/widgets-v2/echart/echart-ui.tsx +184 -0
- package/src/widgets-v2/echart/echart.test.tsx +229 -0
- package/src/widgets-v2/echart/echart.tsx +199 -0
- package/src/widgets-v2/echart/index.ts +22 -0
- package/src/widgets-v2/echart/shared-resize-observer.test.ts +91 -0
- package/src/widgets-v2/echart/shared-resize-observer.ts +56 -0
- package/src/widgets-v2/echart/style.ts +8 -0
- package/src/widgets-v2/echart/use-chart-selection.test.tsx +118 -0
- package/src/widgets-v2/echart/use-chart-selection.ts +115 -0
- package/src/widgets-v2/formula/delta.tsx +61 -0
- package/src/widgets-v2/formula/download.test.tsx +65 -0
- package/src/widgets-v2/formula/download.tsx +69 -0
- package/src/widgets-v2/formula/formula-ui.test.tsx +91 -0
- package/src/widgets-v2/formula/formula-ui.tsx +66 -0
- package/src/widgets-v2/formula/formula.test.tsx +50 -0
- package/src/widgets-v2/formula/formula.tsx +34 -0
- package/src/widgets-v2/formula/index.ts +17 -0
- package/src/widgets-v2/formula/note.tsx +25 -0
- package/src/widgets-v2/formula/prefix.tsx +25 -0
- package/src/widgets-v2/formula/series.tsx +67 -0
- package/src/widgets-v2/formula/skeleton.test.tsx +21 -0
- package/src/widgets-v2/formula/skeleton.tsx +27 -0
- package/src/widgets-v2/formula/style.ts +31 -0
- package/src/widgets-v2/formula/subcomponents.test.tsx +107 -0
- package/src/widgets-v2/formula/suffix.tsx +25 -0
- package/src/widgets-v2/formula/types.ts +48 -0
- package/src/widgets-v2/formula/value.tsx +31 -0
- package/src/widgets-v2/histogram/download.test.ts +94 -0
- package/src/widgets-v2/histogram/download.ts +60 -0
- package/src/widgets-v2/histogram/index.ts +10 -0
- package/src/widgets-v2/histogram/options.test.ts +318 -0
- package/src/widgets-v2/histogram/options.ts +338 -0
- package/src/widgets-v2/histogram/skeleton.test.tsx +16 -0
- package/src/widgets-v2/histogram/skeleton.tsx +70 -0
- package/src/widgets-v2/histogram/transforms.test.ts +46 -0
- package/src/widgets-v2/histogram/transforms.ts +30 -0
- package/src/widgets-v2/histogram/types.ts +55 -0
- package/src/widgets-v2/index.ts +204 -0
- package/src/widgets-v2/markdown/download.test.ts +66 -0
- package/src/widgets-v2/markdown/download.ts +53 -0
- package/src/widgets-v2/markdown/index.ts +6 -0
- package/src/widgets-v2/markdown/markdown-content.test.tsx +155 -0
- package/src/widgets-v2/markdown/markdown-content.tsx +72 -0
- package/src/widgets-v2/markdown/markdown-ui.test.tsx +75 -0
- package/src/widgets-v2/markdown/markdown-ui.tsx +55 -0
- package/src/widgets-v2/markdown/markdown.test.tsx +39 -0
- package/src/widgets-v2/markdown/markdown.tsx +17 -0
- package/src/widgets-v2/markdown/skeleton.test.tsx +15 -0
- package/src/widgets-v2/markdown/skeleton.tsx +32 -0
- package/src/widgets-v2/markdown/style.ts +53 -0
- package/src/widgets-v2/markdown/types.ts +4 -0
- package/src/widgets-v2/note/labels.ts +9 -0
- package/src/widgets-v2/note/style.ts +26 -0
- package/src/widgets-v2/note/widget-note.test.tsx +158 -0
- package/src/widgets-v2/note/widget-note.tsx +172 -0
- package/src/widgets-v2/pie/download.test.ts +78 -0
- package/src/widgets-v2/pie/download.ts +55 -0
- package/src/widgets-v2/pie/index.ts +10 -0
- package/src/widgets-v2/pie/options.test.ts +601 -0
- package/src/widgets-v2/pie/options.ts +513 -0
- package/src/widgets-v2/pie/skeleton.test.tsx +17 -0
- package/src/widgets-v2/pie/skeleton.tsx +32 -0
- package/src/widgets-v2/pie/types.ts +62 -0
- package/src/widgets-v2/provider/widget-provider.test.tsx +119 -0
- package/src/widgets-v2/provider/widget-provider.tsx +111 -0
- package/src/widgets-v2/range/index.ts +4 -0
- package/src/widgets-v2/range/range-ui.test.tsx +136 -0
- package/src/widgets-v2/range/range-ui.tsx +278 -0
- package/src/widgets-v2/range/range.test.tsx +68 -0
- package/src/widgets-v2/range/range.tsx +52 -0
- package/src/widgets-v2/range/skeleton.test.tsx +17 -0
- package/src/widgets-v2/range/skeleton.tsx +47 -0
- package/src/widgets-v2/range/style.ts +41 -0
- package/src/widgets-v2/range/types.ts +37 -0
- package/src/widgets-v2/scatterplot/download.test.ts +71 -0
- package/src/widgets-v2/scatterplot/download.ts +54 -0
- package/src/widgets-v2/scatterplot/index.ts +11 -0
- package/src/widgets-v2/scatterplot/options.test.ts +411 -0
- package/src/widgets-v2/scatterplot/options.ts +425 -0
- package/src/widgets-v2/scatterplot/skeleton.test.tsx +17 -0
- package/src/widgets-v2/scatterplot/skeleton.tsx +84 -0
- package/src/widgets-v2/scatterplot/transforms.test.ts +97 -0
- package/src/widgets-v2/scatterplot/transforms.ts +38 -0
- package/src/widgets-v2/scatterplot/types.ts +59 -0
- package/src/widgets-v2/selection-summary/labels.ts +11 -0
- package/src/widgets-v2/selection-summary/selection-summary.test.tsx +53 -0
- package/src/widgets-v2/selection-summary/selection-summary.tsx +62 -0
- package/src/widgets-v2/selection-summary/style.ts +23 -0
- package/src/widgets-v2/spread/download.test.ts +64 -0
- package/src/widgets-v2/spread/download.ts +59 -0
- package/src/widgets-v2/spread/index.ts +6 -0
- package/src/widgets-v2/spread/separator.tsx +11 -0
- package/src/widgets-v2/spread/skeleton.test.tsx +17 -0
- package/src/widgets-v2/spread/skeleton.tsx +38 -0
- package/src/widgets-v2/spread/spread-ui.test.tsx +108 -0
- package/src/widgets-v2/spread/spread-ui.tsx +52 -0
- package/src/widgets-v2/spread/spread.test.tsx +50 -0
- package/src/widgets-v2/spread/spread.tsx +31 -0
- package/src/widgets-v2/spread/types.ts +27 -0
- package/src/widgets-v2/state/labels.test.ts +33 -0
- package/src/widgets-v2/state/labels.ts +20 -0
- package/src/widgets-v2/state/style.ts +25 -0
- package/src/widgets-v2/state/widget-state.test.tsx +294 -0
- package/src/widgets-v2/state/widget-state.tsx +184 -0
- package/src/widgets-v2/stores/index.ts +49 -0
- package/src/widgets-v2/stores/pipeline-middleware.test.ts +187 -0
- package/src/widgets-v2/stores/pipeline-middleware.ts +91 -0
- package/src/widgets-v2/stores/transforms.test.ts +162 -0
- package/src/widgets-v2/stores/transforms.ts +70 -0
- package/src/widgets-v2/stores/types.ts +64 -0
- package/src/widgets-v2/stores/use-echart-instance.test.tsx +91 -0
- package/src/widgets-v2/stores/use-echart-instance.ts +29 -0
- package/src/widgets-v2/stores/use-transform-enabled.test.tsx +127 -0
- package/src/widgets-v2/stores/use-transform-enabled.ts +25 -0
- package/src/widgets-v2/stores/use-transform.test.tsx +262 -0
- package/src/widgets-v2/stores/use-transform.ts +158 -0
- package/src/widgets-v2/stores/widget-context.test.tsx +58 -0
- package/src/widgets-v2/stores/widget-context.ts +15 -0
- package/src/widgets-v2/stores/widget-store-registry.test.ts +292 -0
- package/src/widgets-v2/stores/widget-store-registry.ts +248 -0
- package/src/widgets-v2/subheader/style.ts +12 -0
- package/src/widgets-v2/subheader/subheader.test.tsx +30 -0
- package/src/widgets-v2/subheader/subheader.tsx +16 -0
- package/src/widgets-v2/table/download.test.ts +75 -0
- package/src/widgets-v2/table/download.ts +47 -0
- package/src/widgets-v2/table/helpers.test.ts +214 -0
- package/src/widgets-v2/table/helpers.ts +136 -0
- package/src/widgets-v2/table/index.ts +23 -0
- package/src/widgets-v2/table/labels.tsx +41 -0
- package/src/widgets-v2/table/skeleton.test.tsx +26 -0
- package/src/widgets-v2/table/skeleton.tsx +65 -0
- package/src/widgets-v2/table/style.ts +43 -0
- package/src/widgets-v2/table/table-ui.test.tsx +200 -0
- package/src/widgets-v2/table/table-ui.tsx +364 -0
- package/src/widgets-v2/table/table.test.tsx +119 -0
- package/src/widgets-v2/table/table.tsx +179 -0
- package/src/widgets-v2/table/types.ts +55 -0
- package/src/widgets-v2/test-utils.ts +107 -0
- package/src/widgets-v2/timeseries/download.test.ts +95 -0
- package/src/widgets-v2/timeseries/download.ts +86 -0
- package/src/widgets-v2/timeseries/index.ts +10 -0
- package/src/widgets-v2/timeseries/options.test.ts +394 -0
- package/src/widgets-v2/timeseries/options.ts +348 -0
- package/src/widgets-v2/timeseries/skeleton.test.tsx +13 -0
- package/src/widgets-v2/timeseries/skeleton.tsx +76 -0
- package/src/widgets-v2/timeseries/types.ts +65 -0
- package/src/widgets-v2/toolbox/labels.ts +9 -0
- package/src/widgets-v2/toolbox/style.ts +33 -0
- package/src/widgets-v2/toolbox/toolbox.test.tsx +200 -0
- package/src/widgets-v2/toolbox/toolbox.tsx +309 -0
- package/src/widgets-v2/types.ts +25 -0
- package/src/widgets-v2/utils/data-zoom-layout.ts +26 -0
- package/src/widgets-v2/utils/index.ts +3 -0
- package/src/widgets-v2/utils/merge-options.test.ts +52 -0
- package/src/widgets-v2/utils/merge-options.ts +50 -0
- package/src/widgets-v2/utils/resolve-theme-color.test.ts +43 -0
- package/src/widgets-v2/utils/resolve-theme-color.ts +34 -0
- package/src/widgets-v2/wrapper/index.ts +14 -0
- package/src/widgets-v2/wrapper/labels.ts +11 -0
- package/src/widgets-v2/wrapper/style.ts +134 -0
- package/src/widgets-v2/wrapper/widget-actions.test.tsx +52 -0
- package/src/widgets-v2/wrapper/widget-actions.tsx +43 -0
- package/src/widgets-v2/wrapper/widget-content.test.tsx +27 -0
- package/src/widgets-v2/wrapper/widget-content.tsx +29 -0
- package/src/widgets-v2/wrapper/widget-wrapper.test.tsx +159 -0
- package/src/widgets-v2/wrapper/widget-wrapper.tsx +178 -0
- package/dist/error-CEkRPccv.js +0 -39
- package/dist/error-CEkRPccv.js.map +0 -1
- package/dist/index-BnyeR7Qx.js +0 -6601
- package/dist/index-BnyeR7Qx.js.map +0 -1
- package/dist/no-data-hR3KcJ-_.js +0 -60
- package/dist/no-data-hR3KcJ-_.js.map +0 -1
- package/dist/note-t51drNe0.js +0 -124
- package/dist/note-t51drNe0.js.map +0 -1
- package/dist/options-D9wflre6.js +0 -49
- package/dist/options-D9wflre6.js.map +0 -1
- package/dist/row-DTCV0Ocm.js +0 -35
- package/dist/row-DTCV0Ocm.js.map +0 -1
- package/dist/series-CYNOu2Ju.js +0 -91
- package/dist/series-CYNOu2Ju.js.map +0 -1
- package/dist/styles-CAroD5Rc.js +0 -123
- package/dist/styles-CAroD5Rc.js.map +0 -1
- package/dist/types/hooks/use-debounce.d.ts +0 -19
- package/dist/types/widgets/category/components/index.d.ts +0 -10
- package/dist/types/widgets/index.d.ts +0 -9
- package/dist/types/widgets/table/hooks/index.d.ts +0 -6
- package/dist/use-widget-ref-P-2i0MJG.js +0 -19
- package/dist/use-widget-ref-P-2i0MJG.js.map +0 -1
- package/dist/utils-idmvq0Oa.js.map +0 -1
- package/dist/widget-store-CzDt8oSK.js +0 -163
- package/dist/widget-store-CzDt8oSK.js.map +0 -1
- package/dist/widgets.js +0 -13
- package/dist/widgets.js.map +0 -1
- package/src/hooks/use-debounce.ts +0 -55
- package/src/widgets/_shared/chart-config/option-builders.test.ts +0 -40
- package/src/widgets/category/components/index.ts +0 -14
- package/src/widgets/index.ts +0 -25
- package/src/widgets/table/hooks/index.ts +0 -7
- /package/dist/types/widgets/{_shared → utils}/chart-config/config-factory.d.ts +0 -0
- /package/dist/types/widgets/{_shared → utils}/chart-config/csv-modifiers.d.ts +0 -0
- /package/dist/types/widgets/{_shared → utils}/skeleton/index.d.ts +0 -0
- /package/dist/types/widgets/{_shared → utils}/skeleton/styles.d.ts +0 -0
- /package/dist/types/{widgets/_shared/chart-config/option-builders.test.d.ts → widgets-v2/actions/brush-toggle/transforms.test.d.ts} +0 -0
- /package/src/widgets/{_shared → utils}/chart-config/config-factory.ts +0 -0
- /package/src/widgets/{_shared → utils}/chart-config/csv-modifiers.ts +0 -0
- /package/src/widgets/{_shared → utils}/skeleton/index.ts +0 -0
- /package/src/widgets/{_shared → utils}/skeleton/styles.ts +0 -0
|
@@ -1,15 +1,269 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
describe,
|
|
3
|
+
test,
|
|
4
|
+
expect,
|
|
5
|
+
vi,
|
|
6
|
+
beforeEach,
|
|
7
|
+
afterEach,
|
|
8
|
+
type MockInstance,
|
|
9
|
+
} from 'vitest'
|
|
10
|
+
import { createRef } from 'react'
|
|
11
|
+
import { act, render, screen } from '@testing-library/react'
|
|
3
12
|
import { ChatContent } from './chat-content'
|
|
13
|
+
import type { ChatContentRef } from '../types'
|
|
14
|
+
|
|
15
|
+
type IOCallback = (entries: IntersectionObserverEntry[]) => void
|
|
16
|
+
|
|
17
|
+
interface FakeObserver {
|
|
18
|
+
callback: IOCallback
|
|
19
|
+
observed: Element[]
|
|
20
|
+
disconnected: boolean
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface FakeMutationObserverInstance {
|
|
24
|
+
callback: MutationCallback
|
|
25
|
+
target: Node | null
|
|
26
|
+
disconnected: boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let observers: FakeObserver[] = []
|
|
30
|
+
let mutationObservers: FakeMutationObserverInstance[] = []
|
|
31
|
+
let scrollToSpy: MockInstance<Element['scrollTo']>
|
|
32
|
+
|
|
33
|
+
// Mutable "DOM measurements" the prototype getters read from.
|
|
34
|
+
let scrollHeightValue = 0
|
|
35
|
+
let scrollTopValue = 0
|
|
36
|
+
let clientHeightValue = 0
|
|
37
|
+
|
|
38
|
+
class FakeIntersectionObserver {
|
|
39
|
+
_obs: FakeObserver
|
|
40
|
+
constructor(cb: IOCallback) {
|
|
41
|
+
this._obs = { callback: cb, observed: [], disconnected: false }
|
|
42
|
+
observers.push(this._obs)
|
|
43
|
+
}
|
|
44
|
+
observe(el: Element) {
|
|
45
|
+
this._obs.observed.push(el)
|
|
46
|
+
}
|
|
47
|
+
unobserve() {
|
|
48
|
+
// NOOP
|
|
49
|
+
}
|
|
50
|
+
disconnect() {
|
|
51
|
+
this._obs.disconnected = true
|
|
52
|
+
}
|
|
53
|
+
takeRecords(): IntersectionObserverEntry[] {
|
|
54
|
+
return []
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
class FakeMutationObserver {
|
|
59
|
+
_inst: FakeMutationObserverInstance
|
|
60
|
+
constructor(cb: MutationCallback) {
|
|
61
|
+
this._inst = { callback: cb, target: null, disconnected: false }
|
|
62
|
+
mutationObservers.push(this._inst)
|
|
63
|
+
}
|
|
64
|
+
observe(target: Node) {
|
|
65
|
+
this._inst.target = target
|
|
66
|
+
}
|
|
67
|
+
disconnect() {
|
|
68
|
+
this._inst.disconnected = true
|
|
69
|
+
}
|
|
70
|
+
takeRecords(): MutationRecord[] {
|
|
71
|
+
return []
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The component creates the top observer first, then the bottom one — so
|
|
77
|
+
* `observers[0]` is top and `observers[1]` is bottom. Helper trips one of them.
|
|
78
|
+
*/
|
|
79
|
+
function fireIntersection(index: 0 | 1, isIntersecting: boolean) {
|
|
80
|
+
const obs = observers[index]
|
|
81
|
+
if (!obs) throw new Error(`No observer at index ${index}`)
|
|
82
|
+
act(() => {
|
|
83
|
+
obs.callback([
|
|
84
|
+
{ isIntersecting, target: obs.observed[0]! } as IntersectionObserverEntry,
|
|
85
|
+
])
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Triggers the most recent MutationObserver as if a DOM mutation happened. */
|
|
90
|
+
function fireMutation() {
|
|
91
|
+
const obs = mutationObservers.at(-1)
|
|
92
|
+
if (!obs) throw new Error('No MutationObserver registered')
|
|
93
|
+
act(() => {
|
|
94
|
+
obs.callback([], obs as unknown as MutationObserver)
|
|
95
|
+
})
|
|
96
|
+
}
|
|
4
97
|
|
|
5
98
|
describe('ChatContent', () => {
|
|
99
|
+
beforeEach(() => {
|
|
100
|
+
observers = []
|
|
101
|
+
mutationObservers = []
|
|
102
|
+
scrollHeightValue = 0
|
|
103
|
+
scrollTopValue = 0
|
|
104
|
+
clientHeightValue = 0
|
|
105
|
+
vi.stubGlobal('IntersectionObserver', FakeIntersectionObserver)
|
|
106
|
+
vi.stubGlobal('MutationObserver', FakeMutationObserver)
|
|
107
|
+
// Run rAF synchronously so MutationObserver-driven scroll checks happen
|
|
108
|
+
// inside `act`.
|
|
109
|
+
vi.stubGlobal('requestAnimationFrame', (cb: FrameRequestCallback) => {
|
|
110
|
+
cb(0)
|
|
111
|
+
return 1
|
|
112
|
+
})
|
|
113
|
+
vi.stubGlobal('cancelAnimationFrame', () => {
|
|
114
|
+
// NOOP
|
|
115
|
+
})
|
|
116
|
+
scrollToSpy = vi
|
|
117
|
+
.spyOn(Element.prototype, 'scrollTo')
|
|
118
|
+
.mockImplementation(() => {
|
|
119
|
+
// NOOP
|
|
120
|
+
})
|
|
121
|
+
vi.spyOn(HTMLElement.prototype, 'scrollHeight', 'get').mockImplementation(
|
|
122
|
+
() => scrollHeightValue,
|
|
123
|
+
)
|
|
124
|
+
vi.spyOn(HTMLElement.prototype, 'scrollTop', 'get').mockImplementation(
|
|
125
|
+
() => scrollTopValue,
|
|
126
|
+
)
|
|
127
|
+
vi.spyOn(HTMLElement.prototype, 'clientHeight', 'get').mockImplementation(
|
|
128
|
+
() => clientHeightValue,
|
|
129
|
+
)
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
afterEach(() => {
|
|
133
|
+
vi.unstubAllGlobals()
|
|
134
|
+
vi.restoreAllMocks()
|
|
135
|
+
})
|
|
136
|
+
|
|
6
137
|
test('renders children', () => {
|
|
7
138
|
render(<ChatContent>Scrollable content</ChatContent>)
|
|
8
139
|
expect(screen.getByText('Scrollable content')).toBeTruthy()
|
|
9
140
|
})
|
|
10
141
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
142
|
+
test('observes the top and bottom sentinels', () => {
|
|
143
|
+
render(<ChatContent>content</ChatContent>)
|
|
144
|
+
expect(observers).toHaveLength(2)
|
|
145
|
+
expect(observers[0]?.observed).toHaveLength(1)
|
|
146
|
+
expect(observers[1]?.observed).toHaveLength(1)
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
test('ref starts with isAtTop and isAtBottom both true', () => {
|
|
150
|
+
const ref = createRef<ChatContentRef>()
|
|
151
|
+
render(<ChatContent ref={ref}>content</ChatContent>)
|
|
152
|
+
expect(ref.current?.isAtTop).toBe(true)
|
|
153
|
+
expect(ref.current?.isAtBottom).toBe(true)
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
test('isAtBottom flips when the bottom sentinel leaves the viewport', () => {
|
|
157
|
+
const ref = createRef<ChatContentRef>()
|
|
158
|
+
render(<ChatContent ref={ref}>content</ChatContent>)
|
|
159
|
+
fireIntersection(1, false)
|
|
160
|
+
expect(ref.current?.isAtBottom).toBe(false)
|
|
161
|
+
fireIntersection(1, true)
|
|
162
|
+
expect(ref.current?.isAtBottom).toBe(true)
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
test('isAtTop flips when the top sentinel leaves the viewport', () => {
|
|
166
|
+
const ref = createRef<ChatContentRef>()
|
|
167
|
+
render(<ChatContent ref={ref}>content</ChatContent>)
|
|
168
|
+
fireIntersection(0, false)
|
|
169
|
+
expect(ref.current?.isAtTop).toBe(false)
|
|
170
|
+
fireIntersection(0, true)
|
|
171
|
+
expect(ref.current?.isAtTop).toBe(true)
|
|
172
|
+
})
|
|
173
|
+
|
|
174
|
+
test('scrollToBottom() scrolls to scrollHeight with smooth behaviour', () => {
|
|
175
|
+
scrollHeightValue = 1000
|
|
176
|
+
const ref = createRef<ChatContentRef>()
|
|
177
|
+
render(<ChatContent ref={ref}>content</ChatContent>)
|
|
178
|
+
act(() => ref.current?.scrollToBottom())
|
|
179
|
+
expect(scrollToSpy).toHaveBeenCalledWith({
|
|
180
|
+
top: 1000,
|
|
181
|
+
behavior: 'smooth',
|
|
182
|
+
})
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
test('scrollToTop() scrolls the container to top 0', () => {
|
|
186
|
+
const ref = createRef<ChatContentRef>()
|
|
187
|
+
render(<ChatContent ref={ref}>content</ChatContent>)
|
|
188
|
+
act(() => ref.current?.scrollToTop())
|
|
189
|
+
expect(scrollToSpy).toHaveBeenCalledWith({
|
|
190
|
+
top: 0,
|
|
191
|
+
behavior: 'smooth',
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
test('clicking the jump-to-latest FAB scrolls to the bottom', () => {
|
|
196
|
+
render(<ChatContent>content</ChatContent>)
|
|
197
|
+
fireIntersection(1, false) // not at bottom anymore
|
|
198
|
+
const fab = screen.getByLabelText('Jump to latest')
|
|
199
|
+
act(() => fab.click())
|
|
200
|
+
expect(scrollToSpy).toHaveBeenCalled()
|
|
201
|
+
})
|
|
202
|
+
|
|
203
|
+
test('uses custom jumpToLatest label', () => {
|
|
204
|
+
render(
|
|
205
|
+
<ChatContent labels={{ jumpToLatest: 'Ir al final' }}>x</ChatContent>,
|
|
206
|
+
)
|
|
207
|
+
expect(screen.getByLabelText('Ir al final')).toBeTruthy()
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
test('disconnects observers on unmount', () => {
|
|
211
|
+
const { unmount } = render(<ChatContent>content</ChatContent>)
|
|
212
|
+
unmount()
|
|
213
|
+
expect(observers[0]?.disconnected).toBe(true)
|
|
214
|
+
expect(observers[1]?.disconnected).toBe(true)
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
describe('autoScroll', () => {
|
|
218
|
+
test('attaches a MutationObserver by default', () => {
|
|
219
|
+
render(<ChatContent>content</ChatContent>)
|
|
220
|
+
expect(mutationObservers).toHaveLength(1)
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
test('does not attach a MutationObserver when autoScroll={false}', () => {
|
|
224
|
+
render(<ChatContent autoScroll={false}>content</ChatContent>)
|
|
225
|
+
expect(mutationObservers).toHaveLength(0)
|
|
226
|
+
})
|
|
227
|
+
|
|
228
|
+
test('scrolls to the new bottom when content grows and the user is at the bottom', () => {
|
|
229
|
+
// At-bottom: scrollHeight - scrollTop - clientHeight = 0
|
|
230
|
+
scrollHeightValue = 1000
|
|
231
|
+
clientHeightValue = 500
|
|
232
|
+
scrollTopValue = 500
|
|
233
|
+
|
|
234
|
+
render(<ChatContent autoScroll>content</ChatContent>)
|
|
235
|
+
expect(mutationObservers).toHaveLength(1)
|
|
236
|
+
|
|
237
|
+
// Content grows by 200px while the user is still at the bottom.
|
|
238
|
+
scrollHeightValue = 1200
|
|
239
|
+
fireMutation()
|
|
240
|
+
|
|
241
|
+
expect(scrollToSpy).toHaveBeenCalledWith({
|
|
242
|
+
top: 1200,
|
|
243
|
+
behavior: 'smooth',
|
|
244
|
+
})
|
|
245
|
+
})
|
|
246
|
+
|
|
247
|
+
test('does NOT scroll when the user has scrolled up to read history', () => {
|
|
248
|
+
// 400px from the bottom: 1000 - 100 - 500 = 400 (well past the 32px slack)
|
|
249
|
+
scrollHeightValue = 1000
|
|
250
|
+
clientHeightValue = 500
|
|
251
|
+
scrollTopValue = 100
|
|
252
|
+
|
|
253
|
+
render(<ChatContent autoScroll>content</ChatContent>)
|
|
254
|
+
|
|
255
|
+
// Content grows by 200px — distance-from-bottom is now 600, growth is
|
|
256
|
+
// 200, so 600 > 200 + 32 → leave the user alone.
|
|
257
|
+
scrollHeightValue = 1200
|
|
258
|
+
fireMutation()
|
|
259
|
+
|
|
260
|
+
expect(scrollToSpy).not.toHaveBeenCalled()
|
|
261
|
+
})
|
|
262
|
+
|
|
263
|
+
test('disconnects the MutationObserver on unmount', () => {
|
|
264
|
+
const { unmount } = render(<ChatContent autoScroll>content</ChatContent>)
|
|
265
|
+
unmount()
|
|
266
|
+
expect(mutationObservers[0]?.disconnected).toBe(true)
|
|
267
|
+
})
|
|
268
|
+
})
|
|
15
269
|
})
|
|
@@ -1,32 +1,142 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useEffect,
|
|
4
|
+
useImperativeHandle,
|
|
5
|
+
useRef,
|
|
6
|
+
useState,
|
|
7
|
+
} from 'react'
|
|
2
8
|
import { Box, Fab } from '@mui/material'
|
|
3
9
|
import { KeyboardArrowDown } from '@mui/icons-material'
|
|
4
|
-
import type { ChatContentProps } from '../types'
|
|
10
|
+
import type { ChatContentProps, ChatContentRef } from '../types'
|
|
5
11
|
import { styles } from './styles'
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
/** Slack in px for treating the user as "at the bottom" when content grows. */
|
|
14
|
+
const AUTO_SCROLL_THRESHOLD = 32
|
|
15
|
+
|
|
16
|
+
export const ChatContent = forwardRef<ChatContentRef, ChatContentProps>(
|
|
17
|
+
function ChatContent({ children, autoScroll = true, labels = {}, sx }, ref) {
|
|
18
|
+
const scrollRef = useRef<HTMLDivElement>(null)
|
|
19
|
+
const topSentinelRef = useRef<HTMLDivElement>(null)
|
|
20
|
+
const bottomSentinelRef = useRef<HTMLDivElement>(null)
|
|
21
|
+
|
|
22
|
+
const [isAtTop, setIsAtTop] = useState(true)
|
|
23
|
+
const [isAtBottom, setIsAtBottom] = useState(true)
|
|
24
|
+
|
|
25
|
+
const scrollToBottom = () => {
|
|
26
|
+
scrollRef.current?.scrollTo({
|
|
27
|
+
top: scrollRef.current.scrollHeight,
|
|
28
|
+
behavior: 'smooth',
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const scrollToTop = () => {
|
|
33
|
+
scrollRef.current?.scrollTo({ top: 0, behavior: 'smooth' })
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
useImperativeHandle(
|
|
37
|
+
ref,
|
|
38
|
+
() => ({ scrollToBottom, scrollToTop, isAtBottom, isAtTop }),
|
|
39
|
+
[isAtBottom, isAtTop],
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
const root = scrollRef.current
|
|
44
|
+
const topEl = topSentinelRef.current
|
|
45
|
+
const bottomEl = bottomSentinelRef.current
|
|
46
|
+
if (!root || !topEl || !bottomEl) return
|
|
47
|
+
|
|
48
|
+
const topObserver = new IntersectionObserver(
|
|
49
|
+
([entry]) => setIsAtTop(entry?.isIntersecting ?? true),
|
|
50
|
+
{ root },
|
|
51
|
+
)
|
|
52
|
+
const bottomObserver = new IntersectionObserver(
|
|
53
|
+
([entry]) => setIsAtBottom(entry?.isIntersecting ?? true),
|
|
54
|
+
{ root },
|
|
55
|
+
)
|
|
56
|
+
topObserver.observe(topEl)
|
|
57
|
+
bottomObserver.observe(bottomEl)
|
|
58
|
+
return () => {
|
|
59
|
+
topObserver.disconnect()
|
|
60
|
+
bottomObserver.disconnect()
|
|
61
|
+
}
|
|
62
|
+
}, [])
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (!autoScroll) return
|
|
66
|
+
const root = scrollRef.current
|
|
67
|
+
if (!root) return
|
|
68
|
+
|
|
69
|
+
// We can't watch `children` to detect new content: tool traces and
|
|
70
|
+
// `useTypewriter` live inside child components and update via local
|
|
71
|
+
// state, so they mutate the DOM without re-rendering `ChatContent`.
|
|
72
|
+
// MutationObserver picks up every DOM change regardless of source.
|
|
73
|
+
let prevScrollHeight = root.scrollHeight
|
|
74
|
+
let rafId: number | null = null
|
|
75
|
+
|
|
76
|
+
const check = () => {
|
|
77
|
+
rafId = null
|
|
78
|
+
const newScrollHeight = root.scrollHeight
|
|
79
|
+
if (newScrollHeight > prevScrollHeight) {
|
|
80
|
+
const growth = newScrollHeight - prevScrollHeight
|
|
81
|
+
// If the distance from the bottom doesn't exceed the amount the
|
|
82
|
+
// content just grew (plus a small slack), the user was at the
|
|
83
|
+
// bottom *before* the growth — scroll them to the new bottom.
|
|
84
|
+
// Otherwise they've scrolled up to read history and we leave them
|
|
85
|
+
// alone.
|
|
86
|
+
const distanceFromBottom =
|
|
87
|
+
newScrollHeight - root.scrollTop - root.clientHeight
|
|
88
|
+
if (distanceFromBottom <= growth + AUTO_SCROLL_THRESHOLD) {
|
|
89
|
+
root.scrollTo({ top: newScrollHeight, behavior: 'smooth' })
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
prevScrollHeight = newScrollHeight
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const mo = new MutationObserver(() => {
|
|
96
|
+
rafId ??= requestAnimationFrame(check)
|
|
97
|
+
})
|
|
98
|
+
mo.observe(root, {
|
|
99
|
+
childList: true,
|
|
100
|
+
subtree: true,
|
|
101
|
+
characterData: true,
|
|
102
|
+
})
|
|
103
|
+
return () => {
|
|
104
|
+
mo.disconnect()
|
|
105
|
+
if (rafId !== null) cancelAnimationFrame(rafId)
|
|
106
|
+
}
|
|
107
|
+
}, [autoScroll])
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<Box
|
|
111
|
+
ref={scrollRef}
|
|
112
|
+
sx={{
|
|
113
|
+
...styles.content,
|
|
114
|
+
borderTopColor: ({ palette }) =>
|
|
115
|
+
isAtTop ? 'transparent' : palette.divider,
|
|
116
|
+
borderBottomColor: ({ palette }) =>
|
|
117
|
+
isAtBottom ? 'transparent' : palette.divider,
|
|
118
|
+
...sx,
|
|
119
|
+
}}
|
|
120
|
+
>
|
|
121
|
+
<Box ref={topSentinelRef} sx={styles.sentinel} aria-hidden />
|
|
122
|
+
{children}
|
|
123
|
+
<Box ref={bottomSentinelRef} sx={styles.sentinel} aria-hidden />
|
|
124
|
+
<Box sx={styles.jumpToLatestWrapper}>
|
|
125
|
+
<Fab
|
|
126
|
+
size='small'
|
|
127
|
+
onClick={scrollToBottom}
|
|
128
|
+
aria-label={labels.jumpToLatest ?? 'Jump to latest'}
|
|
129
|
+
sx={{
|
|
130
|
+
...styles.jumpToLatest,
|
|
131
|
+
opacity: isAtBottom ? 0 : 1,
|
|
132
|
+
pointerEvents: isAtBottom ? 'none' : 'auto',
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
<KeyboardArrowDown />
|
|
136
|
+
</Fab>
|
|
137
|
+
</Box>
|
|
29
138
|
</Box>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
139
|
+
)
|
|
140
|
+
},
|
|
141
|
+
)
|
|
142
|
+
ChatContent.displayName = 'ChatContent'
|
|
@@ -61,9 +61,9 @@ export function ChatStarter({
|
|
|
61
61
|
...(items.length > 2 ? styles.starterItemsTwoCol : undefined),
|
|
62
62
|
}}
|
|
63
63
|
>
|
|
64
|
-
{fullItems.map((item) => (
|
|
64
|
+
{fullItems.map((item, i) => (
|
|
65
65
|
<ChatSuggestionButton
|
|
66
|
-
key={
|
|
66
|
+
key={i}
|
|
67
67
|
label={item.label}
|
|
68
68
|
onClick={() => onSelect?.(item.label)}
|
|
69
69
|
color={item.color}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import type { SxProps, Theme } from '@mui/material'
|
|
2
|
-
import { keyframes } from '@mui/material/styles'
|
|
3
2
|
import { CHAT_MAX_WIDTH } from '../const'
|
|
4
3
|
|
|
5
|
-
const scrollBorders = keyframes`
|
|
6
|
-
0% { border-top-color: transparent; border-bottom-color: var(--chat-border-color) }
|
|
7
|
-
0.1% { border-top-color: var(--chat-border-color); border-bottom-color: var(--chat-border-color) }
|
|
8
|
-
99.9% { border-top-color: var(--chat-border-color); border-bottom-color: var(--chat-border-color) }
|
|
9
|
-
100% { border-top-color: var(--chat-border-color); border-bottom-color: transparent }
|
|
10
|
-
`
|
|
11
|
-
|
|
12
|
-
const showFab = keyframes`
|
|
13
|
-
0% { opacity: 1; pointer-events: auto }
|
|
14
|
-
95% { opacity: 1; pointer-events: auto }
|
|
15
|
-
100% { opacity: 0; pointer-events: none }
|
|
16
|
-
`
|
|
17
|
-
|
|
18
4
|
export const styles = {
|
|
19
5
|
header: {
|
|
20
6
|
display: 'flex',
|
|
@@ -45,12 +31,13 @@ export const styles = {
|
|
|
45
31
|
footer: {
|
|
46
32
|
maxWidth: CHAT_MAX_WIDTH,
|
|
47
33
|
margin: '0 auto',
|
|
48
|
-
'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
34
|
+
'&.MuiFilledInput-root.MuiInputBase-multiline.MuiInputBase-sizeSmall textarea':
|
|
35
|
+
{
|
|
36
|
+
resize: 'none',
|
|
37
|
+
maxHeight: '10em',
|
|
38
|
+
overflowY: 'auto !important',
|
|
39
|
+
paddingRight: ({ spacing }) => spacing(5),
|
|
40
|
+
},
|
|
54
41
|
},
|
|
55
42
|
footerCaption: {
|
|
56
43
|
textAlign: 'center',
|
|
@@ -68,13 +55,14 @@ export const styles = {
|
|
|
68
55
|
px: 2,
|
|
69
56
|
display: 'flex',
|
|
70
57
|
flexDirection: 'column',
|
|
71
|
-
'
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
58
|
+
borderTopWidth: '1px',
|
|
59
|
+
borderTopStyle: 'solid',
|
|
60
|
+
borderBottomWidth: '1px',
|
|
61
|
+
borderBottomStyle: 'solid',
|
|
62
|
+
},
|
|
63
|
+
sentinel: {
|
|
64
|
+
height: '1px',
|
|
65
|
+
flexShrink: 0,
|
|
78
66
|
},
|
|
79
67
|
jumpToLatestWrapper: {
|
|
80
68
|
position: 'sticky',
|
|
@@ -85,15 +73,7 @@ export const styles = {
|
|
|
85
73
|
zIndex: 1,
|
|
86
74
|
},
|
|
87
75
|
jumpToLatest: {
|
|
88
|
-
|
|
89
|
-
pointerEvents: 'none',
|
|
90
|
-
'@supports (animation-timeline: scroll())': {
|
|
91
|
-
animation: `${showFab} linear both`,
|
|
92
|
-
animationTimeline: 'scroll(nearest)',
|
|
93
|
-
},
|
|
94
|
-
'@supports not (animation-timeline: scroll())': {
|
|
95
|
-
display: 'none',
|
|
96
|
-
},
|
|
76
|
+
transition: 'opacity 0.2s',
|
|
97
77
|
},
|
|
98
78
|
starter: {
|
|
99
79
|
display: 'flex',
|
|
@@ -12,7 +12,7 @@ export function ChatToolCodeArea({
|
|
|
12
12
|
isError = false,
|
|
13
13
|
labels = {},
|
|
14
14
|
sx,
|
|
15
|
-
}: ChatToolCodeAreaProps
|
|
15
|
+
}: ChatToolCodeAreaProps) {
|
|
16
16
|
const preRef = useRef<HTMLPreElement>(null)
|
|
17
17
|
const [isOverflowing, setIsOverflowing] = useState(false)
|
|
18
18
|
const [dialogOpen, setDialogOpen] = useState(false)
|
|
@@ -159,7 +159,12 @@ export function ChatToolTrace({
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
return (
|
|
162
|
-
<Box
|
|
162
|
+
<Box
|
|
163
|
+
width='100%'
|
|
164
|
+
sx={sx}
|
|
165
|
+
data-tool={tool.name}
|
|
166
|
+
className={`PsChat--tool-trace`}
|
|
167
|
+
>
|
|
163
168
|
<Button
|
|
164
169
|
size='small'
|
|
165
170
|
variant='text'
|
package/src/chat/index.ts
CHANGED
|
@@ -9,11 +9,11 @@ export type {
|
|
|
9
9
|
ChatThinkingProps,
|
|
10
10
|
ChatLoaderProps,
|
|
11
11
|
ChatContentProps,
|
|
12
|
+
ChatContentRef,
|
|
12
13
|
ChatHeaderProps,
|
|
13
14
|
ChatFooterProps,
|
|
14
15
|
ChatStarterItem,
|
|
15
16
|
ChatStarterProps,
|
|
16
|
-
ChatActionsContainerProps,
|
|
17
17
|
ChatRatingActionProps,
|
|
18
18
|
ChatToolItem,
|
|
19
19
|
ChatToolTraceProps,
|
package/src/chat/types.ts
CHANGED
|
@@ -53,11 +53,34 @@ export interface ChatLoaderProps extends ChatSxProps {
|
|
|
53
53
|
// === Layout props ===
|
|
54
54
|
export interface ChatContentProps extends ChatSxProps {
|
|
55
55
|
children: ReactNode
|
|
56
|
+
/**
|
|
57
|
+
* Smooth-scrolls to the bottom whenever new content is added — but only if
|
|
58
|
+
* the user was already at (or near) the bottom. Readers who scrolled up to
|
|
59
|
+
* revisit older messages are left alone. Defaults to `true`; pass `false`
|
|
60
|
+
* to opt out and manage scroll yourself via the ref.
|
|
61
|
+
*/
|
|
62
|
+
autoScroll?: boolean
|
|
56
63
|
labels?: {
|
|
57
64
|
jumpToLatest?: string
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Imperative handle exposed by `ChatContent` via `ref`. Use it to drive scroll
|
|
70
|
+
* from the parent — for example, calling `scrollToBottom()` when a new agent
|
|
71
|
+
* message arrives.
|
|
72
|
+
*/
|
|
73
|
+
export interface ChatContentRef {
|
|
74
|
+
/** Smooth-scrolls the content area to the bottom. */
|
|
75
|
+
scrollToBottom: () => void
|
|
76
|
+
/** Smooth-scrolls the content area to the top. */
|
|
77
|
+
scrollToTop: () => void
|
|
78
|
+
/** `true` when the content area is scrolled to (or near) its bottom edge. */
|
|
79
|
+
isAtBottom: boolean
|
|
80
|
+
/** `true` when the content area is scrolled to (or near) its top edge. */
|
|
81
|
+
isAtTop: boolean
|
|
82
|
+
}
|
|
83
|
+
|
|
61
84
|
// === Container props ===
|
|
62
85
|
export interface ChatHeaderProps extends ChatSxProps {
|
|
63
86
|
leftSlot?: ReactNode
|
|
@@ -67,17 +90,28 @@ export interface ChatHeaderProps extends ChatSxProps {
|
|
|
67
90
|
}
|
|
68
91
|
|
|
69
92
|
export interface ChatFooterProps extends ChatSxProps {
|
|
93
|
+
/** Current value of the chat message area. */
|
|
70
94
|
value: string
|
|
95
|
+
/** Called with the new textarea value on every keystroke. */
|
|
71
96
|
onChange: (value: string) => void
|
|
97
|
+
/** Called when the send button is clicked or Enter is pressed (without Shift). */
|
|
72
98
|
onSend: () => void
|
|
99
|
+
/** Called when the stop button is clicked. Only shown while `isGenerating` is true. */
|
|
73
100
|
onStop?: () => void
|
|
101
|
+
/** When true, swaps the send button for a stop button and disables the textarea. */
|
|
74
102
|
isGenerating?: boolean
|
|
103
|
+
/** Disables the textarea and both send/stop buttons. */
|
|
75
104
|
disabled?: boolean
|
|
105
|
+
/** Placeholder text for the textarea. Defaults to `'Type a message...'`. */
|
|
76
106
|
placeholder?: string
|
|
107
|
+
/** Accessible labels for the send and stop buttons (used as `aria-label`). */
|
|
77
108
|
labels?: {
|
|
109
|
+
/** Defaults to `'Send'`. */
|
|
78
110
|
send?: string
|
|
111
|
+
/** Defaults to `'Stop'`. */
|
|
79
112
|
stop?: string
|
|
80
113
|
}
|
|
114
|
+
/** Helper text rendered under the input. Defaults to an AI disclaimer; pass `null` to hide. */
|
|
81
115
|
caption?: ReactNode
|
|
82
116
|
}
|
|
83
117
|
|
|
@@ -96,10 +130,6 @@ export interface ChatStarterProps extends ChatSxProps {
|
|
|
96
130
|
onSelect?: (prompt: string) => void
|
|
97
131
|
}
|
|
98
132
|
|
|
99
|
-
export interface ChatActionsContainerProps extends ChatSxProps {
|
|
100
|
-
children: ReactNode
|
|
101
|
-
}
|
|
102
|
-
|
|
103
133
|
export interface ChatRatingActionProps {
|
|
104
134
|
onRatingChange?: (rating: 'up' | 'down' | null) => void
|
|
105
135
|
rating?: 'up' | 'down' | null
|
|
@@ -152,6 +182,8 @@ export interface ChatToolCodeAreaProps extends ChatSxProps {
|
|
|
152
182
|
content: string
|
|
153
183
|
/** Label for the full view dialog title */
|
|
154
184
|
title?: string
|
|
185
|
+
/** Render with error styling (red left border, tinted background) */
|
|
186
|
+
isError?: boolean
|
|
155
187
|
labels?: {
|
|
156
188
|
fullView?: string
|
|
157
189
|
}
|