ttpg-darrell 1.0.39 → 1.0.40

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 (230) hide show
  1. package/build/cjs/lib/event/throttle-click-handler.d.ts +1 -1
  2. package/build/cjs/lib/event/throttle-click-handler.js +1 -1
  3. package/build/cjs/lib/find/find.d.ts +3 -0
  4. package/build/cjs/lib/find/find.js +31 -0
  5. package/build/cjs/lib/find/find.js.map +1 -1
  6. package/build/cjs/test.js +12 -0
  7. package/build/cjs/test.js.map +1 -0
  8. package/build/esm/lib/find/find.d.ts +3 -0
  9. package/build/esm/lib/find/find.js +31 -0
  10. package/build/esm/lib/find/find.js.map +1 -1
  11. package/package.json +1 -1
  12. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js +0 -6
  13. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js.map +0 -1
  14. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation.d.ts +0 -7
  15. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation.js +0 -27
  16. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation.js.map +0 -1
  17. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.d.ts +0 -1
  18. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js +0 -4
  19. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js.map +0 -1
  20. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation.d.ts +0 -4
  21. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation.js +0 -20
  22. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation.js.map +0 -1
  23. package/build/module_type_should_override_this/index.d.ts +0 -54
  24. package/build/module_type_should_override_this/index.js +0 -55
  25. package/build/module_type_should_override_this/index.js.map +0 -1
  26. package/build/module_type_should_override_this/lib/adjacency/adjacency.d.ts +0 -61
  27. package/build/module_type_should_override_this/lib/adjacency/adjacency.js +0 -212
  28. package/build/module_type_should_override_this/lib/adjacency/adjacency.js.map +0 -1
  29. package/build/module_type_should_override_this/lib/broadcast/broadcast.d.ts +0 -9
  30. package/build/module_type_should_override_this/lib/broadcast/broadcast.js +0 -42
  31. package/build/module_type_should_override_this/lib/broadcast/broadcast.js.map +0 -1
  32. package/build/module_type_should_override_this/lib/bug-workarounds/bug-card-holder-assignment.d.ts +0 -8
  33. package/build/module_type_should_override_this/lib/bug-workarounds/bug-card-holder-assignment.js +0 -10
  34. package/build/module_type_should_override_this/lib/bug-workarounds/bug-card-holder-assignment.js.map +0 -1
  35. package/build/module_type_should_override_this/lib/bug-workarounds/bug-unique-cards.d.ts +0 -8
  36. package/build/module_type_should_override_this/lib/bug-workarounds/bug-unique-cards.js +0 -10
  37. package/build/module_type_should_override_this/lib/bug-workarounds/bug-unique-cards.js.map +0 -1
  38. package/build/module_type_should_override_this/lib/card-util/card-util.d.ts +0 -45
  39. package/build/module_type_should_override_this/lib/card-util/card-util.js +0 -173
  40. package/build/module_type_should_override_this/lib/card-util/card-util.js.map +0 -1
  41. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-card.d.ts +0 -17
  42. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-card.js +0 -36
  43. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-card.js.map +0 -1
  44. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-deck.d.ts +0 -19
  45. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-deck.js +0 -42
  46. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-deck.js.map +0 -1
  47. package/build/module_type_should_override_this/lib/context-menu/leave-seat.d.ts +0 -19
  48. package/build/module_type_should_override_this/lib/context-menu/leave-seat.js +0 -47
  49. package/build/module_type_should_override_this/lib/context-menu/leave-seat.js.map +0 -1
  50. package/build/module_type_should_override_this/lib/data-store/data-store.d.ts +0 -104
  51. package/build/module_type_should_override_this/lib/data-store/data-store.js +0 -392
  52. package/build/module_type_should_override_this/lib/data-store/data-store.js.map +0 -1
  53. package/build/module_type_should_override_this/lib/dice-group/dice-group-testp.d.ts +0 -1
  54. package/build/module_type_should_override_this/lib/dice-group/dice-group-testp.js +0 -37
  55. package/build/module_type_should_override_this/lib/dice-group/dice-group-testp.js.map +0 -1
  56. package/build/module_type_should_override_this/lib/dice-group/dice-group.d.ts +0 -83
  57. package/build/module_type_should_override_this/lib/dice-group/dice-group.js +0 -247
  58. package/build/module_type_should_override_this/lib/dice-group/dice-group.js.map +0 -1
  59. package/build/module_type_should_override_this/lib/error-handler/bugsplat-remote-reporter.d.ts +0 -21
  60. package/build/module_type_should_override_this/lib/error-handler/bugsplat-remote-reporter.js +0 -54
  61. package/build/module_type_should_override_this/lib/error-handler/bugsplat-remote-reporter.js.map +0 -1
  62. package/build/module_type_should_override_this/lib/error-handler/error-batcher.d.ts +0 -11
  63. package/build/module_type_should_override_this/lib/error-handler/error-batcher.js +0 -50
  64. package/build/module_type_should_override_this/lib/error-handler/error-batcher.js.map +0 -1
  65. package/build/module_type_should_override_this/lib/error-handler/error-handler.d.ts +0 -43
  66. package/build/module_type_should_override_this/lib/error-handler/error-handler.js +0 -234
  67. package/build/module_type_should_override_this/lib/error-handler/error-handler.js.map +0 -1
  68. package/build/module_type_should_override_this/lib/error-handler/error-handler.testp.d.ts +0 -4
  69. package/build/module_type_should_override_this/lib/error-handler/error-handler.testp.js +0 -13
  70. package/build/module_type_should_override_this/lib/error-handler/error-handler.testp.js.map +0 -1
  71. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.d.ts +0 -30
  72. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.js +0 -99
  73. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.js.map +0 -1
  74. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.testp.d.ts +0 -1
  75. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.testp.js +0 -13
  76. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.testp.js.map +0 -1
  77. package/build/module_type_should_override_this/lib/event/throttle-click-handler.d.ts +0 -9
  78. package/build/module_type_should_override_this/lib/event/throttle-click-handler.js +0 -24
  79. package/build/module_type_should_override_this/lib/event/throttle-click-handler.js.map +0 -1
  80. package/build/module_type_should_override_this/lib/event/triggerable-multicast-delegate.d.ts +0 -30
  81. package/build/module_type_should_override_this/lib/event/triggerable-multicast-delegate.js +0 -53
  82. package/build/module_type_should_override_this/lib/event/triggerable-multicast-delegate.js.map +0 -1
  83. package/build/module_type_should_override_this/lib/facing/facing.d.ts +0 -4
  84. package/build/module_type_should_override_this/lib/facing/facing.js +0 -15
  85. package/build/module_type_should_override_this/lib/facing/facing.js.map +0 -1
  86. package/build/module_type_should_override_this/lib/find/find.d.ts +0 -19
  87. package/build/module_type_should_override_this/lib/find/find.js +0 -152
  88. package/build/module_type_should_override_this/lib/find/find.js.map +0 -1
  89. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name-obj.d.ts +0 -1
  90. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name-obj.js +0 -10
  91. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name-obj.js.map +0 -1
  92. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name.d.ts +0 -19
  93. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name.js +0 -101
  94. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name.js.map +0 -1
  95. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container-obj.d.ts +0 -1
  96. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container-obj.js +0 -5
  97. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container-obj.js.map +0 -1
  98. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container.d.ts +0 -24
  99. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container.js +0 -91
  100. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container.js.map +0 -1
  101. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container-obj.d.ts +0 -1
  102. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container-obj.js +0 -4
  103. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container-obj.js.map +0 -1
  104. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container.d.ts +0 -43
  105. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container.js +0 -116
  106. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container.js.map +0 -1
  107. package/build/module_type_should_override_this/lib/game-object/garbage/simple-card-garbage-handler.d.ts +0 -20
  108. package/build/module_type_should_override_this/lib/game-object/garbage/simple-card-garbage-handler.js +0 -100
  109. package/build/module_type_should_override_this/lib/game-object/garbage/simple-card-garbage-handler.js.map +0 -1
  110. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-container-handler.d.ts +0 -16
  111. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-container-handler.js +0 -44
  112. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-container-handler.js.map +0 -1
  113. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-snap-point-handler.d.ts +0 -19
  114. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-snap-point-handler.js +0 -50
  115. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-snap-point-handler.js.map +0 -1
  116. package/build/module_type_should_override_this/lib/global/global-init.d.ts +0 -10
  117. package/build/module_type_should_override_this/lib/global/global-init.js +0 -20
  118. package/build/module_type_should_override_this/lib/global/global-init.js.map +0 -1
  119. package/build/module_type_should_override_this/lib/global/i-global.d.ts +0 -3
  120. package/build/module_type_should_override_this/lib/global/i-global.js +0 -2
  121. package/build/module_type_should_override_this/lib/global/i-global.js.map +0 -1
  122. package/build/module_type_should_override_this/lib/heap/heap.d.ts +0 -8
  123. package/build/module_type_should_override_this/lib/heap/heap.js +0 -109
  124. package/build/module_type_should_override_this/lib/heap/heap.js.map +0 -1
  125. package/build/module_type_should_override_this/lib/layout-objects/layout-objects.d.ts +0 -49
  126. package/build/module_type_should_override_this/lib/layout-objects/layout-objects.js +0 -257
  127. package/build/module_type_should_override_this/lib/layout-objects/layout-objects.js.map +0 -1
  128. package/build/module_type_should_override_this/lib/locale/locale.d.ts +0 -8
  129. package/build/module_type_should_override_this/lib/locale/locale.js +0 -48
  130. package/build/module_type_should_override_this/lib/locale/locale.js.map +0 -1
  131. package/build/module_type_should_override_this/lib/namespace-id/namespace-id.d.ts +0 -1
  132. package/build/module_type_should_override_this/lib/namespace-id/namespace-id.js +0 -2
  133. package/build/module_type_should_override_this/lib/namespace-id/namespace-id.js.map +0 -1
  134. package/build/module_type_should_override_this/lib/nsid/nsid.d.ts +0 -54
  135. package/build/module_type_should_override_this/lib/nsid/nsid.js +0 -86
  136. package/build/module_type_should_override_this/lib/nsid/nsid.js.map +0 -1
  137. package/build/module_type_should_override_this/lib/parse/parse-color.d.ts +0 -7
  138. package/build/module_type_should_override_this/lib/parse/parse-color.js +0 -43
  139. package/build/module_type_should_override_this/lib/parse/parse-color.js.map +0 -1
  140. package/build/module_type_should_override_this/lib/perf/perf.d.ts +0 -29
  141. package/build/module_type_should_override_this/lib/perf/perf.js +0 -93
  142. package/build/module_type_should_override_this/lib/perf/perf.js.map +0 -1
  143. package/build/module_type_should_override_this/lib/setup/abstract-setup.d.ts +0 -18
  144. package/build/module_type_should_override_this/lib/setup/abstract-setup.js +0 -22
  145. package/build/module_type_should_override_this/lib/setup/abstract-setup.js.map +0 -1
  146. package/build/module_type_should_override_this/lib/shuffle/shuffle.d.ts +0 -7
  147. package/build/module_type_should_override_this/lib/shuffle/shuffle.js +0 -26
  148. package/build/module_type_should_override_this/lib/shuffle/shuffle.js.map +0 -1
  149. package/build/module_type_should_override_this/lib/spawn/spawn.d.ts +0 -21
  150. package/build/module_type_should_override_this/lib/spawn/spawn.js +0 -116
  151. package/build/module_type_should_override_this/lib/spawn/spawn.js.map +0 -1
  152. package/build/module_type_should_override_this/lib/svg/svg-sparkline.d.ts +0 -12
  153. package/build/module_type_should_override_this/lib/svg/svg-sparkline.js +0 -40
  154. package/build/module_type_should_override_this/lib/svg/svg-sparkline.js.map +0 -1
  155. package/build/module_type_should_override_this/lib/turn-order/turn-order.d.ts +0 -51
  156. package/build/module_type_should_override_this/lib/turn-order/turn-order.js +0 -200
  157. package/build/module_type_should_override_this/lib/turn-order/turn-order.js.map +0 -1
  158. package/build/module_type_should_override_this/lib/ui/screen-test.d.ts +0 -1
  159. package/build/module_type_should_override_this/lib/ui/screen-test.js +0 -20
  160. package/build/module_type_should_override_this/lib/ui/screen-test.js.map +0 -1
  161. package/build/module_type_should_override_this/lib/ui-visibility/ui-visibility.d.ts +0 -17
  162. package/build/module_type_should_override_this/lib/ui-visibility/ui-visibility.js +0 -65
  163. package/build/module_type_should_override_this/lib/ui-visibility/ui-visibility.js.map +0 -1
  164. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter-locale.data.d.ts +0 -3
  165. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter-locale.data.js +0 -4
  166. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter-locale.data.js.map +0 -1
  167. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter.d.ts +0 -5
  168. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter.js +0 -25
  169. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter.js.map +0 -1
  170. package/build/module_type_should_override_this/lib/widget/confirm-button/confirm-button.d.ts +0 -2
  171. package/build/module_type_should_override_this/lib/widget/confirm-button/confirm-button.js +0 -3
  172. package/build/module_type_should_override_this/lib/widget/confirm-button/confirm-button.js.map +0 -1
  173. package/build/module_type_should_override_this/lib/widget/d6widget/d6widget.d.ts +0 -48
  174. package/build/module_type_should_override_this/lib/widget/d6widget/d6widget.js +0 -84
  175. package/build/module_type_should_override_this/lib/widget/d6widget/d6widget.js.map +0 -1
  176. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.d.ts +0 -35
  177. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.js +0 -109
  178. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.js.map +0 -1
  179. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.testp.d.ts +0 -1
  180. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.testp.js +0 -10
  181. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.testp.js.map +0 -1
  182. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-locale.data.d.ts +0 -3
  183. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-locale.data.js +0 -4
  184. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-locale.data.js.map +0 -1
  185. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.d.ts +0 -28
  186. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.js +0 -99
  187. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.js.map +0 -1
  188. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.testp.d.ts +0 -1
  189. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.testp.js +0 -10
  190. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.testp.js.map +0 -1
  191. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-locale.data.d.ts +0 -3
  192. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-locale.data.js +0 -5
  193. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-locale.data.js.map +0 -1
  194. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget-locale.data.d.ts +0 -3
  195. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget-locale.data.js +0 -4
  196. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget-locale.data.js.map +0 -1
  197. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.d.ts +0 -19
  198. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.js +0 -74
  199. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.js.map +0 -1
  200. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.testp.d.ts +0 -1
  201. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.testp.js +0 -5
  202. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.testp.js.map +0 -1
  203. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-clicked-widget.d.ts +0 -22
  204. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-clicked-widget.js +0 -136
  205. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-clicked-widget.js.map +0 -1
  206. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-wart.d.ts +0 -16
  207. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-wart.js +0 -7
  208. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-wart.js.map +0 -1
  209. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-widget.d.ts +0 -29
  210. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-widget.js +0 -131
  211. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-widget.js.map +0 -1
  212. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-locale.data.d.ts +0 -3
  213. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-locale.data.js +0 -13
  214. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-locale.data.js.map +0 -1
  215. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget-params.d.ts +0 -33
  216. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget-params.js +0 -6
  217. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget-params.js.map +0 -1
  218. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.d.ts +0 -25
  219. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.js +0 -99
  220. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.js.map +0 -1
  221. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.testp.d.ts +0 -1
  222. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.testp.js +0 -58
  223. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.testp.js.map +0 -1
  224. package/build/module_type_should_override_this/lib-ext/image-table.d.ts +0 -1
  225. package/build/module_type_should_override_this/lib-ext/image-table.js +0 -9
  226. package/build/module_type_should_override_this/lib-ext/image-table.js.map +0 -1
  227. package/build/module_type_should_override_this/locale.data.d.ts +0 -4
  228. package/build/module_type_should_override_this/locale.data.js +0 -5
  229. package/build/module_type_should_override_this/locale.data.js.map +0 -1
  230. /package/build/cjs/{lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.d.ts → test.d.ts} +0 -0
@@ -1,25 +0,0 @@
1
- import { Widget } from "@tabletop-playground/api";
2
- import { TurnOrder } from "../../turn-order/turn-order";
3
- import { TurnOrderWidgetParams } from "./turn-order-widget-params";
4
- /**
5
- * Display turn order, update when turn order changes.
6
- */
7
- export declare class TurnOrderWidget {
8
- private readonly _params;
9
- private readonly _turnOrder;
10
- private readonly _panel;
11
- private readonly _screenUI;
12
- private readonly _uiVisibility;
13
- private _turnEntryWidgets;
14
- private readonly _doUpdate;
15
- private readonly _toggleVisibilityActionName;
16
- private readonly _onCustomActionHandler;
17
- constructor(turnOrder: TurnOrder, params: TurnOrderWidgetParams);
18
- destroy(): void;
19
- getWidget(): Widget;
20
- update(): this;
21
- attachToScreen(): this;
22
- detach(): this;
23
- isVisibleTo(playerSlot: number): boolean;
24
- toggleVisibility(playerSlot: number): this;
25
- }
@@ -1,99 +0,0 @@
1
- import { ScreenUIElement, VerticalBox, globalEvents, world, } from "@tabletop-playground/api";
2
- import { locale } from "../../locale/locale";
3
- import { TurnEntryWidget } from "./turn-entry-widget";
4
- import { TurnOrder } from "../../turn-order/turn-order";
5
- import { TurnOrderWidgetDefaults, } from "./turn-order-widget-params";
6
- import { UiVisibility } from "../../ui-visibility/ui-visibility";
7
- /**
8
- * Display turn order, update when turn order changes.
9
- */
10
- export class TurnOrderWidget {
11
- constructor(turnOrder, params) {
12
- var _a, _b, _c;
13
- this._turnEntryWidgets = [];
14
- this._doUpdate = () => {
15
- this.update();
16
- };
17
- this._toggleVisibilityActionName = locale("turn-order.context-menu.toggle-visibility");
18
- this._onCustomActionHandler = (player, identifier) => {
19
- if (identifier === this._toggleVisibilityActionName) {
20
- this.toggleVisibility(player.getSlot());
21
- }
22
- };
23
- this._params = params;
24
- this._turnOrder = turnOrder;
25
- this._panel = new VerticalBox().setChildDistance(0);
26
- this._screenUI = new ScreenUIElement();
27
- const w = (_a = params.entryWidth) !== null && _a !== void 0 ? _a : TurnOrderWidgetDefaults.DEFAULT_ENTRY_WIDTH;
28
- const h = (_b = params.entryHeight) !== null && _b !== void 0 ? _b : TurnOrderWidgetDefaults.DEFAULT_ENTRY_HEIGHT;
29
- const reserveSlots = (_c = params.reserveSlots) !== null && _c !== void 0 ? _c : TurnOrderWidgetDefaults.DEFAULT_RESERVE_SLOTS;
30
- this._screenUI.anchorX = 1.1;
31
- this._screenUI.anchorY = -0.1;
32
- this._screenUI.positionX = 1;
33
- this._screenUI.relativePositionX = true;
34
- this._screenUI.relativePositionY = true;
35
- this._screenUI.height = h * reserveSlots + 1;
36
- this._screenUI.width = w;
37
- this._screenUI.widget = this.getWidget();
38
- this._uiVisibility = new UiVisibility(this._screenUI);
39
- TurnOrder.onTurnStateChanged.add(this._doUpdate);
40
- globalEvents.onPlayerJoined.add(this._doUpdate);
41
- globalEvents.onPlayerLeft.add(this._doUpdate);
42
- globalEvents.onPlayerSwitchedSlots.add(this._doUpdate);
43
- globalEvents.onCustomAction.add(this._onCustomActionHandler);
44
- world.removeCustomAction(this._toggleVisibilityActionName);
45
- world.addCustomAction(this._toggleVisibilityActionName);
46
- this.update();
47
- }
48
- destroy() {
49
- TurnOrder.onTurnStateChanged.remove(this._doUpdate);
50
- globalEvents.onPlayerJoined.remove(this._doUpdate);
51
- globalEvents.onPlayerLeft.remove(this._doUpdate);
52
- globalEvents.onPlayerSwitchedSlots.remove(this._doUpdate);
53
- globalEvents.onCustomAction.remove(this._onCustomActionHandler);
54
- }
55
- getWidget() {
56
- return this._panel;
57
- }
58
- update() {
59
- const order = this._turnOrder.getTurnOrder();
60
- // Only reset turn widgets if the number of turn entries changes.
61
- if (this._turnEntryWidgets.length !== order.length) {
62
- this._panel.removeAllChildren();
63
- for (const turnEnryWidget of this._turnEntryWidgets) {
64
- turnEnryWidget.destroy();
65
- }
66
- this._turnEntryWidgets = [];
67
- for (let i = 0; i < order.length; i++) {
68
- const turnEnryWidget = new TurnEntryWidget(this._params);
69
- this._turnEntryWidgets.push(turnEnryWidget);
70
- this._panel.addChild(turnEnryWidget.getWidget());
71
- }
72
- }
73
- // Update turn widgets.
74
- for (let i = 0; i < order.length; i++) {
75
- const playerSlot = order[i];
76
- const turnWidget = this._turnEntryWidgets[i];
77
- if (playerSlot && turnWidget) {
78
- turnWidget.update(this._turnOrder, playerSlot);
79
- }
80
- }
81
- return this;
82
- }
83
- attachToScreen() {
84
- world.addScreenUI(this._screenUI);
85
- return this;
86
- }
87
- detach() {
88
- world.removeScreenUIElement(this._screenUI);
89
- return this;
90
- }
91
- isVisibleTo(playerSlot) {
92
- return this._uiVisibility.isVisibleToPlayer(playerSlot);
93
- }
94
- toggleVisibility(playerSlot) {
95
- this._uiVisibility.togglePlayer(playerSlot);
96
- return this;
97
- }
98
- }
99
- //# sourceMappingURL=turn-order-widget.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"turn-order-widget.js","sour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AAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACpC,MAAM,UAAU,GAAuB,KAAK,CAAC,CAAC,CAAC,CAAC;YAChD,MAAM,UAAU,GACZ,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,UAAU,IAAI,UAAU,EAAE,CAAC;gBAC3B,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YACnD,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,cAAc;QACjB,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,MAAM;QACT,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,WAAW,CAAC,UAAkB;QACjC,OAAO,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC5D,CAAC;IAEM,gBAAgB,CAAC,UAAkB;QACtC,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -1,58 +0,0 @@
1
- // Resolution options are all 16/9 aspect ratio, but what about full screen?
2
- // Tests see window height is 720 when using the smallest option for screen resolution.
3
- import { Border, refObject } from "@tabletop-playground/api";
4
- import { ErrorHandler } from "../../error-handler/error-handler";
5
- import { TurnEntryWart } from "./turn-entry-wart";
6
- import { TurnOrder } from "../../turn-order/turn-order";
7
- import { TurnOrderWidget } from "./turn-order-widget";
8
- new ErrorHandler().init();
9
- console.log("--- TURN ORDER WIDGET TEST ---");
10
- const turnOrder = TurnOrder.getInstance("@test/test")
11
- .setTurnOrder([0, 1, 2, 3, 4, 5], "forward", 0)
12
- .setPassed(0, true);
13
- const w = 150 + 50;
14
- const h = 25;
15
- const turnOrderWidget = new TurnOrderWidget(turnOrder, {
16
- entryWidth: w,
17
- entryHeight: h,
18
- nameBox: {
19
- left: 50,
20
- width: 150,
21
- },
22
- margins: {
23
- left: 4,
24
- right: 4,
25
- top: 0,
26
- bottom: 0,
27
- },
28
- reserveSlots: 6,
29
- wartGenerators: [
30
- (turnEntryWidget) => {
31
- class MyWart extends TurnEntryWart {
32
- constructor(turnEntryWidget) {
33
- super();
34
- turnEntryWidget
35
- .getCanvas()
36
- .addChild(new Border().setColor([1, 0, 0, 1]), 5, 5, 15, 15);
37
- }
38
- destroy() { }
39
- update() { }
40
- }
41
- return new MyWart(turnEntryWidget);
42
- },
43
- ],
44
- togglePassed: true,
45
- customActions: [
46
- {
47
- name: "My action!",
48
- },
49
- ],
50
- onCustomAction: (player, identifier) => {
51
- console.log(`turn order custom action "${identifier}" by "${player.getName()}"`);
52
- },
53
- });
54
- turnOrderWidget.attachToScreen();
55
- refObject.onPrimaryAction.add(() => {
56
- turnOrder.nextTurn();
57
- });
58
- //# sourceMappingURL=turn-order-widget.testp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"turn-order-widget.testp.js","sourceRoot":"","sources":["../../../../../src/lib/widget/turn-order-widget/turn-order-widget.testp.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,uFAAuF;AAEvF,OAAO,EAAE,MAAM,EAAU,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,IAAI,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC;AAE1B,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAE9C,MAAM,SAAS,GAAG,SAAS,CA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AS,MAAM,CAAC,OAAO,EAAE,GAAG,CACtE,CAAC;IACN,CAAC;CACJ,CAAC,CAAC;AAEH,eAAe,CAAC,cAAc,EAAE,CAAC;AAEjC,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE;IAC/B,SAAS,CAAC,QAAQ,EAAE,CAAC;AACzB,CAAC,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- import z from "zod";
2
- const ImageCellSchema = z.object({
3
- bg: z.string().regex(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i),
4
- img: z.string().optional(),
5
- w: z.number().int().min(0).optional(),
6
- h: z.number().int().min(0).optional(),
7
- });
8
- const ImageTableSchema = z.object({});
9
- //# sourceMappingURL=image-table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"image-table.js","sourceRoot":"","sources":["../../../src/lib-ext/image-table.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,2CAA2C,CAAC;IACjE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACrC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const GlobalLocaleData: {
2
- readonly "button.cancel": "Cancel";
3
- readonly "button.ok": "OK";
4
- };
@@ -1,5 +0,0 @@
1
- export const GlobalLocaleData = {
2
- "button.cancel": "Cancel",
3
- "button.ok": "OK",
4
- };
5
- //# sourceMappingURL=locale.data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locale.data.js","sourceRoot":"","sources":["../../src/locale.data.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,eAAe,EAAE,QAAQ;IACzB,WAAW,EAAE,IAAI;CACX,CAAC"}