@new-black/lyra 0.0.25 → 0.0.26
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 +1 -0
- package/dist/components/inputs/index.d.ts +1 -0
- package/dist/components/inputs/index.d.ts.map +1 -1
- package/dist/components/inputs/slider/index.d.ts +3 -0
- package/dist/components/inputs/slider/index.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.d.ts +19 -0
- package/dist/components/inputs/slider/slider.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.styles.d.ts +11 -0
- package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -0
- package/dist/lyra.cjs +1 -1
- package/dist/lyra.js +67 -61
- package/dist/lyra10.cjs +1 -1
- package/dist/lyra10.js +36 -34
- package/dist/lyra100.cjs +1 -1
- package/dist/lyra100.js +18 -96
- package/dist/lyra101.cjs +1 -1
- package/dist/lyra101.js +2 -22
- package/dist/lyra102.cjs +1 -1
- package/dist/lyra102.js +2 -36
- package/dist/lyra103.cjs +1 -1
- package/dist/lyra103.js +5 -133
- package/dist/lyra104.cjs +1 -1
- package/dist/lyra104.js +133 -776
- package/dist/lyra105.cjs +1 -1
- package/dist/lyra105.js +2 -24
- package/dist/lyra106.cjs +1 -1
- package/dist/lyra106.js +2 -6
- package/dist/lyra107.js +2 -2
- package/dist/lyra108.cjs +1 -1
- package/dist/lyra108.js +13 -2
- package/dist/lyra109.cjs +1 -1
- package/dist/lyra109.js +25 -2
- package/dist/lyra11.cjs +1 -1
- package/dist/lyra11.js +2 -2
- package/dist/lyra110.cjs +1 -1
- package/dist/lyra110.js +11 -138
- package/dist/lyra111.cjs +1 -1
- package/dist/lyra111.js +39 -2
- package/dist/lyra112.cjs +1 -1
- package/dist/lyra112.js +1999 -12
- package/dist/lyra113.cjs +1 -1
- package/dist/lyra113.js +5 -23
- package/dist/lyra114.cjs +1 -1
- package/dist/lyra114.js +71 -10
- package/dist/lyra115.cjs +1 -1
- package/dist/lyra115.js +6 -39
- package/dist/lyra116.cjs +1 -1
- package/dist/lyra116.js +20 -1992
- package/dist/lyra117.cjs +1 -1
- package/dist/lyra117.js +25 -5
- package/dist/lyra118.cjs +1 -1
- package/dist/lyra118.js +97 -71
- package/dist/lyra119.cjs +1 -1
- package/dist/lyra119.js +24 -17
- package/dist/lyra12.cjs +1 -1
- package/dist/lyra12.js +9 -7
- package/dist/lyra120.cjs +1 -1
- package/dist/lyra120.js +36 -991
- package/dist/lyra121.cjs +1 -1
- package/dist/lyra121.js +134 -2
- package/dist/lyra122.cjs +1 -1
- package/dist/lyra122.js +779 -24
- package/dist/lyra123.cjs +1 -1
- package/dist/lyra123.js +24 -2
- package/dist/lyra124.cjs +1 -1
- package/dist/lyra124.js +123 -17
- package/dist/lyra125.cjs +1 -1
- package/dist/lyra125.js +17 -16
- package/dist/lyra126.cjs +1 -1
- package/dist/lyra126.js +990 -17
- package/dist/lyra127.cjs +1 -1
- package/dist/lyra127.js +2 -11
- package/dist/lyra128.cjs +1 -1
- package/dist/lyra128.js +27 -16
- package/dist/lyra129.cjs +1 -1
- package/dist/lyra129.js +2 -5
- package/dist/lyra13.cjs +1 -1
- package/dist/lyra13.js +3 -3
- package/dist/lyra130.cjs +1 -1
- package/dist/lyra130.js +3 -9
- package/dist/lyra131.cjs +1 -1
- package/dist/lyra131.js +97 -9
- package/dist/lyra132.cjs +1 -1
- package/dist/lyra132.js +25 -8
- package/dist/lyra133.cjs +1 -1
- package/dist/lyra133.js +38 -37
- package/dist/lyra134.cjs +1 -1
- package/dist/lyra134.js +2 -3
- package/dist/lyra135.cjs +9 -1
- package/dist/lyra135.js +48 -4
- package/dist/lyra136.cjs +9 -1
- package/dist/lyra136.js +82 -4
- package/dist/lyra137.cjs +1 -1
- package/dist/lyra137.js +2 -10
- package/dist/lyra138.cjs +1 -1
- package/dist/lyra138.js +17 -6
- package/dist/lyra139.cjs +1 -1
- package/dist/lyra139.js +14 -4
- package/dist/lyra14.cjs +1 -1
- package/dist/lyra14.js +13 -11
- package/dist/lyra140.cjs +1 -1
- package/dist/lyra140.js +19 -2
- package/dist/lyra141.cjs +1 -1
- package/dist/lyra141.js +10 -17
- package/dist/lyra142.cjs +1 -1
- package/dist/lyra142.js +15 -14
- package/dist/lyra143.cjs +1 -1
- package/dist/lyra143.js +5 -33
- package/dist/lyra144.cjs +1 -1
- package/dist/lyra144.js +9 -30
- package/dist/lyra145.cjs +1 -1
- package/dist/lyra145.js +9 -38
- package/dist/lyra146.cjs +1 -1
- package/dist/lyra146.js +8 -9
- package/dist/lyra147.cjs +1 -1
- package/dist/lyra147.js +38 -3
- package/dist/lyra148.cjs +1 -1
- package/dist/lyra148.js +3 -48
- package/dist/lyra149.cjs +1 -1
- package/dist/lyra149.js +4 -7
- package/dist/lyra15.cjs +1 -1
- package/dist/lyra15.js +3 -3
- package/dist/lyra150.cjs +1 -1
- package/dist/lyra150.js +5 -3
- package/dist/lyra151.cjs +1 -1
- package/dist/lyra151.js +10 -28
- package/dist/lyra152.cjs +1 -1
- package/dist/lyra152.js +6 -15
- package/dist/lyra153.cjs +1 -1
- package/dist/lyra153.js +4 -11
- package/dist/lyra154.cjs +1 -1
- package/dist/lyra154.js +2 -9
- package/dist/lyra155.cjs +1 -1
- package/dist/lyra155.js +18 -2
- package/dist/lyra156.cjs +1 -1
- package/dist/lyra156.js +14 -3
- package/dist/lyra157.cjs +1 -1
- package/dist/lyra157.js +33 -3
- package/dist/lyra158.cjs +1 -1
- package/dist/lyra158.js +30 -2
- package/dist/lyra159.cjs +1 -1
- package/dist/lyra159.js +38 -257
- package/dist/lyra16.cjs +1 -1
- package/dist/lyra16.js +19 -17
- package/dist/lyra160.cjs +1 -1
- package/dist/lyra160.js +9 -24
- package/dist/lyra161.cjs +1 -1
- package/dist/lyra161.js +3 -16
- package/dist/lyra162.cjs +1 -1
- package/dist/lyra162.js +47 -3
- package/dist/lyra163.cjs +1 -1
- package/dist/lyra163.js +7 -11
- package/dist/lyra164.cjs +1 -1
- package/dist/lyra164.js +3 -3
- package/dist/lyra165.cjs +1 -1
- package/dist/lyra165.js +27 -26
- package/dist/lyra166.cjs +1 -1
- package/dist/lyra166.js +15 -200
- package/dist/lyra167.cjs +1 -1
- package/dist/lyra167.js +10 -4
- package/dist/lyra168.cjs +1 -1
- package/dist/lyra168.js +9 -21
- package/dist/lyra169.cjs +1 -1
- package/dist/lyra169.js +2 -11
- package/dist/lyra17.cjs +1 -1
- package/dist/lyra17.js +32 -30
- package/dist/lyra170.cjs +1 -1
- package/dist/lyra170.js +3 -4
- package/dist/lyra171.cjs +1 -1
- package/dist/lyra171.js +3 -26
- package/dist/lyra172.cjs +1 -1
- package/dist/lyra172.js +2 -4
- package/dist/lyra173.cjs +1 -1
- package/dist/lyra173.js +258 -4
- package/dist/lyra174.cjs +1 -1
- package/dist/lyra174.js +16 -25
- package/dist/lyra175.cjs +1 -1
- package/dist/lyra175.js +4 -11
- package/dist/lyra176.cjs +1 -1
- package/dist/lyra176.js +11 -2
- package/dist/lyra177.cjs +1 -1
- package/dist/lyra177.js +3 -6
- package/dist/lyra178.cjs +1 -1
- package/dist/lyra178.js +25 -17
- package/dist/lyra179.cjs +1 -1
- package/dist/lyra179.js +198 -117
- package/dist/lyra18.cjs +1 -1
- package/dist/lyra18.js +2 -2
- package/dist/lyra180.cjs +1 -1
- package/dist/lyra180.js +4 -27
- package/dist/lyra181.cjs +1 -1
- package/dist/lyra181.js +21 -63
- package/dist/lyra182.cjs +1 -1
- package/dist/lyra182.js +10 -33
- package/dist/lyra183.cjs +1 -1
- package/dist/lyra183.js +4 -15
- package/dist/lyra184.cjs +1 -1
- package/dist/lyra184.js +24 -39
- package/dist/lyra185.cjs +1 -1
- package/dist/lyra185.js +4 -2
- package/dist/lyra186.cjs +1 -1
- package/dist/lyra186.js +5 -3
- package/dist/lyra187.cjs +1 -1
- package/dist/lyra187.js +25 -11
- package/dist/lyra188.cjs +1 -1
- package/dist/lyra188.js +11 -10
- package/dist/lyra189.cjs +1 -1
- package/dist/lyra189.js +2 -9
- package/dist/lyra19.cjs +1 -1
- package/dist/lyra19.js +80 -121
- package/dist/lyra190.cjs +1 -1
- package/dist/lyra190.js +7 -17
- package/dist/lyra191.cjs +1 -1
- package/dist/lyra191.js +6 -10
- package/dist/lyra192.cjs +1 -1
- package/dist/lyra192.js +19 -14
- package/dist/lyra193.cjs +1 -1
- package/dist/lyra193.js +115 -61
- package/dist/lyra194.cjs +1 -1
- package/dist/lyra194.js +28 -4
- package/dist/lyra195.cjs +1 -1
- package/dist/lyra195.js +63 -2
- package/dist/lyra196.cjs +1 -1
- package/dist/lyra196.js +34 -15
- package/dist/lyra197.cjs +1 -1
- package/dist/lyra197.js +13 -15
- package/dist/lyra198.cjs +1 -1
- package/dist/lyra198.js +41 -4
- package/dist/lyra199.cjs +1 -1
- package/dist/lyra199.js +2 -2
- package/dist/lyra2.cjs +1 -1
- package/dist/lyra2.js +9 -9
- package/dist/lyra20.cjs +1 -1
- package/dist/lyra20.js +62 -126
- package/dist/lyra200.cjs +1 -1
- package/dist/lyra200.js +3 -7
- package/dist/lyra201.cjs +1 -1
- package/dist/lyra201.js +10 -52
- package/dist/lyra202.cjs +1 -1
- package/dist/lyra202.js +10 -17
- package/dist/lyra203.cjs +1 -1
- package/dist/lyra203.js +8 -8
- package/dist/lyra204.cjs +1 -1
- package/dist/lyra204.js +17 -2
- package/dist/lyra205.cjs +1 -1
- package/dist/lyra205.js +9 -5
- package/dist/lyra206.cjs +1 -1
- package/dist/lyra206.js +14 -4
- package/dist/lyra207.cjs +1 -1
- package/dist/lyra207.js +65 -2
- package/dist/lyra208.cjs +1 -1
- package/dist/lyra208.js +4 -2
- package/dist/lyra209.cjs +1 -1
- package/dist/lyra209.js +2 -5
- package/dist/lyra21.cjs +1 -1
- package/dist/lyra21.js +121 -62
- package/dist/lyra210.cjs +1 -1
- package/dist/lyra210.js +15 -3
- package/dist/lyra211.cjs +1 -1
- package/dist/lyra211.js +16 -7
- package/dist/lyra212.cjs +1 -1
- package/dist/lyra212.js +4 -16
- package/dist/lyra213.cjs +1 -1
- package/dist/lyra213.js +2 -2
- package/dist/lyra214.cjs +1 -1
- package/dist/lyra214.js +7 -2
- package/dist/lyra215.cjs +1 -1
- package/dist/lyra215.js +53 -6
- package/dist/lyra216.cjs +1 -1
- package/dist/lyra216.js +17 -5
- package/dist/lyra217.cjs +1 -1
- package/dist/lyra217.js +8 -8
- package/dist/lyra218.cjs +1 -1
- package/dist/lyra218.js +2 -7
- package/dist/lyra219.cjs +1 -1
- package/dist/lyra219.js +3 -21
- package/dist/lyra22.cjs +1 -1
- package/dist/lyra22.js +127 -74
- package/dist/lyra220.cjs +1 -1
- package/dist/lyra220.js +2 -33
- package/dist/lyra221.cjs +1 -1
- package/dist/lyra221.js +2 -36
- package/dist/lyra222.cjs +1 -1
- package/dist/lyra222.js +5 -30
- package/dist/lyra223.cjs +1 -1
- package/dist/lyra223.js +3 -23
- package/dist/lyra224.cjs +1 -1
- package/dist/lyra224.js +7 -50
- package/dist/lyra225.cjs +1 -1
- package/dist/lyra225.js +16 -2
- package/dist/lyra226.cjs +1 -1
- package/dist/lyra226.js +2 -2
- package/dist/lyra227.cjs +1 -1
- package/dist/lyra227.js +2 -8
- package/dist/lyra228.cjs +1 -1
- package/dist/lyra228.js +6 -6
- package/dist/lyra229.cjs +1 -1
- package/dist/lyra229.js +5 -33
- package/dist/lyra23.cjs +1 -1
- package/dist/lyra23.js +60 -16
- package/dist/lyra230.cjs +1 -1
- package/dist/lyra230.js +8 -17
- package/dist/lyra231.cjs +1 -1
- package/dist/lyra231.js +6 -46
- package/dist/lyra232.cjs +1 -1
- package/dist/lyra232.js +21 -3
- package/dist/lyra233.cjs +1 -1
- package/dist/lyra233.js +32 -5
- package/dist/lyra234.cjs +1 -1
- package/dist/lyra234.js +25 -29
- package/dist/lyra235.cjs +1 -1
- package/dist/lyra235.js +29 -5
- package/dist/lyra236.cjs +1 -1
- package/dist/lyra236.js +22 -3
- package/dist/lyra237.cjs +1 -1
- package/dist/lyra237.js +48 -10
- package/dist/lyra238.cjs +1 -1
- package/dist/lyra238.js +2 -2
- package/dist/lyra239.cjs +1 -1
- package/dist/lyra239.js +2 -2
- package/dist/lyra24.cjs +1 -1
- package/dist/lyra24.js +66 -32
- package/dist/lyra240.cjs +1 -9
- package/dist/lyra240.js +7 -47
- package/dist/lyra241.cjs +1 -9
- package/dist/lyra241.js +6 -83
- package/dist/lyra242.cjs +1 -1
- package/dist/lyra242.js +25 -90
- package/dist/lyra243.cjs +1 -1
- package/dist/lyra243.js +17 -25
- package/dist/lyra244.cjs +1 -1
- package/dist/lyra244.js +44 -36
- package/dist/lyra245.cjs +1 -1
- package/dist/lyra245.js +3 -21
- package/dist/lyra246.cjs +1 -1
- package/dist/lyra246.js +5 -19
- package/dist/lyra247.cjs +1 -1
- package/dist/lyra247.js +31 -26
- package/dist/lyra248.cjs +1 -1
- package/dist/lyra248.js +6 -10
- package/dist/lyra249.cjs +1 -1
- package/dist/lyra249.js +3 -23
- package/dist/lyra25.cjs +1 -1
- package/dist/lyra25.js +19 -110
- package/dist/lyra250.cjs +1 -1
- package/dist/lyra250.js +10 -24
- package/dist/lyra251.cjs +1 -1
- package/dist/lyra251.js +2 -71
- package/dist/lyra252.cjs +1 -1
- package/dist/lyra252.js +2 -42
- package/dist/lyra253.cjs +1 -1
- package/dist/lyra253.js +2 -16
- package/dist/lyra254.cjs +1 -1
- package/dist/lyra254.js +320 -30
- package/dist/lyra255.cjs +1 -1
- package/dist/lyra255.js +15 -69
- package/dist/lyra256.cjs +1 -1
- package/dist/lyra256.js +22 -23
- package/dist/lyra257.cjs +1 -1
- package/dist/lyra257.js +19 -43
- package/dist/lyra258.cjs +1 -1
- package/dist/lyra258.js +25 -40
- package/dist/lyra259.cjs +1 -9
- package/dist/lyra259.js +10 -47
- package/dist/lyra26.cjs +1 -1
- package/dist/lyra26.js +31 -51
- package/dist/lyra260.cjs +1 -1
- package/dist/lyra260.js +24 -3
- package/dist/lyra261.cjs +1 -1
- package/dist/lyra261.js +26 -2
- package/dist/lyra262.cjs +1 -1
- package/dist/lyra262.js +71 -2
- package/dist/lyra263.cjs +1 -1
- package/dist/lyra263.js +41 -41
- package/dist/lyra264.cjs +1 -1
- package/dist/lyra264.js +16 -4
- package/dist/lyra265.cjs +1 -1
- package/dist/lyra265.js +34 -581
- package/dist/lyra266.cjs +1 -1
- package/dist/lyra266.js +70 -11
- package/dist/lyra267.cjs +1 -1
- package/dist/lyra267.js +23 -13
- package/dist/lyra268.cjs +1 -1
- package/dist/lyra268.js +44 -14
- package/dist/lyra269.cjs +1 -1
- package/dist/lyra269.js +41 -2
- package/dist/lyra27.cjs +1 -1
- package/dist/lyra27.js +110 -13
- package/dist/lyra270.cjs +9 -1
- package/dist/lyra270.js +47 -29
- package/dist/lyra271.cjs +1 -1
- package/dist/lyra271.js +2 -6
- package/dist/lyra272.cjs +1 -1
- package/dist/lyra272.js +42 -4
- package/dist/lyra273.cjs +1 -1
- package/dist/lyra273.js +12 -14
- package/dist/lyra274.cjs +1 -1
- package/dist/lyra274.js +2 -23
- package/dist/lyra275.cjs +1 -1
- package/dist/lyra275.js +4 -2
- package/dist/lyra276.cjs +1 -1
- package/dist/lyra276.js +583 -7
- package/dist/lyra277.cjs +1 -1
- package/dist/lyra277.js +11 -20
- package/dist/lyra278.cjs +1 -1
- package/dist/lyra278.js +12 -112
- package/dist/lyra279.cjs +1 -1
- package/dist/lyra279.js +14 -7
- package/dist/lyra28.cjs +1 -1
- package/dist/lyra28.js +49 -15
- package/dist/lyra280.cjs +1 -1
- package/dist/lyra280.js +21 -20
- package/dist/lyra281.cjs +1 -1
- package/dist/lyra281.js +2 -22
- package/dist/lyra282.cjs +1 -1
- package/dist/lyra282.js +29 -7
- package/dist/lyra283.cjs +1 -1
- package/dist/lyra283.js +6 -2
- package/dist/lyra284.cjs +1 -1
- package/dist/lyra284.js +4 -2
- package/dist/lyra285.cjs +1 -1
- package/dist/lyra285.js +8 -2
- package/dist/lyra286.cjs +1 -1
- package/dist/lyra286.js +32 -323
- package/dist/lyra287.cjs +1 -1
- package/dist/lyra287.js +17 -13
- package/dist/lyra288.cjs +1 -1
- package/dist/lyra288.js +114 -2
- package/dist/lyra289.cjs +1 -1
- package/dist/lyra289.js +7 -18
- package/dist/lyra29.cjs +1 -1
- package/dist/lyra29.js +10 -11
- package/dist/lyra290.cjs +1 -1
- package/dist/lyra290.js +22 -28
- package/dist/lyra291.cjs +1 -1
- package/dist/lyra291.js +22 -25
- package/dist/lyra292.cjs +1 -1
- package/dist/lyra292.js +7 -20
- package/dist/lyra293.cjs +1 -1
- package/dist/lyra293.js +2 -9
- package/dist/lyra294.cjs +1 -1
- package/dist/lyra294.js +28 -13
- package/dist/lyra295.cjs +1 -1
- package/dist/lyra295.js +25 -6
- package/dist/lyra296.cjs +1 -1
- package/dist/lyra296.js +18 -22
- package/dist/lyra297.cjs +1 -1
- package/dist/lyra297.js +9 -2
- package/dist/lyra298.cjs +1 -1
- package/dist/lyra298.js +11 -7
- package/dist/lyra299.cjs +1 -1
- package/dist/lyra299.js +4 -5
- package/dist/lyra3.cjs +1 -1
- package/dist/lyra3.js +2 -2
- package/dist/lyra30.cjs +1 -1
- package/dist/lyra30.js +24 -42
- package/dist/lyra300.cjs +1 -1
- package/dist/lyra300.js +22 -26
- package/dist/lyra301.cjs +1 -1
- package/dist/lyra301.js +2 -6
- package/dist/lyra302.cjs +1 -1
- package/dist/lyra302.js +8 -10
- package/dist/lyra303.cjs +1 -1
- package/dist/lyra303.js +7 -28
- package/dist/lyra304.cjs +1 -1
- package/dist/lyra304.js +2 -26
- package/dist/lyra305.cjs +1 -1
- package/dist/lyra305.js +17 -230
- package/dist/lyra306.cjs +1 -1
- package/dist/lyra306.js +222 -71
- package/dist/lyra307.cjs +1 -1
- package/dist/lyra307.js +80 -13
- package/dist/lyra308.cjs +1 -1
- package/dist/lyra308.js +12 -18
- package/dist/lyra309.cjs +1 -1
- package/dist/lyra309.js +17 -12
- package/dist/lyra31.cjs +1 -1
- package/dist/lyra31.js +13 -93
- package/dist/lyra310.cjs +1 -1
- package/dist/lyra310.js +13 -96
- package/dist/lyra311.cjs +1 -1
- package/dist/lyra311.js +27 -21
- package/dist/lyra312.cjs +1 -1
- package/dist/lyra312.js +6 -20
- package/dist/lyra313.cjs +1 -1
- package/dist/lyra313.js +11 -5
- package/dist/lyra314.cjs +1 -1
- package/dist/lyra314.js +26 -18
- package/dist/lyra315.cjs +1 -1
- package/dist/lyra315.js +26 -8
- package/dist/lyra316.cjs +1 -1
- package/dist/lyra316.js +99 -28
- package/dist/lyra317.cjs +1 -1
- package/dist/lyra317.js +21 -7
- package/dist/lyra318.cjs +1 -1
- package/dist/lyra318.js +20 -53
- package/dist/lyra319.cjs +1 -1
- package/dist/lyra319.js +5 -23
- package/dist/lyra32.cjs +1 -1
- package/dist/lyra32.js +41 -33
- package/dist/lyra320.cjs +1 -1
- package/dist/lyra320.js +19 -15
- package/dist/lyra321.cjs +1 -1
- package/dist/lyra321.js +7 -55
- package/dist/lyra322.cjs +1 -1
- package/dist/lyra322.js +28 -9
- package/dist/lyra323.cjs +1 -1
- package/dist/lyra323.js +7 -3
- package/dist/lyra324.cjs +1 -1
- package/dist/lyra324.js +48 -13
- package/dist/lyra325.cjs +1 -1
- package/dist/lyra325.js +22 -3
- package/dist/lyra326.cjs +1 -1
- package/dist/lyra326.js +19 -3
- package/dist/lyra327.cjs +1 -1
- package/dist/lyra327.js +54 -8
- package/dist/lyra328.cjs +1 -1
- package/dist/lyra328.js +11 -2
- package/dist/lyra329.cjs +1 -1
- package/dist/lyra329.js +3 -11
- package/dist/lyra33.cjs +1 -1
- package/dist/lyra33.js +92 -388
- package/dist/lyra330.cjs +1 -1
- package/dist/lyra330.js +18 -5
- package/dist/lyra331.cjs +1 -1
- package/dist/lyra331.js +4 -70
- package/dist/lyra332.cjs +1 -1
- package/dist/lyra332.js +3 -5
- package/dist/lyra333.cjs +1 -1
- package/dist/lyra333.js +2 -9
- package/dist/lyra334.cjs +1 -1
- package/dist/lyra334.js +9 -15
- package/dist/lyra335.cjs +1 -1
- package/dist/lyra335.js +5 -2
- package/dist/lyra336.cjs +1 -1
- package/dist/lyra336.js +11 -22
- package/dist/lyra337.cjs +1 -1
- package/dist/lyra337.js +69 -6
- package/dist/lyra338.cjs +1 -1
- package/dist/lyra338.js +5 -65
- package/dist/lyra339.cjs +1 -1
- package/dist/lyra339.js +9 -6
- package/dist/lyra34.cjs +1 -1
- package/dist/lyra34.js +36 -8
- package/dist/lyra340.cjs +1 -1
- package/dist/lyra340.js +15 -4
- package/dist/lyra341.cjs +1 -1
- package/dist/lyra341.js +5 -7
- package/dist/lyra342.cjs +1 -1
- package/dist/lyra342.js +65 -6
- package/dist/lyra343.cjs +1 -1
- package/dist/lyra343.js +20 -38
- package/dist/lyra344.cjs +1 -1
- package/dist/lyra344.js +2 -95
- package/dist/lyra345.cjs +1 -0
- package/dist/lyra345.js +9 -0
- package/dist/lyra346.cjs +1 -0
- package/dist/lyra346.js +7 -0
- package/dist/lyra347.cjs +1 -0
- package/dist/lyra347.js +10 -0
- package/dist/lyra348.cjs +1 -0
- package/dist/lyra348.js +8 -0
- package/dist/lyra349.cjs +1 -0
- package/dist/lyra349.js +43 -0
- package/dist/lyra35.cjs +1 -1
- package/dist/lyra35.js +390 -13
- package/dist/lyra350.cjs +1 -0
- package/dist/lyra350.js +100 -0
- package/dist/lyra36.cjs +1 -1
- package/dist/lyra36.js +8 -176
- package/dist/lyra37.cjs +1 -1
- package/dist/lyra37.js +13 -6
- package/dist/lyra38.cjs +1 -1
- package/dist/lyra38.js +176 -4
- package/dist/lyra39.cjs +1 -1
- package/dist/lyra39.js +6 -8
- package/dist/lyra4.cjs +1 -1
- package/dist/lyra4.js +3 -3
- package/dist/lyra40.cjs +1 -1
- package/dist/lyra40.js +4 -7
- package/dist/lyra41.cjs +1 -1
- package/dist/lyra41.js +8 -166
- package/dist/lyra42.cjs +1 -1
- package/dist/lyra42.js +7 -72
- package/dist/lyra43.cjs +1 -1
- package/dist/lyra43.js +165 -59
- package/dist/lyra44.cjs +1 -1
- package/dist/lyra44.js +60 -447
- package/dist/lyra45.cjs +1 -1
- package/dist/lyra45.js +55 -540
- package/dist/lyra46.cjs +1 -1
- package/dist/lyra46.js +410 -638
- package/dist/lyra47.cjs +1 -1
- package/dist/lyra47.js +535 -61
- package/dist/lyra48.cjs +1 -1
- package/dist/lyra48.js +815 -31
- package/dist/lyra49.cjs +1 -1
- package/dist/lyra49.js +65 -43
- package/dist/lyra5.cjs +1 -1
- package/dist/lyra5.js +1 -1
- package/dist/lyra50.cjs +1 -1
- package/dist/lyra50.js +33 -13
- package/dist/lyra51.cjs +1 -1
- package/dist/lyra51.js +40 -1069
- package/dist/lyra52.cjs +1 -1
- package/dist/lyra52.js +11 -788
- package/dist/lyra53.cjs +1 -1
- package/dist/lyra53.js +1062 -226
- package/dist/lyra54.cjs +1 -1
- package/dist/lyra54.js +790 -268
- package/dist/lyra55.cjs +1 -1
- package/dist/lyra55.js +236 -56
- package/dist/lyra56.cjs +1 -1
- package/dist/lyra56.js +262 -133
- package/dist/lyra57.cjs +1 -1
- package/dist/lyra57.js +57 -440
- package/dist/lyra58.cjs +1 -1
- package/dist/lyra58.js +134 -205
- package/dist/lyra59.cjs +1 -1
- package/dist/lyra59.js +437 -222
- package/dist/lyra6.cjs +1 -1
- package/dist/lyra6.js +2 -2
- package/dist/lyra60.cjs +1 -1
- package/dist/lyra60.js +192 -794
- package/dist/lyra61.cjs +1 -1
- package/dist/lyra61.js +204 -349
- package/dist/lyra62.cjs +1 -1
- package/dist/lyra62.js +803 -113
- package/dist/lyra63.cjs +1 -1
- package/dist/lyra63.js +371 -34
- package/dist/lyra64.cjs +1 -1
- package/dist/lyra64.js +121 -39
- package/dist/lyra65.cjs +1 -1
- package/dist/lyra65.js +35 -31
- package/dist/lyra66.cjs +1 -1
- package/dist/lyra66.js +41 -97
- package/dist/lyra67.cjs +1 -1
- package/dist/lyra67.js +28 -139
- package/dist/lyra68.cjs +1 -1
- package/dist/lyra68.js +95 -12
- package/dist/lyra69.cjs +1 -1
- package/dist/lyra69.js +136 -59
- package/dist/lyra7.cjs +1 -1
- package/dist/lyra7.js +2 -2
- package/dist/lyra70.cjs +1 -1
- package/dist/lyra70.js +15 -19
- package/dist/lyra71.cjs +1 -1
- package/dist/lyra71.js +185 -1700
- package/dist/lyra72.cjs +1 -1
- package/dist/lyra72.js +67 -38
- package/dist/lyra73.cjs +1 -1
- package/dist/lyra73.js +20 -3
- package/dist/lyra74.cjs +1 -1
- package/dist/lyra74.js +37 -64
- package/dist/lyra75.cjs +1 -1
- package/dist/lyra75.js +2 -14
- package/dist/lyra79.cjs +1 -1
- package/dist/lyra79.js +1847 -2
- package/dist/lyra8.cjs +1 -1
- package/dist/lyra8.js +6 -6
- package/dist/lyra81.cjs +1 -1
- package/dist/lyra81.js +3 -2
- package/dist/lyra82.cjs +1 -1
- package/dist/lyra82.js +66 -2
- package/dist/lyra83.cjs +1 -1
- package/dist/lyra83.js +14 -32
- package/dist/lyra84.js +2 -2
- package/dist/lyra85.cjs +1 -1
- package/dist/lyra85.js +32 -13
- package/dist/lyra86.cjs +1 -1
- package/dist/lyra86.js +2 -30
- package/dist/lyra87.cjs +1 -1
- package/dist/lyra87.js +13 -43
- package/dist/lyra88.cjs +1 -1
- package/dist/lyra88.js +30 -6
- package/dist/lyra89.cjs +1 -1
- package/dist/lyra89.js +2 -4
- package/dist/lyra9.cjs +1 -1
- package/dist/lyra9.js +1 -1
- package/dist/lyra90.cjs +1 -1
- package/dist/lyra90.js +43 -2
- package/dist/lyra91.cjs +1 -9
- package/dist/lyra91.js +5 -29
- package/dist/lyra92.cjs +1 -19
- package/dist/lyra92.js +3 -598
- package/dist/lyra93.cjs +1 -1
- package/dist/lyra93.js +4 -20
- package/dist/lyra94.cjs +9 -1
- package/dist/lyra94.js +30 -2
- package/dist/lyra95.cjs +19 -1
- package/dist/lyra95.js +600 -20
- package/dist/lyra96.cjs +1 -1
- package/dist/lyra96.js +20 -4
- package/dist/lyra97.cjs +1 -1
- package/dist/lyra97.js +2 -6
- package/dist/lyra98.cjs +1 -1
- package/dist/lyra98.js +21 -28
- package/dist/lyra99.cjs +1 -1
- package/dist/lyra99.js +2 -27
- package/dist/style.css +1 -1
- package/package.json +19 -19
package/dist/lyra275.js
CHANGED
package/dist/lyra276.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./lyra263.cjs"),a=require("./lyra166.cjs"),u=require("./lyra140.cjs");function r(e,i,n){const t=u.isMotionValue(e)?e:a.motionValue(e);return t.start(o.animateMotionValue("",t,i,n)),t.animation}exports.animateSingleValue=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("./lyra178.cjs"),J=require("./lyra322.cjs"),g=require("./lyra323.cjs"),v=require("./lyra324.cjs"),p=require("./lyra242.cjs"),q=require("./lyra325.cjs"),u=require("./lyra174.cjs"),K=require("./lyra321.cjs"),S=require("./lyra326.cjs"),Q=require("./lyra327.cjs"),I=require("./lyra191.cjs"),b=require("./lyra328.cjs"),O=require("./lyra329.cjs"),D=require("./lyra330.cjs"),tt=require("./lyra216.cjs"),E=require("./lyra152.cjs"),F=require("./lyra308.cjs"),et=require("./lyra230.cjs"),L=require("./lyra220.cjs"),it=require("./lyra331.cjs"),st=require("./lyra332.cjs"),at=require("./lyra285.cjs"),ot=require("./lyra199.cjs"),f=require("./lyra190.cjs"),rt=require("./lyra209.cjs"),M=["","X","Y","Z"],N=1e3;let nt=0;const P={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function lt({attachResizeListener:i,defaultParent:c,measureScroll:h,checkIsScrollRoot:m,resetTransform:V}){return class{constructor(t={},e=c==null?void 0:c()){this.id=nt++,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=()=>{P.totalNodes=P.resolvedTargetDeltas=P.recalculatedProjection=0,this.nodes.forEach(G),this.nodes.forEach(mt),this.nodes.forEach(pt),this.nodes.forEach(Z),it.record(P)},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 tt.FlatTree)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Y.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=st.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=et.delay(n,250),F.globalProjectionState.hasAnimatedSinceResize&&(F.globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(W))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&o&&(s||a)&&this.addEventListener("didUpdate",({delta:r,hasLayoutChanged:n,hasRelativeTargetChanged:l,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const d=this.options.transition||o.getDefaultTransition()||Tt,{onLayoutAnimationStart:j,onLayoutAnimationComplete:B}=o.getProps(),A=!this.targetLayout||!S.boxEqualsRounded(this.targetLayout,y)||l,T=!n&&l;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||n&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(r,T);const x={...K.getValueTransition(d,"layout"),onPlay:j,onComplete:B};(o.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else n||W(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}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,f.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(yt),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(dt),this.isUpdating=!1,this.nodes.forEach(ft),this.nodes.forEach(ht),this.nodes.forEach(ct),this.clearAllSnapshots();const e=performance.now();f.frameData.delta=ot.clamp(0,1e3/60,e-f.frameData.timestamp),f.frameData.timestamp=e,f.frameData.isProcessing=!0,f.steps.update.process(f.frameData),f.steps.preRender.process(f.frameData),f.steps.render.process(f.frameData),f.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(ut),this.sharedNodes.forEach(gt)}scheduleUpdateProjection(){f.frame.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){f.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:m(this.instance),offset:h(this.instance)})}resetTransform(){if(!V)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!S.isDeltaZero(this.projectionDelta),s=this.getTransformTemplate(),a=s?s(this.latestValues,""):void 0,o=a!==this.prevTransformTemplateValue;t&&(e||D.hasTransform(this.latestValues)||o)&&(V(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)),xt(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&&(v.translateAxis(e.x,s.offset.x),v.translateAxis(e.y,s.offset.y)),e}removeElementScroll(t){const e=u.createBox();g.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){g.copyBoxInto(e,t);const{scroll:n}=this.root;n&&(v.translateAxis(e.x,-n.offset.x),v.translateAxis(e.y,-n.offset.y))}v.translateAxis(e.x,o.offset.x),v.translateAxis(e.y,o.offset.y)}}return e}applyTransform(t,e=!1){const s=u.createBox();g.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&&v.transformBox(s,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),D.hasTransform(o.latestValues)&&v.transformBox(s,o.latestValues)}return D.hasTransform(this.latestValues)&&v.transformBox(s,this.latestValues),s}removeTransform(t){const e=u.createBox();g.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();g.copyBoxInto(o,r),q.removeBoxTransforms(e,a.latestValues,a.snapshot?a.snapshot.layoutBox:void 0,o)}return D.hasTransform(this.latestValues)&&q.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!==f.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=f.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(),p.calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,l.layout.layoutBox),g.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(),p.calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):g.copyBoxInto(this.target,this.layout.layoutBox),v.applyBoxDelta(this.target,this.targetDelta)):g.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(),p.calcRelativePosition(this.relativeTargetOrigin,this.target,l.target),g.copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}P.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===f.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;g.copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const n=this.treeScale.x,l=this.treeScale.y;v.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:y}=e;if(!y){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;p.calcBoxDelta(this.projectionDelta,this.layoutCorrected,y,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",y)),P.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,y=this.layout?this.layout.source:void 0,d=l!==y,j=this.getStack(),B=!j||j.members.length<=1,A=!!(d&&!B&&this.options.crossfade===!0&&!this.path.some(vt));this.animationProgress=0;let T;this.mixTargetDelta=x=>{const R=x/1e3;U(r.x,t.x,R),U(r.y,t.y,R),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(p.calcRelativePosition(n,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin,n,R),T&&S.boxEquals(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=u.createBox()),g.copyBoxInto(T,this.relativeTarget)),d&&(this.animationValues=o,J.mixValues(o,a,this.latestValues,R,A,B)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},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&&(f.cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=f.frame.update(()=>{F.globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=at.animateSingleValue(0,N,{...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(N),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&&X(this.options.animationType,this.layout.layoutBox,a.layoutBox)){s=this.target||u.createBox();const r=p.calcLength(this.layout.layoutBox.x);s.x.min=t.target.x.min,s.x.max=s.x.min+r;const n=p.calcLength(this.layout.layoutBox.y);s.y.min=t.target.y.min,s.y.max=s.y.min+n}g.copyBoxInto(e,s),v.transformBox(e,o),p.calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Q.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<M.length;o++){const r="rotate"+M[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=E.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=E.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}=this.projectionDelta;a.transformOrigin=`${l.origin*100}% ${y.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 I.scaleCorrectors){if(n[d]===void 0)continue;const{correct:j,applyTo:B}=I.scaleCorrectors[d],A=a.transform==="none"?n[d]:j(n[d],r);if(B){const T=B.length;for(let x=0;x<T;x++)a[B[x]]=A}else a[d]=A}return this.options.layoutId&&(a.pointerEvents=r===this?E.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 ht(i){i.updateLayout()}function ct(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:m,measuredBox:V}=i.layout,{animationType:k}=i.options,t=h.source!==i.layout.source;k==="size"?O.eachAxis(r=>{const n=t?h.measuredBox[r]:h.layoutBox[r],l=p.calcLength(n);n.min=m[r].min,n.max=n.min+l}):X(k,h.layoutBox,m)&&O.eachAxis(r=>{const n=t?h.measuredBox[r]:h.layoutBox[r],l=p.calcLength(m[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();p.calcBoxDelta(e,m,h.layoutBox);const s=u.createDelta();t?p.calcBoxDelta(s,i.applyTransform(V,!0),h.measuredBox):p.calcBoxDelta(s,m,h.layoutBox);const a=!S.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 y=u.createBox();p.calcRelativePosition(y,h.layoutBox,n.layoutBox);const d=u.createBox();p.calcRelativePosition(d,m,l.layoutBox),S.boxEqualsRounded(y,d)||(o=!0),r.options.layoutRoot&&(i.relativeTarget=d,i.relativeTargetOrigin=y,i.relativeParent=r)}}}i.notifyListeners("didUpdate",{layout:m,snapshot:h,delta:s,layoutDelta:e,hasLayoutChanged:a,hasRelativeTargetChanged:o})}else if(i.isLead()){const{onExitComplete:m}=i.options;m&&m()}i.options.transition=void 0}function G(i){P.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 Z(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function ut(i){i.clearSnapshot()}function w(i){i.clearMeasurements()}function dt(i){i.isLayoutDirty=!1}function ft(i){const{visualElement:c}=i.options;c&&c.getProps().onBeforeLayoutMeasure&&c.notify("BeforeLayoutMeasure"),i.resetTransform()}function W(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function mt(i){i.resolveTargetDelta()}function pt(i){i.calcProjection()}function yt(i){i.resetRotation()}function gt(i){i.removeLeadSnapshot()}function U(i,c,h){i.translate=L.mix(c.translate,0,h),i.scale=L.mix(c.scale,1,h),i.origin=c.origin,i.originPoint=c.originPoint}function C(i,c,h,m){i.min=L.mix(c.min,h.min,m),i.max=L.mix(c.max,h.max,m)}function $(i,c,h,m){C(i.x,c.x,h.x,m),C(i.y,c.y,h.y,m)}function vt(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const Tt={duration:.45,ease:[.4,0,.1,1]},z=i=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(i),_=z("applewebkit/")&&!z("chrome/")?Math.round:rt.noop;function H(i){i.min=_(i.min),i.max=_(i.max)}function xt(i){H(i.x),H(i.y)}function X(i,c,h){return i==="position"||i==="preserve-aspect"&&!p.isNear(S.aspectRatio(c),S.aspectRatio(h),.2)}exports.cleanDirtyNodes=Z;exports.createProjectionNode=lt;exports.mixAxis=C;exports.mixAxisDelta=U;exports.mixBox=$;exports.propagateDirtyNodes=G;
|
package/dist/lyra276.js
CHANGED
|
@@ -1,10 +1,586 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { SubscriptionManager as st } from "./lyra178.js";
|
|
2
|
+
import { mixValues as ot } from "./lyra322.js";
|
|
3
|
+
import { copyBoxInto as p } from "./lyra323.js";
|
|
4
|
+
import { translateAxis as S, transformBox as k, applyBoxDelta as at, applyTreeDeltas as rt } from "./lyra324.js";
|
|
5
|
+
import { calcRelativePosition as A, calcRelativeBox as nt, calcBoxDelta as L, calcLength as E, isNear as lt } from "./lyra242.js";
|
|
6
|
+
import { removeBoxTransforms as w } from "./lyra325.js";
|
|
7
|
+
import { createBox as f, createDelta as j } from "./lyra174.js";
|
|
8
|
+
import { getValueTransition as ht } from "./lyra321.js";
|
|
9
|
+
import { boxEqualsRounded as tt, isDeltaZero as et, aspectRatio as I, boxEquals as ut } from "./lyra326.js";
|
|
10
|
+
import { NodeStack as ct } from "./lyra327.js";
|
|
11
|
+
import { scaleCorrectors as N } from "./lyra191.js";
|
|
12
|
+
import { buildProjectionTransform as W } from "./lyra328.js";
|
|
13
|
+
import { eachAxis as z } from "./lyra329.js";
|
|
14
|
+
import { hasTransform as B, hasScale as _, has2DTranslate as dt } from "./lyra330.js";
|
|
15
|
+
import { FlatTree as ft } from "./lyra216.js";
|
|
16
|
+
import { resolveMotionValue as C } from "./lyra152.js";
|
|
17
|
+
import { globalProjectionState as O } from "./lyra308.js";
|
|
18
|
+
import { delay as mt } from "./lyra230.js";
|
|
19
|
+
import { mix as F } from "./lyra220.js";
|
|
20
|
+
import { record as pt } from "./lyra331.js";
|
|
21
|
+
import { isSVGElement as yt } from "./lyra332.js";
|
|
22
|
+
import { animateSingleValue as gt } from "./lyra285.js";
|
|
23
|
+
import { clamp as vt } from "./lyra199.js";
|
|
24
|
+
import { cancelFrame as H, frameData as y, steps as b, frame as M } from "./lyra190.js";
|
|
25
|
+
import { noop as Tt } from "./lyra209.js";
|
|
26
|
+
const q = ["", "X", "Y", "Z"], G = 1e3;
|
|
27
|
+
let xt = 0;
|
|
28
|
+
const x = {
|
|
29
|
+
type: "projectionFrame",
|
|
30
|
+
totalNodes: 0,
|
|
31
|
+
resolvedTargetDeltas: 0,
|
|
32
|
+
recalculatedProjection: 0
|
|
33
|
+
};
|
|
34
|
+
function le({ 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 = xt++, 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(St), this.nodes.forEach(Lt), this.nodes.forEach(Vt), this.nodes.forEach(Bt), pt(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 ft());
|
|
45
|
+
}
|
|
46
|
+
addEventListener(t, e) {
|
|
47
|
+
return this.eventHandlers.has(t) || this.eventHandlers.set(t, new st()), 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 = yt(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 = mt(n, 250), O.hasAnimatedSinceResize && (O.hasAnimatedSinceResize = !1, this.nodes.forEach(Y));
|
|
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() || Ct, { onLayoutAnimationStart: P, onLayoutAnimationComplete: T } = a.getProps(), D = !this.targetLayout || !tt(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
|
+
...ht(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 || Y(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, H(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(kt), 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(X);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.isUpdating || this.nodes.forEach(Rt), this.isUpdating = !1, this.nodes.forEach(At), this.nodes.forEach(Pt), this.nodes.forEach(Dt), this.clearAllSnapshots();
|
|
140
|
+
const e = performance.now();
|
|
141
|
+
y.delta = vt(0, 1e3 / 60, e - y.timestamp), y.timestamp = e, y.isProcessing = !0, b.update.process(y), b.preRender.process(y), b.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(jt), this.sharedNodes.forEach(Et);
|
|
148
|
+
}
|
|
149
|
+
scheduleUpdateProjection() {
|
|
150
|
+
M.preRender(this.updateProjection, !1, !0);
|
|
151
|
+
}
|
|
152
|
+
scheduleCheckAfterUnmount() {
|
|
153
|
+
M.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 && !et(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)), Ot(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
|
+
_(o.latestValues) && o.updateSnapshot();
|
|
243
|
+
const a = f(), r = o.measurePageBox();
|
|
244
|
+
p(a, r), w(e, o.latestValues, o.snapshot ? o.snapshot.layoutBox : void 0, a);
|
|
245
|
+
}
|
|
246
|
+
return B(this.latestValues) && w(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(), nt(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : p(this.target, this.layout.layoutBox), at(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 || _(this.parent.latestValues) || dt(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
|
+
rt(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 = W(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(Ut));
|
|
332
|
+
this.animationProgress = 0;
|
|
333
|
+
let g;
|
|
334
|
+
this.mixTargetDelta = (v) => {
|
|
335
|
+
const R = v / 1e3;
|
|
336
|
+
Z(r.x, t.x, R), Z(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), Ft(this.relativeTarget, this.relativeTargetOrigin, n, R), g && ut(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = f()), p(g, this.relativeTarget)), c && (this.animationValues = a, ot(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 && (H(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = M.update(() => {
|
|
341
|
+
O.hasAnimatedSinceResize = !0, this.currentAnimation = gt(0, G, {
|
|
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(G), 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 && it(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 ct()), 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 = C(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 = C(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 = W(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 N) {
|
|
449
|
+
if (n[c] === void 0)
|
|
450
|
+
continue;
|
|
451
|
+
const { correct: P, applyTo: T } = N[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 ? C(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(X), this.root.sharedNodes.clear();
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
function Pt(i) {
|
|
474
|
+
i.updateLayout();
|
|
475
|
+
}
|
|
476
|
+
function Dt(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" ? z((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
|
+
}) : it(U, h.layoutBox, d) && z((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 = !et(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), tt(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 St(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 Bt(i) {
|
|
524
|
+
i.isProjectionDirty = i.isSharedProjectionDirty = i.isTransformDirty = !1;
|
|
525
|
+
}
|
|
526
|
+
function jt(i) {
|
|
527
|
+
i.clearSnapshot();
|
|
528
|
+
}
|
|
529
|
+
function X(i) {
|
|
530
|
+
i.clearMeasurements();
|
|
531
|
+
}
|
|
532
|
+
function Rt(i) {
|
|
533
|
+
i.isLayoutDirty = !1;
|
|
534
|
+
}
|
|
535
|
+
function At(i) {
|
|
536
|
+
const { visualElement: u } = i.options;
|
|
537
|
+
u && u.getProps().onBeforeLayoutMeasure && u.notify("BeforeLayoutMeasure"), i.resetTransform();
|
|
538
|
+
}
|
|
539
|
+
function Y(i) {
|
|
540
|
+
i.finishAnimation(), i.targetDelta = i.relativeTarget = i.target = void 0, i.isProjectionDirty = !0;
|
|
541
|
+
}
|
|
542
|
+
function Lt(i) {
|
|
543
|
+
i.resolveTargetDelta();
|
|
544
|
+
}
|
|
545
|
+
function Vt(i) {
|
|
546
|
+
i.calcProjection();
|
|
547
|
+
}
|
|
548
|
+
function kt(i) {
|
|
549
|
+
i.resetRotation();
|
|
550
|
+
}
|
|
551
|
+
function Et(i) {
|
|
552
|
+
i.removeLeadSnapshot();
|
|
553
|
+
}
|
|
554
|
+
function Z(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 $(i, u, h, d) {
|
|
558
|
+
i.min = F(u.min, h.min, d), i.max = F(u.max, h.max, d);
|
|
559
|
+
}
|
|
560
|
+
function Ft(i, u, h, d) {
|
|
561
|
+
$(i.x, u.x, h.x, d), $(i.y, u.y, h.y, d);
|
|
562
|
+
}
|
|
563
|
+
function Ut(i) {
|
|
564
|
+
return i.animationValues && i.animationValues.opacityExit !== void 0;
|
|
565
|
+
}
|
|
566
|
+
const Ct = {
|
|
567
|
+
duration: 0.45,
|
|
568
|
+
ease: [0.4, 0, 0.1, 1]
|
|
569
|
+
}, J = (i) => typeof navigator < "u" && navigator.userAgent.toLowerCase().includes(i), K = J("applewebkit/") && !J("chrome/") ? Math.round : Tt;
|
|
570
|
+
function Q(i) {
|
|
571
|
+
i.min = K(i.min), i.max = K(i.max);
|
|
572
|
+
}
|
|
573
|
+
function Ot(i) {
|
|
574
|
+
Q(i.x), Q(i.y);
|
|
575
|
+
}
|
|
576
|
+
function it(i, u, h) {
|
|
577
|
+
return i === "position" || i === "preserve-aspect" && !lt(I(u), I(h), 0.2);
|
|
7
578
|
}
|
|
8
579
|
export {
|
|
9
|
-
|
|
580
|
+
Bt as cleanDirtyNodes,
|
|
581
|
+
le as createProjectionNode,
|
|
582
|
+
$ as mixAxis,
|
|
583
|
+
Z as mixAxisDelta,
|
|
584
|
+
Ft as mixBox,
|
|
585
|
+
St as propagateDirtyNodes
|
|
10
586
|
};
|
package/dist/lyra277.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./lyra276.cjs"),c=require("./lyra249.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;
|