Measuring a pile of logs Introduction

This is a log of length 5:

#####


I want to pile a bunch of these logs on top of each other.
How I do this is that I slide a new log onto the topmost one from the right, and stop sliding when their left or right ends align (don't ask why).
If the new log is longer, it slides all the way to the left end of the topmost log:

########  &lt;-
#####


If it is shorter, it only slides until their right ends align:

  ######  &lt;-
########
#####


As I slide more logs into the pile, their positions are determined by the current topmost log:

           ##
       ######
       ###
      ####
      ##
  ######
########
#####


This looks physically impossible, but let's pretend it works.

The task

Your input shall be a non-empty list of positive integers, representing the lengths of my logs.
The leftmost number is the first log I put to the pile, so it ends up at the bottom.
In the above example, the input would be [5,8,6,2,4,3,6,2].
Your output shall be, for each column of the resulting pile, the number of logs that cross that column.
In the above example, the correct output would be [2,2,3,3,3,2,4,6,3,3,1,2,2].

Rules and scoring

Input and output can be in any reasonable format.
The output can only contain positive integers, i.e. it must not have leading or trailing 0s.
Normal code-golf rules apply: you can write a full program or a function, the lowest byte count wins, and standard loopholes are forbidden.

Test cases

[1] -&gt; [1]
[4] -&gt; [1,1,1,1]
[3,2] -&gt; [1,2,2]
[2,3] -&gt; [2,2,1]
[2,2,2] -&gt; [3,3]
[2,3,2] -&gt; [2,3,2]
[3,2,3] -&gt; [1,3,3,1]
[1,3,2,2,1,3,1] -&gt; [2,3,5,1,2]
[4,3,4,2,4,3,4,2] -&gt; [1,3,3,5,5,3,4,2]
[5,8,6,2,4,3,6,2] -&gt; [2,2,3,3,3,2,4,6,3,3,1,2,2]
[5,10,15,1,1,1,1,1,2] -&gt; [3,3,3,3,3,2,2,2,2,2,1,1,1,1,7,1]
[13,12,2,10,14,12] -&gt; [1,2,2,2,2,2,2,2,2,2,2,5,5,3,3,3,3,3,3,3,3,2,2,2,2]
[12,14,3,6,13,1,1] -&gt; [2,2,2,2,2,2,2,2,2,2,2,5,4,4,2,2,2,1,1,1,1,1,1,3]
[7,5,12,5,1,10,14,5] -&gt; [1,1,3,3,3,3,3,1,1,2,2,2,2,5,2,2,2,2,2,2,2,2,3,2,2,2,2]
[14,5,1,3,12,6,2,2,1,7,9,15] -&gt; [1,1,1,1,1,1,1,1,1,2,2,2,2,5,2,2,1,1,1,2,2,2,2,4,8,3,3,3,3,3,3,2,2,1,1,1,1,1,1]
Jelly, 19 13 bytes

IN0»0;+\+"RṬS


Try it online!

Saved 2 bytes thanks to @Jonathan Allan.

Explanation

IN0»0;+\+"RṬS  Input: array A
I              Increments
 N             Negate
  0»           Max with 0
    0;         Prepend 0
      +\       Cumulative sum
        +"     Vectorized add with
          R    Range, vectorizes over each integer
           Ṭ   Create a list with 1's at the specified indices
            S  Sum