@ttt-productions/q-core 0.1.28 → 0.1.29

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 (472) hide show
  1. package/dist/constants/admin-views.d.ts.map +1 -1
  2. package/dist/constants/admin-views.js +0 -3
  3. package/dist/constants/admin-views.js.map +1 -1
  4. package/dist/constants/business.d.ts.map +1 -1
  5. package/dist/constants/business.js +0 -52
  6. package/dist/constants/business.js.map +1 -1
  7. package/dist/constants/deployment.d.ts +0 -2
  8. package/dist/constants/deployment.d.ts.map +1 -1
  9. package/dist/constants/deployment.js +0 -2
  10. package/dist/constants/deployment.js.map +1 -1
  11. package/dist/constants/media.d.ts.map +1 -1
  12. package/dist/constants/media.js +4 -30
  13. package/dist/constants/media.js.map +1 -1
  14. package/dist/constants/scheduled-jobs.d.ts +0 -25
  15. package/dist/constants/scheduled-jobs.d.ts.map +1 -1
  16. package/dist/constants/scheduled-jobs.js +0 -26
  17. package/dist/constants/scheduled-jobs.js.map +1 -1
  18. package/dist/constants/sports.d.ts.map +1 -1
  19. package/dist/constants/sports.js +2 -25
  20. package/dist/constants/sports.js.map +1 -1
  21. package/dist/constants/storage-keys.d.ts +0 -38
  22. package/dist/constants/storage-keys.d.ts.map +1 -1
  23. package/dist/constants/storage-keys.js +0 -41
  24. package/dist/constants/storage-keys.js.map +1 -1
  25. package/dist/constants/telemetry.d.ts +0 -3
  26. package/dist/constants/telemetry.d.ts.map +1 -1
  27. package/dist/constants/telemetry.js +2 -11
  28. package/dist/constants/telemetry.js.map +1 -1
  29. package/dist/doc-schemas/admin-notifications.d.ts +0 -1
  30. package/dist/doc-schemas/admin-notifications.d.ts.map +1 -1
  31. package/dist/doc-schemas/admin-notifications.js +0 -41
  32. package/dist/doc-schemas/admin-notifications.js.map +1 -1
  33. package/dist/doc-schemas/aggregate-stats.d.ts.map +1 -1
  34. package/dist/doc-schemas/aggregate-stats.js +0 -35
  35. package/dist/doc-schemas/aggregate-stats.js.map +1 -1
  36. package/dist/doc-schemas/atoms.d.ts +0 -17
  37. package/dist/doc-schemas/atoms.d.ts.map +1 -1
  38. package/dist/doc-schemas/atoms.js +0 -36
  39. package/dist/doc-schemas/atoms.js.map +1 -1
  40. package/dist/doc-schemas/audit-event.d.ts.map +1 -1
  41. package/dist/doc-schemas/audit-event.js +0 -8
  42. package/dist/doc-schemas/audit-event.js.map +1 -1
  43. package/dist/doc-schemas/award-group-grant.d.ts +0 -6
  44. package/dist/doc-schemas/award-group-grant.d.ts.map +1 -1
  45. package/dist/doc-schemas/award-group-grant.js +0 -25
  46. package/dist/doc-schemas/award-group-grant.js.map +1 -1
  47. package/dist/doc-schemas/catalogs.d.ts.map +1 -1
  48. package/dist/doc-schemas/catalogs.js +0 -12
  49. package/dist/doc-schemas/catalogs.js.map +1 -1
  50. package/dist/doc-schemas/firestore-primitives.d.ts.map +1 -1
  51. package/dist/doc-schemas/firestore-primitives.js +0 -5
  52. package/dist/doc-schemas/firestore-primitives.js.map +1 -1
  53. package/dist/doc-schemas/gallery.d.ts.map +1 -1
  54. package/dist/doc-schemas/gallery.js +0 -15
  55. package/dist/doc-schemas/gallery.js.map +1 -1
  56. package/dist/doc-schemas/game-location.d.ts.map +1 -1
  57. package/dist/doc-schemas/game-location.js +2 -11
  58. package/dist/doc-schemas/game-location.js.map +1 -1
  59. package/dist/doc-schemas/game-stat-history.d.ts.map +1 -1
  60. package/dist/doc-schemas/game-stat-history.js +0 -9
  61. package/dist/doc-schemas/game-stat-history.js.map +1 -1
  62. package/dist/doc-schemas/game-stats.d.ts.map +1 -1
  63. package/dist/doc-schemas/game-stats.js +0 -56
  64. package/dist/doc-schemas/game-stats.js.map +1 -1
  65. package/dist/doc-schemas/league-team.d.ts.map +1 -1
  66. package/dist/doc-schemas/league-team.js +6 -29
  67. package/dist/doc-schemas/league-team.js.map +1 -1
  68. package/dist/doc-schemas/membership-roster-sync.d.ts.map +1 -1
  69. package/dist/doc-schemas/membership-roster-sync.js +0 -17
  70. package/dist/doc-schemas/membership-roster-sync.js.map +1 -1
  71. package/dist/doc-schemas/migration-console.d.ts +0 -10
  72. package/dist/doc-schemas/migration-console.d.ts.map +1 -1
  73. package/dist/doc-schemas/migration-console.js +0 -32
  74. package/dist/doc-schemas/migration-console.js.map +1 -1
  75. package/dist/doc-schemas/pending-media.d.ts.map +1 -1
  76. package/dist/doc-schemas/pending-media.js +0 -17
  77. package/dist/doc-schemas/pending-media.js.map +1 -1
  78. package/dist/doc-schemas/picture-retirement.d.ts.map +1 -1
  79. package/dist/doc-schemas/picture-retirement.js +0 -10
  80. package/dist/doc-schemas/picture-retirement.js.map +1 -1
  81. package/dist/doc-schemas/publicUser.d.ts.map +1 -1
  82. package/dist/doc-schemas/publicUser.js +0 -5
  83. package/dist/doc-schemas/publicUser.js.map +1 -1
  84. package/dist/doc-schemas/registration-start.d.ts.map +1 -1
  85. package/dist/doc-schemas/registration-start.js +2 -5
  86. package/dist/doc-schemas/registration-start.js.map +1 -1
  87. package/dist/doc-schemas/registry.d.ts.map +1 -1
  88. package/dist/doc-schemas/registry.js +0 -10
  89. package/dist/doc-schemas/registry.js.map +1 -1
  90. package/dist/doc-schemas/reserved-display-name.d.ts.map +1 -1
  91. package/dist/doc-schemas/reserved-display-name.js +0 -5
  92. package/dist/doc-schemas/reserved-display-name.js.map +1 -1
  93. package/dist/doc-schemas/sport-game.d.ts.map +1 -1
  94. package/dist/doc-schemas/sport-game.js +1 -29
  95. package/dist/doc-schemas/sport-game.js.map +1 -1
  96. package/dist/doc-schemas/sport-league.d.ts +0 -9
  97. package/dist/doc-schemas/sport-league.d.ts.map +1 -1
  98. package/dist/doc-schemas/sport-league.js +4 -26
  99. package/dist/doc-schemas/sport-league.js.map +1 -1
  100. package/dist/doc-schemas/stats-operation.d.ts.map +1 -1
  101. package/dist/doc-schemas/stats-operation.js +2 -44
  102. package/dist/doc-schemas/stats-operation.js.map +1 -1
  103. package/dist/doc-schemas/status-reconcile-queue.d.ts +0 -6
  104. package/dist/doc-schemas/status-reconcile-queue.d.ts.map +1 -1
  105. package/dist/doc-schemas/status-reconcile-queue.js +0 -13
  106. package/dist/doc-schemas/status-reconcile-queue.js.map +1 -1
  107. package/dist/doc-schemas/sweep-state.d.ts.map +1 -1
  108. package/dist/doc-schemas/sweep-state.js +4 -20
  109. package/dist/doc-schemas/sweep-state.js.map +1 -1
  110. package/dist/doc-schemas/system.d.ts.map +1 -1
  111. package/dist/doc-schemas/system.js +1 -27
  112. package/dist/doc-schemas/system.js.map +1 -1
  113. package/dist/doc-schemas/team-membership.d.ts.map +1 -1
  114. package/dist/doc-schemas/team-membership.js +0 -10
  115. package/dist/doc-schemas/team-membership.js.map +1 -1
  116. package/dist/doc-schemas/user-profile.d.ts +0 -1
  117. package/dist/doc-schemas/user-profile.d.ts.map +1 -1
  118. package/dist/doc-schemas/user-profile.js +0 -28
  119. package/dist/doc-schemas/user-profile.js.map +1 -1
  120. package/dist/doc-schemas/waiver-template.d.ts.map +1 -1
  121. package/dist/doc-schemas/waiver-template.js +4 -25
  122. package/dist/doc-schemas/waiver-template.js.map +1 -1
  123. package/dist/doc-schemas/waivers-and-hardware.d.ts.map +1 -1
  124. package/dist/doc-schemas/waivers-and-hardware.js +0 -20
  125. package/dist/doc-schemas/waivers-and-hardware.js.map +1 -1
  126. package/dist/domain-events/domain-events.d.ts.map +1 -1
  127. package/dist/domain-events/domain-events.js +0 -67
  128. package/dist/domain-events/domain-events.js.map +1 -1
  129. package/dist/ids/award-grant-ids.d.ts.map +1 -1
  130. package/dist/ids/award-grant-ids.js +0 -7
  131. package/dist/ids/award-grant-ids.js.map +1 -1
  132. package/dist/ids/compound-ids.d.ts.map +1 -1
  133. package/dist/ids/compound-ids.js +0 -7
  134. package/dist/ids/compound-ids.js.map +1 -1
  135. package/dist/ids/minted-ids.d.ts.map +1 -1
  136. package/dist/ids/minted-ids.js +4 -14
  137. package/dist/ids/minted-ids.js.map +1 -1
  138. package/dist/ids/notification-ids.d.ts.map +1 -1
  139. package/dist/ids/notification-ids.js +0 -15
  140. package/dist/ids/notification-ids.js.map +1 -1
  141. package/dist/ids/picture-ids.d.ts +0 -5
  142. package/dist/ids/picture-ids.d.ts.map +1 -1
  143. package/dist/ids/picture-ids.js +0 -11
  144. package/dist/ids/picture-ids.js.map +1 -1
  145. package/dist/ids/stat-event-ids.d.ts +0 -6
  146. package/dist/ids/stat-event-ids.d.ts.map +1 -1
  147. package/dist/ids/stat-event-ids.js +0 -15
  148. package/dist/ids/stat-event-ids.js.map +1 -1
  149. package/dist/ids/stats-operation-ids.d.ts.map +1 -1
  150. package/dist/ids/stats-operation-ids.js +0 -7
  151. package/dist/ids/stats-operation-ids.js.map +1 -1
  152. package/dist/ids/waiver-template-ids.d.ts +0 -1
  153. package/dist/ids/waiver-template-ids.d.ts.map +1 -1
  154. package/dist/ids/waiver-template-ids.js +0 -2
  155. package/dist/ids/waiver-template-ids.js.map +1 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +0 -2
  158. package/dist/index.js.map +1 -1
  159. package/dist/input-formats/input-formats.d.ts +0 -80
  160. package/dist/input-formats/input-formats.d.ts.map +1 -1
  161. package/dist/input-formats/input-formats.js +0 -86
  162. package/dist/input-formats/input-formats.js.map +1 -1
  163. package/dist/media/file-origins.d.ts +0 -3
  164. package/dist/media/file-origins.d.ts.map +1 -1
  165. package/dist/media/file-origins.js +0 -26
  166. package/dist/media/file-origins.js.map +1 -1
  167. package/dist/media/picture-aspects.d.ts +0 -2
  168. package/dist/media/picture-aspects.d.ts.map +1 -1
  169. package/dist/media/picture-aspects.js +0 -5
  170. package/dist/media/picture-aspects.js.map +1 -1
  171. package/dist/media/picture-url.d.ts +0 -6
  172. package/dist/media/picture-url.d.ts.map +1 -1
  173. package/dist/media/picture-url.js +0 -9
  174. package/dist/media/picture-url.js.map +1 -1
  175. package/dist/media/upload-tray-display.d.ts +0 -3
  176. package/dist/media/upload-tray-display.d.ts.map +1 -1
  177. package/dist/media/upload-tray-display.js +0 -6
  178. package/dist/media/upload-tray-display.js.map +1 -1
  179. package/dist/migration-console/action-ids.d.ts +0 -1
  180. package/dist/migration-console/action-ids.d.ts.map +1 -1
  181. package/dist/migration-console/action-ids.js +2 -45
  182. package/dist/migration-console/action-ids.js.map +1 -1
  183. package/dist/migration-console/manifest.d.ts +0 -24
  184. package/dist/migration-console/manifest.d.ts.map +1 -1
  185. package/dist/migration-console/manifest.js +1 -56
  186. package/dist/migration-console/manifest.js.map +1 -1
  187. package/dist/migration-console/run-state.d.ts +0 -14
  188. package/dist/migration-console/run-state.d.ts.map +1 -1
  189. package/dist/migration-console/run-state.js +0 -16
  190. package/dist/migration-console/run-state.js.map +1 -1
  191. package/dist/notifications/admin-notification-config.d.ts +0 -11
  192. package/dist/notifications/admin-notification-config.d.ts.map +1 -1
  193. package/dist/notifications/admin-notification-config.js +2 -13
  194. package/dist/notifications/admin-notification-config.js.map +1 -1
  195. package/dist/notifications/archive-all.d.ts.map +1 -1
  196. package/dist/notifications/archive-all.js +0 -2
  197. package/dist/notifications/archive-all.js.map +1 -1
  198. package/dist/notifications/occurrences.d.ts +0 -3
  199. package/dist/notifications/occurrences.d.ts.map +1 -1
  200. package/dist/notifications/occurrences.js +0 -7
  201. package/dist/notifications/occurrences.js.map +1 -1
  202. package/dist/paths/app-routes.d.ts +0 -12
  203. package/dist/paths/app-routes.d.ts.map +1 -1
  204. package/dist/paths/app-routes.js +0 -18
  205. package/dist/paths/app-routes.js.map +1 -1
  206. package/dist/paths/collection-groups.d.ts.map +1 -1
  207. package/dist/paths/collection-groups.js +0 -5
  208. package/dist/paths/collection-groups.js.map +1 -1
  209. package/dist/paths/collection-refs.d.ts.map +1 -1
  210. package/dist/paths/collection-refs.js +0 -4
  211. package/dist/paths/collection-refs.js.map +1 -1
  212. package/dist/paths/collections.d.ts +0 -5
  213. package/dist/paths/collections.d.ts.map +1 -1
  214. package/dist/paths/collections.js +0 -68
  215. package/dist/paths/collections.js.map +1 -1
  216. package/dist/paths/path-builders.d.ts.map +1 -1
  217. package/dist/paths/path-builders.js +0 -16
  218. package/dist/paths/path-builders.js.map +1 -1
  219. package/dist/paths/picture-owner-paths.d.ts +0 -4
  220. package/dist/paths/picture-owner-paths.d.ts.map +1 -1
  221. package/dist/paths/picture-owner-paths.js +0 -10
  222. package/dist/paths/picture-owner-paths.js.map +1 -1
  223. package/dist/paths/storage-paths.d.ts +0 -18
  224. package/dist/paths/storage-paths.d.ts.map +1 -1
  225. package/dist/paths/storage-paths.js +0 -23
  226. package/dist/paths/storage-paths.js.map +1 -1
  227. package/dist/paths/utils.d.ts +0 -6
  228. package/dist/paths/utils.d.ts.map +1 -1
  229. package/dist/paths/utils.js +0 -9
  230. package/dist/paths/utils.js.map +1 -1
  231. package/dist/schemas/account-settings.d.ts.map +1 -1
  232. package/dist/schemas/account-settings.js +0 -7
  233. package/dist/schemas/account-settings.js.map +1 -1
  234. package/dist/schemas/admin-notifications.d.ts.map +1 -1
  235. package/dist/schemas/admin-notifications.js +0 -17
  236. package/dist/schemas/admin-notifications.js.map +1 -1
  237. package/dist/schemas/admin-stats.d.ts.map +1 -1
  238. package/dist/schemas/admin-stats.js +0 -9
  239. package/dist/schemas/admin-stats.js.map +1 -1
  240. package/dist/schemas/app-config.d.ts.map +1 -1
  241. package/dist/schemas/app-config.js +0 -10
  242. package/dist/schemas/app-config.js.map +1 -1
  243. package/dist/schemas/atoms.d.ts.map +1 -1
  244. package/dist/schemas/atoms.js +0 -10
  245. package/dist/schemas/atoms.js.map +1 -1
  246. package/dist/schemas/awards.d.ts.map +1 -1
  247. package/dist/schemas/awards.js +0 -29
  248. package/dist/schemas/awards.js.map +1 -1
  249. package/dist/schemas/dead-letters.d.ts +0 -3
  250. package/dist/schemas/dead-letters.d.ts.map +1 -1
  251. package/dist/schemas/dead-letters.js +0 -15
  252. package/dist/schemas/dead-letters.js.map +1 -1
  253. package/dist/schemas/game-locations.d.ts.map +1 -1
  254. package/dist/schemas/game-locations.js +0 -6
  255. package/dist/schemas/game-locations.js.map +1 -1
  256. package/dist/schemas/hardware-loan-contracts.d.ts.map +1 -1
  257. package/dist/schemas/hardware-loan-contracts.js +0 -13
  258. package/dist/schemas/hardware-loan-contracts.js.map +1 -1
  259. package/dist/schemas/index.d.ts.map +1 -1
  260. package/dist/schemas/index.js +0 -2
  261. package/dist/schemas/index.js.map +1 -1
  262. package/dist/schemas/leagues.d.ts.map +1 -1
  263. package/dist/schemas/leagues.js +0 -24
  264. package/dist/schemas/leagues.js.map +1 -1
  265. package/dist/schemas/migration-console.d.ts +0 -7
  266. package/dist/schemas/migration-console.d.ts.map +1 -1
  267. package/dist/schemas/migration-console.js +0 -34
  268. package/dist/schemas/migration-console.js.map +1 -1
  269. package/dist/schemas/pictures.d.ts.map +1 -1
  270. package/dist/schemas/pictures.js +0 -10
  271. package/dist/schemas/pictures.js.map +1 -1
  272. package/dist/schemas/schedules.d.ts.map +1 -1
  273. package/dist/schemas/schedules.js +0 -26
  274. package/dist/schemas/schedules.js.map +1 -1
  275. package/dist/schemas/scoring.d.ts +0 -6
  276. package/dist/schemas/scoring.d.ts.map +1 -1
  277. package/dist/schemas/scoring.js +0 -33
  278. package/dist/schemas/scoring.js.map +1 -1
  279. package/dist/schemas/signed-waivers.d.ts.map +1 -1
  280. package/dist/schemas/signed-waivers.js +0 -22
  281. package/dist/schemas/signed-waivers.js.map +1 -1
  282. package/dist/schemas/stats.d.ts.map +1 -1
  283. package/dist/schemas/stats.js +0 -60
  284. package/dist/schemas/stats.js.map +1 -1
  285. package/dist/schemas/team-joining.d.ts.map +1 -1
  286. package/dist/schemas/team-joining.js +0 -30
  287. package/dist/schemas/team-joining.js.map +1 -1
  288. package/dist/schemas/teams.d.ts +0 -1
  289. package/dist/schemas/teams.d.ts.map +1 -1
  290. package/dist/schemas/teams.js +0 -83
  291. package/dist/schemas/teams.js.map +1 -1
  292. package/dist/schemas/uploads.d.ts +0 -8
  293. package/dist/schemas/uploads.d.ts.map +1 -1
  294. package/dist/schemas/uploads.js +0 -29
  295. package/dist/schemas/uploads.js.map +1 -1
  296. package/dist/schemas/users.d.ts +0 -1
  297. package/dist/schemas/users.d.ts.map +1 -1
  298. package/dist/schemas/users.js +0 -41
  299. package/dist/schemas/users.js.map +1 -1
  300. package/dist/schemas/waiver-templates.d.ts.map +1 -1
  301. package/dist/schemas/waiver-templates.js +0 -7
  302. package/dist/schemas/waiver-templates.js.map +1 -1
  303. package/dist/sports/basketball-scoring.d.ts +0 -4
  304. package/dist/sports/basketball-scoring.d.ts.map +1 -1
  305. package/dist/sports/basketball-scoring.js +0 -34
  306. package/dist/sports/basketball-scoring.js.map +1 -1
  307. package/dist/sports/basketball.d.ts.map +1 -1
  308. package/dist/sports/basketball.js +0 -5
  309. package/dist/sports/basketball.js.map +1 -1
  310. package/dist/sports/bulk-entry.d.ts +0 -22
  311. package/dist/sports/bulk-entry.d.ts.map +1 -1
  312. package/dist/sports/bulk-entry.js +0 -10
  313. package/dist/sports/bulk-entry.js.map +1 -1
  314. package/dist/sports/column-catalog.d.ts +0 -17
  315. package/dist/sports/column-catalog.d.ts.map +1 -1
  316. package/dist/sports/column-catalog.js +0 -10
  317. package/dist/sports/column-catalog.js.map +1 -1
  318. package/dist/sports/contribution.d.ts +2 -59
  319. package/dist/sports/contribution.d.ts.map +1 -1
  320. package/dist/sports/contribution.js +2 -45
  321. package/dist/sports/contribution.js.map +1 -1
  322. package/dist/sports/curling-scoring.d.ts +0 -1
  323. package/dist/sports/curling-scoring.d.ts.map +1 -1
  324. package/dist/sports/curling-scoring.js +0 -27
  325. package/dist/sports/curling-scoring.js.map +1 -1
  326. package/dist/sports/curling.d.ts.map +1 -1
  327. package/dist/sports/curling.js +0 -4
  328. package/dist/sports/curling.js.map +1 -1
  329. package/dist/sports/finalized-record.d.ts +0 -17
  330. package/dist/sports/finalized-record.d.ts.map +1 -1
  331. package/dist/sports/finalized-record.js +0 -20
  332. package/dist/sports/finalized-record.js.map +1 -1
  333. package/dist/sports/football-scoring.d.ts.map +1 -1
  334. package/dist/sports/football-scoring.js +0 -21
  335. package/dist/sports/football-scoring.js.map +1 -1
  336. package/dist/sports/football.d.ts.map +1 -1
  337. package/dist/sports/football.js +0 -4
  338. package/dist/sports/football.js.map +1 -1
  339. package/dist/sports/index.d.ts.map +1 -1
  340. package/dist/sports/index.js +0 -2
  341. package/dist/sports/index.js.map +1 -1
  342. package/dist/sports/ledger-continuity.d.ts +0 -2
  343. package/dist/sports/ledger-continuity.d.ts.map +1 -1
  344. package/dist/sports/ledger-continuity.js +0 -5
  345. package/dist/sports/ledger-continuity.js.map +1 -1
  346. package/dist/sports/lifetime-summary.d.ts +0 -6
  347. package/dist/sports/lifetime-summary.d.ts.map +1 -1
  348. package/dist/sports/lifetime-summary.js +0 -7
  349. package/dist/sports/lifetime-summary.js.map +1 -1
  350. package/dist/sports/rankings.d.ts +0 -12
  351. package/dist/sports/rankings.d.ts.map +1 -1
  352. package/dist/sports/rankings.js +0 -15
  353. package/dist/sports/rankings.js.map +1 -1
  354. package/dist/sports/registry.d.ts +0 -10
  355. package/dist/sports/registry.d.ts.map +1 -1
  356. package/dist/sports/registry.js +0 -9
  357. package/dist/sports/registry.js.map +1 -1
  358. package/dist/sports/replay.d.ts +0 -11
  359. package/dist/sports/replay.d.ts.map +1 -1
  360. package/dist/sports/replay.js +0 -16
  361. package/dist/sports/replay.js.map +1 -1
  362. package/dist/sports/rollup-check.d.ts +0 -7
  363. package/dist/sports/rollup-check.d.ts.map +1 -1
  364. package/dist/sports/rollup-check.js +0 -14
  365. package/dist/sports/rollup-check.js.map +1 -1
  366. package/dist/sports/score-mirror.d.ts +0 -1
  367. package/dist/sports/score-mirror.d.ts.map +1 -1
  368. package/dist/sports/score-mirror.js +0 -4
  369. package/dist/sports/score-mirror.js.map +1 -1
  370. package/dist/sports/scoring-display.d.ts +0 -30
  371. package/dist/sports/scoring-display.d.ts.map +1 -1
  372. package/dist/sports/scoring-display.js +0 -9
  373. package/dist/sports/scoring-display.js.map +1 -1
  374. package/dist/sports/scoring.d.ts +0 -36
  375. package/dist/sports/scoring.d.ts.map +1 -1
  376. package/dist/sports/scoring.js +0 -10
  377. package/dist/sports/scoring.js.map +1 -1
  378. package/dist/sports/shared-columns.d.ts +0 -1
  379. package/dist/sports/shared-columns.d.ts.map +1 -1
  380. package/dist/sports/shared-columns.js +0 -7
  381. package/dist/sports/shared-columns.js.map +1 -1
  382. package/dist/sports/sport-adapter.d.ts +0 -32
  383. package/dist/sports/sport-adapter.d.ts.map +1 -1
  384. package/dist/sports/sport-adapter.js +0 -7
  385. package/dist/sports/sport-adapter.js.map +1 -1
  386. package/dist/sports/store-driver.d.ts +0 -28
  387. package/dist/sports/store-driver.d.ts.map +1 -1
  388. package/dist/sports/store-driver.js +0 -38
  389. package/dist/sports/store-driver.js.map +1 -1
  390. package/dist/types/audit.d.ts.map +1 -1
  391. package/dist/types/audit.js +0 -67
  392. package/dist/types/audit.js.map +1 -1
  393. package/dist/types/claims.d.ts +0 -10
  394. package/dist/types/claims.d.ts.map +1 -1
  395. package/dist/types/claims.js +0 -16
  396. package/dist/types/claims.js.map +1 -1
  397. package/dist/types/notifications.d.ts.map +1 -1
  398. package/dist/types/notifications.js +7 -25
  399. package/dist/types/notifications.js.map +1 -1
  400. package/dist/types/picture-owners.d.ts +0 -1
  401. package/dist/types/picture-owners.d.ts.map +1 -1
  402. package/dist/types/picture-owners.js +0 -6
  403. package/dist/types/picture-owners.js.map +1 -1
  404. package/dist/types/schedules.d.ts.map +1 -1
  405. package/dist/types/schedules.js +0 -9
  406. package/dist/types/schedules.js.map +1 -1
  407. package/dist/types/sports.d.ts.map +1 -1
  408. package/dist/types/sports.js +0 -24
  409. package/dist/types/sports.js.map +1 -1
  410. package/dist/types/stats.d.ts.map +1 -1
  411. package/dist/types/stats.js +0 -65
  412. package/dist/types/stats.js.map +1 -1
  413. package/dist/types/unions.d.ts +0 -2
  414. package/dist/types/unions.d.ts.map +1 -1
  415. package/dist/types/unions.js +3 -91
  416. package/dist/types/unions.js.map +1 -1
  417. package/dist/types/uploads.d.ts.map +1 -1
  418. package/dist/types/uploads.js +0 -7
  419. package/dist/types/uploads.js.map +1 -1
  420. package/dist/upload-variables/on-progress.d.ts.map +1 -1
  421. package/dist/upload-variables/on-progress.js +2 -5
  422. package/dist/upload-variables/on-progress.js.map +1 -1
  423. package/dist/upload-variables/picture-upload-variables.d.ts +0 -1
  424. package/dist/upload-variables/picture-upload-variables.d.ts.map +1 -1
  425. package/dist/upload-variables/picture-upload-variables.js +0 -4
  426. package/dist/upload-variables/picture-upload-variables.js.map +1 -1
  427. package/dist/upload-variables/sign-hardware-contract-variables.d.ts.map +1 -1
  428. package/dist/upload-variables/sign-hardware-contract-variables.js +0 -2
  429. package/dist/upload-variables/sign-hardware-contract-variables.js.map +1 -1
  430. package/dist/upload-variables/sign-waiver-variables.d.ts.map +1 -1
  431. package/dist/upload-variables/sign-waiver-variables.js +0 -4
  432. package/dist/upload-variables/sign-waiver-variables.js.map +1 -1
  433. package/dist/utils/account-status.d.ts.map +1 -1
  434. package/dist/utils/account-status.js +0 -4
  435. package/dist/utils/account-status.js.map +1 -1
  436. package/dist/utils/app-config.d.ts +0 -53
  437. package/dist/utils/app-config.d.ts.map +1 -1
  438. package/dist/utils/app-config.js +0 -62
  439. package/dist/utils/app-config.js.map +1 -1
  440. package/dist/utils/display-name.d.ts +0 -7
  441. package/dist/utils/display-name.d.ts.map +1 -1
  442. package/dist/utils/display-name.js +0 -8
  443. package/dist/utils/display-name.js.map +1 -1
  444. package/dist/utils/league-calendar.d.ts +0 -11
  445. package/dist/utils/league-calendar.d.ts.map +1 -1
  446. package/dist/utils/league-calendar.js +1 -18
  447. package/dist/utils/league-calendar.js.map +1 -1
  448. package/dist/utils/league-join-warning.d.ts +0 -11
  449. package/dist/utils/league-join-warning.d.ts.map +1 -1
  450. package/dist/utils/league-join-warning.js +0 -28
  451. package/dist/utils/league-join-warning.js.map +1 -1
  452. package/dist/utils/league-joining.d.ts +0 -1
  453. package/dist/utils/league-joining.d.ts.map +1 -1
  454. package/dist/utils/league-joining.js +0 -7
  455. package/dist/utils/league-joining.js.map +1 -1
  456. package/dist/utils/league-mode.d.ts +0 -1
  457. package/dist/utils/league-mode.d.ts.map +1 -1
  458. package/dist/utils/league-mode.js +0 -4
  459. package/dist/utils/league-mode.js.map +1 -1
  460. package/dist/utils/schedules.d.ts +0 -15
  461. package/dist/utils/schedules.d.ts.map +1 -1
  462. package/dist/utils/schedules.js +0 -19
  463. package/dist/utils/schedules.js.map +1 -1
  464. package/dist/utils/team-creation.d.ts +0 -2
  465. package/dist/utils/team-creation.d.ts.map +1 -1
  466. package/dist/utils/team-creation.js +0 -6
  467. package/dist/utils/team-creation.js.map +1 -1
  468. package/dist/utils/team-member-actions.d.ts +0 -6
  469. package/dist/utils/team-member-actions.d.ts.map +1 -1
  470. package/dist/utils/team-member-actions.js +0 -12
  471. package/dist/utils/team-member-actions.js.map +1 -1
  472. package/package.json +1 -1
@@ -1,200 +1,120 @@
1
- /**
2
- * The reason an admin gives for a repair action, as `repairReasonSchema` reads it: trimmed, then
3
- * bounded by the repair-reason limits, with any character and line breaks allowed.
4
- */
5
1
  export declare const REPAIR_REASON_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
6
2
  readonly format: "none";
7
3
  readonly min: 3;
8
4
  readonly max: 500;
9
5
  }>;
10
- /**
11
- * The evidence an operator records for a cutover step the console cannot see done — an export's
12
- * operation name, a revocation's console record: trimmed, then bounded by the repair-reason limits,
13
- * line breaks allowed.
14
- */
15
6
  export declare const MIGRATION_EVIDENCE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
16
7
  readonly format: "none";
17
8
  readonly min: 3;
18
9
  readonly max: 500;
19
10
  }>;
20
- /**
21
- * A player's message to the team they ask to join, as `teamJoinRequestMessageSchema` reads it:
22
- * trimmed, then bounded by the join-request message limits, with any character and line breaks
23
- * allowed.
24
- */
25
11
  export declare const TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
26
12
  readonly format: "none";
27
13
  readonly min: 10;
28
14
  readonly max: 500;
29
15
  }>;
30
- /**
31
- * The optional note a team sends with an invitation, as `teamInvitationMessageSchema` reads it:
32
- * trimmed, empty allowed, then bounded by the invitation note limit, line breaks allowed.
33
- */
34
16
  export declare const TEAM_INVITATION_MESSAGE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
35
17
  readonly format: "none";
36
18
  readonly min: 0;
37
19
  readonly max: 500;
38
20
  }>;
39
- /**
40
- * A scorer's note on one person in a live game ("red shirt", "#9"), as `gameMemoSchema` reads it:
41
- * trimmed, one line, empty allowed — an empty memo clears the note — then bounded by the memo cap.
42
- */
43
21
  export declare const GAME_MEMO_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
44
22
  readonly format: "singleLine";
45
23
  readonly min: 0;
46
24
  readonly max: 30;
47
25
  }>;
48
- /**
49
- * A person's display name — an account's, or a ghost player's, as both ghost doors and the admin's
50
- * ghost captain ask for it — as `displayNameSchema` reads it: trimmed, one line, then bounded by the
51
- * display-name limits.
52
- */
53
26
  export declare const DISPLAY_NAME_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
54
27
  readonly format: "singleLine";
55
28
  readonly min: 3;
56
29
  readonly max: 50;
57
30
  }>;
58
- /**
59
- * A team's name, as `teamNameSchema` reads it at creation and at an admin's rename: trimmed, one
60
- * line, then bounded by the team-name limits.
61
- */
62
31
  export declare const TEAM_NAME_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
63
32
  readonly format: "singleLine";
64
33
  readonly min: 3;
65
34
  readonly max: 50;
66
35
  }>;
67
- /**
68
- * The number the league reaches a team on, as `contactPhoneSchema` reads it: trimmed, one line,
69
- * required, and bounded by the contact-phone cap. It is kept as typed — no format is imposed.
70
- */
71
36
  export declare const CONTACT_PHONE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
72
37
  readonly format: "singleLine";
73
38
  readonly min: 1;
74
39
  readonly max: 30;
75
40
  }>;
76
- /**
77
- * The account's optional default contact phone on the settings page: the contact-phone format with
78
- * empty allowed. Empty means remove the saved number — the form sends it as
79
- * `UpdateAccountSettingsInput.defaultContactPhone: null` — and any other value is held to
80
- * `CONTACT_PHONE_INPUT_FORMAT`'s trim, one line, and cap.
81
- */
82
41
  export declare const OPTIONAL_CONTACT_PHONE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
83
42
  readonly format: "singleLine";
84
43
  readonly min: 0;
85
44
  readonly max: 30;
86
45
  }>;
87
- /**
88
- * An award's name in the catalog, as `awardNameSchema` reads it — at creation, sent with the award's
89
- * first badge: trimmed, one line, then bounded by the award-name limits.
90
- */
91
46
  export declare const AWARD_NAME_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
92
47
  readonly format: "singleLine";
93
48
  readonly min: 3;
94
49
  readonly max: 60;
95
50
  }>;
96
- /**
97
- * A league's title, as `leagueTitleSchema` reads it at creation and at the settings edit: trimmed,
98
- * one line, then bounded by the league-title limits.
99
- */
100
51
  export declare const LEAGUE_TITLE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
101
52
  readonly format: "singleLine";
102
53
  readonly min: 3;
103
54
  readonly max: 100;
104
55
  }>;
105
- /**
106
- * A league's description, as `leagueDescriptionSchema` reads it at creation and at the settings
107
- * edit: trimmed, then bounded by the league-description limits, line breaks allowed.
108
- */
109
56
  export declare const LEAGUE_DESCRIPTION_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
110
57
  readonly format: "none";
111
58
  readonly min: 10;
112
59
  readonly max: 5000;
113
60
  }>;
114
- /** A venue's name, as `gameLocationNameSchema` reads it: trimmed, one line, required, within its cap. */
115
61
  export declare const GAME_LOCATION_NAME_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
116
62
  readonly format: "singleLine";
117
63
  readonly min: 1;
118
64
  readonly max: 100;
119
65
  }>;
120
- /**
121
- * A venue's street address, as `gameLocationStreetAddressSchema` reads it: trimmed, one line,
122
- * required, within its cap.
123
- */
124
66
  export declare const GAME_LOCATION_STREET_ADDRESS_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
125
67
  readonly format: "singleLine";
126
68
  readonly min: 1;
127
69
  readonly max: 200;
128
70
  }>;
129
- /**
130
- * One court, sheet, or room of a venue, as `gameLocationSubLocationSchema` reads it: trimmed, one
131
- * line, required, within its cap.
132
- */
133
71
  export declare const GAME_LOCATION_SUB_LOCATION_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
134
72
  readonly format: "singleLine";
135
73
  readonly min: 1;
136
74
  readonly max: 60;
137
75
  }>;
138
- /**
139
- * A venue's memo, as `gameLocationMemoSchema` reads it: trimmed, line breaks allowed, empty allowed —
140
- * an empty memo means the venue has none — within its cap.
141
- */
142
76
  export declare const GAME_LOCATION_MEMO_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
143
77
  readonly format: "none";
144
78
  readonly min: 0;
145
79
  readonly max: 500;
146
80
  }>;
147
- /** A schedule week's name, as `scheduleWeekTitleSchema` reads it: trimmed, one line, required. */
148
81
  export declare const SCHEDULE_WEEK_TITLE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
149
82
  readonly format: "singleLine";
150
83
  readonly min: 1;
151
84
  readonly max: 100;
152
85
  }>;
153
- /**
154
- * A waiver template's title, as `waiverTemplateTitleSchema` reads it. A waiver is a legal artifact a
155
- * player signs, so its words are kept exactly as typed; it still cannot be blank.
156
- */
157
86
  export declare const WAIVER_TEMPLATE_TITLE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
158
87
  readonly format: "singleLine";
159
88
  readonly min: 1;
160
89
  readonly max: 120;
161
90
  readonly keepAsTyped: true;
162
91
  }>;
163
- /**
164
- * A waiver template's wording, as `waiverTemplateTextSchema` reads it: the legal text a player signs,
165
- * kept exactly as typed, line breaks allowed, never blank.
166
- */
167
92
  export declare const WAIVER_TEMPLATE_TEXT_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
168
93
  readonly format: "none";
169
94
  readonly min: 1;
170
95
  readonly max: 20000;
171
96
  readonly keepAsTyped: true;
172
97
  }>;
173
- /** The landing page's hero title: trimmed, one line; blank shows the default heading. */
174
98
  export declare const LANDING_HERO_TITLE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
175
99
  readonly format: "singleLine";
176
100
  readonly min: 0;
177
101
  readonly max: 200;
178
102
  }>;
179
- /** The landing page's about text: trimmed, line breaks allowed, empty allowed. */
180
103
  export declare const LANDING_ABOUT_TEXT_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
181
104
  readonly format: "none";
182
105
  readonly min: 0;
183
106
  readonly max: 5000;
184
107
  }>;
185
- /** The message shown while the app is in maintenance; empty shows none. */
186
108
  export declare const MAINTENANCE_MESSAGE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
187
109
  readonly format: "none";
188
110
  readonly min: 0;
189
111
  readonly max: 2000;
190
112
  }>;
191
- /** The site announcement banner; empty clears it. */
192
113
  export declare const ANNOUNCEMENT_MESSAGE_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
193
114
  readonly format: "none";
194
115
  readonly min: 0;
195
116
  readonly max: 300;
196
117
  }>;
197
- /** The published app version the version gate compares against; never blank. */
198
118
  export declare const APP_VERSION_INPUT_FORMAT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
199
119
  readonly format: "none";
200
120
  readonly min: 1;
@@ -1 +1 @@
1
- {"version":3,"file":"input-formats.d.ts","sourceRoot":"","sources":["../../src/input-formats/input-formats.ts"],"names":[],"mappings":"AAwCA;;;GAGG;AACH,eAAO,MAA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AAC"}
@@ -1,208 +1,122 @@
1
- // The declared formats of the free-text fields a form takes, each built from the limits the field
2
- // enforces (RULE-STD-ARCH-102). ui-core's text inputs and `ConsequenceDialog`'s reason field take only a
3
- // declaration, never a bare bound, and a field's wire schema is built from the same declaration
4
- // through `textFieldSchema`, so the form and the wire run the one check and accept exactly the same
5
- // text. `input-format-core` is server-safe and has no dependencies, so the declarations sit in the
6
- // package root, which both app roots import.
7
1
  import { defineInputFormat } from '@ttt-productions/input-format-core';
8
2
  import { MAX_ANNOUNCEMENT_MESSAGE_LENGTH, MAX_APP_VERSION_LENGTH, MAX_AWARD_NAME_LENGTH, MAX_CONTACT_PHONE_LENGTH, MAX_DISPLAY_NAME_LENGTH, MAX_GAME_LOCATION_MEMO_LENGTH, MAX_GAME_LOCATION_NAME_LENGTH, MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH, MAX_GAME_LOCATION_SUB_LOCATION_LENGTH, MAX_GAME_MEMO_LENGTH, MAX_LANDING_ABOUT_TEXT_LENGTH, MAX_LANDING_HERO_TITLE_LENGTH, MAX_LEAGUE_DESCRIPTION_LENGTH, MAX_LEAGUE_TITLE_LENGTH, MAX_MAINTENANCE_MESSAGE_LENGTH, MAX_REPAIR_REASON_LENGTH, MAX_SCHEDULE_WEEK_TITLE_LENGTH, MAX_TEAM_INVITATION_MESSAGE_LENGTH, MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH, MAX_TEAM_NAME_LENGTH, MAX_WAIVER_TEMPLATE_TEXT_LENGTH, MAX_WAIVER_TEMPLATE_TITLE_LENGTH, MIN_AWARD_NAME_LENGTH, MIN_DISPLAY_NAME_LENGTH, MIN_LEAGUE_DESCRIPTION_LENGTH, MIN_LEAGUE_TITLE_LENGTH, MIN_REPAIR_REASON_LENGTH, MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH, MIN_TEAM_NAME_LENGTH, } from '../constants/business.js';
9
- /**
10
- * The reason an admin gives for a repair action, as `repairReasonSchema` reads it: trimmed, then
11
- * bounded by the repair-reason limits, with any character and line breaks allowed.
12
- */
13
3
  export const REPAIR_REASON_INPUT_FORMAT = defineInputFormat({
14
4
  format: 'none',
15
5
  min: MIN_REPAIR_REASON_LENGTH,
16
6
  max: MAX_REPAIR_REASON_LENGTH,
17
7
  });
18
- /**
19
- * The evidence an operator records for a cutover step the console cannot see done — an export's
20
- * operation name, a revocation's console record: trimmed, then bounded by the repair-reason limits,
21
- * line breaks allowed.
22
- */
23
8
  export const MIGRATION_EVIDENCE_INPUT_FORMAT = defineInputFormat({
24
9
  format: 'none',
25
10
  min: MIN_REPAIR_REASON_LENGTH,
26
11
  max: MAX_REPAIR_REASON_LENGTH,
27
12
  });
28
- /**
29
- * A player's message to the team they ask to join, as `teamJoinRequestMessageSchema` reads it:
30
- * trimmed, then bounded by the join-request message limits, with any character and line breaks
31
- * allowed.
32
- */
33
13
  export const TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT = defineInputFormat({
34
14
  format: 'none',
35
15
  min: MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,
36
16
  max: MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,
37
17
  });
38
- /**
39
- * The optional note a team sends with an invitation, as `teamInvitationMessageSchema` reads it:
40
- * trimmed, empty allowed, then bounded by the invitation note limit, line breaks allowed.
41
- */
42
18
  export const TEAM_INVITATION_MESSAGE_INPUT_FORMAT = defineInputFormat({
43
19
  format: 'none',
44
20
  min: 0,
45
21
  max: MAX_TEAM_INVITATION_MESSAGE_LENGTH,
46
22
  });
47
- /**
48
- * A scorer's note on one person in a live game ("red shirt", "#9"), as `gameMemoSchema` reads it:
49
- * trimmed, one line, empty allowed — an empty memo clears the note — then bounded by the memo cap.
50
- */
51
23
  export const GAME_MEMO_INPUT_FORMAT = defineInputFormat({
52
24
  format: 'singleLine',
53
25
  min: 0,
54
26
  max: MAX_GAME_MEMO_LENGTH,
55
27
  });
56
- /**
57
- * A person's display name — an account's, or a ghost player's, as both ghost doors and the admin's
58
- * ghost captain ask for it — as `displayNameSchema` reads it: trimmed, one line, then bounded by the
59
- * display-name limits.
60
- */
61
28
  export const DISPLAY_NAME_INPUT_FORMAT = defineInputFormat({
62
29
  format: 'singleLine',
63
30
  min: MIN_DISPLAY_NAME_LENGTH,
64
31
  max: MAX_DISPLAY_NAME_LENGTH,
65
32
  });
66
- /**
67
- * A team's name, as `teamNameSchema` reads it at creation and at an admin's rename: trimmed, one
68
- * line, then bounded by the team-name limits.
69
- */
70
33
  export const TEAM_NAME_INPUT_FORMAT = defineInputFormat({
71
34
  format: 'singleLine',
72
35
  min: MIN_TEAM_NAME_LENGTH,
73
36
  max: MAX_TEAM_NAME_LENGTH,
74
37
  });
75
- /**
76
- * The number the league reaches a team on, as `contactPhoneSchema` reads it: trimmed, one line,
77
- * required, and bounded by the contact-phone cap. It is kept as typed — no format is imposed.
78
- */
79
38
  export const CONTACT_PHONE_INPUT_FORMAT = defineInputFormat({
80
39
  format: 'singleLine',
81
40
  min: 1,
82
41
  max: MAX_CONTACT_PHONE_LENGTH,
83
42
  });
84
- /**
85
- * The account's optional default contact phone on the settings page: the contact-phone format with
86
- * empty allowed. Empty means remove the saved number — the form sends it as
87
- * `UpdateAccountSettingsInput.defaultContactPhone: null` — and any other value is held to
88
- * `CONTACT_PHONE_INPUT_FORMAT`'s trim, one line, and cap.
89
- */
90
43
  export const OPTIONAL_CONTACT_PHONE_INPUT_FORMAT = defineInputFormat({
91
44
  format: 'singleLine',
92
45
  min: 0,
93
46
  max: MAX_CONTACT_PHONE_LENGTH,
94
47
  });
95
- /**
96
- * An award's name in the catalog, as `awardNameSchema` reads it — at creation, sent with the award's
97
- * first badge: trimmed, one line, then bounded by the award-name limits.
98
- */
99
48
  export const AWARD_NAME_INPUT_FORMAT = defineInputFormat({
100
49
  format: 'singleLine',
101
50
  min: MIN_AWARD_NAME_LENGTH,
102
51
  max: MAX_AWARD_NAME_LENGTH,
103
52
  });
104
- /**
105
- * A league's title, as `leagueTitleSchema` reads it at creation and at the settings edit: trimmed,
106
- * one line, then bounded by the league-title limits.
107
- */
108
53
  export const LEAGUE_TITLE_INPUT_FORMAT = defineInputFormat({
109
54
  format: 'singleLine',
110
55
  min: MIN_LEAGUE_TITLE_LENGTH,
111
56
  max: MAX_LEAGUE_TITLE_LENGTH,
112
57
  });
113
- /**
114
- * A league's description, as `leagueDescriptionSchema` reads it at creation and at the settings
115
- * edit: trimmed, then bounded by the league-description limits, line breaks allowed.
116
- */
117
58
  export const LEAGUE_DESCRIPTION_INPUT_FORMAT = defineInputFormat({
118
59
  format: 'none',
119
60
  min: MIN_LEAGUE_DESCRIPTION_LENGTH,
120
61
  max: MAX_LEAGUE_DESCRIPTION_LENGTH,
121
62
  });
122
- /** A venue's name, as `gameLocationNameSchema` reads it: trimmed, one line, required, within its cap. */
123
63
  export const GAME_LOCATION_NAME_INPUT_FORMAT = defineInputFormat({
124
64
  format: 'singleLine',
125
65
  min: 1,
126
66
  max: MAX_GAME_LOCATION_NAME_LENGTH,
127
67
  });
128
- /**
129
- * A venue's street address, as `gameLocationStreetAddressSchema` reads it: trimmed, one line,
130
- * required, within its cap.
131
- */
132
68
  export const GAME_LOCATION_STREET_ADDRESS_INPUT_FORMAT = defineInputFormat({
133
69
  format: 'singleLine',
134
70
  min: 1,
135
71
  max: MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH,
136
72
  });
137
- /**
138
- * One court, sheet, or room of a venue, as `gameLocationSubLocationSchema` reads it: trimmed, one
139
- * line, required, within its cap.
140
- */
141
73
  export const GAME_LOCATION_SUB_LOCATION_INPUT_FORMAT = defineInputFormat({
142
74
  format: 'singleLine',
143
75
  min: 1,
144
76
  max: MAX_GAME_LOCATION_SUB_LOCATION_LENGTH,
145
77
  });
146
- /**
147
- * A venue's memo, as `gameLocationMemoSchema` reads it: trimmed, line breaks allowed, empty allowed —
148
- * an empty memo means the venue has none — within its cap.
149
- */
150
78
  export const GAME_LOCATION_MEMO_INPUT_FORMAT = defineInputFormat({
151
79
  format: 'none',
152
80
  min: 0,
153
81
  max: MAX_GAME_LOCATION_MEMO_LENGTH,
154
82
  });
155
- /** A schedule week's name, as `scheduleWeekTitleSchema` reads it: trimmed, one line, required. */
156
83
  export const SCHEDULE_WEEK_TITLE_INPUT_FORMAT = defineInputFormat({
157
84
  format: 'singleLine',
158
85
  min: 1,
159
86
  max: MAX_SCHEDULE_WEEK_TITLE_LENGTH,
160
87
  });
161
- /**
162
- * A waiver template's title, as `waiverTemplateTitleSchema` reads it. A waiver is a legal artifact a
163
- * player signs, so its words are kept exactly as typed; it still cannot be blank.
164
- */
165
88
  export const WAIVER_TEMPLATE_TITLE_INPUT_FORMAT = defineInputFormat({
166
89
  format: 'singleLine',
167
90
  min: 1,
168
91
  max: MAX_WAIVER_TEMPLATE_TITLE_LENGTH,
169
92
  keepAsTyped: true,
170
93
  });
171
- /**
172
- * A waiver template's wording, as `waiverTemplateTextSchema` reads it: the legal text a player signs,
173
- * kept exactly as typed, line breaks allowed, never blank.
174
- */
175
94
  export const WAIVER_TEMPLATE_TEXT_INPUT_FORMAT = defineInputFormat({
176
95
  format: 'none',
177
96
  min: 1,
178
97
  max: MAX_WAIVER_TEMPLATE_TEXT_LENGTH,
179
98
  keepAsTyped: true,
180
99
  });
181
- /** The landing page's hero title: trimmed, one line; blank shows the default heading. */
182
100
  export const LANDING_HERO_TITLE_INPUT_FORMAT = defineInputFormat({
183
101
  format: 'singleLine',
184
102
  min: 0,
185
103
  max: MAX_LANDING_HERO_TITLE_LENGTH,
186
104
  });
187
- /** The landing page's about text: trimmed, line breaks allowed, empty allowed. */
188
105
  export const LANDING_ABOUT_TEXT_INPUT_FORMAT = defineInputFormat({
189
106
  format: 'none',
190
107
  min: 0,
191
108
  max: MAX_LANDING_ABOUT_TEXT_LENGTH,
192
109
  });
193
- /** The message shown while the app is in maintenance; empty shows none. */
194
110
  export const MAINTENANCE_MESSAGE_INPUT_FORMAT = defineInputFormat({
195
111
  format: 'none',
196
112
  min: 0,
197
113
  max: MAX_MAINTENANCE_MESSAGE_LENGTH,
198
114
  });
199
- /** The site announcement banner; empty clears it. */
200
115
  export const ANNOUNCEMENT_MESSAGE_INPUT_FORMAT = defineInputFormat({
201
116
  format: 'none',
202
117
  min: 0,
203
118
  max: MAX_ANNOUNCEMENT_MESSAGE_LENGTH,
204
119
  });
205
- /** The published app version the version gate compares against; never blank. */
206
120
  export const APP_VERSION_INPUT_FORMAT = defineInputFormat({
207
121
  format: 'none',
208
122
  min: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"input-formats.js","sourceRoot":"","sources":["../../src/input-formats/input-formats.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,yGAAyG;AACzG,gGAAgG;AAChG,oGAAoG;AACpG,mGAAmG;AACnG,6CAA6C;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,uCAAuC,EACvC,qCAAqC,EACrC,oBAAoB,EACpB,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,oCAAoC,EACpC,oBAAoB,EACpB,+BAA+B,EAC/B,gCAAgC,EAChC,qBAAqB,EACrB,uBAAuB,EACvB,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,oCAAoC,EACpC,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IAC1D,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,wBAAwB;IAC7B,GAAG,EAAE,wBAAwB;CAC9B,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;I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the limits the field\n// enforces (RULE-STD-ARCH-102). ui-core's text inputs and `ConsequenceDialog`'s reason field take only a\n// declaration, never a bare bound, and a field's wire schema is built from the same declaration\n// through `textFieldSchema`, so the form and the wire run the one check and accept exactly the same\n// text. `input-format-core` is server-safe and has no dependencies, so the declarations sit in the\n// package root, which both app roots import.\n\nimport { defineInputFormat } from '@ttt-productions/input-format-core';\nimport {\n MAX_ANNOUNCEMENT_MESSAGE_LENGTH,\n MAX_APP_VERSION_LENGTH,\n MAX_AWARD_NAME_LENGTH,\n MAX_CONTACT_PHONE_LENGTH,\n MAX_DISPLAY_NAME_LENGTH,\n MAX_GAME_LOCATION_MEMO_LENGTH,\n MAX_GAME_LOCATION_NAME_LENGTH,\n MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH,\n MAX_GAME_LOCATION_SUB_LOCATION_LENGTH,\n MAX_GAME_MEMO_LENGTH,\n MAX_LANDING_ABOUT_TEXT_LENGTH,\n MAX_LANDING_HERO_TITLE_LENGTH,\n MAX_LEAGUE_DESCRIPTION_LENGTH,\n MAX_LEAGUE_TITLE_LENGTH,\n MAX_MAINTENANCE_MESSAGE_LENGTH,\n MAX_REPAIR_REASON_LENGTH,\n MAX_SCHEDULE_WEEK_TITLE_LENGTH,\n MAX_TEAM_INVITATION_MESSAGE_LENGTH,\n MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n MAX_TEAM_NAME_LENGTH,\n MAX_WAIVER_TEMPLATE_TEXT_LENGTH,\n MAX_WAIVER_TEMPLATE_TITLE_LENGTH,\n MIN_AWARD_NAME_LENGTH,\n MIN_DISPLAY_NAME_LENGTH,\n MIN_LEAGUE_DESCRIPTION_LENGTH,\n MIN_LEAGUE_TITLE_LENGTH,\n MIN_REPAIR_REASON_LENGTH,\n MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n MIN_TEAM_NAME_LENGTH,\n} from '../constants/business.js';\n\n/**\n * The reason an admin gives for a repair action, as `repairReasonSchema` reads it: trimmed, then\n * bounded by the repair-reason limits, with any character and line breaks allowed.\n */\nexport const REPAIR_REASON_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_REPAIR_REASON_LENGTH,\n max: MAX_REPAIR_REASON_LENGTH,\n});\n\n/**\n * The evidence an operator records for a cutover step the console cannot see done — an export's\n * operation name, a revocation's console record: trimmed, then bounded by the repair-reason limits,\n * line breaks allowed.\n */\nexport const MIGRATION_EVIDENCE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_REPAIR_REASON_LENGTH,\n max: MAX_REPAIR_REASON_LENGTH,\n});\n\n/**\n * A player's message to the team they ask to join, as `teamJoinRequestMessageSchema` reads it:\n * trimmed, then bounded by the join-request message limits, with any character and line breaks\n * allowed.\n */\nexport const TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n max: MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n});\n\n/**\n * The optional note a team sends with an invitation, as `teamInvitationMessageSchema` reads it:\n * trimmed, empty allowed, then bounded by the invitation note limit, line breaks allowed.\n */\nexport const TEAM_INVITATION_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_TEAM_INVITATION_MESSAGE_LENGTH,\n});\n\n/**\n * A scorer's note on one person in a live game (\"red shirt\", \"#9\"), as `gameMemoSchema` reads it:\n * trimmed, one line, empty allowed — an empty memo clears the note — then bounded by the memo cap.\n */\nexport const GAME_MEMO_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 0,\n max: MAX_GAME_MEMO_LENGTH,\n});\n\n/**\n * A person's display name — an account's, or a ghost player's, as both ghost doors and the admin's\n * ghost captain ask for it — as `displayNameSchema` reads it: trimmed, one line, then bounded by the\n * display-name limits.\n */\nexport const DISPLAY_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_DISPLAY_NAME_LENGTH,\n max: MAX_DISPLAY_NAME_LENGTH,\n});\n\n/**\n * A team's name, as `teamNameSchema` reads it at creation and at an admin's rename: trimmed, one\n * line, then bounded by the team-name limits.\n */\nexport const TEAM_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_TEAM_NAME_LENGTH,\n max: MAX_TEAM_NAME_LENGTH,\n});\n\n/**\n * The number the league reaches a team on, as `contactPhoneSchema` reads it: trimmed, one line,\n * required, and bounded by the contact-phone cap. It is kept as typed — no format is imposed.\n */\nexport const CONTACT_PHONE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_CONTACT_PHONE_LENGTH,\n});\n\n/**\n * The account's optional default contact phone on the settings page: the contact-phone format with\n * empty allowed. Empty means remove the saved number — the form sends it as\n * `UpdateAccountSettingsInput.defaultContactPhone: null` — and any other value is held to\n * `CONTACT_PHONE_INPUT_FORMAT`'s trim, one line, and cap.\n */\nexport const OPTIONAL_CONTACT_PHONE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 0,\n max: MAX_CONTACT_PHONE_LENGTH,\n});\n\n/**\n * An award's name in the catalog, as `awardNameSchema` reads it — at creation, sent with the award's\n * first badge: trimmed, one line, then bounded by the award-name limits.\n */\nexport const AWARD_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_AWARD_NAME_LENGTH,\n max: MAX_AWARD_NAME_LENGTH,\n});\n\n/**\n * A league's title, as `leagueTitleSchema` reads it at creation and at the settings edit: trimmed,\n * one line, then bounded by the league-title limits.\n */\nexport const LEAGUE_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_LEAGUE_TITLE_LENGTH,\n max: MAX_LEAGUE_TITLE_LENGTH,\n});\n\n/**\n * A league's description, as `leagueDescriptionSchema` reads it at creation and at the settings\n * edit: trimmed, then bounded by the league-description limits, line breaks allowed.\n */\nexport const LEAGUE_DESCRIPTION_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_LEAGUE_DESCRIPTION_LENGTH,\n max: MAX_LEAGUE_DESCRIPTION_LENGTH,\n});\n\n/** A venue's name, as `gameLocationNameSchema` reads it: trimmed, one line, required, within its cap. */\nexport const GAME_LOCATION_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_GAME_LOCATION_NAME_LENGTH,\n});\n\n/**\n * A venue's street address, as `gameLocationStreetAddressSchema` reads it: trimmed, one line,\n * required, within its cap.\n */\nexport const GAME_LOCATION_STREET_ADDRESS_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH,\n});\n\n/**\n * One court, sheet, or room of a venue, as `gameLocationSubLocationSchema` reads it: trimmed, one\n * line, required, within its cap.\n */\nexport const GAME_LOCATION_SUB_LOCATION_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_GAME_LOCATION_SUB_LOCATION_LENGTH,\n});\n\n/**\n * A venue's memo, as `gameLocationMemoSchema` reads it: trimmed, line breaks allowed, empty allowed —\n * an empty memo means the venue has none — within its cap.\n */\nexport const GAME_LOCATION_MEMO_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_GAME_LOCATION_MEMO_LENGTH,\n});\n\n/** A schedule week's name, as `scheduleWeekTitleSchema` reads it: trimmed, one line, required. */\nexport const SCHEDULE_WEEK_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_SCHEDULE_WEEK_TITLE_LENGTH,\n});\n\n/**\n * A waiver template's title, as `waiverTemplateTitleSchema` reads it. A waiver is a legal artifact a\n * player signs, so its words are kept exactly as typed; it still cannot be blank.\n */\nexport const WAIVER_TEMPLATE_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_WAIVER_TEMPLATE_TITLE_LENGTH,\n keepAsTyped: true,\n});\n\n/**\n * A waiver template's wording, as `waiverTemplateTextSchema` reads it: the legal text a player signs,\n * kept exactly as typed, line breaks allowed, never blank.\n */\nexport const WAIVER_TEMPLATE_TEXT_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 1,\n max: MAX_WAIVER_TEMPLATE_TEXT_LENGTH,\n keepAsTyped: true,\n});\n\n/** The landing page's hero title: trimmed, one line; blank shows the default heading. */\nexport const LANDING_HERO_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 0,\n max: MAX_LANDING_HERO_TITLE_LENGTH,\n});\n\n/** The landing page's about text: trimmed, line breaks allowed, empty allowed. */\nexport const LANDING_ABOUT_TEXT_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_LANDING_ABOUT_TEXT_LENGTH,\n});\n\n/** The message shown while the app is in maintenance; empty shows none. */\nexport const MAINTENANCE_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_MAINTENANCE_MESSAGE_LENGTH,\n});\n\n/** The site announcement banner; empty clears it. */\nexport const ANNOUNCEMENT_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_ANNOUNCEMENT_MESSAGE_LENGTH,\n});\n\n/** The published app version the version gate compares against; never blank. */\nexport const APP_VERSION_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 1,\n max: MAX_APP_VERSION_LENGTH,\n});\n"]}
1
+ {"version":3,"file":"input-formats.js","sourceRoot":"","sources":["../../src/input-formats/input-formats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,uCAAuC,EACvC,qCAAqC,EACrC,oBAAoB,EACpB,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,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wBAAwB,GAAG,iBAAiB,CAAC;IACxD,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,sBAAsB;CAC5B,CAAC,CAAC","sourcesContent":["import { defineInputFormat } from '@ttt-productions/input-format-core';\nimport {\n MAX_ANNOUNCEMENT_MESSAGE_LENGTH,\n MAX_APP_VERSION_LENGTH,\n MAX_AWARD_NAME_LENGTH,\n MAX_CONTACT_PHONE_LENGTH,\n MAX_DISPLAY_NAME_LENGTH,\n MAX_GAME_LOCATION_MEMO_LENGTH,\n MAX_GAME_LOCATION_NAME_LENGTH,\n MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH,\n MAX_GAME_LOCATION_SUB_LOCATION_LENGTH,\n MAX_GAME_MEMO_LENGTH,\n MAX_LANDING_ABOUT_TEXT_LENGTH,\n MAX_LANDING_HERO_TITLE_LENGTH,\n MAX_LEAGUE_DESCRIPTION_LENGTH,\n MAX_LEAGUE_TITLE_LENGTH,\n MAX_MAINTENANCE_MESSAGE_LENGTH,\n MAX_REPAIR_REASON_LENGTH,\n MAX_SCHEDULE_WEEK_TITLE_LENGTH,\n MAX_TEAM_INVITATION_MESSAGE_LENGTH,\n MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n MAX_TEAM_NAME_LENGTH,\n MAX_WAIVER_TEMPLATE_TEXT_LENGTH,\n MAX_WAIVER_TEMPLATE_TITLE_LENGTH,\n MIN_AWARD_NAME_LENGTH,\n MIN_DISPLAY_NAME_LENGTH,\n MIN_LEAGUE_DESCRIPTION_LENGTH,\n MIN_LEAGUE_TITLE_LENGTH,\n MIN_REPAIR_REASON_LENGTH,\n MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n MIN_TEAM_NAME_LENGTH,\n} from '../constants/business.js';\n\nexport const REPAIR_REASON_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_REPAIR_REASON_LENGTH,\n max: MAX_REPAIR_REASON_LENGTH,\n});\n\nexport const MIGRATION_EVIDENCE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_REPAIR_REASON_LENGTH,\n max: MAX_REPAIR_REASON_LENGTH,\n});\n\nexport const TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n max: MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n});\n\nexport const TEAM_INVITATION_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_TEAM_INVITATION_MESSAGE_LENGTH,\n});\n\nexport const GAME_MEMO_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 0,\n max: MAX_GAME_MEMO_LENGTH,\n});\n\nexport const DISPLAY_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_DISPLAY_NAME_LENGTH,\n max: MAX_DISPLAY_NAME_LENGTH,\n});\n\nexport const TEAM_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_TEAM_NAME_LENGTH,\n max: MAX_TEAM_NAME_LENGTH,\n});\n\nexport const CONTACT_PHONE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_CONTACT_PHONE_LENGTH,\n});\n\nexport const OPTIONAL_CONTACT_PHONE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 0,\n max: MAX_CONTACT_PHONE_LENGTH,\n});\n\nexport const AWARD_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_AWARD_NAME_LENGTH,\n max: MAX_AWARD_NAME_LENGTH,\n});\n\nexport const LEAGUE_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_LEAGUE_TITLE_LENGTH,\n max: MAX_LEAGUE_TITLE_LENGTH,\n});\n\nexport const LEAGUE_DESCRIPTION_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_LEAGUE_DESCRIPTION_LENGTH,\n max: MAX_LEAGUE_DESCRIPTION_LENGTH,\n});\n\nexport const GAME_LOCATION_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_GAME_LOCATION_NAME_LENGTH,\n});\n\nexport const GAME_LOCATION_STREET_ADDRESS_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH,\n});\n\nexport const GAME_LOCATION_SUB_LOCATION_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_GAME_LOCATION_SUB_LOCATION_LENGTH,\n});\n\nexport const GAME_LOCATION_MEMO_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_GAME_LOCATION_MEMO_LENGTH,\n});\n\nexport const SCHEDULE_WEEK_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_SCHEDULE_WEEK_TITLE_LENGTH,\n});\n\nexport const WAIVER_TEMPLATE_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_WAIVER_TEMPLATE_TITLE_LENGTH,\n keepAsTyped: true,\n});\n\nexport const WAIVER_TEMPLATE_TEXT_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 1,\n max: MAX_WAIVER_TEMPLATE_TEXT_LENGTH,\n keepAsTyped: true,\n});\n\nexport const LANDING_HERO_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 0,\n max: MAX_LANDING_HERO_TITLE_LENGTH,\n});\n\nexport const LANDING_ABOUT_TEXT_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_LANDING_ABOUT_TEXT_LENGTH,\n});\n\nexport const MAINTENANCE_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_MAINTENANCE_MESSAGE_LENGTH,\n});\n\nexport const ANNOUNCEMENT_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_ANNOUNCEMENT_MESSAGE_LENGTH,\n});\n\nexport const APP_VERSION_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 1,\n max: MAX_APP_VERSION_LENGTH,\n});\n"]}
@@ -20,11 +20,8 @@ export interface PictureSize {
20
20
  readonly height: number;
21
21
  }
22
22
  export interface PictureKind {
23
- /** The shape the browser crops to, the server re-crops to, and every display frames. */
24
23
  readonly aspect: PictureAspect;
25
- /** Each stored size, at the kind's shape. `lg` is also the size the browser crops to. */
26
24
  readonly sizes: Readonly<Record<PictureVariantKey, PictureSize>>;
27
- /** The format of the browser's crop and of every stored size. */
28
25
  readonly format: PictureStoredFormat;
29
26
  readonly cropShape: PictureCropShape;
30
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"file-origins.d.ts","sourceRoot":"","sources":["../../src/media/file-origins.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,mBAAmB,mGAMtB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,eAAO,MAAM,qBAAqB,qDAAsD,CAAC;AACzF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,eAAO,MAAM,gBAAgB,6IAA8D,CAAC;AAC5F,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,eAAe,CAAC;AAMzD,eAAO,MAAM,wBAAwB,QAAU,CAAC;AAGhD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAIvC,eAAO,MAAM,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,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC,CAAC;IACjE,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;CACtC;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD6B,CAAC;AA+CxD,eAAO,MAAM,0BAA0B,QAAS,CAAC;AACjD,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAElD,eAAO,MAAM,gBAAgB,EAAE,WAG9B,CAAC;AAiBF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,CAQ5E,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAE/D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAErE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,eAAe,CAEzE"}
@@ -1,13 +1,3 @@
1
- // The upload origin registry (RULE-STD-MEDIA-001, RULE-STD-MEDIA-006). One origin value binds everything an
2
- // upload touches: the picker spec, the staging path and its `storage.rules` cap and content type,
3
- // the callable that accepts the upload, and — for a picture — the processing spec and the owner the
4
- // picture is published to. The generic packages treat an origin id as opaque; the policy is here.
5
- //
6
- // Picture origins are processed into their kind's declared sizes and keep no master. Signature
7
- // origins are kept byte-exact (`preserveOriginal`) by the callable that records them and are never
8
- // processed. Adding an origin is one change across this registry, `storage.rules`, the processor
9
- // routing, and their tests; `storage.rules` restates the caps and content types, and a guard pins it
10
- // to this file.
11
1
  import { PICTURE_VARIANT_KEYS } from '../types/unions.js';
12
2
  import { PICTURE_ASPECT_RATIOS, pictureAspectRatio } from './picture-aspects.js';
13
3
  export const PICTURE_ORIGIN_KEYS = [
@@ -20,19 +10,12 @@ export const PICTURE_ORIGIN_KEYS = [
20
10
  export const SIGNATURE_ORIGIN_KEYS = ['waiver-signature', 'hardware-signature'];
21
11
  export const FILE_ORIGIN_KEYS = [...PICTURE_ORIGIN_KEYS, ...SIGNATURE_ORIGIN_KEYS];
22
12
  const MB = 1024 * 1024;
23
- // The raw cap is an abuse bound: the browser uploads a picture already cropped and shrunk to its
24
- // kind's largest size, so a real upload is far below it.
25
13
  export const PICTURE_UPLOAD_MAX_BYTES = 25 * MB;
26
- // A photo's browser crop and every stored size are JPEG at this quality.
27
14
  export const PICTURE_JPEG_QUALITY = 85;
28
15
  // What a picture kind is stored as: a photo as JPEG, a badge as PNG, which keeps the transparent
29
16
  // corners of a badge drawn round.
30
17
  export const PICTURE_STORED_FORMAT_KEYS = ['jpeg', 'png'];
31
- // The cropper's mask: a rectangle, or a circle for a badge — which is how a badge is drawn, though
32
- // the stored image is square.
33
18
  export const PICTURE_CROP_SHAPE_KEYS = ['rect', 'round'];
34
- // Picture formats the server's byte inspection accepts. Scriptable or unproven formats (svg, heic,
35
- // avif) are not accepted.
36
19
  export const PICTURE_ACCEPTED_FORMATS = ['jpeg', 'png', 'gif', 'webp', 'bmp', 'tiff'];
37
20
  export const PICTURE_ACCEPT = {
38
21
  kinds: ['image'],
@@ -79,7 +62,6 @@ export const PICTURE_KINDS = {
79
62
  lg: { width: 1280, height: 720 },
80
63
  },
81
64
  },
82
- // A badge is cropped in a round mask and kept square, at the sizes every award has always had.
83
65
  'award-badge': {
84
66
  aspect: 'square',
85
67
  format: 'png',
@@ -124,9 +106,6 @@ function pictureOriginSpec(kind) {
124
106
  allowRecordAudio: false,
125
107
  },
126
108
  processing: {
127
- // The server trusts nothing the browser did: an upload that bypassed the app's cropper is
128
- // centre-cropped to the kind's shape (`requiredAspectRatio` with `allowAutoFormat`) before
129
- // every size is cut, and a source smaller than a size is never enlarged.
130
109
  image: {
131
110
  kind: 'image',
132
111
  accept: PICTURE_ACCEPT,
@@ -138,9 +117,6 @@ function pictureOriginSpec(kind) {
138
117
  },
139
118
  };
140
119
  }
141
- // A signature is drawn on a canvas and exported as PNG, so exactly `image/png` is accepted — no
142
- // other image type, and never the neutral octet-stream lane. It is kept byte-exact by the callable
143
- // that records it, and nothing processes it.
144
120
  export const SIGNATURE_UPLOAD_MAX_BYTES = 1 * MB;
145
121
  export const SIGNATURE_CONTENT_TYPE = 'image/png';
146
122
  export const SIGNATURE_ACCEPT = {
@@ -167,9 +143,7 @@ export const MEDIA_ORIGIN_SPECS = {
167
143
  'landing-picture': pictureOriginSpec(PICTURE_KINDS['landing-picture']),
168
144
  'location-picture': pictureOriginSpec(PICTURE_KINDS['location-picture']),
169
145
  'award-badge': pictureOriginSpec(PICTURE_KINDS['award-badge']),
170
- // Promoted to its kept path by the waiver-signing callable.
171
146
  'waiver-signature': signatureOriginSpec(),
172
- // Promoted to its kept path by the hardware contract's signing callable.
173
147
  'hardware-signature': signatureOriginSpec(),
174
148
  };
175
149
  export function isFileOrigin(value) {
@@ -1 +1 @@
1
- {"version":3,"file":"file-origins.js","sourceRoot":"","sources":["../../src/media/file-origins.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,kGAAkG;AAClG,oGAAoG;AACpG,kGAAkG;AAClG,EAAE;AACF,+FAA+F;AAC/F,mGAAmG;AACnG,iGAAiG;AACjG,qGAAqG;AACrG,gBAAgB;AAGhB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGjF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,gBAAgB;IAChB,cAAc;IACd,iBAAiB;IACjB,kBA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;IACpE,cAAc,EAAE,iBAAiB,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAChE,iBAAiB,EAAE,iBAAiB,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACtE,kBAAkB,EAAE,iBAAiB,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACxE,aAAa,EAAE,iBAAiB,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAC9D,4DAA4D;IAC5D,kBAAkB,EAAE,mBAAmB,EAAE;IACzC,yEAAyE;IACzE,oBAAoB,EAAE,mBAAmB,EAAE;CAC5C,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAQ,gBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAQ,mBAAyC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,OAAQ,qBAA2C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtE,CAAC","sourcesContent":["// The upload origin registry (RULE-STD-MEDIA-001, RULE-STD-MEDIA-006). One origin value binds everything an\n// upload touches: the picker spec, the staging path and its `storage.rules` cap and content type,\n// the callable that accepts the upload, and — for a picture — the processing spec and the owner the\n// picture is published to. The generic packages treat an origin id as opaque; the policy is here.\n//\n// Picture origins are processed into their kind's declared sizes and keep no master. Signature\n// origins are kept byte-exact (`preserveOriginal`) by the callable that records them and are never\n// processed. Adding an origin is one change across this registry, `storage.rules`, the processor\n// routing, and their tests; `storage.rules` restates the caps and content types, and a guard pins it\n// to this file.\n\nimport type { MediaAccept, MediaOriginSpec } from '@ttt-productions/media-schemas';\nimport { PICTURE_VARIANT_KEYS } from '../types/unions.js';\nimport type { PictureVariantKey } from '../types/unions.js';\nimport { PICTURE_ASPECT_RATIOS, pictureAspectRatio } from './picture-aspects.js';\nimport type { PictureAspect } from './picture-aspects.js';\n\nexport const PICTURE_ORIGIN_KEYS = [\n 'league-picture',\n 'team-picture',\n 'landing-picture',\n 'location-picture',\n 'award-badge',\n] as const;\nexport type PictureOrigin = (typeof PICTURE_ORIGIN_KEYS)[number];\n\nexport const SIGNATURE_ORIGIN_KEYS = ['waiver-signature', 'hardware-signature'] as const;\nexport type SignatureOrigin = (typeof SIGNATURE_ORIGIN_KEYS)[number];\n\nexport const FILE_ORIGIN_KEYS = [...PICTURE_ORIGIN_KEYS, ...SIGNATURE_ORIGIN_KEYS] as const;\nexport type FileOrigin = PictureOrigin | SignatureOrigin;\n\nconst MB = 1024 * 1024;\n\n// The raw cap is an abuse bound: the browser uploads a picture already cropped and shrunk to its\n// kind's largest size, so a real upload is far below it.\nexport const PICTURE_UPLOAD_MAX_BYTES = 25 * MB;\n\n// A photo's browser crop and every stored size are JPEG at this quality.\nexport const PICTURE_JPEG_QUALITY = 85;\n\n// What a picture kind is stored as: a photo as JPEG, a badge as PNG, which keeps the transparent\n// corners of a badge drawn round.\nexport const PICTURE_STORED_FORMAT_KEYS = ['jpeg', 'png'] as const;\nexport type PictureStoredFormat = (typeof PICTURE_STORED_FORMAT_KEYS)[number];\n\n// The cropper's mask: a rectangle, or a circle for a badge — which is how a badge is drawn, though\n// the stored image is square.\nexport const PICTURE_CROP_SHAPE_KEYS = ['rect', 'round'] as const;\nexport type PictureCropShape = (typeof PICTURE_CROP_SHAPE_KEYS)[number];\n\n// Picture formats the server's byte inspection accepts. Scriptable or unproven formats (svg, heic,\n// avif) are not accepted.\nexport const PICTURE_ACCEPTED_FORMATS = ['jpeg', 'png', 'gif', 'webp', 'bmp', 'tiff'] as const;\n\nexport const PICTURE_ACCEPT: MediaAccept = {\n kinds: ['image'],\n formats: [...PICTURE_ACCEPTED_FORMATS],\n};\n\nexport interface PictureSize {\n readonly width: number;\n readonly height: number;\n}\n\nexport interface PictureKind {\n /** The shape the browser crops to, the server re-crops to, and every display frames. */\n readonly aspect: PictureAspect;\n /** Each stored size, at the kind's shape. `lg` is also the size the browser crops to. */\n readonly sizes: Readonly<Record<PictureVariantKey, PictureSize>>;\n /** The format of the browser's crop and of every stored size. */\n readonly format: PictureStoredFormat;\n readonly cropShape: PictureCropShape;\n}\n\nexport const PICTURE_KINDS = {\n 'league-picture': {\n aspect: 'landscape',\n format: 'jpeg',\n cropShape: 'rect',\n sizes: {\n sm: { width: 480, height: 270 },\n md: { width: 960, height: 540 },\n lg: { width: 1920, height: 1080 },\n },\n },\n 'team-picture': {\n aspect: 'classic',\n format: 'jpeg',\n cropShape: 'rect',\n sizes: {\n sm: { width: 480, height: 360 },\n md: { width: 960, height: 720 },\n lg: { width: 1600, height: 1200 },\n },\n },\n 'landing-picture': {\n aspect: 'banner',\n format: 'jpeg',\n cropShape: 'rect',\n sizes: {\n sm: { width: 720, height: 240 },\n md: { width: 1440, height: 480 },\n lg: { width: 2400, height: 800 },\n },\n },\n 'location-picture': {\n aspect: 'landscape',\n format: 'jpeg',\n cropShape: 'rect',\n sizes: {\n sm: { width: 480, height: 270 },\n md: { width: 960, height: 540 },\n lg: { width: 1280, height: 720 },\n },\n },\n // A badge is cropped in a round mask and kept square, at the sizes every award has always had.\n 'award-badge': {\n aspect: 'square',\n format: 'png',\n cropShape: 'round',\n sizes: {\n sm: { width: 64, height: 64 },\n md: { width: 256, height: 256 },\n lg: { width: 512, height: 512 },\n },\n },\n} as const satisfies Record<PictureOrigin, PictureKind>;\n\nfunction pictureOriginSpec(kind: PictureKind): MediaOriginSpec {\n const ratio = pictureAspectRatio(kind.aspect);\n const { width, height } = PICTURE_ASPECT_RATIOS[kind.aspect];\n const variants = PICTURE_VARIANT_KEYS.map((key) => ({\n key,\n crop: {\n width: kind.sizes[key].width,\n height: kind.sizes[key].height,\n gravity: 'center' as const,\n },\n format: kind.format,\n ...(kind.format === 'jpeg' ? { quality: PICTURE_JPEG_QUALITY } : {}),\n }));\n return {\n kind: 'image',\n accept: PICTURE_ACCEPT,\n maxBytes: PICTURE_UPLOAD_MAX_BYTES,\n imageCrop: {\n aspectRatio: ratio,\n outputWidth: kind.sizes.lg.width,\n outputHeight: kind.sizes.lg.height,\n shape: kind.cropShape,\n format: kind.format,\n ...(kind.format === 'jpeg' ? { quality: PICTURE_JPEG_QUALITY } : {}),\n aspectRatioDisplay: `${width}:${height}`,\n },\n client: {\n allowPick: true,\n allowCapturePhoto: true,\n allowRecordVideo: false,\n allowRecordAudio: false,\n },\n processing: {\n // The server trusts nothing the browser did: an upload that bypassed the app's cropper is\n // centre-cropped to the kind's shape (`requiredAspectRatio` with `allowAutoFormat`) before\n // every size is cut, and a source smaller than a size is never enlarged.\n image: {\n kind: 'image',\n accept: PICTURE_ACCEPT,\n maxBytes: PICTURE_UPLOAD_MAX_BYTES,\n requiredAspectRatio: ratio,\n allowAutoFormat: true,\n image: { variants, stripMetadata: true },\n },\n },\n };\n}\n\n// A signature is drawn on a canvas and exported as PNG, so exactly `image/png` is accepted — no\n// other image type, and never the neutral octet-stream lane. It is kept byte-exact by the callable\n// that records it, and nothing processes it.\nexport const SIGNATURE_UPLOAD_MAX_BYTES = 1 * MB;\nexport const SIGNATURE_CONTENT_TYPE = 'image/png';\n\nexport const SIGNATURE_ACCEPT: MediaAccept = {\n kinds: ['file'],\n mimes: [SIGNATURE_CONTENT_TYPE],\n};\n\nfunction signatureOriginSpec(): MediaOriginSpec {\n return {\n kind: 'generic',\n accept: SIGNATURE_ACCEPT,\n maxBytes: SIGNATURE_UPLOAD_MAX_BYTES,\n client: {\n allowPick: false,\n allowCapturePhoto: false,\n allowRecordVideo: false,\n allowRecordAudio: false,\n },\n preserveOriginal: true,\n };\n}\n\nexport const MEDIA_ORIGIN_SPECS: Readonly<Record<FileOrigin, MediaOriginSpec>> = {\n 'league-picture': pictureOriginSpec(PICTURE_KINDS['league-picture']),\n 'team-picture': pictureOriginSpec(PICTURE_KINDS['team-picture']),\n 'landing-picture': pictureOriginSpec(PICTURE_KINDS['landing-picture']),\n 'location-picture': pictureOriginSpec(PICTURE_KINDS['location-picture']),\n 'award-badge': pictureOriginSpec(PICTURE_KINDS['award-badge']),\n // Promoted to its kept path by the waiver-signing callable.\n 'waiver-signature': signatureOriginSpec(),\n // Promoted to its kept path by the hardware contract's signing callable.\n 'hardware-signature': signatureOriginSpec(),\n};\n\nexport function isFileOrigin(value: string): value is FileOrigin {\n return (FILE_ORIGIN_KEYS as readonly string[]).includes(value);\n}\n\nexport function isPictureOrigin(value: string): value is PictureOrigin {\n return (PICTURE_ORIGIN_KEYS as readonly string[]).includes(value);\n}\n\nexport function isSignatureOrigin(value: string): value is SignatureOrigin {\n return (SIGNATURE_ORIGIN_KEYS as readonly string[]).includes(value);\n}\n"]}
1
+ {"version":3,"file":"file-origins.js","sourceRoot":"","sources":["../../src/media/file-origins.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGjF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,gBAAgB;IAChB,cAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,aAAa;CACL,CAAC;AAGX,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,kBAAkB,EAAE,oBAAoB,CAAU,CAAC;AAGzF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAG,mBAAmB,EAAE,GAAG,qBAAqB,CAAU,CAAC;AAG5F,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvB,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,GAAG,EAAE,CAAC;AAEhD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,iGAAiG;AACjG,kCAAkC;AAClC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAM,EAAE,KAAK,CAAU,CAAC;AAGnE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MA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PICTURE_VARIANT_KEYS } from '../types/unions.js';\nimport type { PictureVariantKey } from '../types/unions.js';\nimport { PICTURE_ASPECT_RATIOS, pictureAspectRatio } from './picture-aspects.js';\nimport type { PictureAspect } from './picture-aspects.js';\n\nexport const PICTURE_ORIGIN_KEYS = [\n 'league-picture',\n 'team-picture',\n 'landing-picture',\n 'location-picture',\n 'award-badge',\n] as const;\nexport type PictureOrigin = (typeof PICTURE_ORIGIN_KEYS)[number];\n\nexport const SIGNATURE_ORIGIN_KEYS = ['waiver-signature', 'hardware-signature'] as const;\nexport type SignatureOrigin = (typeof SIGNATURE_ORIGIN_KEYS)[number];\n\nexport const FILE_ORIGIN_KEYS = [...PICTURE_ORIGIN_KEYS, ...SIGNATURE_ORIGIN_KEYS] as const;\nexport type FileOrigin = PictureOrigin | SignatureOrigin;\n\nconst MB = 1024 * 1024;\n\nexport const PICTURE_UPLOAD_MAX_BYTES = 25 * MB;\n\nexport const PICTURE_JPEG_QUALITY = 85;\n\n// What a picture kind is stored as: a photo as JPEG, a badge as PNG, which keeps the transparent\n// corners of a badge drawn round.\nexport const PICTURE_STORED_FORMAT_KEYS = ['jpeg', 'png'] as const;\nexport type PictureStoredFormat = (typeof PICTURE_STORED_FORMAT_KEYS)[number];\n\nexport const PICTURE_CROP_SHAPE_KEYS = ['rect', 'round'] as const;\nexport type PictureCropShape = (typeof PICTURE_CROP_SHAPE_KEYS)[number];\n\nexport const PICTURE_ACCEPTED_FORMATS = ['jpeg', 'png', 'gif', 'webp', 'bmp', 'tiff'] as const;\n\nexport const PICTURE_ACCEPT: MediaAccept = {\n kinds: ['image'],\n formats: [...PICTURE_ACCEPTED_FORMATS],\n};\n\nexport interface PictureSize {\n readonly width: number;\n readonly height: number;\n}\n\nexport interface PictureKind {\n readonly aspect: PictureAspect;\n readonly sizes: Readonly<Record<PictureVariantKey, PictureSize>>;\n readonly format: PictureStoredFormat;\n readonly cropShape: PictureCropShape;\n}\n\nexport const PICTURE_KINDS = {\n 'league-picture': {\n aspect: 'landscape',\n format: 'jpeg',\n cropShape: 'rect',\n sizes: {\n sm: { width: 480, height: 270 },\n md: { width: 960, height: 540 },\n lg: { width: 1920, height: 1080 },\n },\n },\n 'team-picture': {\n aspect: 'classic',\n format: 'jpeg',\n cropShape: 'rect',\n sizes: {\n sm: { width: 480, height: 360 },\n md: { width: 960, height: 720 },\n lg: { width: 1600, height: 1200 },\n },\n },\n 'landing-picture': {\n aspect: 'banner',\n format: 'jpeg',\n cropShape: 'rect',\n sizes: {\n sm: { width: 720, height: 240 },\n md: { width: 1440, height: 480 },\n lg: { width: 2400, height: 800 },\n },\n },\n 'location-picture': {\n aspect: 'landscape',\n format: 'jpeg',\n cropShape: 'rect',\n sizes: {\n sm: { width: 480, height: 270 },\n md: { width: 960, height: 540 },\n lg: { width: 1280, height: 720 },\n },\n },\n 'award-badge': {\n aspect: 'square',\n format: 'png',\n cropShape: 'round',\n sizes: {\n sm: { width: 64, height: 64 },\n md: { width: 256, height: 256 },\n lg: { width: 512, height: 512 },\n },\n },\n} as const satisfies Record<PictureOrigin, PictureKind>;\n\nfunction pictureOriginSpec(kind: PictureKind): MediaOriginSpec {\n const ratio = pictureAspectRatio(kind.aspect);\n const { width, height } = PICTURE_ASPECT_RATIOS[kind.aspect];\n const variants = PICTURE_VARIANT_KEYS.map((key) => ({\n key,\n crop: {\n width: kind.sizes[key].width,\n height: kind.sizes[key].height,\n gravity: 'center' as const,\n },\n format: kind.format,\n ...(kind.format === 'jpeg' ? { quality: PICTURE_JPEG_QUALITY } : {}),\n }));\n return {\n kind: 'image',\n accept: PICTURE_ACCEPT,\n maxBytes: PICTURE_UPLOAD_MAX_BYTES,\n imageCrop: {\n aspectRatio: ratio,\n outputWidth: kind.sizes.lg.width,\n outputHeight: kind.sizes.lg.height,\n shape: kind.cropShape,\n format: kind.format,\n ...(kind.format === 'jpeg' ? { quality: PICTURE_JPEG_QUALITY } : {}),\n aspectRatioDisplay: `${width}:${height}`,\n },\n client: {\n allowPick: true,\n allowCapturePhoto: true,\n allowRecordVideo: false,\n allowRecordAudio: false,\n },\n processing: {\n image: {\n kind: 'image',\n accept: PICTURE_ACCEPT,\n maxBytes: PICTURE_UPLOAD_MAX_BYTES,\n requiredAspectRatio: ratio,\n allowAutoFormat: true,\n image: { variants, stripMetadata: true },\n },\n },\n };\n}\n\nexport const SIGNATURE_UPLOAD_MAX_BYTES = 1 * MB;\nexport const SIGNATURE_CONTENT_TYPE = 'image/png';\n\nexport const SIGNATURE_ACCEPT: MediaAccept = {\n kinds: ['file'],\n mimes: [SIGNATURE_CONTENT_TYPE],\n};\n\nfunction signatureOriginSpec(): MediaOriginSpec {\n return {\n kind: 'generic',\n accept: SIGNATURE_ACCEPT,\n maxBytes: SIGNATURE_UPLOAD_MAX_BYTES,\n client: {\n allowPick: false,\n allowCapturePhoto: false,\n allowRecordVideo: false,\n allowRecordAudio: false,\n },\n preserveOriginal: true,\n };\n}\n\nexport const MEDIA_ORIGIN_SPECS: Readonly<Record<FileOrigin, MediaOriginSpec>> = {\n 'league-picture': pictureOriginSpec(PICTURE_KINDS['league-picture']),\n 'team-picture': pictureOriginSpec(PICTURE_KINDS['team-picture']),\n 'landing-picture': pictureOriginSpec(PICTURE_KINDS['landing-picture']),\n 'location-picture': pictureOriginSpec(PICTURE_KINDS['location-picture']),\n 'award-badge': pictureOriginSpec(PICTURE_KINDS['award-badge']),\n 'waiver-signature': signatureOriginSpec(),\n 'hardware-signature': signatureOriginSpec(),\n};\n\nexport function isFileOrigin(value: string): value is FileOrigin {\n return (FILE_ORIGIN_KEYS as readonly string[]).includes(value);\n}\n\nexport function isPictureOrigin(value: string): value is PictureOrigin {\n return (PICTURE_ORIGIN_KEYS as readonly string[]).includes(value);\n}\n\nexport function isSignatureOrigin(value: string): value is SignatureOrigin {\n return (SIGNATURE_ORIGIN_KEYS as readonly string[]).includes(value);\n}\n"]}
@@ -4,7 +4,6 @@ export interface PictureAspectRatio {
4
4
  readonly width: number;
5
5
  readonly height: number;
6
6
  }
7
- /** Each shape as whole numbers, width to height — the form a CSS `aspect-ratio` and "16:9" take. */
8
7
  export declare const PICTURE_ASPECT_RATIOS: {
9
8
  readonly square: {
10
9
  readonly width: 1;
@@ -23,6 +22,5 @@ export declare const PICTURE_ASPECT_RATIOS: {
23
22
  readonly height: 1;
24
23
  };
25
24
  };
26
- /** The shape as one number, width over height — the form a crop or processing spec takes. */
27
25
  export declare function pictureAspectRatio(aspect: PictureAspect): number;
28
26
  //# sourceMappingURL=picture-aspects.d.ts.map