@yewdiel21/motion-kit 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (399) hide show
  1. package/NOTICE +3 -35
  2. package/README.md +93 -81
  3. package/dist/auto/index.d.ts +22 -3
  4. package/dist/auto/index.js +43 -5
  5. package/dist/auto/index.js.map +1 -1
  6. package/dist/{chunk-KLY5BRRI.js → chunk-34EZ7DF4.js} +1 -1
  7. package/dist/chunk-34EZ7DF4.js.map +1 -0
  8. package/dist/{chunk-RFDIZYFX.js → chunk-DOOMULVV.js} +20 -20
  9. package/dist/chunk-DOOMULVV.js.map +1 -0
  10. package/dist/{chunk-ABNRDDO7.js → chunk-I3DXF2KQ.js} +2 -2
  11. package/dist/{chunk-Q4LVFNLN.js → chunk-IKQ5FODN.js} +4 -4
  12. package/dist/chunk-IKQ5FODN.js.map +1 -0
  13. package/dist/{chunk-2BQGFOA7.js → chunk-J6OCFNGU.js} +2 -2
  14. package/dist/chunk-J6OCFNGU.js.map +1 -0
  15. package/dist/{chunk-6OJAP6ZL.js → chunk-QFBOHPWZ.js} +3 -3
  16. package/dist/chunk-QFBOHPWZ.js.map +1 -0
  17. package/dist/{chunk-J27KH2A2.js → chunk-RVSKEBIC.js} +1 -1
  18. package/dist/chunk-RVSKEBIC.js.map +1 -0
  19. package/dist/{chunk-34XYOXHG.js → chunk-TFNRIZHU.js} +1615 -12
  20. package/dist/chunk-TFNRIZHU.js.map +1 -0
  21. package/dist/{chunk-FS2HJVVY.js → chunk-XAKC2QY7.js} +1204 -5
  22. package/dist/chunk-XAKC2QY7.js.map +1 -0
  23. package/dist/css/components/calendar.css +159 -0
  24. package/dist/css/components/chat-background.css +2 -2
  25. package/dist/css/components/chat.css +1 -1
  26. package/dist/css/components/cursor.css +3 -3
  27. package/dist/css/components/dialog.css +3 -3
  28. package/dist/css/components/hover-card.css +14 -0
  29. package/dist/css/components/input-otp.css +10 -0
  30. package/dist/css/components/island.css +1 -1
  31. package/dist/css/components/menu.css +1 -1
  32. package/dist/css/components/nav.css +1 -5
  33. package/dist/css/components/pagination.css +11 -0
  34. package/dist/css/components/quantity.css +16 -0
  35. package/dist/css/components/slot-picker.css +126 -0
  36. package/dist/css/components/steps.css +2 -2
  37. package/dist/css/components/studio-dock.css +35 -0
  38. package/dist/css/components/theme-picker.css +1 -1
  39. package/dist/css/components/toast.css +1 -1
  40. package/dist/css/components/trailer.css +37 -0
  41. package/dist/css/controls.css +78 -13
  42. package/dist/css/effects.css +8 -8
  43. package/dist/css/fonts.css +1 -1
  44. package/dist/css/themes/black-green.css +1 -1
  45. package/dist/css/themes/black.css +1 -1
  46. package/dist/css/themes/blue.css +1 -1
  47. package/dist/css/themes/brown.css +1 -1
  48. package/dist/css/themes/cold-blue.css +1 -1
  49. package/dist/css/themes/funny.css +1 -1
  50. package/dist/css/themes/gray.css +1 -1
  51. package/dist/css/themes/green.css +1 -1
  52. package/dist/css/themes/modern-1.css +1 -1
  53. package/dist/css/themes/neogreen.css +1 -1
  54. package/dist/css/themes/new.css +1 -1
  55. package/dist/css/themes/new2.css +1 -1
  56. package/dist/css/themes/oled.css +1 -1
  57. package/dist/css/themes/orange.css +1 -1
  58. package/dist/css/themes/pastel-pink.css +1 -1
  59. package/dist/css/themes/pink.css +1 -1
  60. package/dist/css/themes/purple.css +1 -1
  61. package/dist/css/themes/red.css +1 -1
  62. package/dist/css/themes/super-blue.css +1 -1
  63. package/dist/css/themes.css +19 -19
  64. package/dist/css/tokens.css +9 -9
  65. package/dist/elements/index.d.ts +75 -7
  66. package/dist/elements/index.js +172 -6
  67. package/dist/elements/index.js.map +1 -1
  68. package/dist/{engine-CUr9QijM.d.ts → engine-GDGwQnJE.d.ts} +2 -2
  69. package/dist/gl/index.js +3 -3
  70. package/dist/index.css +1076 -63
  71. package/dist/index.d.ts +17 -17
  72. package/dist/index.js +49 -7
  73. package/dist/index.js.map +1 -1
  74. package/dist/react/index.d.ts +139 -40
  75. package/dist/react/index.js +355 -8
  76. package/dist/react/index.js.map +1 -1
  77. package/dist/{reduced-BM4Ls0g5.d.ts → reduced-BmBzKH94.d.ts} +215 -18
  78. package/dist/{reveal-WFUWDrei.d.ts → reveal-jsX-uwUz.d.ts} +233 -24
  79. package/dist/{store-Bqy_obnD.d.ts → store-DYb3tTsZ.d.ts} +5 -5
  80. package/dist/theme/generate.d.ts +1 -1
  81. package/dist/theme/generate.js +2 -2
  82. package/dist/theme/generate.js.map +1 -1
  83. package/dist/theme/index.d.ts +2 -2
  84. package/dist/theme/index.js +2 -2
  85. package/dist/{theme-BFMoCzi6.d.ts → theme-Bjf9qIIy.d.ts} +1 -1
  86. package/package.json +2 -2
  87. package/registry.json +230 -156
  88. package/skills/motion-kit/SKILL.md +209 -189
  89. package/skills/motion-kit/reference/components.md +5 -5
  90. package/skills/motion-kit/reference/design.md +14 -14
  91. package/skills/motion-kit/reference/recipes.md +48 -49
  92. package/src/auto/auto-init.ts +38 -0
  93. package/src/components/calendar/README.md +82 -0
  94. package/src/components/calendar/calendar.css +158 -0
  95. package/src/components/calendar/element.ts +27 -0
  96. package/src/components/calendar/engine.ts +412 -0
  97. package/src/components/calendar/react.tsx +69 -0
  98. package/src/components/chat/README.md +1 -3
  99. package/src/components/chat/chat.css +1 -1
  100. package/src/components/chat/engine.ts +1 -1
  101. package/src/components/chat/react.tsx +1 -1
  102. package/src/components/chat-background/README.md +1 -3
  103. package/src/components/chat-background/audio.ts +1 -1
  104. package/src/components/chat-background/chat-background.css +2 -2
  105. package/src/components/chat-background/engine.ts +1 -1
  106. package/src/components/chat-background/react.tsx +1 -1
  107. package/src/components/cursor/README.md +3 -5
  108. package/src/components/cursor/cursor.css +3 -3
  109. package/src/components/cursor/element.ts +2 -2
  110. package/src/components/cursor/engine.ts +5 -5
  111. package/src/components/cursor/react.tsx +1 -1
  112. package/src/components/dialog/README.md +4 -8
  113. package/src/components/dialog/dialog.css +3 -3
  114. package/src/components/dialog/engine.ts +2 -2
  115. package/src/components/dialog/react.tsx +1 -1
  116. package/src/components/hover-card/README.md +16 -0
  117. package/src/components/hover-card/element.ts +8 -0
  118. package/src/components/hover-card/engine.ts +69 -0
  119. package/src/components/hover-card/hover-card.css +13 -0
  120. package/src/components/hover-card/react.tsx +19 -0
  121. package/src/components/input-otp/README.md +18 -0
  122. package/src/components/input-otp/element.ts +14 -0
  123. package/src/components/input-otp/engine.ts +106 -0
  124. package/src/components/input-otp/input-otp.css +9 -0
  125. package/src/components/input-otp/react.tsx +21 -0
  126. package/src/components/island/README.md +7 -7
  127. package/src/components/island/engine.ts +3 -3
  128. package/src/components/island/island.css +1 -1
  129. package/src/components/island/react.tsx +3 -3
  130. package/src/components/menu/README.md +2 -4
  131. package/src/components/menu/engine.ts +1 -1
  132. package/src/components/menu/menu.css +1 -1
  133. package/src/components/menu/react.tsx +1 -1
  134. package/src/components/nav/README.md +12 -14
  135. package/src/components/nav/engine.ts +5 -5
  136. package/src/components/nav/nav.css +1 -5
  137. package/src/components/nav/react.tsx +3 -3
  138. package/src/components/pagination/README.md +17 -0
  139. package/src/components/pagination/element.ts +14 -0
  140. package/src/components/pagination/engine.ts +102 -0
  141. package/src/components/pagination/pagination.css +10 -0
  142. package/src/components/pagination/react.tsx +22 -0
  143. package/src/components/quantity/README.md +20 -0
  144. package/src/components/quantity/element.ts +14 -0
  145. package/src/components/quantity/engine.ts +85 -0
  146. package/src/components/quantity/quantity.css +15 -0
  147. package/src/components/quantity/react.tsx +21 -0
  148. package/src/components/slot-picker/README.md +68 -0
  149. package/src/components/slot-picker/element.ts +27 -0
  150. package/src/components/slot-picker/engine.ts +412 -0
  151. package/src/components/slot-picker/react.tsx +76 -0
  152. package/src/components/slot-picker/slot-picker.css +125 -0
  153. package/src/components/steps/README.md +1 -3
  154. package/src/components/steps/engine.ts +3 -3
  155. package/src/components/steps/react.tsx +2 -2
  156. package/src/components/steps/steps.css +2 -2
  157. package/src/components/studio-dock/README.md +44 -0
  158. package/src/components/studio-dock/element.ts +11 -0
  159. package/src/components/studio-dock/engine.ts +212 -0
  160. package/src/components/studio-dock/react.tsx +23 -0
  161. package/src/components/studio-dock/studio-dock.css +34 -0
  162. package/src/components/theme-picker/README.md +3 -5
  163. package/src/components/theme-picker/engine.ts +2 -2
  164. package/src/components/theme-picker/react.tsx +1 -1
  165. package/src/components/theme-picker/theme-picker.css +1 -1
  166. package/src/components/toast/README.md +1 -3
  167. package/src/components/toast/engine.ts +2 -2
  168. package/src/components/toast/react.tsx +1 -1
  169. package/src/components/toast/store.ts +1 -2
  170. package/src/components/toast/toast.css +1 -1
  171. package/src/components/trailer/README.md +28 -0
  172. package/src/components/trailer/element.ts +13 -0
  173. package/src/components/trailer/engine.ts +189 -0
  174. package/src/components/trailer/react.tsx +16 -0
  175. package/src/components/trailer/trailer.css +36 -0
  176. package/src/core/channels.ts +3 -3
  177. package/src/core/curves.ts +3 -3
  178. package/src/core/dates.ts +98 -0
  179. package/src/core/gsap.ts +2 -2
  180. package/src/core/loop.ts +1 -1
  181. package/src/core/math.ts +1 -1
  182. package/src/core/physics-spring.ts +2 -2
  183. package/src/core/scroll-track.ts +2 -4
  184. package/src/core/spring.ts +1 -1
  185. package/src/core/timing.ts +21 -22
  186. package/src/css/controls/README.md +24 -20
  187. package/src/css/controls/burger.css +1 -1
  188. package/src/css/controls/button.css +4 -4
  189. package/src/css/controls/checkbox.css +1 -1
  190. package/src/css/controls/chip.css +1 -1
  191. package/src/css/controls/field.css +2 -2
  192. package/src/css/controls/glass.css +4 -4
  193. package/src/css/controls/status.css +63 -0
  194. package/src/css/default-theme.css +1 -1
  195. package/src/css/effects/README.md +19 -21
  196. package/src/css/effects/anim.css +1 -1
  197. package/src/css/effects/fade.css +1 -1
  198. package/src/css/effects/float.css +1 -1
  199. package/src/css/effects/frost.css +1 -1
  200. package/src/css/effects/grain.css +1 -1
  201. package/src/css/effects/loading.css +1 -1
  202. package/src/css/effects/success.css +1 -1
  203. package/src/css/effects/text.css +1 -1
  204. package/src/css/fonts.css +1 -1
  205. package/src/css/states.css +1 -1
  206. package/src/css/themes/black-green.css +1 -1
  207. package/src/css/themes/black.css +1 -1
  208. package/src/css/themes/blue.css +1 -1
  209. package/src/css/themes/brown.css +1 -1
  210. package/src/css/themes/cold-blue.css +1 -1
  211. package/src/css/themes/funny.css +1 -1
  212. package/src/css/themes/gray.css +1 -1
  213. package/src/css/themes/green.css +1 -1
  214. package/src/css/themes/modern-1.css +1 -1
  215. package/src/css/themes/neogreen.css +1 -1
  216. package/src/css/themes/new.css +1 -1
  217. package/src/css/themes/new2.css +1 -1
  218. package/src/css/themes/oled.css +1 -1
  219. package/src/css/themes/orange.css +1 -1
  220. package/src/css/themes/pastel-pink.css +1 -1
  221. package/src/css/themes/pink.css +1 -1
  222. package/src/css/themes/purple.css +1 -1
  223. package/src/css/themes/red.css +1 -1
  224. package/src/css/themes/super-blue.css +1 -1
  225. package/src/css/tokens.css +8 -8
  226. package/src/elements/index.ts +24 -0
  227. package/src/gl/liquid-blend/README.md +3 -3
  228. package/src/gl/matcap/README.md +3 -3
  229. package/src/gl/particle-hero/README.md +1 -1
  230. package/src/gl/particle-hero/create-particle-hero.ts +3 -5
  231. package/src/gl/particle-hero/shaders.ts +1 -1
  232. package/src/gl/shader-blur/README.md +3 -3
  233. package/src/gl/shader-grain/README.md +3 -3
  234. package/src/index.ts +25 -0
  235. package/src/motion/chat.ts +2 -2
  236. package/src/motion/confetti.ts +1 -1
  237. package/src/motion/count.ts +1 -1
  238. package/src/motion/details.ts +1 -1
  239. package/src/motion/drag-dismiss.ts +1 -1
  240. package/src/motion/effects.ts +1 -1
  241. package/src/motion/entrances.ts +1 -1
  242. package/src/motion/floating.ts +1 -1
  243. package/src/motion/flow.ts +2 -2
  244. package/src/motion/indicator.ts +1 -1
  245. package/src/motion/layout.ts +1 -1
  246. package/src/motion/liquid.ts +1 -1
  247. package/src/motion/morph.ts +2 -2
  248. package/src/motion/reveal.ts +1 -1
  249. package/src/motion/sheet.ts +1 -1
  250. package/src/motion/surface.ts +1 -1
  251. package/src/react/animated-number.tsx +2 -2
  252. package/src/react/flip-group.tsx +1 -1
  253. package/src/react/frost.tsx +1 -1
  254. package/src/react/index.ts +21 -0
  255. package/src/react/slot-text.tsx +1 -1
  256. package/src/react/use-action-button.ts +6 -0
  257. package/src/react/use-card-dock.ts +1 -1
  258. package/src/react/use-cascade.ts +1 -1
  259. package/src/react/use-contrast.ts +1 -1
  260. package/src/react/use-depth-grid.ts +1 -1
  261. package/src/react/use-editorial-reveal.ts +7 -0
  262. package/src/react/use-fill-text.ts +1 -1
  263. package/src/react/use-film-hero.ts +6 -0
  264. package/src/react/use-font-cycle.ts +7 -0
  265. package/src/react/use-frame-zoom.ts +1 -1
  266. package/src/react/use-image-zoom.ts +5 -0
  267. package/src/react/use-joined-cta.ts +5 -0
  268. package/src/react/use-letters.ts +1 -1
  269. package/src/react/use-local-clock.ts +5 -0
  270. package/src/react/use-marquee.ts +1 -1
  271. package/src/react/use-mask-text.ts +1 -1
  272. package/src/react/use-parallax.ts +1 -1
  273. package/src/react/use-particle-hero.ts +1 -1
  274. package/src/react/use-scroll-dock.ts +5 -0
  275. package/src/react/use-snap-strip.ts +1 -1
  276. package/src/react/use-sticker.ts +5 -0
  277. package/src/react/use-studio-dock.ts +8 -0
  278. package/src/react/use-text-roll.ts +1 -1
  279. package/src/react/use-thumbnail-nav.ts +7 -0
  280. package/src/react/use-trailer.ts +6 -0
  281. package/src/react/use-weight-hover.ts +5 -0
  282. package/src/recipes/action-button/README.md +31 -0
  283. package/src/recipes/action-button/action-button.css +113 -0
  284. package/src/recipes/action-button/create-action-button.ts +56 -0
  285. package/src/recipes/card-dock/README.md +1 -1
  286. package/src/recipes/card-dock/card-dock.css +1 -1
  287. package/src/recipes/card-dock/create-card-dock.ts +2 -2
  288. package/src/recipes/cascade/README.md +1 -3
  289. package/src/recipes/cascade/create-cascade.ts +3 -3
  290. package/src/recipes/contrast/README.md +0 -2
  291. package/src/recipes/contrast/create-contrast.ts +1 -1
  292. package/src/recipes/counter/README.md +0 -2
  293. package/src/recipes/counter/create-counter.ts +1 -1
  294. package/src/recipes/curved-carousel/README.md +0 -2
  295. package/src/recipes/curved-carousel/create-curved-carousel.ts +2 -2
  296. package/src/recipes/curved-carousel/curved-carousel.css +1 -1
  297. package/src/recipes/depth-grid/README.md +0 -2
  298. package/src/recipes/depth-grid/create-depth-grid.ts +3 -4
  299. package/src/recipes/details/README.md +0 -2
  300. package/src/recipes/details/create-details.ts +1 -1
  301. package/src/recipes/dock-pill/README.md +3 -3
  302. package/src/recipes/drag-ruler/README.md +3 -3
  303. package/src/recipes/editorial-reveal/README.md +35 -0
  304. package/src/recipes/editorial-reveal/create-editorial-reveal.ts +91 -0
  305. package/src/recipes/editorial-reveal/editorial-reveal.css +17 -0
  306. package/src/recipes/fill-text/README.md +1 -1
  307. package/src/recipes/fill-text/create-fill-text.ts +1 -1
  308. package/src/recipes/film-hero/README.md +23 -0
  309. package/src/recipes/film-hero/create-film-hero.ts +65 -0
  310. package/src/recipes/film-hero/film-hero.css +29 -0
  311. package/src/recipes/fit-text/README.md +0 -2
  312. package/src/recipes/flow/README.md +0 -2
  313. package/src/recipes/flow/create-flow.ts +1 -1
  314. package/src/recipes/font-cycle/README.md +11 -0
  315. package/src/recipes/font-cycle/create-font-cycle.ts +126 -0
  316. package/src/recipes/font-cycle/font-cycle.css +36 -0
  317. package/src/recipes/frame-zoom/README.md +1 -3
  318. package/src/recipes/frame-zoom/create-frame-zoom.ts +2 -2
  319. package/src/recipes/image-zoom/README.md +16 -0
  320. package/src/recipes/image-zoom/create-image-zoom.ts +27 -0
  321. package/src/recipes/image-zoom/image-zoom.css +7 -0
  322. package/src/recipes/infinite-reel/README.md +3 -3
  323. package/src/recipes/joined-cta/README.md +13 -0
  324. package/src/recipes/joined-cta/create-joined-cta.ts +22 -0
  325. package/src/recipes/joined-cta/joined-cta.css +17 -0
  326. package/src/recipes/letters/README.md +2 -4
  327. package/src/recipes/letters/create-letters.ts +3 -3
  328. package/src/recipes/local-clock/README.md +31 -0
  329. package/src/recipes/local-clock/create-local-clock.ts +61 -0
  330. package/src/recipes/marquee/README.md +0 -2
  331. package/src/recipes/marquee/create-marquee.ts +3 -3
  332. package/src/recipes/marquee/marquee.css +1 -1
  333. package/src/recipes/mask-text/README.md +3 -5
  334. package/src/recipes/mask-text/create-mask-text.ts +4 -4
  335. package/src/recipes/parallax/README.md +1 -3
  336. package/src/recipes/parallax/create-parallax.ts +1 -1
  337. package/src/recipes/pile/README.md +0 -2
  338. package/src/recipes/pile/create-pile.ts +1 -1
  339. package/src/recipes/pile/pile-math.ts +1 -1
  340. package/src/recipes/pile/pile.css +1 -1
  341. package/src/recipes/pill/README.md +0 -2
  342. package/src/recipes/pill/pill.css +2 -2
  343. package/src/recipes/pop/README.md +0 -2
  344. package/src/recipes/pop/create-pop.ts +1 -1
  345. package/src/recipes/radial-menu/README.md +0 -2
  346. package/src/recipes/radial-menu/create-radial-menu.ts +1 -1
  347. package/src/recipes/radial-menu/radial-menu.css +1 -1
  348. package/src/recipes/reflow/README.md +3 -5
  349. package/src/recipes/reflow/create-reflow.ts +1 -1
  350. package/src/recipes/repel-bento/README.md +3 -3
  351. package/src/recipes/reveal/README.md +0 -2
  352. package/src/recipes/reveal/create-reveal.ts +1 -1
  353. package/src/recipes/rotator/README.md +3 -3
  354. package/src/recipes/scroll-dock/README.md +46 -0
  355. package/src/recipes/scroll-dock/create-scroll-dock.ts +72 -0
  356. package/src/recipes/scroll-dock/scroll-dock.css +70 -0
  357. package/src/recipes/slot-text/README.md +0 -2
  358. package/src/recipes/slot-text/create-slot-text.ts +1 -1
  359. package/src/recipes/snap-strip/README.md +1 -1
  360. package/src/recipes/snap-strip/create-snap-strip.ts +5 -6
  361. package/src/recipes/snap-strip/snap-strip.css +1 -1
  362. package/src/recipes/sortable/README.md +3 -5
  363. package/src/recipes/sortable/create-sortable.ts +4 -4
  364. package/src/recipes/sortable/sortable.css +1 -1
  365. package/src/recipes/spring-cards/README.md +0 -2
  366. package/src/recipes/spring-cards/create-spring-cards.ts +1 -1
  367. package/src/recipes/spring-cards/spring-cards.css +1 -1
  368. package/src/recipes/sticker/README.md +59 -0
  369. package/src/recipes/sticker/create-sticker.ts +490 -0
  370. package/src/recipes/sticker/sticker.css +112 -0
  371. package/src/recipes/stretch-footer/README.md +0 -2
  372. package/src/recipes/stretch-footer/create-stretch-footer.ts +1 -1
  373. package/src/recipes/stretch-footer/stretch-footer.css +1 -1
  374. package/src/recipes/tabs/README.md +0 -2
  375. package/src/recipes/tabs/create-tabs.ts +1 -1
  376. package/src/recipes/text-roll/README.md +1 -3
  377. package/src/recipes/text-roll/create-text-roll.ts +3 -3
  378. package/src/recipes/text-roll/text-roll.css +1 -1
  379. package/src/recipes/thumbnail-nav/README.md +16 -0
  380. package/src/recipes/thumbnail-nav/create-thumbnail-nav.ts +165 -0
  381. package/src/recipes/thumbnail-nav/thumbnail-nav.css +108 -0
  382. package/src/recipes/ticket-menu/README.md +3 -3
  383. package/src/recipes/weight-hover/README.md +37 -0
  384. package/src/recipes/weight-hover/create-weight-hover.ts +136 -0
  385. package/src/recipes/weight-hover/weight-hover.css +7 -0
  386. package/src/recipes/words/README.md +0 -2
  387. package/src/recipes/words/create-words.ts +1 -1
  388. package/src/theme/generate.ts +1 -1
  389. package/src/theme/presets.ts +2 -2
  390. package/src/theme/theme.ts +1 -2
  391. package/dist/chunk-2BQGFOA7.js.map +0 -1
  392. package/dist/chunk-34XYOXHG.js.map +0 -1
  393. package/dist/chunk-6OJAP6ZL.js.map +0 -1
  394. package/dist/chunk-FS2HJVVY.js.map +0 -1
  395. package/dist/chunk-J27KH2A2.js.map +0 -1
  396. package/dist/chunk-KLY5BRRI.js.map +0 -1
  397. package/dist/chunk-Q4LVFNLN.js.map +0 -1
  398. package/dist/chunk-RFDIZYFX.js.map +0 -1
  399. /package/dist/{chunk-ABNRDDO7.js.map → chunk-I3DXF2KQ.js.map} +0 -0
@@ -8,7 +8,7 @@ interface DialogLabels {
8
8
  dock?: string;
9
9
  }
10
10
  interface DialogOptions {
11
- /** morph (Stepbro, default), liquid (Stepbro), or sheet: rises from the bottom and pushes [data-mk-underlay] back (Dousan). */
11
+ /** morph (default), liquid, or sheet: rises from the bottom and pushes [data-mk-underlay] back. */
12
12
  variant?: DialogVariant;
13
13
  placement?: DialogPlacement;
14
14
  /** Tinted backdrop; false leaves it transparent (menus). */
@@ -54,11 +54,220 @@ interface MenuInstance extends DialogInstance {
54
54
  }
55
55
  declare function createMenu(dialog: HTMLElement | null, options?: MenuOptions): MenuInstance;
56
56
 
57
+ interface QuantityOptions {
58
+ min?: number;
59
+ max?: number;
60
+ step?: number;
61
+ value?: number;
62
+ disabled?: boolean;
63
+ onChange?: (value: number) => void;
64
+ }
65
+ interface QuantityInstance extends Instance {
66
+ setValue(value: number, notify?: boolean): void;
67
+ readonly value: number;
68
+ }
69
+ /** Bounded numeric control. Bite/rotation is CSS; buttons remain native. */
70
+ declare function createQuantity(root: HTMLElement | null, options?: QuantityOptions): QuantityInstance;
71
+
72
+ interface PaginationOptions {
73
+ totalPages?: number;
74
+ page?: number;
75
+ siblings?: number;
76
+ pageLabel?: (page: number) => string;
77
+ onChange?: (page: number) => void;
78
+ }
79
+ interface PaginationInstance extends Instance {
80
+ setPage(page: number, notify?: boolean): void;
81
+ setTotalPages(total: number): void;
82
+ readonly page: number;
83
+ readonly totalPages: number;
84
+ }
85
+ /** Renders a bounded window of pages, even when totalPages is very large. */
86
+ declare function createPagination(root: HTMLElement | null, options?: PaginationOptions): PaginationInstance;
87
+
88
+ interface HoverCardOptions {
89
+ openDelay?: number;
90
+ closeDelay?: number;
91
+ placement?: 'top' | 'bottom';
92
+ onOpenChange?: (open: boolean) => void;
93
+ }
94
+ interface HoverCardInstance extends Instance {
95
+ open(): void;
96
+ close(): void;
97
+ readonly isOpen: boolean;
98
+ }
99
+ /** Nonmodal preview: pointer, keyboard focus and tap all reveal the same panel. */
100
+ declare function createHoverCard(root: HTMLElement | null, options?: HoverCardOptions): HoverCardInstance;
101
+
102
+ interface InputOtpOptions {
103
+ length?: number;
104
+ value?: string;
105
+ mask?: boolean;
106
+ onChange?: (value: string) => void;
107
+ onComplete?: (value: string) => void;
108
+ }
109
+ interface InputOtpInstance extends Instance {
110
+ setValue(value: string, notify?: boolean): void;
111
+ focus(): void;
112
+ readonly value: string;
113
+ }
114
+ /** One real input preserves native editing, mobile autofill and password managers. */
115
+ declare function createInputOtp(root: HTMLElement | null, options?: InputOtpOptions): InputOtpInstance;
116
+
117
+ type StudioDockView = 'menu' | 'contact' | 'reel';
118
+ interface StudioDockState {
119
+ open: boolean;
120
+ view: StudioDockView;
121
+ page: number;
122
+ }
123
+ interface StudioDockOptions {
124
+ /** Seconds. Reference sheet: 1.3 s, outBack(.52). */
125
+ duration?: number;
126
+ ease?: string;
127
+ /** Move focus into a newly opened view. Defaults to true. */
128
+ focusOnOpen?: boolean;
129
+ /** Contain Tab within the open panel and its toggle. Defaults to true. */
130
+ trapFocus?: boolean;
131
+ onChange?: (state: StudioDockState) => void;
132
+ }
133
+ interface StudioDockInstance extends Instance {
134
+ open(view?: StudioDockView): void;
135
+ close(): void;
136
+ toggle(): void;
137
+ selectPage(index: number): void;
138
+ readonly state: StudioDockState;
139
+ }
140
+ /** A contained studio sheet. Markup remains useful without JavaScript; fixed positioning is CSS opt-in. */
141
+ declare function createStudioDock(root: HTMLElement | null, options?: StudioDockOptions): StudioDockInstance;
142
+
143
+ type DateInput = Date | string | number;
144
+ /** Local midnight of a date; "2026-10-23" is read as a local day, not UTC. */
145
+ declare function toDate(input: DateInput | null | undefined, fallback?: Date): Date;
146
+ /** YYYY-MM-DD of the local day. */
147
+ declare const dayKey: (date: Date) => string;
148
+
149
+ type CalendarView = 'month' | 'week';
150
+ type CalendarEventStatus = 'pending' | 'done' | 'cancelled';
151
+ interface CalendarEvent {
152
+ id: string | number;
153
+ title: string;
154
+ start: DateInput;
155
+ end?: DateInput;
156
+ allDay?: boolean;
157
+ status?: CalendarEventStatus;
158
+ /** Any CSS colour for the chip. */
159
+ color?: string;
160
+ }
161
+ interface CalendarRange {
162
+ start: Date;
163
+ end: Date;
164
+ view: CalendarView;
165
+ }
166
+ interface CalendarLabels {
167
+ more?: (count: number) => string;
168
+ events?: (count: number) => string;
169
+ status?: Partial<Record<CalendarEventStatus, string>>;
170
+ }
171
+ interface CalendarOptions {
172
+ /** Date the calendar opens on. */
173
+ date?: DateInput;
174
+ view?: CalendarView;
175
+ /** 0 = Sunday … 6 = Saturday. */
176
+ firstDay?: number;
177
+ locale?: string;
178
+ events?: CalendarEvent[];
179
+ /** Chips per day in the month view before "+N". */
180
+ maxEvents?: number;
181
+ selected?: DateInput | null;
182
+ /** Override "today" (tests, demos in another zone). */
183
+ today?: DateInput;
184
+ labels?: CalendarLabels;
185
+ onSelect?: (date: Date) => void;
186
+ onEventClick?: (event: CalendarEvent) => void;
187
+ onNavigate?: (range: CalendarRange) => void;
188
+ }
189
+ interface CalendarInstance extends Instance {
190
+ next(): void;
191
+ prev(): void;
192
+ goToday(): void;
193
+ setDate(date: DateInput): void;
194
+ setView(view: CalendarView): void;
195
+ setEvents(events: CalendarEvent[]): void;
196
+ select(date: DateInput | null, notify?: boolean): void;
197
+ readonly date: Date;
198
+ readonly view: CalendarView;
199
+ readonly selected: Date | null;
200
+ readonly range: CalendarRange;
201
+ }
202
+ declare function createCalendar(root: HTMLElement | null, options?: CalendarOptions): CalendarInstance;
203
+
204
+ type SlotSource = string[] | Record<string, string[]> | ((date: Date) => string[] | Promise<string[]>);
205
+ interface SlotValue {
206
+ date: Date;
207
+ time: string;
208
+ key: string;
209
+ value: string;
210
+ }
211
+ interface SlotPickerLabels {
212
+ placeholder?: string;
213
+ empty?: string;
214
+ loading?: string;
215
+ heading?: (date: Date) => string;
216
+ }
217
+ interface SlotPickerOptions {
218
+ /** Month shown first (and the selected day when `value` is not given). */
219
+ date?: DateInput;
220
+ /** Initial value: "2026-10-23T10:30" or { date, time }. */
221
+ value?: string | {
222
+ date: DateInput;
223
+ time: string;
224
+ } | null;
225
+ slots?: SlotSource;
226
+ min?: DateInput;
227
+ max?: DateInput;
228
+ /** Weekdays never available (0 = Sunday). */
229
+ closedDays?: number[];
230
+ isDisabled?: (date: Date) => boolean;
231
+ firstDay?: number;
232
+ locale?: string;
233
+ labels?: SlotPickerLabels;
234
+ onChange?: (value: SlotValue) => void;
235
+ onDateChange?: (date: Date) => void;
236
+ }
237
+ interface SlotPickerInstance extends Instance {
238
+ selectDate(date: DateInput): void;
239
+ selectTime(time: string | null): void;
240
+ setSlots(slots: SlotSource): void;
241
+ readonly date: Date | null;
242
+ readonly time: string | null;
243
+ readonly value: string | null;
244
+ }
245
+ declare function createSlotPicker(root: HTMLElement | null, options?: SlotPickerOptions): SlotPickerInstance;
246
+
247
+ interface TrailerOptions {
248
+ triggers?: boolean | string;
249
+ autoplay?: boolean;
250
+ closeOnBackdrop?: boolean;
251
+ onOpen?: () => void;
252
+ onClose?: () => void;
253
+ }
254
+ interface TrailerInstance extends Instance {
255
+ open(origin?: HTMLElement | null): void;
256
+ close(): void;
257
+ toggle(origin?: HTMLElement | null): void;
258
+ play(): Promise<boolean>;
259
+ pause(): void;
260
+ seek(seconds: number): void;
261
+ setVolume(volume: number): void;
262
+ readonly isOpen: boolean;
263
+ }
264
+ /** Native modal + consumer-owned video, with optional accessible custom transport controls. */
265
+ declare function createTrailer(root: HTMLElement | null, options?: TrailerOptions): TrailerInstance;
266
+
57
267
  /**
58
- * Every Stepbro duration in one place (seconds, like GSAP, unless the name says
268
+ * Every duration in one place (seconds, like GSAP, unless the name says
59
269
  * ms). Recipes and components take their defaults from here, so a timing is
60
- * changed once. Sources: Stepbro replication kit, tasks/especificacion-replicacion.json
61
- * and money/replication-catalog.json.
270
+ * changed once.
62
271
  */
63
272
  declare const TIMING: Readonly<{
64
273
  flow: 0.5;
@@ -204,12 +413,12 @@ declare const TIMING: Readonly<{
204
413
  charsDelay: 0.225;
205
414
  charsStagger: 0.02;
206
415
  }>;
207
- /** Dousan's glass (CSS): surface/shadow transitions, ring and shine. */
416
+ /** glass (CSS): surface/shadow transitions, ring and shine. */
208
417
  glass: Readonly<{
209
418
  hover: 0.4;
210
419
  ring: 0.5;
211
420
  }>;
212
- /** Stepbro's utility animations (css/effects/anim.css), by name. */
421
+ /** utility animations (css/effects/anim.css), by name. */
213
422
  effects: Readonly<{
214
423
  out: 0.5;
215
424
  'out-left': 0.5;
@@ -222,7 +431,7 @@ declare const TIMING: Readonly<{
222
431
  wipe: 0.7;
223
432
  'progress-in': 1;
224
433
  }>;
225
- /** Dousan's success confetti, per 60 fps frame. */
434
+ /** success confetti, per 60 fps frame. */
226
435
  confetti: Readonly<{
227
436
  count: 45;
228
437
  speed: readonly [2, 8];
@@ -233,14 +442,14 @@ declare const TIMING: Readonly<{
233
442
  drag: 0.98;
234
443
  spin: 2.5;
235
444
  }>;
236
- /** Dousan's project sheet. */
445
+ /** project sheet. */
237
446
  sheet: Readonly<{
238
447
  open: 0.72;
239
448
  close: 0.72;
240
449
  underlayScale: 0.98;
241
450
  underlayOpacity: 0.4;
242
451
  }>;
243
- /** Dousan's springs as Motion declares them: [stiffness, damping]. */
452
+ /** Physical spring pairs: [stiffness, damping]. */
244
453
  springs: Readonly<{
245
454
  press: readonly [400, 10];
246
455
  success: readonly [260, 18];
@@ -252,7 +461,7 @@ declare const TIMING: Readonly<{
252
461
  bentoRepel: readonly [300, 25];
253
462
  dockPill: readonly [380, 30];
254
463
  }>;
255
- /** OFFFICE's masked type (Siena's case titles start at 120 %). */
464
+ /** masked type. */
256
465
  maskText: Readonly<{
257
466
  duration: 1.2;
258
467
  delay: 0.1;
@@ -261,14 +470,14 @@ declare const TIMING: Readonly<{
261
470
  y: 100;
262
471
  threshold: 0.8;
263
472
  }>;
264
- /** Siena's reveal group (rules, fades, rises). */
473
+ /** reveal group (rules, fades, rises). */
265
474
  cascade: Readonly<{
266
475
  duration: 1.2;
267
476
  step: 0.03;
268
477
  rise: 200;
269
478
  threshold: 0.3;
270
479
  }>;
271
- /** Siena's slot title: each letter turns 8–14 times inside a 2 s expo.out envelope. */
480
+ /** slot title: each letter turns 8–14 times inside a 2 s expo.out envelope. */
272
481
  textRoll: Readonly<{
273
482
  duration: 2;
274
483
  stagger: 0.04;
@@ -276,7 +485,7 @@ declare const TIMING: Readonly<{
276
485
  interval: 6000;
277
486
  quietMs: 1000;
278
487
  }>;
279
- /** Dousan's hero letters: scale on hover, pastel blink. */
488
+ /** hero letters: scale on hover, pastel blink. */
280
489
  letters: Readonly<{
281
490
  scale: 1.3;
282
491
  y: -5;
@@ -286,14 +495,14 @@ declare const TIMING: Readonly<{
286
495
  blinkRepeatDelay: 0.1;
287
496
  blinkDelays: readonly [0.1, 0.6, 0.2, 1, 0.4, 1.2, 0.15, 0.8, 0.3];
288
497
  }>;
289
- /** Siena's image parallax. */
498
+ /** image parallax. */
290
499
  parallax: Readonly<{
291
500
  travel: 10;
292
501
  scale: 1.2;
293
502
  strongScale: 1.3;
294
503
  lerp: 1;
295
504
  }>;
296
- /** Siena's About grid gathering from depth. */
505
+ /** About grid gathering from depth. */
297
506
  depthGrid: Readonly<{
298
507
  perspective: 600;
299
508
  distance: 900;
@@ -304,7 +513,7 @@ declare const TIMING: Readonly<{
304
513
  stagger: 0.15;
305
514
  lerp: 1;
306
515
  }>;
307
- /** Siena's video mask: the frame and the picture inside scale in opposite directions. */
516
+ /** video mask: the frame and the picture inside scale in opposite directions. */
308
517
  frameZoom: Readonly<{
309
518
  outer: readonly [80, 20];
310
519
  inner: readonly [130, 20];
@@ -313,19 +522,19 @@ declare const TIMING: Readonly<{
313
522
  open: 1;
314
523
  lerp: 1;
315
524
  }>;
316
- /** Siena's marquee: seconds per item, at most 14 counted. */
525
+ /** marquee: seconds per item, at most 14 counted. */
317
526
  marquee: Readonly<{
318
527
  perItem: 2;
319
528
  maxItems: 14;
320
529
  }>;
321
- /** Dousan's glass chip and Siena's dot cursor. */
530
+ /** glass chip and dot cursor. */
322
531
  cursor: Readonly<{
323
532
  gutter: 10;
324
533
  circle: 96;
325
534
  dotLerp: 0.2;
326
535
  light: 180;
327
536
  }>;
328
- /** iyo.ai's floating navbar: enters from −300 % over 1.8 s; rows follow 0.15 s + 0.025 s each. */
537
+ /** floating navbar: enters from −300 % over 1.8 s; rows follow 0.15 s + 0.025 s each. */
329
538
  island: Readonly<{
330
539
  entrance: 1.8;
331
540
  offset: -300;
@@ -333,18 +542,18 @@ declare const TIMING: Readonly<{
333
542
  step: 0.025;
334
543
  focus: 150;
335
544
  }>;
336
- /** iyo.ai's product dock: spread for 1.6 s on load; tablet range re-checked 250 ms after a resize. */
545
+ /** product dock: spread for 1.6 s on load; tablet range re-checked 250 ms after a resize. */
337
546
  cardDock: Readonly<{
338
547
  intro: 1600;
339
548
  resizeDebounce: 250;
340
549
  }>;
341
- /** iyo.ai's phone cards: 5 s a card, 2 s wait after a touch, 0.5 s after it shows. */
550
+ /** phone cards: 5 s a card, 2 s wait after a touch, 0.5 s after it shows. */
342
551
  snapStrip: Readonly<{
343
552
  interval: 5000;
344
553
  resume: 2000;
345
554
  delay: 500;
346
555
  }>;
347
- /** iyo.ai's fill-text: letters from .2, 0.5 s each, 0.1 s apart, top 90 % → centre 40 %. */
556
+ /** fill-text: letters from .2, 0.5 s each, 0.1 s apart, top 90 % → centre 40 %. */
348
557
  fillText: Readonly<{
349
558
  from: 0.2;
350
559
  duration: 0.5;
@@ -352,7 +561,7 @@ declare const TIMING: Readonly<{
352
561
  start: "top 90%";
353
562
  end: "center 40%";
354
563
  }>;
355
- /** iyo.ai's particle hero (adapted): fade in 1 s after 0.3 s, morph cycles, pointer push. */
564
+ /** particle hero: fade in 1 s after 0.3 s, morph cycles, pointer push. */
356
565
  particleHero: Readonly<{
357
566
  fadeIn: 1;
358
567
  fadeDelay: 0.3;
@@ -413,4 +622,4 @@ interface RevealHandle {
413
622
  }
414
623
  declare function revealFrom(target: HTMLElement, options?: RevealOptions): RevealHandle | null;
415
624
 
416
- export { type DialogInstance as D, type MenuInstance as M, type RevealHandle as R, TIMING as T, type DialogLabels as a, type DialogOptions as b, type DialogPlacement as c, type DialogVariant as d, type MenuOptions as e, type RevealOptions as f, type RevealSpeed as g, createDialog as h, createMenu as i, revealFrom as r };
625
+ export { type RevealOptions as A, type RevealSpeed as B, type CalendarInstance as C, type DialogInstance as D, type SlotPickerLabels as E, type SlotPickerOptions as F, type SlotSource as G, type HoverCardInstance as H, type InputOtpInstance as I, type SlotValue as J, type StudioDockOptions as K, type StudioDockState as L, type MenuInstance as M, TIMING as N, type TrailerOptions as O, type PaginationInstance as P, type QuantityInstance as Q, type RevealHandle as R, type StudioDockInstance as S, type TrailerInstance as T, createDialog as U, createMenu as V, dayKey as W, revealFrom as X, toDate as Y, createTrailer as a, createQuantity as b, createStudioDock as c, createPagination as d, createHoverCard as e, createInputOtp as f, createCalendar as g, createSlotPicker as h, type StudioDockView as i, type SlotPickerInstance as j, type CalendarEvent as k, type CalendarEventStatus as l, type CalendarLabels as m, type CalendarOptions as n, type CalendarRange as o, type CalendarView as p, type DateInput as q, type DialogLabels as r, type DialogOptions as s, type DialogPlacement as t, type DialogVariant as u, type HoverCardOptions as v, type InputOtpOptions as w, type MenuOptions as x, type PaginationOptions as y, type QuantityOptions as z };
@@ -1,9 +1,9 @@
1
1
  import { I as Instance } from './types-BkS_raL8.js';
2
2
  import { Flip } from 'gsap/Flip';
3
- import { R as RevealHandle } from './reveal-WFUWDrei.js';
3
+ import { R as RevealHandle } from './reveal-jsX-uwUz.js';
4
4
 
5
5
  interface ThemePickerOptions {
6
- /** Theme ids to show, in order. Default: every theme Stepbro shows (or all with showHidden). */
6
+ /** Theme ids to show, in order. Default: visible presets, or all with showHidden. */
7
7
  themes?: string[];
8
8
  showHidden?: boolean;
9
9
  labels?: {
@@ -68,7 +68,7 @@ type NavStyle = (typeof NAV_STYLES)[number];
68
68
  interface NavOptions {
69
69
  /** Default: the saved one (storageKey), else the mk-nav--<style> class in the markup, else 'bonita' (Money's default). */
70
70
  style?: NavStyle;
71
- /** The accent variant (Stepbro's variant-1): the current page in primary-container. */
71
+ /** The accent variant: the current page in primary-container. */
72
72
  accent?: boolean;
73
73
  /** Reveal the shell from the first button when the nav starts (off by default). */
74
74
  reveal?: boolean;
@@ -95,7 +95,7 @@ interface NavigateDetail {
95
95
  /** The click: call its preventDefault() to stop a link (single-page apps). */
96
96
  originalEvent: MouseEvent;
97
97
  }
98
- /** Stepbro's nav entrance: the app shell is uncovered from the nav's first button. */
98
+ /** nav entrance: the app shell is uncovered from the nav's first button. */
99
99
  declare function revealShell(nav: HTMLElement): RevealHandle | null;
100
100
  declare function createNav(root: HTMLElement | null, options?: NavOptions): NavInstance;
101
101
 
@@ -125,7 +125,7 @@ declare function createCursor(host: HTMLElement | null, options?: CursorOptions)
125
125
  interface IslandOptions {
126
126
  /** Drop in from above on load (true), wait for ready() ('manual') or not at all. */
127
127
  entrance?: boolean | 'manual';
128
- /** Close when the page scrolls after a wheel or touch (iyo). */
128
+ /** Close when the page scrolls after a wheel or touch. */
129
129
  closeOnScroll?: boolean;
130
130
  /** Close when a link inside a panel is followed. */
131
131
  closeOnNavigate?: boolean;
@@ -1,4 +1,4 @@
1
- import { T as ThemeState } from '../theme-BFMoCzi6.js';
1
+ import { T as ThemeState } from '../theme-Bjf9qIIy.js';
2
2
  import { ThemePalettes } from './index.js';
3
3
  export { themeCss } from './index.js';
4
4
 
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  themeCss
3
- } from "../chunk-ABNRDDO7.js";
3
+ } from "../chunk-I3DXF2KQ.js";
4
4
  import {
5
5
  ROLES,
6
6
  registerTheme,
7
7
  setTheme
8
- } from "../chunk-J27KH2A2.js";
8
+ } from "../chunk-RVSKEBIC.js";
9
9
  import "../chunk-TGV27ZWM.js";
10
10
 
11
11
  // src/theme/generate.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/theme/generate.ts"],"sourcesContent":["import {\n Hct,\n MaterialDynamicColors,\n SchemeContent,\n SchemeExpressive,\n SchemeFidelity,\n SchemeMonochrome,\n SchemeNeutral,\n SchemeTonalSpot,\n SchemeVibrant,\n argbFromHex,\n hexFromArgb,\n} from '@material/material-color-utilities';\nimport { ROLES, type Role } from './presets';\nimport { themeCss, type Palette, type ThemePalettes } from './css-format';\nimport { registerTheme, setTheme } from './theme';\n\n/*\n * Material 3 palettes from any colour, in the same 37 roles as Stepbro's themes.\n * Needs the optional peer @material/material-color-utilities ^0.3.0\n * (0.4.0 publishes ESM imports without extensions that Node cannot load).\n */\n\nexport type ThemeVariant = 'tonal-spot' | 'vibrant' | 'expressive' | 'neutral' | 'content' | 'fidelity' | 'monochrome';\n\nexport interface GenerateOptions {\n variant?: ThemeVariant;\n /** -1 (reduced) … 0 (standard) … 1 (high). */\n contrast?: number;\n}\n\nconst SCHEMES = {\n 'tonal-spot': SchemeTonalSpot,\n vibrant: SchemeVibrant,\n expressive: SchemeExpressive,\n neutral: SchemeNeutral,\n content: SchemeContent,\n fidelity: SchemeFidelity,\n monochrome: SchemeMonochrome,\n} as const;\n\nconst camel = (role: string) => role.replace(/-([a-z])/g, (_, c: string) => c.toUpperCase());\ntype Dynamic = { getArgb(scheme: unknown): number };\n\nexport function generateTheme(seed: string, { variant = 'tonal-spot', contrast = 0 }: GenerateOptions = {}): ThemePalettes {\n if (!/^#?[0-9a-f]{6}$/i.test(seed)) throw new Error(`generateTheme: seed must be a #rrggbb colour (got \"${seed}\")`);\n const Scheme = SCHEMES[variant];\n if (!Scheme) throw new Error(`generateTheme: unknown variant \"${variant}\"`);\n const source = Hct.fromInt(argbFromHex(seed.startsWith('#') ? seed : `#${seed}`));\n const palette = (dark: boolean): Palette => {\n const scheme = new Scheme(source, dark, contrast);\n const colors = MaterialDynamicColors as unknown as Record<string, Dynamic>;\n return Object.fromEntries(ROLES.map((role) => [role, hexFromArgb(colors[camel(role)].getArgb(scheme))])) as Record<Role, string>;\n };\n return { light: palette(false), dark: palette(true) };\n}\n\nexport { themeCss };\n\n/** Generate a theme from `seed`, inject it as a <style>, register and select it. */\nexport function applyTheme(seed: string, { id = 'custom', ...options }: GenerateOptions & { id?: string } = {}) {\n const css = themeCss(id, generateTheme(seed, options));\n let style = document.querySelector<HTMLStyleElement>(`style[data-mk-theme-style=\"${id}\"]`);\n if (!style) {\n style = document.createElement('style');\n style.dataset.mkThemeStyle = id;\n document.head.append(style);\n }\n style.textContent = css;\n registerTheme(id);\n return setTheme(id);\n}\n"],"mappings":";;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAmBP,IAAM,UAAU;AAAA,EACd,cAAc;AAAA,EACd,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AACd;AAEA,IAAM,QAAQ,CAAC,SAAiB,KAAK,QAAQ,aAAa,CAAC,GAAG,MAAc,EAAE,YAAY,CAAC;AAGpF,SAAS,cAAc,MAAc,EAAE,UAAU,cAAc,WAAW,EAAE,IAAqB,CAAC,GAAkB;AACzH,MAAI,CAAC,mBAAmB,KAAK,IAAI,EAAG,OAAM,IAAI,MAAM,sDAAsD,IAAI,IAAI;AAClH,QAAM,SAAS,QAAQ,OAAO;AAC9B,MAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,mCAAmC,OAAO,GAAG;AAC1E,QAAM,SAAS,IAAI,QAAQ,YAAY,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;AAChF,QAAM,UAAU,CAAC,SAA2B;AAC1C,UAAM,SAAS,IAAI,OAAO,QAAQ,MAAM,QAAQ;AAChD,UAAM,SAAS;AACf,WAAO,OAAO,YAAY,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,YAAY,OAAO,MAAM,IAAI,CAAC,EAAE,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC;AAAA,EACzG;AACA,SAAO,EAAE,OAAO,QAAQ,KAAK,GAAG,MAAM,QAAQ,IAAI,EAAE;AACtD;AAKO,SAAS,WAAW,MAAc,EAAE,KAAK,UAAU,GAAG,QAAQ,IAAuC,CAAC,GAAG;AAC9G,QAAM,MAAM,SAAS,IAAI,cAAc,MAAM,OAAO,CAAC;AACrD,MAAI,QAAQ,SAAS,cAAgC,8BAA8B,EAAE,IAAI;AACzF,MAAI,CAAC,OAAO;AACV,YAAQ,SAAS,cAAc,OAAO;AACtC,UAAM,QAAQ,eAAe;AAC7B,aAAS,KAAK,OAAO,KAAK;AAAA,EAC5B;AACA,QAAM,cAAc;AACpB,gBAAc,EAAE;AAChB,SAAO,SAAS,EAAE;AACpB;","names":[]}
1
+ {"version":3,"sources":["../../src/theme/generate.ts"],"sourcesContent":["import {\n Hct,\n MaterialDynamicColors,\n SchemeContent,\n SchemeExpressive,\n SchemeFidelity,\n SchemeMonochrome,\n SchemeNeutral,\n SchemeTonalSpot,\n SchemeVibrant,\n argbFromHex,\n hexFromArgb,\n} from '@material/material-color-utilities';\nimport { ROLES, type Role } from './presets';\nimport { themeCss, type Palette, type ThemePalettes } from './css-format';\nimport { registerTheme, setTheme } from './theme';\n\n/*\n * Material 3 palettes from any colour, with the 37 theme color roles.\n * Needs the optional peer @material/material-color-utilities ^0.3.0\n * (0.4.0 publishes ESM imports without extensions that Node cannot load).\n */\n\nexport type ThemeVariant = 'tonal-spot' | 'vibrant' | 'expressive' | 'neutral' | 'content' | 'fidelity' | 'monochrome';\n\nexport interface GenerateOptions {\n variant?: ThemeVariant;\n /** -1 (reduced) … 0 (standard) … 1 (high). */\n contrast?: number;\n}\n\nconst SCHEMES = {\n 'tonal-spot': SchemeTonalSpot,\n vibrant: SchemeVibrant,\n expressive: SchemeExpressive,\n neutral: SchemeNeutral,\n content: SchemeContent,\n fidelity: SchemeFidelity,\n monochrome: SchemeMonochrome,\n} as const;\n\nconst camel = (role: string) => role.replace(/-([a-z])/g, (_, c: string) => c.toUpperCase());\ntype Dynamic = { getArgb(scheme: unknown): number };\n\nexport function generateTheme(seed: string, { variant = 'tonal-spot', contrast = 0 }: GenerateOptions = {}): ThemePalettes {\n if (!/^#?[0-9a-f]{6}$/i.test(seed)) throw new Error(`generateTheme: seed must be a #rrggbb colour (got \"${seed}\")`);\n const Scheme = SCHEMES[variant];\n if (!Scheme) throw new Error(`generateTheme: unknown variant \"${variant}\"`);\n const source = Hct.fromInt(argbFromHex(seed.startsWith('#') ? seed : `#${seed}`));\n const palette = (dark: boolean): Palette => {\n const scheme = new Scheme(source, dark, contrast);\n const colors = MaterialDynamicColors as unknown as Record<string, Dynamic>;\n return Object.fromEntries(ROLES.map((role) => [role, hexFromArgb(colors[camel(role)].getArgb(scheme))])) as Record<Role, string>;\n };\n return { light: palette(false), dark: palette(true) };\n}\n\nexport { themeCss };\n\n/** Generate a theme from `seed`, inject it as a <style>, register and select it. */\nexport function applyTheme(seed: string, { id = 'custom', ...options }: GenerateOptions & { id?: string } = {}) {\n const css = themeCss(id, generateTheme(seed, options));\n let style = document.querySelector<HTMLStyleElement>(`style[data-mk-theme-style=\"${id}\"]`);\n if (!style) {\n style = document.createElement('style');\n style.dataset.mkThemeStyle = id;\n document.head.append(style);\n }\n style.textContent = css;\n registerTheme(id);\n return setTheme(id);\n}\n"],"mappings":";;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAmBP,IAAM,UAAU;AAAA,EACd,cAAc;AAAA,EACd,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AACd;AAEA,IAAM,QAAQ,CAAC,SAAiB,KAAK,QAAQ,aAAa,CAAC,GAAG,MAAc,EAAE,YAAY,CAAC;AAGpF,SAAS,cAAc,MAAc,EAAE,UAAU,cAAc,WAAW,EAAE,IAAqB,CAAC,GAAkB;AACzH,MAAI,CAAC,mBAAmB,KAAK,IAAI,EAAG,OAAM,IAAI,MAAM,sDAAsD,IAAI,IAAI;AAClH,QAAM,SAAS,QAAQ,OAAO;AAC9B,MAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,mCAAmC,OAAO,GAAG;AAC1E,QAAM,SAAS,IAAI,QAAQ,YAAY,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;AAChF,QAAM,UAAU,CAAC,SAA2B;AAC1C,UAAM,SAAS,IAAI,OAAO,QAAQ,MAAM,QAAQ;AAChD,UAAM,SAAS;AACf,WAAO,OAAO,YAAY,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,YAAY,OAAO,MAAM,IAAI,CAAC,EAAE,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC;AAAA,EACzG;AACA,SAAO,EAAE,OAAO,QAAQ,KAAK,GAAG,MAAM,QAAQ,IAAI,EAAE;AACtD;AAKO,SAAS,WAAW,MAAc,EAAE,KAAK,UAAU,GAAG,QAAQ,IAAuC,CAAC,GAAG;AAC9G,QAAM,MAAM,SAAS,IAAI,cAAc,MAAM,OAAO,CAAC;AACrD,MAAI,QAAQ,SAAS,cAAgC,8BAA8B,EAAE,IAAI;AACzF,MAAI,CAAC,OAAO;AACV,YAAQ,SAAS,cAAc,OAAO;AACtC,UAAM,QAAQ,eAAe;AAC7B,aAAS,KAAK,OAAO,KAAK;AAAA,EAC5B;AACA,QAAM,cAAc;AACpB,gBAAc,EAAE;AAChB,SAAO,SAAS,EAAE;AACpB;","names":[]}
@@ -1,5 +1,5 @@
1
- import { R as Role } from '../theme-BFMoCzi6.js';
2
- export { D as DEFAULT_THEME, I as InitThemeOptions, M as MK_THEME_HEAD_SCRIPT, c as ROLES, d as THEMES, e as THEME_EVENT, f as ThemeId, b as ThemeMode, g as ThemePreset, T as ThemeState, h as getTheme, i as initTheme, r as registerTheme, a as setMode, s as setTheme, t as themeHeadScript } from '../theme-BFMoCzi6.js';
1
+ import { R as Role } from '../theme-Bjf9qIIy.js';
2
+ export { D as DEFAULT_THEME, I as InitThemeOptions, M as MK_THEME_HEAD_SCRIPT, c as ROLES, d as THEMES, e as THEME_EVENT, f as ThemeId, b as ThemeMode, g as ThemePreset, T as ThemeState, h as getTheme, i as initTheme, r as registerTheme, a as setMode, s as setTheme, t as themeHeadScript } from '../theme-Bjf9qIIy.js';
3
3
 
4
4
  type Palette = Record<Role, string>;
5
5
  interface ThemePalettes {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  themeCss
3
- } from "../chunk-ABNRDDO7.js";
3
+ } from "../chunk-I3DXF2KQ.js";
4
4
  import {
5
5
  DEFAULT_THEME,
6
6
  MK_THEME_HEAD_SCRIPT,
@@ -13,7 +13,7 @@ import {
13
13
  setMode,
14
14
  setTheme,
15
15
  themeHeadScript
16
- } from "../chunk-J27KH2A2.js";
16
+ } from "../chunk-RVSKEBIC.js";
17
17
  import "../chunk-TGV27ZWM.js";
18
18
  export {
19
19
  DEFAULT_THEME,
@@ -4,7 +4,7 @@ type Role = (typeof ROLES)[number];
4
4
  interface ThemePreset {
5
5
  readonly id: string;
6
6
  readonly name: string;
7
- /** Hidden from Stepbro's own picker (kept in its code). */
7
+ /** Hidden from the picker unless showHidden is enabled. */
8
8
  readonly hidden: boolean;
9
9
  /** Modes with their own palette. OLED is dark-only and uses Black in light mode. */
10
10
  readonly modes: readonly ('light' | 'dark')[];
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@yewdiel21/motion-kit",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Motion toolkit for vanilla, Astro and React: GSAP recipes, accessible components, 19 themes, CSS controls and optional WebGL effects.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
7
- "homepage": "https://github.com/YewdielMartinez/motion-kit#readme",
7
+ "homepage": "https://motion-kit-playground.vercel.app",
8
8
  "bugs": {
9
9
  "url": "https://github.com/YewdielMartinez/motion-kit/issues"
10
10
  },