blecsd 0.2.0 → 0.3.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 (107) hide show
  1. package/LICENSE +4 -2
  2. package/README.md +168 -65
  3. package/dist/3d/index.d.ts +2 -2
  4. package/dist/3d/index.js +1 -1
  5. package/dist/audio/index.d.ts +2 -2
  6. package/dist/{border-D_Jb4ZJV.d.ts → border-Jb7TrMob.d.ts} +20 -10
  7. package/dist/chunk-2IEMMRUO.js +1 -0
  8. package/dist/chunk-3AV52GY5.js +1 -0
  9. package/dist/chunk-3LHLSY3Y.js +1 -0
  10. package/dist/chunk-3O4TQHGK.js +4 -0
  11. package/dist/chunk-3UJWZ5ZN.js +1 -0
  12. package/dist/chunk-5N3O25O7.js +1 -0
  13. package/dist/chunk-6M2J5QUA.js +1 -0
  14. package/dist/chunk-7IQEUVGF.js +1 -0
  15. package/dist/chunk-A6M6TFBL.js +1 -0
  16. package/dist/chunk-CUEUJAHK.js +3 -0
  17. package/dist/chunk-D42Q2KKR.js +1 -0
  18. package/dist/chunk-DYEXOFUU.js +2 -0
  19. package/dist/chunk-DYU72XLL.js +1 -0
  20. package/dist/chunk-E4CJRSND.js +1 -0
  21. package/dist/chunk-FCMTWFSE.js +1 -0
  22. package/dist/chunk-FL56THSI.js +25 -0
  23. package/dist/{chunk-2UBBZFE4.js → chunk-G437VE43.js} +1 -1
  24. package/dist/chunk-GGXNWT36.js +8 -0
  25. package/dist/chunk-HLFORKXS.js +1 -0
  26. package/dist/chunk-J7MBKEBY.js +1 -0
  27. package/dist/{chunk-TYMY2TBR.js → chunk-JHCKPCUH.js} +3 -3
  28. package/dist/chunk-LDAFEXN5.js +1 -0
  29. package/dist/chunk-MKMFUXLB.js +33 -0
  30. package/dist/chunk-MQWPHPUM.js +1 -0
  31. package/dist/chunk-MTI376CU.js +5 -0
  32. package/dist/chunk-MTV2RJZD.js +1 -0
  33. package/dist/chunk-NPDPBAW6.js +4 -0
  34. package/dist/chunk-OR3BZY7C.js +1 -0
  35. package/dist/{chunk-VNZ6CWJA.js → chunk-R7AICVRN.js} +2 -2
  36. package/dist/{chunk-3B7MIVW6.js → chunk-RZ7FGVI6.js} +1 -1
  37. package/dist/chunk-UMGTXSQB.js +11 -0
  38. package/dist/chunk-X3Q3T2SS.js +4 -0
  39. package/dist/{chunk-JKVHO4LH.js → chunk-XZJRWFOS.js} +1 -1
  40. package/dist/chunk-ZAHG7Y3X.js +1 -0
  41. package/dist/cli/init.d.ts +1 -1
  42. package/dist/{componentStorage-DTkj1Qyj.d.ts → componentStorage-CJTh-TPO.d.ts} +1 -1
  43. package/dist/components/index.d.ts +1942 -515
  44. package/dist/components/index.js +1 -1
  45. package/dist/core/index.d.ts +634 -69
  46. package/dist/core/index.js +1 -1
  47. package/dist/debug/index.d.ts +491 -98
  48. package/dist/debug/index.js +1 -1
  49. package/dist/dirtyTracking-C4v8MmM9.d.ts +235 -0
  50. package/dist/errors/index.d.ts +12 -12
  51. package/dist/errors/index.js +1 -1
  52. package/dist/{events-BbbxkgvX.d.ts → events-9ForpTfM.d.ts} +75 -2
  53. package/dist/game/index.d.ts +7 -7
  54. package/dist/game/index.js +1 -1
  55. package/dist/{gameLoop-BIPW7-OY.d.ts → gameLoop-C-Ez_i54.d.ts} +2 -2
  56. package/dist/{index-zSGJ2eUk.d.ts → index-DBS5Uefn.d.ts} +2 -2
  57. package/dist/index.d.ts +282 -21
  58. package/dist/index.js +3 -1
  59. package/dist/input/index.d.ts +1 -1
  60. package/dist/input/index.js +1 -1
  61. package/dist/{inputActions-CefRUBuT.d.ts → inputActions-CRsUtTHM.d.ts} +10 -721
  62. package/dist/{packedStore-480t2X74.d.ts → packedStore-BgvnEdE7.d.ts} +1 -1
  63. package/dist/{renderable-jTMOA-GK.d.ts → renderable-CwqGwrEV.d.ts} +9 -9
  64. package/dist/{scheduler-DcfoFuum.d.ts → scheduler-CMcYew9Z.d.ts} +65 -3
  65. package/dist/systems/index.d.ts +125 -36
  66. package/dist/systems/index.js +1 -1
  67. package/dist/terminal/index.d.ts +2233 -2299
  68. package/dist/terminal/index.js +1 -1
  69. package/dist/{tilemap-j0twN9-y.d.ts → tilemap-BirMJdbu.d.ts} +2 -2
  70. package/dist/{types-BcsvoKzf.d.ts → types-CPB4CpbH.d.ts} +2 -2
  71. package/dist/utils/index.d.ts +26 -25
  72. package/dist/utils/index.js +1 -1
  73. package/dist/{virtualScrollback-DvZTRU8a.d.ts → virtualScrollback-D9uLFe8l.d.ts} +4 -4
  74. package/dist/{virtualViewport-Dx2iJliO.d.ts → virtualViewport-Bpv6jlKt.d.ts} +283 -761
  75. package/dist/widgets/bigText.d.ts +1 -1
  76. package/dist/widgets/bigText.js +1 -1
  77. package/dist/widgets/index.d.ts +10519 -5463
  78. package/dist/widgets/index.js +1 -1
  79. package/package.json +102 -6
  80. package/dist/chunk-35I22JJO.js +0 -1
  81. package/dist/chunk-3APDF6RW.js +0 -1
  82. package/dist/chunk-3EGGGI5J.js +0 -3
  83. package/dist/chunk-4GISPPOH.js +0 -33
  84. package/dist/chunk-4X4N4HNQ.js +0 -2
  85. package/dist/chunk-6N6BRCEM.js +0 -4
  86. package/dist/chunk-AXZQAH4X.js +0 -1
  87. package/dist/chunk-BCADUCOZ.js +0 -1
  88. package/dist/chunk-EJ5WVDDZ.js +0 -6
  89. package/dist/chunk-FMFEOAML.js +0 -1
  90. package/dist/chunk-FYEBZAWN.js +0 -1
  91. package/dist/chunk-GYHI26UE.js +0 -1
  92. package/dist/chunk-H2YAOJDW.js +0 -1
  93. package/dist/chunk-JUWDTH25.js +0 -1
  94. package/dist/chunk-K2B2OXQ5.js +0 -5
  95. package/dist/chunk-KD55INV7.js +0 -1
  96. package/dist/chunk-KFAK4A3G.js +0 -1
  97. package/dist/chunk-LB3JA744.js +0 -19
  98. package/dist/chunk-LCN2ZITE.js +0 -1
  99. package/dist/chunk-P6CJO3BC.js +0 -1
  100. package/dist/chunk-PSXXMBVJ.js +0 -1
  101. package/dist/chunk-VCW7EOZ4.js +0 -12
  102. package/dist/chunk-W5OU7Z6J.js +0 -1
  103. package/dist/chunk-WHF27JF3.js +0 -4
  104. package/dist/chunk-WNG4A3K7.js +0 -4
  105. package/dist/chunk-WY3KY2TR.js +0 -1
  106. package/dist/chunk-XZA63ZPO.js +0 -1
  107. package/dist/{keyParser-Bwm8-l7v.d.ts → keyParser-BnHbg2iD.d.ts} +1 -1
@@ -1,17 +1,17 @@
1
- import { W as World, E as Entity } from '../types-BcsvoKzf.js';
2
- export { B as BORDER_ASCII, a as BORDER_BOLD, b as BORDER_DOUBLE, c as BORDER_ROUNDED, d as BORDER_SINGLE, e as Border, f as BorderCharset, g as BorderData, h as BorderOptions, i as BorderType, D as DEFAULT_BORDER_BG, j as DEFAULT_BORDER_FG, k as disableAllBorders, l as enableAllBorders, m as getBorder, n as getBorderChar, o as hasBorder, p as hasBorderVisible, s as setBorder, q as setBorderChars } from '../border-D_Jb4ZJV.js';
3
- import { cG as StateMachineConfig, cH as StateMachine } from '../virtualViewport-Dx2iJliO.js';
4
- export { C as CellAlign, D as DEFAULT_CELL_BG, a as DEFAULT_CELL_FG, b as DEFAULT_DISABLED_FG, c as DEFAULT_HEADER_BG, d as DEFAULT_HEADER_FG, e as DEFAULT_ITEM_BG, f as DEFAULT_ITEM_FG, g as DEFAULT_SCROLLBACK_LINES, h as DEFAULT_SELECTED_BG, i as DEFAULT_SELECTED_FG, j as DEFAULT_SELECTED_PREFIX, k as DEFAULT_TABLE_BORDER_BG, l as DEFAULT_TABLE_BORDER_FG, m as DEFAULT_TERMINAL_HEIGHT, n as DEFAULT_TERMINAL_WIDTH, o as DEFAULT_UNSELECTED_PREFIX, L as LIST_STATE_MACHINE_CONFIG, p as ListAction, q as ListDisplay, r as ListDisplayOptions, s as ListEvent, t as ListItem, u as ListLazyLoadCallback, v as ListScrollCallback, w as ListScrollInfo, x as ListSelectCallback, y as ListState, z as ListStore, S as ScrollInfoSchema, A as ScrollPercentage, B as ScrollPosition, E as Scrollable, F as ScrollableData, G as ScrollableOptions, H as ScrollbarVisibility, T as Table, I as TableCell, J as TableColumn, K as TableData, M as TableDisplay, N as TableDisplayOptions, O as TableRow, P as TableStore, Q as TerminalBuffer, R as TerminalBufferConfig, U as TerminalBufferConfigSchema, V as TerminalCursorShape, W as TerminalState, X as VirtualViewport, Y as VirtualViewportData, Z as VirtualViewportOptions, _ as VirtualViewportOptionsSchema, $ as VirtualViewportScrollInfo, a0 as VisibleRange, a1 as VisibleRangeSchema, a2 as activateSelected, a3 as addItem, a4 as appendItems, a5 as appendRow, a6 as appendToSearchQuery, a7 as attachListBehavior, a8 as attachTableBehavior, a9 as backspaceSearchQuery, aa as blurList, ab as calculateColumnWidths, ac as canScroll, ad as checkNeedsLoad, ae as clearData, af as clearItems, ag as clearLazyLoadCallback, ah as clearListCallbacks, ai as clearListDisplay, aj as clearListSelection, ak as clearSearchQuery, al as clearTableDisplay, am as clearTerminal, an as clearViewportDirty, ao as detachTableBehavior, ap as disableList, aq as enableList, ar as endListSearch, as as ensureCursorVisible, at as ensureVisible, au as findAndSelectByText, av as findNextMatch, aw as focusList, cI as getCell, ax as getCellPadding, ay as getCellValue, az as getColCount, aA as getColumn, aB as getColumns, aC as getCursorLine, aD as getData, aE as getDataAsStrings, aF as getDataRows, aG as getFirstVisible, aH as getHeaderRowCount, aI as getHeaderRows, aJ as getItem, aK as getItemCount, aL as getItems, aM as getLazyLoadCallback, aN as getListDisplay, aO as getListSearchQuery, aP as getListSelectedIndex, aQ as getListState, aR as getLoadingPlaceholder, aS as getRow, aT as getRowCount, aU as getScroll, aV as getScrollInfo, aW as getScrollPercentage, aX as getScrollable, aY as getSelectedItem, aZ as getSelectedLine, a_ as getTableDisplay, a$ as getTerminalBuffer, b0 as getTerminalCells, b1 as getTerminalState, b2 as getTotalCount, b3 as getVirtualScrollInfo, b4 as getVirtualViewport, b5 as getVisibleCount, b6 as getVisibleItems, b7 as getVisibleRange, b8 as handleListKeyPress, b9 as hasCellBorders, ba as hasScrollable, bb as hasTerminalBuffer, bc as hasVirtualViewport, bd as insertRow, be as invalidateViewport, bf as isAtBottom, bg as isAtTop, bh as isLineInRenderRange, bi as isLineVisible, bj as isList, bk as isListDisabled, bl as isListFocused, bm as isListInState, bn as isListInteractive, bo as isListKeysEnabled, bp as isListLoading, bq as isListMouseEnabled, br as isListSearchEnabled, bs as isListSearching, bt as isTable, bu as isViewportDirty, bv as listStore, bw as loadItems, bx as moveViewportCursor, by as onListActivate, bz as onListScroll, bA as onListSearchChange, bB as onListSelect, bC as removeItem, bD as removeRow, bE as removeTerminalBuffer, bF as renderListItems, bG as renderTableLines, bH as renderTerminalToAnsi, bI as resetListStore, bJ as resetTableStore, bK as resetTerminal, bL as resetTerminalBufferStore, bM as resizeTerminalBuffer, bN as scrollBy, bO as scrollByLines, bP as scrollByPages, bQ as scrollPage, bR as scrollTerminalDown, bS as scrollTerminalToBottom, bT as scrollTerminalToTop, bU as scrollTerminalUp, bV as scrollTo, bW as scrollToBottom, bX as scrollToLine, bY as scrollToTop, bZ as scrollViewportToBottom, b_ as scrollViewportToTop, b$ as selectByValue, c0 as selectFirst, c1 as selectLast, c2 as selectNext, c3 as selectPrev, c4 as sendListEvent, cJ as setCell, c5 as setCellBorders, c6 as setCellPadding, c7 as setCursorLine, c8 as setCursorPosition, cK as setCursorVisible, c9 as setData, ca as setFirstVisible, cb as setHeaderRowCount, cc as setHeaders, cd as setItems, ce as setLazyLoadCallback, cf as setListDisplay, cg as setListInteractive, ch as setListKeys, ci as setListLoading, cj as setListMouse, ck as setListSearchEnabled, cl as setListSearchQuery, cm as setListSelectedIndex, cn as setLoadingPlaceholder, co as setOverscan, cp as setScroll, cq as setScrollSize, cr as setScrollable, cs as setScrollbarVisibility, ct as setSelectedLine, cu as setTableDisplay, cv as setTerminalBuffer, cw as setTotalCount, cx as setTotalLineCount, cy as setViewportStart, cz as setVirtualViewport, cA as setVisibleCount, cB as setVisibleLineCount, cC as startListSearch, cD as tableStore, cE as updateItem, cL as writeChar, cF as writeToTerminal } from '../virtualViewport-Dx2iJliO.js';
5
- export { A as AABB, C as Collider, a as ColliderData, b as ColliderOptions, c as ColliderType, d as CollisionPair, D as DEFAULT_LAYER, e as DEFAULT_MASK, E as EMPTY_TILE, f as EmitterAppearance, g as EmitterData, h as EmitterOptions, P as Particle, i as ParticleData, j as ParticleEmitter, k as ParticleOptions, R as RenderedTileCell, T as TileDefinition, l as TileMap, m as TileMapComponentData, n as TileMapData, o as TileMapLayer, p as TileMapOptions, q as TilesetData, r as TilesetOptions, s as TrackedParticle, t as activateEmitter, u as addLayer, v as canLayersCollide, w as collisionPairKey, x as createCollisionPair, y as createTileData, z as fillTileRect, B as fillTiles, F as getCollider, G as getColliderAABB, H as getEmitter, I as getEmitterAppearance, J as getEmitterParticles, K as getLayerCount, L as getParticle, M as getParticleColor, N as getParticleProgress, O as getParticleTrackingStore, Q as getTile, S as getTileData, U as getTileMap, V as getTileMapDataId, W as getTileset, X as getTilesetByName, Y as hasCollider, Z as hasEmitter, _ as hasParticle, $ as hasTileMap, a0 as interpolateColor, a1 as isEmitterActive, a2 as isLayerVisible, a3 as isParticleDead, a4 as isTrigger, a5 as pauseEmitter, a6 as registerTileset, a7 as removeCollider, a8 as removeEmitter, a9 as removeParticle, aa as removeTileData, ab as removeTileMap, ac as renderTileMapArea, ad as resetParticleStore, ae as resetTileMapStore, af as resetTilesetStore, ag as setCollider, ah as setCollisionLayer, ai as setCollisionMask, aj as setEmitter, ak as setEmitterAppearance, al as setEmitterGravity, am as setEmitterRate, an as setEmitterSpeed, ao as setLayerVisible, ap as setParticle, aq as setTile, ar as setTileMap, as as setTrigger, at as testAABBOverlap, au as testCircleAABBOverlap, av as testCircleOverlap, aw as testCollision, ax as tileMapStore, ay as tilesetStore, az as trackParticle, aA as unregisterTileset, aB as untrackParticle } from '../tilemap-j0twN9-y.js';
6
- export { D as DEFAULT_BG, a as DEFAULT_FG, R as Renderable, b as RenderableData, S as StyleData, c as StyleOptions, g as getRenderable, d as getStyle, h as hasRenderable, e as hide, i as isDetached, f as isDirty, j as isEffectivelyVisible, k as isVisible, m as markClean, l as markDirty, s as setStyle, n as setVisible, o as show, t as toggle } from '../renderable-jTMOA-GK.js';
1
+ import { W as World, E as Entity, U as Unsubscribe } from '../types-CPB4CpbH.js';
2
+ export { B as BORDER_ASCII, a as BORDER_BOLD, b as BORDER_DASHED, c as BORDER_DASHED_HEAVY, d as BORDER_DOUBLE, e as BORDER_ROUNDED, f as BORDER_SINGLE, g as Border, h as BorderCharset, i as BorderData, j as BorderOptions, k as BorderType, D as DEFAULT_BORDER_BG, l as DEFAULT_BORDER_FG, m as disableAllBorders, n as enableAllBorders, o as getBorder, p as getBorderChar, q as hasBorder, r as hasBorderVisible, s as setBorder, t as setBorderChars } from '../border-Jb7TrMob.js';
3
+ export { A as AABB, C as Collider, a as ColliderData, b as ColliderOptions, c as ColliderType, d as CollisionPair, D as DEFAULT_LAYER, e as DEFAULT_MASK, E as EMPTY_TILE, f as EmitterAppearance, g as EmitterData, h as EmitterOptions, P as Particle, i as ParticleData, j as ParticleEmitter, k as ParticleOptions, R as RenderedTileCell, T as TileDefinition, l as TileMap, m as TileMapComponentData, n as TileMapData, o as TileMapLayer, p as TileMapOptions, q as TilesetData, r as TilesetOptions, s as TrackedParticle, t as activateEmitter, u as addLayer, v as canLayersCollide, w as collisionPairKey, x as createCollisionPair, y as createTileData, z as fillTileRect, B as fillTiles, F as getCollider, G as getColliderAABB, H as getEmitter, I as getEmitterAppearance, J as getEmitterParticles, K as getLayerCount, L as getParticle, M as getParticleColor, N as getParticleProgress, O as getParticleTrackingStore, Q as getTile, S as getTileData, U as getTileMap, V as getTileMapDataId, W as getTileset, X as getTilesetByName, Y as hasCollider, Z as hasEmitter, _ as hasParticle, $ as hasTileMap, a0 as interpolateColor, a1 as isEmitterActive, a2 as isLayerVisible, a3 as isParticleDead, a4 as isTrigger, a5 as pauseEmitter, a6 as registerTileset, a7 as removeCollider, a8 as removeEmitter, a9 as removeParticle, aa as removeTileData, ab as removeTileMap, ac as renderTileMapArea, ad as resetParticleStore, ae as resetTileMapStore, af as resetTilesetStore, ag as setCollider, ah as setCollisionLayer, ai as setCollisionMask, aj as setEmitter, ak as setEmitterAppearance, al as setEmitterGravity, am as setEmitterRate, an as setEmitterSpeed, ao as setLayerVisible, ap as setParticle, aq as setTile, ar as setTileMap, as as setTrigger, at as testAABBOverlap, au as testCircleAABBOverlap, av as testCircleOverlap, aw as testCollision, ax as tileMapStore, ay as tilesetStore, az as trackParticle, aA as unregisterTileset, aB as untrackParticle } from '../tilemap-BirMJdbu.js';
4
+ import { t as ListSelectCallback, p as ListItem, u as ListState, o as ListEvent, m as ListDisplay, n as ListDisplayOptions, L as ListAction, v as ListStore, s as ListScrollInfo } from '../virtualViewport-Bpv6jlKt.js';
5
+ export { A as AUTO_DIMENSION, C as CellAlign, D as DEFAULT_CELL_BG, a as DEFAULT_CELL_FG, b as DEFAULT_HEADER_BG, c as DEFAULT_HEADER_FG, d as DEFAULT_SCROLLBACK_LINES, e as DEFAULT_TABLE_BORDER_BG, f as DEFAULT_TABLE_BORDER_FG, g as DEFAULT_TERMINAL_HEIGHT, h as DEFAULT_TERMINAL_WIDTH, i as DimensionConstraints, j as DimensionValue, k as Dimensions, l as DimensionsData, q as ListLazyLoadCallback, r as ListScrollCallback, S as ScrollInfoSchema, w as ScrollPercentage, x as ScrollPosition, y as Scrollable, z as ScrollableData, B as ScrollableOptions, E as ScrollbarVisibility, T as Table, F as TableCell, G as TableColumn, H as TableData, I as TableDisplay, J as TableDisplayOptions, K as TableRow, M as TableStore, N as TerminalBuffer, O as TerminalBufferConfig, P as TerminalBufferConfigSchema, Q as TerminalCursorShape, R as TerminalState, V as VirtualViewport, U as VirtualViewportData, W as VirtualViewportOptions, X as VirtualViewportOptionsSchema, Y as VirtualViewportScrollInfo, Z as VisibleRange, _ as VisibleRangeSchema, $ as appendRow, a0 as attachTableBehavior, a1 as calculateColumnWidths, a2 as canScroll, a3 as clearData, a4 as clearTableDisplay, a5 as clearTerminal, a6 as clearViewportDirty, a7 as decodePercentage, a8 as detachTableBehavior, a9 as encodePercentage, aa as ensureCursorVisible, bA as getCell, ab as getCellPadding, ac as getCellValue, ad as getColCount, ae as getColumn, af as getColumns, ag as getCursorLine, ah as getData, ai as getDataAsStrings, aj as getDataRows, ak as getDimensions, al as getHeaderRowCount, am as getHeaderRows, an as getResolvedHeight, ao as getResolvedWidth, ap as getRow, aq as getRowCount, ar as getScroll, as as getScrollPercentage, at as getScrollable, au as getSelectedLine, av as getTableDisplay, aw as getTerminalBuffer, ax as getTerminalCells, ay as getTerminalState, az as getVirtualScrollInfo, aA as getVirtualViewport, aB as getVisibleRange, aC as hasCellBorders, aD as hasDimensions, aE as hasScrollable, aF as hasTerminalBuffer, aG as hasVirtualViewport, aH as insertRow, aI as invalidateViewport, aJ as isAtBottom, aK as isAtTop, aL as isLineInRenderRange, aM as isLineVisible, aN as isPercentage, aO as isTable, aP as isViewportDirty, aQ as moveViewportCursor, aR as removeRow, aS as removeTerminalBuffer, aT as renderTableLines, aU as renderTerminalToAnsi, aV as resetTableStore, aW as resetTerminal, aX as resetTerminalBufferStore, aY as resizeTerminalBuffer, aZ as scrollBy, a_ as scrollByLines, a$ as scrollByPages, b0 as scrollTerminalDown, b1 as scrollTerminalToBottom, b2 as scrollTerminalToTop, b3 as scrollTerminalUp, b4 as scrollTo, b5 as scrollToBottom, b6 as scrollToLine, b7 as scrollToTop, b8 as scrollViewportToBottom, b9 as scrollViewportToTop, bB as setCell, ba as setCellBorders, bb as setCellPadding, bc as setConstraints, bd as setCursorLine, be as setCursorPosition, bC as setCursorVisible, bf as setData, bg as setDimensions, bh as setHeaderRowCount, bi as setHeaders, bj as setOverscan, bk as setScroll, bl as setScrollSize, bm as setScrollable, bn as setScrollbarVisibility, bo as setSelectedLine, bp as setShrink, bq as setTableDisplay, br as setTerminalBuffer, bs as setTotalLineCount, bt as setViewportStart, bu as setVirtualViewport, bv as setVisibleLineCount, bw as shouldShrink, bx as tableStore, by as writeChar, bz as writeToTerminal } from '../virtualViewport-Bpv6jlKt.js';
6
+ export { D as DEFAULT_BG, a as DEFAULT_FG, R as Renderable, b as RenderableData, S as StyleData, c as StyleOptions, g as getRenderable, d as getStyle, h as hasRenderable, e as hide, i as isDetached, f as isDirty, j as isEffectivelyVisible, k as isVisible, m as markClean, l as markDirty, s as setStyle, n as setVisible, o as show, t as toggle } from '../renderable-CwqGwrEV.js';
7
7
  import { z } from 'zod';
8
8
  import { V as VirtualizedLineStore } from '../virtualizedLineStore-DwPEvPkk.js';
9
9
  export { c as colorToHex, h as hexToColor, p as packColor, u as unpackColor } from '../color-B78w3zH-.js';
10
10
  import 'bitecs';
11
+ import '../packedStore-BgvnEdE7.js';
11
12
  import '../parser-iMHmQuUh.js';
12
13
  import '../cell-DwIu2ryP.js';
13
- import '../virtualScrollback-DvZTRU8a.js';
14
- import '../packedStore-480t2X74.js';
14
+ import '../virtualScrollback-D9uLFe8l.js';
15
15
 
16
16
  /**
17
17
  * Animation component for sprite animation control.
@@ -804,6 +804,73 @@ declare function updateBehaviorTimer(world: World, eid: Entity, delta: number):
804
804
  */
805
805
  declare function resetBehaviorStore(): void;
806
806
 
807
+ /**
808
+ * Configurable state machine framework
809
+ * @module core/stateMachine
810
+ * @internal This module is for internal use by widgets
811
+ */
812
+
813
+ /**
814
+ * Action function executed on state transitions.
815
+ * Receives the state machine context for side effects.
816
+ */
817
+ type Action<Context = unknown> = (context: Context) => void;
818
+ /**
819
+ * Transition target with optional actions.
820
+ */
821
+ interface TransitionConfig<S extends string, Context = unknown> {
822
+ target: S;
823
+ actions?: Action<Context>[];
824
+ guard?: (context: Context) => boolean;
825
+ }
826
+ /**
827
+ * State configuration with entry/exit actions and transitions.
828
+ */
829
+ interface StateConfig<S extends string, E extends string, Context = unknown> {
830
+ /** Actions to run when entering this state */
831
+ entry?: Action<Context>[];
832
+ /** Actions to run when exiting this state */
833
+ exit?: Action<Context>[];
834
+ /** Event handlers mapping events to target states */
835
+ on?: Partial<Record<E, S | TransitionConfig<S, Context>>>;
836
+ }
837
+ /**
838
+ * Full state machine configuration.
839
+ *
840
+ * @typeParam S - Union type of all state names
841
+ * @typeParam E - Union type of all event names
842
+ * @typeParam Context - Optional context object passed to actions
843
+ */
844
+ interface StateMachineConfig<S extends string, E extends string, Context = unknown> {
845
+ /** Initial state when machine starts */
846
+ initial: S;
847
+ /** State definitions */
848
+ states: Record<S, StateConfig<S, E, Context>>;
849
+ /** Optional initial context */
850
+ context?: Context;
851
+ }
852
+ /**
853
+ * State change listener function.
854
+ */
855
+ type StateListener<S extends string> = (current: S, previous: S) => void;
856
+ /**
857
+ * StateMachine interface for type-safe access.
858
+ *
859
+ * @typeParam S - Union type of all state names
860
+ * @typeParam E - Union type of all event names
861
+ * @typeParam Context - Optional context object passed to actions
862
+ */
863
+ interface StateMachine<S extends string, E extends string, Context = unknown> {
864
+ readonly current: S;
865
+ readonly context: Context;
866
+ send(event: E): boolean;
867
+ can(event: E): boolean;
868
+ matches(state: S): boolean;
869
+ subscribe(listener: StateListener<S>): Unsubscribe;
870
+ validEvents(): E[];
871
+ reset(): void;
872
+ }
873
+
807
874
  /**
808
875
  * Button component and helper functions.
809
876
  * Provides state machine support and button-specific operations.
@@ -1926,6 +1993,7 @@ declare const contentStore: {
1926
1993
  * - `align`: Horizontal text alignment
1927
1994
  * - `valign`: Vertical text alignment
1928
1995
  * - `parseTags`: Whether to parse markup tags (0=no, 1=yes)
1996
+ * - `tabSize`: Tab character width in spaces (default: 8)
1929
1997
  *
1930
1998
  * @example
1931
1999
  * ```typescript
@@ -1951,6 +2019,8 @@ declare const Content: {
1951
2019
  valign: Uint8Array<ArrayBuffer>;
1952
2020
  /** Parse markup tags (0=no, 1=yes) */
1953
2021
  parseTags: Uint8Array<ArrayBuffer>;
2022
+ /** Tab character width in spaces (default: 8) */
2023
+ tabSize: Uint8Array<ArrayBuffer>;
1954
2024
  };
1955
2025
  /**
1956
2026
  * Content configuration options.
@@ -1964,6 +2034,8 @@ interface ContentOptions {
1964
2034
  valign?: TextVAlign;
1965
2035
  /** Whether to parse markup tags */
1966
2036
  parseTags?: boolean;
2037
+ /** Tab character width in spaces (1-16, default: 8) */
2038
+ tabSize?: number;
1967
2039
  }
1968
2040
  /**
1969
2041
  * Content data returned by getContentData.
@@ -1976,6 +2048,7 @@ interface ContentData {
1976
2048
  readonly align: TextAlign;
1977
2049
  readonly valign: TextVAlign;
1978
2050
  readonly parseTags: boolean;
2051
+ readonly tabSize: number;
1979
2052
  }
1980
2053
  /**
1981
2054
  * Sets the text content of an entity.
@@ -2198,247 +2271,6 @@ declare function isParsingTags(world: World, eid: Entity): boolean;
2198
2271
  */
2199
2272
  declare function resetContentStore(): void;
2200
2273
 
2201
- /**
2202
- * Dimensions component for entity sizing in the terminal grid.
2203
- * @module components/dimensions
2204
- */
2205
-
2206
- /**
2207
- * Special value indicating "auto" (content-based) dimension.
2208
- * When used, the dimension is calculated based on content.
2209
- */
2210
- declare const AUTO_DIMENSION = -1;
2211
- /**
2212
- * Encodes a percentage value for storage in typed arrays.
2213
- * Percentages are stored as negative values: -2 = 0%, -102 = 100%
2214
- *
2215
- * @param percent - Percentage value (0-100)
2216
- * @returns Encoded value for storage
2217
- *
2218
- * @example
2219
- * ```typescript
2220
- * const encoded = encodePercentage(50); // Returns -52
2221
- * ```
2222
- */
2223
- declare function encodePercentage(percent: number): number;
2224
- /**
2225
- * Decodes a percentage value from typed array storage.
2226
- *
2227
- * @param value - Encoded value from storage
2228
- * @returns Percentage value (0-100) or null if not a percentage
2229
- *
2230
- * @example
2231
- * ```typescript
2232
- * const percent = decodePercentage(-52); // Returns 50
2233
- * const notPercent = decodePercentage(100); // Returns null
2234
- * ```
2235
- */
2236
- declare function decodePercentage(value: number): number | null;
2237
- /**
2238
- * Checks if a value represents a percentage.
2239
- *
2240
- * @param value - Value to check
2241
- * @returns true if the value is an encoded percentage
2242
- */
2243
- declare function isPercentage(value: number): boolean;
2244
- /**
2245
- * Dimensions component store using SoA (Structure of Arrays) for performance.
2246
- *
2247
- * - `width`, `height`: Size in terminal cells (floats), or encoded percentages
2248
- * - `minWidth`, `minHeight`: Minimum size constraints
2249
- * - `maxWidth`, `maxHeight`: Maximum size constraints
2250
- * - `shrink`: Whether to shrink to content (0=no, 1=yes)
2251
- *
2252
- * Percentage values are encoded as negative numbers: -2 = 0%, -102 = 100%
2253
- * Use `encodePercentage()` and `decodePercentage()` for conversion.
2254
- *
2255
- * @example
2256
- * ```typescript
2257
- * import { Dimensions, setDimensions, getDimensions } from 'blecsd';
2258
- *
2259
- * setDimensions(world, entity, 80, 24);
2260
- *
2261
- * const dims = getDimensions(world, entity);
2262
- * console.log(dims.width, dims.height); // 80, 24
2263
- * ```
2264
- */
2265
- declare const Dimensions: {
2266
- /** Width in terminal cells (or encoded percentage) */
2267
- width: Float32Array<ArrayBuffer>;
2268
- /** Height in terminal cells (or encoded percentage) */
2269
- height: Float32Array<ArrayBuffer>;
2270
- /** Minimum width constraint */
2271
- minWidth: Float32Array<ArrayBuffer>;
2272
- /** Minimum height constraint */
2273
- minHeight: Float32Array<ArrayBuffer>;
2274
- /** Maximum width constraint */
2275
- maxWidth: Float32Array<ArrayBuffer>;
2276
- /** Maximum height constraint */
2277
- maxHeight: Float32Array<ArrayBuffer>;
2278
- /** 0 = fixed size, 1 = shrink to content */
2279
- shrink: Uint8Array<ArrayBuffer>;
2280
- };
2281
- /**
2282
- * Dimension value that can be a number, percentage string, or 'auto'.
2283
- */
2284
- type DimensionValue = number | `${number}%` | 'auto';
2285
- /**
2286
- * Dimensions data returned by getDimensions.
2287
- */
2288
- interface DimensionsData {
2289
- readonly width: number;
2290
- readonly height: number;
2291
- readonly minWidth: number;
2292
- readonly minHeight: number;
2293
- readonly maxWidth: number;
2294
- readonly maxHeight: number;
2295
- readonly shrink: boolean;
2296
- }
2297
- /**
2298
- * Constraints data for min/max dimensions.
2299
- */
2300
- interface DimensionConstraints {
2301
- readonly minWidth?: number;
2302
- readonly minHeight?: number;
2303
- readonly maxWidth?: number;
2304
- readonly maxHeight?: number;
2305
- }
2306
- /**
2307
- * Sets the dimensions of an entity.
2308
- * Adds the Dimensions component if not already present.
2309
- *
2310
- * @param world - The ECS world
2311
- * @param eid - The entity ID
2312
- * @param width - Width value (number, percentage string like "50%", or "auto")
2313
- * @param height - Height value (number, percentage string like "50%", or "auto")
2314
- * @returns The entity ID for chaining
2315
- *
2316
- * @example
2317
- * ```typescript
2318
- * import { createWorld, addEntity } from '../core/ecs';
2319
- * import { setDimensions } from 'blecsd';
2320
- *
2321
- * const world = createWorld();
2322
- * const entity = addEntity(world);
2323
- *
2324
- * // Fixed size
2325
- * setDimensions(world, entity, 80, 24);
2326
- *
2327
- * // Percentage width
2328
- * setDimensions(world, entity, '50%', 24);
2329
- *
2330
- * // Auto height
2331
- * setDimensions(world, entity, 80, 'auto');
2332
- * ```
2333
- */
2334
- declare function setDimensions(world: World, eid: Entity, width: DimensionValue, height: DimensionValue): Entity;
2335
- /**
2336
- * Gets the dimensions data of an entity.
2337
- * Returns undefined if the entity doesn't have a Dimensions component.
2338
- *
2339
- * @param world - The ECS world
2340
- * @param eid - The entity ID
2341
- * @returns Dimensions data or undefined
2342
- *
2343
- * @example
2344
- * ```typescript
2345
- * import { getDimensions } from 'blecsd';
2346
- *
2347
- * const dims = getDimensions(world, entity);
2348
- * if (dims) {
2349
- * console.log(`Size: ${dims.width}x${dims.height}`);
2350
- * }
2351
- * ```
2352
- */
2353
- declare function getDimensions(world: World, eid: Entity): DimensionsData | undefined;
2354
- /**
2355
- * Sets dimension constraints (min/max) for an entity.
2356
- *
2357
- * @param world - The ECS world
2358
- * @param eid - The entity ID
2359
- * @param constraints - Constraint values to set
2360
- * @returns The entity ID for chaining
2361
- *
2362
- * @example
2363
- * ```typescript
2364
- * import { setConstraints } from 'blecsd';
2365
- *
2366
- * setConstraints(world, entity, {
2367
- * minWidth: 10,
2368
- * maxWidth: 100,
2369
- * minHeight: 5,
2370
- * });
2371
- * ```
2372
- */
2373
- declare function setConstraints(world: World, eid: Entity, constraints: DimensionConstraints): Entity;
2374
- /**
2375
- * Sets the shrink-to-content flag for an entity.
2376
- *
2377
- * @param world - The ECS world
2378
- * @param eid - The entity ID
2379
- * @param shrink - true to shrink to content, false for fixed size
2380
- * @returns The entity ID for chaining
2381
- *
2382
- * @example
2383
- * ```typescript
2384
- * import { setShrink } from 'blecsd';
2385
- *
2386
- * // Enable shrink-to-content
2387
- * setShrink(world, entity, true);
2388
- * ```
2389
- */
2390
- declare function setShrink(world: World, eid: Entity, shrink: boolean): Entity;
2391
- /**
2392
- * Checks if an entity should shrink to content.
2393
- *
2394
- * @param world - The ECS world
2395
- * @param eid - The entity ID
2396
- * @returns true if shrink is enabled, false otherwise
2397
- */
2398
- declare function shouldShrink(world: World, eid: Entity): boolean;
2399
- /**
2400
- * Checks if an entity has a Dimensions component.
2401
- *
2402
- * @param world - The ECS world
2403
- * @param eid - The entity ID
2404
- * @returns true if entity has Dimensions component
2405
- */
2406
- declare function hasDimensions(world: World, eid: Entity): boolean;
2407
- /**
2408
- * Gets the width of an entity, resolving percentages against a container width.
2409
- *
2410
- * @param world - The ECS world
2411
- * @param eid - The entity ID
2412
- * @param containerWidth - Container width to resolve percentages against
2413
- * @returns Resolved width value, or undefined if no Dimensions component
2414
- *
2415
- * @example
2416
- * ```typescript
2417
- * import { getResolvedWidth, setDimensions } from 'blecsd';
2418
- *
2419
- * setDimensions(world, entity, '50%', 24);
2420
- * const width = getResolvedWidth(world, entity, 100); // Returns 50
2421
- * ```
2422
- */
2423
- declare function getResolvedWidth(world: World, eid: Entity, containerWidth: number): number | undefined;
2424
- /**
2425
- * Gets the height of an entity, resolving percentages against a container height.
2426
- *
2427
- * @param world - The ECS world
2428
- * @param eid - The entity ID
2429
- * @param containerHeight - Container height to resolve percentages against
2430
- * @returns Resolved height value, or undefined if no Dimensions component
2431
- *
2432
- * @example
2433
- * ```typescript
2434
- * import { getResolvedHeight, setDimensions } from 'blecsd';
2435
- *
2436
- * setDimensions(world, entity, 80, '25%');
2437
- * const height = getResolvedHeight(world, entity, 80); // Returns 20
2438
- * ```
2439
- */
2440
- declare function getResolvedHeight(world: World, eid: Entity, containerHeight: number): number | undefined;
2441
-
2442
2274
  /**
2443
2275
  * Focusable component for focus management.
2444
2276
  * @module components/focusable
@@ -4315,6 +4147,8 @@ declare const Interactive: {
4315
4147
  focused: Uint8Array<ArrayBuffer>;
4316
4148
  /** Tab index for focus order (-1=skip, 0+=order) */
4317
4149
  tabIndex: Int16Array<ArrayBuffer>;
4150
+ /** Whether entity is enabled (0=disabled, 1=enabled) */
4151
+ enabled: Uint8Array<ArrayBuffer>;
4318
4152
  /** Hover effect foreground color */
4319
4153
  hoverEffectFg: Uint32Array<ArrayBuffer>;
4320
4154
  /** Hover effect background color */
@@ -4340,6 +4174,8 @@ interface InteractiveOptions {
4340
4174
  focusable?: boolean;
4341
4175
  /** Tab index for focus order (-1=skip, 0+=order) */
4342
4176
  tabIndex?: number;
4177
+ /** Whether entity is enabled (can receive input/focus) */
4178
+ enabled?: boolean;
4343
4179
  /** Hover effect foreground color */
4344
4180
  hoverEffectFg?: number;
4345
4181
  /** Hover effect background color */
@@ -4358,6 +4194,7 @@ interface InteractiveData {
4358
4194
  readonly hoverable: boolean;
4359
4195
  readonly hovered: boolean;
4360
4196
  readonly pressed: boolean;
4197
+ readonly enabled: boolean;
4361
4198
  readonly keyable: boolean;
4362
4199
  readonly focusable: boolean;
4363
4200
  readonly focused: boolean;
@@ -4684,6 +4521,66 @@ declare function hasKeysEnabled(world: World, eid: Entity): boolean;
4684
4521
  * @returns true if any input is enabled
4685
4522
  */
4686
4523
  declare function hasInputEnabled(world: World, eid: Entity): boolean;
4524
+ /**
4525
+ * Enables an entity, allowing it to receive input and focus.
4526
+ * Disabled entities are skipped in focus traversal and ignore input.
4527
+ *
4528
+ * @param world - The ECS world
4529
+ * @param eid - The entity ID
4530
+ * @returns The entity ID for chaining
4531
+ *
4532
+ * @example
4533
+ * ```typescript
4534
+ * import { enable, disable, isEnabled } from 'blecsd';
4535
+ *
4536
+ * // Disable a button temporarily
4537
+ * disable(world, button);
4538
+ *
4539
+ * // Re-enable it later
4540
+ * enable(world, button);
4541
+ * ```
4542
+ */
4543
+ declare function enable(world: World, eid: Entity): Entity;
4544
+ /**
4545
+ * Disables an entity, preventing it from receiving input and focus.
4546
+ * Disabled entities are skipped in focus traversal and ignore input.
4547
+ *
4548
+ * @param world - The ECS world
4549
+ * @param eid - The entity ID
4550
+ * @returns The entity ID for chaining
4551
+ *
4552
+ * @example
4553
+ * ```typescript
4554
+ * import { enable, disable, isEnabled } from 'blecsd';
4555
+ *
4556
+ * // Disable a form field while loading
4557
+ * disable(world, formField);
4558
+ *
4559
+ * // Re-enable when ready
4560
+ * enable(world, formField);
4561
+ * ```
4562
+ */
4563
+ declare function disable(world: World, eid: Entity): Entity;
4564
+ /**
4565
+ * Checks if an entity is enabled.
4566
+ * Disabled entities cannot receive input or focus.
4567
+ *
4568
+ * @param world - The ECS world
4569
+ * @param eid - The entity ID
4570
+ * @returns true if entity is enabled (default: true)
4571
+ *
4572
+ * @example
4573
+ * ```typescript
4574
+ * import { isEnabled, disable } from 'blecsd';
4575
+ *
4576
+ * if (isEnabled(world, button)) {
4577
+ * // Process click
4578
+ * } else {
4579
+ * // Show disabled styling
4580
+ * }
4581
+ * ```
4582
+ */
4583
+ declare function isEnabled(world: World, eid: Entity): boolean;
4687
4584
 
4688
4585
  /**
4689
4586
  * Label component for element labels.
@@ -4993,91 +4890,989 @@ declare function removeLabel(world: World, eid: Entity): Entity;
4993
4890
  declare function hasLabelText(world: World, eid: Entity): boolean;
4994
4891
 
4995
4892
  /**
4996
- * Padding component for element spacing.
4997
- * @module components/padding
4893
+ * List Component Callbacks
4894
+ *
4895
+ * @module components/list/callbacks
4998
4896
  */
4999
4897
 
5000
4898
  /**
5001
- * Padding component store using SoA (Structure of Arrays) for performance.
4899
+ * Registers a callback for when selection changes.
5002
4900
  *
5003
- * - `left`, `top`, `right`, `bottom`: Padding values in characters/cells
4901
+ * @param eid - The entity ID
4902
+ * @param callback - The callback function
4903
+ * @returns Unsubscribe function
5004
4904
  *
5005
4905
  * @example
5006
4906
  * ```typescript
5007
- * import { Padding, setPadding, getPadding } from 'blecsd';
5008
- *
5009
- * // Set individual padding values
5010
- * setPadding(world, entity, { left: 1, top: 2, right: 1, bottom: 2 });
5011
- *
5012
- * // Set all sides at once
5013
- * setPaddingAll(world, entity, 2);
5014
- *
5015
- * const padding = getPadding(world, entity);
5016
- * console.log(padding.left); // 1
4907
+ * const unsubscribe = onListSelect(eid, (index, item) => {
4908
+ * console.log(`Selected: ${item.text}`);
4909
+ * });
5017
4910
  * ```
5018
4911
  */
5019
- declare const Padding: {
5020
- /** Left padding in cells */
5021
- left: Uint8Array<ArrayBuffer>;
5022
- /** Top padding in cells */
5023
- top: Uint8Array<ArrayBuffer>;
5024
- /** Right padding in cells */
5025
- right: Uint8Array<ArrayBuffer>;
5026
- /** Bottom padding in cells */
5027
- bottom: Uint8Array<ArrayBuffer>;
5028
- };
5029
- /**
5030
- * Padding configuration options.
5031
- */
5032
- interface PaddingOptions {
5033
- /** Left padding */
5034
- left?: number;
5035
- /** Top padding */
5036
- top?: number;
5037
- /** Right padding */
5038
- right?: number;
5039
- /** Bottom padding */
5040
- bottom?: number;
5041
- }
5042
- /**
5043
- * Padding data returned by getPadding.
5044
- */
5045
- interface PaddingData {
5046
- readonly left: number;
5047
- readonly top: number;
5048
- readonly right: number;
5049
- readonly bottom: number;
5050
- }
4912
+ declare function onListSelect(eid: Entity, callback: ListSelectCallback): () => void;
5051
4913
  /**
5052
- * Sets the padding of an entity.
5053
- * Adds the Padding component if not already present.
4914
+ * Registers a callback for when an item is activated (confirmed).
5054
4915
  *
5055
- * @param world - The ECS world
5056
4916
  * @param eid - The entity ID
5057
- * @param options - Padding options (individual sides)
5058
- * @returns The entity ID for chaining
4917
+ * @param callback - The callback function
4918
+ * @returns Unsubscribe function
5059
4919
  *
5060
4920
  * @example
5061
4921
  * ```typescript
5062
- * import { createWorld, addEntity } from '../core/ecs';
5063
- * import { setPadding } from 'blecsd';
5064
- *
5065
- * const world = createWorld();
5066
- * const entity = addEntity(world);
5067
- *
5068
- * // Set individual sides
5069
- * setPadding(world, entity, { left: 1, top: 2, right: 1, bottom: 2 });
5070
- *
5071
- * // Set only some sides (others remain unchanged)
5072
- * setPadding(world, entity, { left: 3 });
4922
+ * const unsubscribe = onListActivate(eid, (index, item) => {
4923
+ * console.log(`Activated: ${item.text}`);
4924
+ * });
5073
4925
  * ```
5074
4926
  */
5075
- declare function setPadding(world: World, eid: Entity, options: PaddingOptions): Entity;
4927
+ declare function onListActivate(eid: Entity, callback: ListSelectCallback): () => void;
5076
4928
  /**
5077
- * Sets all padding sides to the same value.
5078
- * Adds the Padding component if not already present.
4929
+ * Registers a callback for cancel events (when Escape is pressed).
5079
4930
  *
5080
- * @param world - The ECS world
4931
+ * @param eid - The entity ID
4932
+ * @param callback - Callback function to invoke on cancel
4933
+ * @returns Function to unsubscribe the callback
4934
+ *
4935
+ * @example
4936
+ * ```typescript
4937
+ * const unsubscribe = onListCancel(eid, () => {
4938
+ * console.log('List cancelled');
4939
+ * });
4940
+ * ```
4941
+ */
4942
+ declare function onListCancel(eid: Entity, callback: () => void): () => void;
4943
+ /**
4944
+ * Triggers cancel callbacks for a list.
4945
+ *
4946
+ * @param eid - The entity ID
4947
+ */
4948
+ declare function triggerListCancel(eid: Entity): void;
4949
+ /**
4950
+ * Clears all callbacks for a list.
4951
+ *
4952
+ * @param eid - The entity ID
4953
+ */
4954
+ declare function clearListCallbacks(eid: Entity): void;
4955
+
4956
+ /**
4957
+ * List Component Constants
4958
+ *
4959
+ * @module components/list/constants
4960
+ */
4961
+ /** Default selected prefix character */
4962
+ declare const DEFAULT_SELECTED_PREFIX = "> ";
4963
+ /** Default unselected prefix character */
4964
+ declare const DEFAULT_UNSELECTED_PREFIX = " ";
4965
+ /** Default selected foreground color */
4966
+ declare const DEFAULT_SELECTED_FG = 4294967295;
4967
+ /** Default selected background color */
4968
+ declare const DEFAULT_SELECTED_BG = 6750207;
4969
+ /** Default item foreground color */
4970
+ declare const DEFAULT_ITEM_FG = 3435973887;
4971
+ /** Default item background color */
4972
+ declare const DEFAULT_ITEM_BG = 255;
4973
+ /** Default disabled foreground color */
4974
+ declare const DEFAULT_DISABLED_FG = 1717987071;
4975
+
4976
+ /**
4977
+ * List Component Core Functions
4978
+ *
4979
+ * @module components/list/core
4980
+ */
4981
+
4982
+ /**
4983
+ * Attaches list behavior to an entity.
4984
+ *
4985
+ * @param world - The ECS world
4986
+ * @param eid - The entity ID
4987
+ * @param items - Initial items
4988
+ * @param options - List options
4989
+ *
4990
+ * @example
4991
+ * ```typescript
4992
+ * import { attachListBehavior } from 'blecsd';
4993
+ *
4994
+ * attachListBehavior(world, eid, [
4995
+ * { text: 'Option 1', value: 'opt1' },
4996
+ * { text: 'Option 2', value: 'opt2' },
4997
+ * ], { interactive: true, keys: true });
4998
+ * ```
4999
+ */
5000
+ declare function attachListBehavior(world: World, eid: Entity, items?: ListItem[], options?: {
5001
+ interactive?: boolean;
5002
+ mouse?: boolean;
5003
+ keys?: boolean;
5004
+ search?: boolean;
5005
+ selectedIndex?: number;
5006
+ visibleCount?: number;
5007
+ }): void;
5008
+ /**
5009
+ * Checks if an entity is a list.
5010
+ *
5011
+ * @param world - The ECS world
5012
+ * @param eid - The entity ID
5013
+ * @returns true if entity is a list
5014
+ */
5015
+ declare function isList(world: World, eid: Entity): boolean;
5016
+ /**
5017
+ * Gets the current state of a list.
5018
+ *
5019
+ * @param world - The ECS world
5020
+ * @param eid - The entity ID
5021
+ * @returns The current state
5022
+ */
5023
+ declare function getListState(world: World, eid: Entity): ListState;
5024
+ /**
5025
+ * Checks if list is in a specific state.
5026
+ *
5027
+ * @param world - The ECS world
5028
+ * @param eid - The entity ID
5029
+ * @param state - The state to check
5030
+ * @returns true if list is in the specified state
5031
+ */
5032
+ declare function isListInState(world: World, eid: Entity, state: ListState): boolean;
5033
+ /**
5034
+ * Checks if list is focused.
5035
+ *
5036
+ * @param world - The ECS world
5037
+ * @param eid - The entity ID
5038
+ * @returns true if list is focused
5039
+ */
5040
+ declare function isListFocused(world: World, eid: Entity): boolean;
5041
+ /**
5042
+ * Checks if list is disabled.
5043
+ *
5044
+ * @param world - The ECS world
5045
+ * @param eid - The entity ID
5046
+ * @returns true if list is disabled
5047
+ */
5048
+ declare function isListDisabled(world: World, eid: Entity): boolean;
5049
+ /**
5050
+ * Sends an event to the list state machine.
5051
+ *
5052
+ * @param world - The ECS world
5053
+ * @param eid - The entity ID
5054
+ * @param event - The event to send
5055
+ * @returns true if transition occurred
5056
+ */
5057
+ declare function sendListEvent(world: World, eid: Entity, event: ListEvent): boolean;
5058
+ /**
5059
+ * Focuses the list.
5060
+ *
5061
+ * @param world - The ECS world
5062
+ * @param eid - The entity ID
5063
+ * @returns true if focused successfully
5064
+ */
5065
+ declare function focusList(world: World, eid: Entity): boolean;
5066
+ /**
5067
+ * Blurs the list.
5068
+ *
5069
+ * @param world - The ECS world
5070
+ * @param eid - The entity ID
5071
+ * @returns true if blurred successfully
5072
+ */
5073
+ declare function blurList(world: World, eid: Entity): boolean;
5074
+ /**
5075
+ * Disables the list.
5076
+ *
5077
+ * @param world - The ECS world
5078
+ * @param eid - The entity ID
5079
+ * @returns true if disabled successfully
5080
+ */
5081
+ declare function disableList(world: World, eid: Entity): boolean;
5082
+ /**
5083
+ * Enables the list.
5084
+ *
5085
+ * @param world - The ECS world
5086
+ * @param eid - The entity ID
5087
+ * @returns true if enabled successfully
5088
+ */
5089
+ declare function enableList(world: World, eid: Entity): boolean;
5090
+
5091
+ /**
5092
+ * List Component Display Configuration
5093
+ *
5094
+ * @module components/list/display
5095
+ */
5096
+
5097
+ /**
5098
+ * Sets the list display configuration.
5099
+ *
5100
+ * @param eid - The entity ID
5101
+ * @param options - Display options
5102
+ */
5103
+ declare function setListDisplay(eid: Entity, options: ListDisplayOptions): void;
5104
+ /**
5105
+ * Gets the list display configuration.
5106
+ *
5107
+ * @param eid - The entity ID
5108
+ * @returns Display configuration
5109
+ */
5110
+ declare function getListDisplay(eid: Entity): ListDisplay;
5111
+ /**
5112
+ * Clears the list display configuration.
5113
+ *
5114
+ * @param eid - The entity ID
5115
+ */
5116
+ declare function clearListDisplay(eid: Entity): void;
5117
+
5118
+ /**
5119
+ * List Component Filter
5120
+ *
5121
+ * @module components/list/filter
5122
+ */
5123
+
5124
+ /**
5125
+ * Sets a filter text to show only matching items.
5126
+ *
5127
+ * @param world - The ECS world
5128
+ * @param eid - The entity ID
5129
+ * @param filterText - The filter text (case-insensitive substring match)
5130
+ *
5131
+ * @example
5132
+ * ```typescript
5133
+ * setListFilter(world, eid, 'app'); // Shows only items containing 'app'
5134
+ * ```
5135
+ */
5136
+ declare function setListFilter(world: World, eid: Entity, filterText: string): void;
5137
+ /**
5138
+ * Clears the filter, showing all items.
5139
+ *
5140
+ * @param world - The ECS world
5141
+ * @param eid - The entity ID
5142
+ */
5143
+ declare function clearListFilter(world: World, eid: Entity): void;
5144
+ /**
5145
+ * Gets the filtered (visible) items based on current filter.
5146
+ *
5147
+ * @param eid - The entity ID
5148
+ * @returns Array of filtered items
5149
+ */
5150
+ declare function getFilteredItems(eid: Entity): readonly ListItem[];
5151
+
5152
+ /**
5153
+ * List Component Item Management
5154
+ *
5155
+ * @module components/list/items
5156
+ */
5157
+
5158
+ /**
5159
+ * Gets all items from a list.
5160
+ *
5161
+ * @param eid - The entity ID
5162
+ * @returns Array of list items
5163
+ */
5164
+ declare function getItems(eid: Entity): readonly ListItem[];
5165
+ /**
5166
+ * Sets all items in a list.
5167
+ *
5168
+ * @param world - The ECS world
5169
+ * @param eid - The entity ID
5170
+ * @param items - The items to set
5171
+ */
5172
+ declare function setItems(world: World, eid: Entity, items: ListItem[]): void;
5173
+ /**
5174
+ * Adds an item to the list.
5175
+ *
5176
+ * @param world - The ECS world
5177
+ * @param eid - The entity ID
5178
+ * @param item - The item to add
5179
+ * @param index - Optional index to insert at (defaults to end)
5180
+ */
5181
+ declare function addItem(world: World, eid: Entity, item: ListItem, index?: number): void;
5182
+ /**
5183
+ * Removes an item from the list.
5184
+ *
5185
+ * @param world - The ECS world
5186
+ * @param eid - The entity ID
5187
+ * @param index - The index to remove
5188
+ * @returns The removed item or undefined
5189
+ */
5190
+ declare function removeItem(world: World, eid: Entity, index: number): ListItem | undefined;
5191
+ /**
5192
+ * Gets an item by index.
5193
+ *
5194
+ * @param eid - The entity ID
5195
+ * @param index - The item index
5196
+ * @returns The item or undefined
5197
+ */
5198
+ declare function getItem(eid: Entity, index: number): ListItem | undefined;
5199
+ /**
5200
+ * Updates an item at a specific index.
5201
+ *
5202
+ * @param world - The ECS world
5203
+ * @param eid - The entity ID
5204
+ * @param index - The item index
5205
+ * @param item - The new item data
5206
+ * @returns true if updated successfully
5207
+ */
5208
+ declare function updateItem(world: World, eid: Entity, index: number, item: ListItem): boolean;
5209
+ /**
5210
+ * Gets the number of items in the list.
5211
+ *
5212
+ * @param eid - The entity ID
5213
+ * @returns Number of items
5214
+ */
5215
+ declare function getItemCount(eid: Entity): number;
5216
+ /**
5217
+ * Clears all items from the list.
5218
+ *
5219
+ * @param world - The ECS world
5220
+ * @param eid - The entity ID
5221
+ */
5222
+ declare function clearItems(world: World, eid: Entity): void;
5223
+
5224
+ /**
5225
+ * List Component Key Handling
5226
+ *
5227
+ * @module components/list/keyHandling
5228
+ */
5229
+
5230
+ /**
5231
+ * Handles key press for list widget.
5232
+ *
5233
+ * @param world - The ECS world
5234
+ * @param eid - The entity ID
5235
+ * @param key - The key name
5236
+ * @returns Action to perform or null
5237
+ *
5238
+ * @example
5239
+ * ```typescript
5240
+ * const action = handleListKeyPress(world, eid, 'down');
5241
+ * if (action?.type === 'selectNext') {
5242
+ * selectNext(world, eid);
5243
+ * }
5244
+ * ```
5245
+ */
5246
+ declare function handleListKeyPress(world: World, eid: Entity, key: string): ListAction | null;
5247
+
5248
+ /**
5249
+ * List Component Multi-Select
5250
+ *
5251
+ * @module components/list/multiSelect
5252
+ */
5253
+
5254
+ /**
5255
+ * Enables or disables multi-select mode for a list.
5256
+ *
5257
+ * @param eid - The entity ID
5258
+ * @param enabled - Whether multi-select is enabled
5259
+ *
5260
+ * @example
5261
+ * ```typescript
5262
+ * setListMultiSelect(eid, true);
5263
+ * ```
5264
+ */
5265
+ declare function setListMultiSelect(eid: Entity, enabled: boolean): void;
5266
+ /**
5267
+ * Checks if a list has multi-select enabled.
5268
+ *
5269
+ * @param eid - The entity ID
5270
+ * @returns true if multi-select is enabled
5271
+ */
5272
+ declare function isListMultiSelect(eid: Entity): boolean;
5273
+ /**
5274
+ * Toggles selection of an item in multi-select mode.
5275
+ *
5276
+ * @param eid - The entity ID
5277
+ * @param index - The item index to toggle
5278
+ * @returns true if the item is now selected, false if deselected
5279
+ */
5280
+ declare function toggleMultiSelect(eid: Entity, index: number): boolean;
5281
+ /**
5282
+ * Gets all selected indices in multi-select mode.
5283
+ *
5284
+ * @param eid - The entity ID
5285
+ * @returns Array of selected indices
5286
+ */
5287
+ declare function getMultiSelected(eid: Entity): number[];
5288
+ /**
5289
+ * Selects all items in multi-select mode.
5290
+ *
5291
+ * @param eid - The entity ID
5292
+ */
5293
+ declare function selectAllItems(eid: Entity): void;
5294
+ /**
5295
+ * Deselects all items in multi-select mode.
5296
+ *
5297
+ * @param eid - The entity ID
5298
+ */
5299
+ declare function deselectAllItems(eid: Entity): void;
5300
+ /**
5301
+ * Checks if an item is selected in multi-select mode.
5302
+ *
5303
+ * @param eid - The entity ID
5304
+ * @param index - The item index
5305
+ * @returns true if the item is selected
5306
+ */
5307
+ declare function isItemMultiSelected(eid: Entity, index: number): boolean;
5308
+
5309
+ /**
5310
+ * List Component Options Management
5311
+ *
5312
+ * @module components/list/options
5313
+ */
5314
+
5315
+ /**
5316
+ * Checks if list is interactive.
5317
+ *
5318
+ * @param eid - The entity ID
5319
+ * @returns true if interactive
5320
+ */
5321
+ declare function isListInteractive(eid: Entity): boolean;
5322
+ /**
5323
+ * Sets list interactive mode.
5324
+ *
5325
+ * @param world - The ECS world
5326
+ * @param eid - The entity ID
5327
+ * @param interactive - Whether list is interactive
5328
+ */
5329
+ declare function setListInteractive(world: World, eid: Entity, interactive: boolean): void;
5330
+ /**
5331
+ * Checks if list responds to mouse.
5332
+ *
5333
+ * @param eid - The entity ID
5334
+ * @returns true if mouse enabled
5335
+ */
5336
+ declare function isListMouseEnabled(eid: Entity): boolean;
5337
+ /**
5338
+ * Sets list mouse mode.
5339
+ *
5340
+ * @param world - The ECS world
5341
+ * @param eid - The entity ID
5342
+ * @param mouse - Whether mouse is enabled
5343
+ */
5344
+ declare function setListMouse(world: World, eid: Entity, mouse: boolean): void;
5345
+ /**
5346
+ * Checks if list responds to keyboard.
5347
+ *
5348
+ * @param eid - The entity ID
5349
+ * @returns true if keys enabled
5350
+ */
5351
+ declare function isListKeysEnabled(eid: Entity): boolean;
5352
+ /**
5353
+ * Sets list keys mode.
5354
+ *
5355
+ * @param world - The ECS world
5356
+ * @param eid - The entity ID
5357
+ * @param keys - Whether keys are enabled
5358
+ */
5359
+ declare function setListKeys(world: World, eid: Entity, keys: boolean): void;
5360
+
5361
+ /**
5362
+ * List Component Rendering Helpers
5363
+ *
5364
+ * @module components/list/rendering
5365
+ */
5366
+
5367
+ /**
5368
+ * Renders list items as strings for display.
5369
+ *
5370
+ * @param eid - The entity ID
5371
+ * @param width - Available width
5372
+ * @returns Array of rendered line strings
5373
+ */
5374
+ declare function renderListItems(eid: Entity, width: number): string[];
5375
+
5376
+ /**
5377
+ * List Component Store Reset (for testing)
5378
+ *
5379
+ * @module components/list/reset
5380
+ */
5381
+ /**
5382
+ * Resets the list store. Used for testing.
5383
+ */
5384
+ declare function resetListStore(): void;
5385
+
5386
+ /**
5387
+ * List Component Search Mode
5388
+ *
5389
+ * @module components/list/search
5390
+ */
5391
+
5392
+ /**
5393
+ * Checks if search mode is enabled for the list.
5394
+ *
5395
+ * @param eid - The entity ID
5396
+ * @returns true if search is enabled
5397
+ */
5398
+ declare function isListSearchEnabled(eid: Entity): boolean;
5399
+ /**
5400
+ * Sets whether search mode is enabled for the list.
5401
+ *
5402
+ * @param world - The ECS world
5403
+ * @param eid - The entity ID
5404
+ * @param enabled - Whether search is enabled
5405
+ */
5406
+ declare function setListSearchEnabled(world: World, eid: Entity, enabled: boolean): void;
5407
+ /**
5408
+ * Checks if list is currently in search mode.
5409
+ *
5410
+ * @param world - The ECS world
5411
+ * @param eid - The entity ID
5412
+ * @returns true if list is in searching state
5413
+ */
5414
+ declare function isListSearching(world: World, eid: Entity): boolean;
5415
+ /**
5416
+ * Starts search mode for the list.
5417
+ *
5418
+ * @param world - The ECS world
5419
+ * @param eid - The entity ID
5420
+ * @returns true if search mode was started
5421
+ */
5422
+ declare function startListSearch(world: World, eid: Entity): boolean;
5423
+ /**
5424
+ * Ends search mode for the list.
5425
+ *
5426
+ * @param world - The ECS world
5427
+ * @param eid - The entity ID
5428
+ * @returns true if search mode was ended
5429
+ */
5430
+ declare function endListSearch(world: World, eid: Entity): boolean;
5431
+ /**
5432
+ * Gets the current search query.
5433
+ *
5434
+ * @param eid - The entity ID
5435
+ * @returns The current search query or empty string
5436
+ */
5437
+ declare function getListSearchQuery(eid: Entity): string;
5438
+ /**
5439
+ * Sets the search query and finds matching items.
5440
+ *
5441
+ * @param world - The ECS world
5442
+ * @param eid - The entity ID
5443
+ * @param query - The search query
5444
+ * @returns true if a match was found and selected
5445
+ */
5446
+ declare function setListSearchQuery(world: World, eid: Entity, query: string): boolean;
5447
+ /**
5448
+ * Appends a character to the search query.
5449
+ *
5450
+ * @param world - The ECS world
5451
+ * @param eid - The entity ID
5452
+ * @param char - The character to append
5453
+ * @returns true if a match was found and selected
5454
+ */
5455
+ declare function appendToSearchQuery(world: World, eid: Entity, char: string): boolean;
5456
+ /**
5457
+ * Removes the last character from the search query.
5458
+ *
5459
+ * @param world - The ECS world
5460
+ * @param eid - The entity ID
5461
+ * @returns true if a match was found and selected
5462
+ */
5463
+ declare function backspaceSearchQuery(world: World, eid: Entity): boolean;
5464
+ /**
5465
+ * Clears the search query.
5466
+ *
5467
+ * @param world - The ECS world
5468
+ * @param eid - The entity ID
5469
+ */
5470
+ declare function clearSearchQuery(world: World, eid: Entity): void;
5471
+ /**
5472
+ * Finds and selects the first item matching the text (case-insensitive).
5473
+ *
5474
+ * @param world - The ECS world
5475
+ * @param eid - The entity ID
5476
+ * @param text - The text to search for
5477
+ * @returns true if a match was found and selected
5478
+ */
5479
+ declare function findAndSelectByText(world: World, eid: Entity, text: string): boolean;
5480
+ /**
5481
+ * Finds the next item matching the current search query.
5482
+ *
5483
+ * @param world - The ECS world
5484
+ * @param eid - The entity ID
5485
+ * @returns true if a match was found and selected
5486
+ */
5487
+ declare function findNextMatch(world: World, eid: Entity): boolean;
5488
+ /**
5489
+ * Registers a callback for when search query changes.
5490
+ *
5491
+ * @param eid - The entity ID
5492
+ * @param callback - The callback function
5493
+ * @returns Unsubscribe function
5494
+ *
5495
+ * @example
5496
+ * ```typescript
5497
+ * const unsubscribe = onListSearchChange(eid, (query) => {
5498
+ * console.log(`Search: ${query}`);
5499
+ * });
5500
+ * ```
5501
+ */
5502
+ declare function onListSearchChange(eid: Entity, callback: (query: string) => void): () => void;
5503
+
5504
+ /**
5505
+ * List Component Selection Management
5506
+ *
5507
+ * @module components/list/selection
5508
+ */
5509
+
5510
+ /**
5511
+ * Gets the selected index.
5512
+ *
5513
+ * @param eid - The entity ID
5514
+ * @returns Selected index or -1 if none
5515
+ */
5516
+ declare function getSelectedIndex$1(eid: Entity): number;
5517
+ /**
5518
+ * Gets the selected item.
5519
+ *
5520
+ * @param eid - The entity ID
5521
+ * @returns Selected item or undefined
5522
+ */
5523
+ declare function getSelectedItem(eid: Entity): ListItem | undefined;
5524
+ /**
5525
+ * Sets the selected index.
5526
+ *
5527
+ * @param world - The ECS world
5528
+ * @param eid - The entity ID
5529
+ * @param index - The index to select (-1 to clear)
5530
+ * @returns true if selection changed
5531
+ */
5532
+ declare function setSelectedIndex(world: World, eid: Entity, index: number): boolean;
5533
+ /**
5534
+ * Selects the previous item.
5535
+ *
5536
+ * @param world - The ECS world
5537
+ * @param eid - The entity ID
5538
+ * @param wrap - Whether to wrap around (default: true)
5539
+ * @returns true if selection changed
5540
+ */
5541
+ declare function selectPrev(world: World, eid: Entity, wrap?: boolean): boolean;
5542
+ /**
5543
+ * Selects the next item.
5544
+ *
5545
+ * @param world - The ECS world
5546
+ * @param eid - The entity ID
5547
+ * @param wrap - Whether to wrap around (default: true)
5548
+ * @returns true if selection changed
5549
+ */
5550
+ declare function selectNext(world: World, eid: Entity, wrap?: boolean): boolean;
5551
+ /**
5552
+ * Selects the first item.
5553
+ *
5554
+ * @param world - The ECS world
5555
+ * @param eid - The entity ID
5556
+ * @returns true if selection changed
5557
+ */
5558
+ declare function selectFirst(world: World, eid: Entity): boolean;
5559
+ /**
5560
+ * Selects the last item.
5561
+ *
5562
+ * @param world - The ECS world
5563
+ * @param eid - The entity ID
5564
+ * @returns true if selection changed
5565
+ */
5566
+ declare function selectLast(world: World, eid: Entity): boolean;
5567
+ /**
5568
+ * Selects an item by value.
5569
+ *
5570
+ * @param world - The ECS world
5571
+ * @param eid - The entity ID
5572
+ * @param value - The value to select
5573
+ * @returns true if selection changed
5574
+ */
5575
+ declare function selectByValue(world: World, eid: Entity, value: string): boolean;
5576
+ /**
5577
+ * Clears the selection.
5578
+ *
5579
+ * @param world - The ECS world
5580
+ * @param eid - The entity ID
5581
+ */
5582
+ declare function clearSelection$2(world: World, eid: Entity): void;
5583
+ /**
5584
+ * Activates (confirms) the currently selected item.
5585
+ *
5586
+ * @param world - The ECS world
5587
+ * @param eid - The entity ID
5588
+ * @returns true if an item was activated
5589
+ */
5590
+ declare function activateSelected(_world: World, eid: Entity): boolean;
5591
+
5592
+ /**
5593
+ * List Component State Machine Configuration
5594
+ *
5595
+ * @module components/list/stateMachine
5596
+ */
5597
+
5598
+ /**
5599
+ * State machine configuration for list widgets.
5600
+ *
5601
+ * States:
5602
+ * - idle: List is not focused
5603
+ * - focused: List has focus, ready for navigation
5604
+ * - selecting: User is actively selecting (e.g., during mouse drag)
5605
+ * - searching: User is typing to search/filter items
5606
+ * - disabled: List is disabled and cannot be interacted with
5607
+ */
5608
+ declare const LIST_STATE_MACHINE_CONFIG: StateMachineConfig<ListState, ListEvent>;
5609
+
5610
+ /**
5611
+ * Store for list component data.
5612
+ */
5613
+ declare const listStore: ListStore;
5614
+
5615
+ /**
5616
+ * List Component Virtualization
5617
+ *
5618
+ * @module components/list/virtualization
5619
+ */
5620
+
5621
+ /**
5622
+ * Gets the first visible item index.
5623
+ *
5624
+ * @param eid - The entity ID
5625
+ * @returns First visible index
5626
+ */
5627
+ declare function getFirstVisible(eid: Entity): number;
5628
+ /**
5629
+ * Sets the first visible item index.
5630
+ *
5631
+ * @param world - The ECS world
5632
+ * @param eid - The entity ID
5633
+ * @param index - The first visible index
5634
+ */
5635
+ declare function setFirstVisible(world: World, eid: Entity, index: number): void;
5636
+ /**
5637
+ * Gets the number of visible items.
5638
+ *
5639
+ * @param eid - The entity ID
5640
+ * @returns Number of visible items
5641
+ */
5642
+ declare function getVisibleCount(eid: Entity): number;
5643
+ /**
5644
+ * Sets the number of visible items.
5645
+ *
5646
+ * @param world - The ECS world
5647
+ * @param eid - The entity ID
5648
+ * @param count - The number of visible items
5649
+ */
5650
+ declare function setVisibleCount(world: World, eid: Entity, count: number): void;
5651
+ /**
5652
+ * Ensures an index is visible by scrolling if necessary.
5653
+ *
5654
+ * @param world - The ECS world
5655
+ * @param eid - The entity ID
5656
+ * @param index - The index to make visible
5657
+ */
5658
+ declare function ensureVisible(world: World, eid: Entity, index: number): void;
5659
+ /**
5660
+ * Scrolls the list by a page (visibleCount items).
5661
+ *
5662
+ * @param world - The ECS world
5663
+ * @param eid - The entity ID
5664
+ * @param direction - 1 for down, -1 for up
5665
+ * @returns true if scrolled
5666
+ */
5667
+ declare function scrollPage(world: World, eid: Entity, direction: 1 | -1): boolean;
5668
+ /**
5669
+ * Gets the visible items for rendering.
5670
+ *
5671
+ * @param eid - The entity ID
5672
+ * @returns Array of visible items with their indices
5673
+ */
5674
+ declare function getVisibleItems(eid: Entity): Array<{
5675
+ index: number;
5676
+ item: ListItem;
5677
+ }>;
5678
+ /**
5679
+ * Sets the total item count for virtualized lists.
5680
+ * This can be larger than the actual loaded items count for infinite scroll.
5681
+ *
5682
+ * @param world - The ECS world
5683
+ * @param eid - The entity ID
5684
+ * @param count - Total item count
5685
+ */
5686
+ declare function setTotalCount(world: World, eid: Entity, count: number): void;
5687
+ /**
5688
+ * Gets the total item count (may be larger than loaded items).
5689
+ *
5690
+ * @param eid - The entity ID
5691
+ * @returns Total item count
5692
+ */
5693
+ declare function getTotalCount(eid: Entity): number;
5694
+ /**
5695
+ * Sets the lazy load callback for loading items on demand.
5696
+ *
5697
+ * @param eid - The entity ID
5698
+ * @param callback - Callback function to load items
5699
+ */
5700
+ declare function setLazyLoadCallback(eid: Entity, callback: (startIndex: number, count: number) => Promise<ListItem[]>): void;
5701
+ /**
5702
+ * Gets the lazy load callback.
5703
+ *
5704
+ * @param eid - The entity ID
5705
+ * @returns Lazy load callback or undefined
5706
+ */
5707
+ declare function getLazyLoadCallback(eid: Entity): ((startIndex: number, count: number) => Promise<ListItem[]>) | undefined;
5708
+ /**
5709
+ * Clears the lazy load callback.
5710
+ *
5711
+ * @param eid - The entity ID
5712
+ */
5713
+ declare function clearLazyLoadCallback(eid: Entity): void;
5714
+ /**
5715
+ * Registers a scroll callback for detecting scroll events.
5716
+ *
5717
+ * @param eid - The entity ID
5718
+ * @param callback - Callback function
5719
+ * @returns Unsubscribe function
5720
+ */
5721
+ declare function onListScroll(eid: Entity, callback: (scrollInfo: ListScrollInfo) => void): () => void;
5722
+ /**
5723
+ * Sets the loading state for a list.
5724
+ *
5725
+ * @param world - The ECS world
5726
+ * @param eid - The entity ID
5727
+ * @param loading - Whether items are loading
5728
+ */
5729
+ declare function setListLoading(world: World, eid: Entity, loading: boolean): void;
5730
+ /**
5731
+ * Checks if a list is currently loading items.
5732
+ *
5733
+ * @param eid - The entity ID
5734
+ * @returns true if loading
5735
+ */
5736
+ declare function isListLoading(eid: Entity): boolean;
5737
+ /**
5738
+ * Sets the loading placeholder text.
5739
+ *
5740
+ * @param eid - The entity ID
5741
+ * @param text - Placeholder text to show while loading
5742
+ */
5743
+ declare function setLoadingPlaceholder(eid: Entity, text: string): void;
5744
+ /**
5745
+ * Gets the loading placeholder text.
5746
+ *
5747
+ * @param eid - The entity ID
5748
+ * @returns Loading placeholder text
5749
+ */
5750
+ declare function getLoadingPlaceholder(eid: Entity): string;
5751
+ /**
5752
+ * Loads items for a range using the lazy load callback.
5753
+ * Returns immediately if no callback is set or already loading.
5754
+ *
5755
+ * @param world - The ECS world
5756
+ * @param eid - The entity ID
5757
+ * @param startIndex - First item to load
5758
+ * @param count - Number of items to load
5759
+ * @returns Promise that resolves when loading completes
5760
+ */
5761
+ declare function loadItems(world: World, eid: Entity, startIndex: number, count: number): Promise<void>;
5762
+ /**
5763
+ * Checks if items need to be loaded for the current visible range.
5764
+ *
5765
+ * @param eid - The entity ID
5766
+ * @returns Object with needsLoad flag and range to load
5767
+ */
5768
+ declare function checkNeedsLoad(eid: Entity): {
5769
+ needsLoad: boolean;
5770
+ startIndex: number;
5771
+ count: number;
5772
+ };
5773
+ /**
5774
+ * Gets scroll info for the list.
5775
+ *
5776
+ * @param eid - The entity ID
5777
+ * @param threshold - Items from end to trigger nearEnd (default: visibleCount)
5778
+ * @returns Scroll information
5779
+ */
5780
+ declare function getScrollInfo(eid: Entity, threshold?: number): ListScrollInfo;
5781
+ /**
5782
+ * Appends items to the list (useful for infinite scroll).
5783
+ *
5784
+ * @param world - The ECS world
5785
+ * @param eid - The entity ID
5786
+ * @param newItems - Items to append
5787
+ */
5788
+ declare function appendItems(world: World, eid: Entity, newItems: readonly ListItem[]): void;
5789
+
5790
+ /**
5791
+ * Padding component for element spacing.
5792
+ * @module components/padding
5793
+ */
5794
+
5795
+ /**
5796
+ * Padding component store using SoA (Structure of Arrays) for performance.
5797
+ *
5798
+ * - `left`, `top`, `right`, `bottom`: Padding values in characters/cells
5799
+ *
5800
+ * @example
5801
+ * ```typescript
5802
+ * import { Padding, setPadding, getPadding } from 'blecsd';
5803
+ *
5804
+ * // Set individual padding values
5805
+ * setPadding(world, entity, { left: 1, top: 2, right: 1, bottom: 2 });
5806
+ *
5807
+ * // Set all sides at once
5808
+ * setPaddingAll(world, entity, 2);
5809
+ *
5810
+ * const padding = getPadding(world, entity);
5811
+ * console.log(padding.left); // 1
5812
+ * ```
5813
+ */
5814
+ declare const Padding: {
5815
+ /** Left padding in cells */
5816
+ left: Uint8Array<ArrayBuffer>;
5817
+ /** Top padding in cells */
5818
+ top: Uint8Array<ArrayBuffer>;
5819
+ /** Right padding in cells */
5820
+ right: Uint8Array<ArrayBuffer>;
5821
+ /** Bottom padding in cells */
5822
+ bottom: Uint8Array<ArrayBuffer>;
5823
+ };
5824
+ /**
5825
+ * Padding configuration options.
5826
+ */
5827
+ interface PaddingOptions {
5828
+ /** Left padding */
5829
+ left?: number | undefined;
5830
+ /** Top padding */
5831
+ top?: number | undefined;
5832
+ /** Right padding */
5833
+ right?: number | undefined;
5834
+ /** Bottom padding */
5835
+ bottom?: number | undefined;
5836
+ }
5837
+ /**
5838
+ * Padding data returned by getPadding.
5839
+ */
5840
+ interface PaddingData {
5841
+ readonly left: number;
5842
+ readonly top: number;
5843
+ readonly right: number;
5844
+ readonly bottom: number;
5845
+ }
5846
+ /**
5847
+ * Sets the padding of an entity.
5848
+ * Adds the Padding component if not already present.
5849
+ *
5850
+ * @param world - The ECS world
5851
+ * @param eid - The entity ID
5852
+ * @param options - Padding options (individual sides)
5853
+ * @returns The entity ID for chaining
5854
+ *
5855
+ * @example
5856
+ * ```typescript
5857
+ * import { createWorld, addEntity } from '../core/ecs';
5858
+ * import { setPadding } from 'blecsd';
5859
+ *
5860
+ * const world = createWorld();
5861
+ * const entity = addEntity(world);
5862
+ *
5863
+ * // Set individual sides
5864
+ * setPadding(world, entity, { left: 1, top: 2, right: 1, bottom: 2 });
5865
+ *
5866
+ * // Set only some sides (others remain unchanged)
5867
+ * setPadding(world, entity, { left: 3 });
5868
+ * ```
5869
+ */
5870
+ declare function setPadding(world: World, eid: Entity, options: PaddingOptions): Entity;
5871
+ /**
5872
+ * Sets all padding sides to the same value.
5873
+ * Adds the Padding component if not already present.
5874
+ *
5875
+ * @param world - The ECS world
5081
5876
  * @param eid - The entity ID
5082
5877
  * @param value - Padding value for all sides
5083
5878
  * @returns The entity ID for chaining
@@ -5461,6 +6256,56 @@ declare function normalizeZIndices(world: World, entities: readonly Entity[]): v
5461
6256
  * ```
5462
6257
  */
5463
6258
  declare function swapZIndex(world: World, a: Entity, b: Entity): void;
6259
+ /**
6260
+ * Position keyword type for alignment shortcuts.
6261
+ */
6262
+ type PositionKeyword = 'center' | 'top-left' | 'tl' | 'top-right' | 'tr' | 'bottom-left' | 'bl' | 'bottom-right' | 'br';
6263
+ /**
6264
+ * Sets entity position using a keyword for quick alignment.
6265
+ * Requires parent with Dimensions component.
6266
+ *
6267
+ * @param world - The ECS world
6268
+ * @param eid - The entity ID
6269
+ * @param keyword - Position keyword
6270
+ * @returns The entity ID for chaining
6271
+ *
6272
+ * @example
6273
+ * ```typescript
6274
+ * import { setPositionKeyword } from 'blecsd';
6275
+ *
6276
+ * // Center within parent
6277
+ * setPositionKeyword(world, dialog, 'center');
6278
+ *
6279
+ * // Top-left corner
6280
+ * setPositionKeyword(world, logo, 'top-left');
6281
+ *
6282
+ * // Bottom-right corner
6283
+ * setPositionKeyword(world, statusBar, 'bottom-right');
6284
+ * ```
6285
+ */
6286
+ declare function setPositionKeyword(world: World, eid: Entity, keyword: PositionKeyword): Entity;
6287
+ /**
6288
+ * Sets entity position using percentage of parent size.
6289
+ * Requires parent with Dimensions component.
6290
+ *
6291
+ * @param world - The ECS world
6292
+ * @param eid - The entity ID
6293
+ * @param xPercent - X position as percentage (0-100)
6294
+ * @param yPercent - Y position as percentage (0-100)
6295
+ * @returns The entity ID for chaining
6296
+ *
6297
+ * @example
6298
+ * ```typescript
6299
+ * import { setPositionPercent } from 'blecsd';
6300
+ *
6301
+ * // Center horizontally, 25% from top
6302
+ * setPositionPercent(world, header, 50, 25);
6303
+ *
6304
+ * // Bottom-right quadrant
6305
+ * setPositionPercent(world, footer, 75, 75);
6306
+ * ```
6307
+ */
6308
+ declare function setPositionPercent(world: World, eid: Entity, xPercent: number, yPercent: number): Entity;
5464
6309
 
5465
6310
  /**
5466
6311
  * ProgressBar component and helper functions.
@@ -5519,12 +6364,12 @@ interface ProgressBarDisplay {
5519
6364
  * Options for progress bar display configuration.
5520
6365
  */
5521
6366
  interface ProgressBarDisplayOptions {
5522
- fillChar?: string;
5523
- emptyChar?: string;
5524
- fillFg?: number;
5525
- fillBg?: number;
5526
- emptyFg?: number;
5527
- emptyBg?: number;
6367
+ fillChar?: string | undefined;
6368
+ emptyChar?: string | undefined;
6369
+ fillFg?: number | undefined;
6370
+ fillBg?: number | undefined;
6371
+ emptyFg?: number | undefined;
6372
+ emptyBg?: number | undefined;
5528
6373
  }
5529
6374
  /** Default fill character for horizontal progress bars */
5530
6375
  declare const DEFAULT_FILL_CHAR$1 = "\u2588";
@@ -5592,6 +6437,7 @@ declare function isProgressBar(_world: World, eid: Entity): boolean;
5592
6437
  /**
5593
6438
  * Gets the current progress value.
5594
6439
  *
6440
+ * @param world - The ECS world
5595
6441
  * @param eid - Progress bar entity ID
5596
6442
  * @returns Current value
5597
6443
  *
@@ -5599,27 +6445,30 @@ declare function isProgressBar(_world: World, eid: Entity): boolean;
5599
6445
  * ```typescript
5600
6446
  * import { getProgress } from 'blecsd';
5601
6447
  *
5602
- * const value = getProgress(progressBar);
6448
+ * const value = getProgress(world, progressBar);
5603
6449
  * ```
5604
6450
  */
5605
- declare function getProgress(eid: Entity): number;
6451
+ declare function getProgress(_world: World, eid: Entity): number;
5606
6452
  /**
5607
6453
  * Gets the minimum value of the progress bar.
5608
6454
  *
6455
+ * @param world - The ECS world
5609
6456
  * @param eid - Progress bar entity ID
5610
6457
  * @returns Minimum value
5611
6458
  */
5612
- declare function getProgressMin(eid: Entity): number;
6459
+ declare function getProgressMin(_world: World, eid: Entity): number;
5613
6460
  /**
5614
6461
  * Gets the maximum value of the progress bar.
5615
6462
  *
6463
+ * @param world - The ECS world
5616
6464
  * @param eid - Progress bar entity ID
5617
6465
  * @returns Maximum value
5618
6466
  */
5619
- declare function getProgressMax(eid: Entity): number;
6467
+ declare function getProgressMax(_world: World, eid: Entity): number;
5620
6468
  /**
5621
6469
  * Gets the progress as a percentage (0-100).
5622
6470
  *
6471
+ * @param world - The ECS world
5623
6472
  * @param eid - Progress bar entity ID
5624
6473
  * @returns Progress percentage (0-100)
5625
6474
  *
@@ -5627,25 +6476,27 @@ declare function getProgressMax(eid: Entity): number;
5627
6476
  * ```typescript
5628
6477
  * import { getProgressPercentage } from 'blecsd';
5629
6478
  *
5630
- * const percent = getProgressPercentage(progressBar);
6479
+ * const percent = getProgressPercentage(world, progressBar);
5631
6480
  * console.log(`${percent}% complete`);
5632
6481
  * ```
5633
6482
  */
5634
- declare function getProgressPercentage(eid: Entity): number;
6483
+ declare function getProgressPercentage(_world: World, eid: Entity): number;
5635
6484
  /**
5636
6485
  * Gets the progress bar orientation.
5637
6486
  *
6487
+ * @param world - The ECS world
5638
6488
  * @param eid - Progress bar entity ID
5639
6489
  * @returns Orientation value
5640
6490
  */
5641
- declare function getProgressOrientation(eid: Entity): ProgressOrientation;
6491
+ declare function getProgressOrientation(_world: World, eid: Entity): ProgressOrientation;
5642
6492
  /**
5643
6493
  * Checks if percentage display is enabled.
5644
6494
  *
6495
+ * @param world - The ECS world
5645
6496
  * @param eid - Progress bar entity ID
5646
6497
  * @returns True if percentage is shown
5647
6498
  */
5648
- declare function isShowingPercentage(eid: Entity): boolean;
6499
+ declare function isShowingPercentage(_world: World, eid: Entity): boolean;
5649
6500
  /**
5650
6501
  * Sets the progress bar value.
5651
6502
  * Value is clamped to min/max range.
@@ -5702,6 +6553,7 @@ declare function completeProgress(world: World, eid: Entity): void;
5702
6553
  /**
5703
6554
  * Checks if the progress bar is complete (at max value).
5704
6555
  *
6556
+ * @param world - The ECS world
5705
6557
  * @param eid - Progress bar entity ID
5706
6558
  * @returns True if at max value
5707
6559
  *
@@ -5709,15 +6561,16 @@ declare function completeProgress(world: World, eid: Entity): void;
5709
6561
  * ```typescript
5710
6562
  * import { isProgressComplete } from 'blecsd';
5711
6563
  *
5712
- * if (isProgressComplete(progressBar)) {
6564
+ * if (isProgressComplete(world, progressBar)) {
5713
6565
  * console.log('Done!');
5714
6566
  * }
5715
6567
  * ```
5716
6568
  */
5717
- declare function isProgressComplete(eid: Entity): boolean;
6569
+ declare function isProgressComplete(_world: World, eid: Entity): boolean;
5718
6570
  /**
5719
6571
  * Sets the progress bar display configuration.
5720
6572
  *
6573
+ * @param world - The ECS world
5721
6574
  * @param eid - Progress bar entity ID
5722
6575
  * @param options - Display options
5723
6576
  *
@@ -5725,45 +6578,50 @@ declare function isProgressComplete(eid: Entity): boolean;
5725
6578
  * ```typescript
5726
6579
  * import { setProgressBarDisplay } from 'blecsd';
5727
6580
  *
5728
- * setProgressBarDisplay(progressBar, {
6581
+ * setProgressBarDisplay(world, progressBar, {
5729
6582
  * fillChar: '=',
5730
6583
  * emptyChar: '-',
5731
6584
  * fillFg: 0x00ff00ff,
5732
6585
  * });
5733
6586
  * ```
5734
6587
  */
5735
- declare function setProgressBarDisplay(eid: Entity, options: ProgressBarDisplayOptions): void;
6588
+ declare function setProgressBarDisplay(_world: World, eid: Entity, options: ProgressBarDisplayOptions): void;
5736
6589
  /**
5737
6590
  * Gets the progress bar display configuration.
5738
6591
  *
6592
+ * @param world - The ECS world
5739
6593
  * @param eid - Progress bar entity ID
5740
6594
  * @returns Display configuration
5741
6595
  */
5742
- declare function getProgressBarDisplay(eid: Entity): ProgressBarDisplay;
6596
+ declare function getProgressBarDisplay(_world: World, eid: Entity): ProgressBarDisplay;
5743
6597
  /**
5744
6598
  * Clears the progress bar display configuration.
5745
6599
  *
6600
+ * @param world - The ECS world
5746
6601
  * @param eid - Progress bar entity ID
5747
6602
  */
5748
- declare function clearProgressBarDisplay(eid: Entity): void;
6603
+ declare function clearProgressBarDisplay(_world: World, eid: Entity): void;
5749
6604
  /**
5750
6605
  * Gets the fill character for the current progress value.
5751
6606
  *
6607
+ * @param world - The ECS world
5752
6608
  * @param eid - Progress bar entity ID
5753
6609
  * @returns Fill character
5754
6610
  */
5755
- declare function getProgressFillChar(eid: Entity): string;
6611
+ declare function getProgressFillChar(world: World, eid: Entity): string;
5756
6612
  /**
5757
6613
  * Gets the empty character for the remaining progress.
5758
6614
  *
6615
+ * @param world - The ECS world
5759
6616
  * @param eid - Progress bar entity ID
5760
6617
  * @returns Empty character
5761
6618
  */
5762
- declare function getProgressEmptyChar(eid: Entity): string;
6619
+ declare function getProgressEmptyChar(world: World, eid: Entity): string;
5763
6620
  /**
5764
6621
  * Renders the progress bar as a string.
5765
6622
  * Useful for custom rendering.
5766
6623
  *
6624
+ * @param world - The ECS world
5767
6625
  * @param eid - Progress bar entity ID
5768
6626
  * @param width - Width in characters
5769
6627
  * @returns Rendered progress bar string
@@ -5772,14 +6630,15 @@ declare function getProgressEmptyChar(eid: Entity): string;
5772
6630
  * ```typescript
5773
6631
  * import { renderProgressString } from 'blecsd';
5774
6632
  *
5775
- * const bar = renderProgressString(progressBar, 20);
6633
+ * const bar = renderProgressString(world, progressBar, 20);
5776
6634
  * // Returns something like "████████████░░░░░░░░"
5777
6635
  * ```
5778
6636
  */
5779
- declare function renderProgressString(eid: Entity, width: number): string;
6637
+ declare function renderProgressString(world: World, eid: Entity, width: number): string;
5780
6638
  /**
5781
6639
  * Registers a callback for progress completion.
5782
6640
  *
6641
+ * @param world - The ECS world
5783
6642
  * @param eid - Progress bar entity ID
5784
6643
  * @param callback - Function to call when complete
5785
6644
  * @returns Unsubscribe function
@@ -5788,26 +6647,28 @@ declare function renderProgressString(eid: Entity, width: number): string;
5788
6647
  * ```typescript
5789
6648
  * import { onProgressComplete } from 'blecsd';
5790
6649
  *
5791
- * const unsubscribe = onProgressComplete(progressBar, () => {
6650
+ * const unsubscribe = onProgressComplete(world, progressBar, () => {
5792
6651
  * console.log('Progress complete!');
5793
6652
  * });
5794
6653
  * ```
5795
6654
  */
5796
- declare function onProgressComplete(eid: Entity, callback: ProgressCompleteCallback): () => void;
6655
+ declare function onProgressComplete(_world: World, eid: Entity, callback: ProgressCompleteCallback): () => void;
5797
6656
  /**
5798
6657
  * Registers a callback for progress changes.
5799
6658
  *
6659
+ * @param world - The ECS world
5800
6660
  * @param eid - Progress bar entity ID
5801
6661
  * @param callback - Function to call on change
5802
6662
  * @returns Unsubscribe function
5803
6663
  */
5804
- declare function onProgressChange(eid: Entity, callback: ProgressChangeCallback): () => void;
6664
+ declare function onProgressChange(_world: World, eid: Entity, callback: ProgressChangeCallback): () => void;
5805
6665
  /**
5806
6666
  * Clears all callbacks for a progress bar.
5807
6667
  *
6668
+ * @param world - The ECS world
5808
6669
  * @param eid - Progress bar entity ID
5809
6670
  */
5810
- declare function clearProgressBarCallbacks(eid: Entity): void;
6671
+ declare function clearProgressBarCallbacks(_world: World, eid: Entity): void;
5811
6672
  /**
5812
6673
  * Sets the progress bar orientation.
5813
6674
  *
@@ -5900,8 +6761,8 @@ interface RadioButtonDisplay {
5900
6761
  * Options for radio button display configuration.
5901
6762
  */
5902
6763
  interface RadioButtonDisplayOptions {
5903
- selectedChar?: string;
5904
- unselectedChar?: string;
6764
+ selectedChar?: string | undefined;
6765
+ unselectedChar?: string | undefined;
5905
6766
  }
5906
6767
  /** Default selected character */
5907
6768
  declare const DEFAULT_RADIO_SELECTED_CHAR = "\u25C9";
@@ -6221,6 +7082,28 @@ declare function getRadioButtonsInSet(radioSetId: Entity): Entity[];
6221
7082
  */
6222
7083
  declare function selectRadioByValue(world: World, radioSetId: Entity, value: string): boolean;
6223
7084
 
7085
+ /**
7086
+ * Component name registration for better validation error messages
7087
+ *
7088
+ * This file registers all built-in components with their human-readable names
7089
+ * to provide clear error messages when component validation fails.
7090
+ *
7091
+ * @module components/registerNames
7092
+ */
7093
+ /**
7094
+ * Registers all built-in component names for better error messages.
7095
+ * Call this early in your application (e.g., in initialization code).
7096
+ *
7097
+ * @example
7098
+ * ```typescript
7099
+ * import { registerBuiltinComponentNames } from 'blecsd/components';
7100
+ *
7101
+ * // Call once during app initialization
7102
+ * registerBuiltinComponentNames();
7103
+ * ```
7104
+ */
7105
+ declare function registerBuiltinComponentNames(): void;
7106
+
6224
7107
  /**
6225
7108
  * Screen Component
6226
7109
  *
@@ -6337,10 +7220,10 @@ interface ScreenData {
6337
7220
  * Options for initializing the Screen component.
6338
7221
  */
6339
7222
  interface ScreenOptions {
6340
- cursorVisible?: boolean;
6341
- cursorShape?: CursorShapeValue;
6342
- fullUnicode?: boolean;
6343
- autoPadding?: boolean;
7223
+ cursorVisible?: boolean | undefined;
7224
+ cursorShape?: CursorShapeValue | undefined;
7225
+ fullUnicode?: boolean | undefined;
7226
+ autoPadding?: boolean | undefined;
6344
7227
  }
6345
7228
  /**
6346
7229
  * Initializes the Screen component with default values.
@@ -6464,146 +7347,442 @@ declare function setScreenCursorShape(world: World, eid: Entity, shape: CursorSh
6464
7347
  *
6465
7348
  * @example
6466
7349
  * ```typescript
6467
- * const focused = getScreenFocus(world, screen);
6468
- * if (focused !== null) {
6469
- * console.log(`Entity ${focused} is focused`);
6470
- * }
7350
+ * const focused = getScreenFocus(world, screen);
7351
+ * if (focused !== null) {
7352
+ * console.log(`Entity ${focused} is focused`);
7353
+ * }
7354
+ * ```
7355
+ */
7356
+ declare function getScreenFocus(world: World, eid: Entity): Entity | null;
7357
+ /**
7358
+ * Sets the currently focused entity.
7359
+ *
7360
+ * @param world - The ECS world
7361
+ * @param eid - The screen entity ID
7362
+ * @param focusedEntity - The entity to focus, or null to clear focus
7363
+ * @returns true if set successfully
7364
+ *
7365
+ * @example
7366
+ * ```typescript
7367
+ * setScreenFocus(world, screen, buttonEntity);
7368
+ *
7369
+ * // Clear focus
7370
+ * setScreenFocus(world, screen, null);
7371
+ * ```
7372
+ */
7373
+ declare function setScreenFocus(world: World, eid: Entity, focusedEntity: Entity | null): boolean;
7374
+ /**
7375
+ * Gets the currently hovered entity.
7376
+ *
7377
+ * @param world - The ECS world
7378
+ * @param eid - The screen entity ID
7379
+ * @returns The hovered entity ID, or null if none hovered
7380
+ */
7381
+ declare function getScreenHover(world: World, eid: Entity): Entity | null;
7382
+ /**
7383
+ * Sets the currently hovered entity.
7384
+ *
7385
+ * @param world - The ECS world
7386
+ * @param eid - The screen entity ID
7387
+ * @param hoveredEntity - The entity being hovered, or null to clear
7388
+ * @returns true if set successfully
7389
+ */
7390
+ declare function setScreenHover(world: World, eid: Entity, hoveredEntity: Entity | null): boolean;
7391
+ /**
7392
+ * Gets the full screen data.
7393
+ *
7394
+ * @param world - The ECS world
7395
+ * @param eid - The screen entity ID
7396
+ * @returns Full screen data or undefined if not a screen
7397
+ *
7398
+ * @example
7399
+ * ```typescript
7400
+ * const data = getScreenData(world, screen);
7401
+ * if (data) {
7402
+ * console.log(`Screen: ${data.width}x${data.height}`);
7403
+ * console.log(`Focused: ${data.focused}`);
7404
+ * }
7405
+ * ```
7406
+ */
7407
+ declare function getScreenData(world: World, eid: Entity): ScreenData | undefined;
7408
+ /**
7409
+ * Gets the screen dimensions.
7410
+ *
7411
+ * @param world - The ECS world
7412
+ * @param eid - The screen entity ID
7413
+ * @returns Object with width and height, or undefined if not a screen
7414
+ *
7415
+ * @example
7416
+ * ```typescript
7417
+ * const size = getScreenSize(world, screen);
7418
+ * console.log(`Terminal: ${size?.width}x${size?.height}`);
7419
+ * ```
7420
+ */
7421
+ declare function getScreenSize(world: World, eid: Entity): {
7422
+ width: number;
7423
+ height: number;
7424
+ } | undefined;
7425
+ /**
7426
+ * Resizes the screen.
7427
+ *
7428
+ * @param world - The ECS world
7429
+ * @param eid - The screen entity ID
7430
+ * @param width - New width
7431
+ * @param height - New height
7432
+ * @returns true if resized successfully
7433
+ *
7434
+ * @example
7435
+ * ```typescript
7436
+ * // Handle terminal resize
7437
+ * process.stdout.on('resize', () => {
7438
+ * resizeScreen(world, screen, process.stdout.columns, process.stdout.rows);
7439
+ * });
7440
+ * ```
7441
+ */
7442
+ declare function resizeScreen(world: World, eid: Entity, width: number, height: number): boolean;
7443
+ /**
7444
+ * Checks if full Unicode support is enabled.
7445
+ *
7446
+ * @param world - The ECS world
7447
+ * @param eid - The screen entity ID
7448
+ * @returns true if full Unicode is enabled
7449
+ */
7450
+ declare function isFullUnicode(world: World, eid: Entity): boolean;
7451
+ /**
7452
+ * Sets full Unicode support.
7453
+ *
7454
+ * @param world - The ECS world
7455
+ * @param eid - The screen entity ID
7456
+ * @param enabled - Whether to enable full Unicode
7457
+ * @returns true if set successfully
7458
+ */
7459
+ declare function setFullUnicode(world: World, eid: Entity, enabled: boolean): boolean;
7460
+ /**
7461
+ * Checks if auto padding is enabled.
7462
+ *
7463
+ * @param world - The ECS world
7464
+ * @param eid - The screen entity ID
7465
+ * @returns true if auto padding is enabled
7466
+ */
7467
+ declare function isAutoPadding(world: World, eid: Entity): boolean;
7468
+ /**
7469
+ * Sets auto padding.
7470
+ *
7471
+ * @param world - The ECS world
7472
+ * @param eid - The screen entity ID
7473
+ * @param enabled - Whether to enable auto padding
7474
+ * @returns true if set successfully
7475
+ */
7476
+ declare function setAutoPadding(world: World, eid: Entity, enabled: boolean): boolean;
7477
+ /**
7478
+ * Removes the screen entity from the world.
7479
+ * Clears the singleton reference.
7480
+ *
7481
+ * @param world - The ECS world
7482
+ * @returns true if screen was removed
7483
+ */
7484
+ declare function destroyScreen(world: World): boolean;
7485
+ /**
7486
+ * Resets the screen singleton state. Used for testing.
7487
+ * @internal
7488
+ */
7489
+ declare function resetScreenSingleton(world: World): void;
7490
+
7491
+ /**
7492
+ * Scrollbar component for rendering scrollbars on scrollable widgets.
7493
+ *
7494
+ * Provides visual feedback for scroll position with configurable characters,
7495
+ * colors, and auto-hide behavior.
7496
+ *
7497
+ * @module components/scrollbar
7498
+ */
7499
+
7500
+ /**
7501
+ * Default scrollbar track character (light vertical bar).
7502
+ */
7503
+ declare const DEFAULT_TRACK_CHAR$1 = 9474;
7504
+ /**
7505
+ * Default scrollbar thumb character (full block).
7506
+ */
7507
+ declare const DEFAULT_THUMB_CHAR$1 = 9608;
7508
+ /**
7509
+ * Default horizontal track character (light horizontal bar).
7510
+ */
7511
+ declare const DEFAULT_TRACK_CHAR_H = 9472;
7512
+ /**
7513
+ * Default track color (dark gray).
7514
+ */
7515
+ declare const DEFAULT_TRACK_COLOR = 4281545523;
7516
+ /**
7517
+ * Default thumb color (light gray).
7518
+ */
7519
+ declare const DEFAULT_THUMB_COLOR = 4287137928;
7520
+ /**
7521
+ * Scrollbar component store using SoA (Structure of Arrays) for performance.
7522
+ *
7523
+ * - `enabled`: Whether scrollbar is enabled (0=disabled, 1=enabled)
7524
+ * - `vertical`: Whether vertical scrollbar is visible (0=no, 1=yes)
7525
+ * - `horizontal`: Whether horizontal scrollbar is visible (0=no, 1=yes)
7526
+ * - `trackChar`: Unicode codepoint for track character (vertical)
7527
+ * - `thumbChar`: Unicode codepoint for thumb character (vertical)
7528
+ * - `trackCharH`: Unicode codepoint for horizontal track character
7529
+ * - `thumbCharH`: Unicode codepoint for horizontal thumb character
7530
+ * - `trackColor`: Track color (packed RGBA)
7531
+ * - `thumbColor`: Thumb color (packed RGBA)
7532
+ * - `alwaysShow`: Always show scrollbar (0=auto, 1=always)
7533
+ *
7534
+ * @example
7535
+ * ```typescript
7536
+ * import { Scrollbar, setScrollbar, getScrollbar } from 'blecsd';
7537
+ *
7538
+ * setScrollbar(world, entity, { enabled: true });
7539
+ * setScrollbar(world, entity, { thumbColor: '#ff0000', alwaysShow: true });
7540
+ *
7541
+ * const scrollbar = getScrollbar(world, entity);
7542
+ * if (scrollbar?.enabled) {
7543
+ * console.log(`Track char: ${String.fromCodePoint(scrollbar.trackChar)}`);
7544
+ * }
7545
+ * ```
7546
+ */
7547
+ declare const Scrollbar: {
7548
+ /** 0 = disabled, 1 = enabled */
7549
+ enabled: Uint8Array<ArrayBuffer>;
7550
+ /** Vertical scrollbar visible (0=no, 1=yes) */
7551
+ vertical: Uint8Array<ArrayBuffer>;
7552
+ /** Horizontal scrollbar visible (0=no, 1=yes) */
7553
+ horizontal: Uint8Array<ArrayBuffer>;
7554
+ /** Track character for vertical scrollbar */
7555
+ trackChar: Uint32Array<ArrayBuffer>;
7556
+ /** Thumb character for vertical scrollbar */
7557
+ thumbChar: Uint32Array<ArrayBuffer>;
7558
+ /** Track character for horizontal scrollbar */
7559
+ trackCharH: Uint32Array<ArrayBuffer>;
7560
+ /** Thumb character for horizontal scrollbar */
7561
+ thumbCharH: Uint32Array<ArrayBuffer>;
7562
+ /** Track color (packed RGBA) */
7563
+ trackColor: Uint32Array<ArrayBuffer>;
7564
+ /** Thumb color (packed RGBA) */
7565
+ thumbColor: Uint32Array<ArrayBuffer>;
7566
+ /** Always show scrollbar (0=auto, 1=always) */
7567
+ alwaysShow: Uint8Array<ArrayBuffer>;
7568
+ };
7569
+ /**
7570
+ * Scrollbar configuration options.
7571
+ */
7572
+ interface ScrollbarOptions {
7573
+ /** Enable or disable scrollbar */
7574
+ enabled?: boolean;
7575
+ /** Show vertical scrollbar */
7576
+ vertical?: boolean;
7577
+ /** Show horizontal scrollbar */
7578
+ horizontal?: boolean;
7579
+ /** Track character for vertical scrollbar */
7580
+ trackChar?: number;
7581
+ /** Thumb character for vertical scrollbar */
7582
+ thumbChar?: number;
7583
+ /** Track character for horizontal scrollbar */
7584
+ trackCharH?: number;
7585
+ /** Thumb character for horizontal scrollbar */
7586
+ thumbCharH?: number;
7587
+ /** Track color (hex string or packed number) */
7588
+ trackColor?: string | number;
7589
+ /** Thumb color (hex string or packed number) */
7590
+ thumbColor?: string | number;
7591
+ /** Always show scrollbar (even when content fits) */
7592
+ alwaysShow?: boolean;
7593
+ }
7594
+ /**
7595
+ * Scrollbar data returned by getScrollbar.
7596
+ */
7597
+ interface ScrollbarData {
7598
+ readonly enabled: boolean;
7599
+ readonly vertical: boolean;
7600
+ readonly horizontal: boolean;
7601
+ readonly trackChar: number;
7602
+ readonly thumbChar: number;
7603
+ readonly trackCharH: number;
7604
+ readonly thumbCharH: number;
7605
+ readonly trackColor: number;
7606
+ readonly thumbColor: number;
7607
+ readonly alwaysShow: boolean;
7608
+ }
7609
+ /**
7610
+ * Scrollbar render position for a single cell.
7611
+ */
7612
+ interface ScrollbarRenderCell {
7613
+ readonly x: number;
7614
+ readonly y: number;
7615
+ readonly char: number;
7616
+ readonly color: number;
7617
+ readonly isThumb: boolean;
7618
+ }
7619
+ /**
7620
+ * Sets the scrollbar configuration of an entity.
7621
+ * Adds the Scrollbar component if not already present.
7622
+ *
7623
+ * @param world - The ECS world
7624
+ * @param eid - The entity ID
7625
+ * @param options - Scrollbar configuration options
7626
+ * @returns The entity ID for chaining
7627
+ *
7628
+ * @example
7629
+ * ```typescript
7630
+ * import { createWorld, addEntity } from '../core/ecs';
7631
+ * import { setScrollbar } from 'blecsd';
7632
+ *
7633
+ * const world = createWorld();
7634
+ * const entity = addEntity(world);
7635
+ *
7636
+ * // Enable scrollbar with default settings
7637
+ * setScrollbar(world, entity, { enabled: true });
7638
+ *
7639
+ * // Custom scrollbar configuration
7640
+ * setScrollbar(world, entity, {
7641
+ * enabled: true,
7642
+ * thumbColor: '#ff0000',
7643
+ * trackColor: '#333333',
7644
+ * alwaysShow: true,
7645
+ * });
6471
7646
  * ```
6472
7647
  */
6473
- declare function getScreenFocus(world: World, eid: Entity): Entity | null;
7648
+ declare function setScrollbar(world: World, eid: Entity, options: ScrollbarOptions): Entity;
6474
7649
  /**
6475
- * Sets the currently focused entity.
7650
+ * Gets the scrollbar data of an entity.
7651
+ * Returns undefined if the entity doesn't have a Scrollbar component.
6476
7652
  *
6477
7653
  * @param world - The ECS world
6478
- * @param eid - The screen entity ID
6479
- * @param focusedEntity - The entity to focus, or null to clear focus
6480
- * @returns true if set successfully
7654
+ * @param eid - The entity ID
7655
+ * @returns Scrollbar data or undefined
6481
7656
  *
6482
7657
  * @example
6483
7658
  * ```typescript
6484
- * setScreenFocus(world, screen, buttonEntity);
7659
+ * import { getScrollbar } from 'blecsd';
6485
7660
  *
6486
- * // Clear focus
6487
- * setScreenFocus(world, screen, null);
7661
+ * const scrollbar = getScrollbar(world, entity);
7662
+ * if (scrollbar?.enabled) {
7663
+ * console.log(`Track: ${scrollbar.trackColor.toString(16)}`);
7664
+ * }
6488
7665
  * ```
6489
7666
  */
6490
- declare function setScreenFocus(world: World, eid: Entity, focusedEntity: Entity | null): boolean;
7667
+ declare function getScrollbar(world: World, eid: Entity): ScrollbarData | undefined;
6491
7668
  /**
6492
- * Gets the currently hovered entity.
7669
+ * Checks if an entity has a Scrollbar component.
6493
7670
  *
6494
7671
  * @param world - The ECS world
6495
- * @param eid - The screen entity ID
6496
- * @returns The hovered entity ID, or null if none hovered
7672
+ * @param eid - The entity ID
7673
+ * @returns true if entity has Scrollbar component
6497
7674
  */
6498
- declare function getScreenHover(world: World, eid: Entity): Entity | null;
7675
+ declare function hasScrollbar(world: World, eid: Entity): boolean;
6499
7676
  /**
6500
- * Sets the currently hovered entity.
7677
+ * Checks if scrollbar is enabled for an entity.
6501
7678
  *
6502
7679
  * @param world - The ECS world
6503
- * @param eid - The screen entity ID
6504
- * @param hoveredEntity - The entity being hovered, or null to clear
6505
- * @returns true if set successfully
7680
+ * @param eid - The entity ID
7681
+ * @returns true if scrollbar is enabled
6506
7682
  */
6507
- declare function setScreenHover(world: World, eid: Entity, hoveredEntity: Entity | null): boolean;
7683
+ declare function isScrollbarEnabled(world: World, eid: Entity): boolean;
6508
7684
  /**
6509
- * Gets the full screen data.
7685
+ * Enables the scrollbar for an entity.
6510
7686
  *
6511
7687
  * @param world - The ECS world
6512
- * @param eid - The screen entity ID
6513
- * @returns Full screen data or undefined if not a screen
6514
- *
6515
- * @example
6516
- * ```typescript
6517
- * const data = getScreenData(world, screen);
6518
- * if (data) {
6519
- * console.log(`Screen: ${data.width}x${data.height}`);
6520
- * console.log(`Focused: ${data.focused}`);
6521
- * }
6522
- * ```
7688
+ * @param eid - The entity ID
7689
+ * @returns The entity ID for chaining
6523
7690
  */
6524
- declare function getScreenData(world: World, eid: Entity): ScreenData | undefined;
7691
+ declare function enableScrollbar(world: World, eid: Entity): Entity;
6525
7692
  /**
6526
- * Gets the screen dimensions.
7693
+ * Disables the scrollbar for an entity.
6527
7694
  *
6528
7695
  * @param world - The ECS world
6529
- * @param eid - The screen entity ID
6530
- * @returns Object with width and height, or undefined if not a screen
6531
- *
6532
- * @example
6533
- * ```typescript
6534
- * const size = getScreenSize(world, screen);
6535
- * console.log(`Terminal: ${size?.width}x${size?.height}`);
6536
- * ```
7696
+ * @param eid - The entity ID
7697
+ * @returns The entity ID for chaining
6537
7698
  */
6538
- declare function getScreenSize(world: World, eid: Entity): {
6539
- width: number;
6540
- height: number;
6541
- } | undefined;
7699
+ declare function disableScrollbar(world: World, eid: Entity): Entity;
6542
7700
  /**
6543
- * Resizes the screen.
7701
+ * Sets scrollbar characters for vertical scrollbar.
6544
7702
  *
6545
7703
  * @param world - The ECS world
6546
- * @param eid - The screen entity ID
6547
- * @param width - New width
6548
- * @param height - New height
6549
- * @returns true if resized successfully
6550
- *
6551
- * @example
6552
- * ```typescript
6553
- * // Handle terminal resize
6554
- * process.stdout.on('resize', () => {
6555
- * resizeScreen(world, screen, process.stdout.columns, process.stdout.rows);
6556
- * });
6557
- * ```
7704
+ * @param eid - The entity ID
7705
+ * @param trackChar - Track character codepoint
7706
+ * @param thumbChar - Thumb character codepoint
7707
+ * @returns The entity ID for chaining
6558
7708
  */
6559
- declare function resizeScreen(world: World, eid: Entity, width: number, height: number): boolean;
7709
+ declare function setScrollbarChars(world: World, eid: Entity, trackChar: number, thumbChar: number): Entity;
6560
7710
  /**
6561
- * Checks if full Unicode support is enabled.
7711
+ * Sets scrollbar colors.
6562
7712
  *
6563
7713
  * @param world - The ECS world
6564
- * @param eid - The screen entity ID
6565
- * @returns true if full Unicode is enabled
7714
+ * @param eid - The entity ID
7715
+ * @param trackColor - Track color (hex string or packed number)
7716
+ * @param thumbColor - Thumb color (hex string or packed number)
7717
+ * @returns The entity ID for chaining
6566
7718
  */
6567
- declare function isFullUnicode(world: World, eid: Entity): boolean;
7719
+ declare function setScrollbarColors(world: World, eid: Entity, trackColor: string | number, thumbColor: string | number): Entity;
6568
7720
  /**
6569
- * Sets full Unicode support.
7721
+ * Calculates vertical scrollbar render positions.
6570
7722
  *
6571
- * @param world - The ECS world
6572
- * @param eid - The screen entity ID
6573
- * @param enabled - Whether to enable full Unicode
6574
- * @returns true if set successfully
6575
- */
6576
- declare function setFullUnicode(world: World, eid: Entity, enabled: boolean): boolean;
6577
- /**
6578
- * Checks if auto padding is enabled.
7723
+ * @param x - Scrollbar X position (typically right edge of widget)
7724
+ * @param y - Scrollbar Y position (typically widget top)
7725
+ * @param height - Scrollbar height (typically widget height)
7726
+ * @param scrollOffset - Current scroll offset
7727
+ * @param scrollSize - Total scrollable content size
7728
+ * @param viewportSize - Visible area size
7729
+ * @param trackChar - Track character codepoint
7730
+ * @param thumbChar - Thumb character codepoint
7731
+ * @param trackColor - Track color
7732
+ * @param thumbColor - Thumb color
7733
+ * @returns Array of scrollbar cells to render
6579
7734
  *
6580
- * @param world - The ECS world
6581
- * @param eid - The screen entity ID
6582
- * @returns true if auto padding is enabled
7735
+ * @example
7736
+ * ```typescript
7737
+ * import { calculateVerticalScrollbar } from 'blecsd';
7738
+ *
7739
+ * const cells = calculateVerticalScrollbar(
7740
+ * 79, 0, 24, // x, y, height
7741
+ * 100, 1000, 200, // scrollOffset, scrollSize, viewportSize
7742
+ * 0x2502, 0x2588, // track, thumb chars
7743
+ * 0xff333333, 0xff888888 // track, thumb colors
7744
+ * );
7745
+ *
7746
+ * for (const cell of cells) {
7747
+ * renderCell(cell.x, cell.y, cell.char, cell.color);
7748
+ * }
7749
+ * ```
6583
7750
  */
6584
- declare function isAutoPadding(world: World, eid: Entity): boolean;
7751
+ declare function calculateVerticalScrollbar(x: number, y: number, height: number, scrollOffset: number, scrollSize: number, viewportSize: number, trackChar: number, thumbChar: number, trackColor: number, thumbColor: number): ScrollbarRenderCell[];
6585
7752
  /**
6586
- * Sets auto padding.
7753
+ * Calculates horizontal scrollbar render positions.
6587
7754
  *
6588
- * @param world - The ECS world
6589
- * @param eid - The screen entity ID
6590
- * @param enabled - Whether to enable auto padding
6591
- * @returns true if set successfully
7755
+ * @param x - Scrollbar X position (typically widget left)
7756
+ * @param y - Scrollbar Y position (typically bottom edge of widget)
7757
+ * @param width - Scrollbar width (typically widget width)
7758
+ * @param scrollOffset - Current scroll offset
7759
+ * @param scrollSize - Total scrollable content size
7760
+ * @param viewportSize - Visible area size
7761
+ * @param trackChar - Track character codepoint
7762
+ * @param thumbChar - Thumb character codepoint
7763
+ * @param trackColor - Track color
7764
+ * @param thumbColor - Thumb color
7765
+ * @returns Array of scrollbar cells to render
6592
7766
  */
6593
- declare function setAutoPadding(world: World, eid: Entity, enabled: boolean): boolean;
7767
+ declare function calculateHorizontalScrollbar(x: number, y: number, width: number, scrollOffset: number, scrollSize: number, viewportSize: number, trackChar: number, thumbChar: number, trackColor: number, thumbColor: number): ScrollbarRenderCell[];
6594
7768
  /**
6595
- * Removes the screen entity from the world.
6596
- * Clears the singleton reference.
7769
+ * Determines if vertical scrollbar should be visible.
6597
7770
  *
6598
- * @param world - The ECS world
6599
- * @returns true if screen was removed
7771
+ * @param scrollSize - Total scrollable height
7772
+ * @param viewportSize - Visible area height
7773
+ * @param alwaysShow - Always show even if content fits
7774
+ * @returns true if vertical scrollbar should be shown
6600
7775
  */
6601
- declare function destroyScreen(world: World): boolean;
7776
+ declare function shouldShowVerticalScrollbar(scrollSize: number, viewportSize: number, alwaysShow: boolean): boolean;
6602
7777
  /**
6603
- * Resets the screen singleton state. Used for testing.
6604
- * @internal
7778
+ * Determines if horizontal scrollbar should be visible.
7779
+ *
7780
+ * @param scrollSize - Total scrollable width
7781
+ * @param viewportSize - Visible area width
7782
+ * @param alwaysShow - Always show even if content fits
7783
+ * @returns true if horizontal scrollbar should be shown
6605
7784
  */
6606
- declare function resetScreenSingleton(world: World): void;
7785
+ declare function shouldShowHorizontalScrollbar(scrollSize: number, viewportSize: number, alwaysShow: boolean): boolean;
6607
7786
 
6608
7787
  /**
6609
7788
  * Select/Dropdown Component
@@ -6809,10 +7988,11 @@ declare function enableSelect(world: World, eid: Entity): boolean;
6809
7988
  /**
6810
7989
  * Gets the options for a select.
6811
7990
  *
7991
+ * @param _world - The ECS world
6812
7992
  * @param eid - The entity ID
6813
7993
  * @returns Array of options
6814
7994
  */
6815
- declare function getSelectOptions(eid: Entity): readonly SelectOption[];
7995
+ declare function getSelectOptions(_world: World, eid: Entity): readonly SelectOption[];
6816
7996
  /**
6817
7997
  * Sets the options for a select.
6818
7998
  *
@@ -6824,46 +8004,52 @@ declare function setSelectOptions(world: World, eid: Entity, options: SelectOpti
6824
8004
  /**
6825
8005
  * Gets the number of options.
6826
8006
  *
8007
+ * @param _world - The ECS world
6827
8008
  * @param eid - The entity ID
6828
8009
  * @returns Number of options
6829
8010
  */
6830
- declare function getOptionCount(eid: Entity): number;
8011
+ declare function getOptionCount(_world: World, eid: Entity): number;
6831
8012
  /**
6832
8013
  * Gets an option by index.
6833
8014
  *
8015
+ * @param _world - The ECS world
6834
8016
  * @param eid - The entity ID
6835
8017
  * @param index - The option index
6836
8018
  * @returns The option or undefined
6837
8019
  */
6838
- declare function getOptionAt(eid: Entity, index: number): SelectOption | undefined;
8020
+ declare function getOptionAt(_world: World, eid: Entity, index: number): SelectOption | undefined;
6839
8021
  /**
6840
8022
  * Gets the selected index.
6841
8023
  *
8024
+ * @param _world - The ECS world
6842
8025
  * @param eid - The entity ID
6843
8026
  * @returns Selected index or -1 if none
6844
8027
  */
6845
- declare function getSelectedIndex(eid: Entity): number;
8028
+ declare function getSelectedIndex(_world: World, eid: Entity): number;
6846
8029
  /**
6847
8030
  * Gets the selected option.
6848
8031
  *
8032
+ * @param world - The ECS world
6849
8033
  * @param eid - The entity ID
6850
8034
  * @returns Selected option or undefined
6851
8035
  */
6852
- declare function getSelectedOption(eid: Entity): SelectOption | undefined;
8036
+ declare function getSelectedOption(world: World, eid: Entity): SelectOption | undefined;
6853
8037
  /**
6854
8038
  * Gets the selected value.
6855
8039
  *
8040
+ * @param world - The ECS world
6856
8041
  * @param eid - The entity ID
6857
8042
  * @returns Selected value or undefined
6858
8043
  */
6859
- declare function getSelectedValue(eid: Entity): string | undefined;
8044
+ declare function getSelectedValue(world: World, eid: Entity): string | undefined;
6860
8045
  /**
6861
8046
  * Gets the selected label.
6862
8047
  *
8048
+ * @param world - The ECS world
6863
8049
  * @param eid - The entity ID
6864
8050
  * @returns Selected label or undefined
6865
8051
  */
6866
- declare function getSelectedLabel(eid: Entity): string | undefined;
8052
+ declare function getSelectedLabel(world: World, eid: Entity): string | undefined;
6867
8053
  /**
6868
8054
  * Selects an option by index.
6869
8055
  *
@@ -6892,10 +8078,11 @@ declare function clearSelection$1(world: World, eid: Entity): void;
6892
8078
  /**
6893
8079
  * Gets the highlighted index.
6894
8080
  *
8081
+ * @param _world - The ECS world
6895
8082
  * @param eid - The entity ID
6896
8083
  * @returns Highlighted index
6897
8084
  */
6898
- declare function getHighlightedIndex(eid: Entity): number;
8085
+ declare function getHighlightedIndex(_world: World, eid: Entity): number;
6899
8086
  /**
6900
8087
  * Sets the highlighted index.
6901
8088
  *
@@ -6931,23 +8118,26 @@ declare function selectHighlighted(world: World, eid: Entity): boolean;
6931
8118
  /**
6932
8119
  * Sets the select display configuration.
6933
8120
  *
8121
+ * @param _world - The ECS world
6934
8122
  * @param eid - The entity ID
6935
8123
  * @param options - Display options
6936
8124
  */
6937
- declare function setSelectDisplay(eid: Entity, options: SelectDisplayOptions): void;
8125
+ declare function setSelectDisplay(_world: World, eid: Entity, options: SelectDisplayOptions): void;
6938
8126
  /**
6939
8127
  * Gets the select display configuration.
6940
8128
  *
8129
+ * @param _world - The ECS world
6941
8130
  * @param eid - The entity ID
6942
8131
  * @returns Display configuration
6943
8132
  */
6944
- declare function getSelectDisplay(eid: Entity): SelectDisplay;
8133
+ declare function getSelectDisplay(_world: World, eid: Entity): SelectDisplay;
6945
8134
  /**
6946
8135
  * Clears the select display configuration.
6947
8136
  *
8137
+ * @param _world - The ECS world
6948
8138
  * @param eid - The entity ID
6949
8139
  */
6950
- declare function clearSelectDisplay(eid: Entity): void;
8140
+ declare function clearSelectDisplay(_world: World, eid: Entity): void;
6951
8141
  /**
6952
8142
  * Gets the indicator character based on state.
6953
8143
  *
@@ -6959,40 +8149,44 @@ declare function getSelectIndicator(world: World, eid: Entity): string;
6959
8149
  /**
6960
8150
  * Registers a callback for when the selection changes.
6961
8151
  *
8152
+ * @param _world - The ECS world
6962
8153
  * @param eid - The entity ID
6963
8154
  * @param callback - The callback function
6964
8155
  * @returns Unsubscribe function
6965
8156
  *
6966
8157
  * @example
6967
8158
  * ```typescript
6968
- * const unsubscribe = onSelectChange(eid, (value, label, index) => {
8159
+ * const unsubscribe = onSelectChange(world, eid, (value, label, index) => {
6969
8160
  * console.log(`Selected: ${label} (${value})`);
6970
8161
  * });
6971
8162
  * ```
6972
8163
  */
6973
- declare function onSelectChange(eid: Entity, callback: SelectCallback): () => void;
8164
+ declare function onSelectChange(_world: World, eid: Entity, callback: SelectCallback): () => void;
6974
8165
  /**
6975
8166
  * Registers a callback for when the dropdown opens.
6976
8167
  *
8168
+ * @param _world - The ECS world
6977
8169
  * @param eid - The entity ID
6978
8170
  * @param callback - The callback function
6979
8171
  * @returns Unsubscribe function
6980
8172
  */
6981
- declare function onSelectOpen(eid: Entity, callback: () => void): () => void;
8173
+ declare function onSelectOpen(_world: World, eid: Entity, callback: () => void): () => void;
6982
8174
  /**
6983
8175
  * Registers a callback for when the dropdown closes.
6984
8176
  *
8177
+ * @param _world - The ECS world
6985
8178
  * @param eid - The entity ID
6986
8179
  * @param callback - The callback function
6987
8180
  * @returns Unsubscribe function
6988
8181
  */
6989
- declare function onSelectClose(eid: Entity, callback: () => void): () => void;
8182
+ declare function onSelectClose(_world: World, eid: Entity, callback: () => void): () => void;
6990
8183
  /**
6991
8184
  * Clears all callbacks for a select.
6992
8185
  *
8186
+ * @param _world - The ECS world
6993
8187
  * @param eid - The entity ID
6994
8188
  */
6995
- declare function clearSelectCallbacks(eid: Entity): void;
8189
+ declare function clearSelectCallbacks(_world: World, eid: Entity): void;
6996
8190
  /**
6997
8191
  * Action returned from key press handling.
6998
8192
  */
@@ -7484,15 +8678,15 @@ interface SliderDisplay {
7484
8678
  * Slider display options for configuration.
7485
8679
  */
7486
8680
  interface SliderDisplayOptions {
7487
- trackChar?: string;
7488
- thumbChar?: string;
7489
- fillChar?: string;
7490
- trackFg?: number;
7491
- trackBg?: number;
7492
- thumbFg?: number;
7493
- thumbBg?: number;
7494
- fillFg?: number;
7495
- fillBg?: number;
8681
+ trackChar?: string | undefined;
8682
+ thumbChar?: string | undefined;
8683
+ fillChar?: string | undefined;
8684
+ trackFg?: number | undefined;
8685
+ trackBg?: number | undefined;
8686
+ thumbFg?: number | undefined;
8687
+ thumbBg?: number | undefined;
8688
+ fillFg?: number | undefined;
8689
+ fillBg?: number | undefined;
7496
8690
  }
7497
8691
  /**
7498
8692
  * Slider callback function type.
@@ -7666,10 +8860,11 @@ declare function enableSlider(world: World, eid: Entity): boolean;
7666
8860
  /**
7667
8861
  * Gets the slider value.
7668
8862
  *
8863
+ * @param _world - The ECS world
7669
8864
  * @param eid - The entity ID
7670
8865
  * @returns The current value
7671
8866
  */
7672
- declare function getSliderValue(eid: Entity): number;
8867
+ declare function getSliderValue(_world: World, eid: Entity): number;
7673
8868
  /**
7674
8869
  * Sets the slider value.
7675
8870
  *
@@ -7681,24 +8876,27 @@ declare function setSliderValue(world: World, eid: Entity, value: number): void;
7681
8876
  /**
7682
8877
  * Gets the slider minimum value.
7683
8878
  *
8879
+ * @param _world - The ECS world
7684
8880
  * @param eid - The entity ID
7685
8881
  * @returns The minimum value
7686
8882
  */
7687
- declare function getSliderMin(eid: Entity): number;
8883
+ declare function getSliderMin(_world: World, eid: Entity): number;
7688
8884
  /**
7689
8885
  * Gets the slider maximum value.
7690
8886
  *
8887
+ * @param _world - The ECS world
7691
8888
  * @param eid - The entity ID
7692
8889
  * @returns The maximum value
7693
8890
  */
7694
- declare function getSliderMax(eid: Entity): number;
8891
+ declare function getSliderMax(_world: World, eid: Entity): number;
7695
8892
  /**
7696
8893
  * Gets the slider step value.
7697
8894
  *
8895
+ * @param _world - The ECS world
7698
8896
  * @param eid - The entity ID
7699
8897
  * @returns The step value
7700
8898
  */
7701
- declare function getSliderStep(eid: Entity): number;
8899
+ declare function getSliderStep(_world: World, eid: Entity): number;
7702
8900
  /**
7703
8901
  * Sets the slider range.
7704
8902
  *
@@ -7719,10 +8917,11 @@ declare function setSliderStep(world: World, eid: Entity, step: number): void;
7719
8917
  /**
7720
8918
  * Gets the slider percentage (0-1).
7721
8919
  *
8920
+ * @param _world - The ECS world
7722
8921
  * @param eid - The entity ID
7723
8922
  * @returns Value as percentage
7724
8923
  */
7725
- declare function getSliderPercentage(eid: Entity): number;
8924
+ declare function getSliderPercentage(_world: World, eid: Entity): number;
7726
8925
  /**
7727
8926
  * Sets the slider value from a percentage.
7728
8927
  *
@@ -7764,10 +8963,11 @@ declare function setSliderToMax(world: World, eid: Entity): void;
7764
8963
  /**
7765
8964
  * Gets the slider orientation.
7766
8965
  *
8966
+ * @param _world - The ECS world
7767
8967
  * @param eid - The entity ID
7768
8968
  * @returns The orientation
7769
8969
  */
7770
- declare function getSliderOrientation(eid: Entity): SliderOrientationType;
8970
+ declare function getSliderOrientation(_world: World, eid: Entity): SliderOrientationType;
7771
8971
  /**
7772
8972
  * Sets the slider orientation.
7773
8973
  *
@@ -7779,24 +8979,27 @@ declare function setSliderOrientation(world: World, eid: Entity, orientation: Sl
7779
8979
  /**
7780
8980
  * Checks if slider is horizontal.
7781
8981
  *
8982
+ * @param world - The ECS world
7782
8983
  * @param eid - The entity ID
7783
8984
  * @returns true if horizontal
7784
8985
  */
7785
- declare function isSliderHorizontal(eid: Entity): boolean;
8986
+ declare function isSliderHorizontal(world: World, eid: Entity): boolean;
7786
8987
  /**
7787
8988
  * Checks if slider is vertical.
7788
8989
  *
8990
+ * @param world - The ECS world
7789
8991
  * @param eid - The entity ID
7790
8992
  * @returns true if vertical
7791
8993
  */
7792
- declare function isSliderVertical(eid: Entity): boolean;
8994
+ declare function isSliderVertical(world: World, eid: Entity): boolean;
7793
8995
  /**
7794
8996
  * Gets whether the slider shows its value.
7795
8997
  *
8998
+ * @param _world - The ECS world
7796
8999
  * @param eid - The entity ID
7797
9000
  * @returns true if showing value
7798
9001
  */
7799
- declare function isShowingSliderValue(eid: Entity): boolean;
9002
+ declare function isShowingSliderValue(_world: World, eid: Entity): boolean;
7800
9003
  /**
7801
9004
  * Sets whether to show the slider value.
7802
9005
  *
@@ -7808,60 +9011,67 @@ declare function setShowSliderValue(world: World, eid: Entity, show: boolean): v
7808
9011
  /**
7809
9012
  * Sets the slider display configuration.
7810
9013
  *
9014
+ * @param world - The ECS world
7811
9015
  * @param eid - The entity ID
7812
9016
  * @param options - Display options
7813
9017
  */
7814
- declare function setSliderDisplay(eid: Entity, options: SliderDisplayOptions): void;
9018
+ declare function setSliderDisplay(world: World, eid: Entity, options: SliderDisplayOptions): void;
7815
9019
  /**
7816
9020
  * Gets the slider display configuration.
7817
9021
  *
9022
+ * @param world - The ECS world
7818
9023
  * @param eid - The entity ID
7819
9024
  * @returns Display configuration
7820
9025
  */
7821
- declare function getSliderDisplay(eid: Entity): SliderDisplay;
9026
+ declare function getSliderDisplay(world: World, eid: Entity): SliderDisplay;
7822
9027
  /**
7823
9028
  * Clears the slider display configuration.
7824
9029
  *
9030
+ * @param _world - The ECS world
7825
9031
  * @param eid - The entity ID
7826
9032
  */
7827
- declare function clearSliderDisplay(eid: Entity): void;
9033
+ declare function clearSliderDisplay(_world: World, eid: Entity): void;
7828
9034
  /**
7829
9035
  * Registers a callback for when the slider value changes.
7830
9036
  *
9037
+ * @param _world - The ECS world
7831
9038
  * @param eid - The entity ID
7832
9039
  * @param callback - The callback function
7833
9040
  * @returns Unsubscribe function
7834
9041
  *
7835
9042
  * @example
7836
9043
  * ```typescript
7837
- * const unsubscribe = onSliderChange(eid, (value) => {
9044
+ * const unsubscribe = onSliderChange(world, eid, (value) => {
7838
9045
  * console.log(`Value: ${value}`);
7839
9046
  * });
7840
9047
  * ```
7841
9048
  */
7842
- declare function onSliderChange(eid: Entity, callback: SliderChangeCallback): () => void;
9049
+ declare function onSliderChange(_world: World, eid: Entity, callback: SliderChangeCallback): () => void;
7843
9050
  /**
7844
9051
  * Registers a callback for when dragging starts.
7845
9052
  *
9053
+ * @param _world - The ECS world
7846
9054
  * @param eid - The entity ID
7847
9055
  * @param callback - The callback function
7848
9056
  * @returns Unsubscribe function
7849
9057
  */
7850
- declare function onSliderDragStart(eid: Entity, callback: () => void): () => void;
9058
+ declare function onSliderDragStart(_world: World, eid: Entity, callback: () => void): () => void;
7851
9059
  /**
7852
9060
  * Registers a callback for when dragging ends.
7853
9061
  *
9062
+ * @param _world - The ECS world
7854
9063
  * @param eid - The entity ID
7855
9064
  * @param callback - The callback function
7856
9065
  * @returns Unsubscribe function
7857
9066
  */
7858
- declare function onSliderDragEnd(eid: Entity, callback: () => void): () => void;
9067
+ declare function onSliderDragEnd(_world: World, eid: Entity, callback: () => void): () => void;
7859
9068
  /**
7860
9069
  * Clears all callbacks for a slider.
7861
9070
  *
9071
+ * @param _world - The ECS world
7862
9072
  * @param eid - The entity ID
7863
9073
  */
7864
- declare function clearSliderCallbacks(eid: Entity): void;
9074
+ declare function clearSliderCallbacks(_world: World, eid: Entity): void;
7865
9075
  /**
7866
9076
  * Action returned from key press handling.
7867
9077
  */
@@ -7896,11 +9106,12 @@ declare function handleSliderKeyPress(world: World, eid: Entity, key: string): S
7896
9106
  /**
7897
9107
  * Renders the slider as a string.
7898
9108
  *
9109
+ * @param _world - The ECS world
7899
9110
  * @param eid - The entity ID
7900
9111
  * @param width - The available width
7901
9112
  * @returns Rendered slider string
7902
9113
  */
7903
- declare function renderSliderString(eid: Entity, width: number): string;
9114
+ declare function renderSliderString(_world: World, eid: Entity, width: number): string;
7904
9115
  /**
7905
9116
  * Resets the slider store. Used for testing.
7906
9117
  */
@@ -8668,6 +9879,16 @@ interface TextInputStore {
8668
9879
  * Global text input store.
8669
9880
  */
8670
9881
  declare const textInputStore: TextInputStore;
9882
+ /**
9883
+ * Validation function type.
9884
+ * Returns true if the value is valid, false otherwise.
9885
+ * Can optionally return an error message string.
9886
+ */
9887
+ type ValidationFunction = (value: string) => boolean | string;
9888
+ /**
9889
+ * When to run validation.
9890
+ */
9891
+ type ValidationTiming = 'onChange' | 'onSubmit' | 'both';
8671
9892
  /**
8672
9893
  * Configuration for text input display and behavior.
8673
9894
  */
@@ -8682,6 +9903,10 @@ interface TextInputConfig {
8682
9903
  maxLength: number;
8683
9904
  /** Whether input supports multiple lines (for Textarea) */
8684
9905
  multiline: boolean;
9906
+ /** Optional validation function */
9907
+ validator?: ValidationFunction | undefined;
9908
+ /** When to run validation (default: 'both') */
9909
+ validationTiming?: ValidationTiming | undefined;
8685
9910
  }
8686
9911
  /**
8687
9912
  * Default censor character for password fields.
@@ -8873,10 +10098,11 @@ declare function clearTextInputError(world: World, eid: Entity): boolean;
8873
10098
  /**
8874
10099
  * Gets the cursor position.
8875
10100
  *
10101
+ * @param world - The ECS world
8876
10102
  * @param eid - Entity ID
8877
10103
  * @returns Cursor position
8878
10104
  */
8879
- declare function getCursorPos(eid: Entity): number;
10105
+ declare function getCursorPos(_world: World, eid: Entity): number;
8880
10106
  /**
8881
10107
  * Sets the cursor position.
8882
10108
  *
@@ -8896,10 +10122,11 @@ declare function moveCursor(world: World, eid: Entity, delta: number): void;
8896
10122
  /**
8897
10123
  * Gets the selection range.
8898
10124
  *
10125
+ * @param world - The ECS world
8899
10126
  * @param eid - Entity ID
8900
10127
  * @returns Selection range [start, end] or null if no selection
8901
10128
  */
8902
- declare function getSelection(eid: Entity): [number, number] | null;
10129
+ declare function getSelection(_world: World, eid: Entity): [number, number] | null;
8903
10130
  /**
8904
10131
  * Sets the selection range.
8905
10132
  *
@@ -8919,10 +10146,11 @@ declare function clearSelection(world: World, eid: Entity): void;
8919
10146
  /**
8920
10147
  * Checks if there is an active selection.
8921
10148
  *
10149
+ * @param world - The ECS world
8922
10150
  * @param eid - Entity ID
8923
10151
  * @returns true if there is a selection
8924
10152
  */
8925
- declare function hasSelection(eid: Entity): boolean;
10153
+ declare function hasSelection(world: World, eid: Entity): boolean;
8926
10154
  /**
8927
10155
  * Cursor display configuration.
8928
10156
  */
@@ -8947,10 +10175,11 @@ declare const DEFAULT_CURSOR_BLOCK_CHAR = "\u2588";
8947
10175
  /**
8948
10176
  * Gets the cursor configuration for a text input.
8949
10177
  *
10178
+ * @param world - The ECS world
8950
10179
  * @param eid - Entity ID
8951
10180
  * @returns Cursor configuration
8952
10181
  */
8953
- declare function getCursorConfig(eid: Entity): CursorConfig;
10182
+ declare function getCursorConfig(_world: World, eid: Entity): CursorConfig;
8954
10183
  /**
8955
10184
  * Options for setting cursor configuration.
8956
10185
  */
@@ -8967,26 +10196,28 @@ interface CursorConfigOptions {
8967
10196
  /**
8968
10197
  * Sets the cursor configuration for a text input.
8969
10198
  *
10199
+ * @param world - The ECS world
8970
10200
  * @param eid - Entity ID
8971
10201
  * @param options - Cursor configuration options
8972
10202
  *
8973
10203
  * @example
8974
10204
  * ```typescript
8975
- * setCursorConfig(textbox, {
10205
+ * setCursorConfig(world, textbox, {
8976
10206
  * blink: true,
8977
10207
  * blinkIntervalMs: 500,
8978
10208
  * lineChar: '|',
8979
10209
  * });
8980
10210
  * ```
8981
10211
  */
8982
- declare function setCursorConfig(eid: Entity, options: CursorConfigOptions): void;
10212
+ declare function setCursorConfig(world: World, eid: Entity, options: CursorConfigOptions): void;
8983
10213
  /**
8984
10214
  * Gets the cursor visual mode (line or block).
8985
10215
  *
10216
+ * @param world - The ECS world
8986
10217
  * @param eid - Entity ID
8987
10218
  * @returns Cursor mode (0=line, 1=block)
8988
10219
  */
8989
- declare function getCursorMode(eid: Entity): CursorModeType;
10220
+ declare function getCursorMode(_world: World, eid: Entity): CursorModeType;
8990
10221
  /**
8991
10222
  * Sets the cursor visual mode.
8992
10223
  *
@@ -9012,10 +10243,11 @@ declare function toggleCursorMode(world: World, eid: Entity): CursorModeType;
9012
10243
  /**
9013
10244
  * Checks if cursor blink is enabled for a text input.
9014
10245
  *
10246
+ * @param world - The ECS world
9015
10247
  * @param eid - Entity ID
9016
10248
  * @returns true if blink is enabled
9017
10249
  */
9018
- declare function isCursorBlinkEnabled(eid: Entity): boolean;
10250
+ declare function isCursorBlinkEnabled(_world: World, eid: Entity): boolean;
9019
10251
  /**
9020
10252
  * Enables or disables cursor blink.
9021
10253
  *
@@ -9028,9 +10260,10 @@ declare function setCursorBlinkEnabled(world: World, eid: Entity, enabled: boole
9028
10260
  * Resets the cursor blink timer.
9029
10261
  * Call this when the user types or moves the cursor to show cursor immediately.
9030
10262
  *
10263
+ * @param world - The ECS world
9031
10264
  * @param eid - Entity ID
9032
10265
  */
9033
- declare function resetCursorBlink(eid: Entity): void;
10266
+ declare function resetCursorBlink(_world: World, eid: Entity): void;
9034
10267
  /**
9035
10268
  * Gets whether the cursor should be visible at the current time.
9036
10269
  * Takes into account the blink state and timing.
@@ -9051,10 +10284,11 @@ declare function isCursorVisible(world: World, eid: Entity): boolean;
9051
10284
  /**
9052
10285
  * Gets the character to display for the cursor based on mode.
9053
10286
  *
10287
+ * @param world - The ECS world
9054
10288
  * @param eid - Entity ID
9055
10289
  * @returns Cursor character
9056
10290
  */
9057
- declare function getCursorChar(eid: Entity): string;
10291
+ declare function getCursorChar(world: World, eid: Entity): string;
9058
10292
  /**
9059
10293
  * Gets the display text for rendering, with cursor character inserted.
9060
10294
  * Handles password masking and placeholder display.
@@ -9079,10 +10313,11 @@ declare function getCursorDisplayText(world: World, eid: Entity, value: string):
9079
10313
  * Gets selection range for rendering with highlight.
9080
10314
  * Returns the start and end positions normalized (start < end).
9081
10315
  *
10316
+ * @param world - The ECS world
9082
10317
  * @param eid - Entity ID
9083
10318
  * @returns Normalized selection range or null
9084
10319
  */
9085
- declare function getNormalizedSelection(eid: Entity): {
10320
+ declare function getNormalizedSelection(world: World, eid: Entity): {
9086
10321
  start: number;
9087
10322
  end: number;
9088
10323
  } | null;
@@ -9100,130 +10335,155 @@ interface TextInputConfigOptions {
9100
10335
  maxLength?: number;
9101
10336
  /** Whether input supports multiple lines (for Textarea) */
9102
10337
  multiline?: boolean;
10338
+ /** Optional validation function */
10339
+ validator?: ValidationFunction;
10340
+ /** When to run validation (default: 'both') */
10341
+ validationTiming?: ValidationTiming;
9103
10342
  }
9104
10343
  /**
9105
10344
  * Sets the text input configuration.
9106
10345
  *
10346
+ * @param world - The ECS world
9107
10347
  * @param eid - Entity ID
9108
10348
  * @param options - Configuration options
9109
10349
  *
9110
10350
  * @example
9111
10351
  * ```typescript
9112
- * setTextInputConfig(textbox, {
10352
+ * setTextInputConfig(world, textbox, {
9113
10353
  * secret: true,
9114
10354
  * censor: '*',
9115
10355
  * maxLength: 20,
10356
+ * validator: (value) => value.length >= 8 || 'Password must be at least 8 characters',
10357
+ * validationTiming: 'onSubmit',
9116
10358
  * });
9117
10359
  * ```
9118
10360
  */
9119
- declare function setTextInputConfig(eid: Entity, options: TextInputConfigOptions): void;
10361
+ declare function setTextInputConfig(_world: World, eid: Entity, options: TextInputConfigOptions): void;
9120
10362
  /**
9121
10363
  * Gets the text input configuration.
9122
10364
  *
10365
+ * @param world - The ECS world
9123
10366
  * @param eid - Entity ID
9124
10367
  * @returns Configuration or defaults
9125
10368
  */
9126
- declare function getTextInputConfig(eid: Entity): TextInputConfig;
10369
+ declare function getTextInputConfig(_world: World, eid: Entity): TextInputConfig;
9127
10370
  /**
9128
10371
  * Checks if the text input is in secret/password mode.
9129
10372
  *
10373
+ * @param world - The ECS world
9130
10374
  * @param eid - Entity ID
9131
10375
  * @returns true if in secret mode
9132
10376
  */
9133
- declare function isSecretMode(eid: Entity): boolean;
10377
+ declare function isSecretMode(world: World, eid: Entity): boolean;
9134
10378
  /**
9135
10379
  * Gets the censor character for password display.
9136
10380
  *
10381
+ * @param world - The ECS world
9137
10382
  * @param eid - Entity ID
9138
10383
  * @returns Censor character
9139
10384
  */
9140
- declare function getCensorChar(eid: Entity): string;
10385
+ declare function getCensorChar(world: World, eid: Entity): string;
9141
10386
  /**
9142
10387
  * Gets the placeholder text.
9143
10388
  *
10389
+ * @param world - The ECS world
9144
10390
  * @param eid - Entity ID
9145
10391
  * @returns Placeholder text
9146
10392
  */
9147
- declare function getPlaceholder(eid: Entity): string;
10393
+ declare function getPlaceholder(world: World, eid: Entity): string;
9148
10394
  /**
9149
10395
  * Gets the maximum input length.
9150
10396
  *
10397
+ * @param world - The ECS world
9151
10398
  * @param eid - Entity ID
9152
10399
  * @returns Maximum length (0 = unlimited)
9153
10400
  */
9154
- declare function getMaxLength(eid: Entity): number;
10401
+ declare function getMaxLength(world: World, eid: Entity): number;
9155
10402
  /**
9156
10403
  * Checks if the text input is multiline (textarea mode).
9157
10404
  *
10405
+ * @param world - The ECS world
9158
10406
  * @param eid - Entity ID
9159
10407
  * @returns true if multiline
9160
10408
  */
9161
- declare function isMultiline(eid: Entity): boolean;
10409
+ declare function isMultiline(world: World, eid: Entity): boolean;
9162
10410
  /**
9163
10411
  * Masks a string for password display.
9164
10412
  *
10413
+ * @param world - The ECS world
9165
10414
  * @param eid - Entity ID
9166
10415
  * @param value - The value to mask
9167
10416
  * @returns Masked string
9168
10417
  *
9169
10418
  * @example
9170
10419
  * ```typescript
9171
- * const masked = maskValue(textbox, 'secret');
10420
+ * const masked = maskValue(world, textbox, 'secret');
9172
10421
  * // Returns '******'
9173
10422
  * ```
9174
10423
  */
9175
- declare function maskValue(eid: Entity, value: string): string;
10424
+ declare function maskValue(world: World, eid: Entity, value: string): string;
9176
10425
  /**
9177
10426
  * Registers a callback for value changes.
9178
10427
  *
10428
+ * @param world - The ECS world
9179
10429
  * @param eid - Entity ID
9180
10430
  * @param callback - Function to call on value change
9181
10431
  * @returns Unsubscribe function
9182
10432
  */
9183
- declare function onTextInputChange(eid: Entity, callback: (value: string) => void): () => void;
10433
+ declare function onTextInputChange(_world: World, eid: Entity, callback: (value: string) => void): () => void;
9184
10434
  /**
9185
10435
  * Registers a callback for submit events.
9186
10436
  *
10437
+ * @param world - The ECS world
9187
10438
  * @param eid - Entity ID
9188
10439
  * @param callback - Function to call on submit
9189
10440
  * @returns Unsubscribe function
9190
10441
  */
9191
- declare function onTextInputSubmit(eid: Entity, callback: (value: string) => void): () => void;
10442
+ declare function onTextInputSubmit(_world: World, eid: Entity, callback: (value: string) => void): () => void;
9192
10443
  /**
9193
10444
  * Registers a callback for cancel events.
9194
10445
  *
10446
+ * @param world - The ECS world
9195
10447
  * @param eid - Entity ID
9196
10448
  * @param callback - Function to call on cancel
9197
10449
  * @returns Unsubscribe function
9198
10450
  */
9199
- declare function onTextInputCancel(eid: Entity, callback: () => void): () => void;
10451
+ declare function onTextInputCancel(_world: World, eid: Entity, callback: () => void): () => void;
9200
10452
  /**
9201
10453
  * Emits a value change event.
10454
+ * Runs validation if validationTiming is 'onChange' or 'both'.
9202
10455
  *
10456
+ * @param world - The ECS world
9203
10457
  * @param eid - Entity ID
9204
10458
  * @param value - New value
9205
10459
  */
9206
- declare function emitValueChange(eid: Entity, value: string): void;
10460
+ declare function emitValueChange(world: World, eid: Entity, value: string): void;
9207
10461
  /**
9208
10462
  * Emits a submit event.
10463
+ * Runs validation if validationTiming is 'onSubmit' or 'both'.
10464
+ * If validation fails, the submit event is not emitted.
9209
10465
  *
10466
+ * @param world - The ECS world
9210
10467
  * @param eid - Entity ID
9211
10468
  * @param value - Submitted value
10469
+ * @returns true if submitted, false if validation failed
9212
10470
  */
9213
- declare function emitSubmit(eid: Entity, value: string): void;
10471
+ declare function emitSubmit(world: World, eid: Entity, value: string): boolean;
9214
10472
  /**
9215
10473
  * Emits a cancel event.
9216
10474
  *
10475
+ * @param world - The ECS world
9217
10476
  * @param eid - Entity ID
9218
10477
  */
9219
- declare function emitCancel(eid: Entity): void;
10478
+ declare function emitCancel(_world: World, eid: Entity): void;
9220
10479
  /**
9221
10480
  * Clears all callbacks for a text input.
9222
10481
  * Call this when destroying a text input entity.
9223
10482
  *
10483
+ * @param world - The ECS world
9224
10484
  * @param eid - Entity ID
9225
10485
  */
9226
- declare function clearTextInputCallbacks(eid: Entity): void;
10486
+ declare function clearTextInputCallbacks(_world: World, eid: Entity): void;
9227
10487
  /**
9228
10488
  * Handles a key press on a text input.
9229
10489
  * Returns information about what action to take.
@@ -9232,6 +10492,7 @@ declare function clearTextInputCallbacks(eid: Entity): void;
9232
10492
  * @param eid - Entity ID
9233
10493
  * @param keyName - Name of the key pressed
9234
10494
  * @param currentValue - Current text value
10495
+ * @param ctrl - Whether Ctrl key is pressed (default: false)
9235
10496
  * @returns Action to take or null if not handled
9236
10497
  *
9237
10498
  * @example
@@ -9244,7 +10505,7 @@ declare function clearTextInputCallbacks(eid: Entity): void;
9244
10505
  * }
9245
10506
  * ```
9246
10507
  */
9247
- declare function handleTextInputKeyPress(world: World, eid: Entity, keyName: string, currentValue: string): TextInputAction | null;
10508
+ declare function handleTextInputKeyPress(world: World, eid: Entity, keyName: string, currentValue: string, ctrl?: boolean): TextInputAction | null;
9248
10509
  /**
9249
10510
  * Text input action types.
9250
10511
  */
@@ -9267,6 +10528,22 @@ type TextInputAction = {
9267
10528
  } | {
9268
10529
  type: 'newline';
9269
10530
  position: number;
10531
+ } | {
10532
+ type: 'moveWordLeft';
10533
+ text: string;
10534
+ position: number;
10535
+ } | {
10536
+ type: 'moveWordRight';
10537
+ text: string;
10538
+ position: number;
10539
+ } | {
10540
+ type: 'deleteWordBackward';
10541
+ text: string;
10542
+ position: number;
10543
+ } | {
10544
+ type: 'deleteWordForward';
10545
+ text: string;
10546
+ position: number;
9270
10547
  };
9271
10548
 
9272
10549
  /**
@@ -9981,6 +11258,156 @@ declare function resetTimerStore(): void;
9981
11258
  */
9982
11259
  declare function updateTimers(world: World, dt: number): readonly Entity[];
9983
11260
 
11261
+ /**
11262
+ * UserData component for storing arbitrary application-specific data on entities.
11263
+ * Provides blessed-compatible _data, __, and $ aliases.
11264
+ * @module components/userData
11265
+ */
11266
+
11267
+ /**
11268
+ * UserData component marker using SoA.
11269
+ * The actual data is stored in a separate Map for flexibility.
11270
+ *
11271
+ * This marker simply tracks which entities have user data.
11272
+ * The data itself is stored in userDataStore.
11273
+ *
11274
+ * @example
11275
+ * ```typescript
11276
+ * import { UserData, setUserData, getUserData } from 'blecsd';
11277
+ *
11278
+ * // Set user data
11279
+ * setUserData(world, entity, { score: 100, level: 5 });
11280
+ *
11281
+ * // Get user data
11282
+ * const data = getUserData(world, entity);
11283
+ * console.log(data?.score); // 100
11284
+ * ```
11285
+ */
11286
+ declare const UserData: {
11287
+ /** Marker to indicate entity has user data (1 = has data) */
11288
+ hasData: Uint8Array<ArrayBuffer>;
11289
+ };
11290
+ /**
11291
+ * User data object type.
11292
+ * Can store any key-value pairs.
11293
+ */
11294
+ type UserDataObject = Record<string, unknown>;
11295
+ /**
11296
+ * Sets user data for an entity.
11297
+ * Adds the UserData component if not already present.
11298
+ *
11299
+ * @param world - The ECS world
11300
+ * @param eid - The entity ID
11301
+ * @param data - User data object to store
11302
+ * @returns The entity ID for chaining
11303
+ *
11304
+ * @example
11305
+ * ```typescript
11306
+ * import { setUserData } from 'blecsd';
11307
+ *
11308
+ * setUserData(world, entity, {
11309
+ * customId: 'player1',
11310
+ * inventory: ['sword', 'shield'],
11311
+ * stats: { hp: 100, mp: 50 }
11312
+ * });
11313
+ * ```
11314
+ */
11315
+ declare function setUserData(world: World, eid: Entity, data: UserDataObject): Entity;
11316
+ /**
11317
+ * Gets user data for an entity.
11318
+ * Returns undefined if the entity has no user data.
11319
+ *
11320
+ * @param world - The ECS world
11321
+ * @param eid - The entity ID
11322
+ * @returns User data object or undefined
11323
+ *
11324
+ * @example
11325
+ * ```typescript
11326
+ * import { getUserData } from 'blecsd';
11327
+ *
11328
+ * const data = getUserData(world, entity);
11329
+ * if (data) {
11330
+ * console.log('Custom data:', data);
11331
+ * }
11332
+ * ```
11333
+ */
11334
+ declare function getUserData(world: World, eid: Entity): UserDataObject | undefined;
11335
+ /**
11336
+ * Gets or creates user data for an entity.
11337
+ * If the entity has no user data, creates an empty object.
11338
+ *
11339
+ * @param world - The ECS world
11340
+ * @param eid - The entity ID
11341
+ * @returns User data object (existing or new)
11342
+ *
11343
+ * @example
11344
+ * ```typescript
11345
+ * import { getOrCreateUserData } from 'blecsd';
11346
+ *
11347
+ * const data = getOrCreateUserData(world, entity);
11348
+ * data.customProperty = 'value'; // Safe to assign
11349
+ * ```
11350
+ */
11351
+ declare function getOrCreateUserData(world: World, eid: Entity): UserDataObject;
11352
+ /**
11353
+ * Checks if an entity has user data.
11354
+ *
11355
+ * @param world - The ECS world
11356
+ * @param eid - The entity ID
11357
+ * @returns true if the entity has user data
11358
+ *
11359
+ * @example
11360
+ * ```typescript
11361
+ * import { hasUserData } from 'blecsd';
11362
+ *
11363
+ * if (hasUserData(world, entity)) {
11364
+ * console.log('Entity has custom data');
11365
+ * }
11366
+ * ```
11367
+ */
11368
+ declare function hasUserData(world: World, eid: Entity): boolean;
11369
+ /**
11370
+ * Removes user data from an entity.
11371
+ *
11372
+ * @param world - The ECS world
11373
+ * @param eid - The entity ID
11374
+ * @returns true if data was removed, false if entity had no data
11375
+ *
11376
+ * @example
11377
+ * ```typescript
11378
+ * import { removeUserData } from 'blecsd';
11379
+ *
11380
+ * removeUserData(world, entity);
11381
+ * ```
11382
+ */
11383
+ declare function removeUserData(world: World, eid: Entity): boolean;
11384
+ /**
11385
+ * Clears all user data from all entities.
11386
+ * Useful for testing or when destroying the world.
11387
+ *
11388
+ * @example
11389
+ * ```typescript
11390
+ * import { clearAllUserData } from 'blecsd';
11391
+ *
11392
+ * clearAllUserData();
11393
+ * ```
11394
+ */
11395
+ declare function clearAllUserData(): void;
11396
+ /**
11397
+ * Gets the total number of entities with user data.
11398
+ * Useful for debugging and metrics.
11399
+ *
11400
+ * @returns Number of entities with user data
11401
+ *
11402
+ * @example
11403
+ * ```typescript
11404
+ * import { getUserDataCount } from 'blecsd';
11405
+ *
11406
+ * console.log(`${getUserDataCount()} entities have user data`);
11407
+ * ```
11408
+ */
11409
+ declare function getUserDataCount(): number;
11410
+
9984
11411
  /**
9985
11412
  * Velocity and Acceleration components for entity movement.
9986
11413
  * @module components/velocity
@@ -10296,4 +11723,4 @@ declare function applyVelocityToEntity(eid: Entity, deltaTime: number): void;
10296
11723
  */
10297
11724
  declare function updateEntityMovement(world: World, eid: Entity, deltaTime: number): void;
10298
11725
 
10299
- export { AUTO_DIMENSION, Acceleration, type AccelerationData, Animation, type AnimationData, type AnimationDefinition, AnimationDirection, type AnimationFrame, type AnimationOptions, BACKGROUND_COPY_CHUNK_SIZE, BLOCK_SPINNER_CHARS, BRAILLE_SPINNER_CHARS, BUTTON_STATE_MACHINE_CONFIG, Behavior, type BehaviorData, type BehaviorDirection, type BehaviorOptions, BehaviorState, type BehaviorStateValue, BehaviorType, type BehaviorTypeValue, type ButtonEvent, type ButtonState, type ButtonStore, CHECKBOX_STATE_MACHINE_CONFIG, Camera, type CameraBounds, type CameraData, type CameraOptions, type CheckboxDisplay, type CheckboxDisplayOptions, type CheckboxEvent, type CheckboxState, type CheckboxStore, Content, type ContentData, type ContentOptions, type CopyProgress, type CursorConfig, type CursorConfigOptions, CursorMode, type CursorModeType, CursorShape, type CursorShapeValue, type CustomBehaviorCallback, DEFAULT_CENSOR_CHAR, DEFAULT_CHECKED_CHAR, DEFAULT_CLOSED_INDICATOR, DEFAULT_CURSOR_BLINK_MS, DEFAULT_CURSOR_BLOCK_CHAR, DEFAULT_CURSOR_LINE_CHAR, DEFAULT_EMPTY_CHAR, DEFAULT_EMPTY_CHAR_VERTICAL, DEFAULT_FILL_CHAR$1 as DEFAULT_FILL_CHAR, DEFAULT_FILL_CHAR_VERTICAL$1 as DEFAULT_FILL_CHAR_VERTICAL, DEFAULT_FOCUS_BG, DEFAULT_FOCUS_FG, DEFAULT_HOVER_BG, DEFAULT_HOVER_FG, DEFAULT_OPEN_INDICATOR, DEFAULT_PLACEHOLDER, DEFAULT_RADIO_SELECTED_CHAR, DEFAULT_RADIO_UNSELECTED_CHAR, DEFAULT_SELECTED_MARK, DEFAULT_SEPARATOR, DEFAULT_SHADOW_CHAR, DEFAULT_SHADOW_COLOR, DEFAULT_SHADOW_OFFSET_X, DEFAULT_SHADOW_OFFSET_Y, DEFAULT_SHADOW_OPACITY, DEFAULT_FILL_BG as DEFAULT_SLIDER_FILL_BG, DEFAULT_FILL_CHAR as DEFAULT_SLIDER_FILL_CHAR, DEFAULT_FILL_CHAR_VERTICAL as DEFAULT_SLIDER_FILL_CHAR_VERTICAL, DEFAULT_FILL_FG as DEFAULT_SLIDER_FILL_FG, DEFAULT_SPINNER_CHARS, DEFAULT_SPINNER_INTERVAL, DEFAULT_THUMB_BG, DEFAULT_THUMB_CHAR, DEFAULT_THUMB_FG, DEFAULT_TRACK_BG, DEFAULT_TRACK_CHAR, DEFAULT_TRACK_CHAR_VERTICAL, DEFAULT_TRACK_FG, DEFAULT_UNCHECKED_CHAR, DEFAULT_VIEWPORT_HEIGHT, DEFAULT_VIEWPORT_WIDTH, DOTS_SPINNER_CHARS, type DimensionConstraints, type DimensionValue, Dimensions, type DimensionsData, Focusable, type FocusableData, type FocusableOptions, type FormFieldValue, type FormResetCallback, type FormStore, type FormSubmitCallback, type FormValues, Health, type HealthData, type HealthOptions, Hierarchy, type HierarchyData, InputBuffer, type InputBufferData, Interactive, type InteractiveData, type InteractiveOptions, KeyboardInput, type KeyboardInputData, type KeyboardInputOptions, Label, type LabelData, type LabelOptions, LabelPosition, type LineSelectionInfo, ModifierFlags, MouseButtons, MouseInput, type MouseInputData, type MouseInputOptions, NULL_ENTITY, Padding, type PaddingData, type PaddingOptions, type PatrolRoute, type PlayAnimationOptions, type Point2D, Position, type PositionData, type ProgressBarDisplay, type ProgressBarDisplayOptions, type ProgressBarStore, type ProgressChangeCallback, type ProgressCompleteCallback, ProgressOrientation, RADIO_BUTTON_STATE_MACHINE_CONFIG, type RadioButtonDisplay, type RadioButtonDisplayOptions, type RadioButtonEvent, type RadioButtonState, type RadioButtonStore, type RadioSelectCallback, type RadioSetStore, SELECT_STATE_MACHINE_CONFIG, SHADOW_CHAR_DARK, SHADOW_CHAR_LIGHT, SHADOW_CHAR_MEDIUM, SLIDER_STATE_MACHINE_CONFIG, SYNC_COPY_LINE_LIMIT, Screen, type ScreenCursor, type ScreenData, type ScreenOptions, type SelectAction, type SelectCallback, type SelectDisplay, type SelectDisplayOptions, type SelectEvent, type SelectOption, type SelectState, type SelectStore, type SelectionMode, SelectionModeSchema, type SelectionPosition, SelectionPositionSchema, type SelectionRange, Shadow, type ShadowData, type ShadowOptions, type ShadowPosition, type SliderAction, type SliderChangeCallback, type SliderDisplay, type SliderDisplayOptions, type SliderEvent, SliderOrientation, type SliderOrientationType, type SliderState, type SliderStore, Spinner, type SpinnerData, type SpinnerOptions, Sprite, type SpriteCell, type SpriteData, type SpriteFrame, type SpriteSheetData, type SpriteSheetOptions, StateMachineStore, TEXT_INPUT_STATE_MACHINE_CONFIG, TIMER_INFINITE, TextAlign, type TextInputAction, type TextInputConfig, type TextInputConfigOptions, type TextInputEvent, type TextInputState, type TextInputStore, type TextSelectionState, TextVAlign, Timer, type TimerCallback, type TimerCompleteCallback, type TimerData, type TimerOptions, type TraversalCallback, Velocity, type VelocityData, type VelocityOptions, addSpinner, addVelocity, advanceSpinnerFrame, animationStore, appendChild, appendContent, applyAccelerationToEntity, applyFrictionToEntity, applyVelocityToEntity, attachButtonBehavior, attachCheckboxBehavior, attachFormBehavior, attachProgressBarBehavior, attachRadioButtonBehavior, attachRadioSetBehavior, attachSelectBehavior, attachSliderBehavior, attachStateMachine, attachTextInputBehavior, autoRegisterFields, blendShadowColor, blur, blurSlider, blurTextInput, bringToFront, buttonStore, calculateShadowPositions, canSendEvent, centerCameraOn, checkCheckbox, checkboxStore, clampSpeedForEntity, clearAcceleration, clearButtonCallbacks, clearCameraBounds, clearCheckboxCallbacks, clearCheckboxDisplay, clearContent, clearFormCallbacks, clearInputBufferSelection, clearInteractionState, clearInvulnerable, clearKeyboardInput, clearMouseInput, clearProgressBarCallbacks, clearProgressBarDisplay, clearRadioButtonDisplay, clearRadioSetCallbacks, clearSelectCallbacks, clearSelectDisplay, clearSelection$1 as clearSelectSelection, clearSelection, clearSliderCallbacks, clearSliderDisplay, clearTextInputCallbacks, clearTextInputError, clearTextSelection, clearTimerCallbacks, closeSelect, completeProgress, computeChaseDirection, computeFleeDirection, computePatrolDirection, contentStore, createBackgroundCopy, createSelectionState, damage, decodePercentage, decrementProgress, decrementSlider, deselectRadioButton, destroyScreen, detach, detachStateMachine, disableButton, disableCheckbox, disableInput, disableKeys, disableMouse, disableRadioButton, disableSelect, disableShadow, disableSlider, disableTextInput, emitCancel, emitSubmit, emitValueChange, enableButton, enableCheckbox, enableInput, enableKeys, enableMouse, enableRadioButton, enableSelect, enableShadow, enableSlider, enableTextInput, encodePercentage, endEditingTextInput, executeCustomBehavior, focus, focusNext, focusNextField, focusPrev, focusPrevField, focusSlider, focusTextInput, forAncestors, forDescendants, formStore, getAcceleration, getAncestors, getAnimation, getAnimationByName, getAnimationData, getAnimationIdByName, getBehavior, getBehaviorState, getBehaviorTarget, getBehaviorType, getButtonState, getCamera, getCameraPosition, getCameraTarget, getCensorChar, getCheckboxChar, getCheckboxDisplay, getCheckboxState, getChildAt, getChildIndex, getChildren, getCommonAncestor, getContent, getContentData, getContentHash, getContentLength, getCurrentFrame, getCurrentPatrolPoint, getCursorChar, getCursorConfig, getCursorDisplayText, getCursorMode, getCursorPos, getDepth, getDescendants, getDimensions, getEntityAnimation, getEntitySpriteSheet, getFieldName, getFieldValue, getFirstChild, getFocusEffect, getFocusable, getFocusedEntity, getFormFields, getFormTabOrder, getFormValues, getHealth, getHealthPercent, getHierarchy, getHighlightedIndex, getHorizontalPadding, getInputBuffer, getInputBufferText, getInteractive, getKeyboardInput, getLabel, getLabelPosition, getLabelText, getLastChild, getLineSelectionInfo, getMaxLength, getMouseInput, getNextSibling, getNormalizedRange, getNormalizedSelection, getOptionAt, getOptionCount, getPadding, getParent, getPatrolRoute, getPlaceholder, getPosition, getPrevSibling, getPreviousState, getProgress, getProgressBarDisplay, getProgressEmptyChar, getProgressFillChar, getProgressMax, getProgressMin, getProgressOrientation, getProgressPercentage, getRadioButtonChar, getRadioButtonDisplay, getRadioButtonState, getRadioButtonsInSet, getRadioSet, getRadioValue, getResolvedHeight, getResolvedWidth, getRoot, getScreen, getScreenCursor, getScreenData, getScreenFocus, getScreenHover, getScreenSize, getSelectDisplay, getSelectIndicator, getSelectOptions, getSelectState, getSelectedValue as getSelectValue, getSelectedButton, getSelectedIndex, getSelectedLabel, getSelectedLinesInViewport, getSelectedOption, getSelectedText, getSelectedValue$1 as getSelectedValue, getSelection, getSelectionDirtyRanges, getSelectionLineCount, getSelectionState, getShadow, getShadowChar, getShadowColor, getShadowOffset, getShadowOpacity, getSiblings, getSliderDisplay, getSliderMax, getSliderMin, getSliderOrientation, getSliderPercentage, getSliderState, getSliderStep, getSliderValue, getSpeed, getSpinnerChar, getSpinnerData, getSprite, getSpriteIdByName, getSpriteSheet, getSpriteSheetByName, getState, getStateAge, getTabIndex, getTabOrder, getText, getTextInputConfig, getTextInputState, getTimer, getTimerProgress, getVelocity, getVerticalPadding, getZIndex, handleButtonKeyPress, handleCheckboxKeyPress, handleFormKeyPress, handleRadioButtonKeyPress, handleSelectKeyPress, handleSliderKeyPress, handleTextInputKeyPress, hasAcceleration, hasActiveSelection, hasAncestor, hasAnimation, hasBehavior, hasCamera, hasContent, hasDescendant, hasDimensions, hasFocusable, hasHealth, hasHierarchy, hasInputBuffer, hasInputEnabled, hasInteractive, hasKeyboardInput, hasKeysEnabled, hasLabel, hasLabelText, hasMouseEnabled, hasMouseInput, hasPadding, hasPaddingValue, hasPosition, hasScreen, hasScreenSingleton, hasSelection, hasSelectionState, hasShadow, hasSpinner, hasSprite, hasStateMachine, hasTimer, hasVelocity, heal, highlightNext, highlightPrev, incrementProgress, incrementSlider, initScreenComponent, inputBufferStore, insertAfter, insertAt, insertBefore, isAbsolute, isAnimationPlaying, isAreaInView, isAutoPadding, isBehaviorActive, isBehaviorCompleted, isBehaviorWaiting, isButton, isButtonDisabled, isButtonFocused, isButtonHovered, isButtonInState, isButtonPressed, isCameraBounded, isCheckbox, isCheckboxDisabled, isCheckboxInState, isChecked, isClickable, isCursorBlinkEnabled, isCursorVisible, isDead, isDraggable, isFocusable, isFocused, isFollowingTarget, isForm, isFormKeysEnabled, isFormSubmitOnEnter, isFullUnicode, isHoverable, isHovered, isInState, isInTabOrder, isInView, isInvulnerable, isKeyable, isLeaf, isLineSelected, isMultiline, isParsingTags, isPercentage, isPressed, isProgressBar, isProgressComplete, isRadioButton, isRadioButtonDisabled, isRadioButtonInState, isRadioSelected, isRadioSet, isRoot, isScreen, isSecretMode, isSelect, isSelectDisabled, isSelectInState, isSelectOpen, isShadowBlending, isShadowEnabled, isShowingPercentage, isShowingSliderValue, isSlider, isSliderDisabled, isSliderDragging, isSliderFocused, isSliderHorizontal, isSliderInState, isSliderVertical, isTextInput, isTextInputDisabled, isTextInputEditing, isTextInputError, isTextInputFocused, isTextInputInState, isTextWrapped, isTimerComplete, isTimerRunning, isUnchecked, labelStore, makeFocusable, maskValue, moveBackward, moveBy, moveCameraBy, moveCursor, moveForward, nextFrame, normalizeZIndices, onButtonPress, onCheckboxChange, onFormReset, onFormSubmit, onProgressChange, onProgressComplete, onRadioSelect, onSelectChange, onSelectClose, onSelectOpen, onSliderChange, onSliderDragEnd, onSliderDragStart, onTextInputCancel, onTextInputChange, onTextInputSubmit, onTimerComplete, onTimerFire, openSelect, packModifiers, pauseAnimation, pauseTimer, playAnimation, playAnimationByName, prepend, pressButton, prevFrame, progressBarStore, radioButtonStore, radioSetStore, recordClick, registerAnimation, registerFormField, registerScreenSingleton, registerSelectionState, registerSprite, removeAcceleration, removeAnimation, removeBehavior, removeCamera, removeChild, removeHealth, removeInputBuffer, removeKeyboardInput, removeLabel, removeMouseInput, removeSelectionState, removeShadow, removeSpinner, removeSprite, removeTimer, removeVelocity, renderProgressString, renderSliderString, resetAnimationStore, resetBehaviorStore, resetButtonStore, resetCheckboxStore, resetContentStore, resetCursorBlink, resetFocusState, resetForm, resetFormStore, resetLabelStore, resetProgress, resetProgressBarStore, resetRadioButtonStore, resetScreenSingleton, resetSelectStore, resetSelectionStore, resetSliderStore, resetSpinner, resetSpinnerStore, resetSpriteStore, resetTextInputStore, resetTimer, resetTimerStore, resizeScreen, resumeAnimation, resumeTimer, screenToWorld, selectAll, selectHighlighted, selectLine, selectLineRange, selectOptionByIndex, selectOptionByValue, selectRadioButton, selectRadioByValue, selectStore, sendButtonEvent, sendCheckboxEvent, sendEvent, sendRadioButtonEvent, sendSelectEvent, sendSliderEvent, sendTextInputEvent, sendToBack, setAbsolute, setAcceleration, setAnimationDirection, setAnimationLoop, setAnimationSpeed, setAutoPadding, setBehavior, setBehaviorSpeed, setBehaviorTarget, setCamera, setCameraBounds, setCameraDeadZone, setCameraPosition, setCameraTarget, setChase, setCheckboxDisplay, setChecked, setClickable, setConstraints, setContent, setCurrentHealth, setCursorBlinkEnabled, setCursorConfig, setCursorMode, setCursorPos, setCustomBehavior, setDetectionRange, setDimensions, setDraggable, setFieldValue, setFlee, setFocusEffect, setFocusable, setFocusedState, setFrame, setFriction, setFullUnicode, setHealth, setHighlightedIndex, setHoverable, setHovered, setIdle, setInputBuffer, setInputBufferSelection, setInputBufferText, setInteractive, setInvulnerable, setKeyable, setKeyboardInput, setLabel, setLabelOffset, setLabelPosition, setMaxHealth, setMaxSpeed, setMouseInput, setPadding, setPaddingAll, setPaddingHV, setParent, setParseTags, setPatrol, setPosition, setPressed, setProgress, setProgressBarDisplay, setProgressOrientation, setProgressRange, setRadioButtonDisplay, setRadioSet, setRadioValue, setRegen, setScreenCursor, setScreenCursorShape, setScreenCursorVisible, setScreenFocus, setScreenHover, setSelectDisplay, setSelectOptions, setSelection, setSelectionMode, setShadow, setShadowBlend, setShadowChar, setShadowColor, setShadowOffset, setShadowOpacity, setShowPercentage, setShowSliderValue, setShrink, setSliderDisplay, setSliderFromPercentage, setSliderOrientation, setSliderRange, setSliderStep, setSliderToMax, setSliderToMin, setSliderValue, setSpinnerFrames, setSpinnerInterval, setSprite, setSpriteByName, setTabIndex, setText, setTextAlign, setTextInputConfig, setTextInputError, setTextVAlign, setTextWrap, setTimer, setVelocity, setVelocityOptions, setZIndex, shouldShrink, sliderStore, snapshotSelection, spriteStore, startDragging, startEditingTextInput, startSelection, startTimer, stopAnimation, stopDragging, stopEntity, stopTimer, submitForm, swapZIndex, textInputStore, toggleCheckbox, toggleCursorMode, toggleSelect, toggleShadow, uncheckCheckbox, unpackModifiers, unregisterAnimation, unregisterFormField, unregisterSprite, updateAnimationEntity, updateBehaviorTimer, updateCameraFollow, updateEntityMovement, updateHealth, updateSelection, updateSpinner, updateStateAge, updateTimers, worldToScreen };
11726
+ export { Acceleration, type AccelerationData, Animation, type AnimationData, type AnimationDefinition, AnimationDirection, type AnimationFrame, type AnimationOptions, BACKGROUND_COPY_CHUNK_SIZE, BLOCK_SPINNER_CHARS, BRAILLE_SPINNER_CHARS, BUTTON_STATE_MACHINE_CONFIG, Behavior, type BehaviorData, type BehaviorDirection, type BehaviorOptions, BehaviorState, type BehaviorStateValue, BehaviorType, type BehaviorTypeValue, type ButtonEvent, type ButtonState, type ButtonStore, CHECKBOX_STATE_MACHINE_CONFIG, Camera, type CameraBounds, type CameraData, type CameraOptions, type CheckboxDisplay, type CheckboxDisplayOptions, type CheckboxEvent, type CheckboxState, type CheckboxStore, Content, type ContentData, type ContentOptions, type CopyProgress, type CursorConfig, type CursorConfigOptions, CursorMode, type CursorModeType, CursorShape, type CursorShapeValue, type CustomBehaviorCallback, DEFAULT_CENSOR_CHAR, DEFAULT_CHECKED_CHAR, DEFAULT_CLOSED_INDICATOR, DEFAULT_CURSOR_BLINK_MS, DEFAULT_CURSOR_BLOCK_CHAR, DEFAULT_CURSOR_LINE_CHAR, DEFAULT_DISABLED_FG, DEFAULT_EMPTY_CHAR, DEFAULT_EMPTY_CHAR_VERTICAL, DEFAULT_FILL_CHAR$1 as DEFAULT_FILL_CHAR, DEFAULT_FILL_CHAR_VERTICAL$1 as DEFAULT_FILL_CHAR_VERTICAL, DEFAULT_FOCUS_BG, DEFAULT_FOCUS_FG, DEFAULT_HOVER_BG, DEFAULT_HOVER_FG, DEFAULT_ITEM_BG, DEFAULT_ITEM_FG, DEFAULT_OPEN_INDICATOR, DEFAULT_PLACEHOLDER, DEFAULT_RADIO_SELECTED_CHAR, DEFAULT_RADIO_UNSELECTED_CHAR, DEFAULT_THUMB_CHAR$1 as DEFAULT_SCROLLBAR_THUMB_CHAR, DEFAULT_TRACK_CHAR$1 as DEFAULT_SCROLLBAR_TRACK_CHAR, DEFAULT_SELECTED_BG, DEFAULT_SELECTED_FG, DEFAULT_SELECTED_MARK, DEFAULT_SELECTED_PREFIX, DEFAULT_SEPARATOR, DEFAULT_SHADOW_CHAR, DEFAULT_SHADOW_COLOR, DEFAULT_SHADOW_OFFSET_X, DEFAULT_SHADOW_OFFSET_Y, DEFAULT_SHADOW_OPACITY, DEFAULT_FILL_BG as DEFAULT_SLIDER_FILL_BG, DEFAULT_FILL_CHAR as DEFAULT_SLIDER_FILL_CHAR, DEFAULT_FILL_CHAR_VERTICAL as DEFAULT_SLIDER_FILL_CHAR_VERTICAL, DEFAULT_FILL_FG as DEFAULT_SLIDER_FILL_FG, DEFAULT_SPINNER_CHARS, DEFAULT_SPINNER_INTERVAL, DEFAULT_THUMB_BG, DEFAULT_THUMB_CHAR, DEFAULT_THUMB_COLOR, DEFAULT_THUMB_FG, DEFAULT_TRACK_BG, DEFAULT_TRACK_CHAR, DEFAULT_TRACK_CHAR_H, DEFAULT_TRACK_CHAR_VERTICAL, DEFAULT_TRACK_COLOR, DEFAULT_TRACK_FG, DEFAULT_UNCHECKED_CHAR, DEFAULT_UNSELECTED_PREFIX, DEFAULT_VIEWPORT_HEIGHT, DEFAULT_VIEWPORT_WIDTH, DOTS_SPINNER_CHARS, Focusable, type FocusableData, type FocusableOptions, type FormFieldValue, type FormResetCallback, type FormStore, type FormSubmitCallback, type FormValues, Health, type HealthData, type HealthOptions, Hierarchy, type HierarchyData, InputBuffer, type InputBufferData, Interactive, type InteractiveData, type InteractiveOptions, KeyboardInput, type KeyboardInputData, type KeyboardInputOptions, LIST_STATE_MACHINE_CONFIG, Label, type LabelData, type LabelOptions, LabelPosition, type LineSelectionInfo, ListAction, ListDisplay, ListDisplayOptions, ListEvent, ListItem, ListScrollInfo, ListSelectCallback, ListState, ListStore, ModifierFlags, MouseButtons, MouseInput, type MouseInputData, type MouseInputOptions, NULL_ENTITY, Padding, type PaddingData, type PaddingOptions, type PatrolRoute, type PlayAnimationOptions, type Point2D, Position, type PositionData, type PositionKeyword, type ProgressBarDisplay, type ProgressBarDisplayOptions, type ProgressBarStore, type ProgressChangeCallback, type ProgressCompleteCallback, ProgressOrientation, RADIO_BUTTON_STATE_MACHINE_CONFIG, type RadioButtonDisplay, type RadioButtonDisplayOptions, type RadioButtonEvent, type RadioButtonState, type RadioButtonStore, type RadioSelectCallback, type RadioSetStore, SELECT_STATE_MACHINE_CONFIG, SHADOW_CHAR_DARK, SHADOW_CHAR_LIGHT, SHADOW_CHAR_MEDIUM, SLIDER_STATE_MACHINE_CONFIG, SYNC_COPY_LINE_LIMIT, Screen, type ScreenCursor, type ScreenData, type ScreenOptions, Scrollbar, type ScrollbarData, type ScrollbarOptions, type ScrollbarRenderCell, type SelectAction, type SelectCallback, type SelectDisplay, type SelectDisplayOptions, type SelectEvent, type SelectOption, type SelectState, type SelectStore, type SelectionMode, SelectionModeSchema, type SelectionPosition, SelectionPositionSchema, type SelectionRange, Shadow, type ShadowData, type ShadowOptions, type ShadowPosition, type SliderAction, type SliderChangeCallback, type SliderDisplay, type SliderDisplayOptions, type SliderEvent, SliderOrientation, type SliderOrientationType, type SliderState, type SliderStore, Spinner, type SpinnerData, type SpinnerOptions, Sprite, type SpriteCell, type SpriteData, type SpriteFrame, type SpriteSheetData, type SpriteSheetOptions, StateMachineStore, TEXT_INPUT_STATE_MACHINE_CONFIG, TIMER_INFINITE, TextAlign, type TextInputAction, type TextInputConfig, type TextInputConfigOptions, type TextInputEvent, type TextInputState, type TextInputStore, type TextSelectionState, TextVAlign, Timer, type TimerCallback, type TimerCompleteCallback, type TimerData, type TimerOptions, type TraversalCallback, UserData, type UserDataObject, Velocity, type VelocityData, type VelocityOptions, activateSelected, addItem, addSpinner, addVelocity, advanceSpinnerFrame, animationStore, appendChild, appendContent, appendItems, appendToSearchQuery, applyAccelerationToEntity, applyFrictionToEntity, applyVelocityToEntity, attachButtonBehavior, attachCheckboxBehavior, attachFormBehavior, attachListBehavior, attachProgressBarBehavior, attachRadioButtonBehavior, attachRadioSetBehavior, attachSelectBehavior, attachSliderBehavior, attachStateMachine, attachTextInputBehavior, autoRegisterFields, backspaceSearchQuery, blendShadowColor, blur, blurList, blurSlider, blurTextInput, bringToFront, buttonStore, calculateHorizontalScrollbar, calculateShadowPositions, calculateVerticalScrollbar, canSendEvent, centerCameraOn, checkCheckbox, checkNeedsLoad, checkboxStore, clampSpeedForEntity, clearAcceleration, clearAllUserData, clearButtonCallbacks, clearCameraBounds, clearCheckboxCallbacks, clearCheckboxDisplay, clearContent, clearFormCallbacks, clearInputBufferSelection, clearInteractionState, clearInvulnerable, clearItems, clearKeyboardInput, clearLazyLoadCallback, clearListCallbacks, clearListDisplay, clearListFilter, clearSelection$2 as clearListSelection, clearMouseInput, clearProgressBarCallbacks, clearProgressBarDisplay, clearRadioButtonDisplay, clearRadioSetCallbacks, clearSearchQuery, clearSelectCallbacks, clearSelectDisplay, clearSelection$1 as clearSelectSelection, clearSelection, clearSliderCallbacks, clearSliderDisplay, clearTextInputCallbacks, clearTextInputError, clearTextSelection, clearTimerCallbacks, closeSelect, completeProgress, computeChaseDirection, computeFleeDirection, computePatrolDirection, contentStore, createBackgroundCopy, createSelectionState, damage, decrementProgress, decrementSlider, deselectAllItems, deselectRadioButton, destroyScreen, detach, detachStateMachine, disable, disableButton, disableCheckbox, disableInput, disableKeys, disableList, disableMouse, disableRadioButton, disableScrollbar, disableSelect, disableShadow, disableSlider, disableTextInput, emitCancel, emitSubmit, emitValueChange, enable, enableButton, enableCheckbox, enableInput, enableKeys, enableList, enableMouse, enableRadioButton, enableScrollbar, enableSelect, enableShadow, enableSlider, enableTextInput, endEditingTextInput, endListSearch, ensureVisible, executeCustomBehavior, findAndSelectByText, findNextMatch, focus, focusList, focusNext, focusNextField, focusPrev, focusPrevField, focusSlider, focusTextInput, forAncestors, forDescendants, formStore, getAcceleration, getAncestors, getAnimation, getAnimationByName, getAnimationData, getAnimationIdByName, getBehavior, getBehaviorState, getBehaviorTarget, getBehaviorType, getButtonState, getCamera, getCameraPosition, getCameraTarget, getCensorChar, getCheckboxChar, getCheckboxDisplay, getCheckboxState, getChildAt, getChildIndex, getChildren, getCommonAncestor, getContent, getContentData, getContentHash, getContentLength, getCurrentFrame, getCurrentPatrolPoint, getCursorChar, getCursorConfig, getCursorDisplayText, getCursorMode, getCursorPos, getDepth, getDescendants, getEntityAnimation, getEntitySpriteSheet, getFieldName, getFieldValue, getFilteredItems, getFirstChild, getFirstVisible, getFocusEffect, getFocusable, getFocusedEntity, getFormFields, getFormTabOrder, getFormValues, getHealth, getHealthPercent, getHierarchy, getHighlightedIndex, getHorizontalPadding, getInputBuffer, getInputBufferText, getInteractive, getItem, getItemCount, getItems, getKeyboardInput, getLabel, getLabelPosition, getLabelText, getLastChild, getLazyLoadCallback, getLineSelectionInfo, getListDisplay, getListSearchQuery, getSelectedIndex$1 as getListSelectedIndex, getListState, getLoadingPlaceholder, getMaxLength, getMouseInput, getMultiSelected, getNextSibling, getNormalizedRange, getNormalizedSelection, getOptionAt, getOptionCount, getOrCreateUserData, getPadding, getParent, getPatrolRoute, getPlaceholder, getPosition, getPrevSibling, getPreviousState, getProgress, getProgressBarDisplay, getProgressEmptyChar, getProgressFillChar, getProgressMax, getProgressMin, getProgressOrientation, getProgressPercentage, getRadioButtonChar, getRadioButtonDisplay, getRadioButtonState, getRadioButtonsInSet, getRadioSet, getRadioValue, getRoot, getScreen, getScreenCursor, getScreenData, getScreenFocus, getScreenHover, getScreenSize, getScrollInfo, getScrollbar, getSelectDisplay, getSelectIndicator, getSelectOptions, getSelectState, getSelectedValue as getSelectValue, getSelectedButton, getSelectedIndex, getSelectedItem, getSelectedLabel, getSelectedLinesInViewport, getSelectedOption, getSelectedText, getSelectedValue$1 as getSelectedValue, getSelection, getSelectionDirtyRanges, getSelectionLineCount, getSelectionState, getShadow, getShadowChar, getShadowColor, getShadowOffset, getShadowOpacity, getSiblings, getSliderDisplay, getSliderMax, getSliderMin, getSliderOrientation, getSliderPercentage, getSliderState, getSliderStep, getSliderValue, getSpeed, getSpinnerChar, getSpinnerData, getSprite, getSpriteIdByName, getSpriteSheet, getSpriteSheetByName, getState, getStateAge, getTabIndex, getTabOrder, getText, getTextInputConfig, getTextInputState, getTimer, getTimerProgress, getTotalCount, getUserData, getUserDataCount, getVelocity, getVerticalPadding, getVisibleCount, getVisibleItems, getZIndex, handleButtonKeyPress, handleCheckboxKeyPress, handleFormKeyPress, handleListKeyPress, handleRadioButtonKeyPress, handleSelectKeyPress, handleSliderKeyPress, handleTextInputKeyPress, hasAcceleration, hasActiveSelection, hasAncestor, hasAnimation, hasBehavior, hasCamera, hasContent, hasDescendant, hasFocusable, hasHealth, hasHierarchy, hasInputBuffer, hasInputEnabled, hasInteractive, hasKeyboardInput, hasKeysEnabled, hasLabel, hasLabelText, hasMouseEnabled, hasMouseInput, hasPadding, hasPaddingValue, hasPosition, hasScreen, hasScreenSingleton, hasScrollbar, hasSelection, hasSelectionState, hasShadow, hasSpinner, hasSprite, hasStateMachine, hasTimer, hasUserData, hasVelocity, heal, highlightNext, highlightPrev, incrementProgress, incrementSlider, initScreenComponent, inputBufferStore, insertAfter, insertAt, insertBefore, isAbsolute, isAnimationPlaying, isAreaInView, isAutoPadding, isBehaviorActive, isBehaviorCompleted, isBehaviorWaiting, isButton, isButtonDisabled, isButtonFocused, isButtonHovered, isButtonInState, isButtonPressed, isCameraBounded, isCheckbox, isCheckboxDisabled, isCheckboxInState, isChecked, isClickable, isCursorBlinkEnabled, isCursorVisible, isDead, isDraggable, isEnabled, isFocusable, isFocused, isFollowingTarget, isForm, isFormKeysEnabled, isFormSubmitOnEnter, isFullUnicode, isHoverable, isHovered, isInState, isInTabOrder, isInView, isInvulnerable, isItemMultiSelected, isKeyable, isLeaf, isLineSelected, isList, isListDisabled, isListFocused, isListInState, isListInteractive, isListKeysEnabled, isListLoading, isListMouseEnabled, isListMultiSelect, isListSearchEnabled, isListSearching, isMultiline, isParsingTags, isPressed, isProgressBar, isProgressComplete, isRadioButton, isRadioButtonDisabled, isRadioButtonInState, isRadioSelected, isRadioSet, isRoot, isScreen, isScrollbarEnabled, isSecretMode, isSelect, isSelectDisabled, isSelectInState, isSelectOpen, isShadowBlending, isShadowEnabled, isShowingPercentage, isShowingSliderValue, isSlider, isSliderDisabled, isSliderDragging, isSliderFocused, isSliderHorizontal, isSliderInState, isSliderVertical, isTextInput, isTextInputDisabled, isTextInputEditing, isTextInputError, isTextInputFocused, isTextInputInState, isTextWrapped, isTimerComplete, isTimerRunning, isUnchecked, labelStore, listStore, loadItems, makeFocusable, maskValue, moveBackward, moveBy, moveCameraBy, moveCursor, moveForward, nextFrame, normalizeZIndices, onButtonPress, onCheckboxChange, onFormReset, onFormSubmit, onListActivate, onListCancel, onListScroll, onListSearchChange, onListSelect, onProgressChange, onProgressComplete, onRadioSelect, onSelectChange, onSelectClose, onSelectOpen, onSliderChange, onSliderDragEnd, onSliderDragStart, onTextInputCancel, onTextInputChange, onTextInputSubmit, onTimerComplete, onTimerFire, openSelect, packModifiers, pauseAnimation, pauseTimer, playAnimation, playAnimationByName, prepend, pressButton, prevFrame, progressBarStore, radioButtonStore, radioSetStore, recordClick, registerAnimation, registerBuiltinComponentNames, registerFormField, registerScreenSingleton, registerSelectionState, registerSprite, removeAcceleration, removeAnimation, removeBehavior, removeCamera, removeChild, removeHealth, removeInputBuffer, removeItem, removeKeyboardInput, removeLabel, removeMouseInput, removeSelectionState, removeShadow, removeSpinner, removeSprite, removeTimer, removeUserData, removeVelocity, renderListItems, renderProgressString, renderSliderString, resetAnimationStore, resetBehaviorStore, resetButtonStore, resetCheckboxStore, resetContentStore, resetCursorBlink, resetFocusState, resetForm, resetFormStore, resetLabelStore, resetListStore, resetProgress, resetProgressBarStore, resetRadioButtonStore, resetScreenSingleton, resetSelectStore, resetSelectionStore, resetSliderStore, resetSpinner, resetSpinnerStore, resetSpriteStore, resetTextInputStore, resetTimer, resetTimerStore, resizeScreen, resumeAnimation, resumeTimer, screenToWorld, scrollPage, selectAll, selectAllItems, selectByValue, selectFirst, selectHighlighted, selectLast, selectLine, selectLineRange, selectNext, selectOptionByIndex, selectOptionByValue, selectPrev, selectRadioButton, selectRadioByValue, selectStore, sendButtonEvent, sendCheckboxEvent, sendEvent, sendListEvent, sendRadioButtonEvent, sendSelectEvent, sendSliderEvent, sendTextInputEvent, sendToBack, setAbsolute, setAcceleration, setAnimationDirection, setAnimationLoop, setAnimationSpeed, setAutoPadding, setBehavior, setBehaviorSpeed, setBehaviorTarget, setCamera, setCameraBounds, setCameraDeadZone, setCameraPosition, setCameraTarget, setChase, setCheckboxDisplay, setChecked, setClickable, setContent, setCurrentHealth, setCursorBlinkEnabled, setCursorConfig, setCursorMode, setCursorPos, setCustomBehavior, setDetectionRange, setDraggable, setFieldValue, setFirstVisible, setFlee, setFocusEffect, setFocusable, setFocusedState, setFrame, setFriction, setFullUnicode, setHealth, setHighlightedIndex, setHoverable, setHovered, setIdle, setInputBuffer, setInputBufferSelection, setInputBufferText, setInteractive, setInvulnerable, setItems, setKeyable, setKeyboardInput, setLabel, setLabelOffset, setLabelPosition, setLazyLoadCallback, setListDisplay, setListFilter, setListInteractive, setListKeys, setListLoading, setListMouse, setListMultiSelect, setListSearchEnabled, setListSearchQuery, setSelectedIndex as setListSelectedIndex, setLoadingPlaceholder, setMaxHealth, setMaxSpeed, setMouseInput, setPadding, setPaddingAll, setPaddingHV, setParent, setParseTags, setPatrol, setPosition, setPositionKeyword, setPositionPercent, setPressed, setProgress, setProgressBarDisplay, setProgressOrientation, setProgressRange, setRadioButtonDisplay, setRadioSet, setRadioValue, setRegen, setScreenCursor, setScreenCursorShape, setScreenCursorVisible, setScreenFocus, setScreenHover, setScrollbar, setScrollbarChars, setScrollbarColors, setSelectDisplay, setSelectOptions, setSelection, setSelectionMode, setShadow, setShadowBlend, setShadowChar, setShadowColor, setShadowOffset, setShadowOpacity, setShowPercentage, setShowSliderValue, setSliderDisplay, setSliderFromPercentage, setSliderOrientation, setSliderRange, setSliderStep, setSliderToMax, setSliderToMin, setSliderValue, setSpinnerFrames, setSpinnerInterval, setSprite, setSpriteByName, setTabIndex, setText, setTextAlign, setTextInputConfig, setTextInputError, setTextVAlign, setTextWrap, setTimer, setTotalCount, setUserData, setVelocity, setVelocityOptions, setVisibleCount, setZIndex, shouldShowHorizontalScrollbar, shouldShowVerticalScrollbar, sliderStore, snapshotSelection, spriteStore, startDragging, startEditingTextInput, startListSearch, startSelection, startTimer, stopAnimation, stopDragging, stopEntity, stopTimer, submitForm, swapZIndex, textInputStore, toggleCheckbox, toggleCursorMode, toggleMultiSelect, toggleSelect, toggleShadow, triggerListCancel, uncheckCheckbox, unpackModifiers, unregisterAnimation, unregisterFormField, unregisterSprite, updateAnimationEntity, updateBehaviorTimer, updateCameraFollow, updateEntityMovement, updateHealth, updateItem, updateSelection, updateSpinner, updateStateAge, updateTimers, worldToScreen };