@20baht/stickers 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/LICENSE +48 -0
  2. package/README.md +173 -2
  3. package/dist/all.d.ts +4 -0
  4. package/dist/all.js +7 -0
  5. package/dist/element.d.ts +103 -0
  6. package/dist/element.js +181 -0
  7. package/dist/graph.d.ts +172 -0
  8. package/dist/graph.js +374 -0
  9. package/dist/icons/access-point.d.ts +2 -0
  10. package/dist/icons/access-point.js +34 -0
  11. package/dist/icons/ai-agent.d.ts +2 -0
  12. package/dist/icons/ai-agent.js +50 -0
  13. package/dist/icons/alarm-clock.d.ts +2 -0
  14. package/dist/icons/alarm-clock.js +46 -0
  15. package/dist/icons/all-in-one.d.ts +2 -0
  16. package/dist/icons/all-in-one.js +37 -0
  17. package/dist/icons/angpao.d.ts +2 -0
  18. package/dist/icons/angpao.js +46 -0
  19. package/dist/icons/badge-reader.d.ts +2 -0
  20. package/dist/icons/badge-reader.js +51 -0
  21. package/dist/icons/baht-note.d.ts +2 -0
  22. package/dist/icons/baht-note.js +42 -0
  23. package/dist/icons/bamboo.d.ts +2 -0
  24. package/dist/icons/bamboo.js +57 -0
  25. package/dist/icons/banana-leaf.d.ts +2 -0
  26. package/dist/icons/banana-leaf.js +87 -0
  27. package/dist/icons/banana-tree.d.ts +2 -0
  28. package/dist/icons/banana-tree.js +75 -0
  29. package/dist/icons/bear.d.ts +2 -0
  30. package/dist/icons/bear.js +39 -0
  31. package/dist/icons/blade-chassis.d.ts +2 -0
  32. package/dist/icons/blade-chassis.js +43 -0
  33. package/dist/icons/bond.d.ts +2 -0
  34. package/dist/icons/bond.js +48 -0
  35. package/dist/icons/books.d.ts +2 -0
  36. package/dist/icons/books.js +44 -0
  37. package/dist/icons/bts-card.d.ts +2 -0
  38. package/dist/icons/bts-card.js +47 -0
  39. package/dist/icons/budget-jar.d.ts +2 -0
  40. package/dist/icons/budget-jar.js +43 -0
  41. package/dist/icons/cactus.d.ts +2 -0
  42. package/dist/icons/cactus.js +42 -0
  43. package/dist/icons/calculator.d.ts +2 -0
  44. package/dist/icons/calculator.js +46 -0
  45. package/dist/icons/calendar-month.d.ts +2 -0
  46. package/dist/icons/calendar-month.js +66 -0
  47. package/dist/icons/campfire.d.ts +2 -0
  48. package/dist/icons/campfire.js +63 -0
  49. package/dist/icons/cctv.d.ts +2 -0
  50. package/dist/icons/cctv.js +38 -0
  51. package/dist/icons/certificate.d.ts +2 -0
  52. package/dist/icons/certificate.js +50 -0
  53. package/dist/icons/cha-yen.d.ts +2 -0
  54. package/dist/icons/cha-yen.js +68 -0
  55. package/dist/icons/chedi.d.ts +2 -0
  56. package/dist/icons/chedi.js +56 -0
  57. package/dist/icons/classic-phone.d.ts +2 -0
  58. package/dist/icons/classic-phone.js +32 -0
  59. package/dist/icons/clipboard.d.ts +2 -0
  60. package/dist/icons/clipboard.js +61 -0
  61. package/dist/icons/cloud.d.ts +2 -0
  62. package/dist/icons/cloud.js +28 -0
  63. package/dist/icons/coins.d.ts +2 -0
  64. package/dist/icons/coins.js +34 -0
  65. package/dist/icons/compare.d.ts +2 -0
  66. package/dist/icons/compare.js +33 -0
  67. package/dist/icons/confetti.d.ts +2 -0
  68. package/dist/icons/confetti.js +72 -0
  69. package/dist/icons/convenience-bag.d.ts +2 -0
  70. package/dist/icons/convenience-bag.js +51 -0
  71. package/dist/icons/cooling.d.ts +2 -0
  72. package/dist/icons/cooling.js +46 -0
  73. package/dist/icons/copy-files.d.ts +2 -0
  74. package/dist/icons/copy-files.js +37 -0
  75. package/dist/icons/core-switch.d.ts +2 -0
  76. package/dist/icons/core-switch.js +48 -0
  77. package/dist/icons/cursor.d.ts +2 -0
  78. package/dist/icons/cursor.js +27 -0
  79. package/dist/icons/database.d.ts +2 -0
  80. package/dist/icons/database.js +24 -0
  81. package/dist/icons/desktop-tower.d.ts +2 -0
  82. package/dist/icons/desktop-tower.js +41 -0
  83. package/dist/icons/disc-image.d.ts +2 -0
  84. package/dist/icons/disc-image.js +54 -0
  85. package/dist/icons/dollar-note.d.ts +2 -0
  86. package/dist/icons/dollar-note.js +44 -0
  87. package/dist/icons/electric-bill.d.ts +2 -0
  88. package/dist/icons/electric-bill.js +51 -0
  89. package/dist/icons/email.d.ts +2 -0
  90. package/dist/icons/email.js +57 -0
  91. package/dist/icons/empty-state.d.ts +2 -0
  92. package/dist/icons/empty-state.js +75 -0
  93. package/dist/icons/expense.d.ts +2 -0
  94. package/dist/icons/expense.js +36 -0
  95. package/dist/icons/export-file.d.ts +2 -0
  96. package/dist/icons/export-file.js +35 -0
  97. package/dist/icons/eyedropper.d.ts +2 -0
  98. package/dist/icons/eyedropper.js +69 -0
  99. package/dist/icons/face-id.d.ts +2 -0
  100. package/dist/icons/face-id.js +51 -0
  101. package/dist/icons/file.d.ts +2 -0
  102. package/dist/icons/file.js +15 -0
  103. package/dist/icons/finance-b-coins.d.ts +8 -0
  104. package/dist/icons/finance-b-coins.js +14 -0
  105. package/dist/icons/finance-tray.d.ts +11 -0
  106. package/dist/icons/finance-tray.js +41 -0
  107. package/dist/icons/fingerprint.d.ts +2 -0
  108. package/dist/icons/fingerprint.js +45 -0
  109. package/dist/icons/firewall.d.ts +2 -0
  110. package/dist/icons/firewall.js +76 -0
  111. package/dist/icons/floating-ip.d.ts +2 -0
  112. package/dist/icons/floating-ip.js +59 -0
  113. package/dist/icons/flower.d.ts +2 -0
  114. package/dist/icons/flower.js +49 -0
  115. package/dist/icons/food.d.ts +6 -0
  116. package/dist/icons/food.js +18 -0
  117. package/dist/icons/freelance.d.ts +2 -0
  118. package/dist/icons/freelance.js +51 -0
  119. package/dist/icons/fuel.d.ts +2 -0
  120. package/dist/icons/fuel.js +46 -0
  121. package/dist/icons/goal.d.ts +2 -0
  122. package/dist/icons/goal.js +51 -0
  123. package/dist/icons/gold-bar.d.ts +2 -0
  124. package/dist/icons/gold-bar.js +60 -0
  125. package/dist/icons/hard-drive.d.ts +2 -0
  126. package/dist/icons/hard-drive.js +42 -0
  127. package/dist/icons/highlighter.d.ts +2 -0
  128. package/dist/icons/highlighter.js +75 -0
  129. package/dist/icons/home-router.d.ts +2 -0
  130. package/dist/icons/home-router.js +32 -0
  131. package/dist/icons/hot-drink.d.ts +2 -0
  132. package/dist/icons/hot-drink.js +33 -0
  133. package/dist/icons/hsm.d.ts +2 -0
  134. package/dist/icons/hsm.js +54 -0
  135. package/dist/icons/id-card.d.ts +2 -0
  136. package/dist/icons/id-card.js +36 -0
  137. package/dist/icons/income.d.ts +2 -0
  138. package/dist/icons/income.js +28 -0
  139. package/dist/icons/index.d.ts +185 -0
  140. package/dist/icons/index.js +366 -0
  141. package/dist/icons/interest.d.ts +2 -0
  142. package/dist/icons/interest.js +66 -0
  143. package/dist/icons/iot-sensor.d.ts +2 -0
  144. package/dist/icons/iot-sensor.js +35 -0
  145. package/dist/icons/ip-phone.d.ts +2 -0
  146. package/dist/icons/ip-phone.js +47 -0
  147. package/dist/icons/ipad-gen8.d.ts +2 -0
  148. package/dist/icons/ipad-gen8.js +58 -0
  149. package/dist/icons/iphone-17.d.ts +2 -0
  150. package/dist/icons/iphone-17.js +37 -0
  151. package/dist/icons/iso.d.ts +2 -0
  152. package/dist/icons/iso.js +3 -0
  153. package/dist/icons/kaprao.d.ts +2 -0
  154. package/dist/icons/kaprao.js +70 -0
  155. package/dist/icons/key-pair.d.ts +2 -0
  156. package/dist/icons/key-pair.js +54 -0
  157. package/dist/icons/key.d.ts +3 -0
  158. package/dist/icons/key.js +37 -0
  159. package/dist/icons/keyboard.d.ts +2 -0
  160. package/dist/icons/keyboard.js +35 -0
  161. package/dist/icons/kite.d.ts +2 -0
  162. package/dist/icons/kite.js +53 -0
  163. package/dist/icons/kvm.d.ts +2 -0
  164. package/dist/icons/kvm.js +53 -0
  165. package/dist/icons/lamp.d.ts +2 -0
  166. package/dist/icons/lamp.js +49 -0
  167. package/dist/icons/laptop.d.ts +2 -0
  168. package/dist/icons/laptop.js +44 -0
  169. package/dist/icons/load-balancer.d.ts +2 -0
  170. package/dist/icons/load-balancer.js +50 -0
  171. package/dist/icons/lock-screen.d.ts +2 -0
  172. package/dist/icons/lock-screen.js +44 -0
  173. package/dist/icons/long-tail-boat.d.ts +2 -0
  174. package/dist/icons/long-tail-boat.js +66 -0
  175. package/dist/icons/lottery.d.ts +2 -0
  176. package/dist/icons/lottery.js +51 -0
  177. package/dist/icons/lotus.d.ts +2 -0
  178. package/dist/icons/lotus.js +70 -0
  179. package/dist/icons/mac-mini.d.ts +2 -0
  180. package/dist/icons/mac-mini.js +31 -0
  181. package/dist/icons/macbook-air.d.ts +2 -0
  182. package/dist/icons/macbook-air.js +41 -0
  183. package/dist/icons/mailbox-thai.d.ts +2 -0
  184. package/dist/icons/mailbox-thai.js +66 -0
  185. package/dist/icons/mango-sticky-rice.d.ts +2 -0
  186. package/dist/icons/mango-sticky-rice.js +41 -0
  187. package/dist/icons/marigold.d.ts +2 -0
  188. package/dist/icons/marigold.js +69 -0
  189. package/dist/icons/market-basket.d.ts +2 -0
  190. package/dist/icons/market-basket.js +69 -0
  191. package/dist/icons/media-player.d.ts +2 -0
  192. package/dist/icons/media-player.js +71 -0
  193. package/dist/icons/metrics.d.ts +2 -0
  194. package/dist/icons/metrics.js +58 -0
  195. package/dist/icons/mini-pc.d.ts +2 -0
  196. package/dist/icons/mini-pc.js +26 -0
  197. package/dist/icons/modem.d.ts +2 -0
  198. package/dist/icons/modem.js +37 -0
  199. package/dist/icons/monitor.d.ts +2 -0
  200. package/dist/icons/monitor.js +40 -0
  201. package/dist/icons/monstera.d.ts +2 -0
  202. package/dist/icons/monstera.js +47 -0
  203. package/dist/icons/moon.d.ts +2 -0
  204. package/dist/icons/moon.js +55 -0
  205. package/dist/icons/motorbike-taxi.d.ts +2 -0
  206. package/dist/icons/motorbike-taxi.js +42 -0
  207. package/dist/icons/music-note.d.ts +2 -0
  208. package/dist/icons/music-note.js +63 -0
  209. package/dist/icons/nas-2bay.d.ts +2 -0
  210. package/dist/icons/nas-2bay.js +49 -0
  211. package/dist/icons/nas.d.ts +2 -0
  212. package/dist/icons/nas.js +41 -0
  213. package/dist/icons/nature-iso.d.ts +29 -0
  214. package/dist/icons/nature-iso.js +74 -0
  215. package/dist/icons/noodle-soup.d.ts +2 -0
  216. package/dist/icons/noodle-soup.js +52 -0
  217. package/dist/icons/notebook.d.ts +2 -0
  218. package/dist/icons/notebook.js +44 -0
  219. package/dist/icons/object-drum.d.ts +18 -0
  220. package/dist/icons/object-drum.js +63 -0
  221. package/dist/icons/otp.d.ts +2 -0
  222. package/dist/icons/otp.js +46 -0
  223. package/dist/icons/over-budget.d.ts +2 -0
  224. package/dist/icons/over-budget.js +48 -0
  225. package/dist/icons/pad-see-ew.d.ts +2 -0
  226. package/dist/icons/pad-see-ew.js +56 -0
  227. package/dist/icons/palm-tree.d.ts +2 -0
  228. package/dist/icons/palm-tree.js +52 -0
  229. package/dist/icons/paper-boat.d.ts +2 -0
  230. package/dist/icons/paper-boat.js +67 -0
  231. package/dist/icons/paper.d.ts +3 -0
  232. package/dist/icons/paper.js +45 -0
  233. package/dist/icons/password.d.ts +2 -0
  234. package/dist/icons/password.js +45 -0
  235. package/dist/icons/patch-panel.d.ts +2 -0
  236. package/dist/icons/patch-panel.js +41 -0
  237. package/dist/icons/pdu.d.ts +2 -0
  238. package/dist/icons/pdu.js +40 -0
  239. package/dist/icons/phone-topup.d.ts +2 -0
  240. package/dist/icons/phone-topup.js +55 -0
  241. package/dist/icons/photo.d.ts +2 -0
  242. package/dist/icons/photo.js +48 -0
  243. package/dist/icons/phuang-malai.d.ts +2 -0
  244. package/dist/icons/phuang-malai.js +59 -0
  245. package/dist/icons/pie-chart.d.ts +2 -0
  246. package/dist/icons/pie-chart.js +36 -0
  247. package/dist/icons/piggy-bank.d.ts +2 -0
  248. package/dist/icons/piggy-bank.js +64 -0
  249. package/dist/icons/plant-kit.d.ts +23 -0
  250. package/dist/icons/plant-kit.js +112 -0
  251. package/dist/icons/plastic-stool.d.ts +2 -0
  252. package/dist/icons/plastic-stool.js +67 -0
  253. package/dist/icons/pointer.d.ts +1 -0
  254. package/dist/icons/pointer.js +12 -0
  255. package/dist/icons/pos.d.ts +2 -0
  256. package/dist/icons/pos.js +59 -0
  257. package/dist/icons/potted-plant.d.ts +2 -0
  258. package/dist/icons/potted-plant.js +31 -0
  259. package/dist/icons/power-pole.d.ts +2 -0
  260. package/dist/icons/power-pole.js +60 -0
  261. package/dist/icons/power-station.d.ts +2 -0
  262. package/dist/icons/power-station.js +56 -0
  263. package/dist/icons/printer.d.ts +2 -0
  264. package/dist/icons/printer.js +46 -0
  265. package/dist/icons/qr-code.d.ts +2 -0
  266. package/dist/icons/qr-code.js +45 -0
  267. package/dist/icons/rack.d.ts +2 -0
  268. package/dist/icons/rack.js +39 -0
  269. package/dist/icons/rain-cloud.d.ts +2 -0
  270. package/dist/icons/rain-cloud.js +31 -0
  271. package/dist/icons/rainbow.d.ts +2 -0
  272. package/dist/icons/rainbow.js +46 -0
  273. package/dist/icons/receipt.d.ts +2 -0
  274. package/dist/icons/receipt.js +56 -0
  275. package/dist/icons/redmi-note-9s-pro.d.ts +2 -0
  276. package/dist/icons/redmi-note-9s-pro.js +37 -0
  277. package/dist/icons/register.d.ts +2 -0
  278. package/dist/icons/register.js +40 -0
  279. package/dist/icons/remote-desktop.d.ts +2 -0
  280. package/dist/icons/remote-desktop.js +62 -0
  281. package/dist/icons/remote-folder.d.ts +2 -0
  282. package/dist/icons/remote-folder.js +55 -0
  283. package/dist/icons/rent.d.ts +2 -0
  284. package/dist/icons/rent.js +50 -0
  285. package/dist/icons/rock.d.ts +2 -0
  286. package/dist/icons/rock.js +80 -0
  287. package/dist/icons/router.d.ts +2 -0
  288. package/dist/icons/router.js +59 -0
  289. package/dist/icons/salary.d.ts +2 -0
  290. package/dist/icons/salary.js +54 -0
  291. package/dist/icons/saving-streak.d.ts +2 -0
  292. package/dist/icons/saving-streak.js +66 -0
  293. package/dist/icons/scan-slip.d.ts +2 -0
  294. package/dist/icons/scan-slip.js +53 -0
  295. package/dist/icons/scissors.d.ts +2 -0
  296. package/dist/icons/scissors.js +52 -0
  297. package/dist/icons/server-cabinet.d.ts +2 -0
  298. package/dist/icons/server-cabinet.js +49 -0
  299. package/dist/icons/server.d.ts +2 -0
  300. package/dist/icons/server.js +41 -0
  301. package/dist/icons/shared.d.ts +8 -0
  302. package/dist/icons/shared.js +18 -0
  303. package/dist/icons/shield.d.ts +3 -0
  304. package/dist/icons/shield.js +28 -0
  305. package/dist/icons/shooting-star.d.ts +2 -0
  306. package/dist/icons/shooting-star.js +37 -0
  307. package/dist/icons/shopping-box.d.ts +2 -0
  308. package/dist/icons/shopping-box.js +46 -0
  309. package/dist/icons/sky-kit.d.ts +19 -0
  310. package/dist/icons/sky-kit.js +72 -0
  311. package/dist/icons/smart-tv.d.ts +2 -0
  312. package/dist/icons/smart-tv.js +39 -0
  313. package/dist/icons/smartphone.d.ts +2 -0
  314. package/dist/icons/smartphone.js +30 -0
  315. package/dist/icons/sms.d.ts +2 -0
  316. package/dist/icons/sms.js +45 -0
  317. package/dist/icons/snapshots.d.ts +2 -0
  318. package/dist/icons/snapshots.js +45 -0
  319. package/dist/icons/snip.d.ts +2 -0
  320. package/dist/icons/snip.js +63 -0
  321. package/dist/icons/spirit-house.d.ts +2 -0
  322. package/dist/icons/spirit-house.js +73 -0
  323. package/dist/icons/ssl-certificate.d.ts +2 -0
  324. package/dist/icons/ssl-certificate.js +56 -0
  325. package/dist/icons/star.d.ts +2 -0
  326. package/dist/icons/star.js +16 -0
  327. package/dist/icons/stock.d.ts +2 -0
  328. package/dist/icons/stock.js +62 -0
  329. package/dist/icons/storage-array.d.ts +2 -0
  330. package/dist/icons/storage-array.js +40 -0
  331. package/dist/icons/storm.d.ts +2 -0
  332. package/dist/icons/storm.js +43 -0
  333. package/dist/icons/street-food-cart.d.ts +2 -0
  334. package/dist/icons/street-food-cart.js +66 -0
  335. package/dist/icons/street-kit.d.ts +19 -0
  336. package/dist/icons/street-kit.js +67 -0
  337. package/dist/icons/street-sign.d.ts +2 -0
  338. package/dist/icons/street-sign.js +42 -0
  339. package/dist/icons/studio-monitors.d.ts +2 -0
  340. package/dist/icons/studio-monitors.js +67 -0
  341. package/dist/icons/sun.d.ts +2 -0
  342. package/dist/icons/sun.js +40 -0
  343. package/dist/icons/support.d.ts +2 -0
  344. package/dist/icons/support.js +48 -0
  345. package/dist/icons/switch.d.ts +2 -0
  346. package/dist/icons/switch.js +34 -0
  347. package/dist/icons/tablet.d.ts +2 -0
  348. package/dist/icons/tablet.js +44 -0
  349. package/dist/icons/tape-library.d.ts +2 -0
  350. package/dist/icons/tape-library.js +48 -0
  351. package/dist/icons/temple-donation.d.ts +2 -0
  352. package/dist/icons/temple-donation.js +60 -0
  353. package/dist/icons/tent.d.ts +2 -0
  354. package/dist/icons/tent.js +66 -0
  355. package/dist/icons/terminal.d.ts +2 -0
  356. package/dist/icons/terminal.js +56 -0
  357. package/dist/icons/thai-house.d.ts +2 -0
  358. package/dist/icons/thai-house.js +85 -0
  359. package/dist/icons/thai-lantern.d.ts +2 -0
  360. package/dist/icons/thai-lantern.js +61 -0
  361. package/dist/icons/thinkpad-l380.d.ts +2 -0
  362. package/dist/icons/thinkpad-l380.js +54 -0
  363. package/dist/icons/timer.d.ts +2 -0
  364. package/dist/icons/timer.js +59 -0
  365. package/dist/icons/train-ticket.d.ts +2 -0
  366. package/dist/icons/train-ticket.js +57 -0
  367. package/dist/icons/trash.d.ts +2 -0
  368. package/dist/icons/trash.js +62 -0
  369. package/dist/icons/tree.d.ts +2 -0
  370. package/dist/icons/tree.js +40 -0
  371. package/dist/icons/tuk-tuk.d.ts +2 -0
  372. package/dist/icons/tuk-tuk.js +45 -0
  373. package/dist/icons/tulip.d.ts +2 -0
  374. package/dist/icons/tulip.js +56 -0
  375. package/dist/icons/tunnel.d.ts +2 -0
  376. package/dist/icons/tunnel.js +50 -0
  377. package/dist/icons/two-factor.d.ts +2 -0
  378. package/dist/icons/two-factor.js +81 -0
  379. package/dist/icons/ups.d.ts +2 -0
  380. package/dist/icons/ups.js +37 -0
  381. package/dist/icons/usb-drive.d.ts +2 -0
  382. package/dist/icons/usb-drive.js +35 -0
  383. package/dist/icons/verified.d.ts +2 -0
  384. package/dist/icons/verified.js +32 -0
  385. package/dist/icons/virtual-machine.d.ts +2 -0
  386. package/dist/icons/virtual-machine.js +66 -0
  387. package/dist/icons/volume.d.ts +6 -0
  388. package/dist/icons/volume.js +35 -0
  389. package/dist/icons/vpn-gateway.d.ts +2 -0
  390. package/dist/icons/vpn-gateway.js +51 -0
  391. package/dist/icons/wake-on-lan.d.ts +2 -0
  392. package/dist/icons/wake-on-lan.js +40 -0
  393. package/dist/icons/wallet.d.ts +3 -0
  394. package/dist/icons/wallet.js +55 -0
  395. package/dist/icons/water-jar.d.ts +2 -0
  396. package/dist/icons/water-jar.js +72 -0
  397. package/dist/icons/wooden-window.d.ts +2 -0
  398. package/dist/icons/wooden-window.js +65 -0
  399. package/dist/index.d.ts +2 -0
  400. package/dist/index.js +4 -0
  401. package/dist/iso.d.ts +32 -0
  402. package/dist/iso.js +64 -0
  403. package/dist/load.d.ts +197 -0
  404. package/dist/load.js +197 -0
  405. package/dist/motions.d.ts +68 -0
  406. package/dist/motions.js +446 -0
  407. package/dist/sticker.d.ts +269 -0
  408. package/dist/sticker.js +1009 -0
  409. package/package.json +101 -4
@@ -0,0 +1,269 @@
1
+ export type Vec = readonly [number, number];
2
+ /** Out x, out y of the left key, in x, in y of the right key: AE's influence handles, as a Lottie stores them. */
3
+ export type Ease = readonly [number, number, number, number];
4
+ /** `e` of 0 holds the value until the next key; `arc` bends a position segment along AE's spatial tangents. */
5
+ export type Key<T> = readonly [
6
+ t: number,
7
+ v: T,
8
+ e?: Ease | 0 | undefined,
9
+ arc?: readonly [Vec, Vec] | undefined
10
+ ];
11
+ export type Track<T> = readonly Key<T>[];
12
+ export type Anim<T> = T | Track<T>;
13
+ /** Additive keys laid over a layer's rest pose, so one preset drives any drawing. */
14
+ export interface Motion {
15
+ /** Degrees added. */
16
+ r?: Track<number>;
17
+ /** Px added, in the parent's space. */
18
+ p?: Track<Vec>;
19
+ /** Percent multiplied in. */
20
+ s?: Track<Vec>;
21
+ /** Opacity percent multiplied in. */
22
+ o?: Track<number>;
23
+ /** Px added to the extrusion of every slab on the layer. */
24
+ x?: Track<number>;
25
+ /** Frame the keys start from. */
26
+ at?: number;
27
+ /** Amplitude; negative mirrors. */
28
+ k?: number;
29
+ /** Repeat period in frames, the icon's length by default. */
30
+ loop?: number;
31
+ }
32
+ /**
33
+ * Palette slots are roles, so a theme keeps each part's meaning: `main` bodies, `gold` coins and
34
+ * stars, `tint` pale fills, `ok` success, `hot` hearts and alerts, `deep` the dark second colour.
35
+ */
36
+ export interface Palette {
37
+ main: string;
38
+ gold: string;
39
+ tint: string;
40
+ ok: string;
41
+ hot: string;
42
+ deep: string;
43
+ white: string;
44
+ grey: string;
45
+ paper: string;
46
+ ink: string;
47
+ }
48
+ export declare const ACCENTS: readonly ["main", "gold", "tint", "ok", "hot", "deep"];
49
+ export type Accent = (typeof ACCENTS)[number];
50
+ /** ฿20, the default ticket-wallet theme: blue action, carrier navy, amber, success green, red. */
51
+ export declare const BAHT: Palette;
52
+ /** The banknote themes of apps/docs banknotes.css: main is the note's 500, deep its 800, tint its 100. */
53
+ export declare const PALETTES: {
54
+ baht: Palette;
55
+ note50: {
56
+ main: string;
57
+ deep: string;
58
+ tint: string;
59
+ gold: string;
60
+ ok: string;
61
+ hot: string;
62
+ white: string;
63
+ grey: string;
64
+ paper: string;
65
+ ink: string;
66
+ };
67
+ note100: {
68
+ main: string;
69
+ deep: string;
70
+ tint: string;
71
+ hot: string;
72
+ gold: string;
73
+ ok: string;
74
+ white: string;
75
+ grey: string;
76
+ paper: string;
77
+ ink: string;
78
+ };
79
+ note500: {
80
+ main: string;
81
+ deep: string;
82
+ tint: string;
83
+ gold: string;
84
+ ok: string;
85
+ hot: string;
86
+ white: string;
87
+ grey: string;
88
+ paper: string;
89
+ ink: string;
90
+ };
91
+ note1000: {
92
+ main: string;
93
+ deep: string;
94
+ tint: string;
95
+ gold: string;
96
+ ok: string;
97
+ hot: string;
98
+ white: string;
99
+ grey: string;
100
+ paper: string;
101
+ ink: string;
102
+ };
103
+ };
104
+ export type PaletteName = keyof typeof PALETTES;
105
+ /** A slot, so the colour follows the palette it is drawn with, or a fixed hex. */
106
+ export type Swatch = keyof Palette | `#${string}`;
107
+ /** Which way flat faces turn, as the layer tilt and icon extrude that draw it. `right` is the house view. */
108
+ export declare const VIEWS: {
109
+ readonly right: {
110
+ readonly tilt: readonly [-18, 36];
111
+ readonly extrude: readonly [-4, 18];
112
+ };
113
+ readonly left: {
114
+ readonly tilt: readonly [18, 36];
115
+ readonly extrude: readonly [4, 18];
116
+ };
117
+ readonly front: {
118
+ readonly tilt: readonly [0, 30];
119
+ readonly extrude: readonly [0, 18];
120
+ };
121
+ readonly flat: {
122
+ readonly tilt: readonly [-45, 55];
123
+ readonly extrude: readonly [0, 20];
124
+ };
125
+ };
126
+ export type View = keyof typeof VIEWS;
127
+ export interface Shape {
128
+ /** SVG path data in layer space; morph keys need matching commands. */
129
+ d: Anim<string>;
130
+ fill?: Swatch;
131
+ /** Ink outline, on by default: outside the edge on fills, centred on open paths. */
132
+ line?: boolean | number;
133
+ /** Share of the icon's extrusion this shape is pushed by; 0 keeps it flat. */
134
+ depth?: number;
135
+ /** Colour of the extruded side, the fill by default. */
136
+ side?: Swatch;
137
+ /** Extra creases down the side for raw paths; poly() corners crease on their own. */
138
+ edges?: readonly Vec[];
139
+ /** False drops the automatic corner creases. */
140
+ crease?: boolean;
141
+ /** Round caps and joins instead of butt and miter. */
142
+ round?: boolean;
143
+ /** Drawn share of an open path, 0 to 1. */
144
+ trim?: Anim<number>;
145
+ }
146
+ export interface Layer {
147
+ id?: string;
148
+ parent?: string;
149
+ /** Id of a layer whose shapes mask this one, like a track matte. */
150
+ clip?: string;
151
+ /** Pivot, in layer space. */
152
+ a?: Vec;
153
+ p?: Anim<Vec>;
154
+ r?: Anim<number>;
155
+ s?: Anim<Vec>;
156
+ o?: Anim<number>;
157
+ /** Spin the drawing in its own plane, then lean that plane back, so faces foreshorten. */
158
+ tilt?: Vec;
159
+ /** First frame shown. */
160
+ ip?: number;
161
+ /** Frame it is gone by. */
162
+ op?: number;
163
+ m?: Motion | readonly Motion[];
164
+ shapes: readonly Shape[];
165
+ }
166
+ export interface Icon {
167
+ name: string;
168
+ /** Loop length at 60fps. */
169
+ frames: number;
170
+ /** Square canvas, 500 by default. */
171
+ size?: number;
172
+ /** Outline width, 4 by default. */
173
+ line?: number;
174
+ /** Outline colour, the palette's ink by default. */
175
+ ink?: Swatch;
176
+ /** Where every slab's side falls, in canvas space so it stays put while faces turn. */
177
+ extrude?: Anim<Vec>;
178
+ /** Frame shown under reduced motion, and where a play-once stops. */
179
+ still?: number;
180
+ /** Back to front. */
181
+ layers: readonly Layer[];
182
+ }
183
+ export declare const FPS = 60;
184
+ export declare function bezier(x1: number, y1: number, x2: number, y2: number): (x: number) => number;
185
+ /** A track's value at frame f: held before the first key and after the last, eased per segment between. */
186
+ export declare function at<T>(v: Anim<T>, f: number): T;
187
+ /** Shifts a track along the timeline, for staggering one preset across parts. */
188
+ export declare const shift: <T>(track: Track<T>, by: number) => Track<T>;
189
+ /** Where a point drawn on a face with this tilt lands in the layer's parent, for pivots and sparkles. */
190
+ export declare function onFace(tilt: Vec, [x, y]: Vec): Vec;
191
+ type Ctx = CanvasRenderingContext2D;
192
+ /** Paints frame f of an icon into ctx, whose current transform maps icon units (0..size) to its box; `line` scales every outline. */
193
+ export declare function draw(ctx: Ctx, icon: Icon, frame: number, palette?: Partial<Palette>, line?: number): void;
194
+ /** Every accent turned `deg` around the hue wheel, each keeping its own lightness and strength. */
195
+ export declare function hue(deg: number, from?: Palette): Palette;
196
+ /** Two brand colours fill every accent: primary on bodies, tints and hearts; secondary on dark parts, coins and checks. */
197
+ export declare function brand(primary: string, secondary?: string, from?: Palette): Palette;
198
+ /** One hue at six lightnesses; parts stay apart by lightness and the outlines do the rest. */
199
+ export declare function mono(color: string, from?: Palette): Palette;
200
+ /** The --baht-* token each accent reads, so a sticker follows the page's banknote theme and dark mode. */
201
+ export declare const TOKENS: Record<Accent, string>;
202
+ /**
203
+ * The accents as `el` sees the --baht-* tokens right now, as hex. Unset tokens fall back to BAHT.
204
+ * Colours are resolved by the browser (var(), color-mix()) and read back through a 1px canvas.
205
+ */
206
+ export declare function paletteFromTokens(el: Element): Palette;
207
+ export declare const rect: (x: number, y: number, w: number, h: number, r?: number) => string;
208
+ export declare const pill: (x: number, y: number, w: number, h: number) => string;
209
+ export declare const ellipse: (cx: number, cy: number, rx: number, ry?: number) => string;
210
+ /** Closed polygon with circular fillets, r per corner or one for all: the workhorse for sharp, friendly slabs. */
211
+ export declare function poly(points: readonly Vec[], r?: number | readonly number[]): string;
212
+ /** Four point sparkle with concave sides; pinch 0 is a bare cross, about .3 a fat star. Morphs at any pinch. */
213
+ export declare function spark(cx: number, cy: number, r: number, pinch?: number): string;
214
+ /** Scalloped rosette, the verified badge outline: n bumps bulging out from a ring of radius r. */
215
+ export declare function rosette(cx: number, cy: number, r: number, n?: number, bulge?: number): string;
216
+ /** Ring: outer edge clockwise, hole counter clockwise, so the hole stays open and its far wall shows. */
217
+ export declare const ring: (cx: number, cy: number, r: number, hole: number) => string;
218
+ /** n point star with lightly rounded tips. */
219
+ export declare const star: (cx: number, cy: number, r: number, inner?: number, n?: number, round?: number) => string;
220
+ /** Orthographic view of a model (x forward, y right, z up), turned yaw and seen from pitch above: poly() its faces. */
221
+ export declare function view(yaw: number, pitch: number): (p: readonly [number, number, number]) => Vec;
222
+ export declare const line: (...points: readonly Vec[]) => string;
223
+ /** Open circular arc, degrees clockwise from 3 o'clock. */
224
+ export declare function arc(cx: number, cy: number, r: number, from: number, to: number): string;
225
+ /** The page clock. Writing `frame` moves every sticker there, also while the loop is idle. */
226
+ export declare const clock: {
227
+ frame: number;
228
+ speed: number;
229
+ paused: boolean;
230
+ };
231
+ export declare function popBounce(t: number): number;
232
+ /** Paints one frame into a canvas sized by css, at device resolution, with the entrance at progress e (1 is rest). */
233
+ export declare function paint(canvas: HTMLCanvasElement, icon: Icon, frame: number, e?: number, palette?: Partial<Palette>, line?: number): void;
234
+ export interface PlayOptions {
235
+ /**
236
+ * Slots to swap, over BAHT. A function is read lazily: when the sticker is next painted after play(), set() or
237
+ * retheme(), so a sticker that is off-screen never reads it.
238
+ */
239
+ palette?: Partial<Palette> | (() => Partial<Palette> | undefined) | undefined;
240
+ /** False plays once from when it first shows, or from replay(), then rests on the icon's still. */
241
+ loop?: boolean | undefined;
242
+ /** Frames ahead of the page clock. */
243
+ offset?: number | undefined;
244
+ /** Seconds after it first shows to pop in on the bounce entrance; leave out to skip the entrance. */
245
+ enter?: number | undefined;
246
+ /** Outline weight as a multiple of the icon's own: 0.6 thinner, 1.5 bolder. 1 by default. */
247
+ line?: number | undefined;
248
+ }
249
+ export interface Player {
250
+ stop: () => void;
251
+ replay: () => void;
252
+ set: (next: PlayOptions & {
253
+ icon?: Icon;
254
+ }) => void;
255
+ /** A `palette` function may answer differently now: it is read at the next frame on screen, and the sticker repaints only if a colour changed. */
256
+ retheme: () => void;
257
+ }
258
+ /**
259
+ * Plays an icon in a canvas sized by css, on the page clock, until stop(); off-screen stickers skip their paints.
260
+ * The loop, and the clock with it, rests while no sticker on screen is moving.
261
+ */
262
+ export declare function play(canvas: HTMLCanvasElement, icon: Icon, opts?: PlayOptions): Player;
263
+ /** Makes icons available by `icon.name` to `<baht-sticker name>`; a later icon with the same name replaces it. */
264
+ export declare function registerSticker(...icons: readonly Icon[]): void;
265
+ /** The registered icon with this name, if any. */
266
+ export declare function getSticker(name: string): Icon | undefined;
267
+ /** Names of every registered icon, in registration order. */
268
+ export declare function stickerNames(): string[];
269
+ export {};