wuira 0.3.2 → 0.4.0

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +27 -9
  3. package/docs/source-converters.md +6 -6
  4. package/docs/spells.md +1 -1
  5. package/lib/datasources/NativeApi.d.ts +319 -0
  6. package/lib/datasources/NativeApi.lua +1114 -0
  7. package/lib/datasources/NativeNumberSource.d.ts +1 -1
  8. package/lib/datasources/NativeNumberSource.lua +16 -1
  9. package/lib/datasources/ProgressSource.lua +5 -9
  10. package/lib/datasources/Source.d.ts +18 -0
  11. package/lib/datasources/Source.lua +300 -0
  12. package/lib/datasources/SourceConverter.d.ts +1 -1
  13. package/lib/datasources/SourceConverter.lua +10 -1
  14. package/lib/datasources/TextureSource.d.ts +1 -1
  15. package/lib/datasources/TextureSource.lua +16 -1
  16. package/lib/datasources/TimerSource.d.ts +1 -1
  17. package/lib/datasources/TimerSource.lua +16 -1
  18. package/lib/datasources/UseSource.d.ts +49 -0
  19. package/lib/datasources/UseSource.lua +9 -0
  20. package/lib/datasources/index.d.ts +5 -25
  21. package/lib/datasources/index.lua +49 -69
  22. package/lib/helpers/Auras.d.ts +5 -0
  23. package/lib/helpers/Auras.lua +47 -0
  24. package/lib/helpers/Range.d.ts +2 -0
  25. package/lib/helpers/Range.lua +30 -0
  26. package/lib/helpers/index.d.ts +2 -0
  27. package/lib/helpers/index.lua +12 -0
  28. package/lib/index.d.ts +1 -0
  29. package/lib/index.lua +6 -0
  30. package/lib/platform/forever.d.ts +3 -0
  31. package/lib/rendering/progress.lua +5 -150
  32. package/lib/ui/UnitPortrait.d.ts +1 -2
  33. package/lib/ui/UnitPortrait.lua +11 -18
  34. package/package.json +8 -1
  35. package/lib/datasources/AuraTimer.d.ts +0 -21
  36. package/lib/datasources/AuraTimer.lua +0 -322
  37. package/lib/datasources/Auras.d.ts +0 -32
  38. package/lib/datasources/Auras.lua +0 -284
  39. package/lib/datasources/CastTimer.d.ts +0 -9
  40. package/lib/datasources/CastTimer.lua +0 -240
  41. package/lib/datasources/EditModeLayouts.d.ts +0 -33
  42. package/lib/datasources/EditModeLayouts.lua +0 -689
  43. package/lib/datasources/GroupMembers.d.ts +0 -24
  44. package/lib/datasources/GroupMembers.lua +0 -454
  45. package/lib/datasources/GroupRoster.d.ts +0 -28
  46. package/lib/datasources/GroupRoster.lua +0 -611
  47. package/lib/datasources/KnownSpells.d.ts +0 -33
  48. package/lib/datasources/KnownSpells.lua +0 -1068
  49. package/lib/datasources/ManaRegenTimer.d.ts +0 -29
  50. package/lib/datasources/ManaRegenTimer.lua +0 -674
  51. package/lib/datasources/Resources.d.ts +0 -60
  52. package/lib/datasources/Resources.lua +0 -824
  53. package/lib/datasources/SpellCooldown.d.ts +0 -12
  54. package/lib/datasources/SpellCooldown.lua +0 -218
  55. package/lib/datasources/SpellSource.d.ts +0 -14
  56. package/lib/datasources/SpellSource.lua +0 -224
  57. package/lib/datasources/SwingTimer.d.ts +0 -31
  58. package/lib/datasources/SwingTimer.lua +0 -641
  59. package/lib/datasources/TotemTimer.d.ts +0 -10
  60. package/lib/datasources/TotemTimer.lua +0 -260
  61. package/lib/datasources/UnitInfo.d.ts +0 -51
  62. package/lib/datasources/UnitInfo.lua +0 -783
  63. package/lib/datasources/UnitSource.d.ts +0 -38
  64. package/lib/datasources/UnitSource.lua +0 -602
package/CHANGELOG.md CHANGED
@@ -7,6 +7,33 @@ with the release date and highlight breaking changes explicitly.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 0.4.0 — 2026-10-19
11
+
12
+ ### Breaking
13
+
14
+ - A datasource is one Blizzard call. `UseSource(UnitHealth, "player")` reads `UnitHealth`. Composite classes are removed, including `HP`, `Mana`, `Absorb`, `Prediction`, `GroupMembers`, `GroupRoster`, `Buffs`, `Debuffs`, `KnownSpells`, `SpellSource`, `UnitSource`, `ClassSource`, `SpecSource`, `EditModeLayouts`, and the cast, aura, swing, and totem timer bundles.
15
+
16
+ ### Added
17
+
18
+ - One source for each exposed call: group size, raid roster row, unit facts, auras, spells, totems, edit mode layouts, specializations, the spell book, casts, and channels.
19
+ - `Range`, `ReadAuras`, and `FilterAura` are helpers. `wuira/helpers` exports them. `Range(1, 5)` returns `[1, 2, 3, 4, 5]`.
20
+
21
+ ## 0.3.3 — 2026-10-19
22
+
23
+ ### Breaking
24
+
25
+ - Datasource classes open through `UseSource`. `new HP()`, `new Mana()`, `new SourceConverter()`, and the other datasource constructors are not part of the TypeScript API.
26
+
27
+ ### Added
28
+
29
+ - `Absorb` reads `UnitGetTotalAbsorbs`. `Prediction` reads `UnitGetIncomingHeals`. Both are standalone sources.
30
+ - `UseSource(HP, unit).UseAbsorb().UsePrediction()` appends those sources for the same unit. `hp.Absorb` and `hp.Prediction` stay empty until requested.
31
+ - `Source` stores the query props and passes them back on each read.
32
+
33
+ ### Changed
34
+
35
+ - `UseHealPrediction`, `UseAbsorbPrediction`, `HealPrediction`, and `AbsorbPrediction` forward to the new methods and getters.
36
+
10
37
  ## 0.3.2 — 2026-10-19
11
38
 
12
39
  ### Fixed
package/README.md CHANGED
@@ -54,17 +54,32 @@ npm run build
54
54
 
55
55
  ## Data sources
56
56
 
57
+ Open every datasource with `UseSource`. Those classes have no public constructor.
58
+
57
59
  ```tsx
58
- import { HP, Mana, Unit } from "wuira/datasources";
60
+ import { UseSource, GetNumGroupMembers, UnitHealth, GetAuraDataByIndex } from "wuira/datasources";
61
+ import { FilterAura, Range, ReadAuras } from "wuira/helpers";
62
+
63
+ const count = UseSource(GetNumGroupMembers);
64
+ const indexes = Range(1, count.Value);
65
+ const health = UseSource(UnitHealth, "player");
66
+ const aura = UseSource(GetAuraDataByIndex, "target", 1, "HELPFUL");
67
+ const auras = ReadAuras("target", "HELPFUL");
68
+ const present = FilterAura(auras, "Fortitude");
69
+ ```
59
70
 
60
- const hp = new HP(Unit.Player).UseHealPrediction().UseAbsorbPrediction();
61
- const mana = new Mana(Unit.Player).UseRegenTimer();
71
+ Each source is one native call. Arguments and the returned value match that call. `Range`, `ReadAuras`, and `FilterAura` are helpers: they walk or query values the caller already has. `TimerSource` still binds a native duration to a progress bar or cooldown.
62
72
 
63
- <progress height={24} source={hp} />
64
- <progress height={24} source={mana} />
65
- ```
73
+ ## Layout
66
74
 
67
- Other sources include `AuraTimer`, `GlobalCooldown`, `CastTimer`, `SpellCooldown`, `SwingTimer`, `GroupMembers`, `PartyMembers`, `RaidMembers`, `Buffs`, `Debuffs`, `KnownSpells`, `Spells`, `UnitSource`, `ClassSource`, `SpecSource`, and `SpellSource`.
75
+ `width` and `height` accept a number, `"inherit"`, or `"fill"`. Fill siblings share the space left after fixed children. `columnGap` is horizontal space. `rowGap` is vertical space.
76
+
77
+ ```tsx
78
+ <flow width={200} height={40} direction="ltr" columnGap={4} rowGap={2} alignY="center">
79
+ <cell width="fill" height={12} />
80
+ <cell width={40} height={12} />
81
+ </flow>
82
+ ```
68
83
 
69
84
  ## Secure buttons
70
85
 
@@ -82,14 +97,17 @@ Supported action types: `spell`, `item`, `macro`, `action`, and `target`. Action
82
97
  ```tsx
83
98
  import { UI } from "wuira/ui";
84
99
  import { Nameplates } from "wuira/skins";
85
- import { HP } from "wuira/datasources";
100
+ import { UseSource, UnitHealth } from "wuira/datasources";
86
101
 
87
102
  const plates = Nameplates
88
103
  .Apply(p => p.GUID === configuredGUID, p => {
89
104
  if (p.Native.healthBar) p.Size(p.Native.healthBar, 140, 12);
90
105
  })
91
106
  .Replace(() => true, p => (
92
- <progress width={140} height={12} source={new HP(p.Unit)} />
107
+ <cell width={140} height={12} onMount={() => {
108
+ const health = UseSource(UnitHealth, p.Unit);
109
+ return () => health.Dispose();
110
+ }} />
93
111
  ));
94
112
 
95
113
  // plates.Dispose();
@@ -3,12 +3,12 @@
3
3
  `SourceConverter` transforms a readable source with a typed callback. It consumes change notifications, shares one upstream subscription across observers, and does not create a timer or dispose the shared input. Sources without notifications remain available as checked one-time reads.
4
4
 
5
5
  ```ts
6
- import { SourceConverter, HP, ClassSource, Unit } from "wuira/datasources";
6
+ import { UseSource, SourceConverter, UnitHealth, UnitClass } from "wuira/datasources";
7
7
 
8
- const hp = new HP(Unit.Player);
9
- const doubled = new SourceConverter(hp, value => value * 2);
10
- const characterClass = new ClassSource(Unit.Player);
11
- const token = new SourceConverter(characterClass, info => info?.token);
8
+ const hp = UseSource(UnitHealth, "player");
9
+ const doubled = UseSource(SourceConverter, hp, value => value * 2);
10
+ const characterClass = UseSource(UnitClass, "player");
11
+ const token = UseSource(SourceConverter, characterClass, info => info.classFile);
12
12
  const stop = doubled.BindTo(value => console.log(value));
13
13
 
14
14
  // On removal:
@@ -22,6 +22,6 @@ characterClass.Dispose();
22
22
 
23
23
  `onChange()` observes future readable output changes; `BindTo()` also applies the current readable value immediately. Identical scalar outputs do not emit again. `When()` filters emissions without changing the checked getter. `Dispose()` releases observers while leaving the input available to other consumers.
24
24
 
25
- Restricted values, including nested secret fields, never reach a conversion callback. Restrictions are checked when consumed; combat alone does not mark a value secret. ClassSource subscriptions follow unit identity changes and native events, releasing listeners when the last consumer unsubscribes.
25
+ Restricted values, including nested secret fields, never reach a conversion callback. Restrictions are checked when consumed; combat alone does not mark a value secret. A native source is a pull of one call. It notifies a converter only when that source exposes `onChange`.
26
26
 
27
27
  The SDK accepts TypeScript callbacks. Editable case rules and math formulas are LumaUI builder factories, implemented using this generic source. Converters produce data; protected button actions remain subject to native combat restrictions.
package/docs/spells.md CHANGED
@@ -22,7 +22,7 @@ effects and records whose ownership cannot be established from these tables.
22
22
  No heuristic turns every unclassified record into an NPC-only spell.
23
23
  Class-family membership does not prove that a spell is learnable by a player.
24
24
  The snapshot includes retired, test and hidden records still present in this
25
- Forever client's tables. Use KnownSpells for a character's learned abilities.
25
+ Forever client's tables. Learned spells come from the spell book calls, one row at a time.
26
26
 
27
27
  Every ID has an explicit ID-suffixed member. Rank labels come from the client.
28
28
  Short aliases select the lowest linked rank; ambiguous unranked names require
@@ -0,0 +1,319 @@
1
+ import { Source } from "./Source";
2
+ export interface UnitName {
3
+ readonly name: string | undefined;
4
+ readonly realm: string | undefined;
5
+ }
6
+ /** Fields named by `GetRaidRosterInfo`. No identity or pet is added. */
7
+ export interface RaidRosterInfo {
8
+ readonly name: string | undefined;
9
+ readonly rank: number | undefined;
10
+ readonly subgroup: number | undefined;
11
+ readonly level: number | undefined;
12
+ readonly className: string | undefined;
13
+ readonly fileName: string | undefined;
14
+ readonly zone: string | undefined;
15
+ readonly online: boolean | undefined;
16
+ readonly isDead: boolean | undefined;
17
+ readonly role: string | undefined;
18
+ readonly isML: boolean | undefined;
19
+ }
20
+ /** Fields returned by `C_UnitAuras.GetAuraDataByIndex`. */
21
+ export interface AuraData {
22
+ readonly spellId: number;
23
+ readonly name: string;
24
+ readonly icon: number;
25
+ readonly sourceUnit?: string;
26
+ }
27
+ /** `GetNumGroupMembers`. The value is the group size, including the player. */
28
+ export declare class GetNumGroupMembers extends Source<number, []> {
29
+ protected constructor();
30
+ protected read(): number;
31
+ }
32
+ /** `IsInRaid`. */
33
+ export declare class IsInRaid extends Source<boolean, []> {
34
+ protected constructor();
35
+ protected read(): boolean;
36
+ }
37
+ /** `UnitGUID(unit)`. */
38
+ export declare class UnitGUID extends Source<string | undefined, [string]> {
39
+ protected constructor(unit: string);
40
+ protected read(props: [string]): string | undefined;
41
+ }
42
+ /** `UnitFullName(unit)`. Both native returns are kept. */
43
+ export declare class UnitFullName extends Source<UnitName, [string]> {
44
+ protected constructor(unit: string);
45
+ protected HasSecretFields(value: UnitName): boolean;
46
+ protected read(props: [string]): UnitName;
47
+ }
48
+ /** `UnitExists(unit)`. */
49
+ export declare class UnitExists extends Source<boolean, [string]> {
50
+ protected constructor(unit: string);
51
+ protected read(props: [string]): boolean;
52
+ }
53
+ /** `GetRaidRosterInfo(index)`. One row. */
54
+ export declare class GetRaidRosterInfo extends Source<RaidRosterInfo, [number]> {
55
+ protected constructor(index: number);
56
+ protected HasSecretFields(value: RaidRosterInfo): boolean;
57
+ protected read(props: [number]): RaidRosterInfo;
58
+ }
59
+ /** `C_UnitAuras.GetAuraDataByIndex(unit, index, filter)`. One aura, or undefined when the index is past the end. */
60
+ export declare class GetAuraDataByIndex extends Source<AuraData | undefined, [string, number, string]> {
61
+ protected constructor(unit: string, index: number, filter: string);
62
+ protected HasSecretFields(value: AuraData | undefined): boolean;
63
+ protected read(props: [string, number, string]): AuraData | undefined;
64
+ }
65
+ /** `UnitHealth(unit)`. */
66
+ export declare class UnitHealth extends Source<number, [string]> {
67
+ protected constructor(unit: string);
68
+ protected read(props: [string]): number;
69
+ }
70
+ /** `UnitHealthMax(unit)`. */
71
+ export declare class UnitHealthMax extends Source<number, [string]> {
72
+ protected constructor(unit: string);
73
+ protected read(props: [string]): number;
74
+ }
75
+ /** `UnitPower(unit, powerType)`. */
76
+ export declare class UnitPower extends Source<number, [string, number]> {
77
+ protected constructor(unit: string, powerType: number);
78
+ protected read(props: [string, number]): number;
79
+ }
80
+ /** `UnitPowerMax(unit, powerType)`. */
81
+ export declare class UnitPowerMax extends Source<number, [string, number]> {
82
+ protected constructor(unit: string, powerType: number);
83
+ protected read(props: [string, number]): number;
84
+ }
85
+ /** `UnitGetTotalAbsorbs(unit)`. */
86
+ export declare class UnitGetTotalAbsorbs extends Source<number, [string]> {
87
+ protected constructor(unit: string);
88
+ protected read(props: [string]): number;
89
+ }
90
+ /** `UnitGetIncomingHeals(unit)`. */
91
+ export declare class UnitGetIncomingHeals extends Source<number, [string]> {
92
+ protected constructor(unit: string);
93
+ protected read(props: [string]): number;
94
+ }
95
+ export interface UnitClassInfo {
96
+ readonly name: string | undefined;
97
+ readonly classFile: string | undefined;
98
+ readonly classId: number | undefined;
99
+ }
100
+ /** `UnitClass(unit)`. */
101
+ export declare class UnitClass extends Source<UnitClassInfo, [string]> {
102
+ protected constructor(unit: string);
103
+ protected HasSecretFields(value: UnitClassInfo): boolean;
104
+ protected read(props: [string]): UnitClassInfo;
105
+ }
106
+ /** `UnitIsPlayer(unit)`. */
107
+ export declare class UnitIsPlayer extends Source<boolean, [string]> {
108
+ protected constructor(unit: string);
109
+ protected read(props: [string]): boolean;
110
+ }
111
+ /** `UnitIsUnit(first, second)`. */
112
+ export declare class UnitIsUnit extends Source<boolean, [string, string]> {
113
+ protected constructor(first: string, second: string);
114
+ protected read(props: [string, string]): boolean;
115
+ }
116
+ /** `C_Spell.GetSpellName(spellId)`. */
117
+ export declare class GetSpellName extends Source<string | undefined, [number | string]> {
118
+ protected constructor(spellId: number | string);
119
+ protected read(props: [number | string]): string | undefined;
120
+ }
121
+ /** `C_Spell.GetSpellTexture(spellId)`. */
122
+ export declare class GetSpellTexture extends Source<number | undefined, [number | string]> {
123
+ protected constructor(spellId: number | string);
124
+ protected read(props: [number | string]): number | undefined;
125
+ }
126
+ /** Opaque duration object returned by `C_Spell.GetSpellCooldownDuration`. */
127
+ export interface SpellCooldownDuration {
128
+ readonly __wuiraSpellCooldown: unique symbol;
129
+ }
130
+ /** `C_Spell.GetSpellCooldownDuration(spellId, ignoreGCD)`. */
131
+ export declare class GetSpellCooldownDuration extends Source<SpellCooldownDuration | undefined, [number | string, boolean]> {
132
+ protected constructor(spellId: number | string, ignoreGCD: boolean);
133
+ protected read(props: [number | string, boolean]): SpellCooldownDuration | undefined;
134
+ }
135
+ /** `C_Spell.IsSpellPassive(spellId)`. */
136
+ export declare class IsSpellPassive extends Source<boolean | undefined, [number | string]> {
137
+ protected constructor(spellId: number | string);
138
+ protected read(props: [number | string]): boolean | undefined;
139
+ }
140
+ /** `C_UnitAuras.GetAuraDataBySpellName(unit, name, filter)`. */
141
+ export declare class GetAuraDataBySpellName extends Source<wuiraNativeAuraData | undefined, [string, string, string]> {
142
+ protected constructor(unit: string, name: string, filter: string);
143
+ protected read(props: [string, string, string]): wuiraNativeAuraData | undefined;
144
+ }
145
+ export interface TotemInfo {
146
+ readonly haveTotem: boolean | undefined;
147
+ readonly name: string | undefined;
148
+ readonly startTime: number | undefined;
149
+ readonly duration: number | undefined;
150
+ readonly icon: number | undefined;
151
+ readonly modRate: number | undefined;
152
+ readonly spellId: number | undefined;
153
+ }
154
+ /** `GetTotemInfo(slot)`. */
155
+ export declare class GetTotemInfo extends Source<TotemInfo, [number]> {
156
+ protected constructor(slot: number);
157
+ protected read(props: [number]): TotemInfo;
158
+ }
159
+ /** `GetNumTotemSlots`. */
160
+ export declare class GetNumTotemSlots extends Source<number, []> {
161
+ protected constructor();
162
+ protected read(): number;
163
+ }
164
+ export interface EditModeLayoutRow {
165
+ layoutName: string;
166
+ layoutType: number;
167
+ interfaceStyle?: number;
168
+ }
169
+ export interface EditModeLayoutList {
170
+ layouts: EditModeLayoutRow[];
171
+ activeLayout: number;
172
+ }
173
+ /** `C_EditMode.GetLayouts`. */
174
+ export declare class GetLayouts extends Source<EditModeLayoutList | undefined, []> {
175
+ protected constructor();
176
+ protected read(): EditModeLayoutList | undefined;
177
+ }
178
+ export interface SpecializationRow {
179
+ readonly id: number | undefined;
180
+ readonly name: string | undefined;
181
+ readonly description: string | undefined;
182
+ readonly icon: number | undefined;
183
+ readonly role: string | undefined;
184
+ readonly primaryStat: number | undefined;
185
+ readonly pointsSpent: number | undefined;
186
+ }
187
+ /** `C_SpecializationInfo.GetNumSpecializationsForClassID(classId)`. */
188
+ export declare class GetNumSpecializationsForClassID extends Source<number, [number]> {
189
+ protected constructor(classId: number);
190
+ protected read(props: [number]): number;
191
+ }
192
+ /** `C_SpecializationInfo.GetSpecializationInfo`. One row. */
193
+ export declare class GetSpecializationInfo extends Source<SpecializationRow, [number, boolean, boolean, string | undefined, number | undefined, number | undefined, number | undefined]> {
194
+ protected constructor(index: number, inspect: boolean, pet: boolean, unit?: string, sex?: number, group?: number, classId?: number);
195
+ protected read(props: [number, boolean, boolean, string | undefined, number | undefined, number | undefined, number | undefined]): SpecializationRow;
196
+ }
197
+ /** `C_SpellBook.GetNumSpellBookSkillLines`. */
198
+ export declare class GetNumSpellBookSkillLines extends Source<number, []> {
199
+ protected constructor();
200
+ protected read(): number;
201
+ }
202
+ /** `C_SpellBook.GetSpellBookItemInfo(slot, bank)`. */
203
+ export declare class GetSpellBookItemInfo extends Source<{
204
+ itemType: number;
205
+ spellID?: number;
206
+ name?: string;
207
+ isOffSpec?: boolean;
208
+ isPassive?: boolean;
209
+ } | undefined, [number, number]> {
210
+ protected constructor(slot: number, bank: number);
211
+ protected read(props: [number, number]): {
212
+ itemType: number;
213
+ spellID?: number;
214
+ name?: string;
215
+ isOffSpec?: boolean;
216
+ isPassive?: boolean;
217
+ } | undefined;
218
+ }
219
+ /** Opaque object returned by native duration calls. */
220
+ export interface NativeDurationHandle {
221
+ readonly __wuiraNativeDuration: unique symbol;
222
+ }
223
+ export interface SpellTabInfo {
224
+ readonly name: string | undefined;
225
+ readonly texture: number | undefined;
226
+ readonly offset: number | undefined;
227
+ readonly numSlots: number | undefined;
228
+ }
229
+ export interface SpellPowerCost {
230
+ readonly type: number;
231
+ readonly cost?: number;
232
+ }
233
+ export interface SpellBookSkillLine {
234
+ readonly itemIndexOffset: number;
235
+ readonly numSpellBookItems: number;
236
+ }
237
+ export interface CastInfo {
238
+ readonly name: string | undefined;
239
+ readonly text: string | undefined;
240
+ readonly texture: number | undefined;
241
+ readonly startTimeMS: number | undefined;
242
+ readonly endTimeMS: number | undefined;
243
+ readonly isTradeSkill: boolean | undefined;
244
+ readonly castID: string | undefined;
245
+ readonly notInterruptible: boolean | undefined;
246
+ readonly spellId: number | undefined;
247
+ }
248
+ export interface ChannelInfo {
249
+ readonly name: string | undefined;
250
+ readonly text: string | undefined;
251
+ readonly texture: number | undefined;
252
+ readonly startTimeMS: number | undefined;
253
+ readonly endTimeMS: number | undefined;
254
+ readonly isTradeSkill: boolean | undefined;
255
+ readonly notInterruptible: boolean | undefined;
256
+ readonly spellId: number | undefined;
257
+ }
258
+ /** `UnitHealthPercent(unit, predicted, curve)`. */
259
+ export declare class UnitHealthPercent extends Source<number, [string, boolean, unknown]> {
260
+ protected constructor(unit: string, predicted: boolean, curve: unknown);
261
+ protected read(props: [string, boolean, unknown]): number;
262
+ }
263
+ /** `UnitPowerPercent(unit, powerType, predicted, curve)`. */
264
+ export declare class UnitPowerPercent extends Source<number, [string, number, boolean, unknown]> {
265
+ protected constructor(unit: string, powerType: number, predicted: boolean, curve: unknown);
266
+ protected read(props: [string, number, boolean, unknown]): number;
267
+ }
268
+ /** `UnitCastingDuration(unit)`. */
269
+ export declare class UnitCastingDuration extends Source<NativeDurationHandle | undefined, [string]> {
270
+ protected constructor(unit: string);
271
+ protected read(props: [string]): NativeDurationHandle | undefined;
272
+ }
273
+ /** `UnitChannelDuration(unit)`. */
274
+ export declare class UnitChannelDuration extends Source<NativeDurationHandle | undefined, [string]> {
275
+ protected constructor(unit: string);
276
+ protected read(props: [string]): NativeDurationHandle | undefined;
277
+ }
278
+ /** `UnitCastingInfo(unit)`. */
279
+ export declare class UnitCastingInfo extends Source<CastInfo, [string]> {
280
+ protected constructor(unit: string);
281
+ protected HasSecretFields(value: CastInfo): boolean;
282
+ protected read(props: [string]): CastInfo;
283
+ }
284
+ /** `UnitChannelInfo(unit)`. */
285
+ export declare class UnitChannelInfo extends Source<ChannelInfo, [string]> {
286
+ protected constructor(unit: string);
287
+ protected HasSecretFields(value: ChannelInfo): boolean;
288
+ protected read(props: [string]): ChannelInfo;
289
+ }
290
+ /** `GetTotemDuration(slot)`. */
291
+ export declare class GetTotemDuration extends Source<NativeDurationHandle | undefined, [number]> {
292
+ protected constructor(slot: number);
293
+ protected read(props: [number]): NativeDurationHandle | undefined;
294
+ }
295
+ /** `GetNumSpellTabs`. */
296
+ export declare class GetNumSpellTabs extends Source<number, []> {
297
+ protected constructor();
298
+ protected read(): number;
299
+ }
300
+ /** `GetSpellTabInfo(tab)`. */
301
+ export declare class GetSpellTabInfo extends Source<SpellTabInfo, [number]> {
302
+ protected constructor(tab: number);
303
+ protected read(props: [number]): SpellTabInfo;
304
+ }
305
+ /** `C_UnitAuras.GetAuraDuration(unit, spellId)`. */
306
+ export declare class GetAuraDuration extends Source<NativeDurationHandle | undefined, [string, number]> {
307
+ protected constructor(unit: string, spellId: number);
308
+ protected read(props: [string, number]): NativeDurationHandle | undefined;
309
+ }
310
+ /** `C_Spell.GetSpellPowerCost(spellId)`. */
311
+ export declare class GetSpellPowerCost extends Source<SpellPowerCost[] | undefined, [number]> {
312
+ protected constructor(spellId: number);
313
+ protected read(props: [number]): SpellPowerCost[] | undefined;
314
+ }
315
+ /** `C_SpellBook.GetSpellBookSkillLineInfo(line)`. */
316
+ export declare class GetSpellBookSkillLineInfo extends Source<SpellBookSkillLine | undefined, [number]> {
317
+ protected constructor(line: number);
318
+ protected read(props: [number]): SpellBookSkillLine | undefined;
319
+ }