@carbon/ai-chat-components 0.5.0 → 0.6.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +9201 -295
- package/dist/16-dhcD1XnN.js +91 -0
- package/dist/apl-DqFn9Cbk.js +91 -0
- package/dist/asciiarmor-CQVR_D9L.js +91 -0
- package/dist/asn1-Bdl290ll.js +91 -0
- package/dist/asterisk-CHhwduFx.js +91 -0
- package/dist/button-C7jiyqgq.js +157 -0
- package/dist/button-skeleton-CmP7IJd9.js +116 -0
- package/dist/carbon-element-Bx5dT_rO.js +91 -0
- package/dist/carbon-element-GZbOyRvd.js +91 -0
- package/dist/chain-of-thought.min.js +276 -0
- package/dist/chat-button.min.js +71 -81
- package/dist/checkbox-skeleton-DwliWSxe.js +166 -0
- package/dist/class-map-C991A_SZ.js +106 -0
- package/dist/clike-D_BRCCKx.js +91 -0
- package/dist/clojure-DJgQfSNr.js +91 -0
- package/dist/cmake-B-ZvYGPj.js +91 -0
- package/dist/cobol-DQkSt8H4.js +91 -0
- package/dist/code-snippet.min.js +91 -0
- package/dist/codemirror-runtime-BNdgITbn.js +173 -0
- package/dist/coffeescript-BLbmGaLw.js +91 -0
- package/dist/collection-helpers-CFQuvZZA.js +91 -0
- package/dist/commonlisp-C9udfub_.js +91 -0
- package/dist/crystal-Cx264mZy.js +91 -0
- package/dist/css-C3wBe_UD.js +91 -0
- package/dist/custom-element-Cn0sJQhF.js +96 -0
- package/dist/cypher-B6v9gzB5.js +91 -0
- package/dist/d-TP3OUaM_.js +91 -0
- package/dist/diff-Y92SrBOy.js +91 -0
- package/dist/dockerfile-b9e_zbYe.js +91 -0
- package/dist/dtd-CyzcM_UR.js +91 -0
- package/dist/dylan-CLgWKLaP.js +91 -0
- package/dist/ebnf-Cj21Kqae.js +91 -0
- package/dist/ecl-BcwtDAaq.js +91 -0
- package/dist/eiffel-Dgs2eMt8.js +91 -0
- package/dist/elm-Lz8luKdH.js +91 -0
- package/dist/erlang-M1-xYwsL.js +91 -0
- package/dist/factor-DMuLpKP7.js +91 -0
- package/dist/fcl-6D51jO4g.js +91 -0
- package/dist/feedback.min.js +300 -0
- package/dist/forth-C50AZvgy.js +91 -0
- package/dist/fortran-Dpu0QrPi.js +91 -0
- package/dist/gas-B9QnMcpy.js +91 -0
- package/dist/gherkin-DTyHG7By.js +91 -0
- package/dist/groovy-C5hIRvZS.js +91 -0
- package/dist/haskell-riE-Rg6U.js +91 -0
- package/dist/haxe-BKi5Bt6T.js +91 -0
- package/dist/http-CCf5f1Lw.js +91 -0
- package/dist/icon-button-slcp5_YI.js +143 -0
- package/dist/icon-loader-B470ctm0.js +101 -0
- package/dist/idl-ChujC8hT.js +91 -0
- package/dist/if-defined-KYZWA80L.js +96 -0
- package/dist/index-BE2hQiYV.js +91 -0
- package/dist/index-BJSu7ZrY.js +91 -0
- package/dist/index-BNCWBho3.js +91 -0
- package/dist/index-Bo9Cedlp.js +91 -0
- package/dist/index-BtGjzzQh.js +91 -0
- package/dist/index-BvcTcg8N.js +91 -0
- package/dist/index-CL7jwlI7.js +91 -0
- package/dist/index-CPho0oBg.js +91 -0
- package/dist/index-CSzVoPB_.js +91 -0
- package/dist/index-CbsQNetX.js +91 -0
- package/dist/index-CdZ_a1WB.js +91 -0
- package/dist/index-Ce_RTZPK.js +91 -0
- package/dist/index-Cic4krlv.js +91 -0
- package/dist/index-CqP0C8Q_.js +91 -0
- package/dist/index-CsEIBvob.js +91 -0
- package/dist/index-D5o8uLCI.js +168 -0
- package/dist/index-D8SIiSq6.js +367 -0
- package/dist/index-DP_9bMys.js +91 -0
- package/dist/index-DofS9KDk.js +91 -0
- package/dist/index-Duo7vkZg.js +91 -0
- package/dist/index-DxcNpyu9.js +91 -0
- package/dist/index-ET89Rloy.js +91 -0
- package/dist/index-LQA85hjt.js +91 -0
- package/dist/index-T4fwu_xG.js +91 -0
- package/dist/javascript-BXzknqbJ.js +91 -0
- package/dist/julia-Ks6uUXS_.js +91 -0
- package/dist/{settings-XW6XylsZ.js → lit-element-Cj6JUqRW.js} +70 -12
- package/dist/livescript-C-N_oa0B.js +91 -0
- package/dist/lua-DyvKK1uJ.js +91 -0
- package/dist/markdown.min.js +296 -0
- package/dist/mathematica-DEg7Ra1Y.js +91 -0
- package/dist/mbox-DreqCmNH.js +91 -0
- package/dist/mirc-Cf2JTO1B.js +91 -0
- package/dist/mllike-BrIsM2v2.js +91 -0
- package/dist/modelica-B8SYrhCg.js +91 -0
- package/dist/mscgen-Ci9STQqX.js +91 -0
- package/dist/mumps-DdZIEnoV.js +91 -0
- package/dist/nginx-csHLvOI4.js +91 -0
- package/dist/nsis-BJ14NiV_.js +91 -0
- package/dist/ntriples-r4TsB1vg.js +91 -0
- package/dist/octave-DAywLo7W.js +91 -0
- package/dist/oz-DF39EOLJ.js +91 -0
- package/dist/pascal-Cdx2JBFI.js +91 -0
- package/dist/perl-CUDzEjb5.js +91 -0
- package/dist/pig-BgGDN3Fs.js +91 -0
- package/dist/powershell-yf7ZzrwA.js +91 -0
- package/dist/processing.min.js +71 -4
- package/dist/properties-Cna57Jh2.js +91 -0
- package/dist/protobuf-CWUMO8BP.js +91 -0
- package/dist/pug-D44aRpDl.js +91 -0
- package/dist/puppet-9oZPpLZK.js +91 -0
- package/dist/python-BzmgDs2d.js +91 -0
- package/dist/q-DDRrIilQ.js +91 -0
- package/dist/query-CIc5rDzI.js +101 -0
- package/dist/r-DT4JIpvb.js +91 -0
- package/dist/radio-group-manager-Dy7yXQky.js +91 -0
- package/dist/reasoning-steps.min.js +171 -0
- package/dist/repeat-DA7noZfi.js +96 -0
- package/dist/rpm-Q94njsnC.js +91 -0
- package/dist/ruby-p6VwoSsc.js +91 -0
- package/dist/sas-C8r72_Ai.js +91 -0
- package/dist/scheme-Bw1qfPdY.js +91 -0
- package/dist/settings-Bx1fCry0.js +99 -0
- package/dist/shell-B0162WXP.js +91 -0
- package/dist/sieve-DcAl9TNY.js +91 -0
- package/dist/simple-mode-dBIHJK_w.js +91 -0
- package/dist/smalltalk-BRpoyy0q.js +91 -0
- package/dist/solr-CntivwdY.js +91 -0
- package/dist/sparql-CPxRv-GB.js +91 -0
- package/dist/spreadsheet-DiWzltX0.js +91 -0
- package/dist/sql-BZFWK8-D.js +91 -0
- package/dist/state-ldHJ0lGt.js +96 -0
- package/dist/stex-DVnajZzj.js +91 -0
- package/dist/stylus-BCkTgCvi.js +91 -0
- package/dist/swift-DumH6rGA.js +91 -0
- package/dist/sync-BrWXU4C6.js +91 -0
- package/dist/table-runtime-C-85Ozvo.js +510 -0
- package/dist/table.min.js +91 -0
- package/dist/tcl-Ds60z3Ro.js +91 -0
- package/dist/text-input-BNmEJ8ys.js +158 -0
- package/dist/textile-CgTb_UUX.js +91 -0
- package/dist/throttle-CT5ZAUBU.js +91 -0
- package/dist/tiddlywiki-D0BukLzX.js +91 -0
- package/dist/tiki-DlrtqA5_.js +91 -0
- package/dist/tile-container.min.js +70 -14
- package/dist/toml-CG0tgYZ1.js +91 -0
- package/dist/toolbar.min.js +180 -0
- package/dist/troff-DZdS2uzR.js +91 -0
- package/dist/ttcn-D2NdeEoM.js +91 -0
- package/dist/ttcn-cfg-dCpHFW8J.js +91 -0
- package/dist/turtle-DBImhCBD.js +91 -0
- package/dist/vb-BdASAZha.js +91 -0
- package/dist/vbscript-DlJph2V7.js +91 -0
- package/dist/velocity-ds6Akj1B.js +91 -0
- package/dist/verilog-KFajwNWD.js +91 -0
- package/dist/vhdl-DWozufY6.js +91 -0
- package/dist/webidl-BSUbcB__.js +91 -0
- package/dist/workspace-shell.min.js +162 -0
- package/dist/xquery-CvISDSSw.js +91 -0
- package/dist/yacas-BNn6e9ff.js +91 -0
- package/dist/z80-BwinLJKG.js +91 -0
- package/es/components/chain-of-thought/index.d.ts +4 -0
- package/es/components/chain-of-thought/index.js +11 -0
- package/es/components/chain-of-thought/index.js.map +1 -0
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.d.ts +15 -0
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js +36 -0
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought.d.ts +87 -0
- package/es/components/chain-of-thought/src/chain-of-thought.js +189 -0
- package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought.scss.js +13 -0
- package/es/components/chain-of-thought/src/chain-of-thought.scss.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought.template.d.ts +5 -0
- package/es/components/chain-of-thought/src/chain-of-thought.template.js +206 -0
- package/es/components/chain-of-thought/src/chain-of-thought.template.js.map +1 -0
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.d.ts +10 -0
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js +50 -0
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js.map +1 -0
- package/es/components/chain-of-thought/src/types.d.ts +73 -0
- package/es/components/chain-of-thought/src/types.js +29 -0
- package/es/components/chain-of-thought/src/types.js.map +1 -0
- package/es/components/chat-button/defs.d.ts +25 -0
- package/es/components/chat-button/defs.js +36 -0
- package/es/components/chat-button/defs.js.map +1 -0
- package/es/components/chat-button/index.d.ts +1 -1
- package/es/components/chat-button/index.js +1 -1
- package/es/components/chat-button/src/chat-button.d.ts +32 -0
- package/es/components/chat-button/{chat-button.js → src/chat-button.js} +16 -10
- package/es/components/chat-button/src/chat-button.js.map +1 -0
- package/es/components/chat-button/src/chat-button.scss.js +1 -1
- package/es/components/code-snippet/index.d.ts +3 -0
- package/es/components/code-snippet/index.js +10 -0
- package/es/components/code-snippet/index.js.map +1 -0
- package/es/components/code-snippet/src/code-snippet-tile-container.d.ts +32 -0
- package/es/components/code-snippet/src/code-snippet-tile-container.js +143 -0
- package/es/components/code-snippet/src/code-snippet-tile-container.js.map +1 -0
- package/es/components/code-snippet/src/code-snippet.d.ts +482 -0
- package/es/components/code-snippet/src/code-snippet.js +592 -0
- package/es/components/code-snippet/src/code-snippet.js.map +1 -0
- package/es/components/code-snippet/src/code-snippet.scss.js +13 -0
- package/es/components/code-snippet/src/code-snippet.scss.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/base-setup.d.ts +12 -0
- package/es/components/code-snippet/src/codemirror/base-setup.js +65 -0
- package/es/components/code-snippet/src/codemirror/base-setup.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/codemirror-loader.d.ts +12 -0
- package/es/components/code-snippet/src/codemirror/codemirror-loader.js +36 -0
- package/es/components/code-snippet/src/codemirror/codemirror-loader.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +7 -0
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.js +13 -0
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/content-sync.d.ts +12 -0
- package/es/components/code-snippet/src/codemirror/content-sync.js +72 -0
- package/es/components/code-snippet/src/codemirror/content-sync.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/editor-manager.d.ts +28 -0
- package/es/components/code-snippet/src/codemirror/editor-manager.js +75 -0
- package/es/components/code-snippet/src/codemirror/editor-manager.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/language-controller.d.ts +38 -0
- package/es/components/code-snippet/src/codemirror/language-controller.js +220 -0
- package/es/components/code-snippet/src/codemirror/language-controller.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/language-data.d.ts +6 -0
- package/es/components/code-snippet/src/codemirror/language-data.js +1043 -0
- package/es/components/code-snippet/src/codemirror/language-data.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/language-utils.d.ts +79 -0
- package/es/components/code-snippet/src/codemirror/language-utils.js +219 -0
- package/es/components/code-snippet/src/codemirror/language-utils.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/marker-utils.d.ts +123 -0
- package/es/components/code-snippet/src/codemirror/marker-utils.js +183 -0
- package/es/components/code-snippet/src/codemirror/marker-utils.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/theme.d.ts +54 -0
- package/es/components/code-snippet/src/codemirror/theme.js +320 -0
- package/es/components/code-snippet/src/codemirror/theme.js.map +1 -0
- package/es/components/code-snippet/src/dom-utils.d.ts +24 -0
- package/es/components/code-snippet/src/dom-utils.js +63 -0
- package/es/components/code-snippet/src/dom-utils.js.map +1 -0
- package/es/components/code-snippet/src/formatters.d.ts +4 -0
- package/es/components/code-snippet/src/formatters.js +19 -0
- package/es/components/code-snippet/src/formatters.js.map +1 -0
- package/es/components/code-snippet/src/layout-utils.d.ts +22 -0
- package/es/components/code-snippet/src/layout-utils.js +63 -0
- package/es/components/code-snippet/src/layout-utils.js.map +1 -0
- package/es/components/code-snippet/src/streaming-manager.d.ts +24 -0
- package/es/components/code-snippet/src/streaming-manager.js +120 -0
- package/es/components/code-snippet/src/streaming-manager.js.map +1 -0
- package/es/components/feedback/index.d.ts +7 -0
- package/es/components/feedback/index.js +12 -0
- package/es/components/feedback/index.js.map +1 -0
- package/es/components/feedback/src/cds-aichat-feedback-buttons.d.ts +15 -0
- package/es/components/feedback/src/cds-aichat-feedback-buttons.js +36 -0
- package/es/components/feedback/src/cds-aichat-feedback-buttons.js.map +1 -0
- package/es/components/feedback/src/cds-aichat-feedback.d.ts +15 -0
- package/es/components/feedback/src/cds-aichat-feedback.js +36 -0
- package/es/components/feedback/src/cds-aichat-feedback.js.map +1 -0
- package/es/components/feedback/src/feedback-buttons.d.ts +56 -0
- package/es/components/feedback/src/feedback-buttons.js +104 -0
- package/es/components/feedback/src/feedback-buttons.js.map +1 -0
- package/es/components/feedback/src/feedback-buttons.scss.js +13 -0
- package/es/components/feedback/src/feedback-buttons.scss.js.map +1 -0
- package/es/components/feedback/src/feedback-buttons.template.d.ts +4 -0
- package/es/components/feedback/src/feedback-buttons.template.js +79 -0
- package/es/components/feedback/src/feedback-buttons.template.js.map +1 -0
- package/es/components/feedback/src/feedback.d.ts +114 -0
- package/es/components/feedback/src/feedback.js +182 -0
- package/es/components/feedback/src/feedback.js.map +1 -0
- package/es/components/feedback/src/feedback.scss.js +13 -0
- package/es/components/feedback/src/feedback.scss.js.map +1 -0
- package/es/components/feedback/src/feedback.template.d.ts +12 -0
- package/es/components/feedback/src/feedback.template.js +115 -0
- package/es/components/feedback/src/feedback.template.js.map +1 -0
- package/es/components/markdown/index.d.ts +2 -0
- package/es/components/markdown/index.js +9 -0
- package/es/components/markdown/index.js.map +1 -0
- package/es/components/markdown/src/cds-aichat-markdown.d.ts +13 -0
- package/es/components/markdown/src/cds-aichat-markdown.js +35 -0
- package/es/components/markdown/src/cds-aichat-markdown.js.map +1 -0
- package/es/components/markdown/src/markdown-renderer.d.ts +62 -0
- package/es/components/markdown/src/markdown-renderer.js +353 -0
- package/es/components/markdown/src/markdown-renderer.js.map +1 -0
- package/es/components/markdown/src/markdown-token-tree.d.ts +32 -0
- package/es/components/markdown/src/markdown-token-tree.js +178 -0
- package/es/components/markdown/src/markdown-token-tree.js.map +1 -0
- package/es/components/markdown/src/markdown.d.ts +44 -0
- package/es/components/markdown/src/markdown.js +238 -0
- package/es/components/markdown/src/markdown.js.map +1 -0
- package/es/components/markdown/src/markdown.scss.js +13 -0
- package/es/components/markdown/src/markdown.scss.js.map +1 -0
- package/es/components/markdown/src/markdown.template.d.ts +3 -0
- package/es/components/markdown/src/markdown.template.js +24 -0
- package/es/components/markdown/src/markdown.template.js.map +1 -0
- package/es/components/markdown/src/plugins/markdown-it-attrs.d.ts +7 -0
- package/es/components/markdown/src/plugins/markdown-it-attrs.js +84 -0
- package/es/components/markdown/src/plugins/markdown-it-attrs.js.map +1 -0
- package/es/components/markdown/src/plugins/markdown-it-highlight.d.ts +7 -0
- package/es/components/markdown/src/plugins/markdown-it-highlight.js +59 -0
- package/es/components/markdown/src/plugins/markdown-it-highlight.js.map +1 -0
- package/es/components/markdown/src/plugins/markdown-it-task-lists.d.ts +12 -0
- package/es/components/markdown/src/plugins/markdown-it-task-lists.js +73 -0
- package/es/components/markdown/src/plugins/markdown-it-task-lists.js.map +1 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/core.d.ts +26 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/core.js +330 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/core.js.map +1 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/blocks.d.ts +6 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/blocks.js +63 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/blocks.js.map +1 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/code.d.ts +6 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/code.js +43 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/code.js.map +1 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/index.d.ts +5 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/index.js +55 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/index.js.map +1 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/inline.d.ts +19 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/inline.js +210 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/inline.js.map +1 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/lists.d.ts +13 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/lists.js +156 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/lists.js.map +1 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/tables.d.ts +13 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/tables.js +216 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/patterns/tables.js.map +1 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/types.d.ts +34 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/types.js +8 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/types.js.map +1 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/utils.d.ts +25 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/utils.js +62 -0
- package/es/components/markdown/src/plugins/markdownItAttrs/utils.js.map +1 -0
- package/es/components/markdown/src/utils/html-helpers.d.ts +2 -0
- package/es/components/markdown/src/utils/html-helpers.js +204 -0
- package/es/components/markdown/src/utils/html-helpers.js.map +1 -0
- package/es/components/markdown/src/utils/table-helpers.d.ts +31 -0
- package/es/components/markdown/src/utils/table-helpers.js +106 -0
- package/es/components/markdown/src/utils/table-helpers.js.map +1 -0
- package/es/components/markdown/src/utils.d.ts +8 -0
- package/es/components/markdown/src/utils.js +31 -0
- package/es/components/markdown/src/utils.js.map +1 -0
- package/es/components/reasoning-steps/index.d.ts +2 -0
- package/es/components/reasoning-steps/index.js +10 -0
- package/es/components/reasoning-steps/index.js.map +1 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.d.ts +29 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.js +231 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.js.map +1 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.scss.js +13 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.scss.js.map +1 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.d.ts +13 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.js +96 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.js.map +1 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.scss.js +13 -0
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.scss.js.map +1 -0
- package/es/components/table/index.d.ts +3 -0
- package/es/components/table/index.js +9 -0
- package/es/components/table/index.js.map +1 -0
- package/es/components/table/src/cds-aichat-table.d.ts +262 -0
- package/es/components/table/src/cds-aichat-table.js +511 -0
- package/es/components/table/src/cds-aichat-table.js.map +1 -0
- package/es/components/table/src/table-loader.d.ts +4 -0
- package/es/components/table/src/table-loader.js +28 -0
- package/es/components/table/src/table-loader.js.map +1 -0
- package/es/components/table/src/table-pagination.template.d.ts +27 -0
- package/es/components/table/src/table-pagination.template.js +55 -0
- package/es/components/table/src/table-pagination.template.js.map +1 -0
- package/es/components/table/src/table-runtime.d.ts +2 -0
- package/es/components/table/src/table-runtime.js +10 -0
- package/es/components/table/src/table-runtime.js.map +1 -0
- package/es/components/table/src/table-skeleton.template.d.ts +6 -0
- package/es/components/table/src/table-skeleton.template.js +34 -0
- package/es/components/table/src/table-skeleton.template.js.map +1 -0
- package/es/components/table/src/table.scss.js +13 -0
- package/es/components/table/src/table.scss.js.map +1 -0
- package/es/components/table/src/table.template.d.ts +10 -0
- package/es/components/table/src/table.template.js +89 -0
- package/es/components/table/src/table.template.js.map +1 -0
- package/es/components/table/src/types.d.ts +13 -0
- package/es/components/table/src/types.js +8 -0
- package/es/components/table/src/types.js.map +1 -0
- package/es/components/tile-container/src/styles.scss.js +1 -1
- package/es/components/toolbar/index.d.ts +1 -0
- package/es/components/toolbar/index.js +9 -0
- package/es/components/toolbar/index.js.map +1 -0
- package/es/components/toolbar/src/toolbar.d.ts +39 -0
- package/es/components/toolbar/src/toolbar.js +179 -0
- package/es/components/toolbar/src/toolbar.js.map +1 -0
- package/es/components/toolbar/src/toolbar.scss.js +13 -0
- package/es/components/toolbar/src/toolbar.scss.js.map +1 -0
- package/es/components/workspace-shell/index.d.ts +5 -0
- package/es/components/workspace-shell/index.js +13 -0
- package/es/components/workspace-shell/index.js.map +1 -0
- package/es/components/workspace-shell/src/styles.scss.js +13 -0
- package/es/components/workspace-shell/src/styles.scss.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell-body.d.ts +16 -0
- package/es/components/workspace-shell/src/workspace-shell-body.js +50 -0
- package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +19 -0
- package/es/components/workspace-shell/src/workspace-shell-footer.js +53 -0
- package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell-header.d.ts +27 -0
- package/es/components/workspace-shell/src/workspace-shell-header.js +77 -0
- package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell-toolbar.d.ts +22 -0
- package/es/components/workspace-shell/src/workspace-shell-toolbar.js +61 -0
- package/es/components/workspace-shell/src/workspace-shell-toolbar.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell.d.ts +20 -0
- package/es/components/workspace-shell/src/workspace-shell.js +83 -0
- package/es/components/workspace-shell/src/workspace-shell.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell.scss.js +13 -0
- package/es/components/workspace-shell/src/workspace-shell.scss.js.map +1 -0
- package/es/globals/utils/uuid.d.ts +5 -0
- package/es/globals/utils/uuid.js +32 -0
- package/es/globals/utils/uuid.js.map +1 -0
- package/es/node_modules/@carbon/utilities/es/documentLang/documentLang.js +9 -0
- package/es/node_modules/@carbon/utilities/es/documentLang/documentLang.js.map +1 -0
- package/es/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js +11 -0
- package/es/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js.map +1 -0
- package/es/node_modules/@codemirror/autocomplete/dist/index.js +258 -0
- package/es/node_modules/@codemirror/autocomplete/dist/index.js.map +1 -0
- package/es/node_modules/@codemirror/commands/dist/index.js +1140 -0
- package/es/node_modules/@codemirror/commands/dist/index.js.map +1 -0
- package/es/node_modules/@codemirror/lint/dist/index.js +636 -0
- package/es/node_modules/@codemirror/lint/dist/index.js.map +1 -0
- package/es/node_modules/@lezer/common/dist/index.js +253 -0
- package/es/node_modules/@lezer/common/dist/index.js.map +1 -0
- package/es/node_modules/crelt/index.js +37 -0
- package/es/node_modules/crelt/index.js.map +1 -0
- package/es/react/ai-label.d.ts +2 -1
- package/es/react/ai-label.js +3 -2
- package/es/react/ai-label.js.map +1 -1
- package/es/react/button.d.ts +2 -1
- package/es/react/button.js +3 -2
- package/es/react/button.js.map +1 -1
- package/es/react/chain-of-thought.d.ts +7 -0
- package/es/react/chain-of-thought.js +29 -0
- package/es/react/chain-of-thought.js.map +1 -0
- package/es/react/chat-button.d.ts +4 -4
- package/es/react/chat-button.js +6 -4
- package/es/react/chat-button.js.map +1 -1
- package/es/react/code-snippet-tile-container.d.ts +5 -0
- package/es/react/code-snippet-tile-container.js +30 -0
- package/es/react/code-snippet-tile-container.js.map +1 -0
- package/es/react/code-snippet.d.ts +4 -0
- package/es/react/code-snippet.js +31 -0
- package/es/react/code-snippet.js.map +1 -0
- package/es/react/content-switcher.d.ts +7 -0
- package/es/react/content-switcher.js +37 -0
- package/es/react/content-switcher.js.map +1 -0
- package/es/react/feedback-buttons.d.ts +4 -0
- package/es/react/feedback-buttons.js +28 -0
- package/es/react/feedback-buttons.js.map +1 -0
- package/es/react/feedback.d.ts +6 -0
- package/es/react/feedback.js +32 -0
- package/es/react/feedback.js.map +1 -0
- package/es/react/icon-button.d.ts +2 -1
- package/es/react/icon-button.js +3 -2
- package/es/react/icon-button.js.map +1 -1
- package/es/react/icon.d.ts +4 -0
- package/es/react/icon.js +28 -0
- package/es/react/icon.js.map +1 -0
- package/es/react/markdown.d.ts +4 -0
- package/es/react/markdown.js +28 -0
- package/es/react/markdown.js.map +1 -0
- package/es/react/overflow-menu.d.ts +9 -0
- package/es/react/overflow-menu.js +40 -0
- package/es/react/overflow-menu.js.map +1 -0
- package/es/react/processing.d.ts +2 -1
- package/es/react/processing.js +3 -2
- package/es/react/processing.js.map +1 -1
- package/es/react/reasoning-step.d.ts +6 -0
- package/es/react/reasoning-step.js +31 -0
- package/es/react/reasoning-step.js.map +1 -0
- package/es/react/reasoning-steps.d.ts +3 -0
- package/es/react/reasoning-steps.js +27 -0
- package/es/react/reasoning-steps.js.map +1 -0
- package/es/react/tile-container.d.ts +2 -1
- package/es/react/tile-container.js +3 -2
- package/es/react/tile-container.js.map +1 -1
- package/es/react/tile.d.ts +3 -2
- package/es/react/tile.js +5 -4
- package/es/react/tile.js.map +1 -1
- package/es/react/toolbar.d.ts +4 -0
- package/es/react/toolbar.js +28 -0
- package/es/react/toolbar.js.map +1 -0
- package/es/react/utils/withWebComponentBridge.d.ts +15 -0
- package/es/react/utils/withWebComponentBridge.js +95 -0
- package/es/react/utils/withWebComponentBridge.js.map +1 -0
- package/es/testing/load-all-lazy-deps.d.ts +10 -0
- package/es/testing/load-all-lazy-deps.js +30 -0
- package/es/testing/load-all-lazy-deps.js.map +1 -0
- package/package.json +39 -5
- package/dist/carbon-element-CMR7BOhG.js +0 -24
- package/dist/class-map-h7IEvsL_.js +0 -39
- package/es/components/chat-button/chat-button.d.ts +0 -23
- package/es/components/chat-button/chat-button.js.map +0 -1
- package/es/components/chat-button/src/chat-button.template.d.ts +0 -16
- package/es/components/chat-button/src/chat-button.template.js +0 -27
- package/es/components/chat-button/src/chat-button.template.js.map +0 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import '@carbon/web-components/es/components/icon-button/index.js';
|
|
9
|
+
import { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';
|
|
10
|
+
import ThumbsDown16 from '@carbon/icons/es/thumbs-down/16.js';
|
|
11
|
+
import ThumbsDownFilled16 from '@carbon/icons/es/thumbs-down--filled/16.js';
|
|
12
|
+
import ThumbsUp16 from '@carbon/icons/es/thumbs-up/16.js';
|
|
13
|
+
import ThumbsUpFilled16 from '@carbon/icons/es/thumbs-up--filled/16.js';
|
|
14
|
+
import { nothing, html } from 'lit';
|
|
15
|
+
import prefix from '../../../globals/settings.js';
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* Copyright IBM Corp. 2025
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
|
22
|
+
*
|
|
23
|
+
* @license
|
|
24
|
+
*/
|
|
25
|
+
const DEFAULT_POSITIVE_LABEL = "Good response";
|
|
26
|
+
const DEFAULT_NEGATIVE_LABEL = "Bad response";
|
|
27
|
+
function feedbackButtonsElementTemplate(customElementClass) {
|
|
28
|
+
const { isPositiveOpen, isNegativeOpen, isPositiveSelected, isNegativeSelected, hasPositiveDetails, hasNegativeDetails, isPositiveDisabled, isNegativeDisabled, positiveLabel, negativeLabel, panelID, } = customElementClass;
|
|
29
|
+
const handleButtonClick = (isPositive) => {
|
|
30
|
+
customElementClass.handleButtonClick?.call(customElementClass, isPositive);
|
|
31
|
+
};
|
|
32
|
+
return html `<div class="${prefix}--feedback-buttons">
|
|
33
|
+
<cds-icon-button
|
|
34
|
+
class="${prefix}--feedback-buttons-positive"
|
|
35
|
+
size="sm"
|
|
36
|
+
align="top-left"
|
|
37
|
+
kind="ghost"
|
|
38
|
+
role="button"
|
|
39
|
+
?disabled=${isPositiveDisabled}
|
|
40
|
+
aria-expanded="${isPositiveDisabled || !hasPositiveDetails
|
|
41
|
+
? nothing
|
|
42
|
+
: isPositiveOpen}"
|
|
43
|
+
aria-pressed="${isPositiveSelected || nothing}"
|
|
44
|
+
aria-controls="${panelID}-feedback-positive"
|
|
45
|
+
@click="${() => handleButtonClick(true)}"
|
|
46
|
+
>
|
|
47
|
+
<span slot="icon"
|
|
48
|
+
>${iconLoader(isPositiveSelected ? ThumbsUpFilled16 : ThumbsUp16)}</span
|
|
49
|
+
>
|
|
50
|
+
<span slot="tooltip-content"
|
|
51
|
+
>${positiveLabel || DEFAULT_POSITIVE_LABEL}</span
|
|
52
|
+
>
|
|
53
|
+
</cds-icon-button>
|
|
54
|
+
<cds-icon-button
|
|
55
|
+
class="${prefix}--feedback-buttons-negative"
|
|
56
|
+
size="sm"
|
|
57
|
+
align="top-left"
|
|
58
|
+
kind="ghost"
|
|
59
|
+
role="button"
|
|
60
|
+
?disabled=${isNegativeDisabled}
|
|
61
|
+
aria-expanded="${isNegativeDisabled || !hasNegativeDetails
|
|
62
|
+
? nothing
|
|
63
|
+
: isNegativeOpen}"
|
|
64
|
+
aria-pressed="${isNegativeSelected || nothing}"
|
|
65
|
+
aria-controls="${panelID}-feedback-negative"
|
|
66
|
+
@click="${() => handleButtonClick(false)}"
|
|
67
|
+
>
|
|
68
|
+
<span slot="icon"
|
|
69
|
+
>${iconLoader(isNegativeSelected ? ThumbsDownFilled16 : ThumbsDown16)}</span
|
|
70
|
+
>
|
|
71
|
+
<span slot="tooltip-content"
|
|
72
|
+
>${negativeLabel || DEFAULT_NEGATIVE_LABEL}</span
|
|
73
|
+
>
|
|
74
|
+
</cds-icon-button>
|
|
75
|
+
</div>`;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { feedbackButtonsElementTemplate };
|
|
79
|
+
//# sourceMappingURL=feedback-buttons.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback-buttons.template.js","sources":["../../../../src/components/feedback/src/feedback-buttons.template.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAcH,MAAM,sBAAsB,GAAG,eAAe;AAC9C,MAAM,sBAAsB,GAAG,cAAc;AAE7C,SAAS,8BAA8B,CACrC,kBAA0C,EAAA;IAE1C,MAAM,EACJ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,OAAO,GACR,GAAG,kBAAkB;AAEtB,IAAA,MAAM,iBAAiB,GAAG,CAAC,UAAmB,KAAI;QAChD,kBAAkB,CAAC,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;AAC5E,IAAA,CAAC;IAED,OAAO,IAAI,CAAA,CAAA,YAAA,EAAe,MAAM,CAAA;;eAEnB,MAAM,CAAA;;;;;kBAKH,kBAAkB;uBACb,kBAAkB,IAAI,CAAC;AACtC,UAAE;AACF,UAAE,cAAc,CAAA;AACF,oBAAA,EAAA,kBAAkB,IAAI,OAAO,CAAA;uBAC5B,OAAO,CAAA;AACd,cAAA,EAAA,MAAM,iBAAiB,CAAC,IAAI,CAAC,CAAA;;;WAGlC,UAAU,CAAC,kBAAkB,GAAG,gBAAgB,GAAG,UAAU,CAAC,CAAA;;;AAG9D,SAAA,EAAA,aAAa,IAAI,sBAAsB,CAAA;;;;eAInC,MAAM,CAAA;;;;;kBAKH,kBAAkB;uBACb,kBAAkB,IAAI,CAAC;AACtC,UAAE;AACF,UAAE,cAAc,CAAA;AACF,oBAAA,EAAA,kBAAkB,IAAI,OAAO,CAAA;uBAC5B,OAAO,CAAA;AACd,cAAA,EAAA,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAAA;;;WAGnC,UAAU,CACX,kBAAkB,GAAG,kBAAkB,GAAG,YAAY,CACvD,CAAA;;;AAGE,SAAA,EAAA,aAAa,IAAI,sBAAsB,CAAA;;;SAGzC;AACT;;;;"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* The component for displaying a panel requesting feedback from a user.
|
|
4
|
+
*/
|
|
5
|
+
declare class FeedbackElement extends LitElement {
|
|
6
|
+
static styles: any;
|
|
7
|
+
/**
|
|
8
|
+
* The CSS class of this panel.
|
|
9
|
+
*/
|
|
10
|
+
class: string;
|
|
11
|
+
/**
|
|
12
|
+
* The ID of this panel.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* Indicates if the feedback details are open.
|
|
17
|
+
*/
|
|
18
|
+
isOpen: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Indicates if the feedback details are readonly.
|
|
21
|
+
*/
|
|
22
|
+
isReadonly: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The initial values to display in the feedback.
|
|
25
|
+
*/
|
|
26
|
+
initialValues?: FeedbackInitialValues;
|
|
27
|
+
/**
|
|
28
|
+
* The title to display in the popup. A default value will be used if no value is provided here.
|
|
29
|
+
*/
|
|
30
|
+
title: string;
|
|
31
|
+
/**
|
|
32
|
+
* The prompt text to display to the user. A default value will be used if no value is provided here.
|
|
33
|
+
*/
|
|
34
|
+
prompt: string;
|
|
35
|
+
/**
|
|
36
|
+
* The list of categories to show.
|
|
37
|
+
*/
|
|
38
|
+
categories?: string[];
|
|
39
|
+
/**
|
|
40
|
+
* The legal disclaimer text to show at the bottom of the popup. This text may contain rich markdown content. If this
|
|
41
|
+
* value is not provided, no text will be shown.
|
|
42
|
+
*/
|
|
43
|
+
disclaimer?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The placeholder to show in the text area. A default value will be used if no value is provided here.
|
|
46
|
+
*/
|
|
47
|
+
placeholder?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The label for the cancel button. A default value will be used if no value is provided here.
|
|
50
|
+
*/
|
|
51
|
+
cancelLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The label for the submit button. A default value will be used if no value is provided here.
|
|
54
|
+
*/
|
|
55
|
+
submitLabel?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Indicates whether the text area should be shown.
|
|
58
|
+
*/
|
|
59
|
+
showTextArea: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Indicates whether the prompt line should be shown.
|
|
62
|
+
*/
|
|
63
|
+
showPrompt: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Internal saved text values for feedback.
|
|
66
|
+
*/
|
|
67
|
+
_textInput: string;
|
|
68
|
+
/**
|
|
69
|
+
* The current set of selected categories.
|
|
70
|
+
*/
|
|
71
|
+
_selectedCategories: Set<string>;
|
|
72
|
+
/**
|
|
73
|
+
* Called when the properties of the component have changed.
|
|
74
|
+
*/
|
|
75
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
76
|
+
/**
|
|
77
|
+
* Updates the initial values used in the component.
|
|
78
|
+
*/
|
|
79
|
+
protected _setInitialValues(values?: FeedbackInitialValues): void;
|
|
80
|
+
/**
|
|
81
|
+
* Stores the current value of the text area used to collect feedback.
|
|
82
|
+
*/
|
|
83
|
+
_handleTextInput(event: InputEvent): void;
|
|
84
|
+
/**
|
|
85
|
+
* Called when the user clicks the submit button.
|
|
86
|
+
*/
|
|
87
|
+
_handleSubmit(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Called then the user clicks the close button.
|
|
90
|
+
*/
|
|
91
|
+
_handleCancel(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Called when a category button is clicked.
|
|
94
|
+
*/
|
|
95
|
+
_handleCategoryClick(event: MouseEvent): void;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The details included when the user clicked the submit button.
|
|
99
|
+
*/
|
|
100
|
+
interface FeedbackSubmitDetails {
|
|
101
|
+
/**
|
|
102
|
+
* The text from the text field.
|
|
103
|
+
*/
|
|
104
|
+
text?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The list of categories selected by the user.
|
|
107
|
+
*/
|
|
108
|
+
selectedCategories?: string[];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The set of initial values that are permitted.
|
|
112
|
+
*/
|
|
113
|
+
type FeedbackInitialValues = FeedbackSubmitDetails | null;
|
|
114
|
+
export { FeedbackElement, type FeedbackSubmitDetails, type FeedbackInitialValues, };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { __decorate } from 'tslib';
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
import { property, state } from 'lit/decorators.js';
|
|
11
|
+
import styles from './feedback.scss.js';
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Copyright IBM Corp. 2025
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*
|
|
19
|
+
* @license
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* The component for displaying a panel requesting feedback from a user.
|
|
23
|
+
*/
|
|
24
|
+
class FeedbackElement extends LitElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
/**
|
|
28
|
+
* Indicates if the feedback details are open.
|
|
29
|
+
*/
|
|
30
|
+
this.isOpen = false;
|
|
31
|
+
/**
|
|
32
|
+
* Indicates if the feedback details are readonly.
|
|
33
|
+
*/
|
|
34
|
+
this.isReadonly = false;
|
|
35
|
+
/**
|
|
36
|
+
* The title to display in the popup. A default value will be used if no value is provided here.
|
|
37
|
+
*/
|
|
38
|
+
this.title = "";
|
|
39
|
+
/**
|
|
40
|
+
* The prompt text to display to the user. A default value will be used if no value is provided here.
|
|
41
|
+
*/
|
|
42
|
+
this.prompt = "";
|
|
43
|
+
/**
|
|
44
|
+
* Indicates whether the text area should be shown.
|
|
45
|
+
*/
|
|
46
|
+
this.showTextArea = true;
|
|
47
|
+
/**
|
|
48
|
+
* Indicates whether the prompt line should be shown.
|
|
49
|
+
*/
|
|
50
|
+
this.showPrompt = true;
|
|
51
|
+
/**
|
|
52
|
+
* Internal saved text values for feedback.
|
|
53
|
+
*/
|
|
54
|
+
this._textInput = "";
|
|
55
|
+
/**
|
|
56
|
+
* The current set of selected categories.
|
|
57
|
+
*/
|
|
58
|
+
this._selectedCategories = new Set();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Called when the properties of the component have changed.
|
|
62
|
+
*/
|
|
63
|
+
updated(changedProperties) {
|
|
64
|
+
if (changedProperties.has("initialValues")) {
|
|
65
|
+
this._setInitialValues(this.initialValues);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Updates the initial values used in the component.
|
|
70
|
+
*/
|
|
71
|
+
_setInitialValues(values) {
|
|
72
|
+
if (values) {
|
|
73
|
+
this._textInput = values.text ?? "";
|
|
74
|
+
this._selectedCategories = new Set(values.selectedCategories ?? []);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this._textInput = "";
|
|
78
|
+
this._selectedCategories = new Set();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Stores the current value of the text area used to collect feedback.
|
|
83
|
+
*/
|
|
84
|
+
_handleTextInput(event) {
|
|
85
|
+
this._textInput = event.currentTarget.value;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Called when the user clicks the submit button.
|
|
89
|
+
*/
|
|
90
|
+
_handleSubmit() {
|
|
91
|
+
this.dispatchEvent(new CustomEvent("feedback-submit", {
|
|
92
|
+
detail: {
|
|
93
|
+
text: this._textInput,
|
|
94
|
+
selectedCategories: Array.from(this._selectedCategories),
|
|
95
|
+
},
|
|
96
|
+
bubbles: true,
|
|
97
|
+
composed: true,
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Called then the user clicks the close button.
|
|
102
|
+
*/
|
|
103
|
+
_handleCancel() {
|
|
104
|
+
this.dispatchEvent(new CustomEvent("feedback-close", {
|
|
105
|
+
bubbles: true,
|
|
106
|
+
composed: true,
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Called when a category button is clicked.
|
|
111
|
+
*/
|
|
112
|
+
_handleCategoryClick(event) {
|
|
113
|
+
if (this.isReadonly) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const button = event.currentTarget;
|
|
117
|
+
const category = button?.getAttribute("data-content");
|
|
118
|
+
if (!category) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const nextSelection = new Set(this._selectedCategories);
|
|
122
|
+
if (nextSelection.has(category)) {
|
|
123
|
+
nextSelection.delete(category);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
nextSelection.add(category);
|
|
127
|
+
}
|
|
128
|
+
this._selectedCategories = nextSelection;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
FeedbackElement.styles = styles;
|
|
132
|
+
__decorate([
|
|
133
|
+
property({ type: String, attribute: "class", reflect: true })
|
|
134
|
+
], FeedbackElement.prototype, "class", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
property({ type: String, reflect: true })
|
|
137
|
+
], FeedbackElement.prototype, "id", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
property({ type: Boolean, attribute: "is-open", reflect: true })
|
|
140
|
+
], FeedbackElement.prototype, "isOpen", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
property({ type: Boolean, attribute: "is-readonly", reflect: true })
|
|
143
|
+
], FeedbackElement.prototype, "isReadonly", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
property({ type: Object, attribute: "initial-values", reflect: true })
|
|
146
|
+
], FeedbackElement.prototype, "initialValues", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
property({ type: String, attribute: "title", reflect: true })
|
|
149
|
+
], FeedbackElement.prototype, "title", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
property({ type: String, attribute: "prompt", reflect: true })
|
|
152
|
+
], FeedbackElement.prototype, "prompt", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
property({ type: Object, attribute: "categories", reflect: true })
|
|
155
|
+
], FeedbackElement.prototype, "categories", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
property({ type: String, attribute: "disclaimer", reflect: true })
|
|
158
|
+
], FeedbackElement.prototype, "disclaimer", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ type: String, attribute: "text-area-placeholder", reflect: true })
|
|
161
|
+
], FeedbackElement.prototype, "placeholder", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
property({ type: String, attribute: "cancel-label", reflect: true })
|
|
164
|
+
], FeedbackElement.prototype, "cancelLabel", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
property({ type: String, attribute: "submit-label", reflect: true })
|
|
167
|
+
], FeedbackElement.prototype, "submitLabel", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
property({ type: Boolean, attribute: "show-text-area", reflect: true })
|
|
170
|
+
], FeedbackElement.prototype, "showTextArea", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
property({ type: Boolean, attribute: "show-prompt", reflect: true })
|
|
173
|
+
], FeedbackElement.prototype, "showPrompt", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
state()
|
|
176
|
+
], FeedbackElement.prototype, "_textInput", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
state()
|
|
179
|
+
], FeedbackElement.prototype, "_selectedCategories", void 0);
|
|
180
|
+
|
|
181
|
+
export { FeedbackElement };
|
|
182
|
+
//# sourceMappingURL=feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.js","sources":["../../../../src/components/feedback/src/feedback.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH;;AAEG;AACH,MAAM,eAAgB,SAAQ,UAAU,CAAA;AAAxC,IAAA,WAAA,GAAA;;AAeE;;AAEG;QAEH,IAAA,CAAA,MAAM,GAAG,KAAK;AAEd;;AAEG;QAEH,IAAA,CAAA,UAAU,GAAG,KAAK;AAQlB;;AAEG;QAEH,IAAA,CAAA,KAAK,GAAG,EAAE;AAEV;;AAEG;QAEH,IAAA,CAAA,MAAM,GAAG,EAAE;AAiCX;;AAEG;QAEH,IAAA,CAAA,YAAY,GAAG,IAAI;AAEnB;;AAEG;QAEH,IAAA,CAAA,UAAU,GAAG,IAAI;AAEjB;;AAEG;QAEH,IAAA,CAAA,UAAU,GAAG,EAAE;AAEf;;AAEG;AAEH,QAAA,IAAA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A,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE;AAC/C,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAMrB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE;AAC/C,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAMrB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE;AACnD,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAMpB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE;AAClD,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAMlB,UAAA,CAAA;AADC,IAAA,KAAK;AACU,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAMhB,UAAA,CAAA;AADC,IAAA,KAAK;AACuC,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,qBAAA,EAAA,MAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { css } from 'lit';
|
|
9
|
+
|
|
10
|
+
var styles = css([".cds-aichat--container{animation:cds-aichat-fade-in .6s forwards;background-color:var(--cds-chat-shell-background,#fff);border:1px solid var(--cds-chat-bubble-border,#e0e0e0);border-radius:.5rem;box-sizing:border-box;container-type:inline-size;inline-size:100%;margin-block-start:.25rem}.cds-aichat--is-closed{display:none}.cds-aichat--title-row{display:flex;margin-block-start:.75rem;margin-inline:1rem .5rem}.cds-aichat--title{flex:1;font-size:var(--cds-heading-compact-01-font-size,.875rem);font-weight:var(--cds-heading-compact-01-font-weight,600);letter-spacing:var(--cds-heading-compact-01-letter-spacing,.16px);line-height:var(--cds-heading-compact-01-line-height,1.28572)}.cds-aichat--close{margin-inline-start:.5rem}.cds-aichat--disclaimer,.cds-aichat--prompt{color:var(--cds-text-secondary,#525252);font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);line-height:var(--cds-body-compact-01-line-height,1.28572);margin-block-start:.5rem;margin-inline:1rem}.cds-aichat--categories{margin-block-start:.5rem;margin-inline:1rem}.cds-aichat--tag-list-container{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem;list-style:none;margin:0;padding:0}.cds-aichat--feedback-text{margin-block-start:.5rem;margin-inline:1rem}.cds-aichat--buttons{display:flex;inline-size:100%;margin-block-start:1rem}.cds-aichat--cancel,.cds-aichat--submit{align-items:stretch;display:flex;flex:1;min-inline-size:0;overflow:hidden}.cds-aichat--submit{border-end-end-radius:.5rem}.cds-aichat--cancel{border-end-start-radius:.5rem}.cds-aichat--cancel cds-button,.cds-aichat--submit cds-button{flex:1;inline-size:100%}"]);
|
|
11
|
+
|
|
12
|
+
export { styles as default };
|
|
13
|
+
//# sourceMappingURL=feedback.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../../markdown/index.js";
|
|
2
|
+
import "@carbon/web-components/es/components/button/index.js";
|
|
3
|
+
import "@carbon/web-components/es/components/chat-button/index.js";
|
|
4
|
+
import "@carbon/web-components/es/components/icon-button/index.js";
|
|
5
|
+
import "@carbon/web-components/es/components/layer/index.js";
|
|
6
|
+
import "@carbon/web-components/es/components/textarea/index.js";
|
|
7
|
+
import { FeedbackElement } from "./feedback.js";
|
|
8
|
+
/**
|
|
9
|
+
* Lit template for feedback.
|
|
10
|
+
*/
|
|
11
|
+
declare function feedbackElementTemplate(customElementClass: FeedbackElement): import("lit-html").TemplateResult<1>;
|
|
12
|
+
export { feedbackElementTemplate };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import '../../markdown/src/cds-aichat-markdown.js';
|
|
9
|
+
import '@carbon/web-components/es/components/button/index.js';
|
|
10
|
+
import '@carbon/web-components/es/components/chat-button/index.js';
|
|
11
|
+
import '@carbon/web-components/es/components/icon-button/index.js';
|
|
12
|
+
import '@carbon/web-components/es/components/layer/index.js';
|
|
13
|
+
import '@carbon/web-components/es/components/textarea/index.js';
|
|
14
|
+
import { html } from 'lit';
|
|
15
|
+
import prefix from '../../../globals/settings.js';
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* Copyright IBM Corp. 2025
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
|
22
|
+
*
|
|
23
|
+
* @license
|
|
24
|
+
*/
|
|
25
|
+
// The maximum number of characters the user is allowed to type into the text area.
|
|
26
|
+
const MAX_TEXT_COUNT = 1000;
|
|
27
|
+
/**
|
|
28
|
+
* Lit template for feedback.
|
|
29
|
+
*/
|
|
30
|
+
function feedbackElementTemplate(customElementClass) {
|
|
31
|
+
const { _handleCancel: handleCancel, _handleSubmit: handleSubmit, _handleTextInput: handleTextInput, _textInput: textInput, _selectedCategories: selectedCategories, _handleCategoryClick: handleCategoryClick, id, isReadonly, isOpen, title, prompt, placeholder, categories, disclaimer, showTextArea, showPrompt, submitLabel, cancelLabel, } = customElementClass;
|
|
32
|
+
const containerClasses = [`${prefix}--container`];
|
|
33
|
+
if (!isOpen) {
|
|
34
|
+
containerClasses.push(`${prefix}--is-closed`);
|
|
35
|
+
}
|
|
36
|
+
return html `<div class="${containerClasses.join(" ")}">
|
|
37
|
+
<div class="${prefix}--title-row">
|
|
38
|
+
<div class="${prefix}--title">
|
|
39
|
+
${title || "Provide additional feedback"}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
${showPrompt
|
|
43
|
+
? html `<div class="${prefix}--prompt">
|
|
44
|
+
${prompt || "What do you think of this response?"}
|
|
45
|
+
</div>`
|
|
46
|
+
: ""}
|
|
47
|
+
${categories?.length
|
|
48
|
+
? html `<div class="${prefix}--categories">
|
|
49
|
+
<ul class="${prefix}--tag-list-container" role="listbox">
|
|
50
|
+
${categories.map((value) => html `<li class="${prefix}--tag-list-item">
|
|
51
|
+
<cds-chat-button
|
|
52
|
+
class="${prefix}--tag-list-button"
|
|
53
|
+
kind="primary"
|
|
54
|
+
size="sm"
|
|
55
|
+
type="button"
|
|
56
|
+
is-quick-action
|
|
57
|
+
role="option"
|
|
58
|
+
aria-pressed="${selectedCategories.has(value)}"
|
|
59
|
+
?is-selected=${selectedCategories.has(value)}
|
|
60
|
+
data-content="${value}"
|
|
61
|
+
?disabled=${isReadonly}
|
|
62
|
+
@click=${handleCategoryClick}
|
|
63
|
+
>
|
|
64
|
+
${value}
|
|
65
|
+
</cds-chat-button>
|
|
66
|
+
</li>`)}
|
|
67
|
+
</ul>
|
|
68
|
+
</div>`
|
|
69
|
+
: ""}
|
|
70
|
+
${showTextArea
|
|
71
|
+
? html `<div class="${prefix}--feedback-text">
|
|
72
|
+
<cds-textarea
|
|
73
|
+
id="${id}-text-area"
|
|
74
|
+
value="${textInput}"
|
|
75
|
+
class="${prefix}--feedback-text-area"
|
|
76
|
+
?disabled=${isReadonly}
|
|
77
|
+
placeholder="${placeholder || "Provide additional feedback..."}"
|
|
78
|
+
rows="3"
|
|
79
|
+
max-count="${MAX_TEXT_COUNT}"
|
|
80
|
+
@input=${handleTextInput}
|
|
81
|
+
></cds-textarea>
|
|
82
|
+
</div>`
|
|
83
|
+
: ""}
|
|
84
|
+
${disclaimer
|
|
85
|
+
? html `<div class="${prefix}--disclaimer">
|
|
86
|
+
<cds-aichat-markdown markdown="${disclaimer}"></cds-aichat-markdown>
|
|
87
|
+
</div>`
|
|
88
|
+
: ""}
|
|
89
|
+
<div class="${prefix}--buttons">
|
|
90
|
+
<div class="${prefix}--cancel">
|
|
91
|
+
<cds-button
|
|
92
|
+
?disabled=${isReadonly}
|
|
93
|
+
size="lg"
|
|
94
|
+
kind="secondary"
|
|
95
|
+
@click=${handleCancel}
|
|
96
|
+
>
|
|
97
|
+
${cancelLabel || "Cancel"}
|
|
98
|
+
</cds-button>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="${prefix}--submit">
|
|
101
|
+
<cds-button
|
|
102
|
+
?disabled=${isReadonly}
|
|
103
|
+
size="lg"
|
|
104
|
+
kind="primary"
|
|
105
|
+
@click=${handleSubmit}
|
|
106
|
+
>
|
|
107
|
+
${submitLabel || "Submit"}
|
|
108
|
+
</cds-button>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export { feedbackElementTemplate };
|
|
115
|
+
//# sourceMappingURL=feedback.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.template.js","sources":["../../../../src/components/feedback/src/feedback.template.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAcH;AACA,MAAM,cAAc,GAAG,I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AU;6BACb,mBAAmB;;sBAE1B,KAAK;;sBAEL,CACT;;AAEE,cAAA;AACT,UAAE,EAAE;MACJ;AACA,UAAE,IAAI,CAAA,CAAA,YAAA,EAAe,MAAM,CAAA;;kBAEf,EAAE,CAAA;qBACC,SAAS,CAAA;qBACT,MAAM,CAAA;wBACH,UAAU;AACP,yBAAA,EAAA,WAAW,IAAI,gCAAgC,CAAA;;yBAEjD,cAAc,CAAA;qBAClB,eAAe;;AAErB,cAAA;AACT,UAAE,EAAE;MACJ;AACA,UAAE,IAAI,CAAA,CAAA,YAAA,EAAe,MAAM,CAAA;2CACU,UAAU,CAAA;AACtC,cAAA;AACT,UAAE,EAAE;kBACQ,MAAM,CAAA;oBACJ,MAAM,CAAA;;sBAEJ,UAAU;;;mBAGb,YAAY;;AAEnB,UAAA,EAAA,WAAW,IAAI,QAAQ;;;oBAGf,MAAM,CAAA;;sBAEJ,UAAU;;;mBAGb,YAAY;;AAEnB,UAAA,EAAA,WAAW,IAAI,QAAQ;;;;SAI1B;AACT;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export { MARKDOWN_COMPONENT_TAG_NAME, default } from './src/cds-aichat-markdown.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import MarkdownElement from "./markdown.js";
|
|
2
|
+
declare const MARKDOWN_COMPONENT_TAG_NAME = "cds-aichat-markdown";
|
|
3
|
+
declare class CDSChatMarkdownElement extends MarkdownElement {
|
|
4
|
+
static styles: any;
|
|
5
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
[MARKDOWN_COMPONENT_TAG_NAME]: CDSChatMarkdownElement;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export { MARKDOWN_COMPONENT_TAG_NAME };
|
|
13
|
+
export default CDSChatMarkdownElement;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { __decorate } from 'tslib';
|
|
9
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
10
|
+
import MarkdownElement from './markdown.js';
|
|
11
|
+
import { markdownTemplate } from './markdown.template.js';
|
|
12
|
+
import styles from './markdown.scss.js';
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* Copyright IBM Corp. 2025
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*
|
|
20
|
+
* @license
|
|
21
|
+
*/
|
|
22
|
+
const MARKDOWN_COMPONENT_TAG_NAME = "cds-aichat-markdown";
|
|
23
|
+
let CDSChatMarkdownElement = class CDSChatMarkdownElement extends MarkdownElement {
|
|
24
|
+
render() {
|
|
25
|
+
return markdownTemplate(this);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
CDSChatMarkdownElement.styles = styles;
|
|
29
|
+
CDSChatMarkdownElement = __decorate([
|
|
30
|
+
carbonElement(MARKDOWN_COMPONENT_TAG_NAME)
|
|
31
|
+
], CDSChatMarkdownElement);
|
|
32
|
+
var CDSAIChatMarkdown = CDSChatMarkdownElement;
|
|
33
|
+
|
|
34
|
+
export { MARKDOWN_COMPONENT_TAG_NAME, CDSAIChatMarkdown as default };
|
|
35
|
+
//# sourceMappingURL=cds-aichat-markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cds-aichat-markdown.js","sources":["../../../../src/components/markdown/src/cds-aichat-markdown.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAQH,MAAM,2BAA2B,GAAG;AAGpC,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,eAAe,CAAA;IAGlD,MAAM,GAAA;AACJ,QAAA,OAAO,gBAAgB,CAAC,IAAI,CAAC;IAC/B;;AAJO,sBAAA,CAAA,MAAM,GAAG,MAAH;AADT,sBAAsB,GAAA,UAAA,CAAA;IAD3B,aAAa,CAAC,2BAA2B;AACpC,CAAA,EAAA,sBAAsB,CAM3B;AASD,wBAAe,sBAAsB;;;;"}
|