@new-black/lyra 0.0.6 → 0.0.8
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.
- package/README.md +22 -8
- package/dist/lyra10.cjs +1 -1
- package/dist/lyra10.js +1 -1
- package/dist/lyra100.cjs +1 -1
- package/dist/lyra100.js +19 -39
- package/dist/lyra101.cjs +1 -1
- package/dist/lyra101.js +10 -17
- package/dist/lyra102.cjs +1 -1
- package/dist/lyra102.js +15 -14
- package/dist/lyra103.cjs +1 -1
- package/dist/lyra103.js +5 -19
- package/dist/lyra104.cjs +1 -1
- package/dist/lyra104.js +7 -9
- package/dist/lyra105.cjs +1 -1
- package/dist/lyra105.js +10 -15
- package/dist/lyra106.cjs +1 -1
- package/dist/lyra106.js +9 -5
- package/dist/lyra107.cjs +1 -1
- package/dist/lyra107.js +37 -8
- package/dist/lyra108.cjs +1 -1
- package/dist/lyra108.js +3 -10
- package/dist/lyra109.cjs +1 -1
- package/dist/lyra109.js +4 -9
- package/dist/lyra11.cjs +1 -1
- package/dist/lyra11.js +2 -2
- package/dist/lyra110.cjs +1 -1
- package/dist/lyra110.js +4 -37
- package/dist/lyra111.cjs +1 -1
- package/dist/lyra111.js +10 -3
- package/dist/lyra112.cjs +1 -1
- package/dist/lyra112.js +7 -4
- package/dist/lyra113.cjs +1 -1
- package/dist/lyra113.js +4 -5
- package/dist/lyra114.cjs +1 -1
- package/dist/lyra114.js +2 -10
- package/dist/lyra115.cjs +1 -1
- package/dist/lyra115.js +17 -6
- package/dist/lyra116.cjs +1 -1
- package/dist/lyra116.js +14 -4
- package/dist/lyra117.cjs +1 -1
- package/dist/lyra117.js +33 -2
- package/dist/lyra118.cjs +1 -1
- package/dist/lyra118.js +29 -17
- package/dist/lyra119.cjs +1 -1
- package/dist/lyra119.js +38 -13
- package/dist/lyra12.cjs +1 -1
- package/dist/lyra12.js +1 -1
- package/dist/lyra120.cjs +1 -1
- package/dist/lyra120.js +9 -32
- package/dist/lyra121.cjs +1 -1
- package/dist/lyra121.js +3 -30
- package/dist/lyra122.cjs +1 -1
- package/dist/lyra122.js +47 -38
- package/dist/lyra123.cjs +1 -1
- package/dist/lyra123.js +7 -10
- package/dist/lyra124.cjs +1 -1
- package/dist/lyra124.js +3 -3
- package/dist/lyra125.cjs +1 -1
- package/dist/lyra125.js +27 -47
- package/dist/lyra126.cjs +1 -1
- package/dist/lyra126.js +16 -7
- package/dist/lyra127.cjs +1 -1
- package/dist/lyra127.js +11 -3
- package/dist/lyra128.cjs +1 -1
- package/dist/lyra128.js +8 -27
- package/dist/lyra129.cjs +1 -1
- package/dist/lyra129.js +2 -16
- package/dist/lyra13.cjs +1 -1
- package/dist/lyra13.js +1 -1
- package/dist/lyra130.cjs +1 -1
- package/dist/lyra130.js +3 -11
- package/dist/lyra131.cjs +1 -1
- package/dist/lyra131.js +3 -9
- package/dist/lyra132.cjs +1 -1
- package/dist/lyra132.js +2 -2
- package/dist/lyra133.cjs +1 -1
- package/dist/lyra133.js +258 -3
- package/dist/lyra134.cjs +1 -1
- package/dist/lyra134.js +25 -3
- package/dist/lyra135.cjs +1 -1
- package/dist/lyra135.js +16 -2
- package/dist/lyra136.cjs +1 -1
- package/dist/lyra136.js +3 -257
- package/dist/lyra137.cjs +1 -1
- package/dist/lyra137.js +10 -24
- package/dist/lyra138.cjs +1 -1
- package/dist/lyra138.js +3 -16
- package/dist/lyra139.cjs +1 -1
- package/dist/lyra139.js +26 -3
- package/dist/lyra14.cjs +1 -1
- package/dist/lyra14.js +4 -4
- package/dist/lyra140.cjs +1 -1
- package/dist/lyra140.js +200 -10
- package/dist/lyra141.cjs +1 -1
- package/dist/lyra141.js +5 -3
- package/dist/lyra142.cjs +1 -1
- package/dist/lyra142.js +21 -27
- package/dist/lyra143.cjs +1 -1
- package/dist/lyra143.js +9 -199
- package/dist/lyra144.cjs +1 -1
- package/dist/lyra144.js +3 -4
- package/dist/lyra145.cjs +1 -1
- package/dist/lyra145.js +26 -21
- package/dist/lyra146.cjs +1 -1
- package/dist/lyra146.js +3 -10
- package/dist/lyra147.cjs +1 -1
- package/dist/lyra147.js +4 -3
- package/dist/lyra148.cjs +1 -1
- package/dist/lyra148.js +25 -26
- package/dist/lyra149.cjs +1 -1
- package/dist/lyra149.js +11 -4
- package/dist/lyra15.cjs +1 -1
- package/dist/lyra15.js +2 -2
- package/dist/lyra150.cjs +1 -1
- package/dist/lyra150.js +2 -5
- package/dist/lyra151.cjs +1 -1
- package/dist/lyra151.js +6 -25
- package/dist/lyra152.cjs +1 -1
- package/dist/lyra152.js +19 -11
- package/dist/lyra153.cjs +1 -1
- package/dist/lyra153.js +119 -2
- package/dist/lyra154.cjs +1 -1
- package/dist/lyra154.js +27 -5
- package/dist/lyra155.cjs +1 -1
- package/dist/lyra155.js +61 -17
- package/dist/lyra156.cjs +1 -1
- package/dist/lyra156.js +30 -115
- package/dist/lyra157.cjs +1 -1
- package/dist/lyra157.js +13 -26
- package/dist/lyra158.cjs +1 -1
- package/dist/lyra158.js +36 -58
- package/dist/lyra159.cjs +1 -1
- package/dist/lyra159.js +2 -34
- package/dist/lyra16.cjs +1 -1
- package/dist/lyra16.js +1 -1
- package/dist/lyra160.cjs +1 -1
- package/dist/lyra160.js +3 -15
- package/dist/lyra161.cjs +1 -1
- package/dist/lyra161.js +10 -40
- package/dist/lyra162.cjs +1 -1
- package/dist/lyra162.js +10 -2
- package/dist/lyra163.cjs +1 -1
- package/dist/lyra163.js +9 -3
- package/dist/lyra164.cjs +1 -1
- package/dist/lyra164.js +16 -10
- package/dist/lyra165.cjs +1 -1
- package/dist/lyra165.js +9 -9
- package/dist/lyra166.cjs +1 -1
- package/dist/lyra166.js +14 -9
- package/dist/lyra167.cjs +1 -1
- package/dist/lyra167.js +62 -14
- package/dist/lyra168.cjs +1 -1
- package/dist/lyra168.js +4 -10
- package/dist/lyra169.cjs +1 -1
- package/dist/lyra169.js +2 -14
- package/dist/lyra17.cjs +1 -1
- package/dist/lyra17.js +1 -1
- package/dist/lyra170.cjs +1 -1
- package/dist/lyra170.js +14 -64
- package/dist/lyra171.cjs +1 -1
- package/dist/lyra171.js +16 -4
- package/dist/lyra172.cjs +1 -1
- package/dist/lyra172.js +4 -2
- package/dist/lyra173.cjs +1 -1
- package/dist/lyra173.js +2 -15
- package/dist/lyra174.cjs +1 -1
- package/dist/lyra174.js +7 -16
- package/dist/lyra175.cjs +1 -1
- package/dist/lyra175.js +53 -4
- package/dist/lyra176.cjs +1 -1
- package/dist/lyra176.js +17 -2
- package/dist/lyra177.cjs +1 -1
- package/dist/lyra177.js +8 -6
- package/dist/lyra178.cjs +1 -1
- package/dist/lyra178.js +2 -53
- package/dist/lyra179.cjs +1 -1
- package/dist/lyra179.js +6 -17
- package/dist/lyra18.cjs +1 -1
- package/dist/lyra18.js +2 -2
- package/dist/lyra180.cjs +1 -1
- package/dist/lyra180.js +3 -8
- package/dist/lyra181.cjs +1 -1
- package/dist/lyra181.js +2 -2
- package/dist/lyra182.cjs +1 -1
- package/dist/lyra182.js +2 -6
- package/dist/lyra183.cjs +1 -1
- package/dist/lyra183.js +5 -4
- package/dist/lyra184.cjs +1 -1
- package/dist/lyra184.js +3 -2
- package/dist/lyra185.cjs +1 -1
- package/dist/lyra185.js +7 -2
- package/dist/lyra186.cjs +1 -1
- package/dist/lyra186.js +16 -5
- package/dist/lyra187.cjs +1 -1
- package/dist/lyra187.js +2 -3
- package/dist/lyra188.cjs +1 -1
- package/dist/lyra188.js +2 -7
- package/dist/lyra189.cjs +1 -1
- package/dist/lyra189.js +6 -16
- package/dist/lyra19.cjs +1 -1
- package/dist/lyra19.js +2 -2
- package/dist/lyra190.cjs +1 -1
- package/dist/lyra190.js +5 -2
- package/dist/lyra191.cjs +1 -1
- package/dist/lyra191.js +9 -2
- package/dist/lyra192.cjs +1 -1
- package/dist/lyra192.js +7 -6
- package/dist/lyra193.cjs +1 -1
- package/dist/lyra193.js +22 -5
- package/dist/lyra194.cjs +1 -1
- package/dist/lyra194.js +32 -8
- package/dist/lyra195.cjs +1 -1
- package/dist/lyra195.js +35 -6
- package/dist/lyra196.cjs +1 -1
- package/dist/lyra196.js +29 -21
- package/dist/lyra197.cjs +1 -1
- package/dist/lyra197.js +22 -32
- package/dist/lyra198.cjs +1 -1
- package/dist/lyra198.js +48 -34
- package/dist/lyra199.cjs +1 -1
- package/dist/lyra199.js +2 -30
- package/dist/lyra2.cjs +1 -1
- package/dist/lyra2.js +12 -12
- package/dist/lyra20.cjs +1 -1
- package/dist/lyra20.js +3 -3
- package/dist/lyra200.cjs +1 -1
- package/dist/lyra200.js +2 -23
- package/dist/lyra201.cjs +1 -1
- package/dist/lyra201.js +7 -49
- package/dist/lyra202.cjs +1 -1
- package/dist/lyra202.js +6 -2
- package/dist/lyra203.cjs +1 -1
- package/dist/lyra203.js +33 -2
- package/dist/lyra204.cjs +1 -1
- package/dist/lyra204.js +17 -7
- package/dist/lyra205.cjs +1 -1
- package/dist/lyra205.js +47 -6
- package/dist/lyra206.cjs +1 -1
- package/dist/lyra206.js +3 -32
- package/dist/lyra207.cjs +1 -1
- package/dist/lyra207.js +5 -17
- package/dist/lyra208.cjs +1 -1
- package/dist/lyra208.js +28 -44
- package/dist/lyra209.cjs +1 -1
- package/dist/lyra209.js +5 -3
- package/dist/lyra210.cjs +1 -1
- package/dist/lyra210.js +3 -5
- package/dist/lyra211.cjs +1 -1
- package/dist/lyra211.js +10 -29
- package/dist/lyra212.cjs +1 -1
- package/dist/lyra212.js +2 -6
- package/dist/lyra213.cjs +1 -1
- package/dist/lyra213.js +97 -3
- package/dist/lyra214.cjs +1 -1
- package/dist/lyra214.js +22 -8
- package/dist/lyra215.cjs +1 -1
- package/dist/lyra215.js +39 -2
- package/dist/lyra218.cjs +1 -1
- package/dist/lyra218.js +1 -1
- package/dist/lyra219.cjs +1 -1
- package/dist/lyra219.js +4 -4
- package/dist/lyra220.cjs +1 -1
- package/dist/lyra220.js +6 -6
- package/dist/lyra221.cjs +1 -1
- package/dist/lyra221.js +3 -3
- package/dist/lyra222.cjs +1 -1
- package/dist/lyra222.js +4 -4
- package/dist/lyra223.cjs +1 -1
- package/dist/lyra223.js +2 -2
- package/dist/lyra224.cjs +1 -1
- package/dist/lyra224.js +8 -8
- package/dist/lyra225.cjs +1 -1
- package/dist/lyra225.js +1 -1
- package/dist/lyra226.cjs +1 -1
- package/dist/lyra226.js +2 -2
- package/dist/lyra227.cjs +1 -1
- package/dist/lyra227.js +4 -4
- package/dist/lyra228.cjs +1 -1
- package/dist/lyra228.js +8 -8
- package/dist/lyra229.cjs +1 -1
- package/dist/lyra229.js +2 -2
- package/dist/lyra230.cjs +1 -1
- package/dist/lyra230.js +4 -4
- package/dist/lyra231.cjs +1 -1
- package/dist/lyra231.js +7 -7
- package/dist/lyra234.cjs +1 -1
- package/dist/lyra234.js +4 -4
- package/dist/lyra235.cjs +1 -1
- package/dist/lyra235.js +2 -2
- package/dist/lyra236.cjs +1 -1
- package/dist/lyra236.js +3 -583
- package/dist/lyra237.cjs +1 -1
- package/dist/lyra237.js +584 -11
- package/dist/lyra238.cjs +1 -1
- package/dist/lyra238.js +11 -4
- package/dist/lyra24.cjs +1 -1
- package/dist/lyra24.js +1 -1
- package/dist/lyra240.cjs +1 -1
- package/dist/lyra240.js +7 -7
- package/dist/lyra243.cjs +1 -1
- package/dist/lyra243.js +1 -1
- package/dist/lyra246.cjs +1 -1
- package/dist/lyra246.js +2 -2
- package/dist/lyra248.cjs +1 -1
- package/dist/lyra248.js +5 -5
- package/dist/lyra25.cjs +1 -1
- package/dist/lyra25.js +1 -1
- package/dist/lyra250.cjs +1 -1
- package/dist/lyra250.js +2 -2
- package/dist/lyra251.cjs +1 -1
- package/dist/lyra251.js +2 -2
- package/dist/lyra252.cjs +1 -1
- package/dist/lyra252.js +3 -3
- package/dist/lyra254.cjs +1 -1
- package/dist/lyra254.js +2 -28
- package/dist/lyra255.cjs +1 -1
- package/dist/lyra255.js +17 -23
- package/dist/lyra256.cjs +1 -1
- package/dist/lyra256.js +229 -17
- package/dist/lyra257.cjs +1 -1
- package/dist/lyra257.js +80 -8
- package/dist/lyra258.cjs +1 -1
- package/dist/lyra258.js +13 -13
- package/dist/lyra259.cjs +1 -1
- package/dist/lyra259.js +19 -6
- package/dist/lyra26.cjs +1 -1
- package/dist/lyra26.js +1 -1
- package/dist/lyra260.cjs +1 -1
- package/dist/lyra260.js +13 -23
- package/dist/lyra261.cjs +1 -1
- package/dist/lyra261.js +28 -2
- package/dist/lyra262.cjs +1 -1
- package/dist/lyra262.js +24 -8
- package/dist/lyra263.cjs +1 -1
- package/dist/lyra263.js +20 -7
- package/dist/lyra264.cjs +1 -1
- package/dist/lyra264.js +9 -2
- package/dist/lyra265.cjs +1 -1
- package/dist/lyra265.js +12 -18
- package/dist/lyra266.cjs +1 -1
- package/dist/lyra266.js +6 -232
- package/dist/lyra267.cjs +1 -1
- package/dist/lyra267.js +22 -79
- package/dist/lyra268.cjs +1 -1
- package/dist/lyra268.js +2 -13
- package/dist/lyra269.cjs +1 -1
- package/dist/lyra269.js +8 -18
- package/dist/lyra270.cjs +1 -1
- package/dist/lyra270.js +7 -14
- package/dist/lyra271.cjs +1 -1
- package/dist/lyra271.js +4 -4
- package/dist/lyra273.cjs +1 -1
- package/dist/lyra273.js +1 -1
- package/dist/lyra274.cjs +1 -1
- package/dist/lyra274.js +2 -2
- package/dist/lyra276.cjs +1 -1
- package/dist/lyra276.js +3 -3
- package/dist/lyra277.cjs +1 -1
- package/dist/lyra277.js +2 -2
- package/dist/lyra278.cjs +1 -1
- package/dist/lyra278.js +1 -1
- package/dist/lyra279.cjs +1 -1
- package/dist/lyra279.js +1 -1
- package/dist/lyra280.cjs +1 -1
- package/dist/lyra280.js +1 -1
- package/dist/lyra282.cjs +1 -1
- package/dist/lyra282.js +5 -5
- package/dist/lyra284.cjs +1 -1
- package/dist/lyra284.js +1 -1
- package/dist/lyra285.cjs +1 -1
- package/dist/lyra285.js +2 -2
- package/dist/lyra286.cjs +1 -1
- package/dist/lyra286.js +1 -1
- package/dist/lyra287.cjs +1 -1
- package/dist/lyra287.js +1 -1
- package/dist/lyra293.cjs +1 -1
- package/dist/lyra293.js +2 -2
- package/dist/lyra296.cjs +1 -1
- package/dist/lyra296.js +4 -69
- package/dist/lyra297.cjs +1 -1
- package/dist/lyra297.js +69 -4
- package/dist/lyra298.cjs +1 -1
- package/dist/lyra298.js +64 -5
- package/dist/lyra299.cjs +1 -1
- package/dist/lyra299.js +21 -7
- package/dist/lyra3.cjs +1 -1
- package/dist/lyra3.js +2 -2
- package/dist/lyra30.cjs +1 -1
- package/dist/lyra30.js +2 -2
- package/dist/lyra300.cjs +1 -1
- package/dist/lyra300.js +5 -15
- package/dist/lyra301.cjs +1 -1
- package/dist/lyra301.js +7 -63
- package/dist/lyra302.cjs +1 -1
- package/dist/lyra302.js +15 -22
- package/dist/lyra307.cjs +1 -1
- package/dist/lyra307.js +1 -1
- package/dist/lyra308.cjs +1 -1
- package/dist/lyra308.js +1 -1
- package/dist/lyra309.cjs +1 -1
- package/dist/lyra309.js +2 -2
- package/dist/lyra31.cjs +1 -1
- package/dist/lyra31.js +4 -446
- package/dist/lyra310.cjs +1 -1
- package/dist/lyra310.js +5 -5
- package/dist/lyra32.cjs +1 -1
- package/dist/lyra32.js +39 -82
- package/dist/lyra33.cjs +1 -1
- package/dist/lyra33.js +2 -43
- package/dist/lyra34.cjs +1 -1
- package/dist/lyra34.js +467 -632
- package/dist/lyra35.cjs +1 -1
- package/dist/lyra35.js +444 -19
- package/dist/lyra36.cjs +1 -1
- package/dist/lyra36.js +2 -39
- package/dist/lyra37.cjs +1 -1
- package/dist/lyra37.js +2 -12
- package/dist/lyra38.cjs +1 -1
- package/dist/lyra38.js +29 -481
- package/dist/lyra39.cjs +1 -1
- package/dist/lyra39.js +14 -4
- package/dist/lyra4.cjs +1 -1
- package/dist/lyra4.js +1 -1
- package/dist/lyra40.cjs +1 -1
- package/dist/lyra40.js +2 -66
- package/dist/lyra41.cjs +1 -1
- package/dist/lyra41.js +2 -14
- package/dist/lyra42.cjs +1 -1
- package/dist/lyra42.js +3 -235
- package/dist/lyra43.cjs +1 -1
- package/dist/lyra43.js +82 -2
- package/dist/lyra44.cjs +1 -1
- package/dist/lyra44.js +43 -2
- package/dist/lyra45.cjs +1 -1
- package/dist/lyra45.js +657 -2
- package/dist/lyra46.cjs +1 -1
- package/dist/lyra46.js +19 -490
- package/dist/lyra47.cjs +1 -1
- package/dist/lyra47.js +12 -2
- package/dist/lyra48.cjs +1 -1
- package/dist/lyra48.js +481 -29
- package/dist/lyra49.cjs +1 -1
- package/dist/lyra49.js +66 -2
- package/dist/lyra5.cjs +1 -1
- package/dist/lyra5.js +2 -2
- package/dist/lyra50.cjs +1 -1
- package/dist/lyra50.js +236 -2
- package/dist/lyra51.cjs +1 -1
- package/dist/lyra51.js +2 -13
- package/dist/lyra52.cjs +1 -1
- package/dist/lyra52.js +10 -27
- package/dist/lyra53.cjs +1 -1
- package/dist/lyra53.js +30 -4
- package/dist/lyra57.cjs +1 -1
- package/dist/lyra57.js +2 -2
- package/dist/lyra59.cjs +1 -1
- package/dist/lyra59.js +3 -3
- package/dist/lyra6.cjs +1 -1
- package/dist/lyra6.js +3 -3
- package/dist/lyra61.cjs +1 -1
- package/dist/lyra61.js +59 -19
- package/dist/lyra62.cjs +1 -1
- package/dist/lyra62.js +38 -57
- package/dist/lyra63.cjs +1 -1
- package/dist/lyra63.js +816 -33
- package/dist/lyra64.cjs +1 -1
- package/dist/lyra64.js +40 -815
- package/dist/lyra65.cjs +1 -1
- package/dist/lyra65.js +34 -45
- package/dist/lyra66.cjs +1 -1
- package/dist/lyra66.js +29 -35
- package/dist/lyra67.cjs +1 -1
- package/dist/lyra67.js +33 -31
- package/dist/lyra68.cjs +1 -1
- package/dist/lyra68.js +440 -29
- package/dist/lyra69.cjs +1 -1
- package/dist/lyra69.js +48 -439
- package/dist/lyra7.cjs +1 -1
- package/dist/lyra7.js +2 -2
- package/dist/lyra70.cjs +1 -1
- package/dist/lyra70.js +62 -48
- package/dist/lyra71.cjs +1 -1
- package/dist/lyra71.js +18 -66
- package/dist/lyra74.cjs +1 -1
- package/dist/lyra74.js +27 -20
- package/dist/lyra75.cjs +1 -1
- package/dist/lyra75.js +2 -19
- package/dist/lyra76.cjs +1 -1
- package/dist/lyra76.js +3 -28
- package/dist/lyra77.cjs +1 -1
- package/dist/lyra77.js +27 -2
- package/dist/lyra78.cjs +1 -1
- package/dist/lyra78.js +38 -17
- package/dist/lyra79.cjs +1 -1
- package/dist/lyra79.js +18 -990
- package/dist/lyra8.cjs +1 -1
- package/dist/lyra8.js +5 -5
- package/dist/lyra80.cjs +1 -1
- package/dist/lyra80.js +19 -2
- package/dist/lyra81.cjs +1 -1
- package/dist/lyra81.js +17 -3
- package/dist/lyra82.cjs +1 -1
- package/dist/lyra82.js +991 -27
- package/dist/lyra83.cjs +1 -1
- package/dist/lyra83.js +2 -36
- package/dist/lyra84.cjs +1 -1
- package/dist/lyra84.js +122 -10
- package/dist/lyra85.cjs +1 -1
- package/dist/lyra85.js +58 -21
- package/dist/lyra86.cjs +1 -1
- package/dist/lyra86.js +3 -11
- package/dist/lyra87.cjs +1 -1
- package/dist/lyra87.js +2 -39
- package/dist/lyra88.cjs +1 -1
- package/dist/lyra88.js +322 -1993
- package/dist/lyra89.cjs +1 -1
- package/dist/lyra89.js +12 -6
- package/dist/lyra9.cjs +1 -1
- package/dist/lyra9.js +3 -3
- package/dist/lyra90.cjs +1 -1
- package/dist/lyra90.js +24 -71
- package/dist/lyra91.cjs +1 -1
- package/dist/lyra91.js +10 -124
- package/dist/lyra92.cjs +1 -1
- package/dist/lyra92.js +38 -61
- package/dist/lyra93.cjs +1 -1
- package/dist/lyra93.js +1993 -322
- package/dist/lyra94.cjs +1 -1
- package/dist/lyra94.js +7 -2
- package/dist/lyra95.cjs +1 -1
- package/dist/lyra95.js +72 -3
- package/dist/lyra98.cjs +1 -1
- package/dist/lyra98.js +15 -95
- package/dist/lyra99.cjs +1 -1
- package/dist/lyra99.js +11 -23
- package/dist/provider.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/lyra236.js
CHANGED
|
@@ -1,586 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { mixValues as it } from "./lyra282.js";
|
|
4
|
-
import { copyBoxInto as p } from "./lyra283.js";
|
|
5
|
-
import { translateAxis as S, transformBox as k, applyBoxDelta as st, applyTreeDeltas as ot } from "./lyra284.js";
|
|
6
|
-
import { calcRelativePosition as A, calcRelativeBox as at, calcBoxDelta as L, calcLength as E, isNear as rt } from "./lyra206.js";
|
|
7
|
-
import { removeBoxTransforms as N } from "./lyra285.js";
|
|
8
|
-
import { createBox as f, createDelta as j } from "./lyra138.js";
|
|
9
|
-
import { getValueTransition as nt } from "./lyra281.js";
|
|
10
|
-
import { boxEquals as w, isDeltaZero as Q, aspectRatio as W } from "./lyra286.js";
|
|
11
|
-
import { NodeStack as lt } from "./lyra287.js";
|
|
12
|
-
import { scaleCorrectors as z } from "./lyra154.js";
|
|
13
|
-
import { buildProjectionTransform as _ } from "./lyra288.js";
|
|
14
|
-
import { eachAxis as H } from "./lyra289.js";
|
|
15
|
-
import { hasTransform as B, hasScale as G, has2DTranslate as ht } from "./lyra290.js";
|
|
16
|
-
import { FlatTree as ut } from "./lyra179.js";
|
|
17
|
-
import { resolveMotionValue as M } from "./lyra115.js";
|
|
18
|
-
import { globalProjectionState as b } from "./lyra268.js";
|
|
19
|
-
import { delay as ct } from "./lyra194.js";
|
|
20
|
-
import { mix as F } from "./lyra184.js";
|
|
21
|
-
import { record as dt } from "./lyra291.js";
|
|
22
|
-
import { isSVGElement as ft } from "./lyra292.js";
|
|
23
|
-
import { animateSingleValue as mt } from "./lyra246.js";
|
|
24
|
-
import { clamp as pt } from "./lyra162.js";
|
|
25
|
-
import { frameData as y } from "./lyra182.js";
|
|
26
|
-
const q = ["", "X", "Y", "Z"], X = 1e3;
|
|
27
|
-
let yt = 0;
|
|
28
|
-
const x = {
|
|
29
|
-
type: "projectionFrame",
|
|
30
|
-
totalNodes: 0,
|
|
31
|
-
resolvedTargetDeltas: 0,
|
|
32
|
-
recalculatedProjection: 0
|
|
1
|
+
const t = {
|
|
2
|
+
current: !1
|
|
33
3
|
};
|
|
34
|
-
function oe({ attachResizeListener: i, defaultParent: u, measureScroll: h, checkIsScrollRoot: d, resetTransform: V }) {
|
|
35
|
-
return class {
|
|
36
|
-
constructor(t = {}, e = u == null ? void 0 : u()) {
|
|
37
|
-
this.id = yt++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.checkUpdateFailed = () => {
|
|
38
|
-
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
39
|
-
}, this.updateProjection = () => {
|
|
40
|
-
x.totalNodes = x.resolvedTargetDeltas = x.recalculatedProjection = 0, this.nodes.forEach(Tt), this.nodes.forEach(Bt), this.nodes.forEach(jt), this.nodes.forEach(xt), dt(x);
|
|
41
|
-
}, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = t, this.root = e ? e.root || e : this, this.path = e ? [...e.path, e] : [], this.parent = e, this.depth = e ? e.depth + 1 : 0;
|
|
42
|
-
for (let s = 0; s < this.path.length; s++)
|
|
43
|
-
this.path[s].shouldResetTransform = !0;
|
|
44
|
-
this.root === this && (this.nodes = new ut());
|
|
45
|
-
}
|
|
46
|
-
addEventListener(t, e) {
|
|
47
|
-
return this.eventHandlers.has(t) || this.eventHandlers.set(t, new et()), this.eventHandlers.get(t).add(e);
|
|
48
|
-
}
|
|
49
|
-
notifyListeners(t, ...e) {
|
|
50
|
-
const s = this.eventHandlers.get(t);
|
|
51
|
-
s && s.notify(...e);
|
|
52
|
-
}
|
|
53
|
-
hasListeners(t) {
|
|
54
|
-
return this.eventHandlers.has(t);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Lifecycles
|
|
58
|
-
*/
|
|
59
|
-
mount(t, e = this.root.hasTreeAnimated) {
|
|
60
|
-
if (this.instance)
|
|
61
|
-
return;
|
|
62
|
-
this.isSVG = ft(t), this.instance = t;
|
|
63
|
-
const { layoutId: s, layout: o, visualElement: a } = this.options;
|
|
64
|
-
if (a && !a.current && a.mount(t), this.root.nodes.add(this), this.parent && this.parent.children.add(this), e && (o || s) && (this.isLayoutDirty = !0), i) {
|
|
65
|
-
let r;
|
|
66
|
-
const n = () => this.root.updateBlockedByResize = !1;
|
|
67
|
-
i(t, () => {
|
|
68
|
-
this.root.updateBlockedByResize = !0, r && r(), r = ct(n, 250), b.hasAnimatedSinceResize && (b.hasAnimatedSinceResize = !1, this.nodes.forEach(Z));
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
s && this.root.registerSharedNode(s, this), this.options.animate !== !1 && a && (s || o) && this.addEventListener("didUpdate", ({ delta: r, hasLayoutChanged: n, hasRelativeTargetChanged: l, layout: m }) => {
|
|
72
|
-
if (this.isTreeAnimationBlocked()) {
|
|
73
|
-
this.target = void 0, this.relativeTarget = void 0;
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const c = this.options.transition || a.getDefaultTransition() || kt, { onLayoutAnimationStart: P, onLayoutAnimationComplete: T } = a.getProps(), D = !this.targetLayout || !w(this.targetLayout, m) || l, g = !n && l;
|
|
77
|
-
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || g || n && (D || !this.currentAnimation)) {
|
|
78
|
-
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(r, g);
|
|
79
|
-
const v = {
|
|
80
|
-
...nt(c, "layout"),
|
|
81
|
-
onPlay: P,
|
|
82
|
-
onComplete: T
|
|
83
|
-
};
|
|
84
|
-
(a.shouldReduceMotion || this.options.layoutRoot) && (v.delay = 0, v.type = !1), this.startAnimation(v);
|
|
85
|
-
} else
|
|
86
|
-
n || Z(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
87
|
-
this.targetLayout = m;
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
unmount() {
|
|
91
|
-
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
92
|
-
const t = this.getStack();
|
|
93
|
-
t && t.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, I(this.updateProjection);
|
|
94
|
-
}
|
|
95
|
-
// only on the root
|
|
96
|
-
blockUpdate() {
|
|
97
|
-
this.updateManuallyBlocked = !0;
|
|
98
|
-
}
|
|
99
|
-
unblockUpdate() {
|
|
100
|
-
this.updateManuallyBlocked = !1;
|
|
101
|
-
}
|
|
102
|
-
isUpdateBlocked() {
|
|
103
|
-
return this.updateManuallyBlocked || this.updateBlockedByResize;
|
|
104
|
-
}
|
|
105
|
-
isTreeAnimationBlocked() {
|
|
106
|
-
return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
|
|
107
|
-
}
|
|
108
|
-
// Note: currently only running on root node
|
|
109
|
-
startUpdate() {
|
|
110
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Rt), this.animationId++);
|
|
111
|
-
}
|
|
112
|
-
getTransformTemplate() {
|
|
113
|
-
const { visualElement: t } = this.options;
|
|
114
|
-
return t && t.getProps().transformTemplate;
|
|
115
|
-
}
|
|
116
|
-
willUpdate(t = !0) {
|
|
117
|
-
if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
|
|
118
|
-
this.options.onExitComplete && this.options.onExitComplete();
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
if (!this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
122
|
-
return;
|
|
123
|
-
this.isLayoutDirty = !0;
|
|
124
|
-
for (let a = 0; a < this.path.length; a++) {
|
|
125
|
-
const r = this.path[a];
|
|
126
|
-
r.shouldResetTransform = !0, r.updateScroll("snapshot"), r.options.layoutRoot && r.willUpdate(!1);
|
|
127
|
-
}
|
|
128
|
-
const { layoutId: e, layout: s } = this.options;
|
|
129
|
-
if (e === void 0 && !s)
|
|
130
|
-
return;
|
|
131
|
-
const o = this.getTransformTemplate();
|
|
132
|
-
this.prevTransformTemplateValue = o ? o(this.latestValues, "") : void 0, this.updateSnapshot(), t && this.notifyListeners("willUpdate");
|
|
133
|
-
}
|
|
134
|
-
update() {
|
|
135
|
-
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
136
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Y);
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
this.isUpdating || this.nodes.forEach(Dt), this.isUpdating = !1, this.nodes.forEach(St), this.nodes.forEach(gt), this.nodes.forEach(vt), this.clearAllSnapshots();
|
|
140
|
-
const e = performance.now();
|
|
141
|
-
y.delta = pt(0, 1e3 / 60, e - y.timestamp), y.timestamp = e, y.isProcessing = !0, C.update.process(y), C.preRender.process(y), C.render.process(y), y.isProcessing = !1;
|
|
142
|
-
}
|
|
143
|
-
didUpdate() {
|
|
144
|
-
this.updateScheduled || (this.updateScheduled = !0, queueMicrotask(() => this.update()));
|
|
145
|
-
}
|
|
146
|
-
clearAllSnapshots() {
|
|
147
|
-
this.nodes.forEach(Pt), this.sharedNodes.forEach(At);
|
|
148
|
-
}
|
|
149
|
-
scheduleUpdateProjection() {
|
|
150
|
-
O.preRender(this.updateProjection, !1, !0);
|
|
151
|
-
}
|
|
152
|
-
scheduleCheckAfterUnmount() {
|
|
153
|
-
O.postRender(() => {
|
|
154
|
-
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Update measurements
|
|
159
|
-
*/
|
|
160
|
-
updateSnapshot() {
|
|
161
|
-
this.snapshot || !this.instance || (this.snapshot = this.measure());
|
|
162
|
-
}
|
|
163
|
-
updateLayout() {
|
|
164
|
-
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
|
|
165
|
-
return;
|
|
166
|
-
if (this.resumeFrom && !this.resumeFrom.instance)
|
|
167
|
-
for (let s = 0; s < this.path.length; s++)
|
|
168
|
-
this.path[s].updateScroll();
|
|
169
|
-
const t = this.layout;
|
|
170
|
-
this.layout = this.measure(!1), this.layoutCorrected = f(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
171
|
-
const { visualElement: e } = this.options;
|
|
172
|
-
e && e.notify("LayoutMeasure", this.layout.layoutBox, t ? t.layoutBox : void 0);
|
|
173
|
-
}
|
|
174
|
-
updateScroll(t = "measure") {
|
|
175
|
-
let e = !!(this.options.layoutScroll && this.instance);
|
|
176
|
-
this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === t && (e = !1), e && (this.scroll = {
|
|
177
|
-
animationId: this.root.animationId,
|
|
178
|
-
phase: t,
|
|
179
|
-
isRoot: d(this.instance),
|
|
180
|
-
offset: h(this.instance)
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
resetTransform() {
|
|
184
|
-
if (!V)
|
|
185
|
-
return;
|
|
186
|
-
const t = this.isLayoutDirty || this.shouldResetTransform, e = this.projectionDelta && !Q(this.projectionDelta), s = this.getTransformTemplate(), o = s ? s(this.latestValues, "") : void 0, a = o !== this.prevTransformTemplateValue;
|
|
187
|
-
t && (e || B(this.latestValues) || a) && (V(this.instance, o), this.shouldResetTransform = !1, this.scheduleRender());
|
|
188
|
-
}
|
|
189
|
-
measure(t = !0) {
|
|
190
|
-
const e = this.measurePageBox();
|
|
191
|
-
let s = this.removeElementScroll(e);
|
|
192
|
-
return t && (s = this.removeTransform(s)), Et(s), {
|
|
193
|
-
animationId: this.root.animationId,
|
|
194
|
-
measuredBox: e,
|
|
195
|
-
layoutBox: s,
|
|
196
|
-
latestValues: {},
|
|
197
|
-
source: this.id
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
measurePageBox() {
|
|
201
|
-
const { visualElement: t } = this.options;
|
|
202
|
-
if (!t)
|
|
203
|
-
return f();
|
|
204
|
-
const e = t.measureViewportBox(), { scroll: s } = this.root;
|
|
205
|
-
return s && (S(e.x, s.offset.x), S(e.y, s.offset.y)), e;
|
|
206
|
-
}
|
|
207
|
-
removeElementScroll(t) {
|
|
208
|
-
const e = f();
|
|
209
|
-
p(e, t);
|
|
210
|
-
for (let s = 0; s < this.path.length; s++) {
|
|
211
|
-
const o = this.path[s], { scroll: a, options: r } = o;
|
|
212
|
-
if (o !== this.root && a && r.layoutScroll) {
|
|
213
|
-
if (a.isRoot) {
|
|
214
|
-
p(e, t);
|
|
215
|
-
const { scroll: n } = this.root;
|
|
216
|
-
n && (S(e.x, -n.offset.x), S(e.y, -n.offset.y));
|
|
217
|
-
}
|
|
218
|
-
S(e.x, a.offset.x), S(e.y, a.offset.y);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
return e;
|
|
222
|
-
}
|
|
223
|
-
applyTransform(t, e = !1) {
|
|
224
|
-
const s = f();
|
|
225
|
-
p(s, t);
|
|
226
|
-
for (let o = 0; o < this.path.length; o++) {
|
|
227
|
-
const a = this.path[o];
|
|
228
|
-
!e && a.options.layoutScroll && a.scroll && a !== a.root && k(s, {
|
|
229
|
-
x: -a.scroll.offset.x,
|
|
230
|
-
y: -a.scroll.offset.y
|
|
231
|
-
}), B(a.latestValues) && k(s, a.latestValues);
|
|
232
|
-
}
|
|
233
|
-
return B(this.latestValues) && k(s, this.latestValues), s;
|
|
234
|
-
}
|
|
235
|
-
removeTransform(t) {
|
|
236
|
-
const e = f();
|
|
237
|
-
p(e, t);
|
|
238
|
-
for (let s = 0; s < this.path.length; s++) {
|
|
239
|
-
const o = this.path[s];
|
|
240
|
-
if (!o.instance || !B(o.latestValues))
|
|
241
|
-
continue;
|
|
242
|
-
G(o.latestValues) && o.updateSnapshot();
|
|
243
|
-
const a = f(), r = o.measurePageBox();
|
|
244
|
-
p(a, r), N(e, o.latestValues, o.snapshot ? o.snapshot.layoutBox : void 0, a);
|
|
245
|
-
}
|
|
246
|
-
return B(this.latestValues) && N(e, this.latestValues), e;
|
|
247
|
-
}
|
|
248
|
-
setTargetDelta(t) {
|
|
249
|
-
this.targetDelta = t, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
250
|
-
}
|
|
251
|
-
setOptions(t) {
|
|
252
|
-
this.options = {
|
|
253
|
-
...this.options,
|
|
254
|
-
...t,
|
|
255
|
-
crossfade: t.crossfade !== void 0 ? t.crossfade : !0
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
clearMeasurements() {
|
|
259
|
-
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
260
|
-
}
|
|
261
|
-
forceRelativeParentToResolveTarget() {
|
|
262
|
-
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== y.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
263
|
-
}
|
|
264
|
-
resolveTargetDelta(t = !1) {
|
|
265
|
-
var e;
|
|
266
|
-
const s = this.getLead();
|
|
267
|
-
this.isProjectionDirty || (this.isProjectionDirty = s.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = s.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = s.isSharedProjectionDirty);
|
|
268
|
-
const o = !!this.resumingFrom || this !== s;
|
|
269
|
-
if (!(t || o && this.isSharedProjectionDirty || this.isProjectionDirty || !((e = this.parent) === null || e === void 0) && e.isProjectionDirty || this.attemptToResolveRelativeTarget))
|
|
270
|
-
return;
|
|
271
|
-
const { layout: r, layoutId: n } = this.options;
|
|
272
|
-
if (!(!this.layout || !(r || n))) {
|
|
273
|
-
if (this.resolvedRelativeTargetAt = y.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
274
|
-
const l = this.getClosestProjectingParent();
|
|
275
|
-
l && l.layout && this.animationProgress !== 1 ? (this.relativeParent = l, this.forceRelativeParentToResolveTarget(), this.relativeTarget = f(), this.relativeTargetOrigin = f(), A(this.relativeTargetOrigin, this.layout.layoutBox, l.layout.layoutBox), p(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
276
|
-
}
|
|
277
|
-
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
278
|
-
if (this.target || (this.target = f(), this.targetWithTransforms = f()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), at(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : p(this.target, this.layout.layoutBox), st(this.target, this.targetDelta)) : p(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
279
|
-
this.attemptToResolveRelativeTarget = !1;
|
|
280
|
-
const l = this.getClosestProjectingParent();
|
|
281
|
-
l && !!l.resumingFrom == !!this.resumingFrom && !l.options.layoutScroll && l.target && this.animationProgress !== 1 ? (this.relativeParent = l, this.forceRelativeParentToResolveTarget(), this.relativeTarget = f(), this.relativeTargetOrigin = f(), A(this.relativeTargetOrigin, this.target, l.target), p(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
282
|
-
}
|
|
283
|
-
x.resolvedTargetDeltas++;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
getClosestProjectingParent() {
|
|
288
|
-
if (!(!this.parent || G(this.parent.latestValues) || ht(this.parent.latestValues)))
|
|
289
|
-
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
290
|
-
}
|
|
291
|
-
isProjecting() {
|
|
292
|
-
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
293
|
-
}
|
|
294
|
-
calcProjection() {
|
|
295
|
-
var t;
|
|
296
|
-
const e = this.getLead(), s = !!this.resumingFrom || this !== e;
|
|
297
|
-
let o = !0;
|
|
298
|
-
if ((this.isProjectionDirty || !((t = this.parent) === null || t === void 0) && t.isProjectionDirty) && (o = !1), s && (this.isSharedProjectionDirty || this.isTransformDirty) && (o = !1), this.resolvedRelativeTargetAt === y.timestamp && (o = !1), o)
|
|
299
|
-
return;
|
|
300
|
-
const { layout: a, layoutId: r } = this.options;
|
|
301
|
-
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(a || r))
|
|
302
|
-
return;
|
|
303
|
-
p(this.layoutCorrected, this.layout.layoutBox);
|
|
304
|
-
const n = this.treeScale.x, l = this.treeScale.y;
|
|
305
|
-
ot(this.layoutCorrected, this.treeScale, this.path, s), e.layout && !e.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (e.target = e.layout.layoutBox);
|
|
306
|
-
const { target: m } = e;
|
|
307
|
-
if (!m) {
|
|
308
|
-
this.projectionTransform && (this.projectionDelta = j(), this.projectionTransform = "none", this.scheduleRender());
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
this.projectionDelta || (this.projectionDelta = j(), this.projectionDeltaWithTransform = j());
|
|
312
|
-
const c = this.projectionTransform;
|
|
313
|
-
L(this.projectionDelta, this.layoutCorrected, m, this.latestValues), this.projectionTransform = _(this.projectionDelta, this.treeScale), (this.projectionTransform !== c || this.treeScale.x !== n || this.treeScale.y !== l) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m)), x.recalculatedProjection++;
|
|
314
|
-
}
|
|
315
|
-
hide() {
|
|
316
|
-
this.isVisible = !1;
|
|
317
|
-
}
|
|
318
|
-
show() {
|
|
319
|
-
this.isVisible = !0;
|
|
320
|
-
}
|
|
321
|
-
scheduleRender(t = !0) {
|
|
322
|
-
if (this.options.scheduleRender && this.options.scheduleRender(), t) {
|
|
323
|
-
const e = this.getStack();
|
|
324
|
-
e && e.scheduleRender();
|
|
325
|
-
}
|
|
326
|
-
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
327
|
-
}
|
|
328
|
-
setAnimationOrigin(t, e = !1) {
|
|
329
|
-
const s = this.snapshot, o = s ? s.latestValues : {}, a = { ...this.latestValues }, r = j();
|
|
330
|
-
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !e;
|
|
331
|
-
const n = f(), l = s ? s.source : void 0, m = this.layout ? this.layout.source : void 0, c = l !== m, P = this.getStack(), T = !P || P.members.length <= 1, D = !!(c && !T && this.options.crossfade === !0 && !this.path.some(Vt));
|
|
332
|
-
this.animationProgress = 0;
|
|
333
|
-
let g;
|
|
334
|
-
this.mixTargetDelta = (v) => {
|
|
335
|
-
const R = v / 1e3;
|
|
336
|
-
$(r.x, t.x, R), $(r.y, t.y, R), this.setTargetDelta(r), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (A(n, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Lt(this.relativeTarget, this.relativeTargetOrigin, n, R), g && w(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = f()), p(g, this.relativeTarget)), c && (this.animationValues = a, it(a, o, this.latestValues, R, D, T)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = R;
|
|
337
|
-
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
338
|
-
}
|
|
339
|
-
startAnimation(t) {
|
|
340
|
-
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (I(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = O.update(() => {
|
|
341
|
-
b.hasAnimatedSinceResize = !0, this.currentAnimation = mt(0, X, {
|
|
342
|
-
...t,
|
|
343
|
-
onUpdate: (e) => {
|
|
344
|
-
this.mixTargetDelta(e), t.onUpdate && t.onUpdate(e);
|
|
345
|
-
},
|
|
346
|
-
onComplete: () => {
|
|
347
|
-
t.onComplete && t.onComplete(), this.completeAnimation();
|
|
348
|
-
}
|
|
349
|
-
}), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
completeAnimation() {
|
|
353
|
-
this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
|
|
354
|
-
const t = this.getStack();
|
|
355
|
-
t && t.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
356
|
-
}
|
|
357
|
-
finishAnimation() {
|
|
358
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(X), this.currentAnimation.stop()), this.completeAnimation();
|
|
359
|
-
}
|
|
360
|
-
applyTransformsToTarget() {
|
|
361
|
-
const t = this.getLead();
|
|
362
|
-
let { targetWithTransforms: e, target: s, layout: o, latestValues: a } = t;
|
|
363
|
-
if (!(!e || !s || !o)) {
|
|
364
|
-
if (this !== t && this.layout && o && tt(this.options.animationType, this.layout.layoutBox, o.layoutBox)) {
|
|
365
|
-
s = this.target || f();
|
|
366
|
-
const r = E(this.layout.layoutBox.x);
|
|
367
|
-
s.x.min = t.target.x.min, s.x.max = s.x.min + r;
|
|
368
|
-
const n = E(this.layout.layoutBox.y);
|
|
369
|
-
s.y.min = t.target.y.min, s.y.max = s.y.min + n;
|
|
370
|
-
}
|
|
371
|
-
p(e, s), k(e, a), L(this.projectionDeltaWithTransform, this.layoutCorrected, e, a);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
registerSharedNode(t, e) {
|
|
375
|
-
this.sharedNodes.has(t) || this.sharedNodes.set(t, new lt()), this.sharedNodes.get(t).add(e);
|
|
376
|
-
const o = e.options.initialPromotionConfig;
|
|
377
|
-
e.promote({
|
|
378
|
-
transition: o ? o.transition : void 0,
|
|
379
|
-
preserveFollowOpacity: o && o.shouldPreserveFollowOpacity ? o.shouldPreserveFollowOpacity(e) : void 0
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
isLead() {
|
|
383
|
-
const t = this.getStack();
|
|
384
|
-
return t ? t.lead === this : !0;
|
|
385
|
-
}
|
|
386
|
-
getLead() {
|
|
387
|
-
var t;
|
|
388
|
-
const { layoutId: e } = this.options;
|
|
389
|
-
return e ? ((t = this.getStack()) === null || t === void 0 ? void 0 : t.lead) || this : this;
|
|
390
|
-
}
|
|
391
|
-
getPrevLead() {
|
|
392
|
-
var t;
|
|
393
|
-
const { layoutId: e } = this.options;
|
|
394
|
-
return e ? (t = this.getStack()) === null || t === void 0 ? void 0 : t.prevLead : void 0;
|
|
395
|
-
}
|
|
396
|
-
getStack() {
|
|
397
|
-
const { layoutId: t } = this.options;
|
|
398
|
-
if (t)
|
|
399
|
-
return this.root.sharedNodes.get(t);
|
|
400
|
-
}
|
|
401
|
-
promote({ needsReset: t, transition: e, preserveFollowOpacity: s } = {}) {
|
|
402
|
-
const o = this.getStack();
|
|
403
|
-
o && o.promote(this, s), t && (this.projectionDelta = void 0, this.needsReset = !0), e && this.setOptions({ transition: e });
|
|
404
|
-
}
|
|
405
|
-
relegate() {
|
|
406
|
-
const t = this.getStack();
|
|
407
|
-
return t ? t.relegate(this) : !1;
|
|
408
|
-
}
|
|
409
|
-
resetRotation() {
|
|
410
|
-
const { visualElement: t } = this.options;
|
|
411
|
-
if (!t)
|
|
412
|
-
return;
|
|
413
|
-
let e = !1;
|
|
414
|
-
const { latestValues: s } = t;
|
|
415
|
-
if ((s.rotate || s.rotateX || s.rotateY || s.rotateZ) && (e = !0), !e)
|
|
416
|
-
return;
|
|
417
|
-
const o = {};
|
|
418
|
-
for (let a = 0; a < q.length; a++) {
|
|
419
|
-
const r = "rotate" + q[a];
|
|
420
|
-
s[r] && (o[r] = s[r], t.setStaticValue(r, 0));
|
|
421
|
-
}
|
|
422
|
-
t.render();
|
|
423
|
-
for (const a in o)
|
|
424
|
-
t.setStaticValue(a, o[a]);
|
|
425
|
-
t.scheduleRender();
|
|
426
|
-
}
|
|
427
|
-
getProjectionStyles(t = {}) {
|
|
428
|
-
var e, s;
|
|
429
|
-
const o = {};
|
|
430
|
-
if (!this.instance || this.isSVG)
|
|
431
|
-
return o;
|
|
432
|
-
if (this.isVisible)
|
|
433
|
-
o.visibility = "";
|
|
434
|
-
else
|
|
435
|
-
return { visibility: "hidden" };
|
|
436
|
-
const a = this.getTransformTemplate();
|
|
437
|
-
if (this.needsReset)
|
|
438
|
-
return this.needsReset = !1, o.opacity = "", o.pointerEvents = M(t.pointerEvents) || "", o.transform = a ? a(this.latestValues, "") : "none", o;
|
|
439
|
-
const r = this.getLead();
|
|
440
|
-
if (!this.projectionDelta || !this.layout || !r.target) {
|
|
441
|
-
const c = {};
|
|
442
|
-
return this.options.layoutId && (c.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, c.pointerEvents = M(t.pointerEvents) || ""), this.hasProjected && !B(this.latestValues) && (c.transform = a ? a({}, "") : "none", this.hasProjected = !1), c;
|
|
443
|
-
}
|
|
444
|
-
const n = r.animationValues || r.latestValues;
|
|
445
|
-
this.applyTransformsToTarget(), o.transform = _(this.projectionDeltaWithTransform, this.treeScale, n), a && (o.transform = a(n, o.transform));
|
|
446
|
-
const { x: l, y: m } = this.projectionDelta;
|
|
447
|
-
o.transformOrigin = `${l.origin * 100}% ${m.origin * 100}% 0`, r.animationValues ? o.opacity = r === this ? (s = (e = n.opacity) !== null && e !== void 0 ? e : this.latestValues.opacity) !== null && s !== void 0 ? s : 1 : this.preserveOpacity ? this.latestValues.opacity : n.opacityExit : o.opacity = r === this ? n.opacity !== void 0 ? n.opacity : "" : n.opacityExit !== void 0 ? n.opacityExit : 0;
|
|
448
|
-
for (const c in z) {
|
|
449
|
-
if (n[c] === void 0)
|
|
450
|
-
continue;
|
|
451
|
-
const { correct: P, applyTo: T } = z[c], D = o.transform === "none" ? n[c] : P(n[c], r);
|
|
452
|
-
if (T) {
|
|
453
|
-
const g = T.length;
|
|
454
|
-
for (let v = 0; v < g; v++)
|
|
455
|
-
o[T[v]] = D;
|
|
456
|
-
} else
|
|
457
|
-
o[c] = D;
|
|
458
|
-
}
|
|
459
|
-
return this.options.layoutId && (o.pointerEvents = r === this ? M(t.pointerEvents) || "" : "none"), o;
|
|
460
|
-
}
|
|
461
|
-
clearSnapshot() {
|
|
462
|
-
this.resumeFrom = this.snapshot = void 0;
|
|
463
|
-
}
|
|
464
|
-
// Only run on root
|
|
465
|
-
resetTree() {
|
|
466
|
-
this.root.nodes.forEach((t) => {
|
|
467
|
-
var e;
|
|
468
|
-
return (e = t.currentAnimation) === null || e === void 0 ? void 0 : e.stop();
|
|
469
|
-
}), this.root.nodes.forEach(Y), this.root.sharedNodes.clear();
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
}
|
|
473
|
-
function gt(i) {
|
|
474
|
-
i.updateLayout();
|
|
475
|
-
}
|
|
476
|
-
function vt(i) {
|
|
477
|
-
var u;
|
|
478
|
-
const h = ((u = i.resumeFrom) === null || u === void 0 ? void 0 : u.snapshot) || i.snapshot;
|
|
479
|
-
if (i.isLead() && i.layout && h && i.hasListeners("didUpdate")) {
|
|
480
|
-
const { layoutBox: d, measuredBox: V } = i.layout, { animationType: U } = i.options, t = h.source !== i.layout.source;
|
|
481
|
-
U === "size" ? H((r) => {
|
|
482
|
-
const n = t ? h.measuredBox[r] : h.layoutBox[r], l = E(n);
|
|
483
|
-
n.min = d[r].min, n.max = n.min + l;
|
|
484
|
-
}) : tt(U, h.layoutBox, d) && H((r) => {
|
|
485
|
-
const n = t ? h.measuredBox[r] : h.layoutBox[r], l = E(d[r]);
|
|
486
|
-
n.max = n.min + l, i.relativeTarget && !i.currentAnimation && (i.isProjectionDirty = !0, i.relativeTarget[r].max = i.relativeTarget[r].min + l);
|
|
487
|
-
});
|
|
488
|
-
const e = j();
|
|
489
|
-
L(e, d, h.layoutBox);
|
|
490
|
-
const s = j();
|
|
491
|
-
t ? L(s, i.applyTransform(V, !0), h.measuredBox) : L(s, d, h.layoutBox);
|
|
492
|
-
const o = !Q(e);
|
|
493
|
-
let a = !1;
|
|
494
|
-
if (!i.resumeFrom) {
|
|
495
|
-
const r = i.getClosestProjectingParent();
|
|
496
|
-
if (r && !r.resumeFrom) {
|
|
497
|
-
const { snapshot: n, layout: l } = r;
|
|
498
|
-
if (n && l) {
|
|
499
|
-
const m = f();
|
|
500
|
-
A(m, h.layoutBox, n.layoutBox);
|
|
501
|
-
const c = f();
|
|
502
|
-
A(c, d, l.layoutBox), w(m, c) || (a = !0), r.options.layoutRoot && (i.relativeTarget = c, i.relativeTargetOrigin = m, i.relativeParent = r);
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
i.notifyListeners("didUpdate", {
|
|
507
|
-
layout: d,
|
|
508
|
-
snapshot: h,
|
|
509
|
-
delta: s,
|
|
510
|
-
layoutDelta: e,
|
|
511
|
-
hasLayoutChanged: o,
|
|
512
|
-
hasRelativeTargetChanged: a
|
|
513
|
-
});
|
|
514
|
-
} else if (i.isLead()) {
|
|
515
|
-
const { onExitComplete: d } = i.options;
|
|
516
|
-
d && d();
|
|
517
|
-
}
|
|
518
|
-
i.options.transition = void 0;
|
|
519
|
-
}
|
|
520
|
-
function Tt(i) {
|
|
521
|
-
x.totalNodes++, i.parent && (i.isProjecting() || (i.isProjectionDirty = i.parent.isProjectionDirty), i.isSharedProjectionDirty || (i.isSharedProjectionDirty = !!(i.isProjectionDirty || i.parent.isProjectionDirty || i.parent.isSharedProjectionDirty)), i.isTransformDirty || (i.isTransformDirty = i.parent.isTransformDirty));
|
|
522
|
-
}
|
|
523
|
-
function xt(i) {
|
|
524
|
-
i.isProjectionDirty = i.isSharedProjectionDirty = i.isTransformDirty = !1;
|
|
525
|
-
}
|
|
526
|
-
function Pt(i) {
|
|
527
|
-
i.clearSnapshot();
|
|
528
|
-
}
|
|
529
|
-
function Y(i) {
|
|
530
|
-
i.clearMeasurements();
|
|
531
|
-
}
|
|
532
|
-
function Dt(i) {
|
|
533
|
-
i.isLayoutDirty = !1;
|
|
534
|
-
}
|
|
535
|
-
function St(i) {
|
|
536
|
-
const { visualElement: u } = i.options;
|
|
537
|
-
u && u.getProps().onBeforeLayoutMeasure && u.notify("BeforeLayoutMeasure"), i.resetTransform();
|
|
538
|
-
}
|
|
539
|
-
function Z(i) {
|
|
540
|
-
i.finishAnimation(), i.targetDelta = i.relativeTarget = i.target = void 0, i.isProjectionDirty = !0;
|
|
541
|
-
}
|
|
542
|
-
function Bt(i) {
|
|
543
|
-
i.resolveTargetDelta();
|
|
544
|
-
}
|
|
545
|
-
function jt(i) {
|
|
546
|
-
i.calcProjection();
|
|
547
|
-
}
|
|
548
|
-
function Rt(i) {
|
|
549
|
-
i.resetRotation();
|
|
550
|
-
}
|
|
551
|
-
function At(i) {
|
|
552
|
-
i.removeLeadSnapshot();
|
|
553
|
-
}
|
|
554
|
-
function $(i, u, h) {
|
|
555
|
-
i.translate = F(u.translate, 0, h), i.scale = F(u.scale, 1, h), i.origin = u.origin, i.originPoint = u.originPoint;
|
|
556
|
-
}
|
|
557
|
-
function J(i, u, h, d) {
|
|
558
|
-
i.min = F(u.min, h.min, d), i.max = F(u.max, h.max, d);
|
|
559
|
-
}
|
|
560
|
-
function Lt(i, u, h, d) {
|
|
561
|
-
J(i.x, u.x, h.x, d), J(i.y, u.y, h.y, d);
|
|
562
|
-
}
|
|
563
|
-
function Vt(i) {
|
|
564
|
-
return i.animationValues && i.animationValues.opacityExit !== void 0;
|
|
565
|
-
}
|
|
566
|
-
const kt = {
|
|
567
|
-
duration: 0.45,
|
|
568
|
-
ease: [0.4, 0, 0.1, 1]
|
|
569
|
-
};
|
|
570
|
-
function K(i) {
|
|
571
|
-
i.min = Math.round(i.min), i.max = Math.round(i.max);
|
|
572
|
-
}
|
|
573
|
-
function Et(i) {
|
|
574
|
-
K(i.x), K(i.y);
|
|
575
|
-
}
|
|
576
|
-
function tt(i, u, h) {
|
|
577
|
-
return i === "position" || i === "preserve-aspect" && !rt(W(u), W(h), 0.2);
|
|
578
|
-
}
|
|
579
4
|
export {
|
|
580
|
-
|
|
581
|
-
oe as createProjectionNode,
|
|
582
|
-
J as mixAxis,
|
|
583
|
-
$ as mixAxisDelta,
|
|
584
|
-
Lt as mixBox,
|
|
585
|
-
Tt as propagateDirtyNodes
|
|
5
|
+
t as instantAnimationState
|
|
586
6
|
};
|
package/dist/lyra237.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./lyra236.cjs"),c=require("./lyra213.cjs"),r=t.createProjectionNode({attachResizeListener:(e,o)=>c.addDomEvent(e,"resize",o),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});exports.DocumentProjectionNode=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./lyra134.cjs"),X=require("./lyra139.cjs"),Y=require("./lyra282.cjs"),y=require("./lyra283.cjs"),g=require("./lyra284.cjs"),m=require("./lyra203.cjs"),I=require("./lyra285.cjs"),u=require("./lyra135.cjs"),J=require("./lyra281.cjs"),j=require("./lyra286.cjs"),K=require("./lyra287.cjs"),O=require("./lyra151.cjs"),b=require("./lyra288.cjs"),M=require("./lyra289.cjs"),D=require("./lyra290.cjs"),Q=require("./lyra176.cjs"),F=require("./lyra112.cjs"),U=require("./lyra258.cjs"),tt=require("./lyra191.cjs"),k=require("./lyra181.cjs"),et=require("./lyra291.cjs"),it=require("./lyra292.cjs"),st=require("./lyra246.cjs"),at=require("./lyra159.cjs"),v=require("./lyra179.cjs"),N=["","X","Y","Z"],w=1e3;let ot=0;const S={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function rt({attachResizeListener:i,defaultParent:c,measureScroll:h,checkIsScrollRoot:f,resetTransform:L}){return class{constructor(t={},e=c==null?void 0:c()){this.id=ot++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{S.totalNodes=S.resolvedTargetDeltas=S.recalculatedProjection=0,this.nodes.forEach(H),this.nodes.forEach(dt),this.nodes.forEach(ft),this.nodes.forEach(G),et.record(S)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let s=0;s<this.path.length;s++)this.path[s].shouldResetTransform=!0;this.root===this&&(this.nodes=new Q.FlatTree)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new X.SubscriptionManager),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const s=this.eventHandlers.get(t);s&&s.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(t,e=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=it.isSVGElement(t),this.instance=t;const{layoutId:s,layout:a,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),e&&(a||s)&&(this.isLayoutDirty=!0),i){let r;const n=()=>this.root.updateBlockedByResize=!1;i(t,()=>{this.root.updateBlockedByResize=!0,r&&r(),r=tt.delay(n,250),U.globalProjectionState.hasAnimatedSinceResize&&(U.globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(z))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&o&&(s||a)&&this.addEventListener("didUpdate",({delta:r,hasLayoutChanged:n,hasRelativeTargetChanged:l,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const d=this.options.transition||o.getDefaultTransition()||gt,{onLayoutAnimationStart:A,onLayoutAnimationComplete:B}=o.getProps(),R=!this.targetLayout||!j.boxEquals(this.targetLayout,p)||l,T=!n&&l;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||n&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(r,T);const x={...J.getValueTransition(d,"layout"),onPlay:A,onComplete:B};(o.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else n||z(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,P.cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(mt),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const r=this.path[o];r.shouldResetTransform=!0,r.updateScroll("snapshot"),r.options.layoutRoot&&r.willUpdate(!1)}const{layoutId:e,layout:s}=this.options;if(e===void 0&&!s)return;const a=this.getTransformTemplate();this.prevTransformTemplateValue=a?a(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(W);return}this.isUpdating||this.nodes.forEach(ct),this.isUpdating=!1,this.nodes.forEach(ut),this.nodes.forEach(nt),this.nodes.forEach(lt),this.clearAllSnapshots();const e=performance.now();v.frameData.delta=at.clamp(0,1e3/60,e-v.frameData.timestamp),v.frameData.timestamp=e,v.frameData.isProcessing=!0,P.steps.update.process(v.frameData),P.steps.preRender.process(v.frameData),P.steps.render.process(v.frameData),v.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(ht),this.sharedNodes.forEach(pt)}scheduleUpdateProjection(){P.frame.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){P.frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let s=0;s<this.path.length;s++)this.path[s].updateScroll();const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=u.createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:f(this.instance),offset:h(this.instance)})}resetTransform(){if(!L)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!j.isDeltaZero(this.projectionDelta),s=this.getTransformTemplate(),a=s?s(this.latestValues,""):void 0,o=a!==this.prevTransformTemplateValue;t&&(e||D.hasTransform(this.latestValues)||o)&&(L(this.instance,a),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let s=this.removeElementScroll(e);return t&&(s=this.removeTransform(s)),vt(s),{animationId:this.root.animationId,measuredBox:e,layoutBox:s,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return u.createBox();const e=t.measureViewportBox(),{scroll:s}=this.root;return s&&(g.translateAxis(e.x,s.offset.x),g.translateAxis(e.y,s.offset.y)),e}removeElementScroll(t){const e=u.createBox();y.copyBoxInto(e,t);for(let s=0;s<this.path.length;s++){const a=this.path[s],{scroll:o,options:r}=a;if(a!==this.root&&o&&r.layoutScroll){if(o.isRoot){y.copyBoxInto(e,t);const{scroll:n}=this.root;n&&(g.translateAxis(e.x,-n.offset.x),g.translateAxis(e.y,-n.offset.y))}g.translateAxis(e.x,o.offset.x),g.translateAxis(e.y,o.offset.y)}}return e}applyTransform(t,e=!1){const s=u.createBox();y.copyBoxInto(s,t);for(let a=0;a<this.path.length;a++){const o=this.path[a];!e&&o.options.layoutScroll&&o.scroll&&o!==o.root&&g.transformBox(s,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),D.hasTransform(o.latestValues)&&g.transformBox(s,o.latestValues)}return D.hasTransform(this.latestValues)&&g.transformBox(s,this.latestValues),s}removeTransform(t){const e=u.createBox();y.copyBoxInto(e,t);for(let s=0;s<this.path.length;s++){const a=this.path[s];if(!a.instance||!D.hasTransform(a.latestValues))continue;D.hasScale(a.latestValues)&&a.updateSnapshot();const o=u.createBox(),r=a.measurePageBox();y.copyBoxInto(o,r),I.removeBoxTransforms(e,a.latestValues,a.snapshot?a.snapshot.layoutBox:void 0,o)}return D.hasTransform(this.latestValues)&&I.removeBoxTransforms(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:t.crossfade!==void 0?t.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==v.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const a=!!this.resumingFrom||this!==s;if(!(t||a&&this.isSharedProjectionDirty||this.isProjectionDirty||!((e=this.parent)===null||e===void 0)&&e.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:r,layoutId:n}=this.options;if(!(!this.layout||!(r||n))){if(this.resolvedRelativeTargetAt=v.frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const l=this.getClosestProjectingParent();l&&l.layout&&this.animationProgress!==1?(this.relativeParent=l,this.forceRelativeParentToResolveTarget(),this.relativeTarget=u.createBox(),this.relativeTargetOrigin=u.createBox(),m.calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,l.layout.layoutBox),y.copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=u.createBox(),this.targetWithTransforms=u.createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),m.calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):y.copyBoxInto(this.target,this.layout.layoutBox),g.applyBoxDelta(this.target,this.targetDelta)):y.copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const l=this.getClosestProjectingParent();l&&!!l.resumingFrom==!!this.resumingFrom&&!l.options.layoutScroll&&l.target&&this.animationProgress!==1?(this.relativeParent=l,this.forceRelativeParentToResolveTarget(),this.relativeTarget=u.createBox(),this.relativeTargetOrigin=u.createBox(),m.calcRelativePosition(this.relativeTargetOrigin,this.target,l.target),y.copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}S.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||D.hasScale(this.parent.latestValues)||D.has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),s=!!this.resumingFrom||this!==e;let a=!0;if((this.isProjectionDirty||!((t=this.parent)===null||t===void 0)&&t.isProjectionDirty)&&(a=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(a=!1),this.resolvedRelativeTargetAt===v.frameData.timestamp&&(a=!1),a)return;const{layout:o,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(o||r))return;y.copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const n=this.treeScale.x,l=this.treeScale.y;g.applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,s),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox);const{target:p}=e;if(!p){this.projectionTransform&&(this.projectionDelta=u.createDelta(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=u.createDelta(),this.projectionDeltaWithTransform=u.createDelta());const d=this.projectionTransform;m.calcBoxDelta(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=b.buildProjectionTransform(this.projectionDelta,this.treeScale),(this.projectionTransform!==d||this.treeScale.x!==n||this.treeScale.y!==l)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),S.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const s=this.snapshot,a=s?s.latestValues:{},o={...this.latestValues},r=u.createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const n=u.createBox(),l=s?s.source:void 0,p=this.layout?this.layout.source:void 0,d=l!==p,A=this.getStack(),B=!A||A.members.length<=1,R=!!(d&&!B&&this.options.crossfade===!0&&!this.path.some(yt));this.animationProgress=0;let T;this.mixTargetDelta=x=>{const V=x/1e3;C(r.x,t.x,V),C(r.y,t.y,V),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(m.calcRelativePosition(n,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Z(this.relativeTarget,this.relativeTargetOrigin,n,V),T&&j.boxEquals(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=u.createBox()),y.copyBoxInto(T,this.relativeTarget)),d&&(this.animationValues=o,Y.mixValues(o,a,this.latestValues,V,R,B)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(P.cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=P.frame.update(()=>{U.globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=st.animateSingleValue(0,w,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(w),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:s,layout:a,latestValues:o}=t;if(!(!e||!s||!a)){if(this!==t&&this.layout&&a&&$(this.options.animationType,this.layout.layoutBox,a.layoutBox)){s=this.target||u.createBox();const r=m.calcLength(this.layout.layoutBox.x);s.x.min=t.target.x.min,s.x.max=s.x.min+r;const n=m.calcLength(this.layout.layoutBox.y);s.y.min=t.target.y.min,s.y.max=s.y.min+n}y.copyBoxInto(e,s),g.transformBox(e,o),m.calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new K.NodeStack),this.sharedNodes.get(t).add(e);const a=e.options.initialPromotionConfig;e.promote({transition:a?a.transition:void 0,preserveFollowOpacity:a&&a.shouldPreserveFollowOpacity?a.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return t?t.lead===this:!0}getLead(){var t;const{layoutId:e}=this.options;return e?((t=this.getStack())===null||t===void 0?void 0:t.lead)||this:this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?(t=this.getStack())===null||t===void 0?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:s}={}){const a=this.getStack();a&&a.promote(this,s),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return t?t.relegate(this):!1}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:s}=t;if((s.rotate||s.rotateX||s.rotateY||s.rotateZ)&&(e=!0),!e)return;const a={};for(let o=0;o<N.length;o++){const r="rotate"+N[o];s[r]&&(a[r]=s[r],t.setStaticValue(r,0))}t.render();for(const o in a)t.setStaticValue(o,a[o]);t.scheduleRender()}getProjectionStyles(t={}){var e,s;const a={};if(!this.instance||this.isSVG)return a;if(this.isVisible)a.visibility="";else return{visibility:"hidden"};const o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=F.resolveMotionValue(t.pointerEvents)||"",a.transform=o?o(this.latestValues,""):"none",a;const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){const d={};return this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=F.resolveMotionValue(t.pointerEvents)||""),this.hasProjected&&!D.hasTransform(this.latestValues)&&(d.transform=o?o({},""):"none",this.hasProjected=!1),d}const n=r.animationValues||r.latestValues;this.applyTransformsToTarget(),a.transform=b.buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,n),o&&(a.transform=o(n,a.transform));const{x:l,y:p}=this.projectionDelta;a.transformOrigin=`${l.origin*100}% ${p.origin*100}% 0`,r.animationValues?a.opacity=r===this?(s=(e=n.opacity)!==null&&e!==void 0?e:this.latestValues.opacity)!==null&&s!==void 0?s:1:this.preserveOpacity?this.latestValues.opacity:n.opacityExit:a.opacity=r===this?n.opacity!==void 0?n.opacity:"":n.opacityExit!==void 0?n.opacityExit:0;for(const d in O.scaleCorrectors){if(n[d]===void 0)continue;const{correct:A,applyTo:B}=O.scaleCorrectors[d],R=a.transform==="none"?n[d]:A(n[d],r);if(B){const T=B.length;for(let x=0;x<T;x++)a[B[x]]=R}else a[d]=R}return this.options.layoutId&&(a.pointerEvents=r===this?F.resolveMotionValue(t.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return(e=t.currentAnimation)===null||e===void 0?void 0:e.stop()}),this.root.nodes.forEach(W),this.root.sharedNodes.clear()}}}function nt(i){i.updateLayout()}function lt(i){var c;const h=((c=i.resumeFrom)===null||c===void 0?void 0:c.snapshot)||i.snapshot;if(i.isLead()&&i.layout&&h&&i.hasListeners("didUpdate")){const{layoutBox:f,measuredBox:L}=i.layout,{animationType:E}=i.options,t=h.source!==i.layout.source;E==="size"?M.eachAxis(r=>{const n=t?h.measuredBox[r]:h.layoutBox[r],l=m.calcLength(n);n.min=f[r].min,n.max=n.min+l}):$(E,h.layoutBox,f)&&M.eachAxis(r=>{const n=t?h.measuredBox[r]:h.layoutBox[r],l=m.calcLength(f[r]);n.max=n.min+l,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[r].max=i.relativeTarget[r].min+l)});const e=u.createDelta();m.calcBoxDelta(e,f,h.layoutBox);const s=u.createDelta();t?m.calcBoxDelta(s,i.applyTransform(L,!0),h.measuredBox):m.calcBoxDelta(s,f,h.layoutBox);const a=!j.isDeltaZero(e);let o=!1;if(!i.resumeFrom){const r=i.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:n,layout:l}=r;if(n&&l){const p=u.createBox();m.calcRelativePosition(p,h.layoutBox,n.layoutBox);const d=u.createBox();m.calcRelativePosition(d,f,l.layoutBox),j.boxEquals(p,d)||(o=!0),r.options.layoutRoot&&(i.relativeTarget=d,i.relativeTargetOrigin=p,i.relativeParent=r)}}}i.notifyListeners("didUpdate",{layout:f,snapshot:h,delta:s,layoutDelta:e,hasLayoutChanged:a,hasRelativeTargetChanged:o})}else if(i.isLead()){const{onExitComplete:f}=i.options;f&&f()}i.options.transition=void 0}function H(i){S.totalNodes++,i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function G(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function ht(i){i.clearSnapshot()}function W(i){i.clearMeasurements()}function ct(i){i.isLayoutDirty=!1}function ut(i){const{visualElement:c}=i.options;c&&c.getProps().onBeforeLayoutMeasure&&c.notify("BeforeLayoutMeasure"),i.resetTransform()}function z(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function dt(i){i.resolveTargetDelta()}function ft(i){i.calcProjection()}function mt(i){i.resetRotation()}function pt(i){i.removeLeadSnapshot()}function C(i,c,h){i.translate=k.mix(c.translate,0,h),i.scale=k.mix(c.scale,1,h),i.origin=c.origin,i.originPoint=c.originPoint}function q(i,c,h,f){i.min=k.mix(c.min,h.min,f),i.max=k.mix(c.max,h.max,f)}function Z(i,c,h,f){q(i.x,c.x,h.x,f),q(i.y,c.y,h.y,f)}function yt(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const gt={duration:.45,ease:[.4,0,.1,1]};function _(i){i.min=Math.round(i.min),i.max=Math.round(i.max)}function vt(i){_(i.x),_(i.y)}function $(i,c,h){return i==="position"||i==="preserve-aspect"&&!m.isNear(j.aspectRatio(c),j.aspectRatio(h),.2)}exports.cleanDirtyNodes=G;exports.createProjectionNode=rt;exports.mixAxis=q;exports.mixAxisDelta=C;exports.mixBox=Z;exports.propagateDirtyNodes=H;
|