impact-nova 3.0.0-alpha.2 → 3.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/components/data/ag-grid-react/ag-grid-list.d.ts +3 -1
- package/dist/components/data/ag-grid-react/ag-grid-list.demo-board.d.ts +46 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.js +9 -8
- package/dist/components/data/ag-grid-react/ag-grid-list.key-attributes.d.ts +1 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +65 -3
- package/dist/components/data/ag-grid-react/build-list-drag-column-defs.d.ts +8 -0
- package/dist/components/data/ag-grid-react/build-list-drag-column-defs.js +28 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.d.ts +2 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.js +15 -14
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.d.ts +10 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.js +17 -0
- package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.d.ts +18 -0
- package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.js +32 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +71 -46
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +48 -45
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +45 -7
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +70 -58
- package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +88 -76
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +31 -33
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +18 -17
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +5 -11
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +127 -51
- package/dist/components/data/ag-grid-react/editable-utils.d.ts +9 -1
- package/dist/components/data/ag-grid-react/editable-utils.js +46 -41
- package/dist/components/data/ag-grid-react/headers/custom-header.js +110 -108
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +203 -199
- package/dist/components/data/ag-grid-react/index.d.ts +6 -1
- package/dist/components/data/ag-grid-react/index.js +316 -248
- package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +34 -0
- package/dist/components/data/ag-grid-react/list-drag-grid-options.js +110 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.d.ts +4 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.js +14 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.d.ts +20 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.js +42 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.d.ts +6 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.js +7 -0
- package/dist/components/data/ag-grid-react/list-row-move.d.ts +84 -0
- package/dist/components/data/ag-grid-react/list-row-move.js +74 -0
- package/dist/components/data/ag-grid-react/numeric-column-header-alignment.d.ts +9 -0
- package/dist/components/data/ag-grid-react/numeric-column-header-alignment.js +67 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.d.ts +10 -2
- package/dist/components/data/ag-grid-react/process-backend-columndefs.js +84 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +67 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +162 -0
- package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +20 -0
- package/dist/components/data/ag-grid-react/use-list-drag-preview.js +148 -0
- package/dist/components/data/ag-grid-react/use-list-find.d.ts +36 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +46 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +92 -0
- package/dist/components/data/data-table/build-column-tree-from-grid.js +15 -15
- package/dist/components/data/data-table/column-picker-authority.js +9 -9
- package/dist/components/data/data-table/data-table-column-apply.js +30 -29
- package/dist/components/data/data-table/data-table-column-tree-cache.js +62 -60
- package/dist/components/data/data-table/data-table-list-header.d.ts +7 -0
- package/dist/components/data/data-table/data-table-list-header.js +31 -0
- package/dist/components/data/data-table/data-table-overlay.d.ts +6 -0
- package/dist/components/data/data-table/data-table-overlay.js +18 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +3 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.js +24 -4
- package/dist/components/data/data-table/data-table.js +35 -34
- package/dist/components/data/data-table/data-table.types.d.ts +13 -2
- package/dist/components/data/data-table/index.d.ts +10 -0
- package/dist/components/data/data-table/index.js +64 -52
- package/dist/components/data/data-table/use-data-table-viewport.d.ts +10 -0
- package/dist/components/data/data-table/use-data-table-viewport.js +31 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/expandable-list-item/index.d.ts +2 -0
- package/dist/components/data/expandable-list-item/index.js +20 -16
- package/dist/components/data/expandable-list-item/product-card-hero.d.ts +15 -0
- package/dist/components/data/expandable-list-item/product-card-iris-insight-trigger.d.ts +8 -0
- package/dist/components/data/expandable-list-item/product-card-iris-insight-trigger.js +41 -0
- package/dist/components/data/expandable-list-item/product-card-metrics-toggle.d.ts +13 -0
- package/dist/components/data/expandable-list-item/product-card-metrics-toggle.js +27 -0
- package/dist/components/data/expandable-list-item/sku-picker-chrome.d.ts +40 -0
- package/dist/components/data/expandable-list-item/sku-picker-chrome.js +150 -0
- package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +2 -1
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +5 -4
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts +3 -2
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.d.ts +2 -0
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.js +16 -0
- package/dist/components/data/scenario-comparison/index.d.ts +3 -0
- package/dist/components/data/scenario-comparison/index.js +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.d.ts +12 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.js +172 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.d.ts +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.js +64 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.d.ts +5 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.js +127 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.types.d.ts +56 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.d.ts +7 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.js +29 -0
- package/dist/components/data-display/badge/index.d.ts +2 -0
- package/dist/components/data-display/badge/index.js +4 -2
- package/dist/components/data-display/badge/trophy-icon.d.ts +6 -0
- package/dist/components/data-display/badge/trophy-icon.js +28 -0
- package/dist/components/data-display/chart/chart-scatter3d.d.ts +39 -0
- package/dist/components/data-display/chart/chart-scatter3d.js +180 -0
- package/dist/components/data-display/chart/chart.js +125 -112
- package/dist/components/data-display/chart/chart.utils.js +122 -92
- package/dist/components/data-display/stereo-scatter/index.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/index.js +10 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.d.ts +41 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.js +178 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.d.ts +14 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.js +29 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.d.ts +23 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.js +80 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.d.ts +120 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.js +519 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.d.ts +64 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.js +129 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.d.ts +37 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.js +71 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.d.ts +33 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.d.ts +4 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.js +75 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.js +149 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.js +93 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.js +62 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.d.ts +3 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.js +41 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.d.ts +12 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.js +107 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.stories-data.d.ts +11 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.types.d.ts +69 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.js +42 -0
- package/dist/components/feedback/find-bar/collect-find-matches.d.ts +35 -0
- package/dist/components/feedback/find-bar/collect-find-matches.js +68 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.d.ts +5 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.js +27 -0
- package/dist/components/feedback/find-bar/find-bar.d.ts +7 -0
- package/dist/components/feedback/find-bar/find-bar.js +266 -0
- package/dist/components/feedback/find-bar/find-bar.types.d.ts +32 -0
- package/dist/components/feedback/find-bar/index.d.ts +4 -0
- package/dist/components/feedback/find-bar/index.js +11 -0
- package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +6 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.js +22 -17
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +44 -36
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.d.ts +5 -0
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.js +73 -0
- package/dist/components/flows/iris-chat/IrisChatHeaderWindowSizeButton.d.ts +5 -0
- package/dist/components/flows/iris-chat/IrisChatHeaderWindowSizeButton.js +49 -0
- package/dist/components/flows/iris-chat/IrisChatSnapTile.d.ts +8 -0
- package/dist/components/flows/iris-chat/IrisChatSnapTile.js +30 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.d.ts +3 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.js +25 -0
- package/dist/components/flows/iris-chat/IrisChatWindowSnapMenu.d.ts +4 -0
- package/dist/components/flows/iris-chat/IrisChatWindowSnapMenu.js +113 -0
- package/dist/components/flows/iris-chat/index.d.ts +3 -1
- package/dist/components/flows/iris-chat/index.js +58 -53
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +46 -36
- package/dist/components/flows/iris-chat/iris-chat-chrome.d.ts +39 -0
- package/dist/components/flows/iris-chat/iris-chat-chrome.js +311 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.js +21 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.js +291 -234
- package/dist/components/flows/iris-chat/iris-chat-context.d.ts +16 -0
- package/dist/components/flows/iris-chat/iris-chat-context.js +14 -10
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.js +16 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.d.ts +32 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.js +88 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +2 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +46 -20
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.d.ts +11 -0
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.js +35 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +82 -42
- package/dist/components/flows/iris-chat/iris-chat-menu.js +149 -117
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.d.ts +7 -0
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.js +83 -0
- package/dist/components/flows/iris-chat/iris-chat-speech.d.ts +52 -0
- package/dist/components/flows/iris-chat/iris-chat-speech.js +121 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +277 -220
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.d.ts +33 -0
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.js +37 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.js +15 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.js +113 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.d.ts +6 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.js +50 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.d.ts +8 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.js +37 -0
- package/dist/components/flows/iris-chat/iris-chat.d.ts +3 -39
- package/dist/components/flows/iris-chat/iris-chat.js +22 -330
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +20 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +4 -3
- package/dist/components/flows/iris-chat/iris-chat.variants.js +45 -22
- package/dist/components/flows/iris-chat/sync-iris-chat-composer-textarea.d.ts +6 -0
- package/dist/components/flows/iris-chat/sync-iris-chat-composer-textarea.js +23 -0
- package/dist/components/flows/iris-chat/use-iris-chat-root.d.ts +29 -0
- package/dist/components/flows/iris-chat/use-iris-chat-root.js +162 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.js +6 -0
- package/dist/components/forms/choice-card/choice-card-percent.js +82 -51
- package/dist/components/forms/choice-card/choice-card.d.ts +14 -2
- package/dist/components/forms/choice-card/choice-card.js +470 -381
- package/dist/components/forms/choice-card/choice-card.types.d.ts +9 -2
- package/dist/components/forms/choice-card/choice-card.variants.js +24 -3
- package/dist/components/forms/input/input.js +5 -5
- package/dist/components/forms/select/components/SelectMenuPanel.js +15 -15
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/layout/header/header.js +1 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.d.ts +3 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.js +12 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.js +181 -125
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.types.d.ts +2 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +3 -1
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +77 -67
- package/dist/components/primitives/button/button.variants.js +1 -1
- package/dist/components/primitives/iris/iris-insight-truncated-text.d.ts +3 -0
- package/dist/components/primitives/iris/iris-insight-truncated-text.js +33 -0
- package/dist/components/primitives/iris/iris.d.ts +3 -1
- package/dist/components/primitives/iris/iris.js +85 -91
- package/dist/components/primitives/iris/iris.types.d.ts +9 -0
- package/dist/components/primitives/stepper/internals/step-model.d.ts +1 -1
- package/dist/components/primitives/stepper/internals/step-model.js +5 -5
- package/dist/components/primitives/stepper/internals/stepper-compact.js +13 -13
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +6 -6
- package/dist/components/primitives/stepper/internals/stepper-rail.js +15 -15
- package/dist/components/primitives/stepper/internals/stepper-summary.js +7 -7
- package/dist/components/primitives/stepper/internals/stepper-track.js +2 -2
- package/dist/components/primitives/stepper/stepper.js +99 -97
- package/dist/components/primitives/stepper/stepper.types.d.ts +4 -0
- package/dist/components/primitives/tabs/folder-tab-path.d.ts +6 -0
- package/dist/components/primitives/tabs/folder-tab-path.js +16 -0
- package/dist/components/primitives/tabs/tabs.js +178 -112
- package/dist/components/primitives/tabs/tabs.types.d.ts +1 -1
- package/dist/form-react/Fields/SelectField.js +66 -57
- package/dist/form-react/Fields/VirtualizedListField.d.ts +3 -0
- package/dist/form-react/Fields/VirtualizedListField.js +223 -0
- package/dist/form-react/fields.d.ts +1 -0
- package/dist/form-react/fields.js +28 -26
- package/dist/form-react/index.d.ts +1 -1
- package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
- package/dist/form-react/registry/defaultFieldRegistrations.js +13 -12
- package/dist/form-react/types/fields.types.d.ts +48 -1
- package/dist/form-react/types/fieldsOutput.types.d.ts +4 -1
- package/dist/form-react/types/reactHookForm.types.d.ts +18 -1
- package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
- package/dist/i18n/defaultMessages.d.ts +69 -0
- package/dist/i18n/defaultMessages.js +107 -42
- package/dist/i18n/impact-nova-i18n-defaults.d.ts +5 -0
- package/dist/i18n/impact-nova-i18n-defaults.js +4 -9
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +66 -1
- package/dist/i18n/locales/es.js +66 -1
- package/dist/i18n/locales/hi.js +66 -1
- package/dist/i18n/locales/kn.js +66 -1
- package/dist/impact-nova-components.css +372 -14
- package/dist/impact-nova-tokens.scss +4 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +627 -601
- package/dist/lib/alphabetical-sort.d.ts +3 -0
- package/dist/lib/alphabetical-sort.js +13 -0
- package/dist/lib/guidance/engine/guidance-engine.js +26 -27
- package/dist/lib/guidance/engine/step-navigation.d.ts +1 -0
- package/dist/lib/guidance/engine/step-navigation.js +16 -9
- package/dist/lib/guidance/types/guidance.types.d.ts +9 -1
- package/dist/lib/virtualized/index.d.ts +2 -0
- package/dist/lib/virtualized/index.js +35 -31
- package/dist/lib/virtualized/list-index.d.ts +5 -0
- package/dist/lib/virtualized/list-index.js +13 -0
- package/dist/lib/virtualized/read-infinite-query-list.d.ts +14 -0
- package/dist/lib/virtualized/read-infinite-query-list.js +12 -0
- package/dist/lib/virtualized/types.d.ts +4 -2
- package/dist/lib/virtualized/useRowState.js +60 -56
- package/dist/lib/virtualized/useVirtualizedList.d.ts +5 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/tailwind.config.js +3 -0
- package/dist/theme/tailwind-colors.js +3 -0
- package/package.json +23 -4
|
@@ -1,336 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { useImpactNovaI18n as p } from "../../../i18n/use-impact-nova-i18n.js";
|
|
11
|
-
import { useComposedRefs as j } from "../../../lib/compose-refs.js";
|
|
12
|
-
import { useControllableState as b } from "@radix-ui/react-use-controllable-state";
|
|
13
|
-
import { createComponent as c } from "../../../lib/primitives/create-component.js";
|
|
14
|
-
import { cn as m } from "../../../lib/utils.js";
|
|
15
|
-
import { IrisChatProvider as A, useIrisChat as g, useIrisChatOptional as E } from "./iris-chat-context.js";
|
|
16
|
-
import { IrisChatHamburgerIcon as G, IrisChatMinimizeIcon as q } from "./iris-chat-icons.js";
|
|
17
|
-
import { irisChatRootVariants as J, irisChatHeaderVariants as K, irisChatPanelVariants as Q } from "./iris-chat.variants.js";
|
|
18
|
-
const U = ({
|
|
19
|
-
open: e,
|
|
20
|
-
defaultOpen: t = !0,
|
|
21
|
-
onOpenChange: a,
|
|
22
|
-
placement: i,
|
|
23
|
-
defaultPlacement: s = "dock-right",
|
|
24
|
-
onPlacementChange: n,
|
|
25
|
-
className: l,
|
|
26
|
-
children: d
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { cn as d } from "../../../lib/utils.js";
|
|
3
|
+
import { IrisChatProvider as p } from "./iris-chat-context.js";
|
|
4
|
+
import { irisChatRootVariants as l } from "./iris-chat.variants.js";
|
|
5
|
+
import { useIrisChatRoot as c } from "./use-iris-chat-root.js";
|
|
6
|
+
const v = ({
|
|
7
|
+
className: a,
|
|
8
|
+
children: r,
|
|
9
|
+
...t
|
|
27
10
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
onChange: a
|
|
32
|
-
}), [u, x] = b({
|
|
33
|
-
prop: i,
|
|
34
|
-
defaultProp: s,
|
|
35
|
-
onChange: n
|
|
36
|
-
}), C = o ?? t, f = u ?? s;
|
|
37
|
-
return /* @__PURE__ */ r(
|
|
38
|
-
A,
|
|
11
|
+
const { resolvedOpen: e, resolvedPlacement: o, isClosing: s, isOpening: n, providerValue: m } = c({ ...t });
|
|
12
|
+
return /* @__PURE__ */ i(p, { value: m, children: /* @__PURE__ */ i(
|
|
13
|
+
"div",
|
|
39
14
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
children:
|
|
47
|
-
"div",
|
|
48
|
-
{
|
|
49
|
-
"data-component": "iris-chat",
|
|
50
|
-
"data-placement": f,
|
|
51
|
-
"data-open": C ? "" : void 0,
|
|
52
|
-
className: m(J({ placement: f }), l),
|
|
53
|
-
children: d
|
|
54
|
-
}
|
|
55
|
-
)
|
|
15
|
+
"data-component": "iris-chat",
|
|
16
|
+
"data-placement": o,
|
|
17
|
+
"data-open": e ? "" : void 0,
|
|
18
|
+
"data-closing": s ? "" : void 0,
|
|
19
|
+
"data-opening": n ? "" : void 0,
|
|
20
|
+
className: d(l({ placement: o }), a),
|
|
21
|
+
children: r
|
|
56
22
|
}
|
|
57
|
-
);
|
|
23
|
+
) });
|
|
58
24
|
};
|
|
59
|
-
|
|
60
|
-
const me = c(
|
|
61
|
-
"IrisChatPanel",
|
|
62
|
-
({ className: e, hidden: t, ...a }, i) => {
|
|
63
|
-
const s = g();
|
|
64
|
-
return t ?? !s.open ? null : /* @__PURE__ */ r(
|
|
65
|
-
"div",
|
|
66
|
-
{
|
|
67
|
-
ref: i,
|
|
68
|
-
"data-component": "iris-chat-panel",
|
|
69
|
-
"data-placement": s.placement,
|
|
70
|
-
className: m(Q({ placement: s.placement }), e),
|
|
71
|
-
...a
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
), de = c(
|
|
76
|
-
"IrisChatHeader",
|
|
77
|
-
({ className: e, ...t }, a) => /* @__PURE__ */ r(
|
|
78
|
-
"header",
|
|
79
|
-
{
|
|
80
|
-
ref: a,
|
|
81
|
-
"data-component": "iris-chat-header",
|
|
82
|
-
className: m(K(), e),
|
|
83
|
-
...t
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
), he = c("IrisChatHeaderLeading", ({ className: e, ...t }, a) => /* @__PURE__ */ r(
|
|
87
|
-
"div",
|
|
88
|
-
{
|
|
89
|
-
ref: a,
|
|
90
|
-
"data-component": "iris-chat-header-leading",
|
|
91
|
-
className: m("flex min-w-0 items-center gap-2", e),
|
|
92
|
-
...t
|
|
93
|
-
}
|
|
94
|
-
)), pe = c("IrisChatHeaderTrailing", ({ className: e, ...t }, a) => /* @__PURE__ */ r(
|
|
95
|
-
"div",
|
|
96
|
-
{
|
|
97
|
-
ref: a,
|
|
98
|
-
"data-component": "iris-chat-header-trailing",
|
|
99
|
-
className: m("flex shrink-0 items-center gap-2", e),
|
|
100
|
-
...t
|
|
101
|
-
}
|
|
102
|
-
)), ue = c(
|
|
103
|
-
"IrisChatHeaderTitle",
|
|
104
|
-
({ className: e, showBrand: t = !1, children: a, ...i }, s) => {
|
|
105
|
-
const { t: n } = p();
|
|
106
|
-
return /* @__PURE__ */ I("div", { className: "flex min-w-0 items-center gap-1", children: [
|
|
107
|
-
t ? /* @__PURE__ */ r(N, { size: 18 }) : null,
|
|
108
|
-
/* @__PURE__ */ r(
|
|
109
|
-
"h2",
|
|
110
|
-
{
|
|
111
|
-
ref: s,
|
|
112
|
-
"data-component": "iris-chat-header-title",
|
|
113
|
-
className: m("truncate text-sm font-semibold leading-5 text-content", e),
|
|
114
|
-
...i,
|
|
115
|
-
children: a ?? n("irisChat.askIris")
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
] });
|
|
119
|
-
}
|
|
120
|
-
), v = c(
|
|
121
|
-
"IrisChatIconButton",
|
|
122
|
-
({ className: e, label: t, children: a, type: i = "button", variant: s = "secondary", disabled: n, ...l }, d) => /* @__PURE__ */ r(L, { label: t, disabled: n, children: /* @__PURE__ */ r(
|
|
123
|
-
S,
|
|
124
|
-
{
|
|
125
|
-
ref: d,
|
|
126
|
-
type: i,
|
|
127
|
-
variant: s,
|
|
128
|
-
size: "icon",
|
|
129
|
-
"aria-label": t,
|
|
130
|
-
disabled: n,
|
|
131
|
-
"data-component": "iris-chat-icon-button",
|
|
132
|
-
className: m(
|
|
133
|
-
"text-content",
|
|
134
|
-
s === "secondary" ? "rounded-full" : "rounded-lg",
|
|
135
|
-
e
|
|
136
|
-
),
|
|
137
|
-
...l,
|
|
138
|
-
children: a
|
|
139
|
-
}
|
|
140
|
-
) })
|
|
141
|
-
), Ce = c("IrisChatHeaderMenuButton", ({ label: e, ...t }, a) => {
|
|
142
|
-
const { t: i } = p();
|
|
143
|
-
return /* @__PURE__ */ r(v, { ref: a, variant: "ghost", label: e ?? i("irisChat.menu"), ...t, children: /* @__PURE__ */ r(G, { size: 16 }) });
|
|
144
|
-
}), fe = c("IrisChatHeaderBackButton", ({ label: e, ...t }, a) => {
|
|
145
|
-
const { t: i } = p();
|
|
146
|
-
return /* @__PURE__ */ r(v, { ref: a, variant: "ghost", label: e ?? i("irisChat.back"), ...t, children: /* @__PURE__ */ r(k, { size: 16 }) });
|
|
147
|
-
}), Ie = c("IrisChatHeaderNewChatButton", ({ label: e, ...t }, a) => {
|
|
148
|
-
const { t: i } = p();
|
|
149
|
-
return /* @__PURE__ */ r(v, { ref: a, label: e ?? i("irisChat.newChat"), ...t, children: /* @__PURE__ */ r(T, { size: 16 }) });
|
|
150
|
-
}), ge = c("IrisChatHeaderMinimizeButton", ({ label: e, onClick: t, ...a }, i) => {
|
|
151
|
-
const { t: s } = p(), n = g(), l = H.useRef(
|
|
152
|
-
n.placement === "minimized" ? "float" : n.placement
|
|
153
|
-
), d = n.placement === "minimized";
|
|
154
|
-
return /* @__PURE__ */ r(
|
|
155
|
-
v,
|
|
156
|
-
{
|
|
157
|
-
ref: i,
|
|
158
|
-
label: e ?? s(d ? "irisChat.expand" : "irisChat.minimize"),
|
|
159
|
-
"aria-pressed": d,
|
|
160
|
-
onClick: (o) => {
|
|
161
|
-
d ? n.setPlacement(l.current) : (l.current = n.placement, n.setPlacement("minimized")), t?.(o);
|
|
162
|
-
},
|
|
163
|
-
...a,
|
|
164
|
-
children: /* @__PURE__ */ r(q, { size: 16 })
|
|
165
|
-
}
|
|
166
|
-
);
|
|
167
|
-
}), ve = c("IrisChatHeaderCloseButton", ({ label: e, onClick: t, ...a }, i) => {
|
|
168
|
-
const { t: s } = p(), n = g();
|
|
169
|
-
return /* @__PURE__ */ r(
|
|
170
|
-
v,
|
|
171
|
-
{
|
|
172
|
-
ref: i,
|
|
173
|
-
label: e ?? s("aria.close"),
|
|
174
|
-
onClick: (l) => {
|
|
175
|
-
n.setOpen(!1), t?.(l);
|
|
176
|
-
},
|
|
177
|
-
...a,
|
|
178
|
-
children: /* @__PURE__ */ r(w, { size: 16 })
|
|
179
|
-
}
|
|
180
|
-
);
|
|
181
|
-
});
|
|
182
|
-
function B(e) {
|
|
183
|
-
return e === "minimized" || e === "composer";
|
|
184
|
-
}
|
|
185
|
-
const xe = c(
|
|
186
|
-
"IrisChatBody",
|
|
187
|
-
({ className: e, onScroll: t, ...a }, i) => {
|
|
188
|
-
const s = g(), n = H.useRef(null), l = H.useRef(!0), d = j(i, n);
|
|
189
|
-
return H.useEffect(() => {
|
|
190
|
-
const o = n.current;
|
|
191
|
-
if (!o)
|
|
192
|
-
return;
|
|
193
|
-
const h = () => {
|
|
194
|
-
l.current && (o.scrollTop = o.scrollHeight);
|
|
195
|
-
}, u = new ResizeObserver(h), x = () => {
|
|
196
|
-
u.disconnect(), u.observe(o);
|
|
197
|
-
for (const f of o.children)
|
|
198
|
-
u.observe(f);
|
|
199
|
-
}, C = new MutationObserver(() => {
|
|
200
|
-
x(), h();
|
|
201
|
-
});
|
|
202
|
-
return C.observe(o, { childList: !0, subtree: !0, characterData: !0 }), x(), h(), () => {
|
|
203
|
-
u.disconnect(), C.disconnect();
|
|
204
|
-
};
|
|
205
|
-
}, []), /* @__PURE__ */ r(
|
|
206
|
-
"div",
|
|
207
|
-
{
|
|
208
|
-
ref: d,
|
|
209
|
-
"data-component": "iris-chat-body",
|
|
210
|
-
"data-placement": s.placement,
|
|
211
|
-
className: m(
|
|
212
|
-
"flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto",
|
|
213
|
-
B(s.placement) ? "px-4" : "px-12",
|
|
214
|
-
e
|
|
215
|
-
),
|
|
216
|
-
onScroll: (o) => {
|
|
217
|
-
const h = o.currentTarget;
|
|
218
|
-
l.current = h.scrollHeight - h.scrollTop - h.clientHeight < 64, t?.(o);
|
|
219
|
-
},
|
|
220
|
-
...a
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
), He = c(
|
|
225
|
-
"IrisChatFooter",
|
|
226
|
-
({ className: e, ...t }, a) => {
|
|
227
|
-
const i = g();
|
|
228
|
-
return /* @__PURE__ */ r(
|
|
229
|
-
"div",
|
|
230
|
-
{
|
|
231
|
-
ref: a,
|
|
232
|
-
"data-component": "iris-chat-footer",
|
|
233
|
-
"data-placement": i.placement,
|
|
234
|
-
className: m(
|
|
235
|
-
"min-w-0 shrink-0 pb-2",
|
|
236
|
-
B(i.placement) ? "px-4" : "px-12",
|
|
237
|
-
e
|
|
238
|
-
),
|
|
239
|
-
...t
|
|
240
|
-
}
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
), be = c(
|
|
244
|
-
"IrisChatDisclaimer",
|
|
245
|
-
({ className: e, href: t, children: a, ...i }, s) => {
|
|
246
|
-
const { t: n } = p();
|
|
247
|
-
return /* @__PURE__ */ r(
|
|
248
|
-
"p",
|
|
249
|
-
{
|
|
250
|
-
ref: s,
|
|
251
|
-
"data-component": "iris-chat-disclaimer",
|
|
252
|
-
className: m(
|
|
253
|
-
"shrink-0 px-4 py-3 text-center text-xs font-medium leading-4 text-content-caption",
|
|
254
|
-
e
|
|
255
|
-
),
|
|
256
|
-
...i,
|
|
257
|
-
children: a ?? /* @__PURE__ */ I(z, { children: [
|
|
258
|
-
n("irisChat.disclaimer"),
|
|
259
|
-
" ",
|
|
260
|
-
t ? /* @__PURE__ */ r("a", { href: t, className: "underline hover:text-brand", children: n("irisChat.learnMore") }) : /* @__PURE__ */ I(y, { children: [
|
|
261
|
-
/* @__PURE__ */ r(R, { asChild: !0, children: /* @__PURE__ */ r(
|
|
262
|
-
"button",
|
|
263
|
-
{
|
|
264
|
-
type: "button",
|
|
265
|
-
className: "underline hover:text-brand",
|
|
266
|
-
"data-testid": "iris-chat-learn-more",
|
|
267
|
-
children: n("irisChat.learnMore")
|
|
268
|
-
}
|
|
269
|
-
) }),
|
|
270
|
-
/* @__PURE__ */ I(
|
|
271
|
-
M,
|
|
272
|
-
{
|
|
273
|
-
align: "center",
|
|
274
|
-
side: "top",
|
|
275
|
-
className: "iris-menu-surface w-[320px] rounded-xl p-4",
|
|
276
|
-
children: [
|
|
277
|
-
/* @__PURE__ */ r(O, { className: "mb-2", children: /* @__PURE__ */ I("div", { className: "flex items-center gap-2", children: [
|
|
278
|
-
/* @__PURE__ */ r(N, { size: 18 }),
|
|
279
|
-
/* @__PURE__ */ r(D, { className: "text-sm font-semibold", children: n("irisChat.disclaimerTitle") })
|
|
280
|
-
] }) }),
|
|
281
|
-
/* @__PURE__ */ r(F, { className: "text-sm leading-5 text-content-secondary", children: n("irisChat.disclaimerBody") })
|
|
282
|
-
]
|
|
283
|
-
}
|
|
284
|
-
)
|
|
285
|
-
] })
|
|
286
|
-
] })
|
|
287
|
-
}
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
), Ne = c(
|
|
291
|
-
"IrisChatTrigger",
|
|
292
|
-
({ asChild: e = !1, onClick: t, size: a = "md", shape: i = "default", className: s, ...n }, l) => {
|
|
293
|
-
const d = E(), o = (h) => {
|
|
294
|
-
d?.setOpen(!0), t?.(h);
|
|
295
|
-
};
|
|
296
|
-
return e ? /* @__PURE__ */ r(
|
|
297
|
-
P,
|
|
298
|
-
{
|
|
299
|
-
ref: l,
|
|
300
|
-
"data-component": "iris-chat-trigger",
|
|
301
|
-
className: m("pointer-events-auto", s),
|
|
302
|
-
onClick: o,
|
|
303
|
-
...n
|
|
304
|
-
}
|
|
305
|
-
) : /* @__PURE__ */ r(
|
|
306
|
-
V,
|
|
307
|
-
{
|
|
308
|
-
ref: l,
|
|
309
|
-
size: a,
|
|
310
|
-
shape: i,
|
|
311
|
-
"data-component": "iris-chat-trigger",
|
|
312
|
-
className: m("pointer-events-auto", s),
|
|
313
|
-
onClick: o,
|
|
314
|
-
...n
|
|
315
|
-
}
|
|
316
|
-
);
|
|
317
|
-
}
|
|
318
|
-
);
|
|
25
|
+
v.displayName = "IrisChat";
|
|
319
26
|
export {
|
|
320
|
-
|
|
321
|
-
xe as IrisChatBody,
|
|
322
|
-
be as IrisChatDisclaimer,
|
|
323
|
-
He as IrisChatFooter,
|
|
324
|
-
de as IrisChatHeader,
|
|
325
|
-
fe as IrisChatHeaderBackButton,
|
|
326
|
-
ve as IrisChatHeaderCloseButton,
|
|
327
|
-
he as IrisChatHeaderLeading,
|
|
328
|
-
Ce as IrisChatHeaderMenuButton,
|
|
329
|
-
ge as IrisChatHeaderMinimizeButton,
|
|
330
|
-
Ie as IrisChatHeaderNewChatButton,
|
|
331
|
-
ue as IrisChatHeaderTitle,
|
|
332
|
-
pe as IrisChatHeaderTrailing,
|
|
333
|
-
v as IrisChatIconButton,
|
|
334
|
-
me as IrisChatPanel,
|
|
335
|
-
Ne as IrisChatTrigger
|
|
27
|
+
v as IrisChat
|
|
336
28
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { IrisChatFrame } from './iris-chat-frame';
|
|
1
2
|
import type * as React from "react";
|
|
3
|
+
export type { IrisChatFrame };
|
|
2
4
|
export type IrisChatPlacement = "dock-right" | "float" | "minimized" | "composer";
|
|
3
5
|
export type IrisChatRole = "user" | "assistant";
|
|
4
6
|
export type IrisChatModelOption = {
|
|
@@ -54,6 +56,12 @@ export type IrisChatProps = {
|
|
|
54
56
|
placement?: IrisChatPlacement;
|
|
55
57
|
defaultPlacement?: IrisChatPlacement;
|
|
56
58
|
onPlacementChange?: (placement: IrisChatPlacement) => void;
|
|
59
|
+
frame?: IrisChatFrame;
|
|
60
|
+
defaultFrame?: IrisChatFrame;
|
|
61
|
+
onFrameChange?: (frame: IrisChatFrame) => void;
|
|
62
|
+
/** When set, close animates the floating panel into this element before unmounting. */
|
|
63
|
+
closeAnimationTarget?: () => HTMLElement | null;
|
|
64
|
+
onCloseAnimationComplete?: () => void;
|
|
57
65
|
className?: string;
|
|
58
66
|
children?: React.ReactNode;
|
|
59
67
|
};
|
|
@@ -92,8 +100,15 @@ export type IrisChatComposerProps = {
|
|
|
92
100
|
onAttachClick?: () => void;
|
|
93
101
|
onAttach?: (files: File[]) => void;
|
|
94
102
|
onMicClick?: () => void;
|
|
103
|
+
speechRecognitionLocale?: string;
|
|
104
|
+
onSpeechNotice?: (notice: IrisChatSpeechNotice) => void;
|
|
95
105
|
className?: string;
|
|
96
106
|
};
|
|
107
|
+
export type IrisChatSpeechNoticeKind = "unsupported" | "permission" | "error";
|
|
108
|
+
export type IrisChatSpeechNotice = {
|
|
109
|
+
kind: IrisChatSpeechNoticeKind;
|
|
110
|
+
messageKey: "speechUnsupported" | "speechPermissionDenied" | "speechNoSpeech" | "speechNetwork" | "speechError" | "speechEmpty";
|
|
111
|
+
};
|
|
97
112
|
export type IrisChatGreetingProps = {
|
|
98
113
|
name?: string;
|
|
99
114
|
greeting?: React.ReactNode;
|
|
@@ -112,6 +127,8 @@ export type IrisChatDayProps = React.HTMLAttributes<HTMLDivElement>;
|
|
|
112
127
|
export type IrisChatMessageProps = React.HTMLAttributes<HTMLElement> & {
|
|
113
128
|
role: IrisChatRole;
|
|
114
129
|
time?: string;
|
|
130
|
+
/** Revolving reply ring. Leave unset for the thinking row. */
|
|
131
|
+
framed?: boolean;
|
|
115
132
|
};
|
|
116
133
|
export type IrisChatFeedbackReason = "notAsked" | "tone" | "incorrect" | "other";
|
|
117
134
|
export type IrisChatFeedback = {
|
|
@@ -122,11 +139,14 @@ export type IrisChatActionsProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
122
139
|
liked?: boolean;
|
|
123
140
|
disliked?: boolean;
|
|
124
141
|
copyText?: string;
|
|
142
|
+
speakText?: string;
|
|
143
|
+
speechLocale?: string;
|
|
125
144
|
onLike?: () => void;
|
|
126
145
|
onDislike?: () => void;
|
|
127
146
|
onCopy?: () => void;
|
|
128
147
|
onRetry?: () => void;
|
|
129
148
|
onSpeak?: () => void;
|
|
149
|
+
onSpeechNotice?: (notice: IrisChatSpeechNotice) => void;
|
|
130
150
|
onFeedback?: (feedback: IrisChatFeedback) => void;
|
|
131
151
|
};
|
|
132
152
|
export type IrisChatFollowUpProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export declare const irisChatRootVariants: (props?: ({
|
|
2
|
-
placement?: "
|
|
2
|
+
placement?: "float" | "dock-right" | "minimized" | "composer" | null | undefined;
|
|
3
3
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
4
|
export declare const irisChatPanelVariants: (props?: ({
|
|
5
|
-
placement?: "
|
|
5
|
+
placement?: "float" | "dock-right" | "minimized" | "composer" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export declare const irisChatHeaderVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
8
8
|
export declare const irisChatComposerVariants: (props?: ({
|
|
9
|
-
layout?: "inline" | "stacked" | null | undefined;
|
|
9
|
+
layout?: "inline" | "stacked" | "stackedCompact" | null | undefined;
|
|
10
10
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
11
|
export declare const irisChatMessageVariants: (props?: ({
|
|
12
12
|
role?: "user" | "assistant" | null | undefined;
|
|
13
|
+
framed?: boolean | null | undefined;
|
|
13
14
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
15
|
export declare const irisChatMarkdownVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cva as e } from "class-variance-authority";
|
|
2
|
-
const
|
|
2
|
+
const a = e("relative min-h-0 min-w-0", {
|
|
3
3
|
variants: {
|
|
4
4
|
placement: {
|
|
5
5
|
"dock-right": "flex h-full w-full justify-end",
|
|
6
|
-
float: "pointer-events-none
|
|
7
|
-
minimized: "pointer-events-none
|
|
6
|
+
float: "pointer-events-none fixed inset-0",
|
|
7
|
+
minimized: "pointer-events-none fixed inset-0",
|
|
8
8
|
composer: "flex w-full justify-center"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
@@ -17,8 +17,8 @@ const l = e("relative min-h-0 min-w-0", {
|
|
|
17
17
|
variants: {
|
|
18
18
|
placement: {
|
|
19
19
|
"dock-right": "h-full w-[640px] max-w-full border-s border-stroke-subtle shadow-elevation-card",
|
|
20
|
-
float: "
|
|
21
|
-
minimized: "
|
|
20
|
+
float: "hidden",
|
|
21
|
+
minimized: "hidden",
|
|
22
22
|
composer: "w-[624px] max-w-full bg-transparent"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
@@ -26,31 +26,55 @@ const l = e("relative min-h-0 min-w-0", {
|
|
|
26
26
|
placement: "dock-right"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
),
|
|
29
|
+
), n = e(
|
|
30
30
|
"flex h-[50px] shrink-0 items-center justify-between px-4"
|
|
31
|
-
),
|
|
32
|
-
|
|
31
|
+
), l = e(
|
|
32
|
+
[
|
|
33
|
+
"flex w-full min-w-0 max-w-full flex-col border border-stroke-subtle bg-canvas-elevated",
|
|
34
|
+
"data-[listening]:!h-auto data-[listening]:min-h-[11.5rem] data-[listening]:justify-center",
|
|
35
|
+
"data-[listening]:overflow-visible data-[listening]:py-3"
|
|
36
|
+
].join(" "),
|
|
33
37
|
{
|
|
34
38
|
variants: {
|
|
35
39
|
layout: {
|
|
36
|
-
stacked: "min-h-
|
|
37
|
-
|
|
40
|
+
stacked: "min-h-0 justify-between gap-2 rounded-3xl p-4",
|
|
41
|
+
stackedCompact: "min-h-0 justify-between gap-2 rounded-2xl p-2.5",
|
|
42
|
+
inline: "min-h-0 justify-between gap-2 rounded-2xl px-2.5 py-2"
|
|
38
43
|
}
|
|
39
44
|
},
|
|
40
45
|
defaultVariants: {
|
|
41
46
|
layout: "stacked"
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
|
-
),
|
|
49
|
+
), i = e("text-sm leading-5", {
|
|
45
50
|
variants: {
|
|
46
51
|
role: {
|
|
47
|
-
user: "ms-auto max-w-[min(90%,100%)] break-words rounded-2xl px-4 py-3 text-content",
|
|
48
|
-
assistant:
|
|
52
|
+
user: "ms-auto flex max-w-[min(90%,100%)] flex-col break-words rounded-2xl px-4 py-3 text-content",
|
|
53
|
+
assistant: [
|
|
54
|
+
"grid w-full min-w-0 max-w-full overflow-x-hidden grid-cols-[minmax(0,1fr)_auto] items-end gap-x-2 gap-y-4 break-words text-content",
|
|
55
|
+
"[&>*]:min-w-0 [&>*]:max-w-full",
|
|
56
|
+
"[&>*:not(time):not([data-slot=reply-actions])]:col-span-2",
|
|
57
|
+
"[&>[data-slot=reply-actions]]:col-span-1 [&>[data-slot=reply-actions]]:col-start-1"
|
|
58
|
+
].join(" ")
|
|
59
|
+
},
|
|
60
|
+
framed: {
|
|
61
|
+
true: "",
|
|
62
|
+
false: ""
|
|
49
63
|
}
|
|
50
|
-
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
framed: !1
|
|
67
|
+
},
|
|
68
|
+
compoundVariants: [
|
|
69
|
+
{
|
|
70
|
+
role: "assistant",
|
|
71
|
+
framed: !0,
|
|
72
|
+
class: "iris-reply-frame rounded-xl px-3 py-2"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
51
75
|
}), s = e(
|
|
52
76
|
[
|
|
53
|
-
"iris-chat-markdown flex flex-col gap-3 text-sm font-medium leading-5 text-content",
|
|
77
|
+
"iris-chat-markdown flex w-full min-w-0 max-w-full flex-col gap-3 text-sm font-medium leading-5 text-content",
|
|
54
78
|
"[&_a]:text-brand [&_a]:underline",
|
|
55
79
|
"[&_blockquote]:m-0 [&_blockquote]:rounded-xl [&_blockquote]:border-0 [&_blockquote]:bg-secondary [&_blockquote]:px-3 [&_blockquote]:py-2 [&_blockquote]:text-content-secondary",
|
|
56
80
|
"[&_code]:rounded-md [&_code]:bg-secondary [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-xs [&_code]:font-medium",
|
|
@@ -62,17 +86,16 @@ const l = e("relative min-h-0 min-w-0", {
|
|
|
62
86
|
"[&_p]:m-0",
|
|
63
87
|
"[&_pre]:m-0 [&_pre]:overflow-x-auto [&_pre]:rounded-xl [&_pre]:bg-secondary [&_pre]:p-3 [&_pre]:text-xs [&_pre]:leading-5",
|
|
64
88
|
"[&_pre_code]:bg-transparent [&_pre_code]:p-0",
|
|
65
|
-
"[&
|
|
66
|
-
"[&
|
|
67
|
-
"[&_th]:bg-secondary [&_th]:px-3 [&_th]:py-2 [&_th]:text-start [&_th]:text-xs [&_th]:font-semibold",
|
|
89
|
+
"[&_td]:whitespace-nowrap [&_td]:border-t [&_td]:border-stroke-subtle [&_td]:px-3 [&_td]:py-2",
|
|
90
|
+
"[&_th]:whitespace-nowrap [&_th]:bg-secondary [&_th]:px-3 [&_th]:py-2 [&_th]:text-start [&_th]:text-xs [&_th]:font-semibold",
|
|
68
91
|
"[&_ul]:m-0 [&_ul]:flex [&_ul]:list-disc [&_ul]:flex-col [&_ul]:gap-1.5 [&_ul]:ps-4"
|
|
69
92
|
].join(" ")
|
|
70
93
|
);
|
|
71
94
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
95
|
+
l as irisChatComposerVariants,
|
|
96
|
+
n as irisChatHeaderVariants,
|
|
74
97
|
s as irisChatMarkdownVariants,
|
|
75
|
-
|
|
98
|
+
i as irisChatMessageVariants,
|
|
76
99
|
o as irisChatPanelVariants,
|
|
77
|
-
|
|
100
|
+
a as irisChatRootVariants
|
|
78
101
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const IRIS_CHAT_COMPOSER_LINE_HEIGHT_PX = 20;
|
|
2
|
+
export declare const IRIS_CHAT_COMPOSER_COLLAPSED_MAX_HEIGHT_PX: number;
|
|
3
|
+
export declare const IRIS_CHAT_COMPOSER_EXPANDED_MAX_HEIGHT_PX: number;
|
|
4
|
+
export declare function readIrisChatComposerMaxHeight(expanded: boolean): number;
|
|
5
|
+
export declare function syncIrisChatComposerTextareaHeight(textarea: HTMLTextAreaElement | null, expanded: boolean): void;
|
|
6
|
+
export declare function readIrisChatComposerExpandOffered(textarea: HTMLTextAreaElement | null, expanded: boolean, lineCount: number): boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const t = 20, e = 120, n = 280;
|
|
2
|
+
function C(_) {
|
|
3
|
+
return _ ? 280 : 120;
|
|
4
|
+
}
|
|
5
|
+
function r(_, I) {
|
|
6
|
+
if (!_)
|
|
7
|
+
return;
|
|
8
|
+
const H = C(I);
|
|
9
|
+
_.style.height = "0px";
|
|
10
|
+
const E = Math.min(_.scrollHeight, H);
|
|
11
|
+
_.style.height = `${E}px`, _.style.overflowY = _.scrollHeight > H ? "auto" : "hidden";
|
|
12
|
+
}
|
|
13
|
+
function i(_, I, H) {
|
|
14
|
+
return I ? !1 : H > 6 ? !0 : _ ? _.scrollHeight > 120 : !1;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
e as IRIS_CHAT_COMPOSER_COLLAPSED_MAX_HEIGHT_PX,
|
|
18
|
+
n as IRIS_CHAT_COMPOSER_EXPANDED_MAX_HEIGHT_PX,
|
|
19
|
+
t as IRIS_CHAT_COMPOSER_LINE_HEIGHT_PX,
|
|
20
|
+
i as readIrisChatComposerExpandOffered,
|
|
21
|
+
C as readIrisChatComposerMaxHeight,
|
|
22
|
+
r as syncIrisChatComposerTextareaHeight
|
|
23
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IrisChatFrame } from './iris-chat-frame';
|
|
2
|
+
import { IrisChatSnapPreset } from './iris-chat-snap-presets';
|
|
3
|
+
import { IrisChatPlacement, IrisChatProps } from './iris-chat.types';
|
|
4
|
+
export interface IrisChatRootController {
|
|
5
|
+
resolvedOpen: boolean;
|
|
6
|
+
resolvedPlacement: IrisChatPlacement;
|
|
7
|
+
isClosing: boolean;
|
|
8
|
+
isOpening: boolean;
|
|
9
|
+
providerValue: {
|
|
10
|
+
open: boolean;
|
|
11
|
+
setOpen: (open: boolean) => void;
|
|
12
|
+
requestClose: () => void;
|
|
13
|
+
isClosing: boolean;
|
|
14
|
+
isOpening: boolean;
|
|
15
|
+
registerPanelNode: (node: HTMLDivElement | null) => void;
|
|
16
|
+
placement: IrisChatPlacement;
|
|
17
|
+
setPlacement: (placement: IrisChatPlacement) => void;
|
|
18
|
+
frame: IrisChatFrame;
|
|
19
|
+
setFrame: (frame: IrisChatFrame) => void;
|
|
20
|
+
commitFrame: (frame: IrisChatFrame) => void;
|
|
21
|
+
resetFrame: () => void;
|
|
22
|
+
applyCompactFrame: () => void;
|
|
23
|
+
expandFromCompactFrame: () => void;
|
|
24
|
+
applySnapPreset: (preset: IrisChatSnapPreset) => void;
|
|
25
|
+
toggleWindowSize: () => void;
|
|
26
|
+
isWindowPlacement: boolean;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export declare function useIrisChatRoot(props: IrisChatProps): IrisChatRootController;
|