Is this board Latin-style? Inspired by Flow Fit: Sudoku, a brand-new mobile puzzle game (as of Nov 2019).

Background

A Latin square is a square grid of side length \$ n \$ filled with \$ n \$ different symbols, where each row and column contains each symbol exactly once.

Let's define a row (resp. a column) as a maximally consecutive group of cells in horizontal (resp. vertical) direction. For example, the following board (O is a cell, - is a hole) has 8 rows and 8 columns in total:

The board    |  Rows         |  Columns
O O O O O O  |  A A A A A A  |  A B C E G H
O O O O O O  |  B B B B B B  |  A B C E G H
O O - O O O  |  C C - D D D  |  A B - E G H
O O O - O O  |  E E E - F F  |  A B D - G H
O O O O O O  |  G G G G G G  |  A B D F G H
O O O O O O  |  H H H H H H  |  A B D F G H


Then, place the numbers \$ 1, \cdots, k \$ exactly once on each row and column, where \$ k \$ is the length of that row or column. For the board above, here is one solution:

3 4 1 2 5 6
4 3 2 1 6 5
1 2 - 3 1 2
2 1 3 - 2 1
5 6 1 2 3 4
6 5 2 1 4 3


A board is Latin-style if such a placement is possible.

Note that a row/column of size 1 is still a row/column, and therefore it can only have a single 1.

Challenge

Given a grid, determine if it is Latin-style, i.e. it is possible to place numbers on the grid so that each row/column of length \$ k \$ contains each of the numbers \$ 1, \cdots, k \$ exactly once.

Example Latin-style boards

O O O O O
- O O O O
- - O O O
- - - O O
- - - - O


- O O O -
O O O O O
O O O O O
O O O O O
- O O O -


- - O O O
- O O O O
O O O O O
O O O O -
O O O - -


O O - - O O
O O O O O O
- O O O O -
- O O O O -
O O O O O O
O O - - O O


O O O - O O O O
O O O O O O O O
O O O O O O O O
O O O O O O O -
- O O O O O O O
O O O O O O O O
O O O O O O O O
O O O O - O O O


O O O - O
O O - O O
O - O O O


- - O - -
- O O O -
O O - O O
- O O O O
O O O - O


Example non-Latin-style boards

- O -
O O O
- O -


O O O


O O - - -
O O - - -
O O - - -
O O O O O
O O O O O


O O O - -
O O O - -
O O O O O
- - O O O
- - O O O


- - - O O - -
- - O O O - -
O O O O O O -
O O O O O O O
- O O O O O O
- - O O O - -
- - O O - - -


O O - - - -
O O - O O O
O O - O O O


O O - - -
O O - - -
O O O - -
- - O O O
- - O O O


Input and output

You can take the grid input in any reasonable way. The grid's bounding box can be non-square, and the grid may contain multiple connected components.

You can give the output in one of two ways:


Truthy/falsy values following the language's convention


Swapping truthy/falsy is not allowed also allowed.

One consistent value for true, another consistent value for false


Scoring and winning criterion

The standard code-golf rules apply. The shortest code in bytes wins.
Jelly, 24 bytes

,ZµŒgaS$€F)Zṣ€0Ṣ&lt;JƊ€€)FẸ


Try it online!

A monadic link taking as its argument the grid as a matrix with 1 representing squares needing a number and 0 representing the spacers. Returns 0 if the grid is Latin and 1 if not. 

Explanation

Main link, takes a matrix of 1s and 0s as its argument, z

,                         | Pair with:
 Z                        | - z transposed
  µ                       | Start a new monadic chain
                     )    | For each matrix (z and transpose(z)):
          )               | - For each row:
   Œg                     |   - Group runs of equal elements
       $€                 |   - For each group:
     a                    |     - And with:
      S                   |       - Sum of group
         F                |   - Flatten
           Z              | - Transpose
            ṣ€0           | - Split each at zeros
                  Ɗ€€     | - For each group:
               Ṣ&lt;         |   - Check whether sorted group is less than:
                 J        |     - Sequence along group
                      F   | Finally, flatten
                       Ẹ  | And check if any group returned true


Alternative in case true=true/false=false required:

Jelly, 24 bytes

,ZµŒgaS$€F)Zṣ€0Ṣ_JƊ€€)AƑ


Try it online!