@carbon/ai-chat-components 1.5.0 → 1.6.0-rc.1

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.
Files changed (34) hide show
  1. package/custom-elements.json +238 -198
  2. package/es/components/chat-shell/src/resize-observer-manager.d.ts +1 -1
  3. package/es/components/chat-shell/src/resize-observer-manager.js +3 -3
  4. package/es/components/chat-shell/src/resize-observer-manager.js.map +1 -1
  5. package/es/components/code-snippet/src/code-snippet.d.ts +7 -0
  6. package/es/components/code-snippet/src/code-snippet.js +23 -5
  7. package/es/components/code-snippet/src/code-snippet.js.map +1 -1
  8. package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
  9. package/es/components/code-snippet/src/codemirror/base-setup.d.ts +6 -0
  10. package/es/components/code-snippet/src/codemirror/base-setup.js +21 -13
  11. package/es/components/code-snippet/src/codemirror/base-setup.js.map +1 -1
  12. package/es/components/code-snippet/src/codemirror/theme.js +6 -4
  13. package/es/components/code-snippet/src/codemirror/theme.js.map +1 -1
  14. package/es/components/markdown/src/markdown.js +25 -1
  15. package/es/components/markdown/src/markdown.js.map +1 -1
  16. package/es/components/truncated-text/src/truncated-text.js +1 -1
  17. package/es/components/truncated-text/src/truncated-text.js.map +1 -1
  18. package/es-custom/components/chat-shell/src/resize-observer-manager.d.ts +1 -1
  19. package/es-custom/components/chat-shell/src/resize-observer-manager.js +3 -3
  20. package/es-custom/components/chat-shell/src/resize-observer-manager.js.map +1 -1
  21. package/es-custom/components/code-snippet/src/code-snippet.d.ts +7 -0
  22. package/es-custom/components/code-snippet/src/code-snippet.js +23 -5
  23. package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
  24. package/es-custom/components/code-snippet/src/code-snippet.scss.js +1 -1
  25. package/es-custom/components/code-snippet/src/codemirror/base-setup.d.ts +6 -0
  26. package/es-custom/components/code-snippet/src/codemirror/base-setup.js +21 -13
  27. package/es-custom/components/code-snippet/src/codemirror/base-setup.js.map +1 -1
  28. package/es-custom/components/code-snippet/src/codemirror/theme.js +6 -4
  29. package/es-custom/components/code-snippet/src/codemirror/theme.js.map +1 -1
  30. package/es-custom/components/markdown/src/markdown.js +25 -1
  31. package/es-custom/components/markdown/src/markdown.js.map +1 -1
  32. package/es-custom/components/truncated-text/src/truncated-text.js +1 -1
  33. package/es-custom/components/truncated-text/src/truncated-text.js.map +1 -1
  34. package/package.json +7 -7
@@ -9092,6 +9092,28 @@
9092
9092
  "attribute": "hide-header",
9093
9093
  "reflects": true
9094
9094
  },
9095
+ {
9096
+ "kind": "field",
9097
+ "name": "hideLineNumbers",
9098
+ "type": {
9099
+ "text": "boolean"
9100
+ },
9101
+ "default": "false",
9102
+ "description": "Hide the line-number gutter in the editor.",
9103
+ "attribute": "hide-line-numbers",
9104
+ "reflects": true
9105
+ },
9106
+ {
9107
+ "kind": "field",
9108
+ "name": "hideFold",
9109
+ "type": {
9110
+ "text": "boolean"
9111
+ },
9112
+ "default": "false",
9113
+ "description": "Hide the fold gutter, removing the ability to collapse and expand code\nblocks (the fold keyboard shortcuts are dropped along with the gutter).",
9114
+ "attribute": "hide-fold",
9115
+ "reflects": true
9116
+ },
9095
9117
  {
9096
9118
  "kind": "field",
9097
9119
  "name": "maxCollapsedNumberOfRows",
@@ -9476,6 +9498,24 @@
9476
9498
  "description": "Hide the header/toolbar completely.",
9477
9499
  "fieldName": "hideHeader"
9478
9500
  },
9501
+ {
9502
+ "name": "hide-line-numbers",
9503
+ "type": {
9504
+ "text": "boolean"
9505
+ },
9506
+ "default": "false",
9507
+ "description": "Hide the line-number gutter in the editor.",
9508
+ "fieldName": "hideLineNumbers"
9509
+ },
9510
+ {
9511
+ "name": "hide-fold",
9512
+ "type": {
9513
+ "text": "boolean"
9514
+ },
9515
+ "default": "false",
9516
+ "description": "Hide the fold gutter, removing the ability to collapse and expand code\nblocks (the fold keyboard shortcuts are dropped along with the gutter).",
9517
+ "fieldName": "hideFold"
9518
+ },
9479
9519
  {
9480
9520
  "name": "max-collapsed-number-of-rows",
9481
9521
  "type": {
@@ -12499,6 +12539,203 @@
12499
12539
  "declarations": [],
12500
12540
  "exports": []
12501
12541
  },
12542
+ {
12543
+ "kind": "javascript-module",
12544
+ "path": "src/components/toolbar/src/toolbar.ts",
12545
+ "declarations": [
12546
+ {
12547
+ "kind": "class",
12548
+ "description": "Toolbar.",
12549
+ "name": "CDSAIChatToolbar",
12550
+ "slots": [
12551
+ {
12552
+ "description": "Defines the navigation area of the toolbar.",
12553
+ "name": "navigation"
12554
+ },
12555
+ {
12556
+ "description": "Defines the title section of the toolbar.",
12557
+ "name": "title"
12558
+ },
12559
+ {
12560
+ "description": "Defines the area for displaying actions that are always visible (not overflowed) in the toolbar.",
12561
+ "name": "fixed-actions"
12562
+ },
12563
+ {
12564
+ "description": "Defines the area for displaying the AI label in the toolbar.",
12565
+ "name": "toolbar-ai-label"
12566
+ }
12567
+ ],
12568
+ "members": [
12569
+ {
12570
+ "kind": "field",
12571
+ "name": "actions",
12572
+ "type": {
12573
+ "text": "Action[]"
12574
+ },
12575
+ "default": "[]",
12576
+ "description": "The list of actions."
12577
+ },
12578
+ {
12579
+ "kind": "field",
12580
+ "name": "overflow",
12581
+ "type": {
12582
+ "text": "boolean"
12583
+ },
12584
+ "default": "false",
12585
+ "description": "Should actions be overflowing.",
12586
+ "attribute": "overflow",
12587
+ "reflects": true
12588
+ },
12589
+ {
12590
+ "kind": "field",
12591
+ "name": "titleText",
12592
+ "type": {
12593
+ "text": "string | undefined"
12594
+ },
12595
+ "attribute": "titleText"
12596
+ },
12597
+ {
12598
+ "kind": "field",
12599
+ "name": "nameText",
12600
+ "type": {
12601
+ "text": "string | undefined"
12602
+ },
12603
+ "attribute": "nameText"
12604
+ },
12605
+ {
12606
+ "kind": "field",
12607
+ "name": "measuring",
12608
+ "type": {
12609
+ "text": "boolean"
12610
+ },
12611
+ "privacy": "private",
12612
+ "default": "true"
12613
+ },
12614
+ {
12615
+ "kind": "field",
12616
+ "name": "overflowHandler",
12617
+ "type": {
12618
+ "text": "{ disconnect: () => void } | undefined"
12619
+ },
12620
+ "privacy": "private"
12621
+ },
12622
+ {
12623
+ "kind": "field",
12624
+ "name": "visibilityObserver",
12625
+ "type": {
12626
+ "text": "ResizeObserver | undefined"
12627
+ },
12628
+ "privacy": "private"
12629
+ },
12630
+ {
12631
+ "kind": "field",
12632
+ "name": "OVERFLOW_MENU_LABEL",
12633
+ "type": {
12634
+ "text": "string"
12635
+ },
12636
+ "privacy": "private",
12637
+ "static": true,
12638
+ "readonly": true,
12639
+ "default": "\"Options\""
12640
+ },
12641
+ {
12642
+ "kind": "method",
12643
+ "name": "setupOverflowHandler",
12644
+ "privacy": "private"
12645
+ },
12646
+ {
12647
+ "kind": "method",
12648
+ "name": "findFocusedOverflowMenuItem",
12649
+ "privacy": "private",
12650
+ "return": {
12651
+ "type": {
12652
+ "text": "Element | null"
12653
+ }
12654
+ },
12655
+ "parameters": [
12656
+ {
12657
+ "name": "activeElem",
12658
+ "type": {
12659
+ "text": "Element"
12660
+ }
12661
+ }
12662
+ ],
12663
+ "description": "Returns the focused overflow menu item (if exists) by traversing shadow DOM"
12664
+ },
12665
+ {
12666
+ "kind": "field",
12667
+ "name": "_handleToolbarKeydown",
12668
+ "privacy": "private"
12669
+ },
12670
+ {
12671
+ "kind": "field",
12672
+ "name": "renderIconButton",
12673
+ "privacy": "private",
12674
+ "description": "Renders an action as an icon button.\nNote: Some Action properties only apply when rendered in overflow menu:\n- danger/dangerDescription: cds-icon-button doesn't support danger variant\n- divider: Only applicable in menu context"
12675
+ },
12676
+ {
12677
+ "kind": "method",
12678
+ "name": "getOverflowMenuSize",
12679
+ "privacy": "private",
12680
+ "return": {
12681
+ "type": {
12682
+ "text": "OVERFLOW_MENU_SIZE"
12683
+ }
12684
+ }
12685
+ }
12686
+ ],
12687
+ "attributes": [
12688
+ {
12689
+ "name": "overflow",
12690
+ "type": {
12691
+ "text": "boolean"
12692
+ },
12693
+ "default": "false",
12694
+ "description": "Should actions be overflowing.",
12695
+ "fieldName": "overflow"
12696
+ },
12697
+ {
12698
+ "name": "titleText",
12699
+ "type": {
12700
+ "text": "string | undefined"
12701
+ },
12702
+ "fieldName": "titleText"
12703
+ },
12704
+ {
12705
+ "name": "nameText",
12706
+ "type": {
12707
+ "text": "string | undefined"
12708
+ },
12709
+ "fieldName": "nameText"
12710
+ }
12711
+ ],
12712
+ "superclass": {
12713
+ "name": "LitElement",
12714
+ "package": "lit"
12715
+ },
12716
+ "tagName": "cds-aichat-toolbar",
12717
+ "customElement": true
12718
+ }
12719
+ ],
12720
+ "exports": [
12721
+ {
12722
+ "kind": "js",
12723
+ "name": "CDSAIChatToolbar",
12724
+ "declaration": {
12725
+ "name": "CDSAIChatToolbar",
12726
+ "module": "src/components/toolbar/src/toolbar.ts"
12727
+ }
12728
+ },
12729
+ {
12730
+ "kind": "js",
12731
+ "name": "default",
12732
+ "declaration": {
12733
+ "name": "CDSAIChatToolbar",
12734
+ "module": "src/components/toolbar/src/toolbar.ts"
12735
+ }
12736
+ }
12737
+ ]
12738
+ },
12502
12739
  {
12503
12740
  "kind": "javascript-module",
12504
12741
  "path": "src/components/truncated-text/src/truncated-text.ts",
@@ -12849,203 +13086,6 @@
12849
13086
  }
12850
13087
  ]
12851
13088
  },
12852
- {
12853
- "kind": "javascript-module",
12854
- "path": "src/components/toolbar/src/toolbar.ts",
12855
- "declarations": [
12856
- {
12857
- "kind": "class",
12858
- "description": "Toolbar.",
12859
- "name": "CDSAIChatToolbar",
12860
- "slots": [
12861
- {
12862
- "description": "Defines the navigation area of the toolbar.",
12863
- "name": "navigation"
12864
- },
12865
- {
12866
- "description": "Defines the title section of the toolbar.",
12867
- "name": "title"
12868
- },
12869
- {
12870
- "description": "Defines the area for displaying actions that are always visible (not overflowed) in the toolbar.",
12871
- "name": "fixed-actions"
12872
- },
12873
- {
12874
- "description": "Defines the area for displaying the AI label in the toolbar.",
12875
- "name": "toolbar-ai-label"
12876
- }
12877
- ],
12878
- "members": [
12879
- {
12880
- "kind": "field",
12881
- "name": "actions",
12882
- "type": {
12883
- "text": "Action[]"
12884
- },
12885
- "default": "[]",
12886
- "description": "The list of actions."
12887
- },
12888
- {
12889
- "kind": "field",
12890
- "name": "overflow",
12891
- "type": {
12892
- "text": "boolean"
12893
- },
12894
- "default": "false",
12895
- "description": "Should actions be overflowing.",
12896
- "attribute": "overflow",
12897
- "reflects": true
12898
- },
12899
- {
12900
- "kind": "field",
12901
- "name": "titleText",
12902
- "type": {
12903
- "text": "string | undefined"
12904
- },
12905
- "attribute": "titleText"
12906
- },
12907
- {
12908
- "kind": "field",
12909
- "name": "nameText",
12910
- "type": {
12911
- "text": "string | undefined"
12912
- },
12913
- "attribute": "nameText"
12914
- },
12915
- {
12916
- "kind": "field",
12917
- "name": "measuring",
12918
- "type": {
12919
- "text": "boolean"
12920
- },
12921
- "privacy": "private",
12922
- "default": "true"
12923
- },
12924
- {
12925
- "kind": "field",
12926
- "name": "overflowHandler",
12927
- "type": {
12928
- "text": "{ disconnect: () => void } | undefined"
12929
- },
12930
- "privacy": "private"
12931
- },
12932
- {
12933
- "kind": "field",
12934
- "name": "visibilityObserver",
12935
- "type": {
12936
- "text": "ResizeObserver | undefined"
12937
- },
12938
- "privacy": "private"
12939
- },
12940
- {
12941
- "kind": "field",
12942
- "name": "OVERFLOW_MENU_LABEL",
12943
- "type": {
12944
- "text": "string"
12945
- },
12946
- "privacy": "private",
12947
- "static": true,
12948
- "readonly": true,
12949
- "default": "\"Options\""
12950
- },
12951
- {
12952
- "kind": "method",
12953
- "name": "setupOverflowHandler",
12954
- "privacy": "private"
12955
- },
12956
- {
12957
- "kind": "method",
12958
- "name": "findFocusedOverflowMenuItem",
12959
- "privacy": "private",
12960
- "return": {
12961
- "type": {
12962
- "text": "Element | null"
12963
- }
12964
- },
12965
- "parameters": [
12966
- {
12967
- "name": "activeElem",
12968
- "type": {
12969
- "text": "Element"
12970
- }
12971
- }
12972
- ],
12973
- "description": "Returns the focused overflow menu item (if exists) by traversing shadow DOM"
12974
- },
12975
- {
12976
- "kind": "field",
12977
- "name": "_handleToolbarKeydown",
12978
- "privacy": "private"
12979
- },
12980
- {
12981
- "kind": "field",
12982
- "name": "renderIconButton",
12983
- "privacy": "private",
12984
- "description": "Renders an action as an icon button.\nNote: Some Action properties only apply when rendered in overflow menu:\n- danger/dangerDescription: cds-icon-button doesn't support danger variant\n- divider: Only applicable in menu context"
12985
- },
12986
- {
12987
- "kind": "method",
12988
- "name": "getOverflowMenuSize",
12989
- "privacy": "private",
12990
- "return": {
12991
- "type": {
12992
- "text": "OVERFLOW_MENU_SIZE"
12993
- }
12994
- }
12995
- }
12996
- ],
12997
- "attributes": [
12998
- {
12999
- "name": "overflow",
13000
- "type": {
13001
- "text": "boolean"
13002
- },
13003
- "default": "false",
13004
- "description": "Should actions be overflowing.",
13005
- "fieldName": "overflow"
13006
- },
13007
- {
13008
- "name": "titleText",
13009
- "type": {
13010
- "text": "string | undefined"
13011
- },
13012
- "fieldName": "titleText"
13013
- },
13014
- {
13015
- "name": "nameText",
13016
- "type": {
13017
- "text": "string | undefined"
13018
- },
13019
- "fieldName": "nameText"
13020
- }
13021
- ],
13022
- "superclass": {
13023
- "name": "LitElement",
13024
- "package": "lit"
13025
- },
13026
- "tagName": "cds-aichat-toolbar",
13027
- "customElement": true
13028
- }
13029
- ],
13030
- "exports": [
13031
- {
13032
- "kind": "js",
13033
- "name": "CDSAIChatToolbar",
13034
- "declaration": {
13035
- "name": "CDSAIChatToolbar",
13036
- "module": "src/components/toolbar/src/toolbar.ts"
13037
- }
13038
- },
13039
- {
13040
- "kind": "js",
13041
- "name": "default",
13042
- "declaration": {
13043
- "name": "CDSAIChatToolbar",
13044
- "module": "src/components/toolbar/src/toolbar.ts"
13045
- }
13046
- }
13047
- ]
13048
- },
13049
13089
  {
13050
13090
  "kind": "javascript-module",
13051
13091
  "path": "src/components/video-player/src/video-player.ts",
@@ -15467,7 +15507,7 @@
15467
15507
  }
15468
15508
  }
15469
15509
  ],
15470
- "description": "Minimal editor affordances for snippets:\n - keep the layout oriented (gutters, folding)\n - preserve indentation and basic syntax cues\n - avoid heavier behaviors like search, autocomplete, multi-caret history"
15510
+ "description": "Minimal editor affordances for snippets:\n - keep the layout oriented (gutters, folding)\n - preserve indentation and basic syntax cues\n - avoid heavier behaviors like search, autocomplete, multi-caret history\n\n`hideLineNumbers` drops the line-number gutter and `hideFold` drops the\nfolding affordances (gutter, marker key handler, and fold keymap) so callers\ncan render a leaner surface for short, static snippets."
15471
15511
  }
15472
15512
  ],
15473
15513
  "exports": [
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  *
4
- * Copyright IBM Corp. 2025
4
+ * Copyright IBM Corp. 2025, 2026
5
5
  *
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
@@ -8,7 +8,7 @@
8
8
  /**
9
9
  * @license
10
10
  *
11
- * Copyright IBM Corp. 2025
11
+ * Copyright IBM Corp. 2025, 2026
12
12
  *
13
13
  * This source code is licensed under the Apache-2.0 license found in the
14
14
  * LICENSE file in the root directory of this source tree.
@@ -81,8 +81,8 @@ class ResizeObserverManager {
81
81
  }
82
82
  const messagesMaxWidth = this.getMessagesMaxWidth();
83
83
  const updateAtMaxWidth = (hostWidth) => {
84
- // When host is less than max-width, input-and-messages is "at max width" (filling container)
85
- const isAtMaxWidth = hostWidth < messagesMaxWidth;
84
+ // When host is less than or equal to max-width, input-and-messages is "at max width" (filling container)
85
+ const isAtMaxWidth = hostWidth <= messagesMaxWidth;
86
86
  onWidthChange({ isAtMaxWidth, currentWidth: hostWidth });
87
87
  };
88
88
  const measure = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"resize-observer-manager.js","sources":["../../../../src/components/chat-shell/src/resize-observer-manager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAIH;;;AAGG;MACU,qBAAqB,CAAA;IAOhC,WAAA,CACmB,SAAqB,EACrB,WAA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G,GAAG,GAAG,MAAM;QAC7D,OAAO,IAAI,CAAC,yBAAyB;IACvC;AAEA;;AAEG;IACH,2BAA2B,GAAA;AACzB,QAAA,MAAM,eAAe,GAAG,IAAI,CAAC,mBAAmB,EAAE;AAClD,QAAA,MAAM,UAAU,GACd,IAAI,CAAC,yBAAyB,KAAK,SAAS;AAC5C,YAAA,eAAe,KAAK,IAAI,CAAC,yBAAyB;QAEpD,IAAI,UAAU,EAAE;AACd,YAAA,IAAI,CAAC,yBAAyB,GAAG,eAAe;QAClD;AAEA,QAAA,OAAO,UAAU;IACnB;AAEA;;AAEG;AACH,IAAA,oBAAoB,CAAC,gBAA4B,EAAA;AAC/C,QAAA,IAAI,OAAO,gBAAgB,KAAK,WAAW,EAAE;YAC3C;QACF;AAEA,QAAA,IAAI,CAAC,mBAAmB,GAAG,IAAI,gBAAgB,CAAC,MAAK;AACnD,YAAA,IAAI,IAAI,CAAC,2BAA2B,EAAE,EAAE;AACtC,gBAAA,gBAAgB,EAAE;YACpB;AACF,QAAA,CAAC,CAAC;QAEF,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE;AACjD,YAAA,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,CAAC,OAAO,CAAC;AAC3B,SAAA,CAAC;IACJ;AACD;AAED;;;;"}
1
+ {"version":3,"file":"resize-observer-manager.js","sources":["../../../../src/components/chat-shell/src/resize-observer-manager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAIH;;;AAGG;MACU,qBAAqB,CAAA;IAOhC,WAAA,CACmB,SAAqB,EACrB,WAAwB,EAAA;QADxB,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,WAAW,GAAX,WAAW;IAC3B;AAEH;;AAEG;IACH,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,oBAAoB,EAAE,UAAU,EAAE;AACvC,QAAA,IAAI,CAAC,8BAA8B,EAAE,UAAU,E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C5C,YAAA,eAAe,KAAK,IAAI,CAAC,yBAAyB;QAEpD,IAAI,UAAU,EAAE;AACd,YAAA,IAAI,CAAC,yBAAyB,GAAG,eAAe;QAClD;AAEA,QAAA,OAAO,UAAU;IACnB;AAEA;;AAEG;AACH,IAAA,oBAAoB,CAAC,gBAA4B,EAAA;AAC/C,QAAA,IAAI,OAAO,gBAAgB,KAAK,WAAW,EAAE;YAC3C;QACF;AAEA,QAAA,IAAI,CAAC,mBAAmB,GAAG,IAAI,gBAAgB,CAAC,MAAK;AACnD,YAAA,IAAI,IAAI,CAAC,2BAA2B,EAAE,EAAE;AACtC,gBAAA,gBAAgB,EAAE;YACpB;AACF,QAAA,CAAC,CAAC;QAEF,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE;AACjD,YAAA,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,CAAC,OAAO,CAAC;AAC3B,SAAA,CAAC;IACJ;AACD;AAED;;;;"}
@@ -46,6 +46,13 @@ declare class CDSAIChatCodeSnippet extends CDSAIChatCodeSnippet_base {
46
46
  hideCopyButton: boolean;
47
47
  /** Hide the header/toolbar completely. */
48
48
  hideHeader: boolean;
49
+ /** Hide the line-number gutter in the editor. */
50
+ hideLineNumbers: boolean;
51
+ /**
52
+ * Hide the fold gutter, removing the ability to collapse and expand code
53
+ * blocks (the fold keyboard shortcuts are dropped along with the gutter).
54
+ */
55
+ hideFold: boolean;
49
56
  /**
50
57
  * Maximum rows to show when collapsed.
51
58
  * Set to 0 along with maxExpandedNumberOfRows to enable fill-container mode.
@@ -110,6 +110,13 @@ let CDSAIChatCodeSnippet = class CDSAIChatCodeSnippet extends FocusMixin(LitElem
110
110
  this.hideCopyButton = false;
111
111
  /** Hide the header/toolbar completely. */
112
112
  this.hideHeader = false;
113
+ /** Hide the line-number gutter in the editor. */
114
+ this.hideLineNumbers = false;
115
+ /**
116
+ * Hide the fold gutter, removing the ability to collapse and expand code
117
+ * blocks (the fold keyboard shortcuts are dropped along with the gutter).
118
+ */
119
+ this.hideFold = false;
113
120
  /**
114
121
  * Maximum rows to show when collapsed.
115
122
  * Set to 0 along with maxExpandedNumberOfRows to enable fill-container mode.
@@ -389,7 +396,10 @@ let CDSAIChatCodeSnippet = class CDSAIChatCodeSnippet extends FocusMixin(LitElem
389
396
  const languageCompartment = this.languageCompartment;
390
397
  const readOnlyCompartment = this.readOnlyCompartment;
391
398
  const contentAttributesCompartment = this.contentAttributesCompartment;
392
- const needsRecreate = !this.editorView || changedProperties.has("editable");
399
+ const needsRecreate = !this.editorView ||
400
+ changedProperties.has("editable") ||
401
+ changedProperties.has("hideLineNumbers") ||
402
+ changedProperties.has("hideFold");
393
403
  if (needsRecreate) {
394
404
  // Prevent creating multiple editors simultaneously
395
405
  if (this._isCreatingEditor) {
@@ -486,6 +496,8 @@ let CDSAIChatCodeSnippet = class CDSAIChatCodeSnippet extends FocusMixin(LitElem
486
496
  setupOptions: {
487
497
  foldCollapseLabel: this.foldCollapseLabel,
488
498
  foldExpandLabel: this.foldExpandLabel,
499
+ hideLineNumbers: this.hideLineNumbers,
500
+ hideFold: this.hideFold,
489
501
  },
490
502
  });
491
503
  }
@@ -828,16 +840,22 @@ __decorate([
828
840
  property({ type: Boolean, reflect: true, attribute: "hide-header" })
829
841
  ], CDSAIChatCodeSnippet.prototype, "hideHeader", void 0);
830
842
  __decorate([
831
- property({ attribute: "max-collapsed-number-of-rows" })
843
+ property({ type: Boolean, reflect: true, attribute: "hide-line-numbers" })
844
+ ], CDSAIChatCodeSnippet.prototype, "hideLineNumbers", void 0);
845
+ __decorate([
846
+ property({ type: Boolean, reflect: true, attribute: "hide-fold" })
847
+ ], CDSAIChatCodeSnippet.prototype, "hideFold", void 0);
848
+ __decorate([
849
+ property({ type: Number, attribute: "max-collapsed-number-of-rows" })
832
850
  ], CDSAIChatCodeSnippet.prototype, "maxCollapsedNumberOfRows", void 0);
833
851
  __decorate([
834
- property({ attribute: "max-expanded-number-of-rows" })
852
+ property({ type: Number, attribute: "max-expanded-number-of-rows" })
835
853
  ], CDSAIChatCodeSnippet.prototype, "maxExpandedNumberOfRows", void 0);
836
854
  __decorate([
837
- property({ attribute: "min-collapsed-number-of-rows" })
855
+ property({ type: Number, attribute: "min-collapsed-number-of-rows" })
838
856
  ], CDSAIChatCodeSnippet.prototype, "minCollapsedNumberOfRows", void 0);
839
857
  __decorate([
840
- property({ attribute: "min-expanded-number-of-rows" })
858
+ property({ type: Number, attribute: "min-expanded-number-of-rows" })
841
859
  ], CDSAIChatCodeSnippet.prototype, "minExpandedNumberOfRows", void 0);
842
860
  __decorate([
843
861
  property({ attribute: "show-less-text" })