@@ -249,14 +249,14 @@ export function setGridPropsCommands(
249
249
const rowStart = gridPositionToValue ( gridProps . gridRowStart )
250
250
const rowEnd = gridPositionToValue ( gridProps . gridRowEnd )
251
251
252
- const areaColumnStart = asMaybeNamedAreaOrValue ( gridTemplate , 'column' , columnStart )
253
- const areaColumnEnd = asMaybeNamedAreaOrValue ( gridTemplate , 'column' , columnEnd )
254
- const areaRowStart = asMaybeNamedAreaOrValue ( gridTemplate , 'row' , rowStart )
255
- const areaRowEnd = asMaybeNamedAreaOrValue ( gridTemplate , 'row' , rowEnd )
252
+ const lineColumnStart = asMaybeNamedLineOrValue ( gridTemplate , 'column' , columnStart )
253
+ const lineColumnEnd = asMaybeNamedLineOrValue ( gridTemplate , 'column' , columnEnd )
254
+ const lineRowStart = asMaybeNamedLineOrValue ( gridTemplate , 'row' , rowStart )
255
+ const lineRowEnd = asMaybeNamedLineOrValue ( gridTemplate , 'row' , rowEnd )
256
256
257
257
if ( columnStart != null && columnStart === columnEnd ) {
258
258
commands . push (
259
- setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridColumn' ) , areaColumnStart ) ,
259
+ setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridColumn' ) , lineColumnStart ) ,
260
260
)
261
261
} else if (
262
262
columnStart != null &&
@@ -266,40 +266,40 @@ export function setGridPropsCommands(
266
266
columnStart === columnEnd - 1
267
267
) {
268
268
commands . push (
269
- setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridColumn' ) , areaColumnStart ) ,
269
+ setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridColumn' ) , lineColumnStart ) ,
270
270
)
271
271
} else {
272
272
if ( columnStart != null ) {
273
273
commands . push (
274
- setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridColumnStart' ) , areaColumnStart ) ,
274
+ setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridColumnStart' ) , lineColumnStart ) ,
275
275
)
276
276
}
277
277
if ( columnEnd != null ) {
278
278
commands . push (
279
- setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridColumnEnd' ) , areaColumnEnd ) ,
279
+ setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridColumnEnd' ) , lineColumnEnd ) ,
280
280
)
281
281
}
282
282
}
283
283
284
284
if ( rowStart != null && rowStart === rowEnd ) {
285
- commands . push ( setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridRow' ) , areaRowStart ) )
285
+ commands . push ( setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridRow' ) , lineRowStart ) )
286
286
} else if (
287
287
rowStart != null &&
288
288
typeof rowStart === 'number' &&
289
289
rowEnd != null &&
290
290
typeof rowEnd === 'number' &&
291
291
rowStart === rowEnd - 1
292
292
) {
293
- commands . push ( setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridRow' ) , areaRowStart ) )
293
+ commands . push ( setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridRow' ) , lineRowStart ) )
294
294
} else {
295
295
if ( rowStart != null ) {
296
296
commands . push (
297
- setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridRowStart' ) , areaRowStart ) ,
297
+ setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridRowStart' ) , lineRowStart ) ,
298
298
)
299
299
}
300
300
if ( rowEnd != null ) {
301
301
commands . push (
302
- setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridRowEnd' ) , areaRowEnd ) ,
302
+ setProperty ( 'always' , elementPath , PP . create ( 'style' , 'gridRowEnd' ) , lineRowEnd ) ,
303
303
)
304
304
}
305
305
}
@@ -352,7 +352,7 @@ function getCellCoordsDelta(
352
352
return gridCellCoordinates ( rowDiff , columnDiff )
353
353
}
354
354
355
- function asMaybeNamedAreaOrValue (
355
+ function asMaybeNamedLineOrValue (
356
356
grid : GridContainerProperties ,
357
357
axis : 'row' | 'column' ,
358
358
value : number | string | null ,
@@ -362,9 +362,9 @@ function asMaybeNamedAreaOrValue(
362
362
} else if ( typeof value === 'number' ) {
363
363
const template = axis === 'row' ? grid . gridTemplateRows : grid . gridTemplateColumns
364
364
if ( template ?. type === 'DIMENSIONS' ) {
365
- const maybeAreaStart = template . dimensions . at ( value - 1 )
366
- if ( maybeAreaStart != null && maybeAreaStart . areaName != null ) {
367
- return maybeAreaStart . areaName
365
+ const maybeLineStart = template . dimensions . at ( value - 1 )
366
+ if ( maybeLineStart != null && maybeLineStart . lineName != null ) {
367
+ return maybeLineStart . lineName
368
368
}
369
369
}
370
370
return value === 0 ? 1 : value
@@ -602,12 +602,12 @@ function alterGridTemplateDimensions(params: {
602
602
if ( before . length + after . length === 0 ) {
603
603
return null
604
604
}
605
- return gridCSSRepeat ( dim . times , [ ...before , ...after ] , dim . areaName )
605
+ return gridCSSRepeat ( dim . times , [ ...before , ...after ] , dim . lineName )
606
606
case 'REPLACE' :
607
607
return gridCSSRepeat (
608
608
dim . times ,
609
609
[ ...before , params . patch . newValue , ...after ] ,
610
- dim . areaName ,
610
+ dim . lineName ,
611
611
)
612
612
default :
613
613
assertNever ( params . patch )
0 commit comments