index.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. // Core TUI interfaces and classes
  2. // Autocomplete support
  3. export {
  4. type AutocompleteItem,
  5. type AutocompleteProvider,
  6. type AutocompleteSuggestions,
  7. CombinedAutocompleteProvider,
  8. type SlashCommand,
  9. } from "./autocomplete.ts";
  10. // Components
  11. export { Box } from "./components/box.ts";
  12. export { CancellableLoader } from "./components/cancellable-loader.ts";
  13. export { Editor, type EditorOptions, type EditorTheme } from "./components/editor.ts";
  14. export { Image, type ImageOptions, type ImageTheme } from "./components/image.ts";
  15. export { Input } from "./components/input.ts";
  16. export { Loader, type LoaderIndicatorOptions } from "./components/loader.ts";
  17. export { type DefaultTextStyle, Markdown, type MarkdownOptions, type MarkdownTheme } from "./components/markdown.ts";
  18. export {
  19. type SelectItem,
  20. SelectList,
  21. type SelectListLayoutOptions,
  22. type SelectListTheme,
  23. type SelectListTruncatePrimaryContext,
  24. } from "./components/select-list.ts";
  25. export { type SettingItem, SettingsList, type SettingsListTheme } from "./components/settings-list.ts";
  26. export { Spacer } from "./components/spacer.ts";
  27. export { Text } from "./components/text.ts";
  28. export { TruncatedText } from "./components/truncated-text.ts";
  29. // Editor component interface (for custom editors)
  30. export type { EditorComponent } from "./editor-component.ts";
  31. // Fuzzy matching
  32. export { type FuzzyMatch, fuzzyFilter, fuzzyMatch } from "./fuzzy.ts";
  33. // Keybindings
  34. export {
  35. getKeybindings,
  36. type Keybinding,
  37. type KeybindingConflict,
  38. type KeybindingDefinition,
  39. type KeybindingDefinitions,
  40. type Keybindings,
  41. type KeybindingsConfig,
  42. KeybindingsManager,
  43. setKeybindings,
  44. TUI_KEYBINDINGS,
  45. } from "./keybindings.ts";
  46. // Keyboard input handling
  47. export {
  48. decodeKittyPrintable,
  49. isKeyRelease,
  50. isKeyRepeat,
  51. isKittyProtocolActive,
  52. Key,
  53. type KeyEventType,
  54. type KeyId,
  55. matchesKey,
  56. parseKey,
  57. setKittyProtocolActive,
  58. } from "./keys.ts";
  59. // Input buffering for batch splitting
  60. export { StdinBuffer, type StdinBufferEventMap, type StdinBufferOptions } from "./stdin-buffer.ts";
  61. // Terminal interface and implementations
  62. export { ProcessTerminal, type Terminal } from "./terminal.ts";
  63. // Terminal image support
  64. export {
  65. allocateImageId,
  66. type CellDimensions,
  67. calculateImageRows,
  68. deleteAllKittyImages,
  69. deleteKittyImage,
  70. detectCapabilities,
  71. encodeITerm2,
  72. encodeKitty,
  73. getCapabilities,
  74. getCellDimensions,
  75. getGifDimensions,
  76. getImageDimensions,
  77. getJpegDimensions,
  78. getPngDimensions,
  79. getWebpDimensions,
  80. hyperlink,
  81. type ImageDimensions,
  82. type ImageProtocol,
  83. type ImageRenderOptions,
  84. imageFallback,
  85. renderImage,
  86. resetCapabilitiesCache,
  87. setCapabilities,
  88. setCellDimensions,
  89. type TerminalCapabilities,
  90. } from "./terminal-image.ts";
  91. export {
  92. type Component,
  93. Container,
  94. CURSOR_MARKER,
  95. type Focusable,
  96. isFocusable,
  97. type OverlayAnchor,
  98. type OverlayHandle,
  99. type OverlayMargin,
  100. type OverlayOptions,
  101. type OverlayUnfocusOptions,
  102. type SizeValue,
  103. TUI,
  104. } from "./tui.ts";
  105. // Utilities
  106. export { truncateToWidth, visibleWidth, wrapTextWithAnsi } from "./utils.ts";