You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmaxWidthFeature=at.media?.find(({ name }: any)=>name==='max-width')asAtFeatureComponent
54
-
constminWidthFeature=at.media?.find(({ name }: any)=>name==='min-width')asAtFeatureComponent
53
+
constmaxWidthFeature=mediaAtComponents?.find(({ name }: any)=>name==='max-width')asAtFeatureComponent
54
+
constminWidthFeature=mediaAtComponents?.find(({ name }: any)=>name==='min-width')asAtFeatureComponent
55
55
if(maxWidthFeature||minWidthFeature){
56
-
constmediaWidthStartIndex=this.rules.findIndex(eachSyntaxRule=>eachSyntaxRule.at?.media?.find(({ name }: any)=>name==='max-width'||name==='min-width'))
56
+
constmediaWidthStartIndex=this.rules.findIndex(eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width'||name==='min-width'))
57
57
if(mediaWidthStartIndex===-1){
58
58
index=endIndex+1
59
59
}else{
@@ -68,7 +68,7 @@ export default function withSyntaxLayer<TBase extends new (...args: any[]) => La
68
68
matchStartIndex=findIndex(
69
69
mediaWidthStartIndex,
70
70
eachSyntaxRule=>eachSyntaxRule.priority!==-1,
71
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')
71
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')
72
72
)
73
73
matchEndIndex=findIndex(
74
74
mediaWidthStartIndex,
@@ -78,7 +78,7 @@ export default function withSyntaxLayer<TBase extends new (...args: any[]) => La
78
78
matchStartIndex=findIndex(
79
79
mediaWidthStartIndex,
80
80
undefined,
81
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1
81
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1
82
82
)
83
83
matchEndIndex=endIndex
84
84
}
@@ -91,8 +91,8 @@ export default function withSyntaxLayer<TBase extends new (...args: any[]) => La
91
91
matchStartIndex=matchEndIndex+1
92
92
for(;i>=endI;i--){
93
93
consteachSyntaxRule=this.rules[i]
94
-
consteachMaxWidthFeature=eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')asAtFeatureComponent
95
-
consteachMinWidthFeature=eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')asAtFeatureComponent
94
+
consteachMaxWidthFeature=eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')asAtFeatureComponent
95
+
consteachMinWidthFeature=eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')asAtFeatureComponent
96
96
if(!eachMaxWidthFeature||!eachMinWidthFeature){
97
97
break
98
98
}else{
@@ -115,28 +115,28 @@ export default function withSyntaxLayer<TBase extends new (...args: any[]) => La
115
115
if(priority===-1){
116
116
matchStartIndex=findIndex(
117
117
mediaWidthStartIndex,
118
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')||eachSyntaxRule.priority!==-1,
119
-
eachSyntaxRule=>!eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')
118
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')||eachSyntaxRule.priority!==-1,
119
+
eachSyntaxRule=>!eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')
120
120
)
121
121
matchEndIndex=findIndex(
122
122
mediaWidthStartIndex,
123
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')||eachSyntaxRule.priority!==-1
123
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')||eachSyntaxRule.priority!==-1
124
124
)
125
125
}else{
126
126
matchStartIndex=findIndex(
127
127
mediaWidthStartIndex,
128
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1,
129
-
eachSyntaxRule=>!eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1
128
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1,
129
+
eachSyntaxRule=>!eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1
130
130
)
131
131
matchEndIndex=findIndex(
132
132
mediaWidthStartIndex,
133
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1
133
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1
134
134
)
135
135
}
136
136
137
137
if(matchStartIndex!==-1){
138
138
for(leti=matchEndIndex;i>=matchStartIndex;i--){
139
-
constfeature=(this.rules[i].at.media?.find(({ name }: any)=>name==='min-width')asAtFeatureComponent)
139
+
constfeature=(this.rules[i].mediaAtComponents?.find(({ name }: any)=>name==='min-width')asAtFeatureComponent)
140
140
if(!feature)continue
141
141
if(feature.value>minWidthFeature.value){
142
142
matchEndIndex=i-1
@@ -154,28 +154,28 @@ export default function withSyntaxLayer<TBase extends new (...args: any[]) => La
154
154
if(priority===-1){
155
155
matchStartIndex=findIndex(
156
156
mediaWidthStartIndex,
157
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')||eachSyntaxRule.priority!==-1,
158
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')
157
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')||eachSyntaxRule.priority!==-1,
158
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')
159
159
)
160
160
matchEndIndex=findIndex(
161
161
mediaWidthStartIndex,
162
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')||eachSyntaxRule.priority!==-1
162
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')||eachSyntaxRule.priority!==-1
163
163
)
164
164
}else{
165
165
matchStartIndex=findIndex(
166
166
mediaWidthStartIndex,
167
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1,
168
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.priority!==-1
167
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1,
168
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width')&&eachSyntaxRule.priority!==-1
169
169
)
170
170
matchEndIndex=findIndex(
171
171
mediaWidthStartIndex,
172
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1
172
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='min-width')&&eachSyntaxRule.priority!==-1
173
173
)
174
174
}
175
175
176
176
if(matchStartIndex!==-1){
177
177
for(leti=matchEndIndex;i>=matchStartIndex;i--){
178
-
constfeature=(this.rules[i].at.media?.find(({ name }: any)=>name==='max-width')asAtFeatureComponent)
178
+
constfeature=(this.rules[i].mediaAtComponents?.find(({ name }: any)=>name==='max-width')asAtFeatureComponent)
179
179
if(!feature)continue
180
180
if(feature.value<maxWidthFeature.value){
181
181
matchEndIndex=i-1
@@ -192,17 +192,17 @@ export default function withSyntaxLayer<TBase extends new (...args: any[]) => La
192
192
matchStartIndex=mediaStartIndex
193
193
matchEndIndex=findIndex(
194
194
mediaStartIndex,
195
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width'||name==='min-width')||eachSyntaxRule.priority!==-1
195
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width'||name==='min-width')||eachSyntaxRule.priority!==-1
196
196
)
197
197
}else{
198
198
matchStartIndex=findIndex(
199
199
mediaStartIndex,
200
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width'||name==='min-width'),
200
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width'||name==='min-width'),
201
201
eachSyntaxRule=>eachSyntaxRule.priority!==-1
202
202
)
203
203
matchEndIndex=findIndex(
204
204
mediaStartIndex,
205
-
eachSyntaxRule=>eachSyntaxRule.at.media?.find(({ name }: any)=>name==='max-width'||name==='min-width')
205
+
eachSyntaxRule=>eachSyntaxRule.mediaAtComponents?.find(({ name }: any)=>name==='max-width'||name==='min-width')
0 commit comments