@appinternalleads/ui 0.4.0 → 0.4.2

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 (901) hide show
  1. package/README.md +92 -0
  2. package/dist/cjs/agent/AgentComponent.js +1 -1
  3. package/dist/cjs/agent/AgentComponent.js.map +1 -1
  4. package/dist/cjs/agent/manifests.js +81 -1
  5. package/dist/cjs/agent/manifests.js.map +1 -1
  6. package/dist/cjs/agent/result.js +6 -0
  7. package/dist/cjs/agent/result.js.map +1 -1
  8. package/dist/cjs/components/catalog.js +18 -0
  9. package/dist/cjs/components/catalog.js.map +1 -1
  10. package/dist/cjs/components/onboarding/animated-status/AnimatedStage.js +21 -0
  11. package/dist/cjs/components/onboarding/animated-status/AnimatedStage.js.map +1 -0
  12. package/dist/cjs/components/onboarding/animated-status/AnimatedStage.types.js +6 -0
  13. package/dist/cjs/components/onboarding/animated-status/AnimatedStage.types.js.map +1 -0
  14. package/dist/cjs/components/onboarding/animated-status/AnimatedStage.web.js +89 -0
  15. package/dist/cjs/components/onboarding/animated-status/AnimatedStage.web.js.map +1 -0
  16. package/dist/cjs/components/onboarding/animated-status/AnimatedStatusView.js +62 -0
  17. package/dist/cjs/components/onboarding/animated-status/AnimatedStatusView.js.map +1 -0
  18. package/dist/cjs/components/onboarding/animated-status/AnimatedStill.js +20 -0
  19. package/dist/cjs/components/onboarding/animated-status/AnimatedStill.js.map +1 -0
  20. package/dist/cjs/components/onboarding/animated-status/contract.js +87 -0
  21. package/dist/cjs/components/onboarding/animated-status/contract.js.map +1 -0
  22. package/dist/cjs/components/onboarding/animated-status/engine.js +40 -0
  23. package/dist/cjs/components/onboarding/animated-status/engine.js.map +1 -0
  24. package/dist/cjs/components/onboarding/animated-status/index.js +20 -0
  25. package/dist/cjs/components/onboarding/animated-status/index.js.map +1 -0
  26. package/dist/cjs/components/onboarding/animated-status/presets.json +126 -0
  27. package/dist/cjs/components/onboarding/animated-status/riv.js +7 -0
  28. package/dist/cjs/components/onboarding/animated-status/riv.js.map +1 -0
  29. package/dist/cjs/components/onboarding/index.js +4 -0
  30. package/dist/cjs/components/onboarding/index.js.map +1 -1
  31. package/dist/cjs/components/onboarding/presets.js +90 -84
  32. package/dist/cjs/components/onboarding/presets.js.map +1 -1
  33. package/dist/cjs/components/onboarding/receipt-printer/ReceiptStage.js +43 -6
  34. package/dist/cjs/components/onboarding/receipt-printer/ReceiptStage.js.map +1 -1
  35. package/dist/cjs/components/onboarding/send-completion/SendCompletionView.js +111 -0
  36. package/dist/cjs/components/onboarding/send-completion/SendCompletionView.js.map +1 -0
  37. package/dist/cjs/components/onboarding/send-completion/SendStage.js +37 -0
  38. package/dist/cjs/components/onboarding/send-completion/SendStage.js.map +1 -0
  39. package/dist/cjs/components/onboarding/send-completion/SendStage.types.js +6 -0
  40. package/dist/cjs/components/onboarding/send-completion/SendStage.types.js.map +1 -0
  41. package/dist/cjs/components/onboarding/send-completion/SendStage.web.js +107 -0
  42. package/dist/cjs/components/onboarding/send-completion/SendStage.web.js.map +1 -0
  43. package/dist/cjs/components/onboarding/send-completion/SendStill.js +17 -0
  44. package/dist/cjs/components/onboarding/send-completion/SendStill.js.map +1 -0
  45. package/dist/cjs/components/onboarding/send-completion/contract.js +83 -0
  46. package/dist/cjs/components/onboarding/send-completion/contract.js.map +1 -0
  47. package/dist/cjs/components/onboarding/send-completion/engine.js +32 -0
  48. package/dist/cjs/components/onboarding/send-completion/engine.js.map +1 -0
  49. package/dist/cjs/components/onboarding/send-completion/index.js +22 -0
  50. package/dist/cjs/components/onboarding/send-completion/index.js.map +1 -0
  51. package/dist/cjs/components/onboarding/send-completion/presets.json +132 -0
  52. package/dist/cjs/components/onboarding/send-completion/riv.js +7 -0
  53. package/dist/cjs/components/onboarding/send-completion/riv.js.map +1 -0
  54. package/dist/cjs/components/onboarding/shared/actions-data.js +2 -0
  55. package/dist/cjs/components/onboarding/shared/actions-data.js.map +1 -1
  56. package/dist/cjs/components/onboarding/shared/configColor.js +76 -0
  57. package/dist/cjs/components/onboarding/shared/configColor.js.map +1 -0
  58. package/dist/cjs/components/onboarding/shared/contract.js +4 -0
  59. package/dist/cjs/components/onboarding/shared/contract.js.map +1 -1
  60. package/dist/cjs/components/onboarding/shared/describe.js +1 -1
  61. package/dist/cjs/components/onboarding/shared/describe.js.map +1 -1
  62. package/dist/cjs/components/onboarding/shared/mock.js +2 -0
  63. package/dist/cjs/components/onboarding/shared/mock.js.map +1 -1
  64. package/dist/cjs/components/onboarding/views.js +8 -0
  65. package/dist/cjs/components/onboarding/views.js.map +1 -1
  66. package/dist/cjs/motion/MotionPlayer.js +42 -0
  67. package/dist/cjs/motion/MotionPlayer.js.map +1 -0
  68. package/dist/cjs/motion/agent.js +323 -0
  69. package/dist/cjs/motion/agent.js.map +1 -0
  70. package/dist/cjs/motion/cat/Cat.js +79 -0
  71. package/dist/cjs/motion/cat/Cat.js.map +1 -0
  72. package/dist/cjs/motion/cat/animation.js +204 -0
  73. package/dist/cjs/motion/cat/animation.js.map +1 -0
  74. package/dist/cjs/motion/cat/art.generated.js +37 -0
  75. package/dist/cjs/motion/cat/art.generated.js.map +1 -0
  76. package/dist/cjs/motion/cat/config.js +136 -0
  77. package/dist/cjs/motion/cat/config.js.map +1 -0
  78. package/dist/cjs/motion/cat/index.js +75 -0
  79. package/dist/cjs/motion/cat/index.js.map +1 -0
  80. package/dist/cjs/motion/cat/rig.js +99 -0
  81. package/dist/cjs/motion/cat/rig.js.map +1 -0
  82. package/dist/cjs/motion/cat/scene.js +148 -0
  83. package/dist/cjs/motion/cat/scene.js.map +1 -0
  84. package/dist/cjs/motion/configurable/config.js +477 -0
  85. package/dist/cjs/motion/configurable/config.js.map +1 -0
  86. package/dist/cjs/motion/configurable/controls.js +44 -0
  87. package/dist/cjs/motion/configurable/controls.js.map +1 -0
  88. package/dist/cjs/motion/easing.js +62 -0
  89. package/dist/cjs/motion/easing.js.map +1 -0
  90. package/dist/cjs/motion/fit.js +12 -0
  91. package/dist/cjs/motion/fit.js.map +1 -0
  92. package/dist/cjs/motion/index.js +101 -0
  93. package/dist/cjs/motion/index.js.map +1 -0
  94. package/dist/cjs/motion/neon/GlowRenderer.js +18 -0
  95. package/dist/cjs/motion/neon/GlowRenderer.js.map +1 -0
  96. package/dist/cjs/motion/neon/NeonCanvas.js +97 -0
  97. package/dist/cjs/motion/neon/NeonCanvas.js.map +1 -0
  98. package/dist/cjs/motion/neon/NeonText.js +108 -0
  99. package/dist/cjs/motion/neon/NeonText.js.map +1 -0
  100. package/dist/cjs/motion/neon/NeonTextFrame.js +36 -0
  101. package/dist/cjs/motion/neon/NeonTextFrame.js.map +1 -0
  102. package/dist/cjs/motion/neon/artwork.js +102 -0
  103. package/dist/cjs/motion/neon/artwork.js.map +1 -0
  104. package/dist/cjs/motion/neon/audio.js +165 -0
  105. package/dist/cjs/motion/neon/audio.js.map +1 -0
  106. package/dist/cjs/motion/neon/config.js +334 -0
  107. package/dist/cjs/motion/neon/config.js.map +1 -0
  108. package/dist/cjs/motion/neon/flicker.js +196 -0
  109. package/dist/cjs/motion/neon/flicker.js.map +1 -0
  110. package/dist/cjs/motion/neon/fonts.js +52 -0
  111. package/dist/cjs/motion/neon/fonts.js.map +1 -0
  112. package/dist/cjs/motion/neon/frame.js +24 -0
  113. package/dist/cjs/motion/neon/frame.js.map +1 -0
  114. package/dist/cjs/motion/neon/glitch.js +114 -0
  115. package/dist/cjs/motion/neon/glitch.js.map +1 -0
  116. package/dist/cjs/motion/neon/index.js +119 -0
  117. package/dist/cjs/motion/neon/index.js.map +1 -0
  118. package/dist/cjs/motion/neon/layers.js +68 -0
  119. package/dist/cjs/motion/neon/layers.js.map +1 -0
  120. package/dist/cjs/motion/neon/material.js +56 -0
  121. package/dist/cjs/motion/neon/material.js.map +1 -0
  122. package/dist/cjs/motion/neon/random.js +43 -0
  123. package/dist/cjs/motion/neon/random.js.map +1 -0
  124. package/dist/cjs/motion/neon/scene.js +549 -0
  125. package/dist/cjs/motion/neon/scene.js.map +1 -0
  126. package/dist/cjs/motion/neon/synth.js +213 -0
  127. package/dist/cjs/motion/neon/synth.js.map +1 -0
  128. package/dist/cjs/motion/neon/typography.js +81 -0
  129. package/dist/cjs/motion/neon/typography.js.map +1 -0
  130. package/dist/cjs/motion/neon/wall.js +113 -0
  131. package/dist/cjs/motion/neon/wall.js.map +1 -0
  132. package/dist/cjs/motion/paperfold/PaperFold.js +40 -0
  133. package/dist/cjs/motion/paperfold/PaperFold.js.map +1 -0
  134. package/dist/cjs/motion/paperfold/PaperFoldFrame.js +290 -0
  135. package/dist/cjs/motion/paperfold/PaperFoldFrame.js.map +1 -0
  136. package/dist/cjs/motion/paperfold/PaperFoldPlayer.js +59 -0
  137. package/dist/cjs/motion/paperfold/PaperFoldPlayer.js.map +1 -0
  138. package/dist/cjs/motion/paperfold/art.js +388 -0
  139. package/dist/cjs/motion/paperfold/art.js.map +1 -0
  140. package/dist/cjs/motion/paperfold/config.js +103 -0
  141. package/dist/cjs/motion/paperfold/config.js.map +1 -0
  142. package/dist/cjs/motion/paperfold/controls.js +493 -0
  143. package/dist/cjs/motion/paperfold/controls.js.map +1 -0
  144. package/dist/cjs/motion/paperfold/engine.js +722 -0
  145. package/dist/cjs/motion/paperfold/engine.js.map +1 -0
  146. package/dist/cjs/motion/paperfold/fonts.js +25 -0
  147. package/dist/cjs/motion/paperfold/fonts.js.map +1 -0
  148. package/dist/cjs/motion/paperfold/index.js +113 -0
  149. package/dist/cjs/motion/paperfold/index.js.map +1 -0
  150. package/dist/cjs/motion/paperfold/manipulate.js +170 -0
  151. package/dist/cjs/motion/paperfold/manipulate.js.map +1 -0
  152. package/dist/cjs/motion/paperfold/presets.js +119 -0
  153. package/dist/cjs/motion/paperfold/presets.js.map +1 -0
  154. package/dist/cjs/motion/paperfold/template.js +40 -0
  155. package/dist/cjs/motion/paperfold/template.js.map +1 -0
  156. package/dist/cjs/motion/player.js +203 -0
  157. package/dist/cjs/motion/player.js.map +1 -0
  158. package/dist/cjs/motion/promo/PromoFrame.js +293 -0
  159. package/dist/cjs/motion/promo/PromoFrame.js.map +1 -0
  160. package/dist/cjs/motion/promo/PromoShowcasePlayer.js +59 -0
  161. package/dist/cjs/motion/promo/PromoShowcasePlayer.js.map +1 -0
  162. package/dist/cjs/motion/promo/config.js +565 -0
  163. package/dist/cjs/motion/promo/config.js.map +1 -0
  164. package/dist/cjs/motion/promo/controls.js +571 -0
  165. package/dist/cjs/motion/promo/controls.js.map +1 -0
  166. package/dist/cjs/motion/promo/easing.js +35 -0
  167. package/dist/cjs/motion/promo/easing.js.map +1 -0
  168. package/dist/cjs/motion/promo/engine.js +567 -0
  169. package/dist/cjs/motion/promo/engine.js.map +1 -0
  170. package/dist/cjs/motion/promo/fonts.js +20 -0
  171. package/dist/cjs/motion/promo/fonts.js.map +1 -0
  172. package/dist/cjs/motion/promo/icons.js +29 -0
  173. package/dist/cjs/motion/promo/icons.js.map +1 -0
  174. package/dist/cjs/motion/promo/index.js +73 -0
  175. package/dist/cjs/motion/promo/index.js.map +1 -0
  176. package/dist/cjs/motion/promo/presets.js +44 -0
  177. package/dist/cjs/motion/promo/presets.js.map +1 -0
  178. package/dist/cjs/motion/promo/template.js +38 -0
  179. package/dist/cjs/motion/promo/template.js.map +1 -0
  180. package/dist/cjs/motion/replication2/Replication2Player.js +93 -0
  181. package/dist/cjs/motion/replication2/Replication2Player.js.map +1 -0
  182. package/dist/cjs/motion/replication2/config.js +352 -0
  183. package/dist/cjs/motion/replication2/config.js.map +1 -0
  184. package/dist/cjs/motion/replication2/controls.js +286 -0
  185. package/dist/cjs/motion/replication2/controls.js.map +1 -0
  186. package/dist/cjs/motion/replication2/driver.js +68 -0
  187. package/dist/cjs/motion/replication2/driver.js.map +1 -0
  188. package/dist/cjs/motion/replication2/easing.js +97 -0
  189. package/dist/cjs/motion/replication2/easing.js.map +1 -0
  190. package/dist/cjs/motion/replication2/engine.js +481 -0
  191. package/dist/cjs/motion/replication2/engine.js.map +1 -0
  192. package/dist/cjs/motion/replication2/html.js +88 -0
  193. package/dist/cjs/motion/replication2/html.js.map +1 -0
  194. package/dist/cjs/motion/replication2/index.js +61 -0
  195. package/dist/cjs/motion/replication2/index.js.map +1 -0
  196. package/dist/cjs/motion/replication2/measure.js +30 -0
  197. package/dist/cjs/motion/replication2/measure.js.map +1 -0
  198. package/dist/cjs/motion/replication2/metrics.js +10 -0
  199. package/dist/cjs/motion/replication2/metrics.js.map +1 -0
  200. package/dist/cjs/motion/replication2/presets.js +67 -0
  201. package/dist/cjs/motion/replication2/presets.js.map +1 -0
  202. package/dist/cjs/motion/replication2/riv.js +7 -0
  203. package/dist/cjs/motion/replication2/riv.js.map +1 -0
  204. package/dist/cjs/motion/replication2/rive-contract.js +158 -0
  205. package/dist/cjs/motion/replication2/rive-contract.js.map +1 -0
  206. package/dist/cjs/motion/replication2/template.js +35 -0
  207. package/dist/cjs/motion/replication2/template.js.map +1 -0
  208. package/dist/cjs/motion/sample.js +149 -0
  209. package/dist/cjs/motion/sample.js.map +1 -0
  210. package/dist/cjs/motion/templates/hey-template.js +1552 -0
  211. package/dist/cjs/motion/templates/hey-template.js.map +1 -0
  212. package/dist/cjs/motion/templates/index.js +22 -0
  213. package/dist/cjs/motion/templates/index.js.map +1 -0
  214. package/dist/cjs/motion/templates/word-motion.js +1165 -0
  215. package/dist/cjs/motion/templates/word-motion.js.map +1 -0
  216. package/dist/cjs/motion/types.js +3 -0
  217. package/dist/cjs/motion/types.js.map +1 -0
  218. package/dist/cjs/motion/typesurface/TypeSurfaceCanvas.js +85 -0
  219. package/dist/cjs/motion/typesurface/TypeSurfaceCanvas.js.map +1 -0
  220. package/dist/cjs/motion/typesurface/art.js +861 -0
  221. package/dist/cjs/motion/typesurface/art.js.map +1 -0
  222. package/dist/cjs/motion/typesurface/config.js +289 -0
  223. package/dist/cjs/motion/typesurface/config.js.map +1 -0
  224. package/dist/cjs/motion/typesurface/construct.js +875 -0
  225. package/dist/cjs/motion/typesurface/construct.js.map +1 -0
  226. package/dist/cjs/motion/typesurface/engine.js +631 -0
  227. package/dist/cjs/motion/typesurface/engine.js.map +1 -0
  228. package/dist/cjs/motion/typesurface/fonts.js +45 -0
  229. package/dist/cjs/motion/typesurface/fonts.js.map +1 -0
  230. package/dist/cjs/motion/typesurface/index.js +80 -0
  231. package/dist/cjs/motion/typesurface/index.js.map +1 -0
  232. package/dist/cjs/motion/typesurface/layout.js +130 -0
  233. package/dist/cjs/motion/typesurface/layout.js.map +1 -0
  234. package/dist/cjs/motion/typesurface/ops.js +175 -0
  235. package/dist/cjs/motion/typesurface/ops.js.map +1 -0
  236. package/dist/cjs/motion/typesurface/presets.js +259 -0
  237. package/dist/cjs/motion/typesurface/presets.js.map +1 -0
  238. package/dist/cjs/motion/typesurface/renderer.js +738 -0
  239. package/dist/cjs/motion/typesurface/renderer.js.map +1 -0
  240. package/dist/cjs/motion/typesurface/shaders.js +322 -0
  241. package/dist/cjs/motion/typesurface/shaders.js.map +1 -0
  242. package/dist/cjs/motion/typesurface/surfaces.js +225 -0
  243. package/dist/cjs/motion/typesurface/surfaces.js.map +1 -0
  244. package/dist/cjs/motion/typesurface/text.js +34 -0
  245. package/dist/cjs/motion/typesurface/text.js.map +1 -0
  246. package/dist/cjs/motion/typesurface/timeline.js +64 -0
  247. package/dist/cjs/motion/typesurface/timeline.js.map +1 -0
  248. package/dist/cjs/motion/validate.js +89 -0
  249. package/dist/cjs/motion/validate.js.map +1 -0
  250. package/dist/cjs/native/RiveReceiptStage.js +9 -150
  251. package/dist/cjs/native/RiveReceiptStage.js.map +1 -1
  252. package/dist/cjs/native/riveReceiptStageFactory.js +162 -0
  253. package/dist/cjs/native/riveReceiptStageFactory.js.map +1 -0
  254. package/dist/cjs/tokens/stage.js +10 -0
  255. package/dist/cjs/tokens/stage.js.map +1 -0
  256. package/dist/esm/agent/AgentComponent.js +1 -1
  257. package/dist/esm/agent/AgentComponent.js.map +1 -1
  258. package/dist/esm/agent/manifests.d.ts.map +1 -1
  259. package/dist/esm/agent/manifests.js +81 -1
  260. package/dist/esm/agent/manifests.js.map +1 -1
  261. package/dist/esm/agent/result.d.ts.map +1 -1
  262. package/dist/esm/agent/result.js +6 -0
  263. package/dist/esm/agent/result.js.map +1 -1
  264. package/dist/esm/agent/types.d.ts +1 -1
  265. package/dist/esm/agent/types.d.ts.map +1 -1
  266. package/dist/esm/components/catalog.d.ts +1 -1
  267. package/dist/esm/components/catalog.d.ts.map +1 -1
  268. package/dist/esm/components/catalog.js +18 -0
  269. package/dist/esm/components/catalog.js.map +1 -1
  270. package/dist/esm/components/onboarding/animated-status/AnimatedStage.d.ts +9 -0
  271. package/dist/esm/components/onboarding/animated-status/AnimatedStage.d.ts.map +1 -0
  272. package/dist/esm/components/onboarding/animated-status/AnimatedStage.js +18 -0
  273. package/dist/esm/components/onboarding/animated-status/AnimatedStage.js.map +1 -0
  274. package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.d.ts +31 -0
  275. package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.d.ts.map +1 -0
  276. package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.js +3 -0
  277. package/dist/esm/components/onboarding/animated-status/AnimatedStage.types.js.map +1 -0
  278. package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.d.ts +4 -0
  279. package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.d.ts.map +1 -0
  280. package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.js +86 -0
  281. package/dist/esm/components/onboarding/animated-status/AnimatedStage.web.js.map +1 -0
  282. package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.d.ts +32 -0
  283. package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.d.ts.map +1 -0
  284. package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.js +59 -0
  285. package/dist/esm/components/onboarding/animated-status/AnimatedStatusView.js.map +1 -0
  286. package/dist/esm/components/onboarding/animated-status/AnimatedStill.d.ts +8 -0
  287. package/dist/esm/components/onboarding/animated-status/AnimatedStill.d.ts.map +1 -0
  288. package/dist/esm/components/onboarding/animated-status/AnimatedStill.js +17 -0
  289. package/dist/esm/components/onboarding/animated-status/AnimatedStill.js.map +1 -0
  290. package/dist/esm/components/onboarding/animated-status/contract.d.ts +61 -0
  291. package/dist/esm/components/onboarding/animated-status/contract.d.ts.map +1 -0
  292. package/dist/esm/components/onboarding/animated-status/contract.js +78 -0
  293. package/dist/esm/components/onboarding/animated-status/contract.js.map +1 -0
  294. package/dist/esm/components/onboarding/animated-status/engine.d.ts +24 -0
  295. package/dist/esm/components/onboarding/animated-status/engine.d.ts.map +1 -0
  296. package/dist/esm/components/onboarding/animated-status/engine.js +32 -0
  297. package/dist/esm/components/onboarding/animated-status/engine.js.map +1 -0
  298. package/dist/esm/components/onboarding/animated-status/index.d.ts +5 -0
  299. package/dist/esm/components/onboarding/animated-status/index.d.ts.map +1 -0
  300. package/dist/esm/components/onboarding/animated-status/index.js +4 -0
  301. package/dist/esm/components/onboarding/animated-status/index.js.map +1 -0
  302. package/dist/esm/components/onboarding/animated-status/presets.json +126 -0
  303. package/dist/esm/components/onboarding/animated-status/riv.d.ts +3 -0
  304. package/dist/esm/components/onboarding/animated-status/riv.d.ts.map +1 -0
  305. package/dist/esm/components/onboarding/animated-status/riv.js +4 -0
  306. package/dist/esm/components/onboarding/animated-status/riv.js.map +1 -0
  307. package/dist/esm/components/onboarding/index.d.ts +2 -0
  308. package/dist/esm/components/onboarding/index.d.ts.map +1 -1
  309. package/dist/esm/components/onboarding/index.js +4 -0
  310. package/dist/esm/components/onboarding/index.js.map +1 -1
  311. package/dist/esm/components/onboarding/presets.d.ts.map +1 -1
  312. package/dist/esm/components/onboarding/presets.js +6 -0
  313. package/dist/esm/components/onboarding/presets.js.map +1 -1
  314. package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.d.ts +4 -6
  315. package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.d.ts.map +1 -1
  316. package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.js +42 -6
  317. package/dist/esm/components/onboarding/receipt-printer/ReceiptStage.js.map +1 -1
  318. package/dist/esm/components/onboarding/send-completion/SendCompletionView.d.ts +47 -0
  319. package/dist/esm/components/onboarding/send-completion/SendCompletionView.d.ts.map +1 -0
  320. package/dist/esm/components/onboarding/send-completion/SendCompletionView.js +108 -0
  321. package/dist/esm/components/onboarding/send-completion/SendCompletionView.js.map +1 -0
  322. package/dist/esm/components/onboarding/send-completion/SendStage.d.ts +9 -0
  323. package/dist/esm/components/onboarding/send-completion/SendStage.d.ts.map +1 -0
  324. package/dist/esm/components/onboarding/send-completion/SendStage.js +34 -0
  325. package/dist/esm/components/onboarding/send-completion/SendStage.js.map +1 -0
  326. package/dist/esm/components/onboarding/send-completion/SendStage.types.d.ts +33 -0
  327. package/dist/esm/components/onboarding/send-completion/SendStage.types.d.ts.map +1 -0
  328. package/dist/esm/components/onboarding/send-completion/SendStage.types.js +3 -0
  329. package/dist/esm/components/onboarding/send-completion/SendStage.types.js.map +1 -0
  330. package/dist/esm/components/onboarding/send-completion/SendStage.web.d.ts +4 -0
  331. package/dist/esm/components/onboarding/send-completion/SendStage.web.d.ts.map +1 -0
  332. package/dist/esm/components/onboarding/send-completion/SendStage.web.js +104 -0
  333. package/dist/esm/components/onboarding/send-completion/SendStage.web.js.map +1 -0
  334. package/dist/esm/components/onboarding/send-completion/SendStill.d.ts +11 -0
  335. package/dist/esm/components/onboarding/send-completion/SendStill.d.ts.map +1 -0
  336. package/dist/esm/components/onboarding/send-completion/SendStill.js +14 -0
  337. package/dist/esm/components/onboarding/send-completion/SendStill.js.map +1 -0
  338. package/dist/esm/components/onboarding/send-completion/contract.d.ts +99 -0
  339. package/dist/esm/components/onboarding/send-completion/contract.d.ts.map +1 -0
  340. package/dist/esm/components/onboarding/send-completion/contract.js +76 -0
  341. package/dist/esm/components/onboarding/send-completion/contract.js.map +1 -0
  342. package/dist/esm/components/onboarding/send-completion/engine.d.ts +20 -0
  343. package/dist/esm/components/onboarding/send-completion/engine.d.ts.map +1 -0
  344. package/dist/esm/components/onboarding/send-completion/engine.js +28 -0
  345. package/dist/esm/components/onboarding/send-completion/engine.js.map +1 -0
  346. package/dist/esm/components/onboarding/send-completion/index.d.ts +6 -0
  347. package/dist/esm/components/onboarding/send-completion/index.d.ts.map +1 -0
  348. package/dist/esm/components/onboarding/send-completion/index.js +6 -0
  349. package/dist/esm/components/onboarding/send-completion/index.js.map +1 -0
  350. package/dist/esm/components/onboarding/send-completion/presets.json +132 -0
  351. package/dist/esm/components/onboarding/send-completion/riv.d.ts +3 -0
  352. package/dist/esm/components/onboarding/send-completion/riv.d.ts.map +1 -0
  353. package/dist/esm/components/onboarding/send-completion/riv.js +4 -0
  354. package/dist/esm/components/onboarding/send-completion/riv.js.map +1 -0
  355. package/dist/esm/components/onboarding/shared/actions-data.d.ts.map +1 -1
  356. package/dist/esm/components/onboarding/shared/actions-data.js +2 -0
  357. package/dist/esm/components/onboarding/shared/actions-data.js.map +1 -1
  358. package/dist/esm/components/onboarding/shared/configColor.d.ts +29 -0
  359. package/dist/esm/components/onboarding/shared/configColor.d.ts.map +1 -0
  360. package/dist/esm/components/onboarding/shared/configColor.js +69 -0
  361. package/dist/esm/components/onboarding/shared/configColor.js.map +1 -0
  362. package/dist/esm/components/onboarding/shared/contract.d.ts +1 -1
  363. package/dist/esm/components/onboarding/shared/contract.d.ts.map +1 -1
  364. package/dist/esm/components/onboarding/shared/contract.js +4 -0
  365. package/dist/esm/components/onboarding/shared/contract.js.map +1 -1
  366. package/dist/esm/components/onboarding/shared/describe.d.ts.map +1 -1
  367. package/dist/esm/components/onboarding/shared/describe.js +1 -1
  368. package/dist/esm/components/onboarding/shared/describe.js.map +1 -1
  369. package/dist/esm/components/onboarding/shared/mock.d.ts +2 -0
  370. package/dist/esm/components/onboarding/shared/mock.d.ts.map +1 -1
  371. package/dist/esm/components/onboarding/shared/mock.js +2 -0
  372. package/dist/esm/components/onboarding/shared/mock.js.map +1 -1
  373. package/dist/esm/components/onboarding/views.d.ts.map +1 -1
  374. package/dist/esm/components/onboarding/views.js +8 -0
  375. package/dist/esm/components/onboarding/views.js.map +1 -1
  376. package/dist/esm/motion/MotionPlayer.d.ts +22 -0
  377. package/dist/esm/motion/MotionPlayer.d.ts.map +1 -0
  378. package/dist/esm/motion/MotionPlayer.js +39 -0
  379. package/dist/esm/motion/MotionPlayer.js.map +1 -0
  380. package/dist/esm/motion/agent.d.ts +146 -0
  381. package/dist/esm/motion/agent.d.ts.map +1 -0
  382. package/dist/esm/motion/agent.js +278 -0
  383. package/dist/esm/motion/agent.js.map +1 -0
  384. package/dist/esm/motion/cat/Cat.d.ts +43 -0
  385. package/dist/esm/motion/cat/Cat.d.ts.map +1 -0
  386. package/dist/esm/motion/cat/Cat.js +74 -0
  387. package/dist/esm/motion/cat/Cat.js.map +1 -0
  388. package/dist/esm/motion/cat/animation.d.ts +86 -0
  389. package/dist/esm/motion/cat/animation.d.ts.map +1 -0
  390. package/dist/esm/motion/cat/animation.js +193 -0
  391. package/dist/esm/motion/cat/animation.js.map +1 -0
  392. package/dist/esm/motion/cat/art.generated.d.ts +53 -0
  393. package/dist/esm/motion/cat/art.generated.d.ts.map +1 -0
  394. package/dist/esm/motion/cat/art.generated.js +34 -0
  395. package/dist/esm/motion/cat/art.generated.js.map +1 -0
  396. package/dist/esm/motion/cat/config.d.ts +103 -0
  397. package/dist/esm/motion/cat/config.d.ts.map +1 -0
  398. package/dist/esm/motion/cat/config.js +129 -0
  399. package/dist/esm/motion/cat/config.js.map +1 -0
  400. package/dist/esm/motion/cat/index.d.ts +13 -0
  401. package/dist/esm/motion/cat/index.d.ts.map +1 -0
  402. package/dist/esm/motion/cat/index.js +13 -0
  403. package/dist/esm/motion/cat/index.js.map +1 -0
  404. package/dist/esm/motion/cat/rig.d.ts +44 -0
  405. package/dist/esm/motion/cat/rig.d.ts.map +1 -0
  406. package/dist/esm/motion/cat/rig.js +86 -0
  407. package/dist/esm/motion/cat/rig.js.map +1 -0
  408. package/dist/esm/motion/cat/scene.d.ts +66 -0
  409. package/dist/esm/motion/cat/scene.d.ts.map +1 -0
  410. package/dist/esm/motion/cat/scene.js +137 -0
  411. package/dist/esm/motion/cat/scene.js.map +1 -0
  412. package/dist/esm/motion/configurable/config.d.ts +80 -0
  413. package/dist/esm/motion/configurable/config.d.ts.map +1 -0
  414. package/dist/esm/motion/configurable/config.js +468 -0
  415. package/dist/esm/motion/configurable/config.js.map +1 -0
  416. package/dist/esm/motion/configurable/controls.d.ts +74 -0
  417. package/dist/esm/motion/configurable/controls.d.ts.map +1 -0
  418. package/dist/esm/motion/configurable/controls.js +38 -0
  419. package/dist/esm/motion/configurable/controls.js.map +1 -0
  420. package/dist/esm/motion/easing.d.ts +4 -0
  421. package/dist/esm/motion/easing.d.ts.map +1 -0
  422. package/dist/esm/motion/easing.js +58 -0
  423. package/dist/esm/motion/easing.js.map +1 -0
  424. package/dist/esm/motion/fit.d.ts +8 -0
  425. package/dist/esm/motion/fit.d.ts.map +1 -0
  426. package/dist/esm/motion/fit.js +8 -0
  427. package/dist/esm/motion/fit.js.map +1 -0
  428. package/dist/esm/motion/index.d.ts +27 -0
  429. package/dist/esm/motion/index.d.ts.map +1 -0
  430. package/dist/esm/motion/index.js +21 -0
  431. package/dist/esm/motion/index.js.map +1 -0
  432. package/dist/esm/motion/neon/GlowRenderer.d.ts +31 -0
  433. package/dist/esm/motion/neon/GlowRenderer.d.ts.map +1 -0
  434. package/dist/esm/motion/neon/GlowRenderer.js +14 -0
  435. package/dist/esm/motion/neon/GlowRenderer.js.map +1 -0
  436. package/dist/esm/motion/neon/NeonCanvas.d.ts +42 -0
  437. package/dist/esm/motion/neon/NeonCanvas.d.ts.map +1 -0
  438. package/dist/esm/motion/neon/NeonCanvas.js +92 -0
  439. package/dist/esm/motion/neon/NeonCanvas.js.map +1 -0
  440. package/dist/esm/motion/neon/NeonText.d.ts +26 -0
  441. package/dist/esm/motion/neon/NeonText.d.ts.map +1 -0
  442. package/dist/esm/motion/neon/NeonText.js +103 -0
  443. package/dist/esm/motion/neon/NeonText.js.map +1 -0
  444. package/dist/esm/motion/neon/NeonTextFrame.d.ts +29 -0
  445. package/dist/esm/motion/neon/NeonTextFrame.d.ts.map +1 -0
  446. package/dist/esm/motion/neon/NeonTextFrame.js +33 -0
  447. package/dist/esm/motion/neon/NeonTextFrame.js.map +1 -0
  448. package/dist/esm/motion/neon/artwork.d.ts +29 -0
  449. package/dist/esm/motion/neon/artwork.d.ts.map +1 -0
  450. package/dist/esm/motion/neon/artwork.js +98 -0
  451. package/dist/esm/motion/neon/artwork.js.map +1 -0
  452. package/dist/esm/motion/neon/audio.d.ts +49 -0
  453. package/dist/esm/motion/neon/audio.d.ts.map +1 -0
  454. package/dist/esm/motion/neon/audio.js +161 -0
  455. package/dist/esm/motion/neon/audio.js.map +1 -0
  456. package/dist/esm/motion/neon/config.d.ts +319 -0
  457. package/dist/esm/motion/neon/config.d.ts.map +1 -0
  458. package/dist/esm/motion/neon/config.js +319 -0
  459. package/dist/esm/motion/neon/config.js.map +1 -0
  460. package/dist/esm/motion/neon/flicker.d.ts +82 -0
  461. package/dist/esm/motion/neon/flicker.d.ts.map +1 -0
  462. package/dist/esm/motion/neon/flicker.js +187 -0
  463. package/dist/esm/motion/neon/flicker.js.map +1 -0
  464. package/dist/esm/motion/neon/fonts.d.ts +29 -0
  465. package/dist/esm/motion/neon/fonts.d.ts.map +1 -0
  466. package/dist/esm/motion/neon/fonts.js +47 -0
  467. package/dist/esm/motion/neon/fonts.js.map +1 -0
  468. package/dist/esm/motion/neon/frame.d.ts +22 -0
  469. package/dist/esm/motion/neon/frame.d.ts.map +1 -0
  470. package/dist/esm/motion/neon/frame.js +20 -0
  471. package/dist/esm/motion/neon/frame.js.map +1 -0
  472. package/dist/esm/motion/neon/glitch.d.ts +64 -0
  473. package/dist/esm/motion/neon/glitch.d.ts.map +1 -0
  474. package/dist/esm/motion/neon/glitch.js +108 -0
  475. package/dist/esm/motion/neon/glitch.js.map +1 -0
  476. package/dist/esm/motion/neon/index.d.ts +29 -0
  477. package/dist/esm/motion/neon/index.d.ts.map +1 -0
  478. package/dist/esm/motion/neon/index.js +28 -0
  479. package/dist/esm/motion/neon/index.js.map +1 -0
  480. package/dist/esm/motion/neon/layers.d.ts +56 -0
  481. package/dist/esm/motion/neon/layers.d.ts.map +1 -0
  482. package/dist/esm/motion/neon/layers.js +64 -0
  483. package/dist/esm/motion/neon/layers.js.map +1 -0
  484. package/dist/esm/motion/neon/material.d.ts +68 -0
  485. package/dist/esm/motion/neon/material.d.ts.map +1 -0
  486. package/dist/esm/motion/neon/material.js +51 -0
  487. package/dist/esm/motion/neon/material.js.map +1 -0
  488. package/dist/esm/motion/neon/random.d.ts +15 -0
  489. package/dist/esm/motion/neon/random.d.ts.map +1 -0
  490. package/dist/esm/motion/neon/random.js +37 -0
  491. package/dist/esm/motion/neon/random.js.map +1 -0
  492. package/dist/esm/motion/neon/scene.d.ts +255 -0
  493. package/dist/esm/motion/neon/scene.d.ts.map +1 -0
  494. package/dist/esm/motion/neon/scene.js +532 -0
  495. package/dist/esm/motion/neon/scene.js.map +1 -0
  496. package/dist/esm/motion/neon/synth.d.ts +18 -0
  497. package/dist/esm/motion/neon/synth.d.ts.map +1 -0
  498. package/dist/esm/motion/neon/synth.js +208 -0
  499. package/dist/esm/motion/neon/synth.js.map +1 -0
  500. package/dist/esm/motion/neon/typography.d.ts +53 -0
  501. package/dist/esm/motion/neon/typography.d.ts.map +1 -0
  502. package/dist/esm/motion/neon/typography.js +74 -0
  503. package/dist/esm/motion/neon/typography.js.map +1 -0
  504. package/dist/esm/motion/neon/wall.d.ts +62 -0
  505. package/dist/esm/motion/neon/wall.d.ts.map +1 -0
  506. package/dist/esm/motion/neon/wall.js +106 -0
  507. package/dist/esm/motion/neon/wall.js.map +1 -0
  508. package/dist/esm/motion/paperfold/PaperFold.d.ts +36 -0
  509. package/dist/esm/motion/paperfold/PaperFold.d.ts.map +1 -0
  510. package/dist/esm/motion/paperfold/PaperFold.js +37 -0
  511. package/dist/esm/motion/paperfold/PaperFold.js.map +1 -0
  512. package/dist/esm/motion/paperfold/PaperFoldFrame.d.ts +39 -0
  513. package/dist/esm/motion/paperfold/PaperFoldFrame.d.ts.map +1 -0
  514. package/dist/esm/motion/paperfold/PaperFoldFrame.js +283 -0
  515. package/dist/esm/motion/paperfold/PaperFoldFrame.js.map +1 -0
  516. package/dist/esm/motion/paperfold/PaperFoldPlayer.d.ts +27 -0
  517. package/dist/esm/motion/paperfold/PaperFoldPlayer.d.ts.map +1 -0
  518. package/dist/esm/motion/paperfold/PaperFoldPlayer.js +56 -0
  519. package/dist/esm/motion/paperfold/PaperFoldPlayer.js.map +1 -0
  520. package/dist/esm/motion/paperfold/art.d.ts +148 -0
  521. package/dist/esm/motion/paperfold/art.d.ts.map +1 -0
  522. package/dist/esm/motion/paperfold/art.js +374 -0
  523. package/dist/esm/motion/paperfold/art.js.map +1 -0
  524. package/dist/esm/motion/paperfold/config.d.ts +47 -0
  525. package/dist/esm/motion/paperfold/config.d.ts.map +1 -0
  526. package/dist/esm/motion/paperfold/config.js +96 -0
  527. package/dist/esm/motion/paperfold/config.js.map +1 -0
  528. package/dist/esm/motion/paperfold/controls.d.ts +57 -0
  529. package/dist/esm/motion/paperfold/controls.d.ts.map +1 -0
  530. package/dist/esm/motion/paperfold/controls.js +506 -0
  531. package/dist/esm/motion/paperfold/controls.js.map +1 -0
  532. package/dist/esm/motion/paperfold/engine.d.ts +397 -0
  533. package/dist/esm/motion/paperfold/engine.d.ts.map +1 -0
  534. package/dist/esm/motion/paperfold/engine.js +699 -0
  535. package/dist/esm/motion/paperfold/engine.js.map +1 -0
  536. package/dist/esm/motion/paperfold/fonts.d.ts +3 -0
  537. package/dist/esm/motion/paperfold/fonts.d.ts.map +1 -0
  538. package/dist/esm/motion/paperfold/fonts.js +21 -0
  539. package/dist/esm/motion/paperfold/fonts.js.map +1 -0
  540. package/dist/esm/motion/paperfold/index.d.ts +17 -0
  541. package/dist/esm/motion/paperfold/index.d.ts.map +1 -0
  542. package/dist/esm/motion/paperfold/index.js +17 -0
  543. package/dist/esm/motion/paperfold/index.js.map +1 -0
  544. package/dist/esm/motion/paperfold/manipulate.d.ts +59 -0
  545. package/dist/esm/motion/paperfold/manipulate.d.ts.map +1 -0
  546. package/dist/esm/motion/paperfold/manipulate.js +161 -0
  547. package/dist/esm/motion/paperfold/manipulate.js.map +1 -0
  548. package/dist/esm/motion/paperfold/presets.d.ts +9 -0
  549. package/dist/esm/motion/paperfold/presets.d.ts.map +1 -0
  550. package/dist/esm/motion/paperfold/presets.js +115 -0
  551. package/dist/esm/motion/paperfold/presets.js.map +1 -0
  552. package/dist/esm/motion/paperfold/template.d.ts +3 -0
  553. package/dist/esm/motion/paperfold/template.d.ts.map +1 -0
  554. package/dist/esm/motion/paperfold/template.js +37 -0
  555. package/dist/esm/motion/paperfold/template.js.map +1 -0
  556. package/dist/esm/motion/player.d.ts +35 -0
  557. package/dist/esm/motion/player.d.ts.map +1 -0
  558. package/dist/esm/motion/player.js +197 -0
  559. package/dist/esm/motion/player.js.map +1 -0
  560. package/dist/esm/motion/promo/PromoFrame.d.ts +31 -0
  561. package/dist/esm/motion/promo/PromoFrame.d.ts.map +1 -0
  562. package/dist/esm/motion/promo/PromoFrame.js +288 -0
  563. package/dist/esm/motion/promo/PromoFrame.js.map +1 -0
  564. package/dist/esm/motion/promo/PromoShowcasePlayer.d.ts +25 -0
  565. package/dist/esm/motion/promo/PromoShowcasePlayer.d.ts.map +1 -0
  566. package/dist/esm/motion/promo/PromoShowcasePlayer.js +56 -0
  567. package/dist/esm/motion/promo/PromoShowcasePlayer.js.map +1 -0
  568. package/dist/esm/motion/promo/config.d.ts +91 -0
  569. package/dist/esm/motion/promo/config.d.ts.map +1 -0
  570. package/dist/esm/motion/promo/config.js +550 -0
  571. package/dist/esm/motion/promo/config.js.map +1 -0
  572. package/dist/esm/motion/promo/controls.d.ts +86 -0
  573. package/dist/esm/motion/promo/controls.d.ts.map +1 -0
  574. package/dist/esm/motion/promo/controls.js +567 -0
  575. package/dist/esm/motion/promo/controls.js.map +1 -0
  576. package/dist/esm/motion/promo/easing.d.ts +3 -0
  577. package/dist/esm/motion/promo/easing.d.ts.map +1 -0
  578. package/dist/esm/motion/promo/easing.js +32 -0
  579. package/dist/esm/motion/promo/easing.js.map +1 -0
  580. package/dist/esm/motion/promo/engine.d.ts +205 -0
  581. package/dist/esm/motion/promo/engine.d.ts.map +1 -0
  582. package/dist/esm/motion/promo/engine.js +551 -0
  583. package/dist/esm/motion/promo/engine.js.map +1 -0
  584. package/dist/esm/motion/promo/fonts.d.ts +7 -0
  585. package/dist/esm/motion/promo/fonts.d.ts.map +1 -0
  586. package/dist/esm/motion/promo/fonts.js +16 -0
  587. package/dist/esm/motion/promo/fonts.js.map +1 -0
  588. package/dist/esm/motion/promo/icons.d.ts +7 -0
  589. package/dist/esm/motion/promo/icons.d.ts.map +1 -0
  590. package/dist/esm/motion/promo/icons.js +26 -0
  591. package/dist/esm/motion/promo/icons.js.map +1 -0
  592. package/dist/esm/motion/promo/index.d.ts +15 -0
  593. package/dist/esm/motion/promo/index.d.ts.map +1 -0
  594. package/dist/esm/motion/promo/index.js +15 -0
  595. package/dist/esm/motion/promo/index.js.map +1 -0
  596. package/dist/esm/motion/promo/presets.d.ts +13 -0
  597. package/dist/esm/motion/promo/presets.d.ts.map +1 -0
  598. package/dist/esm/motion/promo/presets.js +40 -0
  599. package/dist/esm/motion/promo/presets.js.map +1 -0
  600. package/dist/esm/motion/promo/template.d.ts +8 -0
  601. package/dist/esm/motion/promo/template.d.ts.map +1 -0
  602. package/dist/esm/motion/promo/template.js +35 -0
  603. package/dist/esm/motion/promo/template.js.map +1 -0
  604. package/dist/esm/motion/replication2/Replication2Player.d.ts +26 -0
  605. package/dist/esm/motion/replication2/Replication2Player.d.ts.map +1 -0
  606. package/dist/esm/motion/replication2/Replication2Player.js +90 -0
  607. package/dist/esm/motion/replication2/Replication2Player.js.map +1 -0
  608. package/dist/esm/motion/replication2/config.d.ts +78 -0
  609. package/dist/esm/motion/replication2/config.d.ts.map +1 -0
  610. package/dist/esm/motion/replication2/config.js +341 -0
  611. package/dist/esm/motion/replication2/config.js.map +1 -0
  612. package/dist/esm/motion/replication2/controls.d.ts +70 -0
  613. package/dist/esm/motion/replication2/controls.d.ts.map +1 -0
  614. package/dist/esm/motion/replication2/controls.js +283 -0
  615. package/dist/esm/motion/replication2/controls.js.map +1 -0
  616. package/dist/esm/motion/replication2/driver.d.ts +23 -0
  617. package/dist/esm/motion/replication2/driver.d.ts.map +1 -0
  618. package/dist/esm/motion/replication2/driver.js +65 -0
  619. package/dist/esm/motion/replication2/driver.js.map +1 -0
  620. package/dist/esm/motion/replication2/easing.d.ts +19 -0
  621. package/dist/esm/motion/replication2/easing.d.ts.map +1 -0
  622. package/dist/esm/motion/replication2/easing.js +92 -0
  623. package/dist/esm/motion/replication2/easing.js.map +1 -0
  624. package/dist/esm/motion/replication2/engine.d.ts +236 -0
  625. package/dist/esm/motion/replication2/engine.d.ts.map +1 -0
  626. package/dist/esm/motion/replication2/engine.js +470 -0
  627. package/dist/esm/motion/replication2/engine.js.map +1 -0
  628. package/dist/esm/motion/replication2/html.d.ts +30 -0
  629. package/dist/esm/motion/replication2/html.d.ts.map +1 -0
  630. package/dist/esm/motion/replication2/html.js +83 -0
  631. package/dist/esm/motion/replication2/html.js.map +1 -0
  632. package/dist/esm/motion/replication2/index.d.ts +15 -0
  633. package/dist/esm/motion/replication2/index.d.ts.map +1 -0
  634. package/dist/esm/motion/replication2/index.js +15 -0
  635. package/dist/esm/motion/replication2/index.js.map +1 -0
  636. package/dist/esm/motion/replication2/measure.d.ts +3 -0
  637. package/dist/esm/motion/replication2/measure.d.ts.map +1 -0
  638. package/dist/esm/motion/replication2/measure.js +27 -0
  639. package/dist/esm/motion/replication2/measure.js.map +1 -0
  640. package/dist/esm/motion/replication2/metrics.d.ts +6 -0
  641. package/dist/esm/motion/replication2/metrics.d.ts.map +1 -0
  642. package/dist/esm/motion/replication2/metrics.js +7 -0
  643. package/dist/esm/motion/replication2/metrics.js.map +1 -0
  644. package/dist/esm/motion/replication2/presets.d.ts +13 -0
  645. package/dist/esm/motion/replication2/presets.d.ts.map +1 -0
  646. package/dist/esm/motion/replication2/presets.js +63 -0
  647. package/dist/esm/motion/replication2/presets.js.map +1 -0
  648. package/dist/esm/motion/replication2/riv.d.ts +3 -0
  649. package/dist/esm/motion/replication2/riv.d.ts.map +1 -0
  650. package/dist/esm/motion/replication2/riv.js +4 -0
  651. package/dist/esm/motion/replication2/riv.js.map +1 -0
  652. package/dist/esm/motion/replication2/rive-contract.d.ts +27 -0
  653. package/dist/esm/motion/replication2/rive-contract.d.ts.map +1 -0
  654. package/dist/esm/motion/replication2/rive-contract.js +153 -0
  655. package/dist/esm/motion/replication2/rive-contract.js.map +1 -0
  656. package/dist/esm/motion/replication2/template.d.ts +8 -0
  657. package/dist/esm/motion/replication2/template.d.ts.map +1 -0
  658. package/dist/esm/motion/replication2/template.js +32 -0
  659. package/dist/esm/motion/replication2/template.js.map +1 -0
  660. package/dist/esm/motion/sample.d.ts +61 -0
  661. package/dist/esm/motion/sample.d.ts.map +1 -0
  662. package/dist/esm/motion/sample.js +138 -0
  663. package/dist/esm/motion/sample.js.map +1 -0
  664. package/dist/esm/motion/templates/hey-template.d.ts +3 -0
  665. package/dist/esm/motion/templates/hey-template.d.ts.map +1 -0
  666. package/dist/esm/motion/templates/hey-template.js +1549 -0
  667. package/dist/esm/motion/templates/hey-template.js.map +1 -0
  668. package/dist/esm/motion/templates/index.d.ts +22 -0
  669. package/dist/esm/motion/templates/index.d.ts.map +1 -0
  670. package/dist/esm/motion/templates/index.js +15 -0
  671. package/dist/esm/motion/templates/index.js.map +1 -0
  672. package/dist/esm/motion/templates/word-motion.d.ts +3 -0
  673. package/dist/esm/motion/templates/word-motion.d.ts.map +1 -0
  674. package/dist/esm/motion/templates/word-motion.js +1162 -0
  675. package/dist/esm/motion/templates/word-motion.js.map +1 -0
  676. package/dist/esm/motion/types.d.ts +192 -0
  677. package/dist/esm/motion/types.d.ts.map +1 -0
  678. package/dist/esm/motion/types.js +2 -0
  679. package/dist/esm/motion/types.js.map +1 -0
  680. package/dist/esm/motion/typesurface/TypeSurfaceCanvas.d.ts +32 -0
  681. package/dist/esm/motion/typesurface/TypeSurfaceCanvas.d.ts.map +1 -0
  682. package/dist/esm/motion/typesurface/TypeSurfaceCanvas.js +81 -0
  683. package/dist/esm/motion/typesurface/TypeSurfaceCanvas.js.map +1 -0
  684. package/dist/esm/motion/typesurface/art.d.ts +21 -0
  685. package/dist/esm/motion/typesurface/art.d.ts.map +1 -0
  686. package/dist/esm/motion/typesurface/art.js +854 -0
  687. package/dist/esm/motion/typesurface/art.js.map +1 -0
  688. package/dist/esm/motion/typesurface/config.d.ts +284 -0
  689. package/dist/esm/motion/typesurface/config.d.ts.map +1 -0
  690. package/dist/esm/motion/typesurface/config.js +280 -0
  691. package/dist/esm/motion/typesurface/config.js.map +1 -0
  692. package/dist/esm/motion/typesurface/construct.d.ts +284 -0
  693. package/dist/esm/motion/typesurface/construct.d.ts.map +1 -0
  694. package/dist/esm/motion/typesurface/construct.js +866 -0
  695. package/dist/esm/motion/typesurface/construct.js.map +1 -0
  696. package/dist/esm/motion/typesurface/engine.d.ts +102 -0
  697. package/dist/esm/motion/typesurface/engine.d.ts.map +1 -0
  698. package/dist/esm/motion/typesurface/engine.js +627 -0
  699. package/dist/esm/motion/typesurface/engine.js.map +1 -0
  700. package/dist/esm/motion/typesurface/fonts.d.ts +25 -0
  701. package/dist/esm/motion/typesurface/fonts.d.ts.map +1 -0
  702. package/dist/esm/motion/typesurface/fonts.js +40 -0
  703. package/dist/esm/motion/typesurface/fonts.js.map +1 -0
  704. package/dist/esm/motion/typesurface/index.d.ts +21 -0
  705. package/dist/esm/motion/typesurface/index.d.ts.map +1 -0
  706. package/dist/esm/motion/typesurface/index.js +21 -0
  707. package/dist/esm/motion/typesurface/index.js.map +1 -0
  708. package/dist/esm/motion/typesurface/layout.d.ts +57 -0
  709. package/dist/esm/motion/typesurface/layout.d.ts.map +1 -0
  710. package/dist/esm/motion/typesurface/layout.js +122 -0
  711. package/dist/esm/motion/typesurface/layout.js.map +1 -0
  712. package/dist/esm/motion/typesurface/ops.d.ts +70 -0
  713. package/dist/esm/motion/typesurface/ops.d.ts.map +1 -0
  714. package/dist/esm/motion/typesurface/ops.js +164 -0
  715. package/dist/esm/motion/typesurface/ops.js.map +1 -0
  716. package/dist/esm/motion/typesurface/presets.d.ts +51 -0
  717. package/dist/esm/motion/typesurface/presets.d.ts.map +1 -0
  718. package/dist/esm/motion/typesurface/presets.js +250 -0
  719. package/dist/esm/motion/typesurface/presets.js.map +1 -0
  720. package/dist/esm/motion/typesurface/renderer.d.ts +88 -0
  721. package/dist/esm/motion/typesurface/renderer.d.ts.map +1 -0
  722. package/dist/esm/motion/typesurface/renderer.js +732 -0
  723. package/dist/esm/motion/typesurface/renderer.js.map +1 -0
  724. package/dist/esm/motion/typesurface/shaders.d.ts +17 -0
  725. package/dist/esm/motion/typesurface/shaders.d.ts.map +1 -0
  726. package/dist/esm/motion/typesurface/shaders.js +319 -0
  727. package/dist/esm/motion/typesurface/shaders.js.map +1 -0
  728. package/dist/esm/motion/typesurface/surfaces.d.ts +108 -0
  729. package/dist/esm/motion/typesurface/surfaces.d.ts.map +1 -0
  730. package/dist/esm/motion/typesurface/surfaces.js +216 -0
  731. package/dist/esm/motion/typesurface/surfaces.js.map +1 -0
  732. package/dist/esm/motion/typesurface/text.d.ts +17 -0
  733. package/dist/esm/motion/typesurface/text.d.ts.map +1 -0
  734. package/dist/esm/motion/typesurface/text.js +28 -0
  735. package/dist/esm/motion/typesurface/text.js.map +1 -0
  736. package/dist/esm/motion/typesurface/timeline.d.ts +15 -0
  737. package/dist/esm/motion/typesurface/timeline.d.ts.map +1 -0
  738. package/dist/esm/motion/typesurface/timeline.js +57 -0
  739. package/dist/esm/motion/typesurface/timeline.js.map +1 -0
  740. package/dist/esm/motion/validate.d.ts +22 -0
  741. package/dist/esm/motion/validate.d.ts.map +1 -0
  742. package/dist/esm/motion/validate.js +84 -0
  743. package/dist/esm/motion/validate.js.map +1 -0
  744. package/dist/esm/native/RiveReceiptStage.d.ts +25 -2
  745. package/dist/esm/native/RiveReceiptStage.d.ts.map +1 -1
  746. package/dist/esm/native/RiveReceiptStage.js +7 -148
  747. package/dist/esm/native/RiveReceiptStage.js.map +1 -1
  748. package/dist/esm/native/riveReceiptStageFactory.d.ts +26 -0
  749. package/dist/esm/native/riveReceiptStageFactory.d.ts.map +1 -0
  750. package/dist/esm/native/riveReceiptStageFactory.js +159 -0
  751. package/dist/esm/native/riveReceiptStageFactory.js.map +1 -0
  752. package/dist/esm/tokens/stage.d.ts +7 -0
  753. package/dist/esm/tokens/stage.d.ts.map +1 -0
  754. package/dist/esm/tokens/stage.js +7 -0
  755. package/dist/esm/tokens/stage.js.map +1 -0
  756. package/docs/TYPE-SURFACE.md +183 -0
  757. package/package.json +38 -2
  758. package/spec/examples/components/onboarding/animated-status/case1.json +42 -0
  759. package/spec/examples/components/onboarding/animated-status/case2.json +42 -0
  760. package/spec/examples/components/onboarding/animated-status/case3.json +42 -0
  761. package/spec/examples/components/onboarding/animated-status/case4.json +42 -0
  762. package/spec/examples/components/onboarding/animated-status/case5.json +42 -0
  763. package/spec/examples/components/onboarding/send-completion/case1.json +48 -0
  764. package/spec/examples/components/onboarding/send-completion/case2.json +48 -0
  765. package/spec/examples/components/onboarding/send-completion/case3.json +48 -0
  766. package/spec/examples/components/onboarding/send-completion/case4.json +48 -0
  767. package/spec/examples/components/onboarding/send-completion/case5.json +48 -0
  768. package/spec/families/onboarding.schema.json +610 -1
  769. package/src/agent/AgentComponent.tsx +1 -1
  770. package/src/agent/manifests.ts +83 -1
  771. package/src/agent/result.ts +6 -0
  772. package/src/agent/types.ts +1 -1
  773. package/src/components/catalog.ts +21 -1
  774. package/src/components/onboarding/animated-status/AnimatedStage.tsx +18 -0
  775. package/src/components/onboarding/animated-status/AnimatedStage.types.ts +30 -0
  776. package/src/components/onboarding/animated-status/AnimatedStage.web.tsx +99 -0
  777. package/src/components/onboarding/animated-status/AnimatedStatusView.tsx +109 -0
  778. package/src/components/onboarding/animated-status/AnimatedStill.tsx +23 -0
  779. package/src/components/onboarding/animated-status/contract.ts +105 -0
  780. package/src/components/onboarding/animated-status/engine.ts +49 -0
  781. package/src/components/onboarding/animated-status/index.ts +8 -0
  782. package/src/components/onboarding/animated-status/presets.json +126 -0
  783. package/src/components/onboarding/animated-status/riv.ts +4 -0
  784. package/src/components/onboarding/index.ts +4 -0
  785. package/src/components/onboarding/presets.ts +6 -0
  786. package/src/components/onboarding/receipt-printer/ReceiptStage.tsx +46 -7
  787. package/src/components/onboarding/send-completion/SendCompletionView.tsx +164 -0
  788. package/src/components/onboarding/send-completion/SendStage.tsx +27 -0
  789. package/src/components/onboarding/send-completion/SendStage.types.ts +32 -0
  790. package/src/components/onboarding/send-completion/SendStage.web.tsx +116 -0
  791. package/src/components/onboarding/send-completion/SendStill.tsx +19 -0
  792. package/src/components/onboarding/send-completion/contract.ts +127 -0
  793. package/src/components/onboarding/send-completion/engine.ts +37 -0
  794. package/src/components/onboarding/send-completion/index.ts +10 -0
  795. package/src/components/onboarding/send-completion/presets.json +132 -0
  796. package/src/components/onboarding/send-completion/riv.ts +4 -0
  797. package/src/components/onboarding/shared/actions-data.ts +2 -0
  798. package/src/components/onboarding/shared/configColor.ts +72 -0
  799. package/src/components/onboarding/shared/contract.ts +4 -0
  800. package/src/components/onboarding/shared/describe.ts +1 -1
  801. package/src/components/onboarding/shared/mock.ts +2 -0
  802. package/src/components/onboarding/views.ts +8 -0
  803. package/src/motion/MotionPlayer.tsx +62 -0
  804. package/src/motion/agent.ts +288 -0
  805. package/src/motion/cat/Cat.tsx +118 -0
  806. package/src/motion/cat/animation.ts +206 -0
  807. package/src/motion/cat/art.generated.ts +44 -0
  808. package/src/motion/cat/config.ts +186 -0
  809. package/src/motion/cat/index.ts +26 -0
  810. package/src/motion/cat/rig.ts +102 -0
  811. package/src/motion/cat/scene.ts +181 -0
  812. package/src/motion/configurable/config.ts +420 -0
  813. package/src/motion/configurable/controls.ts +93 -0
  814. package/src/motion/easing.ts +55 -0
  815. package/src/motion/fit.ts +8 -0
  816. package/src/motion/index.ts +29 -0
  817. package/src/motion/neon/GlowRenderer.tsx +83 -0
  818. package/src/motion/neon/NeonCanvas.tsx +175 -0
  819. package/src/motion/neon/NeonText.tsx +113 -0
  820. package/src/motion/neon/NeonTextFrame.tsx +67 -0
  821. package/src/motion/neon/artwork.ts +95 -0
  822. package/src/motion/neon/audio.ts +162 -0
  823. package/src/motion/neon/config.ts +484 -0
  824. package/src/motion/neon/flicker.ts +225 -0
  825. package/src/motion/neon/fonts.ts +76 -0
  826. package/src/motion/neon/frame.ts +34 -0
  827. package/src/motion/neon/glitch.ts +142 -0
  828. package/src/motion/neon/index.ts +41 -0
  829. package/src/motion/neon/layers.tsx +209 -0
  830. package/src/motion/neon/material.ts +88 -0
  831. package/src/motion/neon/random.ts +40 -0
  832. package/src/motion/neon/scene.ts +610 -0
  833. package/src/motion/neon/synth.ts +188 -0
  834. package/src/motion/neon/typography.ts +102 -0
  835. package/src/motion/neon/wall.ts +157 -0
  836. package/src/motion/paperfold/PaperFold.tsx +45 -0
  837. package/src/motion/paperfold/PaperFoldFrame.tsx +576 -0
  838. package/src/motion/paperfold/PaperFoldPlayer.tsx +80 -0
  839. package/src/motion/paperfold/art.ts +455 -0
  840. package/src/motion/paperfold/config.ts +98 -0
  841. package/src/motion/paperfold/controls.ts +557 -0
  842. package/src/motion/paperfold/engine.ts +852 -0
  843. package/src/motion/paperfold/fonts.ts +21 -0
  844. package/src/motion/paperfold/index.ts +30 -0
  845. package/src/motion/paperfold/manipulate.ts +188 -0
  846. package/src/motion/paperfold/presets.ts +117 -0
  847. package/src/motion/paperfold/template.ts +38 -0
  848. package/src/motion/player.ts +207 -0
  849. package/src/motion/promo/PromoFrame.tsx +501 -0
  850. package/src/motion/promo/PromoShowcasePlayer.tsx +78 -0
  851. package/src/motion/promo/config.ts +479 -0
  852. package/src/motion/promo/controls.ts +643 -0
  853. package/src/motion/promo/easing.ts +36 -0
  854. package/src/motion/promo/engine.ts +587 -0
  855. package/src/motion/promo/fonts.ts +16 -0
  856. package/src/motion/promo/icons.tsx +29 -0
  857. package/src/motion/promo/index.ts +24 -0
  858. package/src/motion/promo/presets.ts +40 -0
  859. package/src/motion/promo/template.ts +36 -0
  860. package/src/motion/replication2/Replication2Player.tsx +115 -0
  861. package/src/motion/replication2/config.ts +323 -0
  862. package/src/motion/replication2/controls.ts +336 -0
  863. package/src/motion/replication2/driver.ts +92 -0
  864. package/src/motion/replication2/easing.ts +88 -0
  865. package/src/motion/replication2/engine.ts +539 -0
  866. package/src/motion/replication2/html.ts +87 -0
  867. package/src/motion/replication2/index.ts +14 -0
  868. package/src/motion/replication2/measure.ts +28 -0
  869. package/src/motion/replication2/metrics.ts +7 -0
  870. package/src/motion/replication2/presets.ts +63 -0
  871. package/src/motion/replication2/riv.ts +4 -0
  872. package/src/motion/replication2/rive-contract.ts +165 -0
  873. package/src/motion/replication2/template.ts +33 -0
  874. package/src/motion/sample.ts +173 -0
  875. package/src/motion/templates/hey-template.ts +1553 -0
  876. package/src/motion/templates/index.ts +17 -0
  877. package/src/motion/templates/word-motion.ts +1166 -0
  878. package/src/motion/types.ts +162 -0
  879. package/src/motion/typesurface/TypeSurfaceCanvas.tsx +101 -0
  880. package/src/motion/typesurface/art.ts +639 -0
  881. package/src/motion/typesurface/config.ts +512 -0
  882. package/src/motion/typesurface/construct.ts +828 -0
  883. package/src/motion/typesurface/engine.ts +612 -0
  884. package/src/motion/typesurface/fonts.ts +63 -0
  885. package/src/motion/typesurface/index.ts +20 -0
  886. package/src/motion/typesurface/layout.ts +133 -0
  887. package/src/motion/typesurface/ops.ts +196 -0
  888. package/src/motion/typesurface/presets.ts +271 -0
  889. package/src/motion/typesurface/renderer.ts +639 -0
  890. package/src/motion/typesurface/shaders.ts +325 -0
  891. package/src/motion/typesurface/surfaces.ts +300 -0
  892. package/src/motion/typesurface/text.ts +35 -0
  893. package/src/motion/typesurface/timeline.ts +58 -0
  894. package/src/motion/validate.ts +101 -0
  895. package/src/native/RiveReceiptStage.tsx +8 -155
  896. package/src/native/riveReceiptStageFactory.tsx +175 -0
  897. package/src/tokens/stage.ts +6 -0
  898. package/tools/ask/dist/components.mjs +8010 -88
  899. package/tools/ask/dist/neon.js +69 -0
  900. package/tools/ask/mcp.mjs +166 -2
  901. package/tools/ask/neon-render.mjs +143 -0
@@ -0,0 +1,861 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ART_FONTS = void 0;
4
+ exports.paintNewspaper = paintNewspaper;
5
+ exports.paintSurfaceArt = paintSurfaceArt;
6
+ exports.paintPlain = paintPlain;
7
+ exports.paintGrain = paintGrain;
8
+ /* eslint-disable comppack/no-raw-colour -- paper, ink and print colours are artwork, not theme colours. */
9
+ /**
10
+ * **Surface artwork, painted with Canvas 2D.** The newspaper is drawn, not photographed: masthead,
11
+ * dateline, columns of real words, halftoned photos, an advert, a market table, the fold it was
12
+ * delivered in, paper tone, fibres and the next page showing through. It is painted once per
13
+ * seed into a texture; the text you type is NEVER painted here, it is its own layer.
14
+ * Browser-only (needs a canvas); no React.
15
+ */
16
+ const random_1 = require("../neon/random");
17
+ const mk = (w, h) => {
18
+ const c = document.createElement('canvas');
19
+ c.width = w;
20
+ c.height = h;
21
+ return c;
22
+ };
23
+ /** Seeded random stream. */
24
+ function rng(seed, salt) {
25
+ let i = 0;
26
+ return () => (0, random_1.hash32)(seed, i++, salt) / 4294967296;
27
+ }
28
+ const WORDS = ('the city council said on monday that a new plan for the riverfront would be put to a vote next month after years of delay ' +
29
+ 'residents who packed the hall called for more housing and fewer parking lots while officials warned the budget remained tight ' +
30
+ 'according to the report the harbor district could see its first new park in decades if funding holds through the winter season ' +
31
+ 'critics argued the proposal moved too fast but supporters pointed to rising rents and a growing number of families leaving the area ' +
32
+ 'the mayor declined to comment on the timing though an aide described the talks as productive and said more details would follow ' +
33
+ 'engineers expect construction to take three years with the first phase opening along the old ferry landing by late spring of next year ' +
34
+ 'meanwhile schools reported record enrollment and the transit authority announced longer hours on weekend lines beginning in october').split(' ');
35
+ const INK = '#1b1917';
36
+ const PAPER = '#ece6d6';
37
+ function font(p, px, family, weight = 400, style = 'normal') {
38
+ p.ctx.font = `${style} ${weight} ${px * p.s}px ${family}`;
39
+ }
40
+ function text(p, t, x, y, align = 'left') {
41
+ p.ctx.textAlign = align;
42
+ p.ctx.fillText(t, x * p.s, y * p.s);
43
+ }
44
+ function rule(p, x0, y, x1, w = 1) {
45
+ p.ctx.fillRect(x0 * p.s, (y - w / 2) * p.s, (x1 - x0) * p.s, w * p.s);
46
+ }
47
+ function vrule(p, x, y0, y1, w = 0.6) {
48
+ p.ctx.fillRect((x - w / 2) * p.s, y0 * p.s, w * p.s, (y1 - y0) * p.s);
49
+ }
50
+ const BODY = "'Old Standard TT', 'Times New Roman', serif";
51
+ const HEAD = "'Playfair Display', Georgia, serif";
52
+ const COND = "'Oswald', 'Arial Narrow', sans-serif";
53
+ const MAST = "'UnifrakturMaguntia', 'Old English Text MT', serif";
54
+ const MONO = "'IBM Plex Mono', ui-monospace, monospace";
55
+ /** Justified body copy in a column. Returns the y after the last line. */
56
+ function column(p, r, x, y, w, bottom, size = 10.2, lead = 12.4, dropCap = false) {
57
+ font(p, size, BODY);
58
+ const ctx = p.ctx;
59
+ const words = () => WORDS[Math.floor(r() * WORDS.length)];
60
+ let yy = y;
61
+ let first = dropCap;
62
+ let para = 0;
63
+ while (yy + lead <= bottom) {
64
+ const indent = para === 0 ? 10 : 0;
65
+ let lx = x + indent;
66
+ let lw = w - indent;
67
+ if (first) {
68
+ font(p, lead * 2.6, HEAD, 700);
69
+ ctx.textAlign = 'left';
70
+ ctx.fillText('T', x * p.s, (yy + lead * 1.9) * p.s);
71
+ font(p, size, BODY);
72
+ lx = x + lead * 2.1;
73
+ lw = w - lead * 2.1;
74
+ }
75
+ const line = [];
76
+ let width = 0;
77
+ const space = ctx.measureText(' ').width / p.s;
78
+ for (;;) {
79
+ const wd = words();
80
+ const ww = ctx.measureText(wd).width / p.s;
81
+ if (width + ww + (line.length ? space : 0) > lw)
82
+ break;
83
+ width += ww + (line.length ? space : 0);
84
+ line.push(line.length === 0 && para === 0 ? wd[0].toUpperCase() + wd.slice(1) : wd);
85
+ }
86
+ const last = r() < 0.07 || (yy + lead * 2 > bottom);
87
+ const gap = line.length > 1 && !last ? (lw - width) / (line.length - 1) + space : space;
88
+ let cx = lx;
89
+ ctx.textAlign = 'left';
90
+ for (const wd of line) {
91
+ ctx.fillText(last && wd === line[line.length - 1] ? `${wd}.` : wd, cx * p.s, (yy + size) * p.s);
92
+ cx += ctx.measureText(wd).width / p.s + gap;
93
+ }
94
+ yy += lead;
95
+ para = last ? 0 : para + 1;
96
+ if (first && yy > y + lead * 2.2)
97
+ first = false;
98
+ }
99
+ return yy;
100
+ }
101
+ /** A procedural photo, halftoned like newsprint. */
102
+ function photo(p, r, x, y, w, h, kind) {
103
+ const res = 3; // units per sample
104
+ const cw = Math.max(8, Math.round(w / res)), ch = Math.max(8, Math.round(h / res));
105
+ const src = mk(cw, ch);
106
+ const g = src.getContext('2d');
107
+ const sky = g.createLinearGradient(0, 0, 0, ch);
108
+ sky.addColorStop(0, '#d8d8d8');
109
+ sky.addColorStop(0.6, '#9a9a9a');
110
+ sky.addColorStop(1, '#5a5a5a');
111
+ g.fillStyle = sky;
112
+ g.fillRect(0, 0, cw, ch);
113
+ if (kind === 'skyline' || kind === 'harbor') {
114
+ g.fillStyle = '#f4f4f4';
115
+ g.beginPath();
116
+ g.arc(cw * 0.75, ch * 0.25, ch * 0.09, 0, Math.PI * 2);
117
+ g.fill();
118
+ let bx = 0;
119
+ while (bx < cw) {
120
+ const bw = cw * (0.04 + r() * 0.08), bh = ch * (0.2 + r() * 0.45);
121
+ g.fillStyle = `rgb(${40 + r() * 50 | 0},${40 + r() * 50 | 0},${40 + r() * 50 | 0})`;
122
+ g.fillRect(bx, ch * (kind === 'harbor' ? 0.62 : 0.72) - bh, bw, bh + ch);
123
+ g.fillStyle = 'rgba(230,230,230,0.5)';
124
+ for (let wy = ch * 0.72 - bh + 2; wy < ch * 0.7; wy += 3)
125
+ for (let wx = bx + 1; wx < bx + bw - 1; wx += 3)
126
+ if (r() < 0.35)
127
+ g.fillRect(wx, wy, 1, 1);
128
+ bx += bw + r() * 2;
129
+ }
130
+ if (kind === 'harbor') {
131
+ const water = g.createLinearGradient(0, ch * 0.62, 0, ch);
132
+ water.addColorStop(0, '#6c6c6c');
133
+ water.addColorStop(1, '#262626');
134
+ g.fillStyle = water;
135
+ g.fillRect(0, ch * 0.62, cw, ch);
136
+ g.fillStyle = 'rgba(220,220,220,0.35)';
137
+ for (let k = 0; k < 60; k++)
138
+ g.fillRect(r() * cw, ch * (0.64 + r() * 0.34), 2 + r() * 6, 0.6);
139
+ g.fillStyle = '#151515';
140
+ g.beginPath();
141
+ g.moveTo(cw * 0.2, ch * 0.7);
142
+ g.lineTo(cw * 0.46, ch * 0.7);
143
+ g.lineTo(cw * 0.42, ch * 0.78);
144
+ g.lineTo(cw * 0.24, ch * 0.78);
145
+ g.fill();
146
+ g.fillRect(cw * 0.3, ch * 0.55, cw * 0.01, ch * 0.15);
147
+ }
148
+ else {
149
+ g.fillStyle = '#2a2a2a';
150
+ g.fillRect(0, ch * 0.72, cw, ch);
151
+ for (let k = 0; k < 9; k++) {
152
+ const px = r() * cw, ph = ch * (0.14 + r() * 0.08);
153
+ g.fillStyle = '#101010';
154
+ g.beginPath();
155
+ g.arc(px, ch * 0.9 - ph, ph * 0.18, 0, Math.PI * 2);
156
+ g.fill();
157
+ g.fillRect(px - ph * 0.16, ch * 0.9 - ph * 0.82, ph * 0.32, ph * 0.9);
158
+ }
159
+ }
160
+ }
161
+ else {
162
+ const bg = g.createRadialGradient(cw * 0.5, ch * 0.4, 1, cw * 0.5, ch * 0.5, cw * 0.8);
163
+ bg.addColorStop(0, '#cfcfcf');
164
+ bg.addColorStop(1, '#505050');
165
+ g.fillStyle = bg;
166
+ g.fillRect(0, 0, cw, ch);
167
+ g.fillStyle = '#1a1a1a';
168
+ g.beginPath();
169
+ g.ellipse(cw * 0.5, ch * 1.05, cw * 0.42, ch * 0.4, 0, 0, Math.PI * 2);
170
+ g.fill();
171
+ const face = g.createRadialGradient(cw * 0.45, ch * 0.38, 1, cw * 0.5, ch * 0.42, cw * 0.25);
172
+ face.addColorStop(0, '#bdbdbd');
173
+ face.addColorStop(1, '#3d3d3d');
174
+ g.fillStyle = face;
175
+ g.beginPath();
176
+ g.ellipse(cw * 0.5, ch * 0.42, cw * 0.17, ch * 0.24, 0, 0, Math.PI * 2);
177
+ g.fill();
178
+ g.fillStyle = '#161616';
179
+ g.beginPath();
180
+ g.ellipse(cw * 0.5, ch * 0.24, cw * 0.19, ch * 0.1, 0, Math.PI, Math.PI * 2);
181
+ g.fill();
182
+ }
183
+ const data = g.getImageData(0, 0, cw, ch).data;
184
+ const ctx = p.ctx;
185
+ ctx.save();
186
+ ctx.beginPath();
187
+ ctx.rect(x * p.s, y * p.s, w * p.s, h * p.s);
188
+ ctx.clip();
189
+ ctx.fillStyle = PAPER;
190
+ ctx.fillRect(x * p.s, y * p.s, w * p.s, h * p.s);
191
+ ctx.fillStyle = INK;
192
+ // A 45° screen: dot size from darkness.
193
+ const cell = 3.2;
194
+ const cos = Math.SQRT1_2;
195
+ const span = (w + h) / cos;
196
+ for (let v = -span; v < span; v += cell) {
197
+ for (let u = -span; u < span; u += cell) {
198
+ const sxp = (u - v) * cos, syp = (u + v) * cos;
199
+ if (sxp < -cell || syp < -cell || sxp > w + cell || syp > h + cell)
200
+ continue;
201
+ const ix = Math.min(cw - 1, Math.max(0, Math.floor(sxp / res))), iy = Math.min(ch - 1, Math.max(0, Math.floor(syp / res)));
202
+ const lum = data[(iy * cw + ix) * 4] / 255;
203
+ const rad = Math.sqrt(Math.max(0, 1 - lum)) * cell * 0.62;
204
+ if (rad < 0.25)
205
+ continue;
206
+ ctx.beginPath();
207
+ ctx.arc((x + sxp) * p.s, (y + syp) * p.s, rad * p.s, 0, Math.PI * 2);
208
+ ctx.fill();
209
+ }
210
+ }
211
+ ctx.restore();
212
+ ctx.fillStyle = INK;
213
+ ctx.strokeStyle = INK;
214
+ ctx.lineWidth = 0.6 * p.s;
215
+ ctx.strokeRect(x * p.s, y * p.s, w * p.s, h * p.s);
216
+ }
217
+ /** Paper tone, fibres, blotches and slightly yellowed edges. */
218
+ function paperBase(p, r, w, h, tone = PAPER) {
219
+ const ctx = p.ctx;
220
+ ctx.fillStyle = tone;
221
+ ctx.fillRect(0, 0, w * p.s, h * p.s);
222
+ for (let k = 0; k < 26; k++) {
223
+ const gx = r() * w, gy = r() * h, gr = 60 + r() * 220;
224
+ const g = ctx.createRadialGradient(gx * p.s, gy * p.s, 0, gx * p.s, gy * p.s, gr * p.s);
225
+ const dark = r() < 0.5;
226
+ g.addColorStop(0, dark ? 'rgba(120,100,60,0.05)' : 'rgba(255,255,245,0.06)');
227
+ g.addColorStop(1, 'rgba(0,0,0,0)');
228
+ ctx.fillStyle = g;
229
+ ctx.fillRect(0, 0, w * p.s, h * p.s);
230
+ }
231
+ for (let k = 0; k < 9000; k++) {
232
+ const fx = r() * w, fy = r() * h, a = r() * Math.PI, l = 1 + r() * 5;
233
+ ctx.strokeStyle = r() < 0.5 ? 'rgba(90,75,50,0.07)' : 'rgba(255,255,250,0.1)';
234
+ ctx.lineWidth = (0.25 + r() * 0.4) * p.s;
235
+ ctx.beginPath();
236
+ ctx.moveTo(fx * p.s, fy * p.s);
237
+ ctx.lineTo((fx + Math.cos(a) * l) * p.s, (fy + Math.sin(a) * l) * p.s);
238
+ ctx.stroke();
239
+ }
240
+ const edge = (x0, y0, x1, y1) => {
241
+ const g = ctx.createLinearGradient(x0 * p.s, y0 * p.s, x1 * p.s, y1 * p.s);
242
+ g.addColorStop(0, 'rgba(170,140,80,0.16)');
243
+ g.addColorStop(1, 'rgba(170,140,80,0)');
244
+ ctx.fillStyle = g;
245
+ ctx.fillRect(0, 0, w * p.s, h * p.s);
246
+ };
247
+ edge(0, 0, 28, 0);
248
+ edge(w, 0, w - 28, 0);
249
+ edge(0, 0, 0, 28);
250
+ edge(0, h, 0, h - 28);
251
+ }
252
+ /** Speckle and wear over the ink: tiny unprinted spots, the odd smudge. */
253
+ function inkWear(p, r, w, h) {
254
+ const ctx = p.ctx;
255
+ ctx.fillStyle = 'rgba(236,230,214,0.55)';
256
+ for (let k = 0; k < 5000; k++)
257
+ ctx.fillRect(r() * w * p.s, r() * h * p.s, (0.4 + r()) * p.s, (0.4 + r()) * p.s);
258
+ for (let k = 0; k < 5; k++) {
259
+ const gx = r() * w, gy = r() * h, gr = 10 + r() * 30;
260
+ const g = ctx.createRadialGradient(gx * p.s, gy * p.s, 0, gx * p.s, gy * p.s, gr * p.s);
261
+ g.addColorStop(0, 'rgba(40,35,30,0.05)');
262
+ g.addColorStop(1, 'rgba(0,0,0,0)');
263
+ ctx.fillStyle = g;
264
+ ctx.fillRect(0, 0, w * p.s, h * p.s);
265
+ }
266
+ }
267
+ /** The fold it was delivered in: a pale line with a shadowed side. */
268
+ function deliveryCrease(p, w, y) {
269
+ const ctx = p.ctx;
270
+ const g = ctx.createLinearGradient(0, (y - 5) * p.s, 0, (y + 5) * p.s);
271
+ g.addColorStop(0, 'rgba(0,0,0,0)');
272
+ g.addColorStop(0.45, 'rgba(80,65,40,0.12)');
273
+ g.addColorStop(0.5, 'rgba(255,255,250,0.35)');
274
+ g.addColorStop(0.6, 'rgba(80,65,40,0.08)');
275
+ g.addColorStop(1, 'rgba(0,0,0,0)');
276
+ ctx.fillStyle = g;
277
+ ctx.fillRect(0, (y - 5) * p.s, w * p.s, 10 * p.s);
278
+ }
279
+ const PAGE_W = 1000;
280
+ /** The inside/back page: classifieds and notices. */
281
+ function paintInner(p, seed, h, pageLabel) {
282
+ const r = rng(seed, 77);
283
+ const ctx = p.ctx;
284
+ ctx.fillStyle = INK;
285
+ font(p, 11, COND, 500);
286
+ text(p, `${pageLabel} · THE MORNING CHRONICLE · TUESDAY, SEPTEMBER 30, 2026`, 36, 30);
287
+ rule(p, 36, 38, 964, 1.4);
288
+ font(p, 58, COND, 700);
289
+ text(p, 'CLASSIFIEDS', 36, 100);
290
+ font(p, 13, BODY, 400, 'italic');
291
+ text(p, 'Homes · Jobs · Motors · Notices · Lost & Found', 964, 100, 'right');
292
+ rule(p, 36, 112, 964, 0.8);
293
+ const cols = 5, gut = 12, cw = (928 - gut * (cols - 1)) / cols;
294
+ for (let c = 0; c < cols; c++) {
295
+ const x = 36 + c * (cw + gut);
296
+ let y = 126;
297
+ while (y < h - 60) {
298
+ const bh = 50 + r() * 120;
299
+ if (y + bh > h - 50)
300
+ break;
301
+ ctx.lineWidth = 0.6 * p.s;
302
+ ctx.strokeStyle = INK;
303
+ ctx.strokeRect(x * p.s, y * p.s, cw * p.s, bh * p.s);
304
+ font(p, 13, COND, 700);
305
+ text(p, ['FOR SALE', 'WANTED', 'TO LET', 'NOTICE', 'HELP WANTED', 'AUCTION'][Math.floor(r() * 6)], x + 6, y + 17);
306
+ column(p, r, x + 6, y + 22, cw - 12, y + bh - 4, 8.4, 10);
307
+ y += bh + 8;
308
+ }
309
+ if (c < cols - 1)
310
+ vrule(p, x + cw + gut / 2, 126, h - 56);
311
+ }
312
+ if (r() < 2) {
313
+ const bx = 36 + cw + gut, by = h * 0.52, bw = cw * 2 + gut, bh = 170;
314
+ ctx.fillStyle = PAPER;
315
+ ctx.fillRect(bx * p.s, by * p.s, bw * p.s, bh * p.s);
316
+ ctx.fillStyle = INK;
317
+ ctx.lineWidth = 2.4 * p.s;
318
+ ctx.strokeRect(bx * p.s, by * p.s, bw * p.s, bh * p.s);
319
+ font(p, 44, COND, 700);
320
+ text(p, 'OPEN HOUSE', bx + bw / 2, by + 62, 'center');
321
+ font(p, 18, HEAD, 400, 'italic');
322
+ text(p, 'Sunday 1–4 pm · 14 Linden Row', bx + bw / 2, by + 96, 'center');
323
+ font(p, 30, COND, 500);
324
+ text(p, '3 BED · GARDEN · $489,000', bx + bw / 2, by + 140, 'center');
325
+ }
326
+ rule(p, 36, h - 40, 964, 1);
327
+ font(p, 10, COND, 500);
328
+ text(p, pageLabel, 964, h - 24, 'right');
329
+ }
330
+ /** The front page. Seeded: the same seed paints the same page. */
331
+ function paintFront(p, seed, h) {
332
+ const r = rng(seed, 11);
333
+ const ctx = p.ctx;
334
+ ctx.fillStyle = INK;
335
+ // Ears and masthead.
336
+ ctx.lineWidth = 0.8 * p.s;
337
+ ctx.strokeStyle = INK;
338
+ ctx.strokeRect(36 * p.s, 22 * p.s, 150 * p.s, 64 * p.s);
339
+ font(p, 10, COND, 700);
340
+ text(p, 'WEATHER', 111, 38, 'center');
341
+ font(p, 26, COND, 500);
342
+ text(p, '18° / 11°', 111, 66, 'center');
343
+ font(p, 8.5, BODY, 400, 'italic');
344
+ text(p, 'Cloudy, clearing late', 111, 80, 'center');
345
+ ctx.strokeRect(814 * p.s, 22 * p.s, 150 * p.s, 64 * p.s);
346
+ font(p, 10, COND, 700);
347
+ text(p, 'INSIDE', 889, 38, 'center');
348
+ font(p, 9.5, BODY);
349
+ text(p, 'Arts & Leisure …… C1', 889, 55, 'center');
350
+ text(p, 'Business ………… B4', 889, 68, 'center');
351
+ text(p, 'Puzzles ………… D7', 889, 81, 'center');
352
+ font(p, 76, MAST);
353
+ text(p, 'The Morning Chronicle', 500, 84, 'center');
354
+ rule(p, 36, 104, 964, 2.2);
355
+ rule(p, 36, 109, 964, 0.6);
356
+ font(p, 10.5, COND, 500);
357
+ text(p, 'VOL. CLXXV · No. 60,812', 36, 124);
358
+ text(p, 'TUESDAY, SEPTEMBER 30, 2026', 500, 124, 'center');
359
+ text(p, 'LATE CITY EDITION · $3.00', 964, 124, 'right');
360
+ rule(p, 36, 132, 964, 0.6);
361
+ rule(p, 36, 136, 964, 1.6);
362
+ // The headline slot: kept for the typography you set. Only a kicker and a deck.
363
+ font(p, 13, COND, 700);
364
+ text(p, 'SPECIAL REPORT', 500, 170, 'center');
365
+ font(p, 19, HEAD, 400, 'italic');
366
+ text(p, 'Overnight developments reshape the riverfront plan; council to vote next month', 500, 585, 'center');
367
+ rule(p, 330, 600, 670, 0.6);
368
+ // Lead photo spanning four columns, two columns of copy beside it.
369
+ const top = 616;
370
+ const cols = 6, gut = 14, cw = (928 - gut * (cols - 1)) / cols;
371
+ const colX = (c) => 36 + c * (cw + gut);
372
+ const pw = cw * 4 + gut * 3;
373
+ photo(p, r, 36, top, pw, 262, r() < 0.5 ? 'harbor' : 'skyline');
374
+ font(p, 9, BODY, 400, 'italic');
375
+ text(p, 'Crews worked through the night along the old ferry landing. Photograph by Staff.', 36, top + 276);
376
+ for (let c = 4; c < 6; c++) {
377
+ font(p, 17, HEAD, 700);
378
+ ctx.textAlign = 'left';
379
+ const y0 = top + (c === 4 ? 0 : 0);
380
+ if (c === 4) {
381
+ text(p, 'Harbor Park', colX(c), y0 + 16);
382
+ text(p, 'Wins Early Nod', colX(c), y0 + 36);
383
+ }
384
+ else {
385
+ text(p, 'Transit Adds', colX(c), y0 + 16);
386
+ text(p, 'Weekend Hours', colX(c), y0 + 36);
387
+ }
388
+ font(p, 9, COND, 500);
389
+ text(p, c === 4 ? 'BY ELENA MARSH' : 'BY THEO GRANT', colX(c), y0 + 52);
390
+ column(p, r, colX(c), y0 + 58, cw, top + 282, 10.2, 12.4, c === 4);
391
+ vrule(p, colX(c) - gut / 2, top, c === 4 ? h - 150 : top + 282);
392
+ }
393
+ // Lower stories under the photo.
394
+ const low = top + 292;
395
+ rule(p, 36, low - 4, 36 + pw, 0.6);
396
+ const heads = [['Schools Report', 'Record Enrollment'], ['Budget Talks', 'Stall Again'], ['Ferry Landing', 'Gets a Date'], ['Rents Climb', 'For Fifth Year']];
397
+ for (let c = 0; c < 4; c++) {
398
+ const [a, b] = heads[c];
399
+ font(p, 16, HEAD, 700);
400
+ text(p, a, colX(c), low + 14);
401
+ text(p, b, colX(c), low + 32);
402
+ column(p, r, colX(c), low + 40, cw, h - 150, 10.2, 12.4);
403
+ if (c > 0)
404
+ vrule(p, colX(c) - gut / 2, low, h - 150);
405
+ }
406
+ rule(p, colX(4), top + 288, 964, 0.6);
407
+ // Market table and an advert in the right two columns.
408
+ const mx = colX(4), mw = cw * 2 + gut;
409
+ font(p, 12, COND, 700);
410
+ text(p, 'MARKETS', mx, top + 306);
411
+ rule(p, mx, top + 312, mx + mw, 0.8);
412
+ font(p, 9.5, MONO);
413
+ const rows = [['DOW', '+0.84%'], ['S&P 500', '+0.61%'], ['NASDAQ', '−0.12%'], ['10-YR', '4.02%'], ['OIL', '$71.40'], ['GOLD', '$2,418']];
414
+ rows.forEach(([k, v], i) => { text(p, k, mx, top + 328 + i * 14); text(p, v, mx + mw, top + 328 + i * 14, 'right'); });
415
+ const ay = top + 420, ah = h - 158 - ay;
416
+ ctx.lineWidth = 2.6 * p.s;
417
+ ctx.strokeRect(mx * p.s, ay * p.s, mw * p.s, ah * p.s);
418
+ ctx.lineWidth = 0.7 * p.s;
419
+ ctx.strokeRect((mx + 5) * p.s, (ay + 5) * p.s, (mw - 10) * p.s, (ah - 10) * p.s);
420
+ font(p, 15, COND, 500);
421
+ text(p, 'HARBOR & MAIN', mx + mw / 2, ay + 30, 'center');
422
+ font(p, 46, COND, 700);
423
+ text(p, 'CLEARANCE', mx + mw / 2, ay + 80, 'center');
424
+ font(p, 26, HEAD, 900);
425
+ text(p, 'up to 60% off', mx + mw / 2, ay + 116, 'center');
426
+ rule(p, mx + 30, ay + 132, mx + mw - 30, 0.6);
427
+ font(p, 10.5, BODY, 400, 'italic');
428
+ text(p, 'Sofas · Tables · Lamps · Rugs', mx + mw / 2, ay + 150, 'center');
429
+ font(p, 10, COND, 500);
430
+ text(p, 'THIS WEEKEND ONLY', mx + mw / 2, ay + ah - 16, 'center');
431
+ // Bottom strip: index and folio.
432
+ rule(p, 36, h - 140, 964, 1.6);
433
+ for (let c = 0; c < 3; c++) {
434
+ const x = 36 + c * 314;
435
+ font(p, 14, HEAD, 700);
436
+ text(p, ['Obituaries', 'Opinion', 'Sports'][c], x, h - 118);
437
+ column(p, r, x, h - 112, 300, h - 50, 9.2, 11);
438
+ if (c)
439
+ vrule(p, x - 7, h - 132, h - 50);
440
+ }
441
+ rule(p, 36, h - 40, 964, 0.6);
442
+ font(p, 10, COND, 500);
443
+ text(p, 'A1', 36, h - 24);
444
+ text(p, 'Continued on A6', 964, h - 24, 'right');
445
+ }
446
+ /** Paint a newspaper's three textures: front page, back of the sheet, and the page under it. */
447
+ function paintNewspaper(seed, widthPx = 2048, aspect = 1.36) {
448
+ const h = PAGE_W * aspect;
449
+ const s = widthPx / PAGE_W;
450
+ const hp = Math.round(h * s);
451
+ const back = mk(widthPx, hp);
452
+ {
453
+ const p = { ctx: back.getContext('2d'), s };
454
+ paperBase(p, rng(seed, 3), PAGE_W, h);
455
+ paintInner(p, seed + 1, h, 'A2');
456
+ inkWear(p, rng(seed, 4), PAGE_W, h);
457
+ deliveryCrease(p, PAGE_W, h / 2);
458
+ }
459
+ const front = mk(widthPx, hp);
460
+ {
461
+ const ctx = front.getContext('2d');
462
+ const p = { ctx, s };
463
+ paperBase(p, rng(seed, 1), PAGE_W, h);
464
+ // The page behind shows through thin newsprint, mirrored.
465
+ ctx.save();
466
+ ctx.globalAlpha = 0.05;
467
+ ctx.translate(widthPx, 0);
468
+ ctx.scale(-1, 1);
469
+ ctx.drawImage(back, 0, 0);
470
+ ctx.restore();
471
+ ctx.fillStyle = PAPER;
472
+ ctx.globalAlpha = 0.02;
473
+ ctx.fillRect(0, 0, widthPx, hp);
474
+ ctx.globalAlpha = 1;
475
+ paintFront(p, seed, h);
476
+ inkWear(p, rng(seed, 2), PAGE_W, h);
477
+ deliveryCrease(p, PAGE_W, h / 2);
478
+ }
479
+ const inner = mk(1024, Math.round(1024 * aspect));
480
+ {
481
+ const p = { ctx: inner.getContext('2d'), s: 1024 / PAGE_W };
482
+ paperBase(p, rng(seed, 5), PAGE_W, h, '#e8e1cf');
483
+ paintInner(p, seed + 2, h, 'A5');
484
+ deliveryCrease(p, PAGE_W, h / 2);
485
+ }
486
+ return { front, back, inner };
487
+ }
488
+ /** Faces the artwork uses; the renderer asks the browser to load them so the paint is right. */
489
+ exports.ART_FONTS = [
490
+ "400 20px 'UnifrakturMaguntia'", "400 20px 'Old Standard TT'", "italic 400 20px 'Old Standard TT'", "700 20px 'Playfair Display'", "italic 400 20px 'Playfair Display'",
491
+ "900 20px 'Playfair Display'", "500 20px 'Oswald'", "700 20px 'Oswald'", "400 20px 'IBM Plex Mono'", "400 20px 'Archivo Black'", "400 20px 'Lobster'", "400 20px 'Anton'", "600 20px 'Inter'",
492
+ ];
493
+ const INTER = "'Inter', system-ui, sans-serif";
494
+ const BLACK = "'Archivo Black', 'Arial Black', sans-serif";
495
+ const SCRIPT = "'Lobster', cursive";
496
+ function hexToRgb(h) {
497
+ const s = h.length === 4 ? h.slice(1).split('').map((c) => c + c).join('') : h.slice(1);
498
+ const n = parseInt(s, 16) || 0;
499
+ return [(n >> 16) & 255, (n >> 8) & 255, n & 255];
500
+ }
501
+ const shade = (h, k) => { const [r, g, b] = hexToRgb(h); const f = (v) => Math.max(0, Math.min(255, Math.round(k >= 0 ? v + (255 - v) * k : v * (1 + k)))); return `rgb(${f(r)},${f(g)},${f(b)})`; };
502
+ /** A barcode, for the backs of labels and packs. */
503
+ function barcode(p, r, x, y, w, h) {
504
+ const ctx = p.ctx;
505
+ ctx.fillStyle = '#ffffff';
506
+ ctx.fillRect((x - 6) * p.s, (y - 6) * p.s, (w + 12) * p.s, (h + 22) * p.s);
507
+ ctx.fillStyle = INK;
508
+ let bx = x;
509
+ while (bx < x + w) {
510
+ const bw = 0.8 + Math.floor(r() * 3) * 0.9;
511
+ if (r() < 0.62)
512
+ ctx.fillRect(bx * p.s, y * p.s, bw * p.s, h * p.s);
513
+ bx += bw + 0.7;
514
+ }
515
+ font(p, 8, MONO);
516
+ text(p, '8 412345 678905', x + w / 2, y + h + 11, 'center');
517
+ }
518
+ /** A hand-drawn red scribble: loops and a return stroke, like a pen dragged across a label. */
519
+ function scribble(p, r, cx, cy, w, h, color, width) {
520
+ const ctx = p.ctx;
521
+ ctx.save();
522
+ ctx.strokeStyle = color;
523
+ ctx.lineWidth = width * p.s;
524
+ ctx.lineCap = 'round';
525
+ ctx.lineJoin = 'round';
526
+ ctx.globalAlpha = 0.9;
527
+ ctx.beginPath();
528
+ let x = cx - w / 2, y = cy;
529
+ ctx.moveTo(x * p.s, y * p.s);
530
+ const loops = 5;
531
+ for (let k = 0; k < loops; k++) {
532
+ const nx = cx - w / 2 + ((k + 1) / loops) * w;
533
+ const ny = cy + (r() - 0.5) * h * 0.4;
534
+ ctx.bezierCurveTo((x + w * 0.16) * p.s, (y - h * (0.6 + r() * 0.4)) * p.s, (nx + w * 0.05) * p.s, (ny + h * (0.5 + r() * 0.4)) * p.s, nx * p.s, ny * p.s);
535
+ x = nx;
536
+ y = ny;
537
+ }
538
+ ctx.stroke();
539
+ ctx.lineWidth = width * 0.55 * p.s;
540
+ ctx.beginPath();
541
+ ctx.moveTo((cx + w / 2) * p.s, (cy + h * 0.3) * p.s);
542
+ ctx.bezierCurveTo((cx + w * 0.1) * p.s, (cy + h * 0.9) * p.s, (cx - w * 0.2) * p.s, (cy - h * 0.2) * p.s, (cx - w * 0.55) * p.s, (cy + h * 0.5) * p.s);
543
+ ctx.stroke();
544
+ ctx.restore();
545
+ }
546
+ /**
547
+ * The bottle label: textured paper, a winery line, descriptors, a red pen scribble, the vintage and
548
+ * volume, and on the parts that wrap behind the bottle a back label with a barcode. The middle is
549
+ * kept quiet for your words.
550
+ */
551
+ function paintLabel(seed, widthPx, aspect) {
552
+ const h = PAGE_W * aspect;
553
+ const s = widthPx / PAGE_W;
554
+ const front = mk(widthPx, Math.round(h * s));
555
+ const p = { ctx: front.getContext('2d'), s };
556
+ const r = rng(seed, 31);
557
+ paperBase(p, r, PAGE_W, h, '#f1ede3');
558
+ const ctx = p.ctx;
559
+ ctx.fillStyle = INK;
560
+ rule(p, 0, 12, PAGE_W, 1.2);
561
+ rule(p, 0, h - 12, PAGE_W, 1.2);
562
+ // Front (u 0.2–0.8 is what faces the camera).
563
+ scribble(p, r, 560, h * 0.48, 300, 130, '#e2371f', 11);
564
+ ctx.fillStyle = INK;
565
+ font(p, 11, INTER, 600);
566
+ text(p, 'CELLER DEL VENT', 215, 44);
567
+ font(p, 9, INTER);
568
+ text(p, 'Priorat · Denominació d’Origen', 215, 58);
569
+ ctx.fillStyle = 'rgba(40,36,32,0.55)';
570
+ font(p, 9.5, BODY, 400, 'italic');
571
+ [['calma', 700, 70], ['plenitud', 742, 150], ['amor', 690, 214], ['tendresa', 752, 300], ['alegria', 700, 362]].forEach(([w, x, y]) => text(p, w, x, y));
572
+ ctx.save();
573
+ ctx.translate(232 * s, (h - 70) * s);
574
+ ctx.rotate(-Math.PI / 2);
575
+ ctx.fillStyle = INK;
576
+ font(p, 12, INTER, 600);
577
+ ctx.textAlign = 'left';
578
+ ctx.fillText('CATALUNYA', 0, 0);
579
+ ctx.restore();
580
+ ctx.fillStyle = INK;
581
+ font(p, 10, BODY, 400, 'italic');
582
+ text(p, 'Garnatxa Negra — Cabernet Sauvignon', 262, h - 60);
583
+ ctx.strokeStyle = '#e2371f';
584
+ ctx.lineWidth = 2 * s;
585
+ ctx.beginPath();
586
+ ctx.ellipse(350 * s, (h - 63) * s, 95 * s, 12 * s, -0.05, 0.2, Math.PI * 2.1);
587
+ ctx.stroke();
588
+ font(p, 10.5, BODY, 400, 'italic');
589
+ text(p, '“After the rain the grass is born; after the wine, the words.” — a saying', 500, h - 30, 'center');
590
+ font(p, 13, INTER, 600);
591
+ text(p, '2026', 690, h - 58);
592
+ text(p, '14,5 % vol', 740, h - 58);
593
+ text(p, '750 ml', 812, h - 58, 'left');
594
+ // Back label (wraps behind the bottle).
595
+ font(p, 11, INTER, 600);
596
+ text(p, 'BACK', 60, 44);
597
+ column(p, r, 40, 56, 120, h - 110, 7.6, 9.4);
598
+ barcode(p, r, 55, h - 92, 90, 44);
599
+ column(p, r, 855, 44, 125, h - 40, 7.6, 9.4);
600
+ inkWear(p, r, PAGE_W, h);
601
+ const back = mk(256, Math.round(256 * aspect));
602
+ {
603
+ const b = back.getContext('2d');
604
+ b.fillStyle = '#e9e4d8';
605
+ b.fillRect(0, 0, back.width, back.height);
606
+ }
607
+ return { front, back };
608
+ }
609
+ /**
610
+ * A glossy snack pack: brand band, a sale burst behind your words, crisps, a flavour ribbon, net
611
+ * weight, and silver crimped seals at both ends (u < 0.07, u > 0.93).
612
+ */
613
+ function paintWrapper(seed, widthPx, aspect, color) {
614
+ const h = PAGE_W * aspect;
615
+ const s = widthPx / PAGE_W;
616
+ const front = mk(widthPx, Math.round(h * s));
617
+ const ctx = front.getContext('2d');
618
+ const p = { ctx, s };
619
+ const r = rng(seed, 41);
620
+ const g = ctx.createLinearGradient(0, 0, 0, h * s);
621
+ g.addColorStop(0, shade(color, 0.18));
622
+ g.addColorStop(0.55, color);
623
+ g.addColorStop(1, shade(color, -0.22));
624
+ ctx.fillStyle = g;
625
+ ctx.fillRect(0, 0, PAGE_W * s, h * s);
626
+ ctx.save();
627
+ ctx.globalAlpha = 0.09;
628
+ ctx.strokeStyle = '#ffffff';
629
+ ctx.lineWidth = 10 * s;
630
+ for (let x = -h; x < PAGE_W + h; x += 34) {
631
+ ctx.beginPath();
632
+ ctx.moveTo(x * s, h * s);
633
+ ctx.lineTo((x + h) * s, 0);
634
+ ctx.stroke();
635
+ }
636
+ ctx.restore();
637
+ // Brand band.
638
+ ctx.fillStyle = '#c8102e';
639
+ ctx.fillRect(0, 0, PAGE_W * s, 92 * s);
640
+ ctx.fillStyle = '#ffd23f';
641
+ ctx.fillRect(0, 92 * s, PAGE_W * s, 6 * s);
642
+ ctx.fillStyle = '#ffffff';
643
+ font(p, 50, BLACK);
644
+ text(p, 'CRUNCHO', 150, 66);
645
+ font(p, 13, INTER, 600);
646
+ text(p, 'KETTLE COOKED · SINCE 1987', 850, 56, 'right');
647
+ // Burst behind the words.
648
+ ctx.save();
649
+ ctx.translate(460 * s, 300 * s);
650
+ ctx.fillStyle = 'rgba(255,255,255,0.92)';
651
+ ctx.beginPath();
652
+ for (let k = 0; k <= 48; k++) {
653
+ const a = (k / 48) * Math.PI * 2, rr = (k % 2 ? 190 : 214) * s;
654
+ if (k)
655
+ ctx.lineTo(Math.cos(a) * rr, Math.sin(a) * rr * 0.78);
656
+ else
657
+ ctx.moveTo(rr, 0);
658
+ }
659
+ ctx.fill();
660
+ ctx.restore();
661
+ // Crisps.
662
+ for (let k = 0; k < 16; k++) {
663
+ const cx = 700 + r() * 200, cy = 380 + r() * 150, rx = 40 + r() * 30, ry = 26 + r() * 18, a = r() * Math.PI;
664
+ const cg = ctx.createRadialGradient((cx - 10) * s, (cy - 8) * s, 2, cx * s, cy * s, rx * s);
665
+ cg.addColorStop(0, '#fff1b8');
666
+ cg.addColorStop(0.7, '#f0b43c');
667
+ cg.addColorStop(1, '#b86e12');
668
+ ctx.fillStyle = cg;
669
+ ctx.beginPath();
670
+ ctx.ellipse(cx * s, cy * s, rx * s, ry * s, a, 0, Math.PI * 2);
671
+ ctx.fill();
672
+ ctx.fillStyle = 'rgba(255,255,255,0.7)';
673
+ for (let q = 0; q < 8; q++)
674
+ ctx.fillRect((cx + (r() - 0.5) * rx) * s, (cy + (r() - 0.5) * ry) * s, 1.6 * s, 1.6 * s);
675
+ }
676
+ // Flavour ribbon and net weight.
677
+ ctx.fillStyle = '#7a0c1f';
678
+ ctx.beginPath();
679
+ ctx.moveTo(110 * s, 468 * s);
680
+ ctx.lineTo(470 * s, 462 * s);
681
+ ctx.lineTo(450 * s, 492 * s);
682
+ ctx.lineTo(470 * s, 522 * s);
683
+ ctx.lineTo(110 * s, 516 * s);
684
+ ctx.lineTo(130 * s, 492 * s);
685
+ ctx.closePath();
686
+ ctx.fill();
687
+ ctx.fillStyle = '#ffffff';
688
+ font(p, 30, SCRIPT);
689
+ text(p, 'Sea Salt & Honey', 290, 503, 'center');
690
+ ctx.fillStyle = INK;
691
+ font(p, 12, INTER, 600);
692
+ text(p, 'NET WT 45 g (1.6 oz)', 110, h - 20);
693
+ // Crimped seals.
694
+ for (const x0 of [0, PAGE_W * 0.93]) {
695
+ const sg = ctx.createLinearGradient(x0 * s, 0, (x0 + 70) * s, 0);
696
+ sg.addColorStop(0, '#9aa0a6');
697
+ sg.addColorStop(0.5, '#e8ebee');
698
+ sg.addColorStop(1, '#8a9096');
699
+ ctx.fillStyle = sg;
700
+ ctx.fillRect(x0 * s, 0, 70 * s, h * s);
701
+ ctx.fillStyle = 'rgba(40,40,40,0.25)';
702
+ for (let y = 0; y < h; y += 5)
703
+ ctx.fillRect(x0 * s, y * s, 70 * s, 1.2 * s);
704
+ }
705
+ const back = mk(512, Math.round(512 * aspect));
706
+ {
707
+ const b = back.getContext('2d');
708
+ b.fillStyle = '#c9ced3';
709
+ b.fillRect(0, 0, back.width, back.height);
710
+ }
711
+ return { front, back };
712
+ }
713
+ /** Woven cotton: a twill weave with slubs, hemmed edges with stitching, and a woven care label. */
714
+ function paintFabric(seed, widthPx, aspect, color) {
715
+ const h = PAGE_W * aspect;
716
+ const s = widthPx / PAGE_W;
717
+ const W = widthPx, H = Math.round(h * s);
718
+ const make = (dark) => {
719
+ const c = mk(W, H);
720
+ const ctx = c.getContext('2d');
721
+ const img = ctx.createImageData(W, H);
722
+ const [br, bg, bb] = hexToRgb(color);
723
+ const r = rng(seed, 51);
724
+ const slub = new Float32Array(H);
725
+ for (let y = 0; y < H; y++)
726
+ slub[y] = (r() - 0.5) * 0.12;
727
+ const tp = Math.max(2, Math.round(1.6 * s));
728
+ for (let y = 0; y < H; y++) {
729
+ for (let x = 0; x < W; x++) {
730
+ const tw = ((Math.floor(x / tp) + Math.floor(y / tp)) & 3) < 2 ? 1 : -1;
731
+ const warp = Math.floor(x / tp) % 2 ? 0.04 : -0.02;
732
+ const n = ((0, random_1.hash32)(x, y, seed) / 4294967296 - 0.5) * 0.08;
733
+ const k = 1 + tw * 0.07 + warp + slub[y] + n - dark;
734
+ const o = (y * W + x) * 4;
735
+ img.data[o] = Math.min(255, br * k);
736
+ img.data[o + 1] = Math.min(255, bg * k);
737
+ img.data[o + 2] = Math.min(255, bb * k);
738
+ img.data[o + 3] = 255;
739
+ }
740
+ }
741
+ ctx.putImageData(img, 0, 0);
742
+ return c;
743
+ };
744
+ const front = make(0);
745
+ const ctx = front.getContext('2d');
746
+ const p = { ctx, s };
747
+ // Hem: a darker folded band and a running stitch.
748
+ ctx.fillStyle = 'rgba(0,0,0,0.16)';
749
+ const hem = 20;
750
+ ctx.fillRect(0, 0, PAGE_W * s, hem * s);
751
+ ctx.fillRect(0, (h - hem) * s, PAGE_W * s, hem * s);
752
+ ctx.fillRect(0, 0, hem * s, h * s);
753
+ ctx.fillRect((PAGE_W - hem) * s, 0, hem * s, h * s);
754
+ ctx.strokeStyle = 'rgba(240,230,200,0.75)';
755
+ ctx.lineWidth = 1.4 * s;
756
+ ctx.setLineDash([6 * s, 4 * s]);
757
+ ctx.strokeRect((hem - 6) * s, (hem - 6) * s, (PAGE_W - 2 * hem + 12) * s, (h - 2 * hem + 12) * s);
758
+ ctx.setLineDash([]);
759
+ // Care label.
760
+ ctx.fillStyle = '#f4efe2';
761
+ ctx.fillRect(880 * s, (h - 96) * s, 80 * s, 56 * s);
762
+ ctx.fillStyle = '#2b2b2b';
763
+ font(p, 9, COND, 700);
764
+ text(p, '100% COTTON', 920, h - 76, 'center');
765
+ font(p, 7, COND, 500);
766
+ text(p, 'MADE IN PORTUGAL', 920, h - 62, 'center');
767
+ text(p, '30° · DO NOT BLEACH', 920, h - 50, 'center');
768
+ return { front, back: make(0.18) };
769
+ }
770
+ /** A ruled note sheet: cream tooth, blue rules, a red margin and three punched holes (real holes). */
771
+ function paintNotePaper(seed, widthPx, aspect, color) {
772
+ const h = PAGE_W * aspect;
773
+ const s = widthPx / PAGE_W;
774
+ const draw = (mirror, lines) => {
775
+ const c = mk(widthPx, Math.round(h * s));
776
+ const ctx = c.getContext('2d');
777
+ const p = { ctx, s };
778
+ paperBase(p, rng(seed, mirror ? 62 : 61), PAGE_W, h, color);
779
+ if (mirror) {
780
+ ctx.translate(widthPx, 0);
781
+ ctx.scale(-1, 1);
782
+ }
783
+ ctx.fillStyle = `rgba(90,140,210,${0.55 * lines})`;
784
+ for (let y = 150; y < h - 40; y += 34)
785
+ ctx.fillRect(0, y * s, PAGE_W * s, 1.3 * s);
786
+ ctx.fillStyle = `rgba(220,70,70,${0.6 * lines})`;
787
+ ctx.fillRect(118 * s, 0, 1.6 * s, h * s);
788
+ ctx.globalCompositeOperation = 'destination-out';
789
+ for (const y of [h * 0.18, h * 0.5, h * 0.82]) {
790
+ ctx.beginPath();
791
+ ctx.arc(50 * s, y * s, 15 * s, 0, Math.PI * 2);
792
+ ctx.fill();
793
+ }
794
+ ctx.globalCompositeOperation = 'source-over';
795
+ return c;
796
+ };
797
+ return { front: draw(false, 1), back: draw(true, 0.25) };
798
+ }
799
+ /** Every surface's textures: front, back of the sheet, and (newspaper) the page under it. */
800
+ function paintSurfaceArt(art, seed, aspect, color) {
801
+ switch (art) {
802
+ case 'newspaper': return paintNewspaper(seed, 2048, aspect);
803
+ case 'label': {
804
+ const a = paintLabel(seed, 2048, aspect);
805
+ return { ...a, inner: a.back };
806
+ }
807
+ case 'wrapper': {
808
+ const a = paintWrapper(seed, 2048, aspect, color);
809
+ return { ...a, inner: a.back };
810
+ }
811
+ case 'fabric': {
812
+ const a = paintFabric(seed, 2048, aspect, color);
813
+ return { ...a, inner: a.back };
814
+ }
815
+ case 'paper': {
816
+ const a = paintNotePaper(seed, 1536, aspect, color);
817
+ return { ...a, inner: a.back };
818
+ }
819
+ default: {
820
+ const c = paintPlain(color, aspect, seed);
821
+ return { front: c, back: c, inner: c };
822
+ }
823
+ }
824
+ }
825
+ /** A plain surface in one colour with a little tone (a registered surface with no painter). */
826
+ function paintPlain(color, aspect, seed, widthPx = 1024) {
827
+ const c = mk(widthPx, Math.round(widthPx * aspect));
828
+ const p = { ctx: c.getContext('2d'), s: widthPx / PAGE_W };
829
+ paperBase(p, rng(seed, 9), PAGE_W, PAGE_W * aspect, color);
830
+ return c;
831
+ }
832
+ /** A tiling grain: fibres and tooth, grey around 0.5. Used for ink break-up and paper micro-shading. */
833
+ function paintGrain(seed, size = 512) {
834
+ const c = mk(size, size);
835
+ const ctx = c.getContext('2d');
836
+ const img = ctx.createImageData(size, size);
837
+ const r = rng(seed, 55);
838
+ for (let k = 0; k < size * size; k++) {
839
+ const v = 128 + (r() - 0.5) * 70;
840
+ img.data[k * 4] = v;
841
+ img.data[k * 4 + 1] = v;
842
+ img.data[k * 4 + 2] = v;
843
+ img.data[k * 4 + 3] = 255;
844
+ }
845
+ ctx.putImageData(img, 0, 0);
846
+ ctx.globalCompositeOperation = 'soft-light';
847
+ for (let k = 0; k < 2600; k++) {
848
+ const x = r() * size, y = r() * size, a = r() * Math.PI, l = 3 + r() * 14;
849
+ ctx.strokeStyle = r() < 0.5 ? 'rgba(0,0,0,0.5)' : 'rgba(255,255,255,0.5)';
850
+ ctx.lineWidth = 0.6 + r();
851
+ for (const ox of [0, -size, size])
852
+ for (const oy of [0, -size, size]) {
853
+ ctx.beginPath();
854
+ ctx.moveTo(x + ox, y + oy);
855
+ ctx.lineTo(x + ox + Math.cos(a) * l, y + oy + Math.sin(a) * l);
856
+ ctx.stroke();
857
+ }
858
+ }
859
+ return c;
860
+ }
861
+ //# sourceMappingURL=art.js.map