ttpg-darrell 1.0.76 → 1.0.78

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 (408) hide show
  1. package/build/cjs/lib/game-object/cardholder-player-name/cardholder-player-name.js +1 -1
  2. package/build/cjs/lib/layout-objects/layout-border.d.ts +2 -2
  3. package/build/cjs/lib/layout-objects/layout-border.js +8 -13
  4. package/build/cjs/lib/layout-objects/layout-border.js.map +1 -1
  5. package/build/cjs/lib/layout-objects/layout-border.testp.js +19 -0
  6. package/build/cjs/lib/layout-objects/layout-border.testp.js.map +1 -0
  7. package/build/cjs/lib/layout-objects/layout-objects.d.ts +1 -1
  8. package/build/cjs/lib/locale/locale.d.ts +1 -1
  9. package/build/cjs/lib-ext/color-mapping/color-mapping.js +2 -2
  10. package/build/cjs/lib-ext/color-mapping/color-mapping.js.map +1 -1
  11. package/build/cjs/lib-ext/color-mapping/raw-linear.js +0 -25
  12. package/build/cjs/lib-ext/color-mapping/raw-linear.js.map +1 -1
  13. package/build/cjs/lib-ext/create-assets/abstract-create-assets/abstract-create-assets.d.ts +0 -1
  14. package/build/cjs/lib-ext/create-assets/create-board/create-board.d.ts +0 -1
  15. package/build/cjs/lib-ext/create-assets/create-cardsheets/create-cardsheet-params.d.ts +12 -160
  16. package/build/cjs/lib-ext/create-assets/create-cardsheets/create-cardsheet.d.ts +0 -1
  17. package/build/cjs/lib-ext/create-assets/create-d6/create-d6-params.d.ts +10 -158
  18. package/build/cjs/lib-ext/create-assets/create-d6/create-d6.d.ts +0 -1
  19. package/build/cjs/lib-ext/image/cell/abstract-cell/abstract-cell.d.ts +0 -1
  20. package/build/cjs/lib-ext/image/cell/bleed-cell/bleed-cell.d.ts +0 -1
  21. package/build/cjs/lib-ext/image/cell/buffer-cell/buffer-cell.d.ts +0 -1
  22. package/build/cjs/lib-ext/image/cell/canvas-cell/canvas-cell.d.ts +0 -1
  23. package/build/cjs/lib-ext/image/cell/cell-parser/cell-schema.d.ts +40 -20
  24. package/build/cjs/lib-ext/image/cell/col-cell/col-cell.d.ts +0 -1
  25. package/build/cjs/lib-ext/image/cell/grid-cell/grid-cell.d.ts +0 -1
  26. package/build/cjs/lib-ext/image/cell/image-cell/image-cell.d.ts +0 -1
  27. package/build/cjs/lib-ext/image/cell/padded-cell/padded-cell.d.ts +0 -1
  28. package/build/cjs/lib-ext/image/cell/resize-cell/resize-cell.d.ts +0 -1
  29. package/build/cjs/lib-ext/image/cell/row-cell/row-cell.d.ts +0 -1
  30. package/build/cjs/lib-ext/image/cell/solid-cell/solid-cell.d.ts +0 -1
  31. package/build/cjs/lib-ext/image/cell/text-cell/text-cell.d.ts +0 -1
  32. package/build/cjs/lib-ext/image/image-split/image-split.d.ts +0 -1
  33. package/build/cjs/lib-ext/nsid/extract-nsid-to-template-id.js +1 -1
  34. package/build/cjs/lib-ext/nsid/extract-nsid-to-template-id.js.map +1 -1
  35. package/build/cjs/lib-ext/template/cube-template/cube-template.js +4 -4
  36. package/build/cjs/lib-ext/template/cube-template/cube-template.js.map +1 -1
  37. package/build/esm/lib/game-object/cardholder-player-name/cardholder-player-name.js +1 -1
  38. package/build/esm/lib/layout-objects/layout-border.d.ts +2 -2
  39. package/build/esm/lib/layout-objects/layout-border.js +8 -13
  40. package/build/esm/lib/layout-objects/layout-border.js.map +1 -1
  41. package/build/esm/lib/layout-objects/layout-border.testp.js +17 -0
  42. package/build/esm/lib/layout-objects/layout-border.testp.js.map +1 -0
  43. package/build/esm/lib/layout-objects/layout-objects.d.ts +1 -1
  44. package/build/esm/lib/locale/locale.d.ts +1 -1
  45. package/build/esm/lib-ext/create-assets/abstract-create-assets/abstract-create-assets.d.ts +0 -1
  46. package/build/esm/lib-ext/create-assets/create-board/create-board.d.ts +0 -1
  47. package/build/esm/lib-ext/create-assets/create-cardsheets/create-cardsheet-params.d.ts +12 -160
  48. package/build/esm/lib-ext/create-assets/create-cardsheets/create-cardsheet.d.ts +0 -1
  49. package/build/esm/lib-ext/create-assets/create-d6/create-d6-params.d.ts +10 -158
  50. package/build/esm/lib-ext/create-assets/create-d6/create-d6.d.ts +0 -1
  51. package/build/esm/lib-ext/image/cell/abstract-cell/abstract-cell.d.ts +0 -1
  52. package/build/esm/lib-ext/image/cell/bleed-cell/bleed-cell.d.ts +0 -1
  53. package/build/esm/lib-ext/image/cell/buffer-cell/buffer-cell.d.ts +0 -1
  54. package/build/esm/lib-ext/image/cell/canvas-cell/canvas-cell.d.ts +0 -1
  55. package/build/esm/lib-ext/image/cell/cell-parser/cell-schema.d.ts +40 -20
  56. package/build/esm/lib-ext/image/cell/col-cell/col-cell.d.ts +0 -1
  57. package/build/esm/lib-ext/image/cell/grid-cell/grid-cell.d.ts +0 -1
  58. package/build/esm/lib-ext/image/cell/image-cell/image-cell.d.ts +0 -1
  59. package/build/esm/lib-ext/image/cell/padded-cell/padded-cell.d.ts +0 -1
  60. package/build/esm/lib-ext/image/cell/resize-cell/resize-cell.d.ts +0 -1
  61. package/build/esm/lib-ext/image/cell/row-cell/row-cell.d.ts +0 -1
  62. package/build/esm/lib-ext/image/cell/solid-cell/solid-cell.d.ts +0 -1
  63. package/build/esm/lib-ext/image/cell/text-cell/text-cell.d.ts +0 -1
  64. package/build/esm/lib-ext/image/image-split/image-split.d.ts +0 -1
  65. package/build/esm/lib-ext/nsid/extract-nsid-to-template-id.js +1 -1
  66. package/build/esm/lib-ext/nsid/extract-nsid-to-template-id.js.map +1 -1
  67. package/build/esm/lib-ext/template/cube-template/cube-template.js +4 -4
  68. package/build/esm/lib-ext/template/cube-template/cube-template.js.map +1 -1
  69. package/package.json +1 -1
  70. package/build/cjs/lib/bug-workarounds/bug-card-holder-assignment.d.ts +0 -8
  71. package/build/cjs/lib/bug-workarounds/bug-card-holder-assignment.js +0 -14
  72. package/build/cjs/lib/bug-workarounds/bug-card-holder-assignment.js.map +0 -1
  73. package/build/cjs/lib/bug-workarounds/bug-unique-cards.d.ts +0 -8
  74. package/build/cjs/lib/bug-workarounds/bug-unique-cards.js +0 -14
  75. package/build/cjs/lib/bug-workarounds/bug-unique-cards.js.map +0 -1
  76. package/build/cjs/lib/chess-clock/chess-clock-window.d.ts +0 -11
  77. package/build/cjs/lib/chess-clock/chess-clock-window.js +0 -47
  78. package/build/cjs/lib/chess-clock/chess-clock-window.js.map +0 -1
  79. package/build/cjs/lib/chess-clock/chess-clock-window.testp.d.ts +0 -1
  80. package/build/cjs/lib/chess-clock/chess-clock-window.testp.js +0 -23
  81. package/build/cjs/lib/chess-clock/chess-clock-window.testp.js.map +0 -1
  82. package/build/cjs/lib/context-menu/abstract-right-click-card.d.ts +0 -17
  83. package/build/cjs/lib/context-menu/abstract-right-click-card.js +0 -40
  84. package/build/cjs/lib/context-menu/abstract-right-click-card.js.map +0 -1
  85. package/build/cjs/lib/context-menu/abstract-right-click-deck.d.ts +0 -19
  86. package/build/cjs/lib/context-menu/abstract-right-click-deck.js +0 -46
  87. package/build/cjs/lib/context-menu/abstract-right-click-deck.js.map +0 -1
  88. package/build/cjs/lib/context-menu/leave-seat.d.ts +0 -19
  89. package/build/cjs/lib/context-menu/leave-seat.js +0 -51
  90. package/build/cjs/lib/context-menu/leave-seat.js.map +0 -1
  91. package/build/cjs/lib/event/on-card-became-singleton-or-deck.d.ts +0 -30
  92. package/build/cjs/lib/event/on-card-became-singleton-or-deck.js +0 -103
  93. package/build/cjs/lib/event/on-card-became-singleton-or-deck.js.map +0 -1
  94. package/build/cjs/lib/event/on-card-became-singleton-or-deck.testp.d.ts +0 -1
  95. package/build/cjs/lib/event/on-card-became-singleton-or-deck.testp.js +0 -15
  96. package/build/cjs/lib/event/on-card-became-singleton-or-deck.testp.js.map +0 -1
  97. package/build/cjs/lib/event/throttle-click-handler.d.ts +0 -9
  98. package/build/cjs/lib/event/throttle-click-handler.js +0 -28
  99. package/build/cjs/lib/event/throttle-click-handler.js.map +0 -1
  100. package/build/cjs/lib/event/triggerable-multicast-delegate.d.ts +0 -30
  101. package/build/cjs/lib/event/triggerable-multicast-delegate.js +0 -57
  102. package/build/cjs/lib/event/triggerable-multicast-delegate.js.map +0 -1
  103. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.d.ts +0 -1
  104. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js +0 -6
  105. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js.map +0 -1
  106. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation.d.ts +0 -7
  107. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation.js +0 -27
  108. package/build/cjs/lib/game-object/dice-snap-rotation/dice-snap-rotation.js.map +0 -1
  109. package/build/cjs/lib/jest-util/click-all/click-all.d.ts +0 -2
  110. package/build/cjs/lib/jest-util/click-all/click-all.js +0 -38
  111. package/build/cjs/lib/jest-util/click-all/click-all.js.map +0 -1
  112. package/build/cjs/lib/parse/parse-color.d.ts +0 -7
  113. package/build/cjs/lib/parse/parse-color.js +0 -47
  114. package/build/cjs/lib/parse/parse-color.js.map +0 -1
  115. package/build/cjs/lib/svg/svg-sparkline.d.ts +0 -12
  116. package/build/cjs/lib/svg/svg-sparkline.js +0 -44
  117. package/build/cjs/lib/svg/svg-sparkline.js.map +0 -1
  118. package/build/cjs/lib/ui-visibility/ui-visibility.d.ts +0 -17
  119. package/build/cjs/lib/ui-visibility/ui-visibility.js +0 -69
  120. package/build/cjs/lib/ui-visibility/ui-visibility.js.map +0 -1
  121. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-config-widget.d.ts +0 -9
  122. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-config-widget.js +0 -82
  123. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-config-widget.js.map +0 -1
  124. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-config-window.d.ts +0 -4
  125. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-config-window.js +0 -40
  126. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-config-window.js.map +0 -1
  127. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-data.d.ts +0 -46
  128. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-data.js +0 -211
  129. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-data.js.map +0 -1
  130. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-widget.d.ts +0 -15
  131. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-widget.js +0 -227
  132. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-widget.js.map +0 -1
  133. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-window.d.ts +0 -11
  134. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-window.js +0 -47
  135. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-window.js.map +0 -1
  136. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-window.testp.d.ts +0 -1
  137. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-window.testp.js +0 -22
  138. package/build/cjs/lib/widget/chess-clock-widget/chess-clock-window.testp.js.map +0 -1
  139. package/build/cjs/lib-ext/color-mapping/color-mapping-scikit.js +0 -140
  140. package/build/cjs/lib-ext/color-mapping/color-mapping-scikit.js.map +0 -1
  141. package/build/cjs/lib-ext/color-mapping/extracted-to-hex.js +0 -41
  142. package/build/cjs/lib-ext/color-mapping/extracted-to-hex.js.map +0 -1
  143. package/build/cjs/lib-ext/image-table.d.ts +0 -1
  144. package/build/cjs/lib-ext/image-table.js +0 -14
  145. package/build/cjs/lib-ext/image-table.js.map +0 -1
  146. package/build/esm/lib/bug-workarounds/bug-card-holder-assignment.d.ts +0 -8
  147. package/build/esm/lib/bug-workarounds/bug-card-holder-assignment.js +0 -10
  148. package/build/esm/lib/bug-workarounds/bug-card-holder-assignment.js.map +0 -1
  149. package/build/esm/lib/bug-workarounds/bug-unique-cards.d.ts +0 -8
  150. package/build/esm/lib/bug-workarounds/bug-unique-cards.js +0 -10
  151. package/build/esm/lib/bug-workarounds/bug-unique-cards.js.map +0 -1
  152. package/build/esm/lib/chess-clock/chess-clock-window.d.ts +0 -11
  153. package/build/esm/lib/chess-clock/chess-clock-window.js +0 -43
  154. package/build/esm/lib/chess-clock/chess-clock-window.js.map +0 -1
  155. package/build/esm/lib/chess-clock/chess-clock-window.testp.d.ts +0 -1
  156. package/build/esm/lib/chess-clock/chess-clock-window.testp.js +0 -21
  157. package/build/esm/lib/chess-clock/chess-clock-window.testp.js.map +0 -1
  158. package/build/esm/lib/context-menu/abstract-right-click-card.d.ts +0 -17
  159. package/build/esm/lib/context-menu/abstract-right-click-card.js +0 -36
  160. package/build/esm/lib/context-menu/abstract-right-click-card.js.map +0 -1
  161. package/build/esm/lib/context-menu/abstract-right-click-deck.d.ts +0 -19
  162. package/build/esm/lib/context-menu/abstract-right-click-deck.js +0 -42
  163. package/build/esm/lib/context-menu/abstract-right-click-deck.js.map +0 -1
  164. package/build/esm/lib/context-menu/leave-seat.d.ts +0 -19
  165. package/build/esm/lib/context-menu/leave-seat.js +0 -47
  166. package/build/esm/lib/context-menu/leave-seat.js.map +0 -1
  167. package/build/esm/lib/event/on-card-became-singleton-or-deck.d.ts +0 -30
  168. package/build/esm/lib/event/on-card-became-singleton-or-deck.js +0 -99
  169. package/build/esm/lib/event/on-card-became-singleton-or-deck.js.map +0 -1
  170. package/build/esm/lib/event/on-card-became-singleton-or-deck.testp.d.ts +0 -1
  171. package/build/esm/lib/event/on-card-became-singleton-or-deck.testp.js +0 -13
  172. package/build/esm/lib/event/on-card-became-singleton-or-deck.testp.js.map +0 -1
  173. package/build/esm/lib/event/throttle-click-handler.d.ts +0 -9
  174. package/build/esm/lib/event/throttle-click-handler.js +0 -24
  175. package/build/esm/lib/event/throttle-click-handler.js.map +0 -1
  176. package/build/esm/lib/event/triggerable-multicast-delegate.d.ts +0 -30
  177. package/build/esm/lib/event/triggerable-multicast-delegate.js +0 -53
  178. package/build/esm/lib/event/triggerable-multicast-delegate.js.map +0 -1
  179. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.d.ts +0 -1
  180. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js +0 -4
  181. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation-obj.js.map +0 -1
  182. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation.d.ts +0 -4
  183. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation.js +0 -20
  184. package/build/esm/lib/game-object/dice-snap-rotation/dice-snap-rotation.js.map +0 -1
  185. package/build/esm/lib/jest-util/click-all/click-all.d.ts +0 -2
  186. package/build/esm/lib/jest-util/click-all/click-all.js +0 -34
  187. package/build/esm/lib/jest-util/click-all/click-all.js.map +0 -1
  188. package/build/esm/lib/parse/parse-color.d.ts +0 -7
  189. package/build/esm/lib/parse/parse-color.js +0 -43
  190. package/build/esm/lib/parse/parse-color.js.map +0 -1
  191. package/build/esm/lib/svg/svg-sparkline.d.ts +0 -12
  192. package/build/esm/lib/svg/svg-sparkline.js +0 -40
  193. package/build/esm/lib/svg/svg-sparkline.js.map +0 -1
  194. package/build/esm/lib/ui-visibility/ui-visibility.d.ts +0 -17
  195. package/build/esm/lib/ui-visibility/ui-visibility.js +0 -65
  196. package/build/esm/lib/ui-visibility/ui-visibility.js.map +0 -1
  197. package/build/esm/lib-ext/image-table.d.ts +0 -1
  198. package/build/esm/lib-ext/image-table.js +0 -9
  199. package/build/esm/lib-ext/image-table.js.map +0 -1
  200. package/build/module_type_should_override_this/index.d.ts +0 -54
  201. package/build/module_type_should_override_this/index.js +0 -55
  202. package/build/module_type_should_override_this/index.js.map +0 -1
  203. package/build/module_type_should_override_this/lib/adjacency/adjacency.d.ts +0 -61
  204. package/build/module_type_should_override_this/lib/adjacency/adjacency.js +0 -212
  205. package/build/module_type_should_override_this/lib/adjacency/adjacency.js.map +0 -1
  206. package/build/module_type_should_override_this/lib/broadcast/broadcast.d.ts +0 -9
  207. package/build/module_type_should_override_this/lib/broadcast/broadcast.js +0 -42
  208. package/build/module_type_should_override_this/lib/broadcast/broadcast.js.map +0 -1
  209. package/build/module_type_should_override_this/lib/bug-workarounds/bug-card-holder-assignment.d.ts +0 -8
  210. package/build/module_type_should_override_this/lib/bug-workarounds/bug-card-holder-assignment.js +0 -10
  211. package/build/module_type_should_override_this/lib/bug-workarounds/bug-card-holder-assignment.js.map +0 -1
  212. package/build/module_type_should_override_this/lib/bug-workarounds/bug-unique-cards.d.ts +0 -8
  213. package/build/module_type_should_override_this/lib/bug-workarounds/bug-unique-cards.js +0 -10
  214. package/build/module_type_should_override_this/lib/bug-workarounds/bug-unique-cards.js.map +0 -1
  215. package/build/module_type_should_override_this/lib/card-util/card-util.d.ts +0 -45
  216. package/build/module_type_should_override_this/lib/card-util/card-util.js +0 -173
  217. package/build/module_type_should_override_this/lib/card-util/card-util.js.map +0 -1
  218. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-card.d.ts +0 -17
  219. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-card.js +0 -36
  220. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-card.js.map +0 -1
  221. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-deck.d.ts +0 -19
  222. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-deck.js +0 -42
  223. package/build/module_type_should_override_this/lib/context-menu/abstract-right-click-deck.js.map +0 -1
  224. package/build/module_type_should_override_this/lib/context-menu/leave-seat.d.ts +0 -19
  225. package/build/module_type_should_override_this/lib/context-menu/leave-seat.js +0 -47
  226. package/build/module_type_should_override_this/lib/context-menu/leave-seat.js.map +0 -1
  227. package/build/module_type_should_override_this/lib/data-store/data-store.d.ts +0 -104
  228. package/build/module_type_should_override_this/lib/data-store/data-store.js +0 -392
  229. package/build/module_type_should_override_this/lib/data-store/data-store.js.map +0 -1
  230. package/build/module_type_should_override_this/lib/dice-group/dice-group-testp.d.ts +0 -1
  231. package/build/module_type_should_override_this/lib/dice-group/dice-group-testp.js +0 -37
  232. package/build/module_type_should_override_this/lib/dice-group/dice-group-testp.js.map +0 -1
  233. package/build/module_type_should_override_this/lib/dice-group/dice-group.d.ts +0 -83
  234. package/build/module_type_should_override_this/lib/dice-group/dice-group.js +0 -247
  235. package/build/module_type_should_override_this/lib/dice-group/dice-group.js.map +0 -1
  236. package/build/module_type_should_override_this/lib/error-handler/bugsplat-remote-reporter.d.ts +0 -21
  237. package/build/module_type_should_override_this/lib/error-handler/bugsplat-remote-reporter.js +0 -54
  238. package/build/module_type_should_override_this/lib/error-handler/bugsplat-remote-reporter.js.map +0 -1
  239. package/build/module_type_should_override_this/lib/error-handler/error-batcher.d.ts +0 -11
  240. package/build/module_type_should_override_this/lib/error-handler/error-batcher.js +0 -50
  241. package/build/module_type_should_override_this/lib/error-handler/error-batcher.js.map +0 -1
  242. package/build/module_type_should_override_this/lib/error-handler/error-handler.d.ts +0 -43
  243. package/build/module_type_should_override_this/lib/error-handler/error-handler.js +0 -234
  244. package/build/module_type_should_override_this/lib/error-handler/error-handler.js.map +0 -1
  245. package/build/module_type_should_override_this/lib/error-handler/error-handler.testp.d.ts +0 -4
  246. package/build/module_type_should_override_this/lib/error-handler/error-handler.testp.js +0 -13
  247. package/build/module_type_should_override_this/lib/error-handler/error-handler.testp.js.map +0 -1
  248. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.d.ts +0 -30
  249. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.js +0 -99
  250. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.js.map +0 -1
  251. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.testp.d.ts +0 -1
  252. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.testp.js +0 -13
  253. package/build/module_type_should_override_this/lib/event/on-card-became-singleton-or-deck.testp.js.map +0 -1
  254. package/build/module_type_should_override_this/lib/event/throttle-click-handler.d.ts +0 -9
  255. package/build/module_type_should_override_this/lib/event/throttle-click-handler.js +0 -24
  256. package/build/module_type_should_override_this/lib/event/throttle-click-handler.js.map +0 -1
  257. package/build/module_type_should_override_this/lib/event/triggerable-multicast-delegate.d.ts +0 -30
  258. package/build/module_type_should_override_this/lib/event/triggerable-multicast-delegate.js +0 -53
  259. package/build/module_type_should_override_this/lib/event/triggerable-multicast-delegate.js.map +0 -1
  260. package/build/module_type_should_override_this/lib/facing/facing.d.ts +0 -4
  261. package/build/module_type_should_override_this/lib/facing/facing.js +0 -15
  262. package/build/module_type_should_override_this/lib/facing/facing.js.map +0 -1
  263. package/build/module_type_should_override_this/lib/find/find.d.ts +0 -19
  264. package/build/module_type_should_override_this/lib/find/find.js +0 -152
  265. package/build/module_type_should_override_this/lib/find/find.js.map +0 -1
  266. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name-obj.d.ts +0 -1
  267. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name-obj.js +0 -10
  268. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name-obj.js.map +0 -1
  269. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name.d.ts +0 -19
  270. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name.js +0 -101
  271. package/build/module_type_should_override_this/lib/game-object/cardholder-player-name/cardholder-player-name.js.map +0 -1
  272. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container-obj.d.ts +0 -1
  273. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container-obj.js +0 -5
  274. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container-obj.js.map +0 -1
  275. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container.d.ts +0 -24
  276. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container.js +0 -91
  277. package/build/module_type_should_override_this/lib/game-object/deleted-items-container/deleted-items-container.js.map +0 -1
  278. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container-obj.d.ts +0 -1
  279. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container-obj.js +0 -4
  280. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container-obj.js.map +0 -1
  281. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container.d.ts +0 -43
  282. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container.js +0 -116
  283. package/build/module_type_should_override_this/lib/game-object/garbage/garbage-container.js.map +0 -1
  284. package/build/module_type_should_override_this/lib/game-object/garbage/simple-card-garbage-handler.d.ts +0 -20
  285. package/build/module_type_should_override_this/lib/game-object/garbage/simple-card-garbage-handler.js +0 -100
  286. package/build/module_type_should_override_this/lib/game-object/garbage/simple-card-garbage-handler.js.map +0 -1
  287. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-container-handler.d.ts +0 -16
  288. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-container-handler.js +0 -44
  289. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-container-handler.js.map +0 -1
  290. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-snap-point-handler.d.ts +0 -19
  291. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-snap-point-handler.js +0 -50
  292. package/build/module_type_should_override_this/lib/game-object/garbage/simple-to-snap-point-handler.js.map +0 -1
  293. package/build/module_type_should_override_this/lib/global/global-init.d.ts +0 -10
  294. package/build/module_type_should_override_this/lib/global/global-init.js +0 -20
  295. package/build/module_type_should_override_this/lib/global/global-init.js.map +0 -1
  296. package/build/module_type_should_override_this/lib/global/i-global.d.ts +0 -3
  297. package/build/module_type_should_override_this/lib/global/i-global.js +0 -2
  298. package/build/module_type_should_override_this/lib/global/i-global.js.map +0 -1
  299. package/build/module_type_should_override_this/lib/heap/heap.d.ts +0 -8
  300. package/build/module_type_should_override_this/lib/heap/heap.js +0 -109
  301. package/build/module_type_should_override_this/lib/heap/heap.js.map +0 -1
  302. package/build/module_type_should_override_this/lib/layout-objects/layout-objects.d.ts +0 -49
  303. package/build/module_type_should_override_this/lib/layout-objects/layout-objects.js +0 -257
  304. package/build/module_type_should_override_this/lib/layout-objects/layout-objects.js.map +0 -1
  305. package/build/module_type_should_override_this/lib/locale/locale.d.ts +0 -8
  306. package/build/module_type_should_override_this/lib/locale/locale.js +0 -48
  307. package/build/module_type_should_override_this/lib/locale/locale.js.map +0 -1
  308. package/build/module_type_should_override_this/lib/namespace-id/namespace-id.d.ts +0 -1
  309. package/build/module_type_should_override_this/lib/namespace-id/namespace-id.js +0 -2
  310. package/build/module_type_should_override_this/lib/namespace-id/namespace-id.js.map +0 -1
  311. package/build/module_type_should_override_this/lib/nsid/nsid.d.ts +0 -54
  312. package/build/module_type_should_override_this/lib/nsid/nsid.js +0 -86
  313. package/build/module_type_should_override_this/lib/nsid/nsid.js.map +0 -1
  314. package/build/module_type_should_override_this/lib/parse/parse-color.d.ts +0 -7
  315. package/build/module_type_should_override_this/lib/parse/parse-color.js +0 -43
  316. package/build/module_type_should_override_this/lib/parse/parse-color.js.map +0 -1
  317. package/build/module_type_should_override_this/lib/perf/perf.d.ts +0 -29
  318. package/build/module_type_should_override_this/lib/perf/perf.js +0 -93
  319. package/build/module_type_should_override_this/lib/perf/perf.js.map +0 -1
  320. package/build/module_type_should_override_this/lib/setup/abstract-setup.d.ts +0 -18
  321. package/build/module_type_should_override_this/lib/setup/abstract-setup.js +0 -22
  322. package/build/module_type_should_override_this/lib/setup/abstract-setup.js.map +0 -1
  323. package/build/module_type_should_override_this/lib/shuffle/shuffle.d.ts +0 -7
  324. package/build/module_type_should_override_this/lib/shuffle/shuffle.js +0 -26
  325. package/build/module_type_should_override_this/lib/shuffle/shuffle.js.map +0 -1
  326. package/build/module_type_should_override_this/lib/spawn/spawn.d.ts +0 -21
  327. package/build/module_type_should_override_this/lib/spawn/spawn.js +0 -116
  328. package/build/module_type_should_override_this/lib/spawn/spawn.js.map +0 -1
  329. package/build/module_type_should_override_this/lib/svg/svg-sparkline.d.ts +0 -12
  330. package/build/module_type_should_override_this/lib/svg/svg-sparkline.js +0 -40
  331. package/build/module_type_should_override_this/lib/svg/svg-sparkline.js.map +0 -1
  332. package/build/module_type_should_override_this/lib/turn-order/turn-order.d.ts +0 -51
  333. package/build/module_type_should_override_this/lib/turn-order/turn-order.js +0 -200
  334. package/build/module_type_should_override_this/lib/turn-order/turn-order.js.map +0 -1
  335. package/build/module_type_should_override_this/lib/ui/screen-test.d.ts +0 -1
  336. package/build/module_type_should_override_this/lib/ui/screen-test.js +0 -20
  337. package/build/module_type_should_override_this/lib/ui/screen-test.js.map +0 -1
  338. package/build/module_type_should_override_this/lib/ui-visibility/ui-visibility.d.ts +0 -17
  339. package/build/module_type_should_override_this/lib/ui-visibility/ui-visibility.js +0 -65
  340. package/build/module_type_should_override_this/lib/ui-visibility/ui-visibility.js.map +0 -1
  341. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter-locale.data.d.ts +0 -3
  342. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter-locale.data.js +0 -4
  343. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter-locale.data.js.map +0 -1
  344. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter.d.ts +0 -5
  345. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter.js +0 -25
  346. package/build/module_type_should_override_this/lib/whisper-reporter/whisper-reporter.js.map +0 -1
  347. package/build/module_type_should_override_this/lib/widget/confirm-button/confirm-button.d.ts +0 -2
  348. package/build/module_type_should_override_this/lib/widget/confirm-button/confirm-button.js +0 -3
  349. package/build/module_type_should_override_this/lib/widget/confirm-button/confirm-button.js.map +0 -1
  350. package/build/module_type_should_override_this/lib/widget/d6widget/d6widget.d.ts +0 -48
  351. package/build/module_type_should_override_this/lib/widget/d6widget/d6widget.js +0 -84
  352. package/build/module_type_should_override_this/lib/widget/d6widget/d6widget.js.map +0 -1
  353. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.d.ts +0 -35
  354. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.js +0 -109
  355. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.js.map +0 -1
  356. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.testp.d.ts +0 -1
  357. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.testp.js +0 -10
  358. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-button.testp.js.map +0 -1
  359. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-locale.data.d.ts +0 -3
  360. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-locale.data.js +0 -4
  361. package/build/module_type_should_override_this/lib/widget/end-turn-button/end-turn-locale.data.js.map +0 -1
  362. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.d.ts +0 -28
  363. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.js +0 -99
  364. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.js.map +0 -1
  365. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.testp.d.ts +0 -1
  366. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.testp.js +0 -10
  367. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-button.testp.js.map +0 -1
  368. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-locale.data.d.ts +0 -3
  369. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-locale.data.js +0 -5
  370. package/build/module_type_should_override_this/lib/widget/hot-seat-button/hot-seat-locale.data.js.map +0 -1
  371. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget-locale.data.d.ts +0 -3
  372. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget-locale.data.js +0 -4
  373. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget-locale.data.js.map +0 -1
  374. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.d.ts +0 -19
  375. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.js +0 -74
  376. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.js.map +0 -1
  377. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.testp.d.ts +0 -1
  378. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.testp.js +0 -5
  379. package/build/module_type_should_override_this/lib/widget/perf-widget/perf-widget.testp.js.map +0 -1
  380. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-clicked-widget.d.ts +0 -22
  381. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-clicked-widget.js +0 -136
  382. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-clicked-widget.js.map +0 -1
  383. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-wart.d.ts +0 -16
  384. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-wart.js +0 -7
  385. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-wart.js.map +0 -1
  386. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-widget.d.ts +0 -29
  387. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-widget.js +0 -131
  388. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-entry-widget.js.map +0 -1
  389. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-locale.data.d.ts +0 -3
  390. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-locale.data.js +0 -13
  391. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-locale.data.js.map +0 -1
  392. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget-params.d.ts +0 -33
  393. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget-params.js +0 -6
  394. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget-params.js.map +0 -1
  395. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.d.ts +0 -25
  396. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.js +0 -99
  397. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.js.map +0 -1
  398. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.testp.d.ts +0 -1
  399. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.testp.js +0 -58
  400. package/build/module_type_should_override_this/lib/widget/turn-order-widget/turn-order-widget.testp.js.map +0 -1
  401. package/build/module_type_should_override_this/lib-ext/image-table.d.ts +0 -1
  402. package/build/module_type_should_override_this/lib-ext/image-table.js +0 -9
  403. package/build/module_type_should_override_this/lib-ext/image-table.js.map +0 -1
  404. package/build/module_type_should_override_this/locale.data.d.ts +0 -4
  405. package/build/module_type_should_override_this/locale.data.js +0 -5
  406. package/build/module_type_should_override_this/locale.data.js.map +0 -1
  407. /package/build/cjs/{lib-ext/color-mapping/color-mapping-scikit.d.ts → lib/layout-objects/layout-border.testp.d.ts} +0 -0
  408. /package/build/{cjs/lib-ext/color-mapping/extracted-to-hex.d.ts → esm/lib/layout-objects/layout-border.testp.d.ts} +0 -0
@@ -1,34 +0,0 @@
1
- import { Border, Canvas, ContentButton, ImageButton, LayoutBox, Panel, } from "@tabletop-playground/api";
2
- import { Button, MockPlayer, } from "ttpg-mock";
3
- export function clickAll(widget, player) {
4
- player = player !== null && player !== void 0 ? player : new MockPlayer({ slot: 19 });
5
- if (widget instanceof Panel) {
6
- for (const child of widget.getAllChildren()) {
7
- clickAll(child, player);
8
- }
9
- }
10
- else if (widget instanceof Canvas) {
11
- for (const child of widget.getChildren()) {
12
- clickAll(child, player);
13
- }
14
- }
15
- else if (widget instanceof Border) {
16
- clickAll(widget.getChild(), player);
17
- }
18
- else if (widget instanceof LayoutBox) {
19
- clickAll(widget.getChild(), player);
20
- }
21
- else if (widget instanceof Button) {
22
- const mockButton = widget;
23
- mockButton._clickAsPlayer(player);
24
- }
25
- else if (widget instanceof ContentButton) {
26
- const mockButton = widget;
27
- mockButton._clickAsPlayer(player);
28
- }
29
- else if (widget instanceof ImageButton) {
30
- const mockButton = widget;
31
- mockButton._clickAsPlayer(player);
32
- }
33
- }
34
- //# sourceMappingURL=click-all.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"click-all.js","sourceRoot":"","sources":["../../../../../src/lib/jest-util/click-all/click-all.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,MAAM,EACN,MAAM,EACN,aAAa,EACb,WAAW,EACX,SAAS,EACT,KAAK,GAGR,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,MAAM,EAIN,UAAU,GACb,MAAM,WAAW,CAAC;AAEnB,MAAM,UAAU,QAAQ,CAAC,MAA0B,EAAE,MAAe;IAChE,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAChD,IAAI,MAAM,YAAY,KAAK,EAAE,CAAC;QAC1B,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC;YAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC;SAAM,IAAI,MAAM,YAAY,MAAM,EAAE,CAAC;QAClC,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;YACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC;SAAM,IAAI,MAAM,YAAY,MAAM,EAAE,CAAC;QAClC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;SAAM,IAAI,MAAM,YAAY,SAAS,EAAE,CAAC;QACrC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;SAAM,IAAI,MAAM,YAAY,MAAM,EAAE,CAAC;QAClC,MAAM,UAAU,GAAG,MAAoB,CAAC;QACxC,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;SAAM,IAAI,MAAM,YAAY,aAAa,EAAE,CAAC;QACzC,MAAM,UAAU,GAAG,MAA2B,CAAC;QAC/C,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;SAAM,IAAI,MAAM,YAAY,WAAW,EAAE,CAAC;QACvC,MAAM,UAAU,GAAG,MAAyB,CAAC;QAC7C,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;AACL,CAAC"}
@@ -1,7 +0,0 @@
1
- import { Color } from "@tabletop-playground/api";
2
- export declare const HEX_COLOR_REGEX: RegExp;
3
- export declare class ParseColor {
4
- private readonly _hexColorRegex;
5
- parseColor(hexColor: string): Color | undefined;
6
- parseColorOrThrow(hexColor: string): Color;
7
- }
@@ -1,43 +0,0 @@
1
- import { Color } from "@tabletop-playground/api";
2
- export const HEX_COLOR_REGEX = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
3
- export class ParseColor {
4
- constructor() {
5
- this._hexColorRegex = new RegExp(HEX_COLOR_REGEX);
6
- }
7
- parseColor(hexColor) {
8
- const m = hexColor.match(this._hexColorRegex);
9
- if (!m) {
10
- return undefined;
11
- }
12
- const hexStr = m[1];
13
- if (hexStr === undefined) {
14
- throw new Error("missing hexStr");
15
- }
16
- let r = 0;
17
- let g = 0;
18
- let b = 0;
19
- let a = 1;
20
- if (hexStr.length === 3) {
21
- r = Number.parseInt(hexStr.substring(0, 1), 16) / 15;
22
- g = Number.parseInt(hexStr.substring(1, 2), 16) / 15;
23
- b = Number.parseInt(hexStr.substring(2, 3), 16) / 15;
24
- }
25
- else {
26
- r = Number.parseInt(hexStr.substring(0, 2), 16) / 255;
27
- g = Number.parseInt(hexStr.substring(2, 4), 16) / 255;
28
- b = Number.parseInt(hexStr.substring(4, 6), 16) / 255;
29
- }
30
- if (hexStr.length === 8) {
31
- a = Number.parseInt(hexStr.substring(6, 8), 16) / 255;
32
- }
33
- return new Color(r, g, b, a);
34
- }
35
- parseColorOrThrow(hexColor) {
36
- const color = this.parseColor(hexColor);
37
- if (!color) {
38
- throw new Error(`bad hexColor "${hexColor}"`);
39
- }
40
- return color;
41
- }
42
- }
43
- //# sourceMappingURL=parse-color.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-color.js","sourceRoot":"","sources":["../../../../src/lib/parse/parse-color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,MAAM,CAAC,MAAM,eAAe,GAAG,2CAA2C,CAAC;AAE3E,MAAM,OAAO,UAAU;IAAvB;QACqB,mBAAc,GAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;IAsC1E,CAAC;IApCG,UAAU,CAAC,QAAgB;QACvB,MAAM,CAAC,GAA4B,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACvE,IAAI,CAAC,CAAC,EAAE,CAAC;YACL,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,MAAM,MAAM,GAAuB,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACtC,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC;YACrD,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC;YACrD,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC;QACzD,CAAC;aAAM,CAAC;YACJ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;YACtD,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;YACtD,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;QAC1D,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;QAC1D,CAAC;QACD,OAAO,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,iBAAiB,CAAC,QAAgB;QAC9B,MAAM,KAAK,GAAsB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3D,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CAAC,iBAAiB,QAAQ,GAAG,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
@@ -1,12 +0,0 @@
1
- export declare class SvgSparkline {
2
- static WIDTH: number;
3
- static HEIGHT: number;
4
- /**
5
- * Create a sparkline from non-negative numbers.
6
- *
7
- * @param values
8
- * @returns
9
- */
10
- static svg(values: number[]): string;
11
- static url(values: number[]): string;
12
- }
@@ -1,40 +0,0 @@
1
- export class SvgSparkline {
2
- /**
3
- * Create a sparkline from non-negative numbers.
4
- *
5
- * @param values
6
- * @returns
7
- */
8
- static svg(values) {
9
- // Get the average non-zero value.
10
- const nonZeroValues = values.filter((value) => value > 0);
11
- if (nonZeroValues.length === 0) {
12
- nonZeroValues.push(0);
13
- }
14
- const mean = nonZeroValues.reduce((a, b) => a + b, 0) / nonZeroValues.length;
15
- // Compute an upper bound, cap at a multiple of the average.
16
- let max = Math.min(Math.max(...values, 0), mean * 3);
17
- if (max === 0) {
18
- return `<svg xmlns='http://www.w3.org/2000/svg'></svg>`;
19
- }
20
- // Round up factor of 10, make sure there's some gap at top.
21
- max = Math.ceil(max / 10) * 10 + 1;
22
- // Convert to [0:100] for display.
23
- const v = values.map((value) => SvgSparkline.HEIGHT -
24
- Math.round((value * SvgSparkline.HEIGHT) / max));
25
- const path = [`M 0 ${v[0]}`];
26
- for (let i = 1; i < v.length; i++) {
27
- path.push(`L ${i * 3} ${v[i]}`);
28
- if (v[i + i] !== v[i]) {
29
- path.push(`L ${i * 3 + 3} ${v[i]}`);
30
- }
31
- }
32
- return `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${SvgSparkline.WIDTH} ${SvgSparkline.HEIGHT}'><path d='${path.join(" ")}' stroke-width='2' stroke='red' fill='transparent' /></svg>`;
33
- }
34
- static url(values) {
35
- return "data:image/svg+xml," + SvgSparkline.svg(values);
36
- }
37
- }
38
- SvgSparkline.WIDTH = 180;
39
- SvgSparkline.HEIGHT = 100;
40
- //# sourceMappingURL=svg-sparkline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"svg-sparkline.js","sourceRoot":"","sources":["../../../../src/lib/svg/svg-sparkline.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAY;IAIrB;;;;;OAKG;IACH,MAAM,CAAC,GAAG,CAAC,MAAgB;QACvB,kCAAkC;QAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC1D,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC;QACD,MAAM,IAAI,GACN,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC;QAEpE,4DAA4D;QAC5D,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;QACrD,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;YACZ,OAAO,gDAAgD,CAAC;QAC5D,CAAC;QAED,4DAA4D;QAC5D,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAEnC,kCAAkC;QAClC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAChB,CAAC,KAAK,EAAE,EAAE,CACN,YAAY,CAAC,MAAM;YACnB,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CACtD,CAAC;QACF,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAChC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACpB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACxC,CAAC;QACL,CAAC;QACD,OAAO,wDAAwD,YAAY,CAAC,KAAK,IAAI,YAAY,CAAC,MAAM,cAAc,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,6DAA6D,CAAC;IACtM,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,MAAgB;QACvB,OAAO,qBAAqB,GAAG,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;;AA7Ca,kBAAK,GAAW,GAAG,CAAC;AACpB,mBAAM,GAAW,GAAG,CAAC"}
@@ -1,17 +0,0 @@
1
- import { GameObject, PlayerPermission, ScreenUIElement, UIElement } from "@tabletop-playground/api";
2
- /**
3
- * Set or toggle per-player visibility.
4
- */
5
- export declare class UiVisibility {
6
- private readonly _ui;
7
- private readonly _obj;
8
- private _visibleToPlayerSlots;
9
- constructor(ui: UIElement | ScreenUIElement, obj?: GameObject);
10
- getPlayerPermission(): PlayerPermission;
11
- isVisibleToPlayer(playerSlot: number): boolean;
12
- setAll(): this;
13
- setNone(): this;
14
- setOnlyThisPlayer(playerSlot: number): this;
15
- togglePlayer(playerSlot: number): this;
16
- private _update;
17
- }
@@ -1,65 +0,0 @@
1
- import { PlayerPermission, ScreenUIElement, world, } from "@tabletop-playground/api";
2
- /**
3
- * Set or toggle per-player visibility.
4
- */
5
- export class UiVisibility {
6
- constructor(ui, obj) {
7
- this._visibleToPlayerSlots = [];
8
- // Make sure widget is ready.
9
- if (!ui.widget) {
10
- throw new Error("UiVisibility: ui.widget not set");
11
- }
12
- this._ui = ui;
13
- this._obj = obj;
14
- this._visibleToPlayerSlots = [...Array(20).keys()];
15
- ui.players = this.getPlayerPermission();
16
- }
17
- getPlayerPermission() {
18
- return new PlayerPermission().setPlayerSlots(this._visibleToPlayerSlots);
19
- }
20
- isVisibleToPlayer(playerSlot) {
21
- return this._visibleToPlayerSlots.includes(playerSlot);
22
- }
23
- setAll() {
24
- this._visibleToPlayerSlots = [...Array(20).keys()];
25
- this._update();
26
- return this;
27
- }
28
- setNone() {
29
- this._visibleToPlayerSlots = [];
30
- this._update();
31
- return this;
32
- }
33
- setOnlyThisPlayer(playerSlot) {
34
- this._visibleToPlayerSlots = [playerSlot];
35
- this._update();
36
- return this;
37
- }
38
- togglePlayer(playerSlot) {
39
- const index = this._visibleToPlayerSlots.indexOf(playerSlot);
40
- if (index >= 0) {
41
- this._visibleToPlayerSlots.splice(index, 1);
42
- }
43
- else {
44
- this._visibleToPlayerSlots.push(playerSlot);
45
- }
46
- this._update();
47
- return this;
48
- }
49
- _update() {
50
- this._ui.widget.setVisible(this._visibleToPlayerSlots.length > 0);
51
- this._ui.players = this.getPlayerPermission();
52
- if (this._ui instanceof ScreenUIElement) {
53
- world.updateScreenUI(this._ui);
54
- }
55
- else {
56
- if (this._obj) {
57
- this._obj.updateUI(this._ui);
58
- }
59
- else {
60
- world.updateUI(this._ui);
61
- }
62
- }
63
- }
64
- }
65
- //# sourceMappingURL=ui-visibility.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-visibility.js","sourceRoot":"","sources":["../../../../src/lib/ui-visibility/ui-visibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,gBAAgB,EAChB,eAAe,EAEf,KAAK,GACR,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,OAAO,YAAY;IAKrB,YAAY,EAA+B,EAAE,GAAgB;QAFrD,0BAAqB,GAAa,EAAE,CAAC;QAGzC,6BAA6B;QAC7B,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,qBAAqB,GAAG,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAEnD,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC5C,CAAC;IAED,mBAAmB;QACf,OAAO,IAAI,gBAAgB,EAAE,CAAC,cAAc,CACxC,IAAI,CAAC,qBAAqB,CAC7B,CAAC;IACN,CAAC;IAED,iBAAiB,CAAC,UAAkB;QAChC,OAAO,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM;QACF,IAAI,CAAC,qBAAqB,GAAG,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAC;QAChC,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,iBAAiB,CAAC,UAAkB;QAChC,IAAI,CAAC,qBAAqB,GAAG,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,YAAY,CAAC,UAAkB;QAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YACb,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAChD,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IAEO,OAAO;QACX,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAClE,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC9C,IAAI,IAAI,CAAC,GAAG,YAAY,eAAe,EAAE,CAAC;YACtC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACJ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACZ,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACJ,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC7B,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
@@ -1 +0,0 @@
1
- export {};
@@ -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,54 +0,0 @@
1
- export * from "./lib/adjacency/adjacency";
2
- export * from "./lib/broadcast/broadcast";
3
- export * from "./lib/bug-workarounds/bug-card-holder-assignment";
4
- export * from "./lib/bug-workarounds/bug-unique-cards";
5
- export * from "./lib/card-util/card-util";
6
- export * from "./lib/context-menu/abstract-right-click-card";
7
- export * from "./lib/context-menu/abstract-right-click-deck";
8
- export * from "./lib/context-menu/leave-seat";
9
- export * from "./lib/data-store/data-store";
10
- export * from "./lib/dice-group/dice-group";
11
- export * from "./lib/error-handler/bugsplat-remote-reporter";
12
- export * from "./lib/error-handler/error-batcher";
13
- export * from "./lib/error-handler/error-handler";
14
- export * from "./lib/event/on-card-became-singleton-or-deck";
15
- export * from "./lib/event/triggerable-multicast-delegate";
16
- export * from "./lib/facing/facing";
17
- export * from "./lib/find/find";
18
- export * from "./lib/game-object/cardholder-player-name/cardholder-player-name";
19
- export * from "./lib/game-object/deleted-items-container/deleted-items-container";
20
- export * from "./lib/game-object/garbage/garbage-container";
21
- export * from "./lib/game-object/garbage/simple-card-garbage-handler";
22
- export * from "./lib/game-object/garbage/simple-to-container-handler";
23
- export * from "./lib/game-object/garbage/simple-to-snap-point-handler";
24
- export * from "./lib/global/global-init";
25
- export * from "./lib/global/i-global";
26
- export * from "./lib/heap/heap";
27
- export * from "./lib/layout-objects/layout-objects";
28
- export * from "./lib/locale/locale";
29
- export * from "./lib/namespace-id/namespace-id";
30
- export * from "./lib/nsid/nsid";
31
- export * from "./lib/parse/parse-color";
32
- export * from "./lib/perf/perf";
33
- export * from "./lib/setup/abstract-setup";
34
- export * from "./lib/shuffle/shuffle";
35
- export * from "./lib/spawn/spawn";
36
- export * from "./lib/svg/svg-sparkline";
37
- export * from "./lib/turn-order/turn-order";
38
- export * from "./lib/ui-visibility/ui-visibility";
39
- export * from "./lib/whisper-reporter/whisper-reporter";
40
- export * from "./lib/widget/confirm-button/confirm-button";
41
- export * from "./lib/widget/d6widget/d6widget";
42
- export * from "./lib/widget/end-turn-button/end-turn-button";
43
- export * from "./lib/widget/end-turn-button/end-turn-locale.data";
44
- export * from "./lib/widget/hot-seat-button/hot-seat-button";
45
- export * from "./lib/widget/hot-seat-button/hot-seat-locale.data";
46
- export * from "./lib/widget/perf-widget/perf-widget-locale.data";
47
- export * from "./lib/widget/perf-widget/perf-widget";
48
- export * from "./lib/widget/turn-order-widget/turn-clicked-widget";
49
- export * from "./lib/widget/turn-order-widget/turn-entry-wart";
50
- export * from "./lib/widget/turn-order-widget/turn-entry-widget";
51
- export * from "./lib/widget/turn-order-widget/turn-order-locale.data";
52
- export * from "./lib/widget/turn-order-widget/turn-order-widget-params";
53
- export * from "./lib/widget/turn-order-widget/turn-order-widget";
54
- export * from "./locale.data";
@@ -1,55 +0,0 @@
1
- export * from "./lib/adjacency/adjacency";
2
- export * from "./lib/broadcast/broadcast";
3
- export * from "./lib/bug-workarounds/bug-card-holder-assignment";
4
- export * from "./lib/bug-workarounds/bug-unique-cards";
5
- export * from "./lib/card-util/card-util";
6
- export * from "./lib/context-menu/abstract-right-click-card";
7
- export * from "./lib/context-menu/abstract-right-click-deck";
8
- export * from "./lib/context-menu/leave-seat";
9
- export * from "./lib/data-store/data-store";
10
- export * from "./lib/dice-group/dice-group";
11
- export * from "./lib/error-handler/bugsplat-remote-reporter";
12
- export * from "./lib/error-handler/error-batcher";
13
- export * from "./lib/error-handler/error-handler";
14
- export * from "./lib/event/on-card-became-singleton-or-deck";
15
- export * from "./lib/event/triggerable-multicast-delegate";
16
- export * from "./lib/facing/facing";
17
- export * from "./lib/find/find";
18
- export * from "./lib/game-object/cardholder-player-name/cardholder-player-name";
19
- export * from "./lib/game-object/deleted-items-container/deleted-items-container";
20
- export * from "./lib/game-object/garbage/garbage-container";
21
- export * from "./lib/game-object/garbage/simple-card-garbage-handler";
22
- export * from "./lib/game-object/garbage/simple-to-container-handler";
23
- export * from "./lib/game-object/garbage/simple-to-snap-point-handler";
24
- export * from "./lib/global/global-init";
25
- export * from "./lib/global/i-global";
26
- export * from "./lib/heap/heap";
27
- export * from "./lib/layout-objects/layout-objects";
28
- export * from "./lib/locale/locale";
29
- export * from "./lib/namespace-id/namespace-id";
30
- export * from "./lib/nsid/nsid";
31
- export * from "./lib/parse/parse-color";
32
- export * from "./lib/perf/perf";
33
- export * from "./lib/setup/abstract-setup";
34
- export * from "./lib/shuffle/shuffle";
35
- export * from "./lib/spawn/spawn";
36
- export * from "./lib/svg/svg-sparkline";
37
- export * from "./lib/turn-order/turn-order";
38
- export * from "./lib/ui-visibility/ui-visibility";
39
- export * from "./lib/whisper-reporter/whisper-reporter";
40
- export * from "./lib/widget/confirm-button/confirm-button";
41
- export * from "./lib/widget/d6widget/d6widget";
42
- export * from "./lib/widget/end-turn-button/end-turn-button";
43
- export * from "./lib/widget/end-turn-button/end-turn-locale.data";
44
- export * from "./lib/widget/hot-seat-button/hot-seat-button";
45
- export * from "./lib/widget/hot-seat-button/hot-seat-locale.data";
46
- export * from "./lib/widget/perf-widget/perf-widget-locale.data";
47
- export * from "./lib/widget/perf-widget/perf-widget";
48
- export * from "./lib/widget/turn-order-widget/turn-clicked-widget";
49
- export * from "./lib/widget/turn-order-widget/turn-entry-wart";
50
- export * from "./lib/widget/turn-order-widget/turn-entry-widget";
51
- export * from "./lib/widget/turn-order-widget/turn-order-locale.data";
52
- export * from "./lib/widget/turn-order-widget/turn-order-widget-params";
53
- export * from "./lib/widget/turn-order-widget/turn-order-widget";
54
- export * from "./locale.data";
55
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kDAAkD,CAAC;AACjE,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iEAAiE,CAAC;AAChF,cAAc,mEAAmE,CAAC;AAClF,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,oDAAoD,CAAC;AACnE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,uDAAuD,CAAC;AACtE,cAAc,yDAAyD,CAAC;AACxE,cAAc,kDAAkD,CAAC;AACjE,cAAc,eAAe,CAAC"}
@@ -1,61 +0,0 @@
1
- export type AdjacencyResult = {
2
- node: string;
3
- distance: number;
4
- path: string[];
5
- };
6
- /**
7
- * Nodes have tags, links connect tags.
8
- * Tansit nodes are on a path, but do not add to distance ("hyperlane").
9
- *
10
- * If two nodes share a tag they are NOT connected UNLESS there is a link
11
- * from tag back to itself.
12
- *
13
- * A link may connect to multiple nodes that share the tag.
14
- */
15
- export declare class Adjacency {
16
- private readonly _nodeToTagSet;
17
- private readonly _tagToNodeSet;
18
- private readonly _tagToLinkedTagSet;
19
- private readonly _transitNodes;
20
- /**
21
- * Add a node tag. Node tags may name the node, a specific edge, or a
22
- * possibly-many-neighbors "hub tag" such as a wormhole.
23
- *
24
- * @param node
25
- * @param tags
26
- * @returns
27
- */
28
- addNodeTags(node: string, tags: string[]): this;
29
- removeNodeTags(node: string, tags: string[]): this;
30
- hasNodeTag(node: string, tag: string): boolean;
31
- _hasTagNode(tag: string, node: string): boolean;
32
- /**
33
- * Add a link. A node with one tag is connected to a node with the other.
34
- *
35
- * @param tag1
36
- * @param tag2
37
- * @returns
38
- */
39
- addLink(tag1: string, tag2: string): this;
40
- removeLink(tag1: string, tag2: string): this;
41
- hasLink(tag1: string, tag2: string): boolean;
42
- /**
43
- * Transit nodes can appear along a path but do not add to distance
44
- * (e.g. hyperlanes).
45
- *
46
- * @param node
47
- * @returns
48
- */
49
- addTransitNode(node: string): this;
50
- removeTransitNode(node: string): this;
51
- hasTransitNode(node: string): boolean;
52
- _getAdjacentNodeSet(node: string): Set<string>;
53
- /**
54
- * Compute shortest paths to all nodes within maxDistance.
55
- *
56
- * @param origin
57
- * @param maxDistance
58
- * @returns
59
- */
60
- get(origin: string, maxDistance: number): AdjacencyResult[];
61
- }
@@ -1,212 +0,0 @@
1
- import { Heap } from "../heap/heap";
2
- /**
3
- * Nodes have tags, links connect tags.
4
- * Tansit nodes are on a path, but do not add to distance ("hyperlane").
5
- *
6
- * If two nodes share a tag they are NOT connected UNLESS there is a link
7
- * from tag back to itself.
8
- *
9
- * A link may connect to multiple nodes that share the tag.
10
- */
11
- export class Adjacency {
12
- constructor() {
13
- this._nodeToTagSet = {};
14
- this._tagToNodeSet = {};
15
- this._tagToLinkedTagSet = {};
16
- this._transitNodes = new Set();
17
- }
18
- /**
19
- * Add a node tag. Node tags may name the node, a specific edge, or a
20
- * possibly-many-neighbors "hub tag" such as a wormhole.
21
- *
22
- * @param node
23
- * @param tags
24
- * @returns
25
- */
26
- addNodeTags(node, tags) {
27
- let tagSet;
28
- let nodeSet;
29
- tagSet = this._nodeToTagSet[node];
30
- if (!tagSet) {
31
- tagSet = new Set();
32
- this._nodeToTagSet[node] = tagSet;
33
- }
34
- for (const tag of tags) {
35
- tagSet.add(tag);
36
- nodeSet = this._tagToNodeSet[tag];
37
- if (!nodeSet) {
38
- nodeSet = new Set();
39
- this._tagToNodeSet[tag] = nodeSet;
40
- }
41
- nodeSet.add(node);
42
- }
43
- return this;
44
- }
45
- removeNodeTags(node, tags) {
46
- const tagSet = this._nodeToTagSet[node];
47
- for (const tag of tags) {
48
- if (tagSet) {
49
- tagSet.delete(tag);
50
- }
51
- const nodeSet = this._tagToNodeSet[tag];
52
- if (nodeSet) {
53
- nodeSet.delete(node);
54
- }
55
- }
56
- return this;
57
- }
58
- hasNodeTag(node, tag) {
59
- var _a;
60
- const tagSet = this._nodeToTagSet[node];
61
- return (_a = tagSet === null || tagSet === void 0 ? void 0 : tagSet.has(tag)) !== null && _a !== void 0 ? _a : false;
62
- }
63
- _hasTagNode(tag, node) {
64
- var _a;
65
- const nodeSet = this._tagToNodeSet[tag];
66
- return (_a = nodeSet === null || nodeSet === void 0 ? void 0 : nodeSet.has(node)) !== null && _a !== void 0 ? _a : false;
67
- }
68
- /**
69
- * Add a link. A node with one tag is connected to a node with the other.
70
- *
71
- * @param tag1
72
- * @param tag2
73
- * @returns
74
- */
75
- addLink(tag1, tag2) {
76
- let linkedTagSet;
77
- // 1 -> 1, 1 -> 2.
78
- linkedTagSet = this._tagToLinkedTagSet[tag1];
79
- if (!linkedTagSet) {
80
- linkedTagSet = new Set();
81
- this._tagToLinkedTagSet[tag1] = linkedTagSet;
82
- }
83
- linkedTagSet.add(tag1);
84
- linkedTagSet.add(tag2);
85
- // 2 -> 1, 2 -> 2.
86
- linkedTagSet = this._tagToLinkedTagSet[tag2];
87
- if (!linkedTagSet) {
88
- linkedTagSet = new Set();
89
- this._tagToLinkedTagSet[tag2] = linkedTagSet;
90
- }
91
- linkedTagSet.add(tag1);
92
- linkedTagSet.add(tag2);
93
- return this;
94
- }
95
- removeLink(tag1, tag2) {
96
- let linkedTagSet;
97
- // 1 -> 1, 1 -> 2.
98
- linkedTagSet = this._tagToLinkedTagSet[tag1];
99
- if (linkedTagSet) {
100
- linkedTagSet.delete(tag1);
101
- linkedTagSet.delete(tag2);
102
- }
103
- // 2 -> 1, 2 -> 2.
104
- linkedTagSet = this._tagToLinkedTagSet[tag2];
105
- if (linkedTagSet) {
106
- linkedTagSet.delete(tag1);
107
- linkedTagSet.delete(tag2);
108
- }
109
- return this;
110
- }
111
- hasLink(tag1, tag2) {
112
- var _a;
113
- const linkedTagSet = this._tagToLinkedTagSet[tag1];
114
- return (_a = linkedTagSet === null || linkedTagSet === void 0 ? void 0 : linkedTagSet.has(tag2)) !== null && _a !== void 0 ? _a : false;
115
- }
116
- /**
117
- * Transit nodes can appear along a path but do not add to distance
118
- * (e.g. hyperlanes).
119
- *
120
- * @param node
121
- * @returns
122
- */
123
- addTransitNode(node) {
124
- this._transitNodes.add(node);
125
- return this;
126
- }
127
- removeTransitNode(node) {
128
- this._transitNodes.delete(node);
129
- return this;
130
- }
131
- hasTransitNode(node) {
132
- return this._transitNodes.has(node);
133
- }
134
- _getAdjacentNodeSet(node) {
135
- const tagSet = this._nodeToTagSet[node];
136
- const adjNodeSet = new Set();
137
- if (tagSet) {
138
- for (const tag of tagSet) {
139
- const linkedTagSet = this._tagToLinkedTagSet[tag];
140
- if (linkedTagSet) {
141
- for (const linkedTag of linkedTagSet) {
142
- const nodeSet = this._tagToNodeSet[linkedTag];
143
- if (nodeSet) {
144
- for (const linkedNode of nodeSet) {
145
- if (linkedNode !== node) {
146
- adjNodeSet.add(linkedNode);
147
- }
148
- }
149
- }
150
- }
151
- }
152
- }
153
- }
154
- return adjNodeSet;
155
- }
156
- /**
157
- * Compute shortest paths to all nodes within maxDistance.
158
- *
159
- * @param origin
160
- * @param maxDistance
161
- * @returns
162
- */
163
- get(origin, maxDistance) {
164
- const originAdjacencyResult = {
165
- node: origin,
166
- distance: 0,
167
- path: [origin],
168
- };
169
- const nodeToAdjacencyResult = {
170
- [origin]: originAdjacencyResult,
171
- };
172
- const toVisit = new Set([
173
- originAdjacencyResult,
174
- ]);
175
- const visited = new Set();
176
- const heap = new Heap().add(origin, 0);
177
- while (toVisit.size > 0) {
178
- // Find the closest of the to-visit nodes.
179
- const closestNode = heap.removeMin();
180
- if (!closestNode) {
181
- throw new Error("missing closest node");
182
- }
183
- const closest = nodeToAdjacencyResult[closestNode];
184
- if (!closest) {
185
- throw new Error("missing closest");
186
- }
187
- toVisit.delete(closest);
188
- visited.add(closest.node);
189
- const adjNodeSet = this._getAdjacentNodeSet(closest.node);
190
- for (const adjNode of adjNodeSet) {
191
- if (!visited.has(adjNode)) {
192
- // Add to result.
193
- const isTransit = this._transitNodes.has(adjNode);
194
- const extraDistance = isTransit ? 0 : 1;
195
- const distance = closest.distance + extraDistance;
196
- if (distance <= maxDistance) {
197
- const adjResult = {
198
- node: adjNode,
199
- distance,
200
- path: [...closest.path, adjNode],
201
- };
202
- nodeToAdjacencyResult[adjNode] = adjResult;
203
- toVisit.add(adjResult);
204
- heap.add(adjNode, distance);
205
- }
206
- }
207
- }
208
- }
209
- return Object.values(nodeToAdjacencyResult);
210
- }
211
- }
212
- //# sourceMappingURL=adjacency.js.map