Skip to content

Commit 7bc5833

Browse files
committed
Rules V41.
1 parent a0e8a51 commit 7bc5833

File tree

7 files changed

+359
-8
lines changed

7 files changed

+359
-8
lines changed
12 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version=40
2-
items=2204
1+
version=41
2+
items=2371

library/src/main/java/com/absinthe/rulesbundle/IconResMap.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,16 @@ object IconResMap {
150150
put(137, R.drawable.ic_lib_termux)
151151
put(138, R.drawable.ic_lib_rive)
152152
put(139, R.drawable.ic_lib_lynx)
153+
put(140, R.drawable.ic_lib_expo)
154+
put(141, R.drawable.ic_lib_cordova)
153155
}
154156

155157
SINGLE_COLOR_ICON_SET = setOf(
156158
-1, 2, 3, 5, 6, 9, 10, 11, 13, 14, 15, 16, 17,
157159
25, 27, 30, 31, 38, 40, 43, 44, 47, 48, 51, 53, 56,
158160
59, 61, 63, 64, 66, 74, 76, 81, 82, 83, 84, 93,
159161
97, 100, 101, 103, 104, 108, 110, 111, 124, 136,
160-
138, 139
162+
138, 139, 140
161163
)
162164
}
163165

library/src/main/java/com/absinthe/rulesbundle/LCRules.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ object LCRules : IAPI {
5555

5656
override suspend fun getRule(libName: String, @LibType type: Int, useRegex: Boolean): Rule? {
5757
val repo = ruleRepo ?: return null
58-
val entity = repo.getRule(libName)
58+
val entity = repo.getRule(libName, type)
5959
if (entity != null) {
6060
return Rule(
6161
entity.label,

library/src/main/java/com/absinthe/rulesbundle/RuleRepository.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ import java.util.regex.Pattern
88
class RuleRepository(context: Context) {
99
private val ruleDao = RuleDao(context)
1010

11-
private var rulesCache: Map<String, RuleEntity>? = null
11+
private var rulesCache: Map<Int, Map<String, RuleEntity>>? = null
1212
private var regexRulesCache: Map<Pattern, RuleEntity>? = null
1313

14-
suspend fun getRule(name: String): RuleEntity? {
14+
suspend fun getRule(name: String, type: Int): RuleEntity? {
1515
if (rulesCache == null) {
16-
rulesCache = getAllRules().associateBy { it.name }
16+
rulesCache = getAllRules()
17+
.groupBy { it.type }
18+
.mapValues { entry -> entry.value.associateBy { it.name } }
1719
}
18-
return rulesCache?.get(name)
20+
return rulesCache?.get(type)?.get(name)
1921
}
2022

2123
suspend fun insertRules(rules: List<RuleEntity>) = withContext(Dispatchers.IO) {
Lines changed: 335 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,335 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:aapt="http://schemas.android.com/aapt"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="1024"
6+
android:viewportHeight="1024">
7+
8+
<path
9+
android:fillColor="#000000"
10+
android:fillType="evenOdd"
11+
android:pathData="M771.8,802.8L653.2,634.7H371.2L253.2,802.7L771.8,802.8Z" />
12+
13+
<path
14+
android:fillColor="#7F8082"
15+
android:fillType="evenOdd"
16+
android:pathData="M721.2,659.9L677.4,751.4L647.2,637.4L721.2,659.9Z" />
17+
18+
<path
19+
android:fillColor="#7F8082"
20+
android:fillType="evenOdd"
21+
android:pathData="M317.8,659.9L347.6,751.4L377.8,637.4L317.8,659.9Z" />
22+
23+
<path
24+
android:fillType="evenOdd"
25+
android:pathData="M178.6,357.3L178.6,357.3L240.7,751.4H347.6L338.9,659.9H393.7L400.7,751.4H624.6L631.6,659.9H686.1L677.4,751.4H784.9L846.4,357.3L846.4,357.3L178.6,357.3Z"
26+
android:strokeWidth="1"
27+
android:strokeColor="#D6D6D6"
28+
android:strokeLineJoin="round">
29+
30+
<aapt:attr name="android:fillColor">
31+
32+
<gradient
33+
android:endX="179"
34+
android:endY="352.9"
35+
android:startX="779.3"
36+
android:startY="739.6"
37+
android:type="linear">
38+
39+
<item
40+
android:color="#FFACACAC"
41+
android:offset="0" />
42+
43+
<item
44+
android:color="#FFE9E9E9"
45+
android:offset="1" />
46+
47+
</gradient>
48+
49+
</aapt:attr>
50+
51+
</path>
52+
53+
<path
54+
android:fillType="evenOdd"
55+
android:pathData="M331.4,599.5L363.5,479.1L361.2,235.7L301,357.3L331.4,599.5Z">
56+
57+
<aapt:attr name="android:fillColor">
58+
59+
<gradient
60+
android:centerX="559.9"
61+
android:centerY="828.7"
62+
android:gradientRadius="355.8"
63+
android:type="radial">
64+
65+
<item
66+
android:color="#FF25303B"
67+
android:offset="0" />
68+
69+
<item
70+
android:color="#0025303B"
71+
android:offset="1" />
72+
73+
</gradient>
74+
75+
</aapt:attr>
76+
77+
</path>
78+
79+
<path
80+
android:fillColor="#293441"
81+
android:fillType="evenOdd"
82+
android:pathData="M562.2,211.9H695.5L692.7,506.4H552L562.2,211.9Z" />
83+
84+
<path
85+
android:fillColor="#293441"
86+
android:fillType="evenOdd"
87+
android:pathData="M465.9,212.1L336.1,212.2L339.2,505.4H471.3L465.9,212.1Z" />
88+
89+
<path
90+
android:fillColor="#2D3948"
91+
android:fillType="evenOdd"
92+
android:pathData="M349.5,479.1L331.4,599.5H694.7L673.1,479.9L349.5,479.1Z" />
93+
94+
<path
95+
android:fillType="evenOdd"
96+
android:pathData="M694.7,599.5L663.1,479.9L664.3,235L725.4,357.3L694.7,599.5Z">
97+
98+
<aapt:attr name="android:fillColor">
99+
100+
<gradient
101+
android:endX="665.1"
102+
android:endY="235.7"
103+
android:startX="694.7"
104+
android:startY="586.8"
105+
android:type="linear">
106+
107+
<item
108+
android:color="#FF24303A"
109+
android:offset="0" />
110+
111+
<item
112+
android:color="#FF394958"
113+
android:offset="1" />
114+
115+
</gradient>
116+
117+
</aapt:attr>
118+
119+
</path>
120+
121+
<path
122+
android:fillType="evenOdd"
123+
android:pathData="M331.6,599.5L363.5,479.1L361.2,235.7L301,357.3L331.6,599.5Z">
124+
125+
<aapt:attr name="android:fillColor">
126+
127+
<gradient
128+
android:endX="361.2"
129+
android:endY="235.7"
130+
android:startX="331.6"
131+
android:startY="586.8"
132+
android:type="linear">
133+
134+
<item
135+
android:color="#FF24303A"
136+
android:offset="0" />
137+
138+
<item
139+
android:color="#FF394958"
140+
android:offset="1" />
141+
142+
</gradient>
143+
144+
</aapt:attr>
145+
146+
</path>
147+
148+
<path
149+
android:fillColor="#2D3B48"
150+
android:fillType="evenOdd"
151+
android:pathData="M452.2,280L464.2,535.8H557.7L572.7,280L452.2,280Z" />
152+
153+
<path
154+
android:fillType="evenOdd"
155+
android:pathData="M846.4,357.3L693.7,112.9H330.6L178.6,357.3H301L360.9,236.2H459.5L452.2,280H572.7L566.4,234.9H664.6L725.4,357.3H846.4Z"
156+
android:strokeWidth="1"
157+
android:strokeColor="#D6D6D6"
158+
android:strokeLineJoin="round">
159+
160+
<aapt:attr name="android:fillColor">
161+
162+
<gradient
163+
android:endX="249.1"
164+
android:endY="249.5"
165+
android:startX="743.5"
166+
android:startY="199.9"
167+
android:type="linear">
168+
169+
<item
170+
android:color="#FFE5E5E5"
171+
android:offset="0" />
172+
173+
<item
174+
android:color="#FFFFFFFF"
175+
android:offset="1" />
176+
177+
</gradient>
178+
179+
</aapt:attr>
180+
181+
</path>
182+
183+
<path
184+
android:fillAlpha="0.449"
185+
android:fillColor="#363F49"
186+
android:fillType="evenOdd"
187+
android:pathData="M566.4,234.9L665.4,235L725.4,357.3L694.7,599.5H464.2L583.3,357.3L566.4,234.9Z" />
188+
189+
<path
190+
android:fillAlpha="0.3"
191+
android:fillType="evenOdd"
192+
android:pathData="M583.3,357.3L464.2,599.5L331.4,599.5L301,357.3H583.3Z">
193+
194+
<aapt:attr name="android:fillColor">
195+
196+
<gradient
197+
android:endX="419.8"
198+
android:endY="599.5"
199+
android:startX="419.8"
200+
android:startY="357.3"
201+
android:type="linear">
202+
203+
<item
204+
android:color="#FFFFFFFF"
205+
android:offset="0" />
206+
207+
<item
208+
android:color="#87FFFFFF"
209+
android:offset="0.5" />
210+
211+
<item
212+
android:color="#00FFFFFF"
213+
android:offset="1" />
214+
215+
</gradient>
216+
217+
</aapt:attr>
218+
219+
</path>
220+
221+
<path
222+
android:fillAlpha="0.2"
223+
android:fillType="evenOdd"
224+
android:pathData="M360.9,236.2H459.5L452.2,280H572.7L583.3,357.3H301L360.9,236.2Z">
225+
226+
<aapt:attr name="android:fillColor">
227+
228+
<gradient
229+
android:endX="442.2"
230+
android:endY="236.2"
231+
android:startX="442.2"
232+
android:startY="357.3"
233+
android:type="linear">
234+
235+
<item
236+
android:color="#FFFFFFFF"
237+
android:offset="0" />
238+
239+
<item
240+
android:color="#00FFFFFF"
241+
android:offset="1" />
242+
243+
</gradient>
244+
245+
</aapt:attr>
246+
247+
</path>
248+
249+
<path
250+
android:fillAlpha="0.8"
251+
android:fillColor="#05F0FF"
252+
android:fillType="evenOdd"
253+
android:pathData="M594.6,459.9C594.6,426.7 602.2,399.8 611.6,399.8C620.9,399.8 628.5,426.7 628.5,459.9C628.5,493.1 620.9,520 611.6,520C602.2,520 594.6,493.1 594.6,459.9Z" />
254+
255+
<path
256+
android:fillAlpha="0.9"
257+
android:fillColor="#ffffff"
258+
android:fillType="evenOdd"
259+
android:pathData="M598.4,460.8C598.4,431.4 604.3,407.5 611.6,407.5C618.9,407.5 624.8,431.4 624.8,460.8C624.8,490.2 618.9,514 611.6,514C604.3,514 598.4,490.2 598.4,460.8Z" />
260+
261+
<path
262+
android:fillColor="#00000000"
263+
android:fillType="evenOdd"
264+
android:pathData="M598.4,460.8C598.4,431.4 604.3,407.5 611.6,407.5C618.9,407.5 624.8,431.4 624.8,460.8C624.8,490.2 618.9,514 611.6,514C604.3,514 598.4,490.2 598.4,460.8Z"
265+
android:strokeWidth="1"
266+
android:strokeAlpha="0.9"
267+
android:strokeColor="#06EFFE"
268+
android:strokeLineCap="round" />
269+
270+
<path
271+
android:fillAlpha="0.9"
272+
android:fillColor="#FEFFFF"
273+
android:fillType="evenOdd"
274+
android:pathData="M598.4,460.9C598.4,433.7 604.3,411.7 611.6,411.7C618.9,411.7 624.8,433.7 624.8,460.9C624.8,488.1 618.9,510.2 611.6,510.2C604.3,510.2 598.4,488.1 598.4,460.9Z" />
275+
276+
<path
277+
android:fillColor="#00000000"
278+
android:fillType="evenOdd"
279+
android:pathData="M598.4,460.9C598.4,433.7 604.3,411.7 611.6,411.7C618.9,411.7 624.8,433.7 624.8,460.9C624.8,488.1 618.9,510.2 611.6,510.2C604.3,510.2 598.4,488.1 598.4,460.9Z"
280+
android:strokeWidth="1"
281+
android:strokeAlpha="0.9"
282+
android:strokeColor="#06EFFE"
283+
android:strokeLineCap="round" />
284+
285+
<path
286+
android:fillAlpha="0.8"
287+
android:fillColor="#05F0FF"
288+
android:fillType="evenOdd"
289+
android:pathData="M402.8,468.4C402.8,435.2 410.4,408.2 419.7,408.2C429.1,408.2 436.7,435.2 436.7,468.4C436.7,501.6 429.1,528.5 419.7,528.5C410.4,528.5 402.8,501.6 402.8,468.4Z" />
290+
291+
<path
292+
android:fillAlpha="0.9"
293+
android:fillColor="#ffffff"
294+
android:fillType="evenOdd"
295+
android:pathData="M406.5,469.3C406.5,439.9 412.4,416 419.7,416C427,416 432.9,439.9 432.9,469.3C432.9,498.7 427,522.5 419.7,522.5C412.4,522.5 406.5,498.7 406.5,469.3Z" />
296+
297+
<path
298+
android:fillColor="#00000000"
299+
android:fillType="evenOdd"
300+
android:pathData="M406.5,469.3C406.5,439.9 412.4,416 419.7,416C427,416 432.9,439.9 432.9,469.3C432.9,498.7 427,522.5 419.7,522.5C412.4,522.5 406.5,498.7 406.5,469.3Z"
301+
android:strokeWidth="1"
302+
android:strokeAlpha="0.9"
303+
android:strokeColor="#06EFFE"
304+
android:strokeLineCap="round" />
305+
306+
<path
307+
android:fillAlpha="0.9"
308+
android:fillColor="#FEFFFF"
309+
android:fillType="evenOdd"
310+
android:pathData="M406.5,469.4C406.5,442.2 412.4,420.2 419.7,420.2C427,420.2 432.9,442.2 432.9,469.4C432.9,496.6 427,518.7 419.7,518.7C412.4,518.7 406.5,496.6 406.5,469.4Z" />
311+
312+
<path
313+
android:fillColor="#00000000"
314+
android:fillType="evenOdd"
315+
android:pathData="M406.5,469.4C406.5,442.2 412.4,420.2 419.7,420.2C427,420.2 432.9,442.2 432.9,469.4C432.9,496.6 427,518.7 419.7,518.7C412.4,518.7 406.5,496.6 406.5,469.4Z"
316+
android:strokeWidth="1"
317+
android:strokeAlpha="0.9"
318+
android:strokeColor="#06EFFE"
319+
android:strokeLineCap="round" />
320+
321+
<path
322+
android:fillColor="#00000000"
323+
android:pathData="M360.9,236.2H459.5L452.2,280H572.7L566.4,234.9L665.4,235L725.4,357.3L694.7,599.5L331.4,599.5L301,357.3L360.9,236.2Z"
324+
android:strokeWidth="1"
325+
android:strokeColor="#D6D6D6"
326+
android:strokeLineJoin="round" />
327+
328+
<path
329+
android:fillColor="#00000000"
330+
android:pathData="M724.4,357.3H300.7"
331+
android:strokeWidth="1"
332+
android:strokeAlpha="0.343"
333+
android:strokeColor="#ffffff" />
334+
335+
</vector>

0 commit comments

Comments
 (0)