@carbon/ai-chat-components 1.9.0-rc.1 → 1.9.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.
Files changed (101) hide show
  1. package/custom-elements.json +345 -21
  2. package/es/components/prompt-line/autocomplete/src/autocomplete.d.ts +8 -1
  3. package/es/components/prompt-line/autocomplete/src/autocomplete.js +58 -13
  4. package/es/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -1
  5. package/es/components/prompt-line/autocomplete/src/autocomplete.scss.js +1 -1
  6. package/es/components/prompt-line/src/autocomplete-controller.js +5 -15
  7. package/es/components/prompt-line/src/autocomplete-controller.js.map +1 -1
  8. package/es/components/prompt-line/src/prompt-line-constants.d.ts +10 -0
  9. package/es/components/prompt-line/src/prompt-line-constants.js +8 -1
  10. package/es/components/prompt-line/src/prompt-line-constants.js.map +1 -1
  11. package/es/components/prompt-line/src/prompt-line-controller.d.ts +15 -2
  12. package/es/components/prompt-line/src/prompt-line-controller.js +5 -2
  13. package/es/components/prompt-line/src/prompt-line-controller.js.map +1 -1
  14. package/es/components/prompt-line/src/prompt-line-rich-loader.js +5 -0
  15. package/es/components/prompt-line/src/prompt-line-rich-loader.js.map +1 -1
  16. package/es/components/prompt-line/src/prompt-line-rich-runtime.d.ts +2 -0
  17. package/es/components/prompt-line/src/prompt-line-rich-runtime.js +111 -15
  18. package/es/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
  19. package/es/components/prompt-line/src/prompt-line.d.ts +44 -7
  20. package/es/components/prompt-line/src/prompt-line.js +124 -31
  21. package/es/components/prompt-line/src/prompt-line.js.map +1 -1
  22. package/es/components/prompt-line/src/tiptap/build-extensions.js +35 -5
  23. package/es/components/prompt-line/src/tiptap/build-extensions.js.map +1 -1
  24. package/es/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +5 -1
  25. package/es/components/prompt-line/src/tiptap/carbon-autocomplete.js +16 -7
  26. package/es/components/prompt-line/src/tiptap/carbon-autocomplete.js.map +1 -1
  27. package/es/components/prompt-line/src/tiptap/carbon-mention.js +3 -3
  28. package/es/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -1
  29. package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +12 -1
  30. package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js +28 -3
  31. package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -1
  32. package/es/components/prompt-line/src/tiptap/editor-styles.js +1 -1
  33. package/es/components/prompt-line/src/tiptap/editor-styles.js.map +1 -1
  34. package/es/components/prompt-line/src/tiptap/extension-equivalence.d.ts +63 -0
  35. package/es/components/prompt-line/src/tiptap/extension-equivalence.js +80 -0
  36. package/es/components/prompt-line/src/tiptap/extension-equivalence.js.map +1 -0
  37. package/es/components/prompt-line/src/tiptap/index.d.ts +1 -4
  38. package/es/components/prompt-line/src/tiptap/index.js +1 -18
  39. package/es/components/prompt-line/src/tiptap/index.js.map +1 -1
  40. package/es/components/prompt-line/src/tiptap/json-utils.d.ts +8 -0
  41. package/es/components/prompt-line/src/tiptap/json-utils.js +11 -1
  42. package/es/components/prompt-line/src/tiptap/json-utils.js.map +1 -1
  43. package/es/components/prompt-line/src/tiptap/render-token-chip.js +3 -5
  44. package/es/components/prompt-line/src/tiptap/render-token-chip.js.map +1 -1
  45. package/es/components/prompt-line/src/tiptap/types.d.ts +5 -15
  46. package/es/react/hooks/useChatAutocomplete.js +14 -1
  47. package/es/react/hooks/useChatAutocomplete.js.map +1 -1
  48. package/es/react/prompt-line.d.ts +3 -2
  49. package/es/react/prompt-line.js +3 -2
  50. package/es/react/prompt-line.js.map +1 -1
  51. package/es-custom/components/prompt-line/autocomplete/src/autocomplete.d.ts +8 -1
  52. package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js +58 -13
  53. package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -1
  54. package/es-custom/components/prompt-line/autocomplete/src/autocomplete.scss.js +1 -1
  55. package/es-custom/components/prompt-line/src/autocomplete-controller.js +5 -15
  56. package/es-custom/components/prompt-line/src/autocomplete-controller.js.map +1 -1
  57. package/es-custom/components/prompt-line/src/prompt-line-constants.d.ts +10 -0
  58. package/es-custom/components/prompt-line/src/prompt-line-constants.js +8 -1
  59. package/es-custom/components/prompt-line/src/prompt-line-constants.js.map +1 -1
  60. package/es-custom/components/prompt-line/src/prompt-line-controller.d.ts +15 -2
  61. package/es-custom/components/prompt-line/src/prompt-line-controller.js +5 -2
  62. package/es-custom/components/prompt-line/src/prompt-line-controller.js.map +1 -1
  63. package/es-custom/components/prompt-line/src/prompt-line-rich-loader.js +5 -0
  64. package/es-custom/components/prompt-line/src/prompt-line-rich-loader.js.map +1 -1
  65. package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.d.ts +2 -0
  66. package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js +111 -15
  67. package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
  68. package/es-custom/components/prompt-line/src/prompt-line.d.ts +44 -7
  69. package/es-custom/components/prompt-line/src/prompt-line.js +124 -31
  70. package/es-custom/components/prompt-line/src/prompt-line.js.map +1 -1
  71. package/es-custom/components/prompt-line/src/tiptap/build-extensions.js +35 -5
  72. package/es-custom/components/prompt-line/src/tiptap/build-extensions.js.map +1 -1
  73. package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +5 -1
  74. package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.js +16 -7
  75. package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.js.map +1 -1
  76. package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js +3 -3
  77. package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -1
  78. package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +12 -1
  79. package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js +28 -3
  80. package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -1
  81. package/es-custom/components/prompt-line/src/tiptap/editor-styles.js +1 -1
  82. package/es-custom/components/prompt-line/src/tiptap/editor-styles.js.map +1 -1
  83. package/es-custom/components/prompt-line/src/tiptap/extension-equivalence.d.ts +63 -0
  84. package/es-custom/components/prompt-line/src/tiptap/extension-equivalence.js +80 -0
  85. package/es-custom/components/prompt-line/src/tiptap/extension-equivalence.js.map +1 -0
  86. package/es-custom/components/prompt-line/src/tiptap/index.d.ts +1 -4
  87. package/es-custom/components/prompt-line/src/tiptap/index.js +1 -18
  88. package/es-custom/components/prompt-line/src/tiptap/index.js.map +1 -1
  89. package/es-custom/components/prompt-line/src/tiptap/json-utils.d.ts +8 -0
  90. package/es-custom/components/prompt-line/src/tiptap/json-utils.js +11 -1
  91. package/es-custom/components/prompt-line/src/tiptap/json-utils.js.map +1 -1
  92. package/es-custom/components/prompt-line/src/tiptap/render-token-chip.js +3 -5
  93. package/es-custom/components/prompt-line/src/tiptap/render-token-chip.js.map +1 -1
  94. package/es-custom/components/prompt-line/src/tiptap/types.d.ts +5 -15
  95. package/es-custom/react/hooks/useChatAutocomplete.js +14 -1
  96. package/es-custom/react/hooks/useChatAutocomplete.js.map +1 -1
  97. package/es-custom/react/prompt-line.d.ts +3 -2
  98. package/es-custom/react/prompt-line.js +3 -2
  99. package/es-custom/react/prompt-line.js.map +1 -1
  100. package/package.json +14 -24
  101. package/telemetry.yml +13 -8
@@ -14159,6 +14159,15 @@
14159
14159
  },
14160
14160
  "default": "'157px'",
14161
14161
  "description": "Max block size the prompt line grows to before it caps and shows a vertical\nscrollbar. Shared by both editing surfaces — the lite `<textarea>`\n([./prompt-line-controller.ts]) and the rich Tiptap content node\n([./tiptap/editor-styles.ts]) — so the two modes cap at the same height and\nthe textarea→rich swap stays imperceptible. Keep them reading this one\nconstant so they can't drift."
14162
+ },
14163
+ {
14164
+ "kind": "variable",
14165
+ "name": "HISTORY_DEFAULTS",
14166
+ "type": {
14167
+ "text": "{ depth: 100, newGroupDelay: 500 }"
14168
+ },
14169
+ "default": "{ depth: 100, newGroupDelay: 500 }",
14170
+ "description": "Undo/redo tuning for the rich editor's `UndoRedo` extension. Lives here rather\nthan in the tiptap barrel so [./prompt-line-rich-runtime.ts] can read it\nwithout importing the barrel — that would pull the whole curated bundle into\nthe lazily-imported Tiptap chunk. Re-exported from [./tiptap/index.ts]."
14162
14171
  }
14163
14172
  ],
14164
14173
  "exports": [
@@ -14169,6 +14178,14 @@
14169
14178
  "name": "PROMPT_LINE_MAX_BLOCK_SIZE",
14170
14179
  "module": "src/components/prompt-line/src/prompt-line-constants.ts"
14171
14180
  }
14181
+ },
14182
+ {
14183
+ "kind": "js",
14184
+ "name": "HISTORY_DEFAULTS",
14185
+ "declaration": {
14186
+ "name": "HISTORY_DEFAULTS",
14187
+ "module": "src/components/prompt-line/src/prompt-line-constants.ts"
14188
+ }
14172
14189
  }
14173
14190
  ]
14174
14191
  },
@@ -14491,6 +14508,23 @@
14491
14508
  }
14492
14509
  ]
14493
14510
  },
14511
+ {
14512
+ "kind": "method",
14513
+ "name": "setComposing",
14514
+ "return": {
14515
+ "type": {
14516
+ "text": "void"
14517
+ }
14518
+ },
14519
+ "parameters": [
14520
+ {
14521
+ "name": "_composing",
14522
+ "type": {
14523
+ "text": "boolean"
14524
+ }
14525
+ }
14526
+ ]
14527
+ },
14494
14528
  {
14495
14529
  "kind": "method",
14496
14530
  "name": "undo",
@@ -14712,6 +14746,15 @@
14712
14746
  "kind": "javascript-module",
14713
14747
  "path": "src/components/prompt-line/src/prompt-line-rich-runtime.ts",
14714
14748
  "declarations": [
14749
+ {
14750
+ "kind": "variable",
14751
+ "name": "PM_KEYBOARD_FOCUS_CLASS",
14752
+ "type": {
14753
+ "text": "string"
14754
+ },
14755
+ "default": "'cds-aichat--input-pm-content--keyboard-focus'",
14756
+ "description": "Exported so tests assert the ring without retyping the literal."
14757
+ },
14715
14758
  {
14716
14759
  "kind": "function",
14717
14760
  "name": "createRichController",
@@ -14724,6 +14767,14 @@
14724
14767
  }
14725
14768
  ],
14726
14769
  "exports": [
14770
+ {
14771
+ "kind": "js",
14772
+ "name": "PM_KEYBOARD_FOCUS_CLASS",
14773
+ "declaration": {
14774
+ "name": "PM_KEYBOARD_FOCUS_CLASS",
14775
+ "module": "src/components/prompt-line/src/prompt-line-rich-runtime.ts"
14776
+ }
14777
+ },
14727
14778
  {
14728
14779
  "kind": "js",
14729
14780
  "name": "createRichController",
@@ -14939,7 +14990,7 @@
14939
14990
  "text": "Extension[]"
14940
14991
  },
14941
14992
  "default": "[]",
14942
- "description": "Host-supplied Tiptap extensions, appended to the carbon bundle when the\nrich editor mounts. These are *staged*, not a rich-mode trigger: setting\nthem while in textarea mode does not load Tiptap. Select rich explicitly\nwith `rich` or call `ensureEditor()`; the upgrade mounts with these\nalready installed. Memoize on the host side — a reference change recreates\na live editor."
14993
+ "description": "Host-supplied Tiptap extensions, appended to the carbon bundle when the\nrich editor mounts. These are *staged*, not a rich-mode trigger: setting\nthem while in textarea mode does not load Tiptap. Select rich explicitly\nwith `rich` or call `ensureEditor()`; the upgrade mounts with these\nalready installed.\n\nA new array is compared by value against the set last supplied, so a config\nupdate that rebuilds an equivalent one leaves the live editor and its undo\nhistory in place, writing any starter `items`/`isOn` through to storage.\nOnly a genuinely different set recreates the editor, preserving content,\nselection, and focus but resetting history.\nExtensions built by `buildCarbonExtensions` compare by their source\nconfig; anything you supply directly compares by reference, so memoize\nthose (a fresh instance each render reads as a real change)."
14943
14994
  },
14944
14995
  {
14945
14996
  "kind": "field",
@@ -15048,6 +15099,34 @@
15048
15099
  "privacy": "private",
15049
15100
  "default": "null"
15050
15101
  },
15102
+ {
15103
+ "kind": "field",
15104
+ "name": "_seededContent",
15105
+ "type": {
15106
+ "text": "JSONContent | string | undefined"
15107
+ },
15108
+ "privacy": "private",
15109
+ "description": "The `content` value the current surface was seeded with, and whether that\nseed is still unconsumed. Both are needed: the value catches the echo, and\nthe latch releases after one `updated()` so a later change back to the same\nvalue still lands. Comparing on the value alone suppressed it for the life\nof the surface, dropping `a` in an `a` -> `b` -> `a` sequence."
15110
+ },
15111
+ {
15112
+ "kind": "field",
15113
+ "name": "_seedPending",
15114
+ "type": {
15115
+ "text": "boolean"
15116
+ },
15117
+ "privacy": "private",
15118
+ "default": "false"
15119
+ },
15120
+ {
15121
+ "kind": "field",
15122
+ "name": "_pendingTeardownTimer",
15123
+ "type": {
15124
+ "text": "ReturnType<typeof setTimeout> | null"
15125
+ },
15126
+ "privacy": "private",
15127
+ "default": "null",
15128
+ "description": "Pending deferred teardown, cancelled if the element is reattached."
15129
+ },
15051
15130
  {
15052
15131
  "kind": "field",
15053
15132
  "name": "_richLatched",
@@ -15074,7 +15153,8 @@
15074
15153
  "text": "boolean"
15075
15154
  },
15076
15155
  "privacy": "private",
15077
- "default": "false"
15156
+ "default": "false",
15157
+ "description": "The element owns the host's composition listeners for both layers — it\ngates its own textarea→rich upgrade on this, and pushes the state to the\nactive controller via `setComposing` so rich mode can withhold a recreate.\nOne observer, so the two layers cannot disagree."
15078
15158
  },
15079
15159
  {
15080
15160
  "kind": "field",
@@ -15113,6 +15193,28 @@
15113
15193
  "privacy": "private",
15114
15194
  "default": "null"
15115
15195
  },
15196
+ {
15197
+ "kind": "method",
15198
+ "name": "_teardownSurface",
15199
+ "privacy": "private",
15200
+ "return": {
15201
+ "type": {
15202
+ "text": "void"
15203
+ }
15204
+ },
15205
+ "description": "Destroy the editing surface. Deferred from `disconnectedCallback`."
15206
+ },
15207
+ {
15208
+ "kind": "method",
15209
+ "name": "_initializeSurface",
15210
+ "privacy": "private",
15211
+ "return": {
15212
+ "type": {
15213
+ "text": "void"
15214
+ }
15215
+ },
15216
+ "description": "Mount the editing surface. Runs on first render and on a late reconnect."
15217
+ },
15116
15218
  {
15117
15219
  "kind": "method",
15118
15220
  "name": "getEditor",
@@ -15275,6 +15377,17 @@
15275
15377
  }
15276
15378
  }
15277
15379
  },
15380
+ {
15381
+ "kind": "method",
15382
+ "name": "_isTornDown",
15383
+ "privacy": "private",
15384
+ "return": {
15385
+ "type": {
15386
+ "text": "boolean"
15387
+ }
15388
+ },
15389
+ "description": "Rendered once and then torn down — the element is inert until something\nre-runs the mount path. Distinct from \"not yet rendered\", where Lit's own\n`firstUpdated` still has it."
15390
+ },
15278
15391
  {
15279
15392
  "kind": "method",
15280
15393
  "name": "_mountEditorHost",
@@ -21404,6 +21517,31 @@
21404
21517
  ],
21405
21518
  "description": "Get the item at a specific index (accounting for both flat items and groups)"
21406
21519
  },
21520
+ {
21521
+ "kind": "method",
21522
+ "name": "_navigateTo",
21523
+ "privacy": "private",
21524
+ "return": {
21525
+ "type": {
21526
+ "text": "number"
21527
+ }
21528
+ },
21529
+ "parameters": [
21530
+ {
21531
+ "name": "from",
21532
+ "type": {
21533
+ "text": "number"
21534
+ }
21535
+ },
21536
+ {
21537
+ "name": "direction",
21538
+ "type": {
21539
+ "text": "1 | -1"
21540
+ }
21541
+ }
21542
+ ],
21543
+ "description": "Move focus to the next enabled item in the given direction (+1 / -1),\nskipping over any disabled items. Mirrors the Carbon Dropdown `_navigate`\npattern. Returns the resolved index, or the current index if no enabled\nitem exists in that direction."
21544
+ },
21407
21545
  {
21408
21546
  "kind": "field",
21409
21547
  "name": "_handleKeydown",
@@ -21631,34 +21769,34 @@
21631
21769
  "exports": [
21632
21770
  {
21633
21771
  "kind": "js",
21634
- "name": "SuggestionItem",
21772
+ "name": "defaultAutocompleteI18n",
21635
21773
  "declaration": {
21636
- "name": "SuggestionItem",
21637
- "module": "../../src/tiptap/types.js"
21774
+ "name": "defaultAutocompleteI18n",
21775
+ "module": "src/components/prompt-line/autocomplete/src/autocomplete.ts"
21638
21776
  }
21639
21777
  },
21640
21778
  {
21641
21779
  "kind": "js",
21642
- "name": "SuggestionItemGroup",
21780
+ "name": "default",
21643
21781
  "declaration": {
21644
- "name": "SuggestionItemGroup",
21645
- "module": "../../src/tiptap/types.js"
21782
+ "name": "AutocompleteElement",
21783
+ "module": "src/components/prompt-line/autocomplete/src/autocomplete.ts"
21646
21784
  }
21647
21785
  },
21648
21786
  {
21649
21787
  "kind": "js",
21650
- "name": "defaultAutocompleteI18n",
21788
+ "name": "SuggestionItem",
21651
21789
  "declaration": {
21652
- "name": "defaultAutocompleteI18n",
21653
- "module": "src/components/prompt-line/autocomplete/src/autocomplete.ts"
21790
+ "name": "SuggestionItem",
21791
+ "module": "../../src/tiptap/types.js"
21654
21792
  }
21655
21793
  },
21656
21794
  {
21657
21795
  "kind": "js",
21658
- "name": "default",
21796
+ "name": "SuggestionItemGroup",
21659
21797
  "declaration": {
21660
- "name": "AutocompleteElement",
21661
- "module": "src/components/prompt-line/autocomplete/src/autocomplete.ts"
21798
+ "name": "SuggestionItemGroup",
21799
+ "module": "../../src/tiptap/types.js"
21662
21800
  }
21663
21801
  }
21664
21802
  ]
@@ -21714,6 +21852,13 @@
21714
21852
  "type": {
21715
21853
  "text": "AutocompleteConfig"
21716
21854
  }
21855
+ },
21856
+ {
21857
+ "name": "excludeTriggers",
21858
+ "default": "[]",
21859
+ "type": {
21860
+ "text": "ExcludedTrigger[]"
21861
+ }
21717
21862
  }
21718
21863
  ]
21719
21864
  }
@@ -21819,6 +21964,48 @@
21819
21964
  "kind": "javascript-module",
21820
21965
  "path": "src/components/prompt-line/src/tiptap/carbon-starter-trigger.ts",
21821
21966
  "declarations": [
21967
+ {
21968
+ "kind": "function",
21969
+ "name": "readStarterStorage",
21970
+ "return": {
21971
+ "type": {
21972
+ "text": "StarterTriggerStorage | undefined"
21973
+ }
21974
+ },
21975
+ "parameters": [
21976
+ {
21977
+ "name": "editor",
21978
+ "type": {
21979
+ "text": "Editor | null | undefined"
21980
+ }
21981
+ }
21982
+ ],
21983
+ "description": "Read the starter trigger's live storage, or `undefined` if not installed."
21984
+ },
21985
+ {
21986
+ "kind": "function",
21987
+ "name": "writeStarterStorage",
21988
+ "return": {
21989
+ "type": {
21990
+ "text": "void"
21991
+ }
21992
+ },
21993
+ "parameters": [
21994
+ {
21995
+ "name": "editor",
21996
+ "type": {
21997
+ "text": "Editor | null | undefined"
21998
+ }
21999
+ },
22000
+ {
22001
+ "name": "patch",
22002
+ "type": {
22003
+ "text": "Partial<StarterTriggerStorage>"
22004
+ }
22005
+ }
22006
+ ],
22007
+ "description": "Apply a starter-config patch to the live editor. Starter differences never\njustify recreating the editor — that would drop undo history — so they are\nwritten in place. The empty transaction re-runs this extension's\n`onTransaction` hook, so a toggle takes effect against the current selection\ninstead of waiting for the next keystroke. No-ops when nothing changed, so\ncallers do not have to guard."
22008
+ },
21822
22009
  {
21823
22010
  "kind": "function",
21824
22011
  "name": "carbonStarterTrigger",
@@ -21842,6 +22029,22 @@
21842
22029
  }
21843
22030
  ],
21844
22031
  "exports": [
22032
+ {
22033
+ "kind": "js",
22034
+ "name": "readStarterStorage",
22035
+ "declaration": {
22036
+ "name": "readStarterStorage",
22037
+ "module": "src/components/prompt-line/src/tiptap/carbon-starter-trigger.ts"
22038
+ }
22039
+ },
22040
+ {
22041
+ "kind": "js",
22042
+ "name": "writeStarterStorage",
22043
+ "declaration": {
22044
+ "name": "writeStarterStorage",
22045
+ "module": "src/components/prompt-line/src/tiptap/carbon-starter-trigger.ts"
22046
+ }
22047
+ },
21845
22048
  {
21846
22049
  "kind": "js",
21847
22050
  "name": "carbonStarterTrigger",
@@ -21919,17 +22122,106 @@
21919
22122
  },
21920
22123
  {
21921
22124
  "kind": "javascript-module",
21922
- "path": "src/components/prompt-line/src/tiptap/index.ts",
22125
+ "path": "src/components/prompt-line/src/tiptap/extension-equivalence.ts",
21923
22126
  "declarations": [
21924
22127
  {
21925
- "kind": "variable",
21926
- "name": "HISTORY_DEFAULTS",
21927
- "type": {
21928
- "text": "{ depth: 100, newGroupDelay: 500 }"
22128
+ "kind": "function",
22129
+ "name": "tagExtensionSource",
22130
+ "return": {
22131
+ "type": {
22132
+ "text": "T"
22133
+ }
21929
22134
  },
21930
- "default": "{ depth: 100, newGroupDelay: 500 }"
22135
+ "parameters": [
22136
+ {
22137
+ "name": "extension",
22138
+ "type": {
22139
+ "text": "T"
22140
+ }
22141
+ },
22142
+ {
22143
+ "name": "descriptor",
22144
+ "type": {
22145
+ "text": "ExtensionSourceDescriptor"
22146
+ }
22147
+ }
22148
+ ],
22149
+ "description": "Record the source config on a built extension. Returns the same instance so\nfactories can tag inline."
22150
+ },
22151
+ {
22152
+ "kind": "function",
22153
+ "name": "getExtensionSource",
22154
+ "return": {
22155
+ "type": {
22156
+ "text": "ExtensionSourceDescriptor | undefined"
22157
+ }
22158
+ },
22159
+ "parameters": [
22160
+ {
22161
+ "name": "extension",
22162
+ "type": {
22163
+ "text": "unknown"
22164
+ }
22165
+ }
22166
+ ],
22167
+ "description": "Read back a descriptor, or `undefined` for host-supplied extensions."
22168
+ },
22169
+ {
22170
+ "kind": "function",
22171
+ "name": "areExtensionSetsEquivalent",
22172
+ "return": {
22173
+ "type": {
22174
+ "text": "boolean"
22175
+ }
22176
+ },
22177
+ "parameters": [
22178
+ {
22179
+ "name": "previous",
22180
+ "type": {
22181
+ "text": "readonly Extension[]"
22182
+ }
22183
+ },
22184
+ {
22185
+ "name": "next",
22186
+ "type": {
22187
+ "text": "readonly Extension[]"
22188
+ }
22189
+ }
22190
+ ],
22191
+ "description": "Whether two extension lists install the same editor behavior.\n\nCompared positionally — extension order is ProseMirror plugin order, so a\nreordered list is a genuinely different editor and never reorder-matched.\n\nPer pair:\n- Same instance wins outright. This is the only rule available for\n host-supplied extensions, whose documented contract already asks hosts to\n memoize them.\n- Two carbon extensions of the same kind compare their source configs by\n value, with functions compared by reference (lodash `isEqual` semantics) —\n a host that rebuilds its callbacks each render genuinely gets a new editor,\n same as before.\n- Starter triggers are always equivalent: every difference they can carry\n (`items`, `isOn`) is applied to the live editor's storage instead. See\n `RichController.setExtensions`. `buildCarbonExtensions` installs the\n extension for an empty list too, so emptying `items` stays a storage write\n instead of a length change that rejects the pair before this rule is\n reached."
21931
22192
  }
21932
22193
  ],
22194
+ "exports": [
22195
+ {
22196
+ "kind": "js",
22197
+ "name": "tagExtensionSource",
22198
+ "declaration": {
22199
+ "name": "tagExtensionSource",
22200
+ "module": "src/components/prompt-line/src/tiptap/extension-equivalence.ts"
22201
+ }
22202
+ },
22203
+ {
22204
+ "kind": "js",
22205
+ "name": "getExtensionSource",
22206
+ "declaration": {
22207
+ "name": "getExtensionSource",
22208
+ "module": "src/components/prompt-line/src/tiptap/extension-equivalence.ts"
22209
+ }
22210
+ },
22211
+ {
22212
+ "kind": "js",
22213
+ "name": "areExtensionSetsEquivalent",
22214
+ "declaration": {
22215
+ "name": "areExtensionSetsEquivalent",
22216
+ "module": "src/components/prompt-line/src/tiptap/extension-equivalence.ts"
22217
+ }
22218
+ }
22219
+ ]
22220
+ },
22221
+ {
22222
+ "kind": "javascript-module",
22223
+ "path": "src/components/prompt-line/src/tiptap/index.ts",
22224
+ "declarations": [],
21933
22225
  "exports": [
21934
22226
  {
21935
22227
  "kind": "js",
@@ -22264,7 +22556,7 @@
22264
22556
  "name": "HISTORY_DEFAULTS",
22265
22557
  "declaration": {
22266
22558
  "name": "HISTORY_DEFAULTS",
22267
- "module": "src/components/prompt-line/src/tiptap/index.ts"
22559
+ "module": "../prompt-line-constants.js"
22268
22560
  }
22269
22561
  },
22270
22562
  {
@@ -22406,6 +22698,30 @@
22406
22698
  }
22407
22699
  ],
22408
22700
  "description": "Build a paragraph-per-line JSONContent doc from a plain-text string — the\ninverse of getRawText for plain text (`getRawText(textToDoc(s)) === s`).\nUsed to seed the rich editor losslessly from the textarea's value when the\nprompt-line upgrades from textarea to Tiptap mode."
22701
+ },
22702
+ {
22703
+ "kind": "function",
22704
+ "name": "textOffsetToDocPos",
22705
+ "return": {
22706
+ "type": {
22707
+ "text": "number"
22708
+ }
22709
+ },
22710
+ "parameters": [
22711
+ {
22712
+ "name": "text",
22713
+ "type": {
22714
+ "text": "string"
22715
+ }
22716
+ },
22717
+ {
22718
+ "name": "offset",
22719
+ "type": {
22720
+ "text": "number"
22721
+ }
22722
+ }
22723
+ ],
22724
+ "description": "Map a plain-text offset into a ProseMirror position inside the doc\ntextToDoc builds from the same text. Lives here because it encodes\nthat function's shape: one paragraph per line, so a position costs +1 for the\ndoc/first-paragraph start plus +1 for every newline before it, each of which\nopens another paragraph. Change `textToDoc` and this has to change with it."
22409
22725
  }
22410
22726
  ],
22411
22727
  "exports": [
@@ -22456,6 +22772,14 @@
22456
22772
  "name": "textToDoc",
22457
22773
  "module": "src/components/prompt-line/src/tiptap/json-utils.ts"
22458
22774
  }
22775
+ },
22776
+ {
22777
+ "kind": "js",
22778
+ "name": "textOffsetToDocPos",
22779
+ "declaration": {
22780
+ "name": "textOffsetToDocPos",
22781
+ "module": "src/components/prompt-line/src/tiptap/json-utils.ts"
22782
+ }
22459
22783
  }
22460
22784
  ]
22461
22785
  },
@@ -8,7 +8,6 @@
8
8
  */
9
9
  import { LitElement } from 'lit';
10
10
  import type { SuggestionItem, SuggestionItemGroup } from '../../src/tiptap/types.js';
11
- export type { SuggestionItem, SuggestionItemGroup, } from '../../src/tiptap/types.js';
12
11
  /**
13
12
  * Configuration for the autocomplete header
14
13
  */
@@ -142,6 +141,13 @@ declare class AutocompleteElement extends LitElement {
142
141
  * Get the item at a specific index (accounting for both flat items and groups)
143
142
  */
144
143
  private _getItemAtIndex;
144
+ /**
145
+ * Move focus to the next enabled item in the given direction (+1 / -1),
146
+ * skipping over any disabled items. Mirrors the Carbon Dropdown `_navigate`
147
+ * pattern. Returns the resolved index, or the current index if no enabled
148
+ * item exists in that direction.
149
+ */
150
+ private _navigateTo;
145
151
  private _handleKeydown;
146
152
  /**
147
153
  * Schedule a move announcement, replacing any pending one so rapid arrow
@@ -173,3 +179,4 @@ declare global {
173
179
  }
174
180
  }
175
181
  export default AutocompleteElement;
182
+ export type { SuggestionItem, SuggestionItemGroup, } from '../../src/tiptap/types.js';