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,23 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
const
|
|
3
|
+
const n = r.createContext(null);
|
|
4
4
|
function s({
|
|
5
5
|
value: t,
|
|
6
|
-
children:
|
|
6
|
+
children: e
|
|
7
7
|
}) {
|
|
8
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ i(n.Provider, { value: t, children: e });
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
const t = r.useContext(
|
|
10
|
+
function a() {
|
|
11
|
+
const t = r.useContext(n);
|
|
12
12
|
if (!t)
|
|
13
13
|
throw new Error("IrisChat parts must render inside IrisChat.");
|
|
14
14
|
return t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return r.useContext(
|
|
16
|
+
function u() {
|
|
17
|
+
return r.useContext(n);
|
|
18
|
+
}
|
|
19
|
+
function C(t) {
|
|
20
|
+
return t === "float" || t === "minimized";
|
|
18
21
|
}
|
|
19
22
|
export {
|
|
20
23
|
s as IrisChatProvider,
|
|
21
|
-
|
|
22
|
-
a as
|
|
24
|
+
C as readIsIrisChatWindowPlacement,
|
|
25
|
+
a as useIrisChat,
|
|
26
|
+
u as useIrisChatOptional
|
|
23
27
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const IRIS_CHAT_COPY_FEEDBACK_MS = 2000;
|
|
2
|
+
export declare const irisChatActionIconPressClassName = "transition-[transform,color,background-color] duration-150 active:scale-90";
|
|
3
|
+
export declare const irisChatCopySuccessClassName = "text-success bg-success-subtle hover:bg-success-subtle hover:text-success";
|
|
4
|
+
export declare function writeIrisChatClipboardText(text: string): Promise<boolean>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const t = 2e3, r = "transition-[transform,color,background-color] duration-150 active:scale-90", e = "text-success bg-success-subtle hover:bg-success-subtle hover:text-success";
|
|
2
|
+
async function a(s) {
|
|
3
|
+
if (!s.trim() || !navigator.clipboard?.writeText)
|
|
4
|
+
return !1;
|
|
5
|
+
try {
|
|
6
|
+
return await navigator.clipboard.writeText(s), !0;
|
|
7
|
+
} catch {
|
|
8
|
+
return !1;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
t as IRIS_CHAT_COPY_FEEDBACK_MS,
|
|
13
|
+
r as irisChatActionIconPressClassName,
|
|
14
|
+
e as irisChatCopySuccessClassName,
|
|
15
|
+
a as writeIrisChatClipboardText
|
|
16
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type IrisChatFrame = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const IRIS_CHAT_FRAME_PADDING_PX = 16;
|
|
9
|
+
export declare const IRIS_CHAT_FRAME_MIN_WIDTH_PX = 280;
|
|
10
|
+
export declare const IRIS_CHAT_FRAME_MIN_HEIGHT_PX = 360;
|
|
11
|
+
export declare const IRIS_CHAT_FRAME_DEFAULT_WIDTH_PX = 420;
|
|
12
|
+
export declare const IRIS_CHAT_FRAME_DEFAULT_HEIGHT_PX = 640;
|
|
13
|
+
export declare const IRIS_CHAT_FRAME_COMPACT_WIDTH_PX = 360;
|
|
14
|
+
export declare const IRIS_CHAT_FRAME_COMPACT_HEIGHT_PX = 480;
|
|
15
|
+
export declare const IRIS_CHAT_HEADER_MIN_VISIBLE_PX = 80;
|
|
16
|
+
export type IrisChatViewport = {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
export type IrisChatResizeEdge = "north" | "south" | "east" | "west" | "north-east" | "north-west" | "south-east" | "south-west";
|
|
21
|
+
export declare function readIrisChatViewport(): IrisChatViewport;
|
|
22
|
+
export declare function readIrisChatMaxFrameSize(viewport: IrisChatViewport): {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
export declare function createDefaultIrisChatFrame(viewport?: IrisChatViewport): IrisChatFrame;
|
|
27
|
+
export declare function readIrisChatFrameWithSizeAnchoredAtBottomRight(frame: IrisChatFrame, targetWidth: number, targetHeight: number, viewport?: IrisChatViewport): IrisChatFrame;
|
|
28
|
+
export declare function createCompactIrisChatFrame(frame: IrisChatFrame, viewport?: IrisChatViewport): IrisChatFrame;
|
|
29
|
+
export declare function clampIrisChatFrame(frame: IrisChatFrame, viewport: IrisChatViewport): IrisChatFrame;
|
|
30
|
+
export declare function moveIrisChatFrame(frame: IrisChatFrame, deltaX: number, deltaY: number, viewport: IrisChatViewport): IrisChatFrame;
|
|
31
|
+
export declare function resizeIrisChatFrame(frame: IrisChatFrame, edge: IrisChatResizeEdge, deltaX: number, deltaY: number, viewport: IrisChatViewport): IrisChatFrame;
|
|
32
|
+
export declare function readIrisChatFrameStyle(frame: IrisChatFrame): CSSProperties;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const C = 16, s = 280, a = 360, P = 420, S = 640, r = 360, F = 480, D = 80;
|
|
2
|
+
function M() {
|
|
3
|
+
return typeof window > "u" ? { width: 1280, height: 800 } : { width: window.innerWidth, height: window.innerHeight };
|
|
4
|
+
}
|
|
5
|
+
function T(_) {
|
|
6
|
+
const t = Math.max(
|
|
7
|
+
280,
|
|
8
|
+
_.width - 32
|
|
9
|
+
), I = Math.max(
|
|
10
|
+
360,
|
|
11
|
+
_.height - 32
|
|
12
|
+
);
|
|
13
|
+
return { width: t, height: I };
|
|
14
|
+
}
|
|
15
|
+
function X(_ = M()) {
|
|
16
|
+
const { width: t, height: I } = T(_), h = Math.min(420, t), i = Math.min(640, I);
|
|
17
|
+
return {
|
|
18
|
+
x: _.width - h - 16,
|
|
19
|
+
y: _.height - i - 16,
|
|
20
|
+
width: h,
|
|
21
|
+
height: i
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function e(_, t, I, h = M()) {
|
|
25
|
+
const i = T(h), n = Math.min(Math.max(t, 280), i.width), A = Math.min(Math.max(I, 360), i.height), H = _.x + _.width, R = _.y + _.height;
|
|
26
|
+
return o(
|
|
27
|
+
{
|
|
28
|
+
x: H - n,
|
|
29
|
+
y: R - A,
|
|
30
|
+
width: n,
|
|
31
|
+
height: A
|
|
32
|
+
},
|
|
33
|
+
h
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function m(_, t = M()) {
|
|
37
|
+
return e(
|
|
38
|
+
_,
|
|
39
|
+
360,
|
|
40
|
+
480,
|
|
41
|
+
t
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
function o(_, t) {
|
|
45
|
+
const I = T(t), h = Math.min(Math.max(_.width, 280), I.width), i = Math.min(Math.max(_.height, 360), I.height), n = t.width - 80, A = t.height - 80, H = 16 - h + 80, R = 16, E = Math.min(Math.max(_.x, H), n), c = Math.min(Math.max(_.y, R), A);
|
|
46
|
+
return { x: E, y: c, width: h, height: i };
|
|
47
|
+
}
|
|
48
|
+
function d(_, t, I, h) {
|
|
49
|
+
return o(
|
|
50
|
+
{
|
|
51
|
+
..._,
|
|
52
|
+
x: _.x + t,
|
|
53
|
+
y: _.y + I
|
|
54
|
+
},
|
|
55
|
+
h
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function u(_, t, I, h, i) {
|
|
59
|
+
let { x: n, y: A, width: H, height: R } = _;
|
|
60
|
+
return t.includes("east") && (H += I), t.includes("west") && (n += I, H -= I), t.includes("south") && (R += h), t.includes("north") && (A += h, R -= h), o({ x: n, y: A, width: H, height: R }, i);
|
|
61
|
+
}
|
|
62
|
+
function x(_) {
|
|
63
|
+
return {
|
|
64
|
+
left: _.x,
|
|
65
|
+
top: _.y,
|
|
66
|
+
width: _.width,
|
|
67
|
+
height: _.height
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
F as IRIS_CHAT_FRAME_COMPACT_HEIGHT_PX,
|
|
72
|
+
r as IRIS_CHAT_FRAME_COMPACT_WIDTH_PX,
|
|
73
|
+
S as IRIS_CHAT_FRAME_DEFAULT_HEIGHT_PX,
|
|
74
|
+
P as IRIS_CHAT_FRAME_DEFAULT_WIDTH_PX,
|
|
75
|
+
a as IRIS_CHAT_FRAME_MIN_HEIGHT_PX,
|
|
76
|
+
s as IRIS_CHAT_FRAME_MIN_WIDTH_PX,
|
|
77
|
+
C as IRIS_CHAT_FRAME_PADDING_PX,
|
|
78
|
+
D as IRIS_CHAT_HEADER_MIN_VISIBLE_PX,
|
|
79
|
+
o as clampIrisChatFrame,
|
|
80
|
+
m as createCompactIrisChatFrame,
|
|
81
|
+
X as createDefaultIrisChatFrame,
|
|
82
|
+
d as moveIrisChatFrame,
|
|
83
|
+
x as readIrisChatFrameStyle,
|
|
84
|
+
e as readIrisChatFrameWithSizeAnchoredAtBottomRight,
|
|
85
|
+
T as readIrisChatMaxFrameSize,
|
|
86
|
+
M as readIrisChatViewport,
|
|
87
|
+
u as resizeIrisChatFrame
|
|
88
|
+
};
|
|
@@ -13,6 +13,8 @@ export declare function IrisChatSuggestIcon({ size, className }: IconProps): imp
|
|
|
13
13
|
export declare function IrisChatLikeIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare function IrisChatDislikeIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export declare function IrisChatCopyIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function IrisChatCheckIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export declare function IrisChatRetryIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function IrisChatComposerExpandIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export declare function IrisChatSpeakIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
export {};
|
|
@@ -3,20 +3,20 @@ import { cn as h } from "../../../lib/utils.js";
|
|
|
3
3
|
function n({
|
|
4
4
|
size: r = 16,
|
|
5
5
|
className: t,
|
|
6
|
-
children:
|
|
7
|
-
viewBox:
|
|
6
|
+
children: i,
|
|
7
|
+
viewBox: c = "0 0 24 24"
|
|
8
8
|
}) {
|
|
9
9
|
return /* @__PURE__ */ o(
|
|
10
10
|
"svg",
|
|
11
11
|
{
|
|
12
12
|
width: r,
|
|
13
13
|
height: r,
|
|
14
|
-
viewBox:
|
|
14
|
+
viewBox: c,
|
|
15
15
|
fill: "none",
|
|
16
16
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17
17
|
"aria-hidden": !0,
|
|
18
18
|
className: h("block shrink-0", t),
|
|
19
|
-
children:
|
|
19
|
+
children: i
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
}
|
|
@@ -29,7 +29,7 @@ function u({ size: r = 16, className: t }) {
|
|
|
29
29
|
}
|
|
30
30
|
) });
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function a({ size: r = 16, className: t }) {
|
|
33
33
|
return /* @__PURE__ */ o(n, { size: r, viewBox: "0 0 16 16", className: t, children: /* @__PURE__ */ o(
|
|
34
34
|
"path",
|
|
35
35
|
{
|
|
@@ -38,7 +38,7 @@ function l({ size: r = 16, className: t }) {
|
|
|
38
38
|
}
|
|
39
39
|
) });
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function l({ size: r = 16, className: t }) {
|
|
42
42
|
return /* @__PURE__ */ o(n, { size: r, viewBox: "0 0 16 16", className: t, children: /* @__PURE__ */ o(
|
|
43
43
|
"path",
|
|
44
44
|
{
|
|
@@ -47,7 +47,7 @@ function a({ size: r = 16, className: t }) {
|
|
|
47
47
|
}
|
|
48
48
|
) });
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function k({ size: r = 16, className: t }) {
|
|
51
51
|
return /* @__PURE__ */ o(n, { size: r, className: t, children: /* @__PURE__ */ o(
|
|
52
52
|
"path",
|
|
53
53
|
{
|
|
@@ -59,7 +59,7 @@ function C({ size: r = 16, className: t }) {
|
|
|
59
59
|
}
|
|
60
60
|
) });
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function C({ size: r = 16, className: t }) {
|
|
63
63
|
return /* @__PURE__ */ o(n, { size: r, className: t, children: /* @__PURE__ */ o("rect", { x: "6.5", y: "6.5", width: "11", height: "11", rx: "1.5", fill: "currentColor" }) });
|
|
64
64
|
}
|
|
65
65
|
function p({ size: r = 16, className: t }) {
|
|
@@ -83,7 +83,7 @@ function M({ size: r = 14, className: t }) {
|
|
|
83
83
|
}
|
|
84
84
|
) });
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function v({ size: r = 16, className: t }) {
|
|
87
87
|
return /* @__PURE__ */ e(n, { size: r, className: t, children: [
|
|
88
88
|
/* @__PURE__ */ o(
|
|
89
89
|
"path",
|
|
@@ -97,7 +97,7 @@ function f({ size: r = 16, className: t }) {
|
|
|
97
97
|
/* @__PURE__ */ o("path", { d: "M7 10H3.8C3.4 10 3 10.4 3 10.8v8.4c0 .4.4.8.8.8H7", stroke: "currentColor", strokeWidth: "1.6" })
|
|
98
98
|
] });
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function f({ size: r = 16, className: t }) {
|
|
101
101
|
return /* @__PURE__ */ e(n, { size: r, className: t, children: [
|
|
102
102
|
/* @__PURE__ */ o(
|
|
103
103
|
"path",
|
|
@@ -125,7 +125,19 @@ function L({ size: r = 16, className: t }) {
|
|
|
125
125
|
)
|
|
126
126
|
] });
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function W({ size: r = 16, className: t }) {
|
|
129
|
+
return /* @__PURE__ */ o(n, { size: r, className: t, children: /* @__PURE__ */ o(
|
|
130
|
+
"path",
|
|
131
|
+
{
|
|
132
|
+
d: "M5 12.5 9.5 17 19 7",
|
|
133
|
+
stroke: "currentColor",
|
|
134
|
+
strokeWidth: "1.8",
|
|
135
|
+
strokeLinecap: "round",
|
|
136
|
+
strokeLinejoin: "round"
|
|
137
|
+
}
|
|
138
|
+
) });
|
|
139
|
+
}
|
|
140
|
+
function x({ size: r = 16, className: t }) {
|
|
129
141
|
return /* @__PURE__ */ o(n, { size: r, className: t, children: /* @__PURE__ */ o(
|
|
130
142
|
"path",
|
|
131
143
|
{
|
|
@@ -137,7 +149,19 @@ function A({ size: r = 16, className: t }) {
|
|
|
137
149
|
}
|
|
138
150
|
) });
|
|
139
151
|
}
|
|
140
|
-
function
|
|
152
|
+
function A({ size: r = 16, className: t }) {
|
|
153
|
+
return /* @__PURE__ */ o(n, { size: r, viewBox: "0 0 16 16", className: t, children: /* @__PURE__ */ o(
|
|
154
|
+
"path",
|
|
155
|
+
{
|
|
156
|
+
d: "M9.333 2.667h4v4M6.667 13.333H2.667v-4M13.333 2.667 9.75 6.25M2.667 13.333 6.25 9.75",
|
|
157
|
+
stroke: "currentColor",
|
|
158
|
+
strokeWidth: "1.333",
|
|
159
|
+
strokeLinecap: "round",
|
|
160
|
+
strokeLinejoin: "round"
|
|
161
|
+
}
|
|
162
|
+
) });
|
|
163
|
+
}
|
|
164
|
+
function H({ size: r = 16, className: t }) {
|
|
141
165
|
return /* @__PURE__ */ e(n, { size: r, className: t, children: [
|
|
142
166
|
/* @__PURE__ */ o(
|
|
143
167
|
"path",
|
|
@@ -161,16 +185,18 @@ function V({ size: r = 16, className: t }) {
|
|
|
161
185
|
}
|
|
162
186
|
export {
|
|
163
187
|
u as IrisChatAddIcon,
|
|
164
|
-
|
|
188
|
+
a as IrisChatAttachIcon,
|
|
189
|
+
W as IrisChatCheckIcon,
|
|
190
|
+
A as IrisChatComposerExpandIcon,
|
|
165
191
|
L as IrisChatCopyIcon,
|
|
166
|
-
|
|
192
|
+
f as IrisChatDislikeIcon,
|
|
167
193
|
p as IrisChatHamburgerIcon,
|
|
168
|
-
|
|
169
|
-
|
|
194
|
+
v as IrisChatLikeIcon,
|
|
195
|
+
l as IrisChatMicIcon,
|
|
170
196
|
I as IrisChatMinimizeIcon,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
197
|
+
x as IrisChatRetryIcon,
|
|
198
|
+
k as IrisChatSendIcon,
|
|
199
|
+
H as IrisChatSpeakIcon,
|
|
200
|
+
C as IrisChatStopIcon,
|
|
175
201
|
M as IrisChatSuggestIcon
|
|
176
202
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function readIrisChatLaunchAnimationTransition(): string;
|
|
2
|
+
export declare function runIrisChatOpenFromLaunchTarget(input: {
|
|
3
|
+
panel: HTMLDivElement;
|
|
4
|
+
target: HTMLElement;
|
|
5
|
+
onComplete: () => void;
|
|
6
|
+
}): () => void;
|
|
7
|
+
export declare function readIrisChatLaunchAnimationEnabled(input: {
|
|
8
|
+
target: HTMLElement | null;
|
|
9
|
+
panel: HTMLDivElement | null;
|
|
10
|
+
isWindowPlacement: boolean;
|
|
11
|
+
}): boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { readIrisChatCloseTransform as c, readIrisChatCloseAnimationStyle as m, IRIS_CHAT_CLOSE_ANIMATION_MS as r } from "./iris-chat-close-animation.js";
|
|
2
|
+
function d() {
|
|
3
|
+
return `transform ${r}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${r - 40}ms ease-out`;
|
|
4
|
+
}
|
|
5
|
+
function y(e) {
|
|
6
|
+
const n = c(
|
|
7
|
+
e.panel.getBoundingClientRect(),
|
|
8
|
+
e.target.getBoundingClientRect()
|
|
9
|
+
), a = m(n);
|
|
10
|
+
e.panel.style.pointerEvents = "none", e.panel.style.transformOrigin = "center center", e.panel.style.transition = "none", e.panel.style.transform = a.transform, e.panel.style.opacity = a.opacity;
|
|
11
|
+
let o = !1;
|
|
12
|
+
const t = () => {
|
|
13
|
+
o || (o = !0, e.panel.removeEventListener("transitionend", s), l !== null && window.clearTimeout(l), e.panel.style.transition = "", e.panel.style.transform = "", e.panel.style.opacity = "", e.panel.style.pointerEvents = "", e.onComplete());
|
|
14
|
+
}, s = (i) => {
|
|
15
|
+
i.target !== e.panel || i.propertyName !== "transform" || t();
|
|
16
|
+
};
|
|
17
|
+
requestAnimationFrame(() => {
|
|
18
|
+
requestAnimationFrame(() => {
|
|
19
|
+
e.panel.style.transition = d(), e.panel.style.transform = "", e.panel.style.opacity = "1";
|
|
20
|
+
});
|
|
21
|
+
}), e.panel.addEventListener("transitionend", s);
|
|
22
|
+
const l = window.setTimeout(t, r + 80);
|
|
23
|
+
return t;
|
|
24
|
+
}
|
|
25
|
+
function h(e) {
|
|
26
|
+
if (e.target === null || e.panel === null || !e.isWindowPlacement || window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
27
|
+
return !1;
|
|
28
|
+
const n = e.panel.getBoundingClientRect();
|
|
29
|
+
return n.width >= 1 && n.height >= 1;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
h as readIrisChatLaunchAnimationEnabled,
|
|
33
|
+
d as readIrisChatLaunchAnimationTransition,
|
|
34
|
+
y as runIrisChatOpenFromLaunchTarget
|
|
35
|
+
};
|
|
@@ -1,62 +1,102 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ButtonIconTooltip as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { useImpactNovaI18n as
|
|
6
|
-
import { createComponent as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { IrisChatCopyIcon as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useRef as u, useEffect as f } from "react";
|
|
3
|
+
import { ButtonIconTooltip as h } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
4
|
+
import { Button as C } from "../../primitives/button/button.js";
|
|
5
|
+
import { useImpactNovaI18n as w } from "../../../i18n/use-impact-nova-i18n.js";
|
|
6
|
+
import { createComponent as b } from "../../../lib/primitives/create-component.js";
|
|
7
|
+
import { cn as d } from "../../../lib/utils.js";
|
|
8
|
+
import { IrisChatCheckIcon as y, IrisChatCopyIcon as x } from "./iris-chat-icons.js";
|
|
9
|
+
import { writeIrisChatClipboardText as k, IRIS_CHAT_COPY_FEEDBACK_MS as v, irisChatCopySuccessClassName as I, irisChatActionIconPressClassName as N } from "./iris-chat-copy-feedback.js";
|
|
10
|
+
import { irisChatMarkdownVariants as T } from "./iris-chat.variants.js";
|
|
11
|
+
import { Markdown as g } from "../../../node_modules/react-markdown/lib/index.js";
|
|
12
|
+
import M from "../../../node_modules/remark-gfm/lib/index.js";
|
|
13
|
+
function c(r) {
|
|
14
|
+
return typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(c).join("") : r && typeof r == "object" && "props" in r ? c(r.props.children) : "";
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
function A({ children: r }) {
|
|
17
|
+
return /* @__PURE__ */ e("div", { className: "grid w-full min-w-0 max-w-full grid-cols-[minmax(0,1fr)] overflow-hidden rounded-xl border border-stroke-subtle", children: /* @__PURE__ */ e(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "markdown-table-scroll",
|
|
21
|
+
className: "min-w-0 max-w-full overflow-x-auto overflow-y-hidden overscroll-x-contain",
|
|
22
|
+
children: /* @__PURE__ */ e("table", { className: "w-max min-w-full border-separate border-spacing-0 text-sm", children: r })
|
|
23
|
+
}
|
|
24
|
+
) });
|
|
25
|
+
}
|
|
26
|
+
function S({ children: r }) {
|
|
27
|
+
const { t: a } = w(), [o, t] = l(!1), [i, s] = l(!1), n = u(null), p = c(r);
|
|
28
|
+
return f(
|
|
29
|
+
() => () => {
|
|
30
|
+
n.current !== null && window.clearTimeout(n.current);
|
|
31
|
+
},
|
|
32
|
+
[]
|
|
33
|
+
), /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
34
|
+
/* @__PURE__ */ e(
|
|
35
|
+
h,
|
|
20
36
|
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
label: a(o ? "irisChat.copied" : "irisChat.copyCode"),
|
|
38
|
+
open: i,
|
|
39
|
+
onOpenChange: s,
|
|
40
|
+
children: /* @__PURE__ */ e(
|
|
41
|
+
C,
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
variant: "ghost",
|
|
45
|
+
size: "icon",
|
|
46
|
+
className: d(
|
|
47
|
+
"absolute end-1.5 top-1.5 size-7",
|
|
48
|
+
N,
|
|
49
|
+
o && I
|
|
50
|
+
),
|
|
51
|
+
"aria-label": a(o ? "irisChat.copied" : "irisChat.copyCode"),
|
|
52
|
+
"data-testid": "iris-chat-copy-code",
|
|
53
|
+
"data-copied": o ? "" : void 0,
|
|
54
|
+
onClick: () => {
|
|
55
|
+
(async () => await k(p) && (t(!0), s(!0), n.current !== null && window.clearTimeout(n.current), n.current = window.setTimeout(() => {
|
|
56
|
+
t(!1), s(!1), n.current = null;
|
|
57
|
+
}, v)))();
|
|
58
|
+
},
|
|
59
|
+
children: o ? /* @__PURE__ */ e(y, { size: 14 }) : /* @__PURE__ */ e(x, { size: 14 })
|
|
60
|
+
}
|
|
61
|
+
)
|
|
32
62
|
}
|
|
33
|
-
)
|
|
34
|
-
/* @__PURE__ */
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ e("pre", { children: r })
|
|
35
65
|
] });
|
|
36
66
|
}
|
|
37
|
-
const
|
|
67
|
+
const V = b(
|
|
38
68
|
"IrisChatMarkdown",
|
|
39
|
-
({ className: r, children:
|
|
69
|
+
({ className: r, children: a }, o) => /* @__PURE__ */ e(
|
|
40
70
|
"div",
|
|
41
71
|
{
|
|
42
|
-
ref:
|
|
72
|
+
ref: o,
|
|
43
73
|
"data-component": "iris-chat-markdown",
|
|
44
|
-
className:
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
|
|
74
|
+
className: d(T(), r),
|
|
75
|
+
children: /* @__PURE__ */ e(
|
|
76
|
+
g,
|
|
47
77
|
{
|
|
48
|
-
remarkPlugins: [
|
|
78
|
+
remarkPlugins: [M],
|
|
49
79
|
skipHtml: !0,
|
|
50
80
|
components: {
|
|
51
|
-
a: ({ href:
|
|
52
|
-
pre: ({ children:
|
|
81
|
+
a: ({ href: t, children: i }) => /* @__PURE__ */ e("a", { href: t, target: "_blank", rel: "noreferrer", children: i }),
|
|
82
|
+
pre: ({ children: t }) => /* @__PURE__ */ e(S, { children: t }),
|
|
83
|
+
table: ({ children: t }) => /* @__PURE__ */ e(A, { children: t }),
|
|
84
|
+
th: ({ children: t, style: i }) => /* @__PURE__ */ e(
|
|
85
|
+
"th",
|
|
86
|
+
{
|
|
87
|
+
style: i,
|
|
88
|
+
className: "whitespace-nowrap bg-secondary px-3 py-2 text-start text-xs font-semibold",
|
|
89
|
+
children: t
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
td: ({ children: t, style: i }) => /* @__PURE__ */ e("td", { style: i, className: "whitespace-nowrap border-t border-stroke-subtle px-3 py-2", children: t })
|
|
53
93
|
},
|
|
54
|
-
children:
|
|
94
|
+
children: a
|
|
55
95
|
}
|
|
56
96
|
)
|
|
57
97
|
}
|
|
58
98
|
)
|
|
59
99
|
);
|
|
60
100
|
export {
|
|
61
|
-
|
|
101
|
+
V as IrisChatMarkdown
|
|
62
102
|
};
|