@new-black/lyra 0.0.12 → 0.0.14

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 (692) hide show
  1. package/README.md +7 -1
  2. package/dist/components/accordion/accordion.d.ts.map +1 -1
  3. package/dist/components/alert/alert.d.ts.map +1 -1
  4. package/dist/components/badge/badge.d.ts.map +1 -1
  5. package/dist/components/button/button.d.ts.map +1 -1
  6. package/dist/components/inputs/email-text-field/email-text-field.d.ts +5 -0
  7. package/dist/components/inputs/email-text-field/email-text-field.d.ts.map +1 -0
  8. package/dist/components/inputs/email-text-field/index.d.ts +2 -0
  9. package/dist/components/inputs/email-text-field/index.d.ts.map +1 -0
  10. package/dist/components/inputs/index.d.ts +5 -2
  11. package/dist/components/inputs/index.d.ts.map +1 -1
  12. package/dist/components/inputs/input-icon.d.ts.map +1 -1
  13. package/dist/components/inputs/number-field/index.d.ts +2 -0
  14. package/dist/components/inputs/number-field/index.d.ts.map +1 -0
  15. package/dist/components/inputs/number-field/number-field.d.ts +23 -0
  16. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -0
  17. package/dist/components/inputs/password-text-field/password-text-field.d.ts.map +1 -1
  18. package/dist/components/inputs/select/index.d.ts +2 -0
  19. package/dist/components/inputs/select/index.d.ts.map +1 -0
  20. package/dist/components/inputs/select/select.d.ts +32 -0
  21. package/dist/components/inputs/select/select.d.ts.map +1 -0
  22. package/dist/components/inputs/shared.styles.d.ts.map +1 -1
  23. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  24. package/dist/components/list-box/index.d.ts +3 -0
  25. package/dist/components/list-box/index.d.ts.map +1 -0
  26. package/dist/components/list-box/list-box-styles.d.ts +10 -0
  27. package/dist/components/list-box/list-box-styles.d.ts.map +1 -0
  28. package/dist/components/list-box/list-box.d.ts +26 -0
  29. package/dist/components/list-box/list-box.d.ts.map +1 -0
  30. package/dist/components/popover/popover.d.ts +7 -2
  31. package/dist/components/popover/popover.d.ts.map +1 -1
  32. package/dist/components/popover/popover.styles.d.ts +0 -1
  33. package/dist/components/popover/popover.styles.d.ts.map +1 -1
  34. package/dist/components/progress-bar/progress-bar.d.ts.map +1 -1
  35. package/dist/components/svg-icon/index.d.ts +1 -1
  36. package/dist/components/svg-icon/index.d.ts.map +1 -1
  37. package/dist/components/text/text.d.ts.map +1 -1
  38. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  39. package/dist/icons/icon-defs.svg +61 -14
  40. package/dist/index.d.ts +3 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/lyra.cjs +1 -1
  43. package/dist/lyra.js +76 -60
  44. package/dist/lyra10.cjs +1 -1
  45. package/dist/lyra10.js +23 -118
  46. package/dist/lyra100.cjs +1 -1
  47. package/dist/lyra100.js +6 -15
  48. package/dist/lyra101.cjs +1 -1
  49. package/dist/lyra101.js +27 -5
  50. package/dist/lyra102.cjs +1 -1
  51. package/dist/lyra102.js +97 -8
  52. package/dist/lyra103.cjs +1 -1
  53. package/dist/lyra103.js +35 -9
  54. package/dist/lyra104.cjs +1 -1
  55. package/dist/lyra104.js +133 -8
  56. package/dist/lyra105.cjs +1 -1
  57. package/dist/lyra105.js +23 -37
  58. package/dist/lyra106.cjs +1 -1
  59. package/dist/lyra106.js +98 -3
  60. package/dist/lyra107.cjs +1 -1
  61. package/dist/lyra107.js +26 -4
  62. package/dist/lyra108.cjs +1 -1
  63. package/dist/lyra108.js +38 -4
  64. package/dist/lyra109.cjs +1 -1
  65. package/dist/lyra109.js +3 -10
  66. package/dist/lyra11.cjs +1 -1
  67. package/dist/lyra11.js +24 -32
  68. package/dist/lyra110.cjs +1 -1
  69. package/dist/lyra110.js +17 -6
  70. package/dist/lyra111.cjs +1 -1
  71. package/dist/lyra111.js +14 -4
  72. package/dist/lyra112.cjs +1 -1
  73. package/dist/lyra112.js +19 -2
  74. package/dist/lyra113.cjs +1 -1
  75. package/dist/lyra113.js +10 -17
  76. package/dist/lyra114.cjs +1 -1
  77. package/dist/lyra114.js +15 -14
  78. package/dist/lyra115.cjs +1 -1
  79. package/dist/lyra115.js +5 -33
  80. package/dist/lyra116.cjs +1 -1
  81. package/dist/lyra116.js +9 -30
  82. package/dist/lyra117.cjs +1 -1
  83. package/dist/lyra117.js +9 -38
  84. package/dist/lyra118.cjs +1 -1
  85. package/dist/lyra118.js +8 -9
  86. package/dist/lyra119.cjs +1 -1
  87. package/dist/lyra119.js +38 -3
  88. package/dist/lyra12.cjs +1 -1
  89. package/dist/lyra12.js +144 -29
  90. package/dist/lyra120.cjs +1 -1
  91. package/dist/lyra120.js +3 -48
  92. package/dist/lyra121.cjs +1 -1
  93. package/dist/lyra121.js +4 -7
  94. package/dist/lyra122.cjs +1 -1
  95. package/dist/lyra122.js +5 -3
  96. package/dist/lyra123.cjs +1 -1
  97. package/dist/lyra123.js +10 -28
  98. package/dist/lyra124.cjs +1 -1
  99. package/dist/lyra124.js +6 -15
  100. package/dist/lyra125.cjs +1 -1
  101. package/dist/lyra125.js +4 -11
  102. package/dist/lyra126.cjs +1 -1
  103. package/dist/lyra126.js +2 -9
  104. package/dist/lyra127.cjs +1 -1
  105. package/dist/lyra127.js +18 -2
  106. package/dist/lyra128.cjs +1 -1
  107. package/dist/lyra128.js +14 -3
  108. package/dist/lyra129.cjs +1 -1
  109. package/dist/lyra129.js +33 -3
  110. package/dist/lyra13.cjs +1 -1
  111. package/dist/lyra13.js +37 -154
  112. package/dist/lyra130.cjs +1 -1
  113. package/dist/lyra130.js +30 -2
  114. package/dist/lyra131.cjs +1 -1
  115. package/dist/lyra131.js +38 -257
  116. package/dist/lyra132.cjs +1 -1
  117. package/dist/lyra132.js +9 -24
  118. package/dist/lyra133.cjs +1 -1
  119. package/dist/lyra133.js +3 -16
  120. package/dist/lyra134.cjs +1 -1
  121. package/dist/lyra134.js +47 -3
  122. package/dist/lyra135.cjs +1 -1
  123. package/dist/lyra135.js +7 -11
  124. package/dist/lyra136.cjs +1 -1
  125. package/dist/lyra136.js +3 -3
  126. package/dist/lyra137.cjs +1 -1
  127. package/dist/lyra137.js +27 -26
  128. package/dist/lyra138.cjs +1 -1
  129. package/dist/lyra138.js +15 -200
  130. package/dist/lyra139.cjs +1 -1
  131. package/dist/lyra139.js +10 -4
  132. package/dist/lyra14.cjs +1 -1
  133. package/dist/lyra14.js +131 -22
  134. package/dist/lyra140.cjs +1 -1
  135. package/dist/lyra140.js +9 -21
  136. package/dist/lyra141.cjs +1 -1
  137. package/dist/lyra141.js +2 -11
  138. package/dist/lyra142.cjs +1 -1
  139. package/dist/lyra142.js +3 -4
  140. package/dist/lyra143.cjs +1 -1
  141. package/dist/lyra143.js +3 -26
  142. package/dist/lyra144.cjs +1 -1
  143. package/dist/lyra144.js +2 -4
  144. package/dist/lyra145.cjs +1 -1
  145. package/dist/lyra145.js +257 -4
  146. package/dist/lyra146.cjs +1 -1
  147. package/dist/lyra146.js +25 -25
  148. package/dist/lyra147.cjs +1 -1
  149. package/dist/lyra147.js +16 -11
  150. package/dist/lyra148.cjs +1 -1
  151. package/dist/lyra148.js +4 -2
  152. package/dist/lyra149.cjs +1 -1
  153. package/dist/lyra149.js +10 -5
  154. package/dist/lyra15.cjs +1 -1
  155. package/dist/lyra15.js +155 -36
  156. package/dist/lyra150.cjs +1 -1
  157. package/dist/lyra150.js +3 -19
  158. package/dist/lyra151.cjs +1 -1
  159. package/dist/lyra151.js +26 -118
  160. package/dist/lyra152.cjs +1 -1
  161. package/dist/lyra152.js +199 -26
  162. package/dist/lyra153.cjs +1 -1
  163. package/dist/lyra153.js +4 -62
  164. package/dist/lyra154.cjs +1 -1
  165. package/dist/lyra154.js +21 -34
  166. package/dist/lyra155.cjs +1 -1
  167. package/dist/lyra155.js +11 -15
  168. package/dist/lyra156.cjs +1 -1
  169. package/dist/lyra156.js +3 -40
  170. package/dist/lyra157.cjs +1 -1
  171. package/dist/lyra157.js +26 -2
  172. package/dist/lyra158.cjs +1 -1
  173. package/dist/lyra158.js +4 -3
  174. package/dist/lyra159.cjs +1 -1
  175. package/dist/lyra159.js +4 -10
  176. package/dist/lyra16.cjs +1 -1
  177. package/dist/lyra16.js +117 -105
  178. package/dist/lyra160.cjs +1 -1
  179. package/dist/lyra160.js +25 -10
  180. package/dist/lyra161.cjs +1 -1
  181. package/dist/lyra161.js +11 -9
  182. package/dist/lyra162.cjs +1 -1
  183. package/dist/lyra162.js +2 -17
  184. package/dist/lyra163.cjs +1 -1
  185. package/dist/lyra163.js +6 -10
  186. package/dist/lyra164.cjs +1 -1
  187. package/dist/lyra164.js +19 -14
  188. package/dist/lyra165.cjs +1 -1
  189. package/dist/lyra165.js +115 -61
  190. package/dist/lyra166.cjs +1 -1
  191. package/dist/lyra166.js +28 -4
  192. package/dist/lyra167.cjs +1 -1
  193. package/dist/lyra167.js +63 -2
  194. package/dist/lyra168.cjs +1 -1
  195. package/dist/lyra168.js +34 -15
  196. package/dist/lyra169.cjs +1 -1
  197. package/dist/lyra169.js +14 -15
  198. package/dist/lyra17.cjs +1 -1
  199. package/dist/lyra17.js +61 -56
  200. package/dist/lyra170.cjs +1 -1
  201. package/dist/lyra170.js +41 -4
  202. package/dist/lyra171.cjs +1 -1
  203. package/dist/lyra171.js +2 -2
  204. package/dist/lyra172.cjs +1 -1
  205. package/dist/lyra172.js +3 -7
  206. package/dist/lyra173.cjs +1 -1
  207. package/dist/lyra173.js +10 -52
  208. package/dist/lyra174.cjs +1 -1
  209. package/dist/lyra174.js +10 -17
  210. package/dist/lyra175.cjs +1 -1
  211. package/dist/lyra175.js +8 -8
  212. package/dist/lyra176.cjs +1 -1
  213. package/dist/lyra176.js +17 -2
  214. package/dist/lyra177.cjs +1 -1
  215. package/dist/lyra177.js +9 -5
  216. package/dist/lyra178.cjs +1 -1
  217. package/dist/lyra178.js +14 -4
  218. package/dist/lyra179.cjs +1 -1
  219. package/dist/lyra179.js +65 -2
  220. package/dist/lyra18.cjs +1 -1
  221. package/dist/lyra18.js +74 -13
  222. package/dist/lyra180.cjs +1 -1
  223. package/dist/lyra180.js +4 -2
  224. package/dist/lyra181.cjs +1 -1
  225. package/dist/lyra181.js +2 -5
  226. package/dist/lyra182.cjs +1 -1
  227. package/dist/lyra182.js +15 -3
  228. package/dist/lyra183.cjs +1 -1
  229. package/dist/lyra183.js +16 -7
  230. package/dist/lyra184.cjs +1 -1
  231. package/dist/lyra184.js +4 -16
  232. package/dist/lyra185.cjs +1 -1
  233. package/dist/lyra185.js +2 -2
  234. package/dist/lyra186.cjs +1 -1
  235. package/dist/lyra186.js +7 -2
  236. package/dist/lyra187.cjs +1 -1
  237. package/dist/lyra187.js +53 -6
  238. package/dist/lyra188.cjs +1 -1
  239. package/dist/lyra188.js +17 -5
  240. package/dist/lyra189.cjs +1 -1
  241. package/dist/lyra189.js +8 -8
  242. package/dist/lyra19.cjs +1 -1
  243. package/dist/lyra19.js +17 -24
  244. package/dist/lyra190.cjs +1 -1
  245. package/dist/lyra190.js +2 -7
  246. package/dist/lyra191.cjs +1 -1
  247. package/dist/lyra191.js +5 -21
  248. package/dist/lyra192.cjs +1 -1
  249. package/dist/lyra192.js +3 -32
  250. package/dist/lyra193.cjs +1 -1
  251. package/dist/lyra193.js +2 -36
  252. package/dist/lyra194.cjs +1 -1
  253. package/dist/lyra194.js +2 -30
  254. package/dist/lyra195.cjs +1 -1
  255. package/dist/lyra195.js +5 -23
  256. package/dist/lyra196.cjs +1 -1
  257. package/dist/lyra196.js +3 -50
  258. package/dist/lyra197.cjs +1 -1
  259. package/dist/lyra197.js +7 -2
  260. package/dist/lyra198.cjs +1 -1
  261. package/dist/lyra198.js +16 -2
  262. package/dist/lyra199.cjs +1 -1
  263. package/dist/lyra199.js +2 -8
  264. package/dist/lyra2.cjs +1 -1
  265. package/dist/lyra2.js +120 -28
  266. package/dist/lyra20.cjs +1 -1
  267. package/dist/lyra20.js +38 -42
  268. package/dist/lyra200.cjs +1 -1
  269. package/dist/lyra200.js +2 -6
  270. package/dist/lyra201.cjs +1 -1
  271. package/dist/lyra201.js +6 -33
  272. package/dist/lyra202.cjs +1 -1
  273. package/dist/lyra202.js +5 -18
  274. package/dist/lyra203.cjs +1 -1
  275. package/dist/lyra203.js +7 -45
  276. package/dist/lyra204.cjs +1 -1
  277. package/dist/lyra204.js +6 -3
  278. package/dist/lyra205.cjs +1 -1
  279. package/dist/lyra205.js +21 -5
  280. package/dist/lyra206.cjs +1 -1
  281. package/dist/lyra206.js +32 -30
  282. package/dist/lyra207.cjs +1 -1
  283. package/dist/lyra207.js +35 -5
  284. package/dist/lyra208.cjs +1 -1
  285. package/dist/lyra208.js +29 -3
  286. package/dist/lyra209.cjs +1 -1
  287. package/dist/lyra209.js +22 -11
  288. package/dist/lyra21.cjs +1 -1
  289. package/dist/lyra21.js +110 -94
  290. package/dist/lyra210.cjs +1 -1
  291. package/dist/lyra210.js +50 -2
  292. package/dist/lyra211.cjs +1 -1
  293. package/dist/lyra211.js +2 -98
  294. package/dist/lyra212.cjs +1 -1
  295. package/dist/lyra212.js +2 -26
  296. package/dist/lyra213.cjs +1 -1
  297. package/dist/lyra213.js +7 -38
  298. package/dist/lyra214.cjs +1 -9
  299. package/dist/lyra214.js +6 -48
  300. package/dist/lyra215.cjs +1 -9
  301. package/dist/lyra215.js +32 -82
  302. package/dist/lyra216.cjs +1 -1
  303. package/dist/lyra216.js +17 -21
  304. package/dist/lyra217.cjs +1 -1
  305. package/dist/lyra217.js +45 -18
  306. package/dist/lyra218.cjs +1 -1
  307. package/dist/lyra218.js +4 -26
  308. package/dist/lyra219.cjs +1 -1
  309. package/dist/lyra219.js +6 -10
  310. package/dist/lyra22.cjs +1 -1
  311. package/dist/lyra22.js +59 -35
  312. package/dist/lyra220.cjs +1 -1
  313. package/dist/lyra220.js +27 -20
  314. package/dist/lyra221.cjs +1 -1
  315. package/dist/lyra221.js +5 -25
  316. package/dist/lyra222.cjs +1 -1
  317. package/dist/lyra222.js +3 -70
  318. package/dist/lyra223.cjs +1 -1
  319. package/dist/lyra223.js +11 -41
  320. package/dist/lyra224.cjs +1 -1
  321. package/dist/lyra224.js +2 -16
  322. package/dist/lyra225.cjs +1 -1
  323. package/dist/lyra225.js +15 -36
  324. package/dist/lyra226.cjs +1 -1
  325. package/dist/lyra226.js +16 -71
  326. package/dist/lyra227.cjs +1 -1
  327. package/dist/lyra227.js +989 -21
  328. package/dist/lyra228.cjs +1 -1
  329. package/dist/lyra228.js +2 -44
  330. package/dist/lyra229.cjs +1 -1
  331. package/dist/lyra229.js +2 -41
  332. package/dist/lyra23.cjs +1 -1
  333. package/dist/lyra23.js +12 -389
  334. package/dist/lyra230.cjs +1 -9
  335. package/dist/lyra230.js +2 -47
  336. package/dist/lyra231.cjs +9 -1
  337. package/dist/lyra231.js +48 -2
  338. package/dist/lyra232.cjs +9 -1
  339. package/dist/lyra232.js +82 -41
  340. package/dist/lyra233.cjs +1 -1
  341. package/dist/lyra233.js +21 -12
  342. package/dist/lyra234.cjs +1 -1
  343. package/dist/lyra234.js +20 -4
  344. package/dist/lyra235.cjs +1 -1
  345. package/dist/lyra235.js +25 -583
  346. package/dist/lyra236.cjs +1 -1
  347. package/dist/lyra236.js +10 -11
  348. package/dist/lyra237.cjs +1 -1
  349. package/dist/lyra237.js +23 -13
  350. package/dist/lyra238.cjs +1 -1
  351. package/dist/lyra238.js +26 -2
  352. package/dist/lyra239.cjs +1 -1
  353. package/dist/lyra239.js +71 -29
  354. package/dist/lyra24.cjs +1 -1
  355. package/dist/lyra24.js +26 -8
  356. package/dist/lyra240.cjs +1 -1
  357. package/dist/lyra240.js +41 -5
  358. package/dist/lyra241.cjs +1 -1
  359. package/dist/lyra241.js +15 -3
  360. package/dist/lyra242.cjs +1 -1
  361. package/dist/lyra242.js +36 -14
  362. package/dist/lyra243.cjs +1 -1
  363. package/dist/lyra243.js +68 -21
  364. package/dist/lyra244.cjs +1 -1
  365. package/dist/lyra244.js +23 -8
  366. package/dist/lyra245.cjs +1 -1
  367. package/dist/lyra245.js +38 -108
  368. package/dist/lyra246.cjs +1 -1
  369. package/dist/lyra246.js +38 -5
  370. package/dist/lyra247.cjs +9 -1
  371. package/dist/lyra247.js +46 -21
  372. package/dist/lyra248.cjs +1 -1
  373. package/dist/lyra248.js +2 -22
  374. package/dist/lyra249.cjs +1 -1
  375. package/dist/lyra249.js +42 -7
  376. package/dist/lyra25.cjs +1 -1
  377. package/dist/lyra25.js +13 -12
  378. package/dist/lyra250.cjs +1 -1
  379. package/dist/lyra250.js +13 -2
  380. package/dist/lyra251.cjs +1 -1
  381. package/dist/lyra251.js +4 -20
  382. package/dist/lyra252.cjs +1 -1
  383. package/dist/lyra252.js +584 -2
  384. package/dist/lyra253.cjs +1 -1
  385. package/dist/lyra253.js +11 -19
  386. package/dist/lyra254.cjs +1 -1
  387. package/dist/lyra254.js +14 -2
  388. package/dist/lyra255.cjs +1 -1
  389. package/dist/lyra255.js +15 -2
  390. package/dist/lyra256.cjs +1 -1
  391. package/dist/lyra256.js +22 -12
  392. package/dist/lyra257.cjs +1 -1
  393. package/dist/lyra257.js +2 -19
  394. package/dist/lyra258.cjs +1 -1
  395. package/dist/lyra258.js +28 -13
  396. package/dist/lyra259.cjs +1 -1
  397. package/dist/lyra259.js +6 -28
  398. package/dist/lyra26.cjs +1 -1
  399. package/dist/lyra26.js +44 -8
  400. package/dist/lyra260.cjs +1 -1
  401. package/dist/lyra260.js +3 -24
  402. package/dist/lyra261.cjs +1 -1
  403. package/dist/lyra261.js +7 -19
  404. package/dist/lyra262.cjs +1 -1
  405. package/dist/lyra262.js +19 -8
  406. package/dist/lyra263.cjs +1 -1
  407. package/dist/lyra263.js +112 -11
  408. package/dist/lyra264.cjs +1 -1
  409. package/dist/lyra264.js +8 -6
  410. package/dist/lyra265.cjs +1 -1
  411. package/dist/lyra265.js +21 -23
  412. package/dist/lyra266.cjs +1 -1
  413. package/dist/lyra266.js +22 -2
  414. package/dist/lyra267.cjs +1 -1
  415. package/dist/lyra267.js +7 -9
  416. package/dist/lyra268.cjs +1 -1
  417. package/dist/lyra268.js +2 -7
  418. package/dist/lyra269.cjs +1 -1
  419. package/dist/lyra269.js +2 -232
  420. package/dist/lyra27.cjs +1 -1
  421. package/dist/lyra27.js +94 -7
  422. package/dist/lyra270.cjs +1 -1
  423. package/dist/lyra270.js +2 -81
  424. package/dist/lyra271.cjs +1 -1
  425. package/dist/lyra271.js +28 -28
  426. package/dist/lyra272.cjs +1 -1
  427. package/dist/lyra272.js +24 -5
  428. package/dist/lyra273.cjs +1 -1
  429. package/dist/lyra273.js +19 -10
  430. package/dist/lyra274.cjs +1 -1
  431. package/dist/lyra274.js +8 -27
  432. package/dist/lyra275.cjs +1 -1
  433. package/dist/lyra275.js +13 -26
  434. package/dist/lyra276.cjs +1 -1
  435. package/dist/lyra276.js +6 -97
  436. package/dist/lyra277.cjs +1 -1
  437. package/dist/lyra277.js +23 -21
  438. package/dist/lyra278.cjs +1 -1
  439. package/dist/lyra278.js +2 -20
  440. package/dist/lyra279.cjs +1 -1
  441. package/dist/lyra279.js +9 -5
  442. package/dist/lyra28.cjs +1 -1
  443. package/dist/lyra28.js +34 -164
  444. package/dist/lyra280.cjs +1 -1
  445. package/dist/lyra280.js +7 -20
  446. package/dist/lyra281.cjs +1 -1
  447. package/dist/lyra281.js +2 -8
  448. package/dist/lyra282.cjs +1 -1
  449. package/dist/lyra282.js +17 -28
  450. package/dist/lyra283.cjs +1 -1
  451. package/dist/lyra283.js +230 -6
  452. package/dist/lyra284.cjs +1 -1
  453. package/dist/lyra284.js +74 -46
  454. package/dist/lyra285.cjs +1 -1
  455. package/dist/lyra285.js +13 -23
  456. package/dist/lyra286.cjs +1 -1
  457. package/dist/lyra286.js +18 -15
  458. package/dist/lyra287.cjs +1 -1
  459. package/dist/lyra287.js +13 -55
  460. package/dist/lyra288.cjs +1 -1
  461. package/dist/lyra288.js +26 -9
  462. package/dist/lyra289.cjs +1 -1
  463. package/dist/lyra289.js +5 -3
  464. package/dist/lyra29.cjs +1 -1
  465. package/dist/lyra29.js +390 -6
  466. package/dist/lyra290.cjs +1 -1
  467. package/dist/lyra290.js +9 -16
  468. package/dist/lyra291.cjs +1 -1
  469. package/dist/lyra291.js +27 -3
  470. package/dist/lyra292.cjs +1 -1
  471. package/dist/lyra292.js +26 -4
  472. package/dist/lyra293.cjs +1 -1
  473. package/dist/lyra293.js +95 -8
  474. package/dist/lyra294.cjs +1 -1
  475. package/dist/lyra294.js +22 -2
  476. package/dist/lyra295.cjs +1 -1
  477. package/dist/lyra295.js +20 -12
  478. package/dist/lyra296.cjs +1 -1
  479. package/dist/lyra296.js +5 -5
  480. package/dist/lyra297.cjs +1 -1
  481. package/dist/lyra297.js +20 -70
  482. package/dist/lyra298.cjs +1 -1
  483. package/dist/lyra298.js +7 -5
  484. package/dist/lyra299.cjs +1 -1
  485. package/dist/lyra299.js +28 -7
  486. package/dist/lyra3.cjs +1 -1
  487. package/dist/lyra3.js +52 -41
  488. package/dist/lyra30.cjs +1 -1
  489. package/dist/lyra30.js +8 -72
  490. package/dist/lyra300.cjs +1 -1
  491. package/dist/lyra300.js +7 -15
  492. package/dist/lyra301.cjs +1 -1
  493. package/dist/lyra301.js +52 -64
  494. package/dist/lyra302.cjs +1 -1
  495. package/dist/lyra302.js +20 -20
  496. package/dist/lyra303.cjs +1 -1
  497. package/dist/lyra303.js +16 -2
  498. package/dist/lyra304.cjs +1 -1
  499. package/dist/lyra304.js +56 -7
  500. package/dist/lyra305.cjs +1 -1
  501. package/dist/lyra305.js +11 -6
  502. package/dist/lyra306.cjs +1 -1
  503. package/dist/lyra306.js +3 -4
  504. package/dist/lyra307.cjs +1 -1
  505. package/dist/lyra307.js +17 -7
  506. package/dist/lyra308.cjs +1 -1
  507. package/dist/lyra308.js +4 -6
  508. package/dist/lyra309.cjs +1 -1
  509. package/dist/lyra309.js +3 -40
  510. package/dist/lyra31.cjs +1 -1
  511. package/dist/lyra31.js +13 -121
  512. package/dist/lyra310.cjs +1 -1
  513. package/dist/lyra310.js +2 -95
  514. package/dist/lyra311.cjs +1 -0
  515. package/dist/lyra311.js +12 -0
  516. package/dist/lyra312.cjs +1 -0
  517. package/dist/lyra312.js +14 -0
  518. package/dist/lyra313.cjs +1 -0
  519. package/dist/lyra313.js +7 -0
  520. package/dist/lyra314.cjs +1 -0
  521. package/dist/lyra314.js +72 -0
  522. package/dist/lyra315.cjs +1 -0
  523. package/dist/lyra315.js +8 -0
  524. package/dist/lyra316.cjs +1 -0
  525. package/dist/lyra316.js +11 -0
  526. package/dist/lyra317.cjs +1 -0
  527. package/dist/lyra317.js +18 -0
  528. package/dist/lyra318.cjs +1 -0
  529. package/dist/lyra318.js +67 -0
  530. package/dist/lyra319.cjs +1 -0
  531. package/dist/lyra319.js +25 -0
  532. package/dist/lyra32.cjs +1 -1
  533. package/dist/lyra32.js +6 -4
  534. package/dist/lyra320.cjs +1 -0
  535. package/dist/lyra320.js +4 -0
  536. package/dist/lyra321.cjs +1 -0
  537. package/dist/lyra321.js +9 -0
  538. package/dist/lyra322.cjs +1 -0
  539. package/dist/lyra322.js +8 -0
  540. package/dist/lyra323.cjs +1 -0
  541. package/dist/lyra323.js +7 -0
  542. package/dist/lyra324.cjs +1 -0
  543. package/dist/lyra324.js +10 -0
  544. package/dist/lyra325.cjs +1 -0
  545. package/dist/lyra325.js +8 -0
  546. package/dist/lyra326.cjs +1 -0
  547. package/dist/lyra326.js +43 -0
  548. package/dist/lyra327.cjs +1 -0
  549. package/dist/lyra327.js +97 -0
  550. package/dist/lyra33.cjs +1 -1
  551. package/dist/lyra33.js +4 -2
  552. package/dist/lyra34.cjs +1 -1
  553. package/dist/lyra34.js +8 -4
  554. package/dist/lyra35.cjs +1 -1
  555. package/dist/lyra35.js +7 -39
  556. package/dist/lyra36.cjs +1 -1
  557. package/dist/lyra36.js +166 -2
  558. package/dist/lyra37.cjs +1 -1
  559. package/dist/lyra37.js +60 -434
  560. package/dist/lyra38.cjs +1 -1
  561. package/dist/lyra38.js +115 -76
  562. package/dist/lyra39.cjs +1 -1
  563. package/dist/lyra39.js +447 -36
  564. package/dist/lyra4.cjs +1 -1
  565. package/dist/lyra4.js +28 -120
  566. package/dist/lyra40.cjs +1 -1
  567. package/dist/lyra40.js +66 -641
  568. package/dist/lyra41.cjs +1 -1
  569. package/dist/lyra41.js +43 -12
  570. package/dist/lyra42.cjs +1 -1
  571. package/dist/lyra42.js +685 -12
  572. package/dist/lyra43.cjs +1 -1
  573. package/dist/lyra43.js +37 -482
  574. package/dist/lyra44.cjs +1 -1
  575. package/dist/lyra44.js +11 -65
  576. package/dist/lyra45.cjs +1 -1
  577. package/dist/lyra45.js +484 -14
  578. package/dist/lyra46.cjs +1 -1
  579. package/dist/lyra46.js +59 -229
  580. package/dist/lyra47.cjs +1 -1
  581. package/dist/lyra47.js +14 -2
  582. package/dist/lyra48.cjs +1 -1
  583. package/dist/lyra48.js +249 -2
  584. package/dist/lyra49.cjs +1 -1
  585. package/dist/lyra49.js +2 -492
  586. package/dist/lyra5.cjs +1 -1
  587. package/dist/lyra5.js +41 -52
  588. package/dist/lyra52.cjs +1 -1
  589. package/dist/lyra52.js +2 -32
  590. package/dist/lyra53.cjs +1 -1
  591. package/dist/lyra53.js +1394 -2
  592. package/dist/lyra54.cjs +1 -1
  593. package/dist/lyra54.js +2 -13
  594. package/dist/lyra55.cjs +1 -1
  595. package/dist/lyra55.js +2 -30
  596. package/dist/lyra56.cjs +1 -1
  597. package/dist/lyra56.js +34 -20
  598. package/dist/lyra57.cjs +1 -1
  599. package/dist/lyra57.js +2 -2
  600. package/dist/lyra58.cjs +1 -1
  601. package/dist/lyra58.js +2 -2
  602. package/dist/lyra59.cjs +1 -9
  603. package/dist/lyra59.js +12 -29
  604. package/dist/lyra6.cjs +1 -1
  605. package/dist/lyra6.js +2 -2
  606. package/dist/lyra60.cjs +1 -19
  607. package/dist/lyra60.js +30 -599
  608. package/dist/lyra61.cjs +1 -1
  609. package/dist/lyra61.js +6 -21
  610. package/dist/lyra62.cjs +1 -1
  611. package/dist/lyra62.js +2 -2
  612. package/dist/lyra63.cjs +9 -1
  613. package/dist/lyra63.js +30 -2
  614. package/dist/lyra64.cjs +19 -1
  615. package/dist/lyra64.js +599 -2
  616. package/dist/lyra65.cjs +1 -1
  617. package/dist/lyra65.js +13 -21
  618. package/dist/lyra67.cjs +1 -1
  619. package/dist/lyra67.js +3 -3
  620. package/dist/lyra68.cjs +1 -1
  621. package/dist/lyra68.js +44 -36
  622. package/dist/lyra69.cjs +1 -1
  623. package/dist/lyra69.js +128 -810
  624. package/dist/lyra7.cjs +1 -1
  625. package/dist/lyra7.js +2 -2
  626. package/dist/lyra70.cjs +1 -1
  627. package/dist/lyra70.js +438 -42
  628. package/dist/lyra71.cjs +1 -1
  629. package/dist/lyra71.js +226 -34
  630. package/dist/lyra72.cjs +1 -1
  631. package/dist/lyra72.js +807 -24
  632. package/dist/lyra73.cjs +1 -1
  633. package/dist/lyra73.js +371 -30
  634. package/dist/lyra74.cjs +1 -1
  635. package/dist/lyra74.js +105 -425
  636. package/dist/lyra75.cjs +1 -1
  637. package/dist/lyra75.js +267 -50
  638. package/dist/lyra76.cjs +1 -1
  639. package/dist/lyra76.js +33 -63
  640. package/dist/lyra77.cjs +1 -1
  641. package/dist/lyra77.js +41 -18
  642. package/dist/lyra78.cjs +1 -1
  643. package/dist/lyra78.js +32 -325
  644. package/dist/lyra79.cjs +1 -1
  645. package/dist/lyra79.js +143 -11
  646. package/dist/lyra8.cjs +1 -1
  647. package/dist/lyra8.js +6 -6
  648. package/dist/lyra80.cjs +1 -1
  649. package/dist/lyra80.js +14 -23
  650. package/dist/lyra81.cjs +1 -1
  651. package/dist/lyra81.js +65 -8
  652. package/dist/lyra82.cjs +1 -1
  653. package/dist/lyra82.js +19 -38
  654. package/dist/lyra83.cjs +1 -1
  655. package/dist/lyra83.js +12 -1997
  656. package/dist/lyra84.cjs +1 -1
  657. package/dist/lyra84.js +23 -5
  658. package/dist/lyra85.cjs +1 -1
  659. package/dist/lyra85.js +10 -71
  660. package/dist/lyra86.cjs +1 -1
  661. package/dist/lyra86.js +40 -16
  662. package/dist/lyra87.cjs +1 -1
  663. package/dist/lyra87.js +1997 -990
  664. package/dist/lyra88.cjs +1 -1
  665. package/dist/lyra88.js +7 -2
  666. package/dist/lyra89.cjs +1 -1
  667. package/dist/lyra89.js +71 -124
  668. package/dist/lyra9.cjs +1 -1
  669. package/dist/lyra9.js +2 -2
  670. package/dist/lyra90.cjs +1 -1
  671. package/dist/lyra90.js +2 -62
  672. package/dist/lyra91.cjs +1 -1
  673. package/dist/lyra91.js +4 -3
  674. package/dist/lyra92.cjs +1 -1
  675. package/dist/lyra92.js +21 -29
  676. package/dist/lyra93.cjs +1 -1
  677. package/dist/lyra93.js +2 -36
  678. package/dist/lyra94.cjs +1 -1
  679. package/dist/lyra94.js +327 -3
  680. package/dist/lyra95.cjs +1 -1
  681. package/dist/lyra95.js +28 -4
  682. package/dist/lyra96.cjs +1 -1
  683. package/dist/lyra96.js +2 -18
  684. package/dist/lyra97.cjs +1 -1
  685. package/dist/lyra97.js +42 -13
  686. package/dist/lyra98.cjs +1 -1
  687. package/dist/lyra98.js +240 -17
  688. package/dist/lyra99.cjs +1 -1
  689. package/dist/lyra99.js +61 -10
  690. package/dist/provider.d.ts.map +1 -1
  691. package/dist/style.css +1 -1
  692. package/package.json +1 -1
package/dist/lyra282.js CHANGED
@@ -1,32 +1,21 @@
1
- import { circOut as R } from "./lyra187.js";
2
- import { progress as h } from "./lyra181.js";
3
- import { mix as f } from "./lyra179.js";
4
- import { noop as B } from "./lyra167.js";
5
- import { percent as p, px as L } from "./lyra169.js";
6
- const a = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], M = a.length, u = (t) => typeof t == "string" ? parseFloat(t) : t, d = (t) => typeof t == "number" || L.test(t);
7
- function $(t, i, o, n, x, b) {
8
- x ? (t.opacity = f(
9
- 0,
10
- // TODO Reinstate this if only child
11
- o.opacity !== void 0 ? o.opacity : 1,
12
- C(n)
13
- ), t.opacityExit = f(i.opacity !== void 0 ? i.opacity : 1, 0, O(n))) : b && (t.opacity = f(i.opacity !== void 0 ? i.opacity : 1, o.opacity !== void 0 ? o.opacity : 1, n));
14
- for (let s = 0; s < M; s++) {
15
- const c = `border${a[s]}Radius`;
16
- let r = m(i, c), e = m(o, c);
17
- if (r === void 0 && e === void 0)
18
- continue;
19
- r || (r = 0), e || (e = 0), r === 0 || e === 0 || d(r) === d(e) ? (t[c] = Math.max(f(u(r), u(e), n), 0), (p.test(e) || p.test(r)) && (t[c] += "%")) : t[c] = e;
20
- }
21
- (i.rotate || o.rotate) && (t.rotate = f(i.rotate || 0, o.rotate || 0, n));
22
- }
23
- function m(t, i) {
24
- return t[i] !== void 0 ? t[i] : t.borderRadius;
1
+ const c = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), a = (e) => {
2
+ const r = c.get(e.target);
3
+ r && r(e);
4
+ }, b = (e) => {
5
+ e.forEach(a);
6
+ };
7
+ function i({ root: e, ...r }) {
8
+ const t = e || document;
9
+ n.has(t) || n.set(t, {});
10
+ const s = n.get(t), o = JSON.stringify(r);
11
+ return s[o] || (s[o] = new IntersectionObserver(b, { root: e, ...r })), s[o];
25
12
  }
26
- const C = y(0, 0.5, R), O = y(0.5, 0.95, B);
27
- function y(t, i, o) {
28
- return (n) => n < t ? 0 : n > i ? 1 : o(h(t, i, n));
13
+ function v(e, r, t) {
14
+ const s = i(r);
15
+ return c.set(e, t), s.observe(e), () => {
16
+ c.delete(e), s.unobserve(e);
17
+ };
29
18
  }
30
19
  export {
31
- $ as mixValues
20
+ v as observeIntersection
32
21
  };
package/dist/lyra283.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(o,t){o.min=t.min,o.max=t.max}function c(o,t){n(o.x,t.x),n(o.y,t.y)}exports.copyAxisInto=n;exports.copyBoxInto=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./lyra123.cjs"),b=require("./lyra284.cjs"),M=require("./lyra220.cjs"),E=require("./lyra148.cjs"),S=require("./lyra221.cjs"),d=require("./lyra318.cjs"),q=require("./lyra147.cjs"),g=require("./lyra306.cjs"),j=require("./lyra290.cjs"),k=require("./lyra223.cjs"),D=require("./lyra319.cjs"),B=require("./lyra222.cjs"),R=require("./lyra215.cjs"),x=require("./lyra193.cjs"),G=require("./lyra183.cjs"),T=require("./lyra249.cjs"),y=require("./lyra146.cjs"),L=new WeakMap;class w{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=q.createBox(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const n=r=>{this.stopAnimation(),e&&this.snapToCursor(k.extractEventInfo(r,"page").point)},o=(r,l)=>{const{drag:c,dragPropagation:u,onDragStart:p}=this.getProps();if(c&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=M.getGlobalLock(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),g.eachAxis(h=>{let v=this.getAxisMotionValue(h).get()||0;if(G.percent.test(v)){const{projection:A}=this.visualElement;if(A&&A.layout){const C=A.layout.layoutBox[h];C&&(v=R.calcLength(C)*(parseFloat(v)/100))}}this.originPoint[h]=v}),p&&y.frame.update(()=>p(r,l),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(r,l)=>{const{dragPropagation:c,dragDirectionLock:u,onDirectionLock:p,onDrag:m}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=l;if(u&&this.currentDirection===null){this.currentDirection=O(h),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",l.point,h),this.updateAxis("y",l.point,h),this.visualElement.render(),m&&m(r,l)},a=(r,l)=>this.stop(r,l);this.panSession=new b.PanSession(t,{onSessionStart:n,onStart:o,onMove:i,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:n}=e;this.startAnimation(n);const{onDragEnd:o}=this.getProps();o&&y.frame.update(()=>o(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,s){const{drag:n}=this.getProps();if(!s||!P(t,n,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=d.applyConstraints(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:s}=this.visualElement.projection||{},n=this.constraints;t&&E.isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=d.calcRelativeConstraints(s.layoutBox,t):this.constraints=!1,this.elastic=d.resolveDragElastic(e),n!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&g.eachAxis(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=d.rebaseAxisConstraints(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!E.isRefObject(t))return!1;const s=t.current;V.invariant(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const o=j.measurePageBox(s,n.root,this.visualElement.getTransformPagePoint());let i=d.calcViewportConstraints(n.layout.layoutBox,o);if(e){const a=e(D.convertBoxToBoundingBox(i));this.hasMutatedConstraints=!!a,a&&(i=D.convertBoundingBoxToBox(a))}return i}startAnimation(t){const{drag:e,dragMomentum:s,dragElastic:n,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),r=this.constraints||{},l=g.eachAxis(c=>{if(!P(c,e,this.currentDirection))return;let u=r&&r[c]||{};i&&(u={min:0,max:0});const p=n?200:1e6,m=n?40:1e7,h={type:"inertia",velocity:s?t[c]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...u};return this.startAxisValueAnimation(c,h)});return Promise.all(l).then(a)}startAxisValueAnimation(t,e){const s=this.getAxisMotionValue(t);return s.start(T.animateMotionValue(t,s,0,e))}stopAnimation(){g.eachAxis(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),s=this.visualElement.getProps(),n=s[e];return n||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){g.eachAxis(e=>{const{drag:s}=this.getProps();if(!P(e,s,this.currentDirection))return;const{projection:n}=this.visualElement,o=this.getAxisMotionValue(e);if(n&&n.layout){const{min:i,max:a}=n.layout.layoutBox[e];o.set(t[e]-x.mix(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:s}=this.visualElement;if(!E.isRefObject(e)||!s||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};g.eachAxis(i=>{const a=this.getAxisMotionValue(i);if(a){const r=a.get();n[i]=d.calcOrigin({min:r,max:r},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),g.eachAxis(i=>{if(!P(i,t,null))return;const a=this.getAxisMotionValue(i),{min:r,max:l}=this.constraints[i];a.set(x.mix(r,l,n[i]))})}addListeners(){if(!this.visualElement.current)return;L.set(this.visualElement,this);const t=this.visualElement.current,e=S.addPointerEvent(t,"pointerdown",r=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(r)}),s=()=>{const{dragConstraints:r}=this.getProps();E.isRefObject(r)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,o=n.addEventListener("measure",s);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),s();const i=B.addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),a=n.addEventListener("didUpdate",({delta:r,hasLayoutChanged:l})=>{this.isDragging&&l&&(g.eachAxis(c=>{const u=this.getAxisMotionValue(c);u&&(this.originPoint[c]+=r[c].translate,u.set(u.get()+r[c].translate))}),this.visualElement.render())});return()=>{i(),e(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:s=!1,dragPropagation:n=!1,dragConstraints:o=!1,dragElastic:i=d.defaultElastic,dragMomentum:a=!0}=t;return{...t,drag:e,dragDirectionLock:s,dragPropagation:n,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function P(f,t,e){return(t===!0||t===f)&&(e===null||e===f)}function O(f,t=10){let e=null;return Math.abs(f.y)>t?e="y":Math.abs(f.x)>t&&(e="x"),e}exports.VisualElementDragControls=w;exports.elementDragControls=L;
package/dist/lyra283.js CHANGED
@@ -1,10 +1,234 @@
1
- function c(n, t) {
2
- n.min = t.min, n.max = t.max;
1
+ import { invariant as y } from "./lyra123.js";
2
+ import { PanSession as L } from "./lyra284.js";
3
+ import { getGlobalLock as x } from "./lyra220.js";
4
+ import { isRefObject as v } from "./lyra148.js";
5
+ import { addPointerEvent as M } from "./lyra221.js";
6
+ import { applyConstraints as V, calcRelativeConstraints as b, resolveDragElastic as S, calcViewportConstraints as B, rebaseAxisConstraints as k, calcOrigin as j, defaultElastic as G } from "./lyra318.js";
7
+ import { createBox as T } from "./lyra147.js";
8
+ import { eachAxis as g } from "./lyra306.js";
9
+ import { measurePageBox as w } from "./lyra290.js";
10
+ import { extractEventInfo as R } from "./lyra223.js";
11
+ import { convertBoxToBoundingBox as O, convertBoundingBoxToBox as U } from "./lyra319.js";
12
+ import { addDomEvent as W } from "./lyra222.js";
13
+ import { calcLength as z } from "./lyra215.js";
14
+ import { mix as D } from "./lyra193.js";
15
+ import { percent as I } from "./lyra183.js";
16
+ import { animateMotionValue as _ } from "./lyra249.js";
17
+ import { frame as A } from "./lyra146.js";
18
+ const F = /* @__PURE__ */ new WeakMap();
19
+ class ct {
20
+ constructor(t) {
21
+ this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = T(), this.visualElement = t;
22
+ }
23
+ start(t, { snapToCursor: n = !1 } = {}) {
24
+ const { presenceContext: s } = this.visualElement;
25
+ if (s && s.isPresent === !1)
26
+ return;
27
+ const i = (r) => {
28
+ this.stopAnimation(), n && this.snapToCursor(R(r, "page").point);
29
+ }, e = (r, l) => {
30
+ const { drag: c, dragPropagation: u, onDragStart: p } = this.getProps();
31
+ if (c && !u && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = x(c), !this.openGlobalLock))
32
+ return;
33
+ this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), g((h) => {
34
+ let d = this.getAxisMotionValue(h).get() || 0;
35
+ if (I.test(d)) {
36
+ const { projection: P } = this.visualElement;
37
+ if (P && P.layout) {
38
+ const C = P.layout.layoutBox[h];
39
+ C && (d = z(C) * (parseFloat(d) / 100));
40
+ }
41
+ }
42
+ this.originPoint[h] = d;
43
+ }), p && A.update(() => p(r, l), !1, !0);
44
+ const { animationState: m } = this.visualElement;
45
+ m && m.setActive("whileDrag", !0);
46
+ }, o = (r, l) => {
47
+ const { dragPropagation: c, dragDirectionLock: u, onDirectionLock: p, onDrag: m } = this.getProps();
48
+ if (!c && !this.openGlobalLock)
49
+ return;
50
+ const { offset: h } = l;
51
+ if (u && this.currentDirection === null) {
52
+ this.currentDirection = K(h), this.currentDirection !== null && p && p(this.currentDirection);
53
+ return;
54
+ }
55
+ this.updateAxis("x", l.point, h), this.updateAxis("y", l.point, h), this.visualElement.render(), m && m(r, l);
56
+ }, a = (r, l) => this.stop(r, l);
57
+ this.panSession = new L(t, {
58
+ onSessionStart: i,
59
+ onStart: e,
60
+ onMove: o,
61
+ onSessionEnd: a
62
+ }, { transformPagePoint: this.visualElement.getTransformPagePoint() });
63
+ }
64
+ stop(t, n) {
65
+ const s = this.isDragging;
66
+ if (this.cancel(), !s)
67
+ return;
68
+ const { velocity: i } = n;
69
+ this.startAnimation(i);
70
+ const { onDragEnd: e } = this.getProps();
71
+ e && A.update(() => e(t, n));
72
+ }
73
+ cancel() {
74
+ this.isDragging = !1;
75
+ const { projection: t, animationState: n } = this.visualElement;
76
+ t && (t.isAnimationBlocked = !1), this.panSession && this.panSession.end(), this.panSession = void 0;
77
+ const { dragPropagation: s } = this.getProps();
78
+ !s && this.openGlobalLock && (this.openGlobalLock(), this.openGlobalLock = null), n && n.setActive("whileDrag", !1);
79
+ }
80
+ updateAxis(t, n, s) {
81
+ const { drag: i } = this.getProps();
82
+ if (!s || !E(t, i, this.currentDirection))
83
+ return;
84
+ const e = this.getAxisMotionValue(t);
85
+ let o = this.originPoint[t] + s[t];
86
+ this.constraints && this.constraints[t] && (o = V(o, this.constraints[t], this.elastic[t])), e.set(o);
87
+ }
88
+ resolveConstraints() {
89
+ const { dragConstraints: t, dragElastic: n } = this.getProps(), { layout: s } = this.visualElement.projection || {}, i = this.constraints;
90
+ t && v(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && s ? this.constraints = b(s.layoutBox, t) : this.constraints = !1, this.elastic = S(n), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && g((e) => {
91
+ this.getAxisMotionValue(e) && (this.constraints[e] = k(s.layoutBox[e], this.constraints[e]));
92
+ });
93
+ }
94
+ resolveRefConstraints() {
95
+ const { dragConstraints: t, onMeasureDragConstraints: n } = this.getProps();
96
+ if (!t || !v(t))
97
+ return !1;
98
+ const s = t.current;
99
+ y(s !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
100
+ const { projection: i } = this.visualElement;
101
+ if (!i || !i.layout)
102
+ return !1;
103
+ const e = w(s, i.root, this.visualElement.getTransformPagePoint());
104
+ let o = B(i.layout.layoutBox, e);
105
+ if (n) {
106
+ const a = n(O(o));
107
+ this.hasMutatedConstraints = !!a, a && (o = U(a));
108
+ }
109
+ return o;
110
+ }
111
+ startAnimation(t) {
112
+ const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: e, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), r = this.constraints || {}, l = g((c) => {
113
+ if (!E(c, n, this.currentDirection))
114
+ return;
115
+ let u = r && r[c] || {};
116
+ o && (u = { min: 0, max: 0 });
117
+ const p = i ? 200 : 1e6, m = i ? 40 : 1e7, h = {
118
+ type: "inertia",
119
+ velocity: s ? t[c] : 0,
120
+ bounceStiffness: p,
121
+ bounceDamping: m,
122
+ timeConstant: 750,
123
+ restDelta: 1,
124
+ restSpeed: 10,
125
+ ...e,
126
+ ...u
127
+ };
128
+ return this.startAxisValueAnimation(c, h);
129
+ });
130
+ return Promise.all(l).then(a);
131
+ }
132
+ startAxisValueAnimation(t, n) {
133
+ const s = this.getAxisMotionValue(t);
134
+ return s.start(_(t, s, 0, n));
135
+ }
136
+ stopAnimation() {
137
+ g((t) => this.getAxisMotionValue(t).stop());
138
+ }
139
+ /**
140
+ * Drag works differently depending on which props are provided.
141
+ *
142
+ * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
143
+ * - Otherwise, we apply the delta to the x/y motion values.
144
+ */
145
+ getAxisMotionValue(t) {
146
+ const n = "_drag" + t.toUpperCase(), s = this.visualElement.getProps(), i = s[n];
147
+ return i || this.visualElement.getValue(t, (s.initial ? s.initial[t] : void 0) || 0);
148
+ }
149
+ snapToCursor(t) {
150
+ g((n) => {
151
+ const { drag: s } = this.getProps();
152
+ if (!E(n, s, this.currentDirection))
153
+ return;
154
+ const { projection: i } = this.visualElement, e = this.getAxisMotionValue(n);
155
+ if (i && i.layout) {
156
+ const { min: o, max: a } = i.layout.layoutBox[n];
157
+ e.set(t[n] - D(o, a, 0.5));
158
+ }
159
+ });
160
+ }
161
+ /**
162
+ * When the viewport resizes we want to check if the measured constraints
163
+ * have changed and, if so, reposition the element within those new constraints
164
+ * relative to where it was before the resize.
165
+ */
166
+ scalePositionWithinConstraints() {
167
+ if (!this.visualElement.current)
168
+ return;
169
+ const { drag: t, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
170
+ if (!v(n) || !s || !this.constraints)
171
+ return;
172
+ this.stopAnimation();
173
+ const i = { x: 0, y: 0 };
174
+ g((o) => {
175
+ const a = this.getAxisMotionValue(o);
176
+ if (a) {
177
+ const r = a.get();
178
+ i[o] = j({ min: r, max: r }, this.constraints[o]);
179
+ }
180
+ });
181
+ const { transformTemplate: e } = this.visualElement.getProps();
182
+ this.visualElement.current.style.transform = e ? e({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), g((o) => {
183
+ if (!E(o, t, null))
184
+ return;
185
+ const a = this.getAxisMotionValue(o), { min: r, max: l } = this.constraints[o];
186
+ a.set(D(r, l, i[o]));
187
+ });
188
+ }
189
+ addListeners() {
190
+ if (!this.visualElement.current)
191
+ return;
192
+ F.set(this.visualElement, this);
193
+ const t = this.visualElement.current, n = M(t, "pointerdown", (r) => {
194
+ const { drag: l, dragListener: c = !0 } = this.getProps();
195
+ l && c && this.start(r);
196
+ }), s = () => {
197
+ const { dragConstraints: r } = this.getProps();
198
+ v(r) && (this.constraints = this.resolveRefConstraints());
199
+ }, { projection: i } = this.visualElement, e = i.addEventListener("measure", s);
200
+ i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), s();
201
+ const o = W(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", ({ delta: r, hasLayoutChanged: l }) => {
202
+ this.isDragging && l && (g((c) => {
203
+ const u = this.getAxisMotionValue(c);
204
+ u && (this.originPoint[c] += r[c].translate, u.set(u.get() + r[c].translate));
205
+ }), this.visualElement.render());
206
+ });
207
+ return () => {
208
+ o(), n(), e(), a && a();
209
+ };
210
+ }
211
+ getProps() {
212
+ const t = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: e = !1, dragElastic: o = G, dragMomentum: a = !0 } = t;
213
+ return {
214
+ ...t,
215
+ drag: n,
216
+ dragDirectionLock: s,
217
+ dragPropagation: i,
218
+ dragConstraints: e,
219
+ dragElastic: o,
220
+ dragMomentum: a
221
+ };
222
+ }
3
223
  }
4
- function m(n, t) {
5
- c(n.x, t.x), c(n.y, t.y);
224
+ function E(f, t, n) {
225
+ return (t === !0 || t === f) && (n === null || n === f);
226
+ }
227
+ function K(f, t = 10) {
228
+ let n = null;
229
+ return Math.abs(f.y) > t ? n = "y" : Math.abs(f.x) > t && (n = "x"), n;
6
230
  }
7
231
  export {
8
- c as copyAxisInto,
9
- m as copyBoxInto
232
+ ct as VisualElementDragControls,
233
+ F as elementDragControls
10
234
  };
package/dist/lyra284.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./lyra179.cjs"),d=require("./lyra290.cjs");function u(n,t,e){const l=n-e,o=t*l;return e+o}function c(n,t,e,l,o){return o!==void 0&&(n=u(n,o,l)),u(n,e,l)+t}function a(n,t=0,e=1,l,o){n.min=c(n.min,t,e,l,o),n.max=c(n.max,t,e,l,o)}function x(n,{x:t,y:e}){a(n.x,t.translate,t.scale,t.originPoint),a(n.y,e.translate,e.scale,e.originPoint)}function g(n,t,e,l=!1){const o=e.length;if(!o)return;t.x=t.y=1;let i,s;for(let r=0;r<o;r++){i=e[r],s=i.projectionDelta;const f=i.instance;f&&f.style&&f.style.display==="contents"||(l&&i.options.layoutScroll&&i.scroll&&i!==i.root&&p(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,x(n,s)),l&&d.hasTransform(i.latestValues)&&p(n,i.latestValues))}t.x=m(t.x),t.y=m(t.y)}function m(n){return Number.isInteger(n)||n>1.0000000000001||n<.999999999999?n:1}function A(n,t){n.min=n.min+t,n.max=n.max+t}function y(n,t,[e,l,o]){const i=t[o]!==void 0?t[o]:.5,s=D.mix(n.min,n.max,i);a(n,t[e],t[l],s,t.scale)}const T=["x","scaleX","originX"],B=["y","scaleY","originY"];function p(n,t){y(n.x,t,T),y(n.y,t,B)}exports.applyAxisDelta=a;exports.applyBoxDelta=x;exports.applyPointDelta=c;exports.applyTreeDeltas=g;exports.scalePoint=u;exports.transformAxis=y;exports.transformBox=p;exports.translateAxis=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./lyra223.cjs"),E=require("./lyra146.cjs"),y=require("./lyra172.cjs"),d=require("./lyra221.cjs"),q=require("./lyra194.cjs"),w=require("./lyra204.cjs"),M=require("./lyra191.cjs"),D=require("./lyra224.cjs");class T{constructor(n,o,{transformPagePoint:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const e=v(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,l=w.distance2D(e.offset,{x:0,y:0})>=3;if(!h&&!l)return;const{point:c}=e,{timestamp:u}=M.frameData;this.history.push({...c,timestamp:u});const{onStart:m,onMove:p}=this.handlers;h||(m&&m(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,e)},this.handlePointerMove=(e,h)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=f(h,this.transformPagePoint),E.frame.update(this.updatePoint,!0)},this.handlePointerUp=(e,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:l,onSessionEnd:c}=this.handlers,u=v(e.type==="pointercancel"?this.lastMoveEventInfo:f(h,this.transformPagePoint),this.history);this.startEvent&&l&&l(e,u),c&&c(e,u)},!D.isPrimaryPointer(n))return;this.handlers=o,this.transformPagePoint=i;const r=S.extractEventInfo(n),a=f(r,this.transformPagePoint),{point:s}=a,{timestamp:g}=M.frameData;this.history=[{...s,timestamp:g}];const{onSessionStart:P}=o;P&&P(n,v(a,this.history)),this.removeListeners=q.pipe(d.addPointerEvent(window,"pointermove",this.handlePointerMove),d.addPointerEvent(window,"pointerup",this.handlePointerUp),d.addPointerEvent(window,"pointercancel",this.handlePointerUp))}updateHandlers(n){this.handlers=n}end(){this.removeListeners&&this.removeListeners(),E.cancelFrame(this.updatePoint)}}function f(t,n){return n?{point:n(t.point)}:t}function x(t,n){return{x:t.x-n.x,y:t.y-n.y}}function v({point:t},n){return{point:t,delta:x(t,I(n)),offset:x(t,b(n)),velocity:L(n,.1)}}function b(t){return t[0]}function I(t){return t[t.length-1]}function L(t,n){if(t.length<2)return{x:0,y:0};let o=t.length-1,i=null;const r=I(t);for(;o>=0&&(i=t[o],!(r.timestamp-i.timestamp>y.secondsToMilliseconds(n)));)o--;if(!i)return{x:0,y:0};const a=y.millisecondsToSeconds(r.timestamp-i.timestamp);if(a===0)return{x:0,y:0};const s={x:(r.x-i.x)/a,y:(r.y-i.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}exports.PanSession=T;
package/dist/lyra284.js CHANGED
@@ -1,55 +1,83 @@
1
- import { mix as x } from "./lyra179.js";
2
- import { hasTransform as d } from "./lyra290.js";
3
- function r(n, t, o) {
4
- const e = n - o, i = t * e;
5
- return o + i;
6
- }
7
- function y(n, t, o, e, i) {
8
- return i !== void 0 && (n = r(n, i, e)), r(n, o, e) + t;
9
- }
10
- function c(n, t = 0, o = 1, e, i) {
11
- n.min = y(n.min, t, o, e, i), n.max = y(n.max, t, o, e, i);
1
+ import { extractEventInfo as I } from "./lyra223.js";
2
+ import { frame as g, cancelFrame as w } from "./lyra146.js";
3
+ import { secondsToMilliseconds as S, millisecondsToSeconds as D } from "./lyra172.js";
4
+ import { addPointerEvent as m } from "./lyra221.js";
5
+ import { pipe as L } from "./lyra194.js";
6
+ import { distance2D as T } from "./lyra204.js";
7
+ import { frameData as E } from "./lyra191.js";
8
+ import { isPrimaryPointer as U } from "./lyra224.js";
9
+ class C {
10
+ constructor(n, o, { transformPagePoint: e } = {}) {
11
+ if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.updatePoint = () => {
12
+ if (!(this.lastMoveEvent && this.lastMoveEventInfo))
13
+ return;
14
+ const i = p(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, l = T(i.offset, { x: 0, y: 0 }) >= 3;
15
+ if (!h && !l)
16
+ return;
17
+ const { point: f } = i, { timestamp: c } = E;
18
+ this.history.push({ ...f, timestamp: c });
19
+ const { onStart: d, onMove: P } = this.handlers;
20
+ h || (d && d(this.lastMoveEvent, i), this.startEvent = this.lastMoveEvent), P && P(this.lastMoveEvent, i);
21
+ }, this.handlePointerMove = (i, h) => {
22
+ this.lastMoveEvent = i, this.lastMoveEventInfo = v(h, this.transformPagePoint), g.update(this.updatePoint, !0);
23
+ }, this.handlePointerUp = (i, h) => {
24
+ if (this.end(), !(this.lastMoveEvent && this.lastMoveEventInfo))
25
+ return;
26
+ const { onEnd: l, onSessionEnd: f } = this.handlers, c = p(i.type === "pointercancel" ? this.lastMoveEventInfo : v(h, this.transformPagePoint), this.history);
27
+ this.startEvent && l && l(i, c), f && f(i, c);
28
+ }, !U(n))
29
+ return;
30
+ this.handlers = o, this.transformPagePoint = e;
31
+ const r = I(n), a = v(r, this.transformPagePoint), { point: s } = a, { timestamp: x } = E;
32
+ this.history = [{ ...s, timestamp: x }];
33
+ const { onSessionStart: u } = o;
34
+ u && u(n, p(a, this.history)), this.removeListeners = L(m(window, "pointermove", this.handlePointerMove), m(window, "pointerup", this.handlePointerUp), m(window, "pointercancel", this.handlePointerUp));
35
+ }
36
+ updateHandlers(n) {
37
+ this.handlers = n;
38
+ }
39
+ end() {
40
+ this.removeListeners && this.removeListeners(), w(this.updatePoint);
41
+ }
12
42
  }
13
- function g(n, { x: t, y: o }) {
14
- c(n.x, t.translate, t.scale, t.originPoint), c(n.y, o.translate, o.scale, o.originPoint);
43
+ function v(t, n) {
44
+ return n ? { point: n(t.point) } : t;
15
45
  }
16
- function T(n, t, o, e = !1) {
17
- const i = o.length;
18
- if (!i)
19
- return;
20
- t.x = t.y = 1;
21
- let l, f;
22
- for (let s = 0; s < i; s++) {
23
- l = o[s], f = l.projectionDelta;
24
- const u = l.instance;
25
- u && u.style && u.style.display === "contents" || (e && l.options.layoutScroll && l.scroll && l !== l.root && p(n, {
26
- x: -l.scroll.offset.x,
27
- y: -l.scroll.offset.y
28
- }), f && (t.x *= f.x.scale, t.y *= f.y.scale, g(n, f)), e && d(l.latestValues) && p(n, l.latestValues));
29
- }
30
- t.x = m(t.x), t.y = m(t.y);
46
+ function y(t, n) {
47
+ return { x: t.x - n.x, y: t.y - n.y };
31
48
  }
32
- function m(n) {
33
- return Number.isInteger(n) || n > 1.0000000000001 || n < 0.999999999999 ? n : 1;
49
+ function p({ point: t }, n) {
50
+ return {
51
+ point: t,
52
+ delta: y(t, M(n)),
53
+ offset: y(t, V(n)),
54
+ velocity: b(n, 0.1)
55
+ };
34
56
  }
35
- function V(n, t) {
36
- n.min = n.min + t, n.max = n.max + t;
57
+ function V(t) {
58
+ return t[0];
37
59
  }
38
- function a(n, t, [o, e, i]) {
39
- const l = t[i] !== void 0 ? t[i] : 0.5, f = x(n.min, n.max, l);
40
- c(n, t[o], t[e], f, t.scale);
60
+ function M(t) {
61
+ return t[t.length - 1];
41
62
  }
42
- const D = ["x", "scaleX", "originX"], A = ["y", "scaleY", "originY"];
43
- function p(n, t) {
44
- a(n.x, t, D), a(n.y, t, A);
63
+ function b(t, n) {
64
+ if (t.length < 2)
65
+ return { x: 0, y: 0 };
66
+ let o = t.length - 1, e = null;
67
+ const r = M(t);
68
+ for (; o >= 0 && (e = t[o], !(r.timestamp - e.timestamp > S(n))); )
69
+ o--;
70
+ if (!e)
71
+ return { x: 0, y: 0 };
72
+ const a = D(r.timestamp - e.timestamp);
73
+ if (a === 0)
74
+ return { x: 0, y: 0 };
75
+ const s = {
76
+ x: (r.x - e.x) / a,
77
+ y: (r.y - e.y) / a
78
+ };
79
+ return s.x === 1 / 0 && (s.x = 0), s.y === 1 / 0 && (s.y = 0), s;
45
80
  }
46
81
  export {
47
- c as applyAxisDelta,
48
- g as applyBoxDelta,
49
- y as applyPointDelta,
50
- T as applyTreeDeltas,
51
- r as scalePoint,
52
- a as transformAxis,
53
- p as transformBox,
54
- V as translateAxis
82
+ C as PanSession
55
83
  };
package/dist/lyra285.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./lyra179.cjs"),l=require("./lyra169.cjs"),c=require("./lyra284.cjs");function t(e,n,m,i,f){return e-=n,e=c.scalePoint(e,1/m,i),f!==void 0&&(e=c.scalePoint(e,1/f,i)),e}function o(e,n=0,m=1,i=.5,f,r=e,u=e){if(l.percent.test(n)&&(n=parseFloat(n),n=y.mix(u.min,u.max,n/100)-u.min),typeof n!="number")return;let d=y.mix(r.min,r.max,i);e===r&&(d-=n),e.min=t(e.min,n,m,d,f),e.max=t(e.max,n,m,d,f)}function v(e,n,[m,i,f],r,u){o(e,n[m],n[i],n[f],n.scale,r,u)}const P=["x","scaleX","originX"],T=["y","scaleY","originY"];function D(e,n,m,i){v(e.x,n,P,m?m.x:void 0,i?i.x:void 0),v(e.y,n,T,m?m.y:void 0,i?i.y:void 0)}exports.removeAxisDelta=o;exports.removeAxisTransforms=v;exports.removeBoxTransforms=D;exports.removePointDelta=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={hasAnimatedSinceResize:!0,hasEverUpdated:!1};exports.globalProjectionState=e;
package/dist/lyra285.js CHANGED
@@ -1,25 +1,15 @@
1
- import { mix as v } from "./lyra179.js";
2
- import { percent as p } from "./lyra169.js";
3
- import { scalePoint as c } from "./lyra284.js";
4
- function r(e, m, f, n, d) {
5
- return e -= m, e = c(e, 1 / f, n), d !== void 0 && (e = c(e, 1 / d, n)), e;
6
- }
7
- function D(e, m = 0, f = 1, n = 0.5, d, y = e, i = e) {
8
- if (p.test(m) && (m = parseFloat(m), m = v(i.min, i.max, m / 100) - i.min), typeof m != "number")
9
- return;
10
- let u = v(y.min, y.max, n);
11
- e === y && (u -= m), e.min = r(e.min, m, f, u, d), e.max = r(e.max, m, f, u, d);
12
- }
13
- function P(e, m, [f, n, d], y, i) {
14
- D(e, m[f], m[n], m[d], m.scale, y, i);
15
- }
16
- const K = ["x", "scaleX", "originX"], T = ["y", "scaleY", "originY"];
17
- function h(e, m, f, n) {
18
- P(e.x, m, K, f ? f.x : void 0, n ? n.x : void 0), P(e.y, m, T, f ? f.y : void 0, n ? n.y : void 0);
19
- }
1
+ const e = {
2
+ /**
3
+ * Global flag as to whether the tree has animated since the last time
4
+ * we resized the window
5
+ */
6
+ hasAnimatedSinceResize: !0,
7
+ /**
8
+ * We set this to true once, on the first update. Any nodes added to the tree beyond that
9
+ * update will be given a `data-projection-id` attribute.
10
+ */
11
+ hasEverUpdated: !1
12
+ };
20
13
  export {
21
- D as removeAxisDelta,
22
- P as removeAxisTransforms,
23
- h as removeBoxTransforms,
24
- r as removePointDelta
14
+ e as globalProjectionState
25
15
  };
package/dist/lyra286.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./lyra201.cjs");function i(t){return t.translate===0&&t.scale===1}function r(t){return i(t.x)&&i(t.y)}function a(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function c(t){return n.calcLength(t.x)/n.calcLength(t.y)}exports.aspectRatio=c;exports.boxEquals=a;exports.isDeltaZero=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./lyra183.cjs");function t(r,e){return e.max===e.min?0:r/(e.max-e.min)*100}const i={correct:(r,e)=>{if(!e.target)return r;if(typeof r=="string")if(c.px.test(r))r=parseFloat(r);else return r;const n=t(r,e.target.x),o=t(r,e.target.y);return`${n}% ${o}%`}};exports.correctBorderRadius=i;exports.pixelsToPercent=t;
package/dist/lyra286.js CHANGED
@@ -1,18 +1,21 @@
1
- import { calcLength as r } from "./lyra201.js";
2
- function i(n) {
3
- return n.translate === 0 && n.scale === 1;
4
- }
5
- function e(n) {
6
- return i(n.x) && i(n.y);
7
- }
8
- function m(n, t) {
9
- return n.x.min === t.x.min && n.x.max === t.x.max && n.y.min === t.y.min && n.y.max === t.y.max;
10
- }
11
- function o(n) {
12
- return r(n.x) / r(n.y);
1
+ import { px as c } from "./lyra183.js";
2
+ function e(r, n) {
3
+ return n.max === n.min ? 0 : r / (n.max - n.min) * 100;
13
4
  }
5
+ const f = {
6
+ correct: (r, n) => {
7
+ if (!n.target)
8
+ return r;
9
+ if (typeof r == "string")
10
+ if (c.test(r))
11
+ r = parseFloat(r);
12
+ else
13
+ return r;
14
+ const o = e(r, n.target.x), t = e(r, n.target.y);
15
+ return `${o}% ${t}%`;
16
+ }
17
+ };
14
18
  export {
15
- o as aspectRatio,
16
- m as boxEquals,
17
- e as isDeltaZero
19
+ f as correctBorderRadius,
20
+ e as pixelsToPercent
18
21
  };
package/dist/lyra287.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./lyra175.cjs");class o{constructor(){this.members=[]}add(e){a.addUniqueItem(this.members,e),e.scheduleRender()}remove(e){if(a.removeItem(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(e){const s=this.members.findIndex(i=>e===i);if(s===0)return!1;let t;for(let i=s;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){t=r;break}}return t?(this.promote(t),!0):!1}promote(e,s){const t=this.lead;if(e!==t&&(this.prevLead=t,this.lead=e,e.show(),t)){t.instance&&t.scheduleRender(),e.scheduleRender(),e.resumeFrom=t,s&&(e.resumeFrom.preserveOpacity=!0),t.snapshot&&(e.snapshot=t.snapshot,e.snapshot.latestValues=t.animationValues||t.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&t.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:s,resumingFrom:t}=e;s.onExitComplete&&s.onExitComplete(),t&&t.options.onExitComplete&&t.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}exports.NodeStack=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./lyra193.cjs"),i=require("./lyra179.cjs"),x={correct:(r,{treeScale:c,projectionDelta:t})=>{const f=r,e=i.complex.parse(r);if(e.length>5)return f;const m=i.complex.createTransformer(r),o=typeof e[0]!="number"?1:0,n=t.x.scale*c.x,s=t.y.scale*c.y;e[0+o]/=n,e[1+o]/=s;const a=u.mix(n,s,.5);return typeof e[2+o]=="number"&&(e[2+o]/=a),typeof e[3+o]=="number"&&(e[3+o]/=a),m(e)}};exports.correctBoxShadow=x;
package/dist/lyra287.js CHANGED
@@ -1,58 +1,16 @@
1
- import { addUniqueItem as a, removeItem as o } from "./lyra175.js";
2
- class n {
3
- constructor() {
4
- this.members = [];
1
+ import { mix as i } from "./lyra193.js";
2
+ import { complex as m } from "./lyra179.js";
3
+ const l = {
4
+ correct: (e, { treeScale: c, projectionDelta: t }) => {
5
+ const a = e, o = m.parse(e);
6
+ if (o.length > 5)
7
+ return a;
8
+ const p = m.createTransformer(e), r = typeof o[0] != "number" ? 1 : 0, n = t.x.scale * c.x, s = t.y.scale * c.y;
9
+ o[0 + r] /= n, o[1 + r] /= s;
10
+ const f = i(n, s, 0.5);
11
+ return typeof o[2 + r] == "number" && (o[2 + r] /= f), typeof o[3 + r] == "number" && (o[3 + r] /= f), p(o);
5
12
  }
6
- add(e) {
7
- a(this.members, e), e.scheduleRender();
8
- }
9
- remove(e) {
10
- if (o(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
11
- const t = this.members[this.members.length - 1];
12
- t && this.promote(t);
13
- }
14
- }
15
- relegate(e) {
16
- const t = this.members.findIndex((i) => e === i);
17
- if (t === 0)
18
- return !1;
19
- let s;
20
- for (let i = t; i >= 0; i--) {
21
- const r = this.members[i];
22
- if (r.isPresent !== !1) {
23
- s = r;
24
- break;
25
- }
26
- }
27
- return s ? (this.promote(s), !0) : !1;
28
- }
29
- promote(e, t) {
30
- const s = this.lead;
31
- if (e !== s && (this.prevLead = s, this.lead = e, e.show(), s)) {
32
- s.instance && s.scheduleRender(), e.scheduleRender(), e.resumeFrom = s, t && (e.resumeFrom.preserveOpacity = !0), s.snapshot && (e.snapshot = s.snapshot, e.snapshot.latestValues = s.animationValues || s.latestValues), e.root && e.root.isUpdating && (e.isLayoutDirty = !0);
33
- const { crossfade: i } = e.options;
34
- i === !1 && s.hide();
35
- }
36
- }
37
- exitAnimationComplete() {
38
- this.members.forEach((e) => {
39
- const { options: t, resumingFrom: s } = e;
40
- t.onExitComplete && t.onExitComplete(), s && s.options.onExitComplete && s.options.onExitComplete();
41
- });
42
- }
43
- scheduleRender() {
44
- this.members.forEach((e) => {
45
- e.instance && e.scheduleRender(!1);
46
- });
47
- }
48
- /**
49
- * Clear any leads that have been removed this render to prevent them from being
50
- * used in future animations and to prevent memory leaks
51
- */
52
- removeLeadSnapshot() {
53
- this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
54
- }
55
- }
13
+ };
56
14
  export {
57
- n as NodeStack
15
+ l as correctBoxShadow
58
16
  };
package/dist/lyra288.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function y(o,t,s){let n="";const r=o.x.translate/t.x,a=o.y.translate/t.y;if((r||a)&&(n=`translate3d(${r}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),s){const{rotate:f,rotateX:c,rotateY:x}=s;f&&(n+=`rotate(${f}deg) `),c&&(n+=`rotateX(${c}deg) `),x&&(n+=`rotateY(${x}deg) `)}const i=o.x.scale*t.x,e=o.y.scale*t.y;return(i!==1||e!==1)&&(n+=`scale(${i}, ${e})`),n||"none"}exports.buildProjectionTransform=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./lyra164.cjs"),b=require("./lyra180.cjs"),d=require("./lyra154.cjs"),p=require("./lyra320.cjs"),S=require("./lyra314.cjs");function q(f,i,c,a){const{style:e,vars:g,transform:y,transformOrigin:u}=f;let l=!1,m=!1,o=!0;for(const r in i){const s=i[r];if(b.isCSSVariableName(r)){g[r]=s;continue}const n=S.numberValueTypes[r],t=p.getValueAsType(s,n);if(d.transformProps.has(r)){if(l=!0,y[r]=t,!o)continue;s!==(n.default||0)&&(o=!1)}else r.startsWith("origin")?(m=!0,u[r]=t):e[r]=t}if(i.transform||(l||a?e.transform=T.buildTransform(f.transform,c,o,a):e.transform&&(e.transform="none")),m){const{originX:r="50%",originY:s="50%",originZ:n=0}=u;e.transformOrigin=`${r} ${s} ${n}`}}exports.buildHTMLStyles=q;