@20baht/stickers 0.0.0-stage → 0.1.1

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 (413) 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/cron.d.ts +2 -0
  78. package/dist/icons/cron.js +86 -0
  79. package/dist/icons/cursor.d.ts +2 -0
  80. package/dist/icons/cursor.js +27 -0
  81. package/dist/icons/database.d.ts +2 -0
  82. package/dist/icons/database.js +24 -0
  83. package/dist/icons/desktop-tower.d.ts +2 -0
  84. package/dist/icons/desktop-tower.js +41 -0
  85. package/dist/icons/disc-image.d.ts +2 -0
  86. package/dist/icons/disc-image.js +54 -0
  87. package/dist/icons/dollar-note.d.ts +2 -0
  88. package/dist/icons/dollar-note.js +44 -0
  89. package/dist/icons/electric-bill.d.ts +2 -0
  90. package/dist/icons/electric-bill.js +51 -0
  91. package/dist/icons/email.d.ts +2 -0
  92. package/dist/icons/email.js +57 -0
  93. package/dist/icons/empty-state.d.ts +2 -0
  94. package/dist/icons/empty-state.js +75 -0
  95. package/dist/icons/expense.d.ts +2 -0
  96. package/dist/icons/expense.js +36 -0
  97. package/dist/icons/export-file.d.ts +2 -0
  98. package/dist/icons/export-file.js +35 -0
  99. package/dist/icons/eyedropper.d.ts +2 -0
  100. package/dist/icons/eyedropper.js +69 -0
  101. package/dist/icons/face-id.d.ts +2 -0
  102. package/dist/icons/face-id.js +51 -0
  103. package/dist/icons/file.d.ts +2 -0
  104. package/dist/icons/file.js +15 -0
  105. package/dist/icons/finance-b-coins.d.ts +8 -0
  106. package/dist/icons/finance-b-coins.js +14 -0
  107. package/dist/icons/finance-tray.d.ts +11 -0
  108. package/dist/icons/finance-tray.js +41 -0
  109. package/dist/icons/fingerprint.d.ts +2 -0
  110. package/dist/icons/fingerprint.js +45 -0
  111. package/dist/icons/firewall.d.ts +2 -0
  112. package/dist/icons/firewall.js +76 -0
  113. package/dist/icons/floating-ip.d.ts +2 -0
  114. package/dist/icons/floating-ip.js +59 -0
  115. package/dist/icons/flower.d.ts +2 -0
  116. package/dist/icons/flower.js +49 -0
  117. package/dist/icons/food.d.ts +6 -0
  118. package/dist/icons/food.js +18 -0
  119. package/dist/icons/freelance.d.ts +2 -0
  120. package/dist/icons/freelance.js +51 -0
  121. package/dist/icons/fuel.d.ts +2 -0
  122. package/dist/icons/fuel.js +46 -0
  123. package/dist/icons/goal.d.ts +2 -0
  124. package/dist/icons/goal.js +51 -0
  125. package/dist/icons/gold-bar.d.ts +2 -0
  126. package/dist/icons/gold-bar.js +60 -0
  127. package/dist/icons/hard-drive.d.ts +2 -0
  128. package/dist/icons/hard-drive.js +42 -0
  129. package/dist/icons/highlighter.d.ts +2 -0
  130. package/dist/icons/highlighter.js +75 -0
  131. package/dist/icons/home-router.d.ts +2 -0
  132. package/dist/icons/home-router.js +32 -0
  133. package/dist/icons/hot-drink.d.ts +2 -0
  134. package/dist/icons/hot-drink.js +33 -0
  135. package/dist/icons/hsm.d.ts +2 -0
  136. package/dist/icons/hsm.js +54 -0
  137. package/dist/icons/id-card.d.ts +2 -0
  138. package/dist/icons/id-card.js +36 -0
  139. package/dist/icons/income.d.ts +2 -0
  140. package/dist/icons/income.js +28 -0
  141. package/dist/icons/index.d.ts +187 -0
  142. package/dist/icons/index.js +370 -0
  143. package/dist/icons/interest.d.ts +2 -0
  144. package/dist/icons/interest.js +66 -0
  145. package/dist/icons/iot-sensor.d.ts +2 -0
  146. package/dist/icons/iot-sensor.js +35 -0
  147. package/dist/icons/ip-phone.d.ts +2 -0
  148. package/dist/icons/ip-phone.js +47 -0
  149. package/dist/icons/ipad-gen8.d.ts +2 -0
  150. package/dist/icons/ipad-gen8.js +58 -0
  151. package/dist/icons/iphone-17.d.ts +2 -0
  152. package/dist/icons/iphone-17.js +37 -0
  153. package/dist/icons/iso.d.ts +2 -0
  154. package/dist/icons/iso.js +3 -0
  155. package/dist/icons/kanban.d.ts +2 -0
  156. package/dist/icons/kanban.js +85 -0
  157. package/dist/icons/kaprao.d.ts +2 -0
  158. package/dist/icons/kaprao.js +70 -0
  159. package/dist/icons/key-pair.d.ts +2 -0
  160. package/dist/icons/key-pair.js +54 -0
  161. package/dist/icons/key.d.ts +3 -0
  162. package/dist/icons/key.js +37 -0
  163. package/dist/icons/keyboard.d.ts +2 -0
  164. package/dist/icons/keyboard.js +35 -0
  165. package/dist/icons/kite.d.ts +2 -0
  166. package/dist/icons/kite.js +53 -0
  167. package/dist/icons/kvm.d.ts +2 -0
  168. package/dist/icons/kvm.js +53 -0
  169. package/dist/icons/lamp.d.ts +2 -0
  170. package/dist/icons/lamp.js +49 -0
  171. package/dist/icons/laptop.d.ts +2 -0
  172. package/dist/icons/laptop.js +44 -0
  173. package/dist/icons/load-balancer.d.ts +2 -0
  174. package/dist/icons/load-balancer.js +50 -0
  175. package/dist/icons/lock-screen.d.ts +2 -0
  176. package/dist/icons/lock-screen.js +44 -0
  177. package/dist/icons/long-tail-boat.d.ts +2 -0
  178. package/dist/icons/long-tail-boat.js +66 -0
  179. package/dist/icons/lottery.d.ts +2 -0
  180. package/dist/icons/lottery.js +51 -0
  181. package/dist/icons/lotus.d.ts +2 -0
  182. package/dist/icons/lotus.js +70 -0
  183. package/dist/icons/mac-mini.d.ts +2 -0
  184. package/dist/icons/mac-mini.js +31 -0
  185. package/dist/icons/macbook-air.d.ts +2 -0
  186. package/dist/icons/macbook-air.js +41 -0
  187. package/dist/icons/mailbox-thai.d.ts +2 -0
  188. package/dist/icons/mailbox-thai.js +66 -0
  189. package/dist/icons/mango-sticky-rice.d.ts +2 -0
  190. package/dist/icons/mango-sticky-rice.js +41 -0
  191. package/dist/icons/marigold.d.ts +2 -0
  192. package/dist/icons/marigold.js +69 -0
  193. package/dist/icons/market-basket.d.ts +2 -0
  194. package/dist/icons/market-basket.js +69 -0
  195. package/dist/icons/media-player.d.ts +2 -0
  196. package/dist/icons/media-player.js +71 -0
  197. package/dist/icons/metrics.d.ts +2 -0
  198. package/dist/icons/metrics.js +58 -0
  199. package/dist/icons/mini-pc.d.ts +2 -0
  200. package/dist/icons/mini-pc.js +26 -0
  201. package/dist/icons/modem.d.ts +2 -0
  202. package/dist/icons/modem.js +37 -0
  203. package/dist/icons/monitor.d.ts +2 -0
  204. package/dist/icons/monitor.js +40 -0
  205. package/dist/icons/monstera.d.ts +2 -0
  206. package/dist/icons/monstera.js +47 -0
  207. package/dist/icons/moon.d.ts +2 -0
  208. package/dist/icons/moon.js +55 -0
  209. package/dist/icons/motorbike-taxi.d.ts +2 -0
  210. package/dist/icons/motorbike-taxi.js +42 -0
  211. package/dist/icons/music-note.d.ts +2 -0
  212. package/dist/icons/music-note.js +63 -0
  213. package/dist/icons/nas-2bay.d.ts +2 -0
  214. package/dist/icons/nas-2bay.js +49 -0
  215. package/dist/icons/nas.d.ts +2 -0
  216. package/dist/icons/nas.js +41 -0
  217. package/dist/icons/nature-iso.d.ts +29 -0
  218. package/dist/icons/nature-iso.js +74 -0
  219. package/dist/icons/noodle-soup.d.ts +2 -0
  220. package/dist/icons/noodle-soup.js +52 -0
  221. package/dist/icons/notebook.d.ts +2 -0
  222. package/dist/icons/notebook.js +44 -0
  223. package/dist/icons/object-drum.d.ts +18 -0
  224. package/dist/icons/object-drum.js +63 -0
  225. package/dist/icons/otp.d.ts +2 -0
  226. package/dist/icons/otp.js +46 -0
  227. package/dist/icons/over-budget.d.ts +2 -0
  228. package/dist/icons/over-budget.js +48 -0
  229. package/dist/icons/pad-see-ew.d.ts +2 -0
  230. package/dist/icons/pad-see-ew.js +56 -0
  231. package/dist/icons/palm-tree.d.ts +2 -0
  232. package/dist/icons/palm-tree.js +52 -0
  233. package/dist/icons/paper-boat.d.ts +2 -0
  234. package/dist/icons/paper-boat.js +67 -0
  235. package/dist/icons/paper.d.ts +3 -0
  236. package/dist/icons/paper.js +45 -0
  237. package/dist/icons/password.d.ts +2 -0
  238. package/dist/icons/password.js +45 -0
  239. package/dist/icons/patch-panel.d.ts +2 -0
  240. package/dist/icons/patch-panel.js +41 -0
  241. package/dist/icons/pdu.d.ts +2 -0
  242. package/dist/icons/pdu.js +40 -0
  243. package/dist/icons/phone-topup.d.ts +2 -0
  244. package/dist/icons/phone-topup.js +55 -0
  245. package/dist/icons/photo.d.ts +2 -0
  246. package/dist/icons/photo.js +48 -0
  247. package/dist/icons/phuang-malai.d.ts +2 -0
  248. package/dist/icons/phuang-malai.js +59 -0
  249. package/dist/icons/pie-chart.d.ts +2 -0
  250. package/dist/icons/pie-chart.js +36 -0
  251. package/dist/icons/piggy-bank.d.ts +2 -0
  252. package/dist/icons/piggy-bank.js +64 -0
  253. package/dist/icons/plant-kit.d.ts +23 -0
  254. package/dist/icons/plant-kit.js +112 -0
  255. package/dist/icons/plastic-stool.d.ts +2 -0
  256. package/dist/icons/plastic-stool.js +67 -0
  257. package/dist/icons/pointer.d.ts +1 -0
  258. package/dist/icons/pointer.js +12 -0
  259. package/dist/icons/pos.d.ts +2 -0
  260. package/dist/icons/pos.js +59 -0
  261. package/dist/icons/potted-plant.d.ts +2 -0
  262. package/dist/icons/potted-plant.js +31 -0
  263. package/dist/icons/power-pole.d.ts +2 -0
  264. package/dist/icons/power-pole.js +60 -0
  265. package/dist/icons/power-station.d.ts +2 -0
  266. package/dist/icons/power-station.js +56 -0
  267. package/dist/icons/printer.d.ts +2 -0
  268. package/dist/icons/printer.js +46 -0
  269. package/dist/icons/qr-code.d.ts +2 -0
  270. package/dist/icons/qr-code.js +45 -0
  271. package/dist/icons/rack.d.ts +2 -0
  272. package/dist/icons/rack.js +39 -0
  273. package/dist/icons/rain-cloud.d.ts +2 -0
  274. package/dist/icons/rain-cloud.js +31 -0
  275. package/dist/icons/rainbow.d.ts +2 -0
  276. package/dist/icons/rainbow.js +46 -0
  277. package/dist/icons/receipt.d.ts +2 -0
  278. package/dist/icons/receipt.js +56 -0
  279. package/dist/icons/redmi-note-9s-pro.d.ts +2 -0
  280. package/dist/icons/redmi-note-9s-pro.js +37 -0
  281. package/dist/icons/register.d.ts +2 -0
  282. package/dist/icons/register.js +40 -0
  283. package/dist/icons/remote-desktop.d.ts +2 -0
  284. package/dist/icons/remote-desktop.js +62 -0
  285. package/dist/icons/remote-folder.d.ts +2 -0
  286. package/dist/icons/remote-folder.js +55 -0
  287. package/dist/icons/rent.d.ts +2 -0
  288. package/dist/icons/rent.js +50 -0
  289. package/dist/icons/rock.d.ts +2 -0
  290. package/dist/icons/rock.js +80 -0
  291. package/dist/icons/router.d.ts +2 -0
  292. package/dist/icons/router.js +59 -0
  293. package/dist/icons/salary.d.ts +2 -0
  294. package/dist/icons/salary.js +54 -0
  295. package/dist/icons/saving-streak.d.ts +2 -0
  296. package/dist/icons/saving-streak.js +66 -0
  297. package/dist/icons/scan-slip.d.ts +2 -0
  298. package/dist/icons/scan-slip.js +53 -0
  299. package/dist/icons/scissors.d.ts +2 -0
  300. package/dist/icons/scissors.js +52 -0
  301. package/dist/icons/server-cabinet.d.ts +2 -0
  302. package/dist/icons/server-cabinet.js +49 -0
  303. package/dist/icons/server.d.ts +2 -0
  304. package/dist/icons/server.js +41 -0
  305. package/dist/icons/shared.d.ts +8 -0
  306. package/dist/icons/shared.js +18 -0
  307. package/dist/icons/shield.d.ts +3 -0
  308. package/dist/icons/shield.js +28 -0
  309. package/dist/icons/shooting-star.d.ts +2 -0
  310. package/dist/icons/shooting-star.js +37 -0
  311. package/dist/icons/shopping-box.d.ts +2 -0
  312. package/dist/icons/shopping-box.js +46 -0
  313. package/dist/icons/sky-kit.d.ts +19 -0
  314. package/dist/icons/sky-kit.js +72 -0
  315. package/dist/icons/smart-tv.d.ts +2 -0
  316. package/dist/icons/smart-tv.js +39 -0
  317. package/dist/icons/smartphone.d.ts +2 -0
  318. package/dist/icons/smartphone.js +30 -0
  319. package/dist/icons/sms.d.ts +2 -0
  320. package/dist/icons/sms.js +45 -0
  321. package/dist/icons/snapshots.d.ts +2 -0
  322. package/dist/icons/snapshots.js +45 -0
  323. package/dist/icons/snip.d.ts +2 -0
  324. package/dist/icons/snip.js +63 -0
  325. package/dist/icons/spirit-house.d.ts +2 -0
  326. package/dist/icons/spirit-house.js +73 -0
  327. package/dist/icons/ssl-certificate.d.ts +2 -0
  328. package/dist/icons/ssl-certificate.js +56 -0
  329. package/dist/icons/star.d.ts +2 -0
  330. package/dist/icons/star.js +16 -0
  331. package/dist/icons/stock.d.ts +2 -0
  332. package/dist/icons/stock.js +62 -0
  333. package/dist/icons/storage-array.d.ts +2 -0
  334. package/dist/icons/storage-array.js +40 -0
  335. package/dist/icons/storm.d.ts +2 -0
  336. package/dist/icons/storm.js +43 -0
  337. package/dist/icons/street-food-cart.d.ts +2 -0
  338. package/dist/icons/street-food-cart.js +66 -0
  339. package/dist/icons/street-kit.d.ts +19 -0
  340. package/dist/icons/street-kit.js +67 -0
  341. package/dist/icons/street-sign.d.ts +2 -0
  342. package/dist/icons/street-sign.js +42 -0
  343. package/dist/icons/studio-monitors.d.ts +2 -0
  344. package/dist/icons/studio-monitors.js +67 -0
  345. package/dist/icons/sun.d.ts +2 -0
  346. package/dist/icons/sun.js +40 -0
  347. package/dist/icons/support.d.ts +2 -0
  348. package/dist/icons/support.js +48 -0
  349. package/dist/icons/switch.d.ts +2 -0
  350. package/dist/icons/switch.js +34 -0
  351. package/dist/icons/tablet.d.ts +2 -0
  352. package/dist/icons/tablet.js +44 -0
  353. package/dist/icons/tape-library.d.ts +2 -0
  354. package/dist/icons/tape-library.js +48 -0
  355. package/dist/icons/temple-donation.d.ts +2 -0
  356. package/dist/icons/temple-donation.js +60 -0
  357. package/dist/icons/tent.d.ts +2 -0
  358. package/dist/icons/tent.js +66 -0
  359. package/dist/icons/terminal.d.ts +2 -0
  360. package/dist/icons/terminal.js +56 -0
  361. package/dist/icons/thai-house.d.ts +2 -0
  362. package/dist/icons/thai-house.js +85 -0
  363. package/dist/icons/thai-lantern.d.ts +2 -0
  364. package/dist/icons/thai-lantern.js +61 -0
  365. package/dist/icons/thinkpad-l380.d.ts +2 -0
  366. package/dist/icons/thinkpad-l380.js +54 -0
  367. package/dist/icons/timer.d.ts +2 -0
  368. package/dist/icons/timer.js +59 -0
  369. package/dist/icons/train-ticket.d.ts +2 -0
  370. package/dist/icons/train-ticket.js +57 -0
  371. package/dist/icons/trash.d.ts +2 -0
  372. package/dist/icons/trash.js +62 -0
  373. package/dist/icons/tree.d.ts +2 -0
  374. package/dist/icons/tree.js +40 -0
  375. package/dist/icons/tuk-tuk.d.ts +2 -0
  376. package/dist/icons/tuk-tuk.js +45 -0
  377. package/dist/icons/tulip.d.ts +2 -0
  378. package/dist/icons/tulip.js +56 -0
  379. package/dist/icons/tunnel.d.ts +2 -0
  380. package/dist/icons/tunnel.js +50 -0
  381. package/dist/icons/two-factor.d.ts +2 -0
  382. package/dist/icons/two-factor.js +81 -0
  383. package/dist/icons/ups.d.ts +2 -0
  384. package/dist/icons/ups.js +37 -0
  385. package/dist/icons/usb-drive.d.ts +2 -0
  386. package/dist/icons/usb-drive.js +35 -0
  387. package/dist/icons/verified.d.ts +2 -0
  388. package/dist/icons/verified.js +32 -0
  389. package/dist/icons/virtual-machine.d.ts +2 -0
  390. package/dist/icons/virtual-machine.js +66 -0
  391. package/dist/icons/volume.d.ts +6 -0
  392. package/dist/icons/volume.js +35 -0
  393. package/dist/icons/vpn-gateway.d.ts +2 -0
  394. package/dist/icons/vpn-gateway.js +51 -0
  395. package/dist/icons/wake-on-lan.d.ts +2 -0
  396. package/dist/icons/wake-on-lan.js +40 -0
  397. package/dist/icons/wallet.d.ts +3 -0
  398. package/dist/icons/wallet.js +55 -0
  399. package/dist/icons/water-jar.d.ts +2 -0
  400. package/dist/icons/water-jar.js +72 -0
  401. package/dist/icons/wooden-window.d.ts +2 -0
  402. package/dist/icons/wooden-window.js +65 -0
  403. package/dist/index.d.ts +2 -0
  404. package/dist/index.js +4 -0
  405. package/dist/iso.d.ts +32 -0
  406. package/dist/iso.js +64 -0
  407. package/dist/load.d.ts +199 -0
  408. package/dist/load.js +199 -0
  409. package/dist/motions.d.ts +68 -0
  410. package/dist/motions.js +446 -0
  411. package/dist/sticker.d.ts +269 -0
  412. package/dist/sticker.js +1009 -0
  413. package/package.json +101 -4
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const woodenWindow: Icon;
@@ -0,0 +1,65 @@
1
+ // Drawn for @20baht/stickers: a Thai wooden shutter window in a wall, in 3d (see iso.ts, street-kit.ts).
2
+ import { SNAP, twinkle } from '../motions.js';
3
+ import { poly } from '../sticker.js';
4
+ import { block, dot, faceOf, ISO, quad, solid } from '../iso.js';
5
+ import { lerp4 } from './street-kit.js';
6
+ import { glow, LINE } from './shared.js';
7
+ // A white wall, a dark teak frame, two panelled gold leaves that swing open towards the viewer and close again, and a
8
+ // planter of marigolds under the sill
9
+ const WALL = block([-150, 0, 0], [300, 0, 0], [0, 24, 0], [0, 0, 300]);
10
+ const FRAME = block([-92, -12, 70], [184, 0, 0], [0, 12, 0], [0, 0, 184]);
11
+ const ff = faceOf(FRAME, 'front');
12
+ const BOX = block([-104, -46, 44], [208, 0, 0], [0, 40, 0], [0, 0, 26]);
13
+ const boxTop = faceOf(BOX, 'top');
14
+ const [W, Z0, Z1, YF] = [80, 82, 242, -12];
15
+ /** A leaf turned `deg` out from its hinge at x0, `dir` +1 opening to the right of the hinge, -1 to the left. */
16
+ const leaf = (x0, dir, deg) => {
17
+ const a = (deg * Math.PI) / 180;
18
+ const fx = x0 + dir * W * Math.cos(a);
19
+ const fy = YF - W * Math.sin(a);
20
+ return [
21
+ [x0, YF, Z0],
22
+ [fx, fy, Z0],
23
+ [fx, fy, Z1],
24
+ [x0, YF, Z1],
25
+ ];
26
+ };
27
+ const track = (path) => [
28
+ [10, path(0), SNAP],
29
+ [44, path(72), 0],
30
+ [116, path(72), SNAP],
31
+ [150, path(0)],
32
+ ];
33
+ const pane = (q, [s, t, w, h]) => poly([lerp4(q, s, t), lerp4(q, s + w, t), lerp4(q, s + w, t + h), lerp4(q, s, t + h)].map((p) => ISO(p)));
34
+ const panes = (x0, dir) => [
35
+ { d: track((deg) => poly(leaf(x0, dir, deg).map((p) => ISO(p)))), fill: 'gold' },
36
+ ...[
37
+ [0.12, 0.08, 0.76, 0.38],
38
+ [0.12, 0.54, 0.76, 0.38],
39
+ ].map((box) => ({ d: track((deg) => pane(leaf(x0, dir, deg), box)), fill: 'gold' })),
40
+ ];
41
+ export const woodenWindow = {
42
+ name: 'wooden-window',
43
+ frames: 180,
44
+ still: 80,
45
+ line: LINE,
46
+ extrude: [0, 0],
47
+ layers: [
48
+ { id: 'win', p: [250, 395], shapes: [] },
49
+ {
50
+ parent: 'win',
51
+ shapes: [
52
+ ...solid(WALL, { fill: 'white', top: 'tint' }, 2),
53
+ ...solid(FRAME, { fill: 'deep' }, 2),
54
+ { d: quad(ff, 0.06, 0.06, 0.88, 0.88, 2), fill: 'main' },
55
+ ...solid(BOX, { fill: 'deep', top: 'gold' }, 2),
56
+ ...[0.16, 0.38, 0.6, 0.82].map((s, i) => ({
57
+ d: dot(boxTop, s, 0.5, 0.06, 0.26),
58
+ fill: i % 2 ? 'gold' : 'ok',
59
+ })),
60
+ ],
61
+ },
62
+ { parent: 'win', shapes: [...panes(-W, 1), ...panes(W, -1)] },
63
+ glow('win', [-150, -260], 24, [twinkle(44), twinkle(140, true)]),
64
+ ],
65
+ };
@@ -0,0 +1,2 @@
1
+ export * from './sticker.js';
2
+ export type { StickerName } from './load.js';
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ // @20baht/stickers: the runtime, palettes, shape kit and registry. Side-effect free; the element lives in
2
+ // @20baht/stickers/element, the motion presets in /motions, the worked icons in /icons and /icons/<name>,
3
+ // loadSticker (by name, on demand) in /load.
4
+ export * from './sticker.js';
package/dist/iso.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ import type { Shape, Swatch, Vec } from './sticker.js';
2
+ export type V3 = readonly [number, number, number];
3
+ /** The house camera for 3d devices: turned 30 degrees, looking down 30, x to the right, y away, z up. */
4
+ export declare const ISO: (p: readonly [number, number, number]) => Vec;
5
+ export declare const add: (a: V3, b: V3) => V3;
6
+ export declare const mul: (a: V3, k: number) => V3;
7
+ /** Which block face; `top` is +z, `front` is -y (towards the viewer), `right` is +x. */
8
+ export type FaceName = 'top' | 'bottom' | 'front' | 'back' | 'left' | 'right';
9
+ export interface Face {
10
+ name: FaceName;
11
+ /** Corners on screen. */
12
+ pts: Vec[];
13
+ /** Face space to screen: s along the first edge, t along the second, both 0 to 1. */
14
+ at: (s: number, t: number) => Vec;
15
+ }
16
+ /**
17
+ * The faces of the block at `o` spanned by `ex`, `ey`, `ez` that face the viewer. Corners run so that a face seen
18
+ * from outside winds one way on screen, and only those are kept, so a box shows its top, front and one side.
19
+ */
20
+ export declare function block(o: V3, ex: V3, ey: V3, ez: V3, P?: (p: readonly [number, number, number]) => Vec): Face[];
21
+ /** A block's visible faces as shapes, one fill per face name (a missing name takes `fill`). */
22
+ export declare function solid(faces: readonly Face[], fills: Partial<Record<FaceName, Swatch>> & {
23
+ fill: Swatch;
24
+ }, r?: number): Shape[];
25
+ /** The named face of a block (the caller knows it faces the viewer). */
26
+ export declare function faceOf(faces: readonly Face[], name: FaceName): Face;
27
+ /** A rectangle on a face, in the face's 0..1 space. */
28
+ export declare const quad: (f: Face, s: number, t: number, w: number, h: number, r?: number) => string;
29
+ /** A line on a face, in the face's 0..1 space. */
30
+ export declare const stroke: (f: Face, a: Vec, b: Vec) => string;
31
+ /** An ellipse on a face: a circle in face space, foreshortened with it (drawn as a 16-gon with soft corners). */
32
+ export declare function dot(f: Face, s: number, t: number, rs: number, rt?: number): string;
package/dist/iso.js ADDED
@@ -0,0 +1,64 @@
1
+ // True 3d for boxy devices: a block is an origin and three edge vectors (so a tilted lid is a block too), projected
2
+ // with the kit's view() and drawn as the faces that turn towards the viewer. Detail goes on a face through face(),
3
+ // which maps the face's own 2d (s, t) onto the screen, so a screen, a drive bay or a light foreshortens with it.
4
+ import { line, poly, view } from './sticker.js';
5
+ /** The house camera for 3d devices: turned 30 degrees, looking down 30, x to the right, y away, z up. */
6
+ export const ISO = view(-30, 30);
7
+ export const add = (a, b) => [a[0] + b[0], a[1] + b[1], a[2] + b[2]];
8
+ export const mul = (a, k) => [a[0] * k, a[1] * k, a[2] * k];
9
+ const area = (pts) => {
10
+ let a = 0;
11
+ for (let i = 0; i < pts.length; i++) {
12
+ const [p, q] = [pts[i] ?? [0, 0], pts[(i + 1) % pts.length] ?? [0, 0]];
13
+ a += p[0] * q[1] - q[0] * p[1];
14
+ }
15
+ return a;
16
+ };
17
+ /**
18
+ * The faces of the block at `o` spanned by `ex`, `ey`, `ez` that face the viewer. Corners run so that a face seen
19
+ * from outside winds one way on screen, and only those are kept, so a box shows its top, front and one side.
20
+ */
21
+ export function block(o, ex, ey, ez, P = ISO) {
22
+ const c = (i, j, k) => add(add(add(o, mul(ex, i)), mul(ey, j)), mul(ez, k));
23
+ // each face: origin corner, then its two edges, ordered so (edge1 x edge2) points out of the block
24
+ const faces = [
25
+ ['top', c(0, 0, 1), ex, ey],
26
+ ['bottom', c(0, 0, 0), ey, ex],
27
+ ['front', c(0, 0, 0), ex, ez],
28
+ ['back', c(0, 1, 0), ez, ex],
29
+ ['left', c(0, 0, 0), ez, ey],
30
+ ['right', c(1, 0, 0), ey, ez],
31
+ ];
32
+ const out = [];
33
+ for (const [name, fo, u, v] of faces) {
34
+ const at = (s, t) => P(add(add(fo, mul(u, s)), mul(v, t)));
35
+ const pts = [at(0, 0), at(1, 0), at(1, 1), at(0, 1)];
36
+ if (area(pts) < 0)
37
+ out.push({ name, pts, at });
38
+ }
39
+ return out;
40
+ }
41
+ /** A block's visible faces as shapes, one fill per face name (a missing name takes `fill`). */
42
+ export function solid(faces, fills, r = 0) {
43
+ return faces.map((f) => ({ d: poly(f.pts, r), fill: fills[f.name] ?? fills.fill }));
44
+ }
45
+ /** The named face of a block (the caller knows it faces the viewer). */
46
+ export function faceOf(faces, name) {
47
+ const f = faces.find((x) => x.name === name);
48
+ if (!f)
49
+ throw new Error(`iso: the ${name} face is turned away`);
50
+ return f;
51
+ }
52
+ /** A rectangle on a face, in the face's 0..1 space. */
53
+ export const quad = (f, s, t, w, h, r = 0) => poly([f.at(s, t), f.at(s + w, t), f.at(s + w, t + h), f.at(s, t + h)], r);
54
+ /** A line on a face, in the face's 0..1 space. */
55
+ export const stroke = (f, a, b) => line(f.at(a[0], a[1]), f.at(b[0], b[1]));
56
+ /** An ellipse on a face: a circle in face space, foreshortened with it (drawn as a 16-gon with soft corners). */
57
+ export function dot(f, s, t, rs, rt = rs) {
58
+ const pts = [];
59
+ for (let i = 0; i < 16; i++) {
60
+ const a = (i / 16) * Math.PI * 2;
61
+ pts.push(f.at(s + Math.cos(a) * rs, t + Math.sin(a) * rt));
62
+ }
63
+ return poly(pts, 2);
64
+ }
package/dist/load.d.ts ADDED
@@ -0,0 +1,199 @@
1
+ import type { Icon } from './sticker.js';
2
+ declare const LOADERS: {
3
+ 'access-point': () => Promise<Icon>;
4
+ 'ai-agent': () => Promise<Icon>;
5
+ 'alarm-clock': () => Promise<Icon>;
6
+ 'all-in-one': () => Promise<Icon>;
7
+ angpao: () => Promise<Icon>;
8
+ 'badge-reader': () => Promise<Icon>;
9
+ 'baht-note': () => Promise<Icon>;
10
+ bamboo: () => Promise<Icon>;
11
+ 'banana-leaf': () => Promise<Icon>;
12
+ 'banana-tree': () => Promise<Icon>;
13
+ bear: () => Promise<Icon>;
14
+ 'blade-chassis': () => Promise<Icon>;
15
+ bond: () => Promise<Icon>;
16
+ books: () => Promise<Icon>;
17
+ 'bts-card': () => Promise<Icon>;
18
+ 'budget-jar': () => Promise<Icon>;
19
+ cactus: () => Promise<Icon>;
20
+ calculator: () => Promise<Icon>;
21
+ 'calendar-month': () => Promise<Icon>;
22
+ cron: () => Promise<Icon>;
23
+ kanban: () => Promise<Icon>;
24
+ campfire: () => Promise<Icon>;
25
+ cctv: () => Promise<Icon>;
26
+ certificate: () => Promise<Icon>;
27
+ 'cha-yen': () => Promise<Icon>;
28
+ chedi: () => Promise<Icon>;
29
+ 'classic-phone': () => Promise<Icon>;
30
+ clipboard: () => Promise<Icon>;
31
+ cloud: () => Promise<Icon>;
32
+ coins: () => Promise<Icon>;
33
+ compare: () => Promise<Icon>;
34
+ confetti: () => Promise<Icon>;
35
+ 'convenience-bag': () => Promise<Icon>;
36
+ cooling: () => Promise<Icon>;
37
+ 'copy-files': () => Promise<Icon>;
38
+ 'core-switch': () => Promise<Icon>;
39
+ cursor: () => Promise<Icon>;
40
+ database: () => Promise<Icon>;
41
+ 'desktop-tower': () => Promise<Icon>;
42
+ 'disc-image': () => Promise<Icon>;
43
+ 'dollar-note': () => Promise<Icon>;
44
+ 'electric-bill': () => Promise<Icon>;
45
+ email: () => Promise<Icon>;
46
+ 'empty-state': () => Promise<Icon>;
47
+ expense: () => Promise<Icon>;
48
+ 'export-file': () => Promise<Icon>;
49
+ eyedropper: () => Promise<Icon>;
50
+ 'face-id': () => Promise<Icon>;
51
+ file: () => Promise<Icon>;
52
+ fingerprint: () => Promise<Icon>;
53
+ firewall: () => Promise<Icon>;
54
+ 'floating-ip': () => Promise<Icon>;
55
+ flower: () => Promise<Icon>;
56
+ freelance: () => Promise<Icon>;
57
+ fuel: () => Promise<Icon>;
58
+ goal: () => Promise<Icon>;
59
+ 'gold-bar': () => Promise<Icon>;
60
+ 'hard-drive': () => Promise<Icon>;
61
+ highlighter: () => Promise<Icon>;
62
+ 'home-router': () => Promise<Icon>;
63
+ 'hot-drink': () => Promise<Icon>;
64
+ hsm: () => Promise<Icon>;
65
+ 'id-card': () => Promise<Icon>;
66
+ income: () => Promise<Icon>;
67
+ interest: () => Promise<Icon>;
68
+ 'iot-sensor': () => Promise<Icon>;
69
+ 'ip-phone': () => Promise<Icon>;
70
+ 'ipad-gen8': () => Promise<Icon>;
71
+ 'iphone-17': () => Promise<Icon>;
72
+ kaprao: () => Promise<Icon>;
73
+ key: () => Promise<Icon>;
74
+ 'key-pair': () => Promise<Icon>;
75
+ keyboard: () => Promise<Icon>;
76
+ kite: () => Promise<Icon>;
77
+ kvm: () => Promise<Icon>;
78
+ lamp: () => Promise<Icon>;
79
+ laptop: () => Promise<Icon>;
80
+ 'load-balancer': () => Promise<Icon>;
81
+ 'lock-screen': () => Promise<Icon>;
82
+ 'long-tail-boat': () => Promise<Icon>;
83
+ lottery: () => Promise<Icon>;
84
+ lotus: () => Promise<Icon>;
85
+ 'mac-mini': () => Promise<Icon>;
86
+ 'macbook-air': () => Promise<Icon>;
87
+ 'mailbox-thai': () => Promise<Icon>;
88
+ 'mango-sticky-rice': () => Promise<Icon>;
89
+ marigold: () => Promise<Icon>;
90
+ 'market-basket': () => Promise<Icon>;
91
+ 'media-player': () => Promise<Icon>;
92
+ metrics: () => Promise<Icon>;
93
+ 'mini-pc': () => Promise<Icon>;
94
+ modem: () => Promise<Icon>;
95
+ monitor: () => Promise<Icon>;
96
+ monstera: () => Promise<Icon>;
97
+ moon: () => Promise<Icon>;
98
+ 'motorbike-taxi': () => Promise<Icon>;
99
+ 'music-note': () => Promise<Icon>;
100
+ nas: () => Promise<Icon>;
101
+ 'nas-2bay': () => Promise<Icon>;
102
+ 'noodle-soup': () => Promise<Icon>;
103
+ notebook: () => Promise<Icon>;
104
+ otp: () => Promise<Icon>;
105
+ 'over-budget': () => Promise<Icon>;
106
+ 'pad-see-ew': () => Promise<Icon>;
107
+ 'palm-tree': () => Promise<Icon>;
108
+ 'paper-boat': () => Promise<Icon>;
109
+ password: () => Promise<Icon>;
110
+ 'patch-panel': () => Promise<Icon>;
111
+ pdu: () => Promise<Icon>;
112
+ 'phone-topup': () => Promise<Icon>;
113
+ photo: () => Promise<Icon>;
114
+ 'phuang-malai': () => Promise<Icon>;
115
+ 'pie-chart': () => Promise<Icon>;
116
+ 'piggy-bank': () => Promise<Icon>;
117
+ 'plastic-stool': () => Promise<Icon>;
118
+ pos: () => Promise<Icon>;
119
+ 'potted-plant': () => Promise<Icon>;
120
+ 'power-pole': () => Promise<Icon>;
121
+ 'power-station': () => Promise<Icon>;
122
+ printer: () => Promise<Icon>;
123
+ 'qr-code': () => Promise<Icon>;
124
+ rack: () => Promise<Icon>;
125
+ 'rain-cloud': () => Promise<Icon>;
126
+ rainbow: () => Promise<Icon>;
127
+ receipt: () => Promise<Icon>;
128
+ 'redmi-note-9s-pro': () => Promise<Icon>;
129
+ register: () => Promise<Icon>;
130
+ 'remote-desktop': () => Promise<Icon>;
131
+ 'remote-folder': () => Promise<Icon>;
132
+ rent: () => Promise<Icon>;
133
+ rock: () => Promise<Icon>;
134
+ router: () => Promise<Icon>;
135
+ salary: () => Promise<Icon>;
136
+ 'saving-streak': () => Promise<Icon>;
137
+ 'scan-slip': () => Promise<Icon>;
138
+ scissors: () => Promise<Icon>;
139
+ server: () => Promise<Icon>;
140
+ 'server-cabinet': () => Promise<Icon>;
141
+ shield: () => Promise<Icon>;
142
+ 'shooting-star': () => Promise<Icon>;
143
+ 'shopping-box': () => Promise<Icon>;
144
+ 'smart-tv': () => Promise<Icon>;
145
+ smartphone: () => Promise<Icon>;
146
+ sms: () => Promise<Icon>;
147
+ snapshots: () => Promise<Icon>;
148
+ snip: () => Promise<Icon>;
149
+ 'spirit-house': () => Promise<Icon>;
150
+ 'ssl-certificate': () => Promise<Icon>;
151
+ star: () => Promise<Icon>;
152
+ stock: () => Promise<Icon>;
153
+ 'storage-array': () => Promise<Icon>;
154
+ storm: () => Promise<Icon>;
155
+ 'street-food-cart': () => Promise<Icon>;
156
+ 'street-sign': () => Promise<Icon>;
157
+ 'studio-monitors': () => Promise<Icon>;
158
+ sun: () => Promise<Icon>;
159
+ support: () => Promise<Icon>;
160
+ switch: () => Promise<Icon>;
161
+ tablet: () => Promise<Icon>;
162
+ 'tape-library': () => Promise<Icon>;
163
+ 'temple-donation': () => Promise<Icon>;
164
+ tent: () => Promise<Icon>;
165
+ terminal: () => Promise<Icon>;
166
+ 'thai-house': () => Promise<Icon>;
167
+ 'thai-lantern': () => Promise<Icon>;
168
+ 'thinkpad-l380': () => Promise<Icon>;
169
+ timer: () => Promise<Icon>;
170
+ 'train-ticket': () => Promise<Icon>;
171
+ trash: () => Promise<Icon>;
172
+ tree: () => Promise<Icon>;
173
+ 'tuk-tuk': () => Promise<Icon>;
174
+ tulip: () => Promise<Icon>;
175
+ tunnel: () => Promise<Icon>;
176
+ 'two-factor': () => Promise<Icon>;
177
+ ups: () => Promise<Icon>;
178
+ 'usb-drive': () => Promise<Icon>;
179
+ verified: () => Promise<Icon>;
180
+ 'virtual-machine': () => Promise<Icon>;
181
+ 'vpn-gateway': () => Promise<Icon>;
182
+ 'wake-on-lan': () => Promise<Icon>;
183
+ wallet: () => Promise<Icon>;
184
+ 'water-jar': () => Promise<Icon>;
185
+ 'wooden-window': () => Promise<Icon>;
186
+ };
187
+ /** The name of every sticker in the collection: its `icon.name`, its file under `icons/`, its `<baht-sticker name>`. */
188
+ export type StickerName = keyof typeof LOADERS;
189
+ /** Every sticker name, sorted. */
190
+ export declare const STICKER_NAMES: readonly StickerName[];
191
+ /** Whether `name` is a sticker of the collection, to narrow a name read at run time (from JSON, a URL) first. */
192
+ export declare const isStickerName: (name: string) => name is StickerName;
193
+ /**
194
+ * The sticker called `name`, loaded on demand through a dynamic import of `@20baht/stickers/icons/<name>`, so a
195
+ * bundle carries only the stickers a page asks for (each as its own chunk). Rejects for a name that is not a sticker.
196
+ * It does not register the icon: set it as `el.icon`, or pass it to `registerSticker` before `<baht-sticker name>`.
197
+ */
198
+ export declare function loadSticker(name: StickerName): Promise<Icon>;
199
+ export {};
package/dist/load.js ADDED
@@ -0,0 +1,199 @@
1
+ const LOADERS = {
2
+ 'access-point': async () => (await import('./icons/access-point.js')).accessPoint,
3
+ 'ai-agent': async () => (await import('./icons/ai-agent.js')).aiAgent,
4
+ 'alarm-clock': async () => (await import('./icons/alarm-clock.js')).alarmClock,
5
+ 'all-in-one': async () => (await import('./icons/all-in-one.js')).allInOne,
6
+ angpao: async () => (await import('./icons/angpao.js')).angpao,
7
+ 'badge-reader': async () => (await import('./icons/badge-reader.js')).badgeReader,
8
+ 'baht-note': async () => (await import('./icons/baht-note.js')).bahtNote,
9
+ bamboo: async () => (await import('./icons/bamboo.js')).bamboo,
10
+ 'banana-leaf': async () => (await import('./icons/banana-leaf.js')).bananaLeaf,
11
+ 'banana-tree': async () => (await import('./icons/banana-tree.js')).bananaTree,
12
+ bear: async () => (await import('./icons/bear.js')).bear,
13
+ 'blade-chassis': async () => (await import('./icons/blade-chassis.js')).bladeChassis,
14
+ bond: async () => (await import('./icons/bond.js')).bond,
15
+ books: async () => (await import('./icons/books.js')).books,
16
+ 'bts-card': async () => (await import('./icons/bts-card.js')).btsCard,
17
+ 'budget-jar': async () => (await import('./icons/budget-jar.js')).budgetJar,
18
+ cactus: async () => (await import('./icons/cactus.js')).cactus,
19
+ calculator: async () => (await import('./icons/calculator.js')).calculator,
20
+ 'calendar-month': async () => (await import('./icons/calendar-month.js')).calendarMonth,
21
+ cron: async () => (await import('./icons/cron.js')).cron,
22
+ kanban: async () => (await import('./icons/kanban.js')).kanban,
23
+ campfire: async () => (await import('./icons/campfire.js')).campfire,
24
+ cctv: async () => (await import('./icons/cctv.js')).cctv,
25
+ certificate: async () => (await import('./icons/certificate.js')).certificate,
26
+ 'cha-yen': async () => (await import('./icons/cha-yen.js')).chaYen,
27
+ chedi: async () => (await import('./icons/chedi.js')).chedi,
28
+ 'classic-phone': async () => (await import('./icons/classic-phone.js')).classicPhone,
29
+ clipboard: async () => (await import('./icons/clipboard.js')).clipboard,
30
+ cloud: async () => (await import('./icons/cloud.js')).cloud,
31
+ coins: async () => (await import('./icons/coins.js')).coins,
32
+ compare: async () => (await import('./icons/compare.js')).compare,
33
+ confetti: async () => (await import('./icons/confetti.js')).confetti,
34
+ 'convenience-bag': async () => (await import('./icons/convenience-bag.js')).convenienceBag,
35
+ cooling: async () => (await import('./icons/cooling.js')).cooling,
36
+ 'copy-files': async () => (await import('./icons/copy-files.js')).copyFiles,
37
+ 'core-switch': async () => (await import('./icons/core-switch.js')).coreSwitch,
38
+ cursor: async () => (await import('./icons/cursor.js')).cursor,
39
+ database: async () => (await import('./icons/database.js')).database,
40
+ 'desktop-tower': async () => (await import('./icons/desktop-tower.js')).desktopTower,
41
+ 'disc-image': async () => (await import('./icons/disc-image.js')).discImage,
42
+ 'dollar-note': async () => (await import('./icons/dollar-note.js')).dollarNote,
43
+ 'electric-bill': async () => (await import('./icons/electric-bill.js')).electricBill,
44
+ email: async () => (await import('./icons/email.js')).email,
45
+ 'empty-state': async () => (await import('./icons/empty-state.js')).emptyState,
46
+ expense: async () => (await import('./icons/expense.js')).expense,
47
+ 'export-file': async () => (await import('./icons/export-file.js')).exportFile,
48
+ eyedropper: async () => (await import('./icons/eyedropper.js')).eyedropper,
49
+ 'face-id': async () => (await import('./icons/face-id.js')).faceId,
50
+ file: async () => (await import('./icons/file.js')).file,
51
+ fingerprint: async () => (await import('./icons/fingerprint.js')).fingerprint,
52
+ firewall: async () => (await import('./icons/firewall.js')).firewall,
53
+ 'floating-ip': async () => (await import('./icons/floating-ip.js')).floatingIp,
54
+ flower: async () => (await import('./icons/flower.js')).flower,
55
+ freelance: async () => (await import('./icons/freelance.js')).freelance,
56
+ fuel: async () => (await import('./icons/fuel.js')).fuel,
57
+ goal: async () => (await import('./icons/goal.js')).goal,
58
+ 'gold-bar': async () => (await import('./icons/gold-bar.js')).goldBar,
59
+ 'hard-drive': async () => (await import('./icons/hard-drive.js')).hardDrive,
60
+ highlighter: async () => (await import('./icons/highlighter.js')).highlighter,
61
+ 'home-router': async () => (await import('./icons/home-router.js')).homeRouter,
62
+ 'hot-drink': async () => (await import('./icons/hot-drink.js')).hotDrink,
63
+ hsm: async () => (await import('./icons/hsm.js')).hsm,
64
+ 'id-card': async () => (await import('./icons/id-card.js')).idCard,
65
+ income: async () => (await import('./icons/income.js')).income,
66
+ interest: async () => (await import('./icons/interest.js')).interest,
67
+ 'iot-sensor': async () => (await import('./icons/iot-sensor.js')).iotSensor,
68
+ 'ip-phone': async () => (await import('./icons/ip-phone.js')).ipPhone,
69
+ 'ipad-gen8': async () => (await import('./icons/ipad-gen8.js')).ipadGen8,
70
+ 'iphone-17': async () => (await import('./icons/iphone-17.js')).iphone17,
71
+ kaprao: async () => (await import('./icons/kaprao.js')).kaprao,
72
+ key: async () => (await import('./icons/key.js')).key,
73
+ 'key-pair': async () => (await import('./icons/key-pair.js')).keyPair,
74
+ keyboard: async () => (await import('./icons/keyboard.js')).keyboard,
75
+ kite: async () => (await import('./icons/kite.js')).kite,
76
+ kvm: async () => (await import('./icons/kvm.js')).kvm,
77
+ lamp: async () => (await import('./icons/lamp.js')).lamp,
78
+ laptop: async () => (await import('./icons/laptop.js')).laptop,
79
+ 'load-balancer': async () => (await import('./icons/load-balancer.js')).loadBalancer,
80
+ 'lock-screen': async () => (await import('./icons/lock-screen.js')).lockScreen,
81
+ 'long-tail-boat': async () => (await import('./icons/long-tail-boat.js')).longTailBoat,
82
+ lottery: async () => (await import('./icons/lottery.js')).lottery,
83
+ lotus: async () => (await import('./icons/lotus.js')).lotus,
84
+ 'mac-mini': async () => (await import('./icons/mac-mini.js')).macMini,
85
+ 'macbook-air': async () => (await import('./icons/macbook-air.js')).macbookAir,
86
+ 'mailbox-thai': async () => (await import('./icons/mailbox-thai.js')).mailboxThai,
87
+ 'mango-sticky-rice': async () => (await import('./icons/mango-sticky-rice.js')).mangoStickyRice,
88
+ marigold: async () => (await import('./icons/marigold.js')).marigold,
89
+ 'market-basket': async () => (await import('./icons/market-basket.js')).marketBasket,
90
+ 'media-player': async () => (await import('./icons/media-player.js')).mediaPlayer,
91
+ metrics: async () => (await import('./icons/metrics.js')).metrics,
92
+ 'mini-pc': async () => (await import('./icons/mini-pc.js')).miniPc,
93
+ modem: async () => (await import('./icons/modem.js')).modem,
94
+ monitor: async () => (await import('./icons/monitor.js')).monitor,
95
+ monstera: async () => (await import('./icons/monstera.js')).monstera,
96
+ moon: async () => (await import('./icons/moon.js')).moon,
97
+ 'motorbike-taxi': async () => (await import('./icons/motorbike-taxi.js')).motorbikeTaxi,
98
+ 'music-note': async () => (await import('./icons/music-note.js')).musicNote,
99
+ nas: async () => (await import('./icons/nas.js')).nas,
100
+ 'nas-2bay': async () => (await import('./icons/nas-2bay.js')).nas2bay,
101
+ 'noodle-soup': async () => (await import('./icons/noodle-soup.js')).noodleSoup,
102
+ notebook: async () => (await import('./icons/notebook.js')).notebook,
103
+ otp: async () => (await import('./icons/otp.js')).otp,
104
+ 'over-budget': async () => (await import('./icons/over-budget.js')).overBudget,
105
+ 'pad-see-ew': async () => (await import('./icons/pad-see-ew.js')).padSeeEw,
106
+ 'palm-tree': async () => (await import('./icons/palm-tree.js')).palmTree,
107
+ 'paper-boat': async () => (await import('./icons/paper-boat.js')).paperBoat,
108
+ password: async () => (await import('./icons/password.js')).password,
109
+ 'patch-panel': async () => (await import('./icons/patch-panel.js')).patchPanel,
110
+ pdu: async () => (await import('./icons/pdu.js')).pdu,
111
+ 'phone-topup': async () => (await import('./icons/phone-topup.js')).phoneTopup,
112
+ photo: async () => (await import('./icons/photo.js')).photo,
113
+ 'phuang-malai': async () => (await import('./icons/phuang-malai.js')).phuangMalai,
114
+ 'pie-chart': async () => (await import('./icons/pie-chart.js')).pieChart,
115
+ 'piggy-bank': async () => (await import('./icons/piggy-bank.js')).piggyBank,
116
+ 'plastic-stool': async () => (await import('./icons/plastic-stool.js')).plasticStool,
117
+ pos: async () => (await import('./icons/pos.js')).pos,
118
+ 'potted-plant': async () => (await import('./icons/potted-plant.js')).pottedPlant,
119
+ 'power-pole': async () => (await import('./icons/power-pole.js')).powerPole,
120
+ 'power-station': async () => (await import('./icons/power-station.js')).powerStation,
121
+ printer: async () => (await import('./icons/printer.js')).printer,
122
+ 'qr-code': async () => (await import('./icons/qr-code.js')).qrCode,
123
+ rack: async () => (await import('./icons/rack.js')).rack,
124
+ 'rain-cloud': async () => (await import('./icons/rain-cloud.js')).rainCloud,
125
+ rainbow: async () => (await import('./icons/rainbow.js')).rainbow,
126
+ receipt: async () => (await import('./icons/receipt.js')).receipt,
127
+ 'redmi-note-9s-pro': async () => (await import('./icons/redmi-note-9s-pro.js')).redmiNote9sPro,
128
+ register: async () => (await import('./icons/register.js')).register,
129
+ 'remote-desktop': async () => (await import('./icons/remote-desktop.js')).remoteDesktop,
130
+ 'remote-folder': async () => (await import('./icons/remote-folder.js')).remoteFolder,
131
+ rent: async () => (await import('./icons/rent.js')).rent,
132
+ rock: async () => (await import('./icons/rock.js')).rock,
133
+ router: async () => (await import('./icons/router.js')).router,
134
+ salary: async () => (await import('./icons/salary.js')).salary,
135
+ 'saving-streak': async () => (await import('./icons/saving-streak.js')).savingStreak,
136
+ 'scan-slip': async () => (await import('./icons/scan-slip.js')).scanSlip,
137
+ scissors: async () => (await import('./icons/scissors.js')).scissors,
138
+ server: async () => (await import('./icons/server.js')).server,
139
+ 'server-cabinet': async () => (await import('./icons/server-cabinet.js')).serverCabinet,
140
+ shield: async () => (await import('./icons/shield.js')).shield,
141
+ 'shooting-star': async () => (await import('./icons/shooting-star.js')).shootingStar,
142
+ 'shopping-box': async () => (await import('./icons/shopping-box.js')).shoppingBox,
143
+ 'smart-tv': async () => (await import('./icons/smart-tv.js')).smartTv,
144
+ smartphone: async () => (await import('./icons/smartphone.js')).smartphone,
145
+ sms: async () => (await import('./icons/sms.js')).sms,
146
+ snapshots: async () => (await import('./icons/snapshots.js')).snapshots,
147
+ snip: async () => (await import('./icons/snip.js')).snip,
148
+ 'spirit-house': async () => (await import('./icons/spirit-house.js')).spiritHouse,
149
+ 'ssl-certificate': async () => (await import('./icons/ssl-certificate.js')).sslCertificate,
150
+ star: async () => (await import('./icons/star.js')).star,
151
+ stock: async () => (await import('./icons/stock.js')).stock,
152
+ 'storage-array': async () => (await import('./icons/storage-array.js')).storageArray,
153
+ storm: async () => (await import('./icons/storm.js')).storm,
154
+ 'street-food-cart': async () => (await import('./icons/street-food-cart.js')).streetFoodCart,
155
+ 'street-sign': async () => (await import('./icons/street-sign.js')).streetSign,
156
+ 'studio-monitors': async () => (await import('./icons/studio-monitors.js')).studioMonitors,
157
+ sun: async () => (await import('./icons/sun.js')).sun,
158
+ support: async () => (await import('./icons/support.js')).support,
159
+ switch: async () => (await import('./icons/switch.js')).switchBox,
160
+ tablet: async () => (await import('./icons/tablet.js')).tablet,
161
+ 'tape-library': async () => (await import('./icons/tape-library.js')).tapeLibrary,
162
+ 'temple-donation': async () => (await import('./icons/temple-donation.js')).templeDonation,
163
+ tent: async () => (await import('./icons/tent.js')).tent,
164
+ terminal: async () => (await import('./icons/terminal.js')).terminal,
165
+ 'thai-house': async () => (await import('./icons/thai-house.js')).thaiHouse,
166
+ 'thai-lantern': async () => (await import('./icons/thai-lantern.js')).thaiLantern,
167
+ 'thinkpad-l380': async () => (await import('./icons/thinkpad-l380.js')).thinkpadL380,
168
+ timer: async () => (await import('./icons/timer.js')).timer,
169
+ 'train-ticket': async () => (await import('./icons/train-ticket.js')).trainTicket,
170
+ trash: async () => (await import('./icons/trash.js')).trash,
171
+ tree: async () => (await import('./icons/tree.js')).tree,
172
+ 'tuk-tuk': async () => (await import('./icons/tuk-tuk.js')).tukTuk,
173
+ tulip: async () => (await import('./icons/tulip.js')).tulip,
174
+ tunnel: async () => (await import('./icons/tunnel.js')).tunnel,
175
+ 'two-factor': async () => (await import('./icons/two-factor.js')).twoFactor,
176
+ ups: async () => (await import('./icons/ups.js')).ups,
177
+ 'usb-drive': async () => (await import('./icons/usb-drive.js')).usbDrive,
178
+ verified: async () => (await import('./icons/verified.js')).verified,
179
+ 'virtual-machine': async () => (await import('./icons/virtual-machine.js')).virtualMachine,
180
+ 'vpn-gateway': async () => (await import('./icons/vpn-gateway.js')).vpnGateway,
181
+ 'wake-on-lan': async () => (await import('./icons/wake-on-lan.js')).wakeOnLan,
182
+ wallet: async () => (await import('./icons/wallet.js')).wallet,
183
+ 'water-jar': async () => (await import('./icons/water-jar.js')).waterJar,
184
+ 'wooden-window': async () => (await import('./icons/wooden-window.js')).woodenWindow,
185
+ };
186
+ /** Every sticker name, sorted. */
187
+ export const STICKER_NAMES = Object.keys(LOADERS).sort();
188
+ /** Whether `name` is a sticker of the collection, to narrow a name read at run time (from JSON, a URL) first. */
189
+ export const isStickerName = (name) => Object.hasOwn(LOADERS, name);
190
+ /**
191
+ * The sticker called `name`, loaded on demand through a dynamic import of `@20baht/stickers/icons/<name>`, so a
192
+ * bundle carries only the stickers a page asks for (each as its own chunk). Rejects for a name that is not a sticker.
193
+ * It does not register the icon: set it as `el.icon`, or pass it to `registerSticker` before `<baht-sticker name>`.
194
+ */
195
+ export function loadSticker(name) {
196
+ if (!isStickerName(name))
197
+ return Promise.reject(new Error(`@20baht/stickers: no sticker named "${String(name)}"`));
198
+ return LOADERS[name]();
199
+ }
@@ -0,0 +1,68 @@
1
+ import type { Ease, Motion, Track, Vec } from './sticker.js';
2
+ export declare const EASY: Ease;
3
+ export declare const POP: Ease;
4
+ export declare const SNAP: Ease;
5
+ export declare const OUT: Ease;
6
+ export declare const SOFT: Ease;
7
+ export declare const IN: Ease;
8
+ export declare const DROP: Ease;
9
+ /** The baked spring behind jolt, impact and the settles: overshoot to 1.448 of the travel, swings halving, 91 frames to rest. */
10
+ export declare function spring(to: Vec, start?: number, pace?: number, from?: Vec): Track<Vec>;
11
+ export declare function springTurn(to: number, start?: number, pace?: number, from?: number): Track<number>;
12
+ /** Containers spilling contents: winds up 20 degrees, whips past to 22, lands hard and stays still. Pivot on the edge it swings from. */
13
+ export declare const toss: Motion;
14
+ /** What rides inside a toss: the near one barely, the far one swings wide and slides. */
15
+ export declare const tossLag: Motion;
16
+ export declare const tossLag2: Motion;
17
+ /** Badges and hearts: rises tilting 9 degrees, slams through rest, rebounds twice. */
18
+ export declare const hop: Motion;
19
+ /** Coins and tokens: springs up and right to a raised spot, holds, then drops back through rest and springs home. */
20
+ export declare const bounce: Motion;
21
+ /** Bells and hands: rocks back 20 degrees, taps twice and settles, sliding 12px on the second beat. */
22
+ export declare const wiggle: Motion;
23
+ /** Cards and warnings: kicked along v with the spring, holds, eases home. */
24
+ export declare const jolt: (v?: Vec) => Motion;
25
+ /** A body under a lid: takes the hit on frame 24, springs, holds, eases back as the lid lifts. */
26
+ export declare const impact: (v?: Vec) => Motion;
27
+ /** A lid or cap: slams along v on an ease in, sits, pops back sharp at the end. */
28
+ export declare const latch: (v?: Vec) => Motion;
29
+ /** Locks and clips: lifts up and left as the shackle springs open, hangs, then slams down right and settles. 130 frame loop. */
30
+ export declare const clasp: Motion;
31
+ /** The shackle on the clasp's beat: swung open 33 degrees on a soft pop, back on a slam. Pivot on the leg that stays in. */
32
+ export declare const shackle: Motion;
33
+ /** Faces and mascots: dips and rocks a few degrees, never quite still. */
34
+ export declare const wobble: Motion;
35
+ /** Things that fly: a lazy figure of eight with a slow bank, x and y on their own beats. */
36
+ export declare const drift: readonly Motion[];
37
+ /** Keys and tools: turns home sharp, then a slow 17 degree twist out and back, floating 13px. */
38
+ export declare const twist: Motion;
39
+ /** A body reacting to a hit: nudged down and right, eases back. */
40
+ export declare const nudge: Motion;
41
+ /** A small part flicking out and back, a tongue or a tab. */
42
+ export declare const flick: Motion;
43
+ /** Buttons and keys: pushed 23px into its base with a hint of overshoot, back, then pops 13px proud and settles. Give it a still base to sink into. */
44
+ export declare const press: Motion;
45
+ /** Pupils: a glance up left, a dart down right, home. */
46
+ export declare const look: Motion;
47
+ /** Idle: a 5 degree lean and back over 3 seconds. Use k to tune, at to put parts out of phase. */
48
+ export declare const sway: Motion;
49
+ /** Idle: 10px down and up over 3 seconds; neighbours sit 20 frames apart. */
50
+ export declare const float: Motion;
51
+ /** Idle: a smaller bob with a sideways lean, 160 frame period. */
52
+ export declare const bob: Motion;
53
+ /** Scenes: dealt in from off to rest in 60 frames, all speed up front, swooping in level. Stagger parts 14 to 20 frames. */
54
+ export declare const deal: (from: Vec, turn: number, start?: number, grow?: boolean) => Motion;
55
+ /** Falls away on an ease in, 28 frames: clears a scene before it loops. */
56
+ export declare const fall: (to: Vec, start: number, len?: number) => Motion;
57
+ /** Toggles and tiles: one part to another slot over 60 frames on SNAP, holds, comes home. */
58
+ export declare const slide: (to: Vec, start: number, hold?: number, len?: number) => Motion;
59
+ /** Glare: swells out of nothing on a slow start, eases to 80%, shrinks away, drifting up and right. 71 frames. */
60
+ export declare const glint: (start: number, size?: number) => Motion;
61
+ /** Star: pops to 110 and settles in 30 frames; out reverses it. */
62
+ export declare const twinkle: (start: number, out?: boolean) => Motion;
63
+ /** Sparkle: grows and turns 46 degrees fast, then shrinks back on an ease in, 84 frames. */
64
+ export declare const sparkle: (start: number) => Motion;
65
+ /** Text lines: erased in 15 frames, staggered 5 apart, drawn back on a slow start. For a shape's trim. */
66
+ export declare const erase: (start: number, back: number) => Track<number>;
67
+ /** Flames: steps between drawn shapes every 40 frames, snapping out of each. For a shape's d. */
68
+ export declare const flicker: (shapes: readonly string[], gap?: number) => Track<string>;