@carbon/ai-chat-components 0.6.2 → 0.7.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 +2611 -3856
- package/dist/16-BZMv8BLP.js +91 -0
- package/dist/16-DTIyOew7.js +91 -0
- package/dist/button-VYkJ5dwm.js +157 -0
- package/dist/button-skeleton-C44ojFOx.js +131 -0
- package/dist/card.min.js +193 -0
- package/dist/chain-of-thought.min.js +173 -155
- package/dist/chat-button.min.js +23 -23
- package/dist/checkbox-skeleton-B1dsTlWl.js +166 -0
- package/dist/{lit-element-DibNdm1l.js → class-map-CAQcKAyP.js} +38 -22
- package/dist/code-snippet.min.js +21 -21
- package/dist/codemirror-runtime-DjJTvK74.js +173 -0
- package/dist/{dockerfile-CKwmNxGw.js → dockerfile-C5Ju62-g.js} +21 -21
- package/dist/{factor-PwV725w2.js → factor-BLzOdeEw.js} +21 -21
- package/dist/feedback.min.js +68 -87
- package/dist/{icon-button-Ddd1Ihho.js → icon-button-B9XqYdUx.js} +33 -33
- package/dist/{icon-loader-DuM8rfP3.js → icon-loader-tzlfALFt.js} +23 -23
- package/dist/{if-defined-CbQ0hWcL.js → if-defined-DvPtK2Df.js} +22 -22
- package/dist/index--QAAkyqA.js +91 -0
- package/dist/{index-B1YAtZGR.js → index-1zAoDu0L.js} +21 -21
- package/dist/{index-BtI1vT4z.js → index-B6ll86Y6.js} +21 -21
- package/dist/index-B9DVtGsv.js +278 -0
- package/dist/index-BPU5uHmK.js +91 -0
- package/dist/index-BbWtDXd9.js +91 -0
- package/dist/index-BjsxSbgO.js +91 -0
- package/dist/index-BwI8x9E4.js +91 -0
- package/dist/index-C3KNlXVv.js +168 -0
- package/dist/index-CAdio42O.js +91 -0
- package/dist/index-CSMhs9Fm.js +91 -0
- package/dist/index-CU0IEHyz.js +91 -0
- package/dist/index-Cj-ZmC-W.js +91 -0
- package/dist/index-Ctl66nQF.js +91 -0
- package/dist/index-D7MLs7w5.js +91 -0
- package/dist/index-DH8wnvUn.js +91 -0
- package/dist/index-DWn_nnHo.js +91 -0
- package/dist/index-DpqlVRJ7.js +91 -0
- package/dist/index-Dx9Ms_uJ.js +91 -0
- package/dist/index-EwTPqhmw.js +91 -0
- package/dist/index-P1vutKel.js +91 -0
- package/dist/index-WQxGinYJ.js +91 -0
- package/dist/index-cK4rXRw-.js +91 -0
- package/dist/index-o-THaGga.js +91 -0
- package/dist/loading-icon-CRrLjNZH.js +106 -0
- package/dist/markdown.min.js +72 -70
- package/dist/{nsis-CWLatKhG.js → nsis-Biw-VyZu.js} +21 -21
- package/dist/processing.min.js +23 -23
- package/dist/{pug-DiwBvjDI.js → pug-BuYdIlne.js} +21 -21
- package/dist/reasoning-steps.min.js +69 -38
- package/dist/{state-B20s9hJU.js → state-CBq0UPBm.js} +21 -21
- package/dist/{table-runtime-CzipYmcB.js → table-runtime-CzXXhWmg.js} +86 -86
- package/dist/table.min.js +21 -21
- package/dist/text-input-VC8mmTlR.js +158 -0
- package/dist/toolbar.min.js +54 -56
- package/dist/workspace-shell.min.js +46 -51
- package/es/components/card/index.d.ts +11 -0
- package/es/components/{tile-container → card}/index.js +3 -1
- package/es/components/{tile-container → card}/index.js.map +1 -1
- package/es/components/card/src/card-footer.d.ts +43 -0
- package/es/components/card/src/card-footer.js +140 -0
- package/es/components/card/src/card-footer.js.map +1 -0
- package/es/components/card/src/card-footer.scss.js +13 -0
- package/es/components/card/src/card-footer.scss.js.map +1 -0
- package/es/components/card/src/card-steps.d.ts +28 -0
- package/es/components/card/src/card-steps.js +90 -0
- package/es/components/card/src/card-steps.js.map +1 -0
- package/es/components/{tile-container/src/tile-container.scss.js → card/src/card-steps.scss.js} +2 -2
- package/es/components/card/src/card-steps.scss.js.map +1 -0
- package/es/components/card/src/card.d.ts +27 -0
- package/es/components/card/src/card.js +65 -0
- package/es/components/card/src/card.js.map +1 -0
- package/es/components/card/src/card.scss.js +13 -0
- package/es/components/card/src/card.scss.js.map +1 -0
- package/es/components/chain-of-thought/defs.d.ts +54 -0
- package/es/components/chain-of-thought/{src/types.js → defs.js} +10 -1
- package/es/components/chain-of-thought/defs.js.map +1 -0
- package/es/components/chain-of-thought/index.d.ts +10 -4
- package/es/components/chain-of-thought/index.js +5 -3
- package/es/components/chain-of-thought/index.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +43 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.js +351 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.scss.js +13 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.scss.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +33 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +107 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.scss.js +13 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.scss.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought.d.ts +23 -69
- package/es/components/chain-of-thought/src/chain-of-thought.js +88 -145
- package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.d.ts +33 -0
- package/es/components/chain-of-thought/src/tool-call-data.js +179 -0
- package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -0
- package/es/components/chain-of-thought/src/tool-call-data.scss.js +13 -0
- package/es/components/chain-of-thought/src/tool-call-data.scss.js.map +1 -0
- package/es/components/chat-button/src/chat-button.d.ts +11 -3
- package/es/components/chat-button/src/chat-button.js +15 -11
- package/es/components/chat-button/src/chat-button.js.map +1 -1
- package/es/components/code-snippet/index.d.ts +2 -2
- package/es/components/code-snippet/index.js +1 -1
- package/es/components/code-snippet/src/code-snippet-card.d.ts +63 -0
- package/es/components/code-snippet/src/code-snippet-card.js +186 -0
- package/es/components/code-snippet/src/code-snippet-card.js.map +1 -0
- package/es/components/code-snippet/src/code-snippet.d.ts +32 -31
- package/es/components/code-snippet/src/code-snippet.js +115 -29
- package/es/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
- package/es/components/feedback/index.d.ts +4 -7
- package/es/components/feedback/index.js +2 -4
- package/es/components/feedback/index.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.d.ts +9 -2
- package/es/components/feedback/src/feedback-buttons.js +24 -15
- package/es/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.template.d.ts +2 -2
- package/es/components/feedback/src/feedback-buttons.template.js.map +1 -1
- package/es/components/feedback/src/feedback.d.ts +9 -10
- package/es/components/feedback/src/feedback.js +35 -22
- package/es/components/feedback/src/feedback.js.map +1 -1
- package/es/components/feedback/src/feedback.scss.js +1 -1
- package/es/components/feedback/src/feedback.template.d.ts +2 -2
- package/es/components/feedback/src/feedback.template.js +4 -4
- package/es/components/feedback/src/feedback.template.js.map +1 -1
- package/es/components/markdown/index.d.ts +2 -2
- package/es/components/markdown/index.js +1 -1
- package/es/components/markdown/src/markdown-renderer.d.ts +4 -0
- package/es/components/markdown/src/markdown-renderer.js +16 -11
- package/es/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es/components/markdown/src/markdown.d.ts +42 -14
- package/es/components/markdown/src/markdown.js +146 -42
- package/es/components/markdown/src/markdown.js.map +1 -1
- package/es/components/markdown/src/markdown.scss.js +1 -1
- package/es/components/markdown/src/markdown.template.d.ts +5 -2
- package/es/components/markdown/src/markdown.template.js +8 -3
- package/es/components/markdown/src/markdown.template.js.map +1 -1
- package/es/components/processing/src/processing.d.ts +8 -1
- package/es/components/processing/src/processing.js +7 -10
- package/es/components/processing/src/processing.js.map +1 -1
- package/es/components/processing/src/processing.scss.js +1 -1
- package/es/components/reasoning-steps/index.d.ts +4 -2
- package/es/components/reasoning-steps/index.js +3 -2
- package/es/components/reasoning-steps/index.js.map +1 -1
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.d.ts → reasoning-step.d.ts} +6 -7
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.js → reasoning-step.js} +24 -26
- package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -0
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.scss.js → reasoning-step.scss.js} +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.scss.js.map +1 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +36 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +81 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +13 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js.map +1 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +3 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js +43 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +1 -0
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.d.ts → reasoning-steps.d.ts} +6 -1
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.js → reasoning-steps.js} +9 -6
- package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -0
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.scss.js → reasoning-steps.scss.js} +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.scss.js.map +1 -0
- package/es/components/table/index.d.ts +2 -2
- package/es/components/table/index.js +1 -1
- package/es/components/table/src/table-pagination.template.d.ts +1 -1
- package/es/components/table/src/{cds-aichat-table.d.ts → table.d.ts} +12 -90
- package/es/components/table/src/{cds-aichat-table.js → table.js} +69 -37
- package/es/components/table/src/table.js.map +1 -0
- package/es/components/table/src/table.template.d.ts +2 -2
- package/es/components/table/src/table.template.js +2 -2
- package/es/components/table/src/table.template.js.map +1 -1
- package/es/components/toolbar/src/toolbar.d.ts +4 -5
- package/es/components/toolbar/src/toolbar.js +51 -40
- package/es/components/toolbar/src/toolbar.js.map +1 -1
- package/es/components/toolbar/src/toolbar.scss.js +1 -1
- package/es/components/workspace-shell/index.d.ts +0 -1
- package/es/components/workspace-shell/index.js +0 -1
- package/es/components/workspace-shell/index.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-body.d.ts +1 -0
- package/es/components/workspace-shell/src/workspace-shell-body.js +3 -4
- package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +26 -5
- package/es/components/workspace-shell/src/workspace-shell-footer.js +101 -11
- package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.scss.js +13 -0
- package/es/components/workspace-shell/src/workspace-shell-footer.scss.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell-header.d.ts +1 -0
- package/es/components/workspace-shell/src/workspace-shell-header.js +4 -4
- package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.scss.js +13 -0
- package/es/components/workspace-shell/src/workspace-shell-header.scss.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell.d.ts +1 -2
- package/es/components/workspace-shell/src/workspace-shell.js +3 -30
- package/es/components/workspace-shell/src/workspace-shell.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell.scss.js +1 -1
- package/es/react/card.d.ts +9 -0
- package/es/react/card.js +43 -0
- package/es/react/card.js.map +1 -0
- package/es/react/chain-of-thought-step.d.ts +4 -0
- package/es/react/chain-of-thought-step.js +32 -0
- package/es/react/chain-of-thought-step.js.map +1 -0
- package/es/react/chain-of-thought-toggle.d.ts +6 -0
- package/es/react/chain-of-thought-toggle.js +31 -0
- package/es/react/chain-of-thought-toggle.js.map +1 -0
- package/es/react/chain-of-thought.d.ts +4 -4
- package/es/react/chain-of-thought.js +7 -3
- package/es/react/chain-of-thought.js.map +1 -1
- package/es/react/code-snippet-card.d.ts +4 -0
- package/es/react/{code-snippet-tile-container.js → code-snippet-card.js} +8 -7
- package/es/react/code-snippet-card.js.map +1 -0
- package/es/react/feedback-buttons.d.ts +2 -2
- package/es/react/feedback-buttons.js +2 -2
- package/es/react/feedback-buttons.js.map +1 -1
- package/es/react/feedback.d.ts +2 -2
- package/es/react/feedback.js +2 -2
- package/es/react/feedback.js.map +1 -1
- package/es/react/inline-notification.d.ts +4 -0
- package/es/react/inline-notification.js +28 -0
- package/es/react/inline-notification.js.map +1 -0
- package/es/react/markdown.d.ts +1 -1
- package/es/react/markdown.js +1 -1
- package/es/react/reasoning-step.d.ts +3 -5
- package/es/react/reasoning-step.js +6 -5
- package/es/react/reasoning-step.js.map +1 -1
- package/es/react/reasoning-steps-toggle.d.ts +6 -0
- package/es/react/reasoning-steps-toggle.js +31 -0
- package/es/react/reasoning-steps-toggle.js.map +1 -0
- package/es/react/reasoning-steps.d.ts +3 -2
- package/es/react/reasoning-steps.js +4 -3
- package/es/react/reasoning-steps.js.map +1 -1
- package/es/react/tag.d.ts +4 -0
- package/es/react/{tile-container.js → tag.js} +6 -6
- package/es/react/tag.js.map +1 -0
- package/es/react/tile.js +2 -2
- package/es/react/tile.js.map +1 -1
- package/es/react/tool-call-data.d.ts +4 -0
- package/es/react/tool-call-data.js +28 -0
- package/es/react/tool-call-data.js.map +1 -0
- package/es/react/workspace-shell.d.ts +11 -0
- package/es/react/workspace-shell.js +49 -0
- package/es/react/workspace-shell.js.map +1 -0
- package/package.json +3 -3
- package/dist/button-D0B6NYRE.js +0 -157
- package/dist/button-skeleton-DtWa12gC.js +0 -116
- package/dist/checkbox-skeleton-BRqpmcmn.js +0 -166
- package/dist/class-map-BFgXCWx_.js +0 -106
- package/dist/codemirror-runtime-DCCflgzA.js +0 -173
- package/dist/index-B6_FOiFX.js +0 -91
- package/dist/index-BBF0opyU.js +0 -91
- package/dist/index-BIpfdWsb.js +0 -91
- package/dist/index-BamxlG85.js +0 -91
- package/dist/index-BnJifpJy.js +0 -91
- package/dist/index-BychCoXU.js +0 -91
- package/dist/index-CBCqx8Ps.js +0 -91
- package/dist/index-CBqFie3c.js +0 -91
- package/dist/index-CDTaA9BR.js +0 -91
- package/dist/index-CQp4LKsc.js +0 -91
- package/dist/index-CmBp-bbC.js +0 -168
- package/dist/index-D0SnJ7Ma.js +0 -91
- package/dist/index-D4zxQxf2.js +0 -91
- package/dist/index-DMzbawFt.js +0 -91
- package/dist/index-DTqHKU78.js +0 -91
- package/dist/index-Dj8jVVfA.js +0 -91
- package/dist/index-DqC-5dY5.js +0 -91
- package/dist/index-LHYDalJY.js +0 -91
- package/dist/index-MyumuXWu.js +0 -91
- package/dist/index-hvhxkyxb.js +0 -91
- package/dist/index-tpV6AVN_.js +0 -91
- package/dist/index-zZ0xfJxK.js +0 -367
- package/dist/query-Sqf3k5tK.js +0 -101
- package/dist/radio-group-manager-BqksDnno.js +0 -91
- package/dist/repeat-Cu9vY9y8.js +0 -96
- package/dist/text-input-BlvU8QGo.js +0 -158
- package/dist/tile-container.min.js +0 -100
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.d.ts +0 -15
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js +0 -36
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js.map +0 -1
- package/es/components/chain-of-thought/src/chain-of-thought.template.d.ts +0 -5
- package/es/components/chain-of-thought/src/chain-of-thought.template.js +0 -206
- package/es/components/chain-of-thought/src/chain-of-thought.template.js.map +0 -1
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.d.ts +0 -10
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js +0 -50
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js.map +0 -1
- package/es/components/chain-of-thought/src/types.d.ts +0 -73
- package/es/components/chain-of-thought/src/types.js.map +0 -1
- package/es/components/code-snippet/src/code-snippet-tile-container.d.ts +0 -32
- package/es/components/code-snippet/src/code-snippet-tile-container.js +0 -143
- package/es/components/code-snippet/src/code-snippet-tile-container.js.map +0 -1
- package/es/components/feedback/src/cds-aichat-feedback-buttons.d.ts +0 -15
- package/es/components/feedback/src/cds-aichat-feedback-buttons.js +0 -36
- package/es/components/feedback/src/cds-aichat-feedback-buttons.js.map +0 -1
- package/es/components/feedback/src/cds-aichat-feedback.d.ts +0 -15
- package/es/components/feedback/src/cds-aichat-feedback.js +0 -36
- package/es/components/feedback/src/cds-aichat-feedback.js.map +0 -1
- package/es/components/markdown/src/cds-aichat-markdown.d.ts +0 -13
- package/es/components/markdown/src/cds-aichat-markdown.js +0 -35
- package/es/components/markdown/src/cds-aichat-markdown.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.scss.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.scss.js.map +0 -1
- package/es/components/table/src/cds-aichat-table.js.map +0 -1
- package/es/components/tile-container/index.d.ts +0 -1
- package/es/components/tile-container/src/styles.scss.js +0 -13
- package/es/components/tile-container/src/styles.scss.js.map +0 -1
- package/es/components/tile-container/src/tile-container.d.ts +0 -12
- package/es/components/tile-container/src/tile-container.js +0 -85
- package/es/components/tile-container/src/tile-container.js.map +0 -1
- package/es/components/tile-container/src/tile-container.scss.js.map +0 -1
- package/es/components/workspace-shell/src/styles.scss.js +0 -13
- package/es/components/workspace-shell/src/styles.scss.js.map +0 -1
- package/es/components/workspace-shell/src/workspace-shell-toolbar.d.ts +0 -22
- package/es/components/workspace-shell/src/workspace-shell-toolbar.js +0 -61
- package/es/components/workspace-shell/src/workspace-shell-toolbar.js.map +0 -1
- package/es/react/code-snippet-tile-container.d.ts +0 -5
- package/es/react/code-snippet-tile-container.js.map +0 -1
- package/es/react/tile-container.d.ts +0 -4
- package/es/react/tile-container.js.map +0 -1
- package/dist/{16-Qupth_aH.js → 16-D66oSSKJ.js} +20 -20
- package/dist/{apl-BgtIAmDL.js → apl-Cq2qnGBp.js} +20 -20
- package/dist/{asciiarmor-tEIRKlaD.js → asciiarmor-Cb5hNJXm.js} +20 -20
- package/dist/{asn1-sXfvlwbA.js → asn1-ObfPhj90.js} +20 -20
- package/dist/{asterisk-CkP9KBn_.js → asterisk-CGEdhmtE.js} +20 -20
- package/dist/{carbon-element-CMnOQRY8.js → carbon-element-BHXvTuS8.js} +20 -20
- package/dist/{carbon-element-B18tSkZ6.js → carbon-element-CY_4MezR.js} +20 -20
- package/dist/{clike-Dz7-b3Bs.js → clike-D-W_e6Lj.js} +20 -20
- package/dist/{clojure-Cv2VjSR-.js → clojure-BKr3NaqS.js} +20 -20
- package/dist/{cmake-B7mApY_A.js → cmake-CCO4hHlz.js} +20 -20
- package/dist/{cobol-CLpo2wzU.js → cobol-BP7APbz-.js} +20 -20
- package/dist/{coffeescript-Cp4m_frl.js → coffeescript-DAdmYC08.js} +20 -20
- package/dist/{collection-helpers-CVjseChk.js → collection-helpers-CeBujCju.js} +20 -20
- package/dist/{commonlisp-DGHzJz_w.js → commonlisp-Bo8JYmEV.js} +20 -20
- package/dist/{crystal-D8zlcNoF.js → crystal-Bm8pGIh6.js} +20 -20
- package/dist/{css-gJR1aLn3.js → css-BJk1lVKu.js} +20 -20
- package/dist/{custom-element-Clzn_oL-.js → custom-element-DRG4IpGT.js} +20 -20
- package/dist/{cypher-CM68cGds.js → cypher-D-eVDQC7.js} +20 -20
- package/dist/{d-DS7hYUri.js → d-D9LdG4k3.js} +20 -20
- package/dist/{diff-BchMez5u.js → diff-DZtMXlRt.js} +20 -20
- package/dist/{dtd-B4jYcQ7M.js → dtd-BkbtUIcB.js} +20 -20
- package/dist/{dylan-DK2Dyib7.js → dylan-CCohaM4H.js} +20 -20
- package/dist/{ebnf-Cn6Vnzxw.js → ebnf-DtT6UrMv.js} +20 -20
- package/dist/{ecl-9PhKPFNU.js → ecl-C2GNxTt8.js} +20 -20
- package/dist/{eiffel-CqAx-iZ-.js → eiffel-BW4n6uyg.js} +20 -20
- package/dist/{elm-Cw3MFe2J.js → elm-B9lXrM6D.js} +20 -20
- package/dist/{erlang-DeNh2sjw.js → erlang-BKwBedv4.js} +20 -20
- package/dist/{fcl-Dku8gwKl.js → fcl-BGYmKRZe.js} +20 -20
- package/dist/{forth-ccFEopc8.js → forth-DTbOVELu.js} +20 -20
- package/dist/{fortran-C0Pd1bYf.js → fortran-Dr7q8x3V.js} +20 -20
- package/dist/{gas-C9KeMzH-.js → gas-CsCwQ5DC.js} +20 -20
- package/dist/{gherkin-CTd3ycq1.js → gherkin-CAJyZEc1.js} +20 -20
- package/dist/{groovy-C2OuB7B3.js → groovy-CpFdbfFQ.js} +20 -20
- package/dist/{haskell-CGuEw9Yh.js → haskell-V36thOn1.js} +20 -20
- package/dist/{haxe-Bpicn7Ma.js → haxe-CeQWqhmF.js} +20 -20
- package/dist/{http-C2Dl8BK6.js → http-Cm3L1exf.js} +20 -20
- package/dist/{idl-D0DUTXQY.js → idl-DyN-eyoA.js} +20 -20
- package/dist/{javascript-vBL1foWi.js → javascript-B7L-ezNz.js} +20 -20
- package/dist/{julia-YTKmImms.js → julia-B_bgxt8f.js} +20 -20
- package/dist/{livescript-BqlKQjy2.js → livescript-B0UjDUzz.js} +20 -20
- package/dist/{lua-DlwCIvBO.js → lua-Bs-1T_TR.js} +20 -20
- package/dist/{mathematica-Dv2FPQ3c.js → mathematica-QbiSkUw_.js} +20 -20
- package/dist/{mbox-BRYTWZIN.js → mbox-IxVDt6G7.js} +20 -20
- package/dist/{mirc-Bfe4ByuU.js → mirc--MFZdywV.js} +20 -20
- package/dist/{mllike-jcboaTW3.js → mllike-s7nUnXIp.js} +20 -20
- package/dist/{modelica-DyjAoT58.js → modelica-BCpZ0s1C.js} +20 -20
- package/dist/{mscgen-cDZZxW92.js → mscgen-Br8J94Pi.js} +20 -20
- package/dist/{mumps-BHJOz0VL.js → mumps-BsSCi6Lf.js} +20 -20
- package/dist/{nginx-C7Xm6ldH.js → nginx-ZiZlz_Vj.js} +20 -20
- package/dist/{ntriples-WgSzAP5x.js → ntriples-1fM-fgdb.js} +20 -20
- package/dist/{octave-D4LNKBtY.js → octave-nXauetiK.js} +20 -20
- package/dist/{oz-BoqKtF9D.js → oz-B13mLmyp.js} +20 -20
- package/dist/{pascal-Di4a6U4m.js → pascal-B_W4OXqj.js} +20 -20
- package/dist/{perl-DidNKejT.js → perl-a1VQ4XvC.js} +20 -20
- package/dist/{pig-BNb2vBfH.js → pig-BtQy1wID.js} +20 -20
- package/dist/{powershell-BKZXxjKi.js → powershell-uO49D63Q.js} +20 -20
- package/dist/{properties-DGvo0ocD.js → properties-BhuX6-mY.js} +20 -20
- package/dist/{protobuf-CO4RB5i_.js → protobuf-CNIIc7zI.js} +20 -20
- package/dist/{puppet-BuoIdj3c.js → puppet-ByObhsu2.js} +20 -20
- package/dist/{python-D0eLBtFd.js → python-PHhd4JZq.js} +20 -20
- package/dist/{q-C5wfDOE6.js → q-qVcarjaG.js} +20 -20
- package/dist/{r-B2NBzJ7Q.js → r-Cd28Rn61.js} +20 -20
- package/dist/{rpm-bppY7Ljs.js → rpm-tHd62SNx.js} +20 -20
- package/dist/{ruby-1BC0cOBU.js → ruby-BWVi67xq.js} +20 -20
- package/dist/{sas-BeMF8yJO.js → sas-BwjQFPr2.js} +20 -20
- package/dist/{scheme-CIQ0ih8s.js → scheme-Czr-sVIy.js} +20 -20
- package/dist/{settings-DtiFDQAJ.js → settings-C6RJ_X7P.js} +20 -20
- package/dist/{shell-Aikfsln6.js → shell-BetDWStl.js} +20 -20
- package/dist/{sieve-AcrCVYff.js → sieve-rrPKwsBh.js} +20 -20
- package/dist/{simple-mode-pAhBuoYJ.js → simple-mode-C8-rTa2M.js} +20 -20
- package/dist/{smalltalk-B2nQQuEp.js → smalltalk-YAI5xh7_.js} +20 -20
- package/dist/{solr-dRPr0Biz.js → solr-VDOKdk1b.js} +20 -20
- package/dist/{sparql-Cj99XEDx.js → sparql-zO1kYCog.js} +20 -20
- package/dist/{spreadsheet-sgTJtcQB.js → spreadsheet-6g8nHE2j.js} +20 -20
- package/dist/{sql-C8kOX3sr.js → sql-Biw9poPQ.js} +20 -20
- package/dist/{stex-7QvUJU5I.js → stex-THaXVwNW.js} +20 -20
- package/dist/{stylus-DkIl6udx.js → stylus-RHXL_HsJ.js} +20 -20
- package/dist/{swift-BjpHlYuP.js → swift-lfFyPRRo.js} +20 -20
- package/dist/{sync-CTB9Fa1m.js → sync-D5E2V6_l.js} +20 -20
- package/dist/{tcl-C1Yvc7pn.js → tcl-C4Tb2U0q.js} +20 -20
- package/dist/{textile-DKmSRPjM.js → textile-CnQDonvJ.js} +20 -20
- package/dist/{throttle-Bas3c59v.js → throttle-B7gS0Tg4.js} +20 -20
- package/dist/{tiddlywiki-DN1bYf4c.js → tiddlywiki-BPc4WZCH.js} +20 -20
- package/dist/{tiki-F3wxU3m-.js → tiki-D4dz8j1V.js} +20 -20
- package/dist/{toml-KiNov0Ms.js → toml-88vYtIh1.js} +20 -20
- package/dist/{troff-BZvX0oqw.js → troff-BgVjEoT-.js} +20 -20
- package/dist/{ttcn-BiJT56Tu.js → ttcn-DdYulzch.js} +20 -20
- package/dist/{ttcn-cfg-3VvAFBAY.js → ttcn-cfg-LwcHiYmJ.js} +20 -20
- package/dist/{turtle-BvExPgO5.js → turtle-CgiVr9yq.js} +20 -20
- package/dist/{vb-D2uTYiVC.js → vb-BWY0HckZ.js} +20 -20
- package/dist/{vbscript-DpTTELsB.js → vbscript-BBJV-ooB.js} +20 -20
- package/dist/{velocity-jIy5jhYQ.js → velocity-wom_bhlv.js} +20 -20
- package/dist/{verilog-CXOzQ6Od.js → verilog-BCY2xdlY.js} +20 -20
- package/dist/{vhdl-Dg-0Ynfd.js → vhdl-BjJYRa0a.js} +20 -20
- package/dist/{webidl-Elhmuz8r.js → webidl-KE8LT1tN.js} +20 -20
- package/dist/{xquery-EKuNgB1T.js → xquery-Ca5C9BJw.js} +20 -20
- package/dist/{yacas-CirFB63Y.js → yacas-DGeGvU7X.js} +20 -20
- package/dist/{z80-D_iQ-043.js → z80-CEYQTt8_.js} +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-button.js","sources":["../../../../src/components/chat-button/src/chat-button.ts"],"sourcesContent":[null],"names":["CDSButton","CHAT_BUTTON_KIND"],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat-button.js","sources":["../../../../src/components/chat-button/src/chat-button.ts"],"sourcesContent":[null],"names":["CDSButton","CHAT_BUTTON_KIND"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AA4BH;;;;AAIG;AAEH,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQA,mBAAS,CAAA;AAAvC,IAAA,WAAA,GAAA;;AAGE;;AAEG;QAEH,IAAA,CAAA,aAAa,GAAG,KAAK;AASrB;;AAEG;AACc,QAAA,IAAA,CAAA,YAAY,GAAuB;AAClD,YAAA,gBAAgB,CAAC,KAAK;AACtB,YAAA,gBAAgB,CAAC,MAAM;AACvB,YAAA,gBAAgB,CAAC,KAAK;SACvB;IAyBH;AAvBY,IAAA,UAAU,CAAC,YAAkC,EAAA;AACrD,QAAA,IAAI,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACjE,IAAI,CAAC,qBAAqB,EAAE;QAC9B;IACF;IAEQ,qBAAqB,GAAA;AAC3B,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;AACtB,YAAA,IAAI,CAAC,IAAI,GAAGC,WAAgB,CAAC,KAAK;AAClC,YAAA,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,KAAK;YAClC;QACF;;AAEA,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAwB,CAAC,EAAE;AAC9D,YAAA,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,KAAK;QACpC;AAEA,QAAA,IACE,CAAC,MAAM,CAAC,MAAM,CAACA,WAAgB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAwB,CAAC,EACxE;AACA,YAAA,IAAI,CAAC,IAAI,GAAGA,WAAgB,CAAC,OAAO;QACtC;IACF;;AA9CO,eAAA,CAAA,MAAM,GAAG,MAAH;AAMb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE;AACnC,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAOd,UAAA,CAAA;IADP,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE;AACjB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAdzB,eAAe,GAAA,UAAA,CAAA;IADpB,aAAa,CAAC,mBAAmB;AAC5B,CAAA,EAAA,eAAe,CAgDpB;AASD,mBAAe,eAAe;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./src/code-snippet-
|
|
2
|
-
export { default } from "./src/code-snippet-
|
|
1
|
+
import "./src/code-snippet-card.js";
|
|
2
|
+
export { default } from "./src/code-snippet-card.js";
|
|
3
3
|
export { CODE_SNIPPET_TYPE } from "@carbon/web-components/es/components/code-snippet/defs.js";
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export { default } from './src/code-snippet-
|
|
8
|
+
export { default } from './src/code-snippet-card.js';
|
|
9
9
|
export { CODE_SNIPPET_TYPE } from '@carbon/web-components/es/components/code-snippet/defs.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "../../card/index.js";
|
|
3
|
+
import "./code-snippet.js";
|
|
4
|
+
import { type LineCountFormatter } from "./formatters.js";
|
|
5
|
+
/**
|
|
6
|
+
* AI Chat code snippet wrapper that places the snippet inside a Carbon tile.
|
|
7
|
+
*
|
|
8
|
+
* @element cds-aichat-code-snippet-card
|
|
9
|
+
*/
|
|
10
|
+
declare class CDSAIChatCodeSnippetCard extends LitElement {
|
|
11
|
+
/** Language used for syntax highlighting. */
|
|
12
|
+
language: string;
|
|
13
|
+
/** Whether the snippet should be editable. */
|
|
14
|
+
editable: boolean;
|
|
15
|
+
/** Whether to enable syntax highlighting. */
|
|
16
|
+
highlight: boolean;
|
|
17
|
+
/** Fallback language to use when detection fails. */
|
|
18
|
+
defaultLanguage: string;
|
|
19
|
+
/** Text to copy when clicking the copy button. Defaults to slotted content. */
|
|
20
|
+
copyText: string;
|
|
21
|
+
/** Disable interactions on the snippet. */
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
/** Feedback text shown after copy. */
|
|
24
|
+
feedback: string;
|
|
25
|
+
/** Duration (ms) to show feedback text. */
|
|
26
|
+
feedbackTimeout: number;
|
|
27
|
+
/** Hide the copy button. */
|
|
28
|
+
hideCopyButton: boolean;
|
|
29
|
+
/** Maximum rows to show when collapsed. */
|
|
30
|
+
maxCollapsedNumberOfRows: number;
|
|
31
|
+
/** Maximum rows to show when expanded (0 = unlimited). */
|
|
32
|
+
maxExpandedNumberOfRows: number;
|
|
33
|
+
/** Minimum rows to show when collapsed. */
|
|
34
|
+
minCollapsedNumberOfRows: number;
|
|
35
|
+
/** Minimum rows to show when expanded. */
|
|
36
|
+
minExpandedNumberOfRows: number;
|
|
37
|
+
/** Label for the “show less” control. */
|
|
38
|
+
showLessText: string;
|
|
39
|
+
/** Label for the “show more” control. */
|
|
40
|
+
showMoreText: string;
|
|
41
|
+
/** Tooltip label for the copy action. */
|
|
42
|
+
tooltipContent: string;
|
|
43
|
+
/** Wrap text instead of horizontal scrolling. */
|
|
44
|
+
wrapText: boolean;
|
|
45
|
+
/** Label for folding/collapsing code. */
|
|
46
|
+
foldCollapseLabel: string;
|
|
47
|
+
/** Label for unfolding/expanding code. */
|
|
48
|
+
foldExpandLabel: string;
|
|
49
|
+
/** Formatter for the line count display. */
|
|
50
|
+
getLineCountText: LineCountFormatter;
|
|
51
|
+
/**
|
|
52
|
+
* Handles the content-change event from the inner code snippet and re-dispatches it.
|
|
53
|
+
*/
|
|
54
|
+
private _handleContentChange;
|
|
55
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
56
|
+
}
|
|
57
|
+
declare global {
|
|
58
|
+
interface HTMLElementTagNameMap {
|
|
59
|
+
"cds-aichat-code-snippet-card": CDSAIChatCodeSnippetCard;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export { CDSAIChatCodeSnippetCard };
|
|
63
|
+
export default CDSAIChatCodeSnippetCard;
|
|
@@ -0,0 +1,186 @@
|
|
|
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, html } from 'lit';
|
|
10
|
+
import { property } from 'lit/decorators.js';
|
|
11
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
12
|
+
import '../../card/src/card.js';
|
|
13
|
+
import '../../card/src/card-footer.js';
|
|
14
|
+
import '../../card/src/card-steps.js';
|
|
15
|
+
import './code-snippet.js';
|
|
16
|
+
import { defaultLineCountText } from './formatters.js';
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* Copyright IBM Corp. 2025
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*
|
|
24
|
+
* @license
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* AI Chat code snippet wrapper that places the snippet inside a Carbon tile.
|
|
28
|
+
*
|
|
29
|
+
* @element cds-aichat-code-snippet-card
|
|
30
|
+
*/
|
|
31
|
+
let CDSAIChatCodeSnippetCard = class CDSAIChatCodeSnippetCard extends LitElement {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
/** Language used for syntax highlighting. */
|
|
35
|
+
this.language = "";
|
|
36
|
+
/** Whether the snippet should be editable. */
|
|
37
|
+
this.editable = false;
|
|
38
|
+
/** Whether to enable syntax highlighting. */
|
|
39
|
+
this.highlight = false;
|
|
40
|
+
/** Fallback language to use when detection fails. */
|
|
41
|
+
this.defaultLanguage = "javascript";
|
|
42
|
+
/** Text to copy when clicking the copy button. Defaults to slotted content. */
|
|
43
|
+
this.copyText = "";
|
|
44
|
+
/** Disable interactions on the snippet. */
|
|
45
|
+
this.disabled = false;
|
|
46
|
+
/** Feedback text shown after copy. */
|
|
47
|
+
this.feedback = "Copied!";
|
|
48
|
+
/** Duration (ms) to show feedback text. */
|
|
49
|
+
this.feedbackTimeout = 2000;
|
|
50
|
+
/** Hide the copy button. */
|
|
51
|
+
this.hideCopyButton = false;
|
|
52
|
+
/** Maximum rows to show when collapsed. */
|
|
53
|
+
this.maxCollapsedNumberOfRows = 15;
|
|
54
|
+
/** Maximum rows to show when expanded (0 = unlimited). */
|
|
55
|
+
this.maxExpandedNumberOfRows = 0;
|
|
56
|
+
/** Minimum rows to show when collapsed. */
|
|
57
|
+
this.minCollapsedNumberOfRows = 3;
|
|
58
|
+
/** Minimum rows to show when expanded. */
|
|
59
|
+
this.minExpandedNumberOfRows = 16;
|
|
60
|
+
/** Label for the “show less” control. */
|
|
61
|
+
this.showLessText = "Show less";
|
|
62
|
+
/** Label for the “show more” control. */
|
|
63
|
+
this.showMoreText = "Show more";
|
|
64
|
+
/** Tooltip label for the copy action. */
|
|
65
|
+
this.tooltipContent = "Copy to clipboard";
|
|
66
|
+
/** Wrap text instead of horizontal scrolling. */
|
|
67
|
+
this.wrapText = false;
|
|
68
|
+
/** Label for folding/collapsing code. */
|
|
69
|
+
this.foldCollapseLabel = "Collapse code block";
|
|
70
|
+
/** Label for unfolding/expanding code. */
|
|
71
|
+
this.foldExpandLabel = "Expand code block";
|
|
72
|
+
/** Formatter for the line count display. */
|
|
73
|
+
this.getLineCountText = defaultLineCountText;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Handles the content-change event from the inner code snippet and re-dispatches it.
|
|
77
|
+
*/
|
|
78
|
+
_handleContentChange(event) {
|
|
79
|
+
this.dispatchEvent(new CustomEvent("content-change", {
|
|
80
|
+
detail: event.detail,
|
|
81
|
+
bubbles: true,
|
|
82
|
+
composed: true,
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
render() {
|
|
86
|
+
return html `
|
|
87
|
+
<cds-aichat-card>
|
|
88
|
+
<div slot="body">
|
|
89
|
+
<cds-aichat-code-snippet
|
|
90
|
+
data-rounded
|
|
91
|
+
language=${this.language}
|
|
92
|
+
default-language=${this.defaultLanguage}
|
|
93
|
+
?editable=${this.editable}
|
|
94
|
+
?highlight=${this.highlight}
|
|
95
|
+
@content-change=${this._handleContentChange}
|
|
96
|
+
copy-text=${this.copyText}
|
|
97
|
+
?disabled=${this.disabled}
|
|
98
|
+
feedback=${this.feedback}
|
|
99
|
+
feedback-timeout=${this.feedbackTimeout}
|
|
100
|
+
?hide-copy-button=${this.hideCopyButton}
|
|
101
|
+
max-collapsed-number-of-rows=${this.maxCollapsedNumberOfRows}
|
|
102
|
+
max-expanded-number-of-rows=${this.maxExpandedNumberOfRows}
|
|
103
|
+
min-collapsed-number-of-rows=${this.minCollapsedNumberOfRows}
|
|
104
|
+
min-expanded-number-of-rows=${this.minExpandedNumberOfRows}
|
|
105
|
+
.getLineCountText=${this.getLineCountText}
|
|
106
|
+
show-less-text=${this.showLessText}
|
|
107
|
+
show-more-text=${this.showMoreText}
|
|
108
|
+
tooltip-content=${this.tooltipContent}
|
|
109
|
+
?wrap-text=${this.wrapText}
|
|
110
|
+
fold-collapse-label=${this.foldCollapseLabel}
|
|
111
|
+
fold-expand-label=${this.foldExpandLabel}
|
|
112
|
+
>
|
|
113
|
+
<slot></slot>
|
|
114
|
+
</cds-aichat-code-snippet>
|
|
115
|
+
</div>
|
|
116
|
+
</cds-aichat-card>
|
|
117
|
+
`;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
__decorate([
|
|
121
|
+
property({ type: String })
|
|
122
|
+
], CDSAIChatCodeSnippetCard.prototype, "language", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
property({ type: Boolean })
|
|
125
|
+
], CDSAIChatCodeSnippetCard.prototype, "editable", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
property({ type: Boolean })
|
|
128
|
+
], CDSAIChatCodeSnippetCard.prototype, "highlight", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
property({ type: String, attribute: "default-language" })
|
|
131
|
+
], CDSAIChatCodeSnippetCard.prototype, "defaultLanguage", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
property({ attribute: "copy-text" })
|
|
134
|
+
], CDSAIChatCodeSnippetCard.prototype, "copyText", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
property({ type: Boolean, reflect: true })
|
|
137
|
+
], CDSAIChatCodeSnippetCard.prototype, "disabled", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
property()
|
|
140
|
+
], CDSAIChatCodeSnippetCard.prototype, "feedback", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
property({ type: Number, attribute: "feedback-timeout" })
|
|
143
|
+
], CDSAIChatCodeSnippetCard.prototype, "feedbackTimeout", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
property({ type: Boolean, reflect: true, attribute: "hide-copy-button" })
|
|
146
|
+
], CDSAIChatCodeSnippetCard.prototype, "hideCopyButton", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
property({ attribute: "max-collapsed-number-of-rows" })
|
|
149
|
+
], CDSAIChatCodeSnippetCard.prototype, "maxCollapsedNumberOfRows", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
property({ attribute: "max-expanded-number-of-rows" })
|
|
152
|
+
], CDSAIChatCodeSnippetCard.prototype, "maxExpandedNumberOfRows", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
property({ attribute: "min-collapsed-number-of-rows" })
|
|
155
|
+
], CDSAIChatCodeSnippetCard.prototype, "minCollapsedNumberOfRows", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
property({ attribute: "min-expanded-number-of-rows" })
|
|
158
|
+
], CDSAIChatCodeSnippetCard.prototype, "minExpandedNumberOfRows", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ attribute: "show-less-text" })
|
|
161
|
+
], CDSAIChatCodeSnippetCard.prototype, "showLessText", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
property({ attribute: "show-more-text" })
|
|
164
|
+
], CDSAIChatCodeSnippetCard.prototype, "showMoreText", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
property({ attribute: "tooltip-content" })
|
|
167
|
+
], CDSAIChatCodeSnippetCard.prototype, "tooltipContent", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
property({ type: Boolean, reflect: true, attribute: "wrap-text" })
|
|
170
|
+
], CDSAIChatCodeSnippetCard.prototype, "wrapText", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
property({ attribute: "fold-collapse-label" })
|
|
173
|
+
], CDSAIChatCodeSnippetCard.prototype, "foldCollapseLabel", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
property({ attribute: "fold-expand-label" })
|
|
176
|
+
], CDSAIChatCodeSnippetCard.prototype, "foldExpandLabel", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
property({ attribute: false })
|
|
179
|
+
], CDSAIChatCodeSnippetCard.prototype, "getLineCountText", void 0);
|
|
180
|
+
CDSAIChatCodeSnippetCard = __decorate([
|
|
181
|
+
carbonElement("cds-aichat-code-snippet-card")
|
|
182
|
+
], CDSAIChatCodeSnippetCard);
|
|
183
|
+
var CDSAIChatCodeSnippetCard$1 = CDSAIChatCodeSnippetCard;
|
|
184
|
+
|
|
185
|
+
export { CDSAIChatCodeSnippetCard, CDSAIChatCodeSnippetCard$1 as default };
|
|
186
|
+
//# sourceMappingURL=code-snippet-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-snippet-card.js","sources":["../../../../src/components/code-snippet/src/code-snippet-card.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH;;;;AAIG;AAEH,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,UAAU,CAAA;AAAjD,IAAA,WAAA,GAAA;;;QAE8B,IAAA,CAAA,QAAQ,GAAG,EAAE;;QAGZ,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAGhB,IAAA,CAAA,SAAS,GAAG,KAAK;;QAI9C,IAAA,CAAA,eAAe,GAAG,YAAY;;QAI9B,IAAA,CAAA,QAAQ,GAAG,EAAE;;QAIb,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAIhB,IAAA,CAAA,QAAQ,GAAG,SAAS;;QAIpB,IAAA,CAAA,eAAe,GAAG,IAAI;;QAItB,IAAA,CAAA,cAAc,GAAG,KAAK;;QAItB,IAAA,CAAA,wBAAwB,GAAG,EAAE;;QAI7B,IAAA,CAAA,uBAAuB,GAAG,CAAC;;QAI3B,IAAA,CAAA,wBAAwB,GAAG,CAAC;;QAI5B,IAAA,CAAA,uBAAuB,GAAG,EAAE;;QAI5B,IAAA,CAAA,YAAY,GAAG,WAAW;;QAI1B,IAAA,CAAA,YAAY,GAAG,WAAW;;QAI1B,IAAA,CAAA,cAAc,GAAG,mBAAmB;;QAIpC,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAIhB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AE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE;AACjD,CAAA,EAAA,wBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAIjB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE;AACJ,CAAA,EAAA,wBAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,MAAA,CAAA;AAI1C,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE;AACN,CAAA,EAAA,wBAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,MAAA,CAAA;AAItC,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;AAC8B,CAAA,EAAA,wBAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,MAAA,CAAA;AA5ExD,wBAAwB,GAAA,UAAA,CAAA;IAD7B,aAAa,CAAC,8BAA8B;AACvC,CAAA,EAAA,wBAAwB,CA6H7B;AASD,iCAAe,wBAAwB;;;;"}
|
|
@@ -99,7 +99,13 @@ declare const CDSAIChatCodeSnippet_base: (new (...args: any[]) => {
|
|
|
99
99
|
removeAttributeNode(attr: Attr): Attr;
|
|
100
100
|
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
101
101
|
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
102
|
-
scroll(options
|
|
102
|
+
scroll(options
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
? /**
|
|
107
|
+
* @internal
|
|
108
|
+
*/: ScrollToOptions): void;
|
|
103
109
|
scroll(x: number, y: number): void;
|
|
104
110
|
scrollBy(options?: ScrollToOptions): void;
|
|
105
111
|
scrollBy(x: number, y: number): void;
|
|
@@ -347,24 +353,43 @@ declare const CDSAIChatCodeSnippet_base: (new (...args: any[]) => {
|
|
|
347
353
|
*/
|
|
348
354
|
declare class CDSAIChatCodeSnippet extends CDSAIChatCodeSnippet_base {
|
|
349
355
|
static styles: any[];
|
|
356
|
+
/** Language used for syntax highlighting. */
|
|
350
357
|
language: string;
|
|
358
|
+
/** Whether the snippet should be editable. */
|
|
351
359
|
editable: boolean;
|
|
360
|
+
/** Whether to enable syntax highlighting. */
|
|
352
361
|
highlight: boolean;
|
|
362
|
+
/** Fallback language to use when detection fails. */
|
|
353
363
|
defaultLanguage: string;
|
|
364
|
+
/** Text to copy when clicking the copy button. Defaults to slotted content. */
|
|
354
365
|
copyText: string;
|
|
366
|
+
/** Disable interactions on the snippet. */
|
|
355
367
|
disabled: boolean;
|
|
368
|
+
/** Feedback text shown after copy. */
|
|
356
369
|
feedback: string;
|
|
370
|
+
/** Duration (ms) to show feedback text. */
|
|
357
371
|
feedbackTimeout: number;
|
|
372
|
+
/** Hide the copy button. */
|
|
358
373
|
hideCopyButton: boolean;
|
|
374
|
+
/** Maximum rows to show when collapsed. */
|
|
359
375
|
maxCollapsedNumberOfRows: number;
|
|
376
|
+
/** Maximum rows to show when expanded (0 = unlimited). */
|
|
360
377
|
maxExpandedNumberOfRows: number;
|
|
378
|
+
/** Minimum rows to show when collapsed. */
|
|
361
379
|
minCollapsedNumberOfRows: number;
|
|
380
|
+
/** Minimum rows to show when expanded. */
|
|
362
381
|
minExpandedNumberOfRows: number;
|
|
382
|
+
/** Label for the “show less” control. */
|
|
363
383
|
showLessText: string;
|
|
384
|
+
/** Label for the “show more” control. */
|
|
364
385
|
showMoreText: string;
|
|
386
|
+
/** Tooltip label for the copy action. */
|
|
365
387
|
tooltipContent: string;
|
|
388
|
+
/** Wrap text instead of horizontal scrolling. */
|
|
366
389
|
wrapText: boolean;
|
|
390
|
+
/** Label for folding/collapsing code. */
|
|
367
391
|
foldCollapseLabel: string;
|
|
392
|
+
/** Label for unfolding/expanding code. */
|
|
368
393
|
foldExpandLabel: string;
|
|
369
394
|
/**
|
|
370
395
|
* The function used to format the line count text.
|
|
@@ -372,28 +397,6 @@ declare class CDSAIChatCodeSnippet extends CDSAIChatCodeSnippet_base {
|
|
|
372
397
|
* Defaults to `${count} lines` in en-US.
|
|
373
398
|
*/
|
|
374
399
|
getLineCountText: LineCountFormatter;
|
|
375
|
-
private _slottedContent;
|
|
376
|
-
private _detectedLanguage;
|
|
377
|
-
private _languageLabelLockedIn;
|
|
378
|
-
private _lineCount;
|
|
379
|
-
private editorView?;
|
|
380
|
-
private _isEditorLoading;
|
|
381
|
-
private _expandedCode;
|
|
382
|
-
private _shouldShowMoreLessBtn;
|
|
383
|
-
private _hObserveResize;
|
|
384
|
-
private _rowHeightInPixels;
|
|
385
|
-
private _isCreatingEditor;
|
|
386
|
-
private contentSlot;
|
|
387
|
-
private editorContainer;
|
|
388
|
-
private languageCompartment;
|
|
389
|
-
private readOnlyCompartment;
|
|
390
|
-
private wrapCompartment;
|
|
391
|
-
private contentSync?;
|
|
392
|
-
private languageController;
|
|
393
|
-
private streamingManager;
|
|
394
|
-
private codemirrorRuntime;
|
|
395
|
-
private codemirrorRuntimePromise;
|
|
396
|
-
private _resizeObserver;
|
|
397
400
|
constructor();
|
|
398
401
|
private _applyLanguageState;
|
|
399
402
|
/**
|
|
@@ -454,13 +457,11 @@ declare class CDSAIChatCodeSnippet extends CDSAIChatCodeSnippet_base {
|
|
|
454
457
|
* Renders the CodeMirror host along with the controls that make the chat snippet interactive and accessible.
|
|
455
458
|
*/
|
|
456
459
|
render(): import("lit-html").TemplateResult<1>;
|
|
457
|
-
static shadowRootOptions: {
|
|
458
|
-
delegatesFocus: boolean;
|
|
459
|
-
clonable?: boolean;
|
|
460
|
-
customElementRegistry?: CustomElementRegistry;
|
|
461
|
-
mode: ShadowRootMode;
|
|
462
|
-
serializable?: boolean;
|
|
463
|
-
slotAssignment?: SlotAssignmentMode;
|
|
464
|
-
};
|
|
465
460
|
}
|
|
461
|
+
declare global {
|
|
462
|
+
interface HTMLElementTagNameMap {
|
|
463
|
+
"cds-aichat-code-snippet": CDSAIChatCodeSnippet;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
export { CDSAIChatCodeSnippet };
|
|
466
467
|
export default CDSAIChatCodeSnippet;
|