advanced-poe-filter-parser 0.9.2 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -3
- package/lib/parser.cjs +1382 -1498
- package/lib/parser.d.ts +42 -32
- package/lib/parser.mjs +1383 -1503
- package/package.json +9 -10
- package/src/advanced-poe-filter.pegjs +72 -32
package/lib/parser.d.ts
CHANGED
|
@@ -9,10 +9,18 @@ type Rarity = "Normal" | "Magic" | "Rare" | "Unique"
|
|
|
9
9
|
type Influence = "Shaper" | "Elder" | "Crusader" | "Hunter" | "Redeemer" | "Warlord" | "None"
|
|
10
10
|
type GemQualityType = "Superior" | "Divergent" | "Anomalous" | "Phantasmal"
|
|
11
11
|
type SocketType = "R" | "G" | "B" | "W" | "A" | "D"
|
|
12
|
+
type SocketGroup =
|
|
13
|
+
| SocketType
|
|
14
|
+
| `${SocketType}${SocketType}`
|
|
15
|
+
| `${SocketType}${SocketType}${SocketType}`
|
|
16
|
+
| `${SocketType}${SocketType}${SocketType}${SocketType}`
|
|
17
|
+
| `${SocketType}${SocketType}${SocketType}${SocketType}${SocketType}`
|
|
18
|
+
| `${SocketType}${SocketType}${SocketType}${SocketType}${SocketType}${SocketType}`
|
|
19
|
+
type ImplicitModTier = "Lesser" | "Greater" | "Grand" | "Exceptional" | "Exquisite" | "Perfect"
|
|
12
20
|
|
|
13
21
|
type ColorName = "Red" | "Green" | "Blue" | "Brown" | "White" | "Yellow" | "Cyan" | "Grey" | "Orange" | "Pink" | "Purple"
|
|
14
22
|
|
|
15
|
-
type MinimapIconSize =
|
|
23
|
+
type MinimapIconSize = "Large" | "Medium" | "Small"
|
|
16
24
|
type MinimapIconColor = ColorName
|
|
17
25
|
type MinimapIconShape =
|
|
18
26
|
| "Circle"
|
|
@@ -73,7 +81,8 @@ type SoundId =
|
|
|
73
81
|
| "ShVaal"
|
|
74
82
|
|
|
75
83
|
type RGBA = { rgb: { r: number; g: number; b: number }; alpha: number }
|
|
76
|
-
type
|
|
84
|
+
type AlertSound = { id: SoundId; volume: number }
|
|
85
|
+
type CustomAlertSound = { filePath: string; volume: number }
|
|
77
86
|
|
|
78
87
|
type AdvancedBlock = {
|
|
79
88
|
id: string
|
|
@@ -82,23 +91,23 @@ type AdvancedBlock = {
|
|
|
82
91
|
conditions: {
|
|
83
92
|
Class?: { ope: MatchOperator; vals: string[] }
|
|
84
93
|
BaseType?: { ope: MatchOperator; vals: string[] }
|
|
85
|
-
Rarity?:
|
|
86
|
-
BaseDefencePercentile?:
|
|
87
|
-
BaseArmour?:
|
|
88
|
-
BaseEnergyShield?:
|
|
89
|
-
BaseEvasion?:
|
|
90
|
-
BaseWard?:
|
|
91
|
-
DropLevel?:
|
|
92
|
-
ItemLevel?:
|
|
93
|
-
AreaLevel?:
|
|
94
|
-
GemLevel?:
|
|
94
|
+
Rarity?: { ope: NumOperator; val: Rarity }
|
|
95
|
+
BaseDefencePercentile?: { ope: NumOperator; val: number }
|
|
96
|
+
BaseArmour?: { ope: NumOperator; val: number }
|
|
97
|
+
BaseEnergyShield?: { ope: NumOperator; val: number }
|
|
98
|
+
BaseEvasion?: { ope: NumOperator; val: number }
|
|
99
|
+
BaseWard?: { ope: NumOperator; val: number }
|
|
100
|
+
DropLevel?: { ope: NumOperator; val: number }
|
|
101
|
+
ItemLevel?: { ope: NumOperator; val: number }
|
|
102
|
+
AreaLevel?: { ope: NumOperator; val: number }
|
|
103
|
+
GemLevel?: { ope: NumOperator; val: number }
|
|
95
104
|
TransfiguredGem?: boolean
|
|
96
|
-
StackSize?:
|
|
97
|
-
MapTier?:
|
|
98
|
-
Quality?:
|
|
99
|
-
LinkedSockets?:
|
|
100
|
-
Sockets?:
|
|
101
|
-
SocketGroup?:
|
|
105
|
+
StackSize?: { ope: NumOperator; val: number }
|
|
106
|
+
MapTier?: { ope: NumOperator; val: number }
|
|
107
|
+
Quality?: { ope: NumOperator; val: number }
|
|
108
|
+
LinkedSockets?: { ope: NumOperator; val: number }
|
|
109
|
+
Sockets?: { ope: NumOperator; vals: `${number}${SocketGroup}` | SocketGroup }
|
|
110
|
+
SocketGroup?: { ope: NumOperator; vals: `${number}${SocketGroup}` | SocketGroup }
|
|
102
111
|
FracturedItem?: boolean
|
|
103
112
|
SynthesisedItem?: boolean
|
|
104
113
|
Corrupted?: boolean
|
|
@@ -109,16 +118,16 @@ type AdvancedBlock = {
|
|
|
109
118
|
ElderMap?: boolean
|
|
110
119
|
BlightedMap?: boolean
|
|
111
120
|
UberBlightedMap?: boolean
|
|
112
|
-
Height?:
|
|
113
|
-
Width?:
|
|
114
|
-
CorruptedMods?:
|
|
115
|
-
EnchantmentPassiveNum?:
|
|
116
|
-
HasExplicitMod?: { ope:
|
|
121
|
+
Height?: { ope: NumOperator; val: number }
|
|
122
|
+
Width?: { ope: NumOperator; val: number }
|
|
123
|
+
CorruptedMods?: { ope: NumOperator; val: number }
|
|
124
|
+
EnchantmentPassiveNum?: { ope: NumOperator; val: number }
|
|
125
|
+
HasExplicitMod?: { numeric: { ope: NumOperator; val: number }; vals: string[] } | { ope: NumOperator; vals: string[] }
|
|
117
126
|
HasImplicitMod?: boolean
|
|
118
|
-
HasEaterOfWorldsImplicit?:
|
|
119
|
-
HasSearingExarchImplicit?:
|
|
127
|
+
HasEaterOfWorldsImplicit?: { ope: NumOperator; val: ImplicitModTier }
|
|
128
|
+
HasSearingExarchImplicit?: { ope: NumOperator; val: ImplicitModTier }
|
|
120
129
|
AnyEnchantment?: boolean
|
|
121
|
-
HasEnchantment?: { ope:
|
|
130
|
+
HasEnchantment?: { numeric: { ope: NumOperator; val: number }; vals: string[] } | { ope: NumOperator; vals: string[] }
|
|
122
131
|
HasInfluence?: { ope: MatchOperator; vals: Influence[] }
|
|
123
132
|
EnchantmentPassiveNode?: { ope: MatchOperator; vals: string[] }
|
|
124
133
|
Replica?: boolean
|
|
@@ -132,12 +141,12 @@ type AdvancedBlock = {
|
|
|
132
141
|
SetBorderColor?: RGBA
|
|
133
142
|
MinimapIcon?: { size: MinimapIconSize; color: MinimapIconColor; shape: MinimapIconShape }
|
|
134
143
|
PlayEffect?: { color: PlayEffectColor; temp: boolean }
|
|
135
|
-
PlayAlertSound?:
|
|
136
|
-
PlayAlertSoundPositional?:
|
|
137
|
-
CustomAlertSound?:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
PlayAlertSound?: AlertSound
|
|
145
|
+
PlayAlertSoundPositional?: AlertSound
|
|
146
|
+
CustomAlertSound?: CustomAlertSound
|
|
147
|
+
CustomAlertSoundOptional?: CustomAlertSound
|
|
148
|
+
DisableDropSoundIfAlertSound?: boolean
|
|
149
|
+
EnableDropSoundIfAlertSound?: boolean
|
|
141
150
|
DisableDropSound?: boolean
|
|
142
151
|
EnableDropSound?: boolean
|
|
143
152
|
}
|
|
@@ -145,6 +154,7 @@ type AdvancedBlock = {
|
|
|
145
154
|
location: {
|
|
146
155
|
start: { line: number; column: number; offset: number }
|
|
147
156
|
end: { line: number; column: number; offset: number }
|
|
157
|
+
source: string | undefined
|
|
148
158
|
}
|
|
149
159
|
}
|
|
150
160
|
|