@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 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Token } from "markdown-it";
|
|
2
|
+
/**
|
|
3
|
+
* Escapes special regex characters in a string for use in regular expressions.
|
|
4
|
+
*/
|
|
5
|
+
export declare function escapeRegExp(s: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Gets an element from an array, supporting negative indices for accessing from the end.
|
|
8
|
+
*/
|
|
9
|
+
export declare function get<T>(arr: T[], n: number): T | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the last element of an array, or an empty object if the array is empty.
|
|
12
|
+
*/
|
|
13
|
+
export declare function last<T>(arr: T[]): T;
|
|
14
|
+
/**
|
|
15
|
+
* Type guard to check if a value is a non-empty array of objects.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isArrayOfObjects(arr: unknown): arr is Record<string, unknown>[];
|
|
18
|
+
/**
|
|
19
|
+
* Type guard to check if a value is a non-empty array of functions.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isArrayOfFunctions(arr: unknown): arr is ((arg: unknown) => boolean)[];
|
|
22
|
+
/**
|
|
23
|
+
* Recursively hides a token and all its children by setting their hidden flag and clearing content.
|
|
24
|
+
*/
|
|
25
|
+
export declare function hidden(token: Token): void;
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
/*
|
|
9
|
+
* Copyright IBM Corp. 2025
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*
|
|
14
|
+
* @license
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Escapes special regex characters in a string for use in regular expressions.
|
|
18
|
+
*/
|
|
19
|
+
function escapeRegExp(s) {
|
|
20
|
+
return s.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Gets an element from an array, supporting negative indices for accessing from the end.
|
|
24
|
+
*/
|
|
25
|
+
function get(arr, n) {
|
|
26
|
+
return n >= 0 ? arr[n] : arr[arr.length + n];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns the last element of an array, or an empty object if the array is empty.
|
|
30
|
+
*/
|
|
31
|
+
function last(arr) {
|
|
32
|
+
return arr.slice(-1)[0] || {};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Type guard to check if a value is a non-empty array of objects.
|
|
36
|
+
*/
|
|
37
|
+
function isArrayOfObjects(arr) {
|
|
38
|
+
return (Array.isArray(arr) &&
|
|
39
|
+
arr.length > 0 &&
|
|
40
|
+
arr.every((i) => typeof i === "object"));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Type guard to check if a value is a non-empty array of functions.
|
|
44
|
+
*/
|
|
45
|
+
function isArrayOfFunctions(arr) {
|
|
46
|
+
return (Array.isArray(arr) &&
|
|
47
|
+
arr.length > 0 &&
|
|
48
|
+
arr.every((i) => typeof i === "function"));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Recursively hides a token and all its children by setting their hidden flag and clearing content.
|
|
52
|
+
*/
|
|
53
|
+
function hidden(token) {
|
|
54
|
+
token.hidden = true;
|
|
55
|
+
token.children?.forEach((t) => {
|
|
56
|
+
t.content = "";
|
|
57
|
+
hidden(t);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { escapeRegExp, get, hidden, isArrayOfFunctions, isArrayOfObjects, last };
|
|
62
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../src/components/markdown/src/plugins/markdownItAttrs/utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAIH;;AAEG;AACG,SAAU,YAAY,CAAC,CAAS,EAAA;IACpC,OAAO,CAAC,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC;AACnD;AAEA;;AAEG;AACG,SAAU,GAAG,CAAI,GAAQ,EAAE,CAAS,EAAA;IACxC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9C;AAEA;;AAEG;AACG,SAAU,IAAI,CAAI,GAAQ,EAAA;AAC9B,IAAA,OAAO,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAK,EAAQ;AACtC;AAEA;;AAEG;AACG,SAAU,gBAAgB,CAC9B,GAAY,EAAA;AAEZ,IAAA,QACE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAClB,GAAG,CAAC,MAAM,GAAG,CAAC;AACd,QAAA,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,KAAK,QAAQ,CAAC;AAE3C;AAEA;;AAEG;AACG,SAAU,kBAAkB,CAChC,GAAY,EAAA;AAEZ,IAAA,QACE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAClB,GAAG,CAAC,MAAM,GAAG,CAAC;AACd,QAAA,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,KAAK,UAAU,CAAC;AAE7C;AAEA;;AAEG;AACG,SAAU,MAAM,CAAC,KAAY,EAAA;AACjC,IAAA,KAAK,CAAC,MAAM,GAAG,IAAI;IACnB,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,KAAI;AAC5B,QAAA,CAAC,CAAC,OAAO,GAAG,EAAE;QACd,MAAM,CAAC,CAAC,CAAC;AACX,IAAA,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1,204 @@
|
|
|
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
|
+
/*
|
|
9
|
+
* Copyright IBM Corp. 2025
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*
|
|
14
|
+
* @license
|
|
15
|
+
*/
|
|
16
|
+
// HTML elements that never ship closing tags; treat them as self-closing so the stack logic does not wait for </tag>.
|
|
17
|
+
const SELF_CLOSING_HTML_TAGS = new Set([
|
|
18
|
+
"area",
|
|
19
|
+
"base",
|
|
20
|
+
"br",
|
|
21
|
+
"col",
|
|
22
|
+
"embed",
|
|
23
|
+
"hr",
|
|
24
|
+
"img",
|
|
25
|
+
"input",
|
|
26
|
+
"link",
|
|
27
|
+
"meta",
|
|
28
|
+
"param",
|
|
29
|
+
"source",
|
|
30
|
+
"track",
|
|
31
|
+
"wbr",
|
|
32
|
+
]);
|
|
33
|
+
// Token types we can safely glue into the combined HTML chunk. Anything else (e.g., emphasis markers) should abort
|
|
34
|
+
// the merge to avoid damaging markdown.
|
|
35
|
+
const INLINE_HTML_ALLOWED_TOKEN_TYPES = new Set([
|
|
36
|
+
"html_inline",
|
|
37
|
+
"text",
|
|
38
|
+
"softbreak",
|
|
39
|
+
"hardbreak",
|
|
40
|
+
"code_inline",
|
|
41
|
+
"entity",
|
|
42
|
+
"link_open",
|
|
43
|
+
"link_close",
|
|
44
|
+
]);
|
|
45
|
+
// Minimal tag parser that ignores comments/entities (e.g., <!-- ... -->) and reports whether a tag opens, closes, or
|
|
46
|
+
// self-closes a given element.
|
|
47
|
+
function parseHtmlInlineTag(content) {
|
|
48
|
+
const trimmed = (content ?? "").trim();
|
|
49
|
+
if (!trimmed.startsWith("<") || !trimmed.endsWith(">")) {
|
|
50
|
+
// Not bracketed like "<...>"; definitely not a tag token.
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
if (trimmed.startsWith("</")) {
|
|
54
|
+
// Closing tag: extract the element name. Reject malformed endings.
|
|
55
|
+
const closingMatch = trimmed.match(/^<\/\s*([A-Za-z][\w:-]*)\s*>$/);
|
|
56
|
+
if (!closingMatch) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return { kind: "closing", tagName: closingMatch[1].toLowerCase() };
|
|
60
|
+
}
|
|
61
|
+
// Skip comments/doctype/instruction fragments; they cannot help balance nesting.
|
|
62
|
+
if (trimmed.startsWith("<!") ||
|
|
63
|
+
trimmed.startsWith("<?") ||
|
|
64
|
+
trimmed.startsWith("<%")) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
// Opening tag: grab the element name even if attributes trail after it.
|
|
68
|
+
const openingMatch = trimmed.match(/^<\s*([A-Za-z][\w:-]*)\b[\s\S]*>$/);
|
|
69
|
+
if (!openingMatch) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const tagName = openingMatch[1].toLowerCase();
|
|
73
|
+
// Treat `<tag/>` and the HTML void elements as self-contained so they do not
|
|
74
|
+
// add entries to the stack.
|
|
75
|
+
const selfClosing = trimmed.endsWith("/>") || SELF_CLOSING_HTML_TAGS.has(tagName);
|
|
76
|
+
return { kind: "opening", tagName, selfClosing };
|
|
77
|
+
}
|
|
78
|
+
// Collapses runs of html_inline tokens (possibly interleaved with text) into a
|
|
79
|
+
// single token so the browser does not auto-close the first tag mid-render.
|
|
80
|
+
function combineConsecutiveHtmlInline(children) {
|
|
81
|
+
if (children.length < 2) {
|
|
82
|
+
return children;
|
|
83
|
+
}
|
|
84
|
+
const combinedChildren = [];
|
|
85
|
+
let didCombine = false;
|
|
86
|
+
for (let index = 0; index < children.length; index++) {
|
|
87
|
+
const startNode = children[index];
|
|
88
|
+
if (startNode.token.type !== "html_inline") {
|
|
89
|
+
combinedChildren.push(startNode);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const openingTag = parseHtmlInlineTag(startNode.token.content);
|
|
93
|
+
if (!openingTag ||
|
|
94
|
+
openingTag.kind !== "opening" ||
|
|
95
|
+
openingTag.selfClosing) {
|
|
96
|
+
combinedChildren.push(startNode);
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const stack = [openingTag.tagName]; // Track nested openings we must close.
|
|
100
|
+
const chunkTokens = [startNode]; // Collect tokens to merge if the stack clears.
|
|
101
|
+
let content = startNode.token.content ?? "";
|
|
102
|
+
let endIndex = index;
|
|
103
|
+
let success = false;
|
|
104
|
+
for (let lookahead = index + 1; lookahead < children.length; lookahead++) {
|
|
105
|
+
const candidate = children[lookahead];
|
|
106
|
+
const tokenType = candidate.token.type ?? "";
|
|
107
|
+
if (!INLINE_HTML_ALLOWED_TOKEN_TYPES.has(tokenType)) {
|
|
108
|
+
// Encountered formatting/inline constructs we do not know how to merge.
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
if (tokenType === "html_inline") {
|
|
112
|
+
const parsed = parseHtmlInlineTag(candidate.token.content);
|
|
113
|
+
if (!parsed) {
|
|
114
|
+
// Malformed tag; abandon the merge.
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
chunkTokens.push(candidate);
|
|
118
|
+
content += candidate.token.content ?? "";
|
|
119
|
+
if (parsed.kind === "opening") {
|
|
120
|
+
if (!parsed.selfClosing) {
|
|
121
|
+
// Push nested openers so we wait for their matching closers too.
|
|
122
|
+
stack.push(parsed.tagName);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
const expected = stack[stack.length - 1];
|
|
127
|
+
if (expected !== parsed.tagName) {
|
|
128
|
+
// Mismatched closing tag; bail before corrupting structure.
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
stack.pop();
|
|
132
|
+
endIndex = lookahead;
|
|
133
|
+
if (stack.length === 0) {
|
|
134
|
+
// All openings matched; we can fuse the run.
|
|
135
|
+
success = true;
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
// Non-tag inline content (text, code, breaks, links) is safe to append.
|
|
142
|
+
chunkTokens.push(candidate);
|
|
143
|
+
content += serializeInlineToken(candidate);
|
|
144
|
+
}
|
|
145
|
+
if (!success) {
|
|
146
|
+
return combinedChildren;
|
|
147
|
+
}
|
|
148
|
+
if (stack.length === 0 && endIndex > index) {
|
|
149
|
+
combinedChildren.push({
|
|
150
|
+
key: chunkTokens.map((token) => token.key).join("|"),
|
|
151
|
+
token: {
|
|
152
|
+
...startNode.token,
|
|
153
|
+
content,
|
|
154
|
+
},
|
|
155
|
+
children: [],
|
|
156
|
+
});
|
|
157
|
+
index = endIndex; // Skip over tokens we already collapsed.
|
|
158
|
+
didCombine = true;
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
combinedChildren.push(startNode);
|
|
162
|
+
}
|
|
163
|
+
return didCombine ? combinedChildren : children;
|
|
164
|
+
}
|
|
165
|
+
function serializeInlineToken(tokenTree) {
|
|
166
|
+
const token = tokenTree.token;
|
|
167
|
+
const type = token.type ?? "";
|
|
168
|
+
if (type === "text" ||
|
|
169
|
+
type === "code_inline" ||
|
|
170
|
+
type === "softbreak" ||
|
|
171
|
+
type === "hardbreak" ||
|
|
172
|
+
type === "entity" ||
|
|
173
|
+
type === "html_inline") {
|
|
174
|
+
return token.content ?? "";
|
|
175
|
+
}
|
|
176
|
+
if (type === "link_open") {
|
|
177
|
+
const attrs = (token.attrs ?? []);
|
|
178
|
+
const attrString = attrs
|
|
179
|
+
.map(([name, value]) => {
|
|
180
|
+
if (!name) {
|
|
181
|
+
return "";
|
|
182
|
+
}
|
|
183
|
+
if (value === undefined || value === null) {
|
|
184
|
+
return name;
|
|
185
|
+
}
|
|
186
|
+
const escaped = String(value).replace(/"/g, """);
|
|
187
|
+
return `${name}="${escaped}"`;
|
|
188
|
+
})
|
|
189
|
+
.filter(Boolean)
|
|
190
|
+
.join(" ");
|
|
191
|
+
const childContent = (tokenTree.children ?? [])
|
|
192
|
+
.map((child) => serializeInlineToken(child))
|
|
193
|
+
.join("");
|
|
194
|
+
const openTag = attrString.length ? `<a ${attrString}>` : "<a>";
|
|
195
|
+
return `${openTag}${childContent}</a>`;
|
|
196
|
+
}
|
|
197
|
+
if (type === "link_close") {
|
|
198
|
+
return "";
|
|
199
|
+
}
|
|
200
|
+
return token.content ?? "";
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export { combineConsecutiveHtmlInline };
|
|
204
|
+
//# sourceMappingURL=html-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-helpers.js","sources":["../../../../../src/components/markdown/src/utils/html-helpers.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAIH;AAC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AAI,KAAK,KAAK,IAAI,EAAE;AACzC,gBAAA,OAAO,IAAI;YACb;AACA,YAAA,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;AACrD,YAAA,OAAO,CAAA,EAAG,IAAI,CAAA,EAAA,EAAK,OAAO,GAAG;AAC/B,QAAA,CAAC;aACA,MAAM,CAAC,OAAO;aACd,IAAI,CAAC,GAAG,CAAC;QAEZ,MAAM,YAAY,GAAG,CAAC,SAAS,CAAC,QAAQ,IAAI,EAAE;aAC3C,GAAG,CAAC,CAAC,KAAK,KAAK,oBAAoB,CAAC,KAAK,CAAC;aAC1C,IAAI,CAAC,EAAE,CAAC;AAEX,QAAA,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,GAAG,CAAA,GAAA,EAAM,UAAU,CAAA,CAAA,CAAG,GAAG,KAAK;AAC/D,QAAA,OAAO,CAAA,EAAG,OAAO,CAAA,EAAG,YAAY,MAAM;IACxC;AAEA,IAAA,IAAI,IAAI,KAAK,YAAY,EAAE;AACzB,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,OAAO,KAAK,CAAC,OAAO,IAAI,EAAE;AAC5B;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TokenTree } from "../markdown-token-tree";
|
|
2
|
+
export declare const DEFAULT_PAGINATION_SUPPLEMENTAL_TEXT: ({ count, }: {
|
|
3
|
+
count: number;
|
|
4
|
+
}) => string;
|
|
5
|
+
export declare const DEFAULT_PAGINATION_STATUS_TEXT: ({ start, end, count, }: {
|
|
6
|
+
start: number;
|
|
7
|
+
end: number;
|
|
8
|
+
count: number;
|
|
9
|
+
}) => string;
|
|
10
|
+
export interface TableCellData {
|
|
11
|
+
text: string;
|
|
12
|
+
tokens: TokenTree[] | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Extracts tabular data from a table TokenTree node.
|
|
16
|
+
*
|
|
17
|
+
* Converts the hierarchical markdown table structure into the flat
|
|
18
|
+
* header/rows format expected by the cds-aichat-table component while retaining
|
|
19
|
+
* the TokenTree children required for rich rendering within cells.
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractTableData(tableNode: TokenTree): {
|
|
22
|
+
headers: TableCellData[];
|
|
23
|
+
rows: TableCellData[][];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Recursively extracts plain text content from a TokenTree node.
|
|
27
|
+
*
|
|
28
|
+
* This is used for table cells and other contexts where we need the
|
|
29
|
+
* text content without HTML formatting.
|
|
30
|
+
*/
|
|
31
|
+
export declare function extractTextContent(node: TokenTree): string;
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
/*
|
|
9
|
+
* Copyright IBM Corp. 2025
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*
|
|
14
|
+
* @license
|
|
15
|
+
*/
|
|
16
|
+
// Default localization functions for table pagination
|
|
17
|
+
const DEFAULT_PAGINATION_SUPPLEMENTAL_TEXT = ({ count, }) => `${count} items`;
|
|
18
|
+
const DEFAULT_PAGINATION_STATUS_TEXT = ({ start, end, count, }) => `${start}–${end} of ${count} items`;
|
|
19
|
+
/**
|
|
20
|
+
* Extracts tabular data from a table TokenTree node.
|
|
21
|
+
*
|
|
22
|
+
* Converts the hierarchical markdown table structure into the flat
|
|
23
|
+
* header/rows format expected by the cds-aichat-table component while retaining
|
|
24
|
+
* the TokenTree children required for rich rendering within cells.
|
|
25
|
+
*/
|
|
26
|
+
function extractTableData(tableNode) {
|
|
27
|
+
const headers = [];
|
|
28
|
+
const rows = [];
|
|
29
|
+
for (const child of tableNode.children) {
|
|
30
|
+
if (child.token.tag === "thead") {
|
|
31
|
+
// Extract column headers
|
|
32
|
+
for (const theadChild of child.children) {
|
|
33
|
+
if (theadChild.token.tag === "tr") {
|
|
34
|
+
for (const thChild of theadChild.children) {
|
|
35
|
+
if (thChild.token.tag === "th") {
|
|
36
|
+
headers.push(extractCellData(thChild));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (child.token.tag === "tbody") {
|
|
43
|
+
// Extract data rows
|
|
44
|
+
for (const tbodyChild of child.children) {
|
|
45
|
+
if (tbodyChild.token.tag === "tr") {
|
|
46
|
+
const row = [];
|
|
47
|
+
for (const tdChild of tbodyChild.children) {
|
|
48
|
+
if (tdChild.token.tag === "td") {
|
|
49
|
+
row.push(extractCellData(tdChild));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
rows.push(row);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return { headers, rows };
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Recursively extracts plain text content from a TokenTree node.
|
|
61
|
+
*
|
|
62
|
+
* This is used for table cells and other contexts where we need the
|
|
63
|
+
* text content without HTML formatting.
|
|
64
|
+
*/
|
|
65
|
+
function extractTextContent(node) {
|
|
66
|
+
// Handle direct text tokens
|
|
67
|
+
if (node.token.type === "text") {
|
|
68
|
+
return node.token.content || "";
|
|
69
|
+
}
|
|
70
|
+
// Handle inline code
|
|
71
|
+
if (node.token.type === "code_inline") {
|
|
72
|
+
return node.token.content || "";
|
|
73
|
+
}
|
|
74
|
+
if (node.token.type === "softbreak" || node.token.type === "hardbreak") {
|
|
75
|
+
return "\n";
|
|
76
|
+
}
|
|
77
|
+
// Recursively extract text from child nodes
|
|
78
|
+
let text = "";
|
|
79
|
+
for (const child of node.children) {
|
|
80
|
+
text += extractTextContent(child);
|
|
81
|
+
}
|
|
82
|
+
return text;
|
|
83
|
+
}
|
|
84
|
+
function extractCellData(node) {
|
|
85
|
+
const text = extractTextContent(node);
|
|
86
|
+
const tokens = extractRenderableChildren(node);
|
|
87
|
+
const hasRichContent = tokens.some((child) => child.token.type !== "text");
|
|
88
|
+
return {
|
|
89
|
+
text,
|
|
90
|
+
tokens: hasRichContent ? tokens : null,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function extractRenderableChildren(node) {
|
|
94
|
+
if (node.children.length === 1) {
|
|
95
|
+
const onlyChild = node.children[0];
|
|
96
|
+
if (onlyChild.token.type === "inline" &&
|
|
97
|
+
onlyChild.children &&
|
|
98
|
+
onlyChild.children.length) {
|
|
99
|
+
return onlyChild.children;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return node.children;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { DEFAULT_PAGINATION_STATUS_TEXT, DEFAULT_PAGINATION_SUPPLEMENTAL_TEXT, extractTableData, extractTextContent };
|
|
106
|
+
//# sourceMappingURL=table-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-helpers.js","sources":["../../../../../src/components/markdown/src/utils/table-helpers.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAIH;AACO,MAAM,oCAAoC,GAAG,CAAC,EACnD,KAAK,GAGN,KAAK,CAAA,EAAG,KAAK;MACD,8BAA8B,GAAG,CAAC,EAC7C,KAAK,EACL,GAAG,EACH,KAAK,GAKN,KAAK,CAAA,EAAG,KAAK,IAAI,GAAG,CAAA,IAAA,EAAO,KAAK,CAAA,MAAA;AAOjC;;;;;;AAMG;AACG,SAAU,gBAAgB,CAAC,SAAoB,EAAA;IAInD,MAAM,OAAO,GAAoB,EAAE;IACnC,MAAM,IAAI,GAAsB,EAAE;AAElC,IAAA,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,QAAQ,EAAE;QACtC,IAAI,KAAK,CAAC,K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AEA,IAAA,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,WAAW,EAAE;AACtE,QAAA,OAAO,IAAI;IACb;;IAGA,IAAI,IAAI,GAAG,EAAE;AACb,IAAA,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjC,QAAA,IAAI,IAAI,kBAAkB,CAAC,KAAK,CAAC;IACnC;AAEA,IAAA,OAAO,IAAI;AACb;AAEA,SAAS,eAAe,CAAC,IAAe,EAAA;AACtC,IAAA,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC;AACrC,IAAA,MAAM,MAAM,GAAG,yBAAyB,CAAC,IAAI,CAAC;AAC9C,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC;IAE1E,OAAO;QACL,IAAI;QACJ,MAAM,EAAE,cAAc,GAAG,MAAM,GAAG,IAAI;KACvC;AACH;AAEA,SAAS,yBAAyB,CAAC,IAAe,EAAA;IAChD,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QAC9B,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AAClC,QAAA,IACE,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,QAAQ;AACjC,YAAA,SAAS,CAAC,QAAQ;AAClB,YAAA,SAAS,CAAC,QAAQ,CAAC,MAAM,EACzB;YACA,OAAO,SAAS,CAAC,QAAQ;QAC3B;IACF;IAEA,OAAO,IAAI,CAAC,QAAQ;AACtB;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
/*
|
|
9
|
+
* Copyright IBM Corp. 2025
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*
|
|
14
|
+
* @license
|
|
15
|
+
*/
|
|
16
|
+
const CONSOLE_PREFIX = "[carbon-ai-chat-components]";
|
|
17
|
+
/**
|
|
18
|
+
* Console error with prefix
|
|
19
|
+
*/
|
|
20
|
+
function consoleError(message, ...args) {
|
|
21
|
+
console.error(`${CONSOLE_PREFIX} ${message}`, ...args);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Console log with prefix
|
|
25
|
+
*/
|
|
26
|
+
function consoleLog(message, ...args) {
|
|
27
|
+
console.log(`${CONSOLE_PREFIX} ${message}`, ...args);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { consoleError, consoleLog };
|
|
31
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/components/markdown/src/utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH,MAAM,cAAc,GAAG,6BAA6B;AAEpD;;AAEG;SACa,YAAY,CAAC,OAAe,EAAE,GAAG,IAAW,EAAA;AAC1D,IAAA,OAAO,CAAC,KAAK,CAAC,CAAA,EAAG,cAAc,CAAA,CAAA,EAAI,OAAO,CAAA,CAAE,EAAE,GAAG,IAAI,CAAC;AACxD;AAEA;;AAEG;SACa,UAAU,CAAC,OAAe,EAAE,GAAG,IAAW,EAAA;AACxD,IAAA,OAAO,CAAC,GAAG,CAAC,CAAA,EAAG,cAAc,CAAA,CAAA,EAAI,OAAO,CAAA,CAAE,EAAE,GAAG,IAAI,CAAC;AACtD;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 './src/cds-aichat-reasoning-steps.js';
|
|
9
|
+
import './src/cds-aichat-reasoning-step.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class CDSAIChatReasoningStep extends LitElement {
|
|
3
|
+
static styles: any;
|
|
4
|
+
title: string;
|
|
5
|
+
open: boolean;
|
|
6
|
+
controlled: boolean;
|
|
7
|
+
private hasBodyContent;
|
|
8
|
+
private headerId;
|
|
9
|
+
private contentId;
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
firstUpdated(): void;
|
|
12
|
+
private get componentConstructor();
|
|
13
|
+
private getTriggerElement;
|
|
14
|
+
private get eventInit();
|
|
15
|
+
private evaluateBodyContent;
|
|
16
|
+
private isBodyNode;
|
|
17
|
+
private handleBodySlotChange;
|
|
18
|
+
private handleToggleRequest;
|
|
19
|
+
private handleButtonClick;
|
|
20
|
+
private handleButtonKeydown;
|
|
21
|
+
focus(options?: FocusOptions): void;
|
|
22
|
+
static get eventBeforeToggle(): string;
|
|
23
|
+
static get eventToggle(): string;
|
|
24
|
+
private renderInteractiveHeader;
|
|
25
|
+
private renderStaticHeader;
|
|
26
|
+
private renderPanel;
|
|
27
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
28
|
+
}
|
|
29
|
+
export default CDSAIChatReasoningStep;
|