wuira 0.3.3 → 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.
- package/CHANGELOG.md +11 -0
- package/README.md +15 -12
- package/docs/source-converters.md +5 -5
- package/docs/spells.md +1 -1
- package/lib/datasources/NativeApi.d.ts +319 -0
- package/lib/datasources/NativeApi.lua +1114 -0
- package/lib/datasources/UseSource.d.ts +41 -43
- package/lib/datasources/index.d.ts +3 -25
- package/lib/datasources/index.lua +45 -74
- package/lib/helpers/Auras.d.ts +5 -0
- package/lib/helpers/Auras.lua +47 -0
- package/lib/helpers/Range.d.ts +2 -0
- package/lib/helpers/Range.lua +30 -0
- package/lib/helpers/index.d.ts +2 -0
- package/lib/helpers/index.lua +12 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.lua +6 -0
- package/lib/platform/forever.d.ts +3 -0
- package/lib/rendering/progress.lua +5 -150
- package/lib/ui/UnitPortrait.d.ts +1 -2
- package/lib/ui/UnitPortrait.lua +11 -18
- package/package.json +8 -1
- package/lib/datasources/AuraTimer.d.ts +0 -21
- package/lib/datasources/AuraTimer.lua +0 -334
- package/lib/datasources/Auras.d.ts +0 -32
- package/lib/datasources/Auras.lua +0 -300
- package/lib/datasources/CastTimer.d.ts +0 -9
- package/lib/datasources/CastTimer.lua +0 -255
- package/lib/datasources/EditModeLayouts.d.ts +0 -33
- package/lib/datasources/EditModeLayouts.lua +0 -698
- package/lib/datasources/GroupMembers.d.ts +0 -24
- package/lib/datasources/GroupMembers.lua +0 -477
- package/lib/datasources/GroupRoster.d.ts +0 -28
- package/lib/datasources/GroupRoster.lua +0 -622
- package/lib/datasources/KnownSpells.d.ts +0 -33
- package/lib/datasources/KnownSpells.lua +0 -1077
- package/lib/datasources/ManaRegenTimer.d.ts +0 -29
- package/lib/datasources/ManaRegenTimer.lua +0 -683
- package/lib/datasources/Resources.d.ts +0 -81
- package/lib/datasources/Resources.lua +0 -907
- package/lib/datasources/SpellCooldown.d.ts +0 -12
- package/lib/datasources/SpellCooldown.lua +0 -240
- package/lib/datasources/SpellSource.d.ts +0 -14
- package/lib/datasources/SpellSource.lua +0 -236
- package/lib/datasources/SwingTimer.d.ts +0 -31
- package/lib/datasources/SwingTimer.lua +0 -650
- package/lib/datasources/TotemTimer.d.ts +0 -10
- package/lib/datasources/TotemTimer.lua +0 -275
- package/lib/datasources/UnitInfo.d.ts +0 -51
- package/lib/datasources/UnitInfo.lua +0 -801
- package/lib/datasources/UnitSource.d.ts +0 -38
- package/lib/datasources/UnitSource.lua +0 -613
|
@@ -1,51 +1,49 @@
|
|
|
1
|
-
import type { UnitInput, UnitSource } from "./UnitSource";
|
|
2
|
-
import type { Absorb, HP, Mana, Prediction } from "./Resources";
|
|
3
|
-
import type { ClassSource, SpecSource } from "./UnitInfo";
|
|
4
|
-
import type { GroupScope, GroupMembers, PartyMembers, RaidMembers } from "./GroupMembers";
|
|
5
|
-
import type { GroupRoster } from "./GroupRoster";
|
|
6
|
-
import type { Buffs, Debuffs } from "./Auras";
|
|
7
|
-
import type { KnownSpells } from "./KnownSpells";
|
|
8
|
-
import type { SpellSource } from "./SpellSource";
|
|
9
|
-
import type { TotemTimer } from "./TotemTimer";
|
|
10
1
|
import type { NativeDuration, TimerSource } from "./TimerSource";
|
|
11
|
-
import type { SpellCooldown, GlobalCooldown } from "./SpellCooldown";
|
|
12
|
-
import type { ManaRegenTimer } from "./ManaRegenTimer";
|
|
13
|
-
import type { CastTimer } from "./CastTimer";
|
|
14
2
|
import type { TextureSource } from "./TextureSource";
|
|
15
|
-
import type { SwingHand, SwingTimer } from "./SwingTimer";
|
|
16
|
-
import type { AuraTimer, AuraTimerOptions } from "./AuraTimer";
|
|
17
|
-
import type { EditModeLayouts } from "./EditModeLayouts";
|
|
18
3
|
import type { SourceConverter, ValueSource } from "./SourceConverter";
|
|
19
4
|
import type { NativeNumberSource } from "./NativeNumberSource";
|
|
20
|
-
|
|
21
|
-
export declare function UseSource(source: typeof
|
|
22
|
-
export declare function UseSource(source: typeof
|
|
23
|
-
export declare function UseSource(source: typeof
|
|
24
|
-
export declare function UseSource(source: typeof
|
|
25
|
-
export declare function UseSource(source: typeof
|
|
26
|
-
export declare function UseSource(source: typeof
|
|
27
|
-
export declare function UseSource(source: typeof
|
|
28
|
-
export declare function UseSource(source: typeof
|
|
29
|
-
export declare function UseSource(source: typeof
|
|
30
|
-
export declare function UseSource(source: typeof
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export declare function UseSource(source: typeof
|
|
35
|
-
export declare function UseSource(source: typeof
|
|
36
|
-
export declare function UseSource(source: typeof
|
|
37
|
-
export declare function UseSource(source: typeof
|
|
38
|
-
export declare function UseSource(source: typeof
|
|
5
|
+
import type { GetAuraDataByIndex, GetAuraDataBySpellName, GetAuraDuration, GetLayouts, GetNumGroupMembers, GetNumSpellBookSkillLines, GetNumSpecializationsForClassID, GetNumSpellTabs, GetNumTotemSlots, GetRaidRosterInfo, GetSpecializationInfo, GetSpellBookItemInfo, GetSpellBookSkillLineInfo, GetSpellCooldownDuration, GetSpellName, GetSpellPowerCost, GetSpellTabInfo, GetSpellTexture, GetTotemDuration, GetTotemInfo, IsInRaid, IsSpellPassive, UnitCastingDuration, UnitCastingInfo, UnitChannelDuration, UnitChannelInfo, UnitClass, UnitExists, UnitFullName, UnitGUID, UnitGetIncomingHeals, UnitGetTotalAbsorbs, UnitHealth, UnitHealthMax, UnitHealthPercent, UnitIsPlayer, UnitIsUnit, UnitPower, UnitPowerMax, UnitPowerPercent } from "./NativeApi";
|
|
6
|
+
export declare function UseSource(source: typeof GetNumGroupMembers): GetNumGroupMembers;
|
|
7
|
+
export declare function UseSource(source: typeof IsInRaid): IsInRaid;
|
|
8
|
+
export declare function UseSource(source: typeof UnitGUID, unit: string): UnitGUID;
|
|
9
|
+
export declare function UseSource(source: typeof UnitFullName, unit: string): UnitFullName;
|
|
10
|
+
export declare function UseSource(source: typeof UnitExists, unit: string): UnitExists;
|
|
11
|
+
export declare function UseSource(source: typeof GetRaidRosterInfo, index: number): GetRaidRosterInfo;
|
|
12
|
+
export declare function UseSource(source: typeof GetAuraDataByIndex, unit: string, index: number, filter: string): GetAuraDataByIndex;
|
|
13
|
+
export declare function UseSource(source: typeof GetAuraDataBySpellName, unit: string, name: string, filter: string): GetAuraDataBySpellName;
|
|
14
|
+
export declare function UseSource(source: typeof UnitHealth, unit: string): UnitHealth;
|
|
15
|
+
export declare function UseSource(source: typeof UnitHealthMax, unit: string): UnitHealthMax;
|
|
16
|
+
export declare function UseSource(source: typeof UnitPower, unit: string, powerType: number): UnitPower;
|
|
17
|
+
export declare function UseSource(source: typeof UnitPowerMax, unit: string, powerType: number): UnitPowerMax;
|
|
18
|
+
export declare function UseSource(source: typeof UnitGetTotalAbsorbs, unit: string): UnitGetTotalAbsorbs;
|
|
19
|
+
export declare function UseSource(source: typeof UnitGetIncomingHeals, unit: string): UnitGetIncomingHeals;
|
|
20
|
+
export declare function UseSource(source: typeof UnitClass, unit: string): UnitClass;
|
|
21
|
+
export declare function UseSource(source: typeof UnitIsPlayer, unit: string): UnitIsPlayer;
|
|
22
|
+
export declare function UseSource(source: typeof UnitIsUnit, first: string, second: string): UnitIsUnit;
|
|
23
|
+
export declare function UseSource(source: typeof GetSpellName, spellId: number | string): GetSpellName;
|
|
24
|
+
export declare function UseSource(source: typeof GetSpellTexture, spellId: number | string): GetSpellTexture;
|
|
25
|
+
export declare function UseSource(source: typeof GetSpellCooldownDuration, spellId: number | string, ignoreGCD?: boolean): GetSpellCooldownDuration;
|
|
26
|
+
export declare function UseSource(source: typeof IsSpellPassive, spellId: number | string): IsSpellPassive;
|
|
27
|
+
export declare function UseSource(source: typeof GetTotemInfo, slot: number): GetTotemInfo;
|
|
28
|
+
export declare function UseSource(source: typeof GetNumTotemSlots): GetNumTotemSlots;
|
|
29
|
+
export declare function UseSource(source: typeof GetLayouts): GetLayouts;
|
|
30
|
+
export declare function UseSource(source: typeof GetNumSpecializationsForClassID, classId: number): GetNumSpecializationsForClassID;
|
|
31
|
+
export declare function UseSource(source: typeof GetSpecializationInfo, index: number, inspect?: boolean, pet?: boolean, unit?: string, sex?: number, group?: number, classId?: number): GetSpecializationInfo;
|
|
32
|
+
export declare function UseSource(source: typeof GetNumSpellBookSkillLines): GetNumSpellBookSkillLines;
|
|
33
|
+
export declare function UseSource(source: typeof GetSpellBookItemInfo, slot: number, bank: number): GetSpellBookItemInfo;
|
|
34
|
+
export declare function UseSource(source: typeof UnitHealthPercent, unit: string, predicted: boolean, curve: unknown): UnitHealthPercent;
|
|
35
|
+
export declare function UseSource(source: typeof UnitPowerPercent, unit: string, powerType: number, predicted: boolean, curve: unknown): UnitPowerPercent;
|
|
36
|
+
export declare function UseSource(source: typeof UnitCastingDuration, unit: string): UnitCastingDuration;
|
|
37
|
+
export declare function UseSource(source: typeof UnitChannelDuration, unit: string): UnitChannelDuration;
|
|
38
|
+
export declare function UseSource(source: typeof UnitCastingInfo, unit: string): UnitCastingInfo;
|
|
39
|
+
export declare function UseSource(source: typeof UnitChannelInfo, unit: string): UnitChannelInfo;
|
|
40
|
+
export declare function UseSource(source: typeof GetTotemDuration, slot: number): GetTotemDuration;
|
|
41
|
+
export declare function UseSource(source: typeof GetNumSpellTabs): GetNumSpellTabs;
|
|
42
|
+
export declare function UseSource(source: typeof GetSpellTabInfo, tab: number): GetSpellTabInfo;
|
|
43
|
+
export declare function UseSource(source: typeof GetAuraDuration, unit: string, spellId: number): GetAuraDuration;
|
|
44
|
+
export declare function UseSource(source: typeof GetSpellPowerCost, spellId: number): GetSpellPowerCost;
|
|
45
|
+
export declare function UseSource(source: typeof GetSpellBookSkillLineInfo, line: number): GetSpellBookSkillLineInfo;
|
|
39
46
|
export declare function UseSource(source: typeof TimerSource, read: () => NativeDuration | undefined, events: readonly string[], unit?: string): TimerSource;
|
|
40
|
-
export declare function UseSource(source: typeof SpellCooldown, spellId: number | string, options?: {
|
|
41
|
-
ignoreGCD?: boolean;
|
|
42
|
-
}): SpellCooldown;
|
|
43
|
-
export declare function UseSource(source: typeof GlobalCooldown): GlobalCooldown;
|
|
44
|
-
export declare function UseSource(source: typeof ManaRegenTimer, observe: (listener: (event: string, payload: unknown[], value: number) => void) => () => void): ManaRegenTimer;
|
|
45
|
-
export declare function UseSource(source: typeof CastTimer, unit?: UnitInput): CastTimer;
|
|
46
47
|
export declare function UseSource(source: typeof TextureSource, read: () => string | number | undefined, events: readonly string[], unit?: string): TextureSource;
|
|
47
|
-
export declare function UseSource(source: typeof SwingTimer, hand?: SwingHand): SwingTimer;
|
|
48
|
-
export declare function UseSource(source: typeof AuraTimer, unit: UnitInput, options: AuraTimerOptions): AuraTimer;
|
|
49
|
-
export declare function UseSource(source: typeof EditModeLayouts): EditModeLayouts;
|
|
50
48
|
export declare function UseSource<TInput, TOutput>(source: typeof SourceConverter, input: ValueSource<TInput>, convert: (value: TInput) => TOutput): SourceConverter<TInput, TOutput>;
|
|
51
49
|
export declare function UseSource(source: typeof NativeNumberSource, read: () => number): NativeNumberSource;
|
|
@@ -3,34 +3,12 @@ export { DataSource } from "./DataSource";
|
|
|
3
3
|
export type { ReadResult } from "./DataSource";
|
|
4
4
|
export { SourceConverter } from "./SourceConverter";
|
|
5
5
|
export type { ValueSource } from "./SourceConverter";
|
|
6
|
-
export { EditModeLayouts } from "./EditModeLayouts";
|
|
7
|
-
export type { EditModeLayout, EditModeLayoutSnapshot, EditModeLayoutsStatus } from "./EditModeLayouts";
|
|
8
6
|
export { ProgressSource } from "./ProgressSource";
|
|
9
|
-
export { HP, Mana, Unit, DataSources, Absorb, Prediction } from "./Resources";
|
|
10
7
|
export { Source } from "./Source";
|
|
11
8
|
export { UseSource } from "./UseSource";
|
|
12
|
-
export { Aura, AuraSource, Buffs, Debuffs } from "./Auras";
|
|
13
|
-
export type { AuraSourceStatus } from "./Auras";
|
|
14
|
-
export { GroupMembers, PartyMembers, RaidMembers } from "./GroupMembers";
|
|
15
|
-
export type { GroupScope } from "./GroupMembers";
|
|
16
|
-
export { GroupRoster, getPetUnitToken } from "./GroupRoster";
|
|
17
|
-
export type { GroupRosterMember } from "./GroupRoster";
|
|
18
|
-
export { ClassSource, SpecSource, Specializations } from "./UnitInfo";
|
|
19
|
-
export type { ClassInfo, SpecializationInfo, InspectStatus } from "./UnitInfo";
|
|
20
|
-
export { UnitSource, resolveUnit } from "./UnitSource";
|
|
21
|
-
export type { UnitInput, UnitIdentity } from "./UnitSource";
|
|
22
|
-
export { SwingTimer, SwingHand } from "./SwingTimer";
|
|
23
9
|
export { TimerSource } from "./TimerSource";
|
|
24
|
-
export { TotemTimer } from "./TotemTimer";
|
|
25
|
-
export type { TotemTimerStatus } from "./TotemTimer";
|
|
26
10
|
export type { NativeDuration } from "./TimerSource";
|
|
27
11
|
export { TextureSource } from "./TextureSource";
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export type {
|
|
31
|
-
export { SpellCooldown, GlobalCooldown } from "./SpellCooldown";
|
|
32
|
-
export { SpellSource } from "./SpellSource";
|
|
33
|
-
export { KnownSpells } from "./KnownSpells";
|
|
34
|
-
export type { KnownSpellsStatus, KnownSpell } from "./KnownSpells";
|
|
35
|
-
export { ManaRegenTimer } from "./ManaRegenTimer";
|
|
36
|
-
export type { ManaRegenPhase } from "./ManaRegenTimer";
|
|
12
|
+
export { NativeNumberSource } from "./NativeNumberSource";
|
|
13
|
+
export { GetAuraDataByIndex, GetAuraDataBySpellName, GetAuraDuration, GetLayouts, GetNumGroupMembers, GetNumSpellBookSkillLines, GetNumSpecializationsForClassID, GetNumSpellTabs, GetNumTotemSlots, GetRaidRosterInfo, GetSpecializationInfo, GetSpellBookItemInfo, GetSpellBookSkillLineInfo, GetSpellCooldownDuration, GetSpellName, GetSpellPowerCost, GetSpellTabInfo, GetSpellTexture, GetTotemDuration, GetTotemInfo, IsInRaid, IsSpellPassive, UnitCastingDuration, UnitCastingInfo, UnitChannelDuration, UnitChannelInfo, UnitClass, UnitExists, UnitFullName, UnitGUID, UnitGetIncomingHeals, UnitGetTotalAbsorbs, UnitHealth, UnitHealthMax, UnitHealthPercent, UnitIsPlayer, UnitIsUnit, UnitPower, UnitPowerMax, UnitPowerPercent, } from "./NativeApi";
|
|
14
|
+
export type { AuraData, CastInfo, ChannelInfo, EditModeLayoutList, EditModeLayoutRow, NativeDurationHandle, RaidRosterInfo, SpecializationRow, SpellBookSkillLine, SpellCooldownDuration, SpellPowerCost, SpellTabInfo, TotemInfo, UnitClassInfo, UnitName } from "./NativeApi";
|
|
@@ -8,23 +8,10 @@ do
|
|
|
8
8
|
local ____SourceConverter = require("datasources.SourceConverter")
|
|
9
9
|
____exports.SourceConverter = ____SourceConverter.SourceConverter
|
|
10
10
|
end
|
|
11
|
-
do
|
|
12
|
-
local ____EditModeLayouts = require("datasources.EditModeLayouts")
|
|
13
|
-
____exports.EditModeLayouts = ____EditModeLayouts.EditModeLayouts
|
|
14
|
-
end
|
|
15
11
|
do
|
|
16
12
|
local ____ProgressSource = require("datasources.ProgressSource")
|
|
17
13
|
____exports.ProgressSource = ____ProgressSource.ProgressSource
|
|
18
14
|
end
|
|
19
|
-
do
|
|
20
|
-
local ____Resources = require("datasources.Resources")
|
|
21
|
-
____exports.HP = ____Resources.HP
|
|
22
|
-
____exports.Mana = ____Resources.Mana
|
|
23
|
-
____exports.Unit = ____Resources.Unit
|
|
24
|
-
____exports.DataSources = ____Resources.DataSources
|
|
25
|
-
____exports.Absorb = ____Resources.Absorb
|
|
26
|
-
____exports.Prediction = ____Resources.Prediction
|
|
27
|
-
end
|
|
28
15
|
do
|
|
29
16
|
local ____Source = require("datasources.Source")
|
|
30
17
|
____exports.Source = ____Source.Source
|
|
@@ -33,75 +20,59 @@ do
|
|
|
33
20
|
local ____UseSource = require("datasources.UseSource")
|
|
34
21
|
____exports.UseSource = ____UseSource.UseSource
|
|
35
22
|
end
|
|
36
|
-
do
|
|
37
|
-
local ____Auras = require("datasources.Auras")
|
|
38
|
-
____exports.Aura = ____Auras.Aura
|
|
39
|
-
____exports.AuraSource = ____Auras.AuraSource
|
|
40
|
-
____exports.Buffs = ____Auras.Buffs
|
|
41
|
-
____exports.Debuffs = ____Auras.Debuffs
|
|
42
|
-
end
|
|
43
|
-
do
|
|
44
|
-
local ____GroupMembers = require("datasources.GroupMembers")
|
|
45
|
-
____exports.GroupMembers = ____GroupMembers.GroupMembers
|
|
46
|
-
____exports.PartyMembers = ____GroupMembers.PartyMembers
|
|
47
|
-
____exports.RaidMembers = ____GroupMembers.RaidMembers
|
|
48
|
-
end
|
|
49
|
-
do
|
|
50
|
-
local ____GroupRoster = require("datasources.GroupRoster")
|
|
51
|
-
____exports.GroupRoster = ____GroupRoster.GroupRoster
|
|
52
|
-
____exports.getPetUnitToken = ____GroupRoster.getPetUnitToken
|
|
53
|
-
end
|
|
54
|
-
do
|
|
55
|
-
local ____UnitInfo = require("datasources.UnitInfo")
|
|
56
|
-
____exports.ClassSource = ____UnitInfo.ClassSource
|
|
57
|
-
____exports.SpecSource = ____UnitInfo.SpecSource
|
|
58
|
-
____exports.Specializations = ____UnitInfo.Specializations
|
|
59
|
-
end
|
|
60
|
-
do
|
|
61
|
-
local ____UnitSource = require("datasources.UnitSource")
|
|
62
|
-
____exports.UnitSource = ____UnitSource.UnitSource
|
|
63
|
-
____exports.resolveUnit = ____UnitSource.resolveUnit
|
|
64
|
-
end
|
|
65
|
-
do
|
|
66
|
-
local ____SwingTimer = require("datasources.SwingTimer")
|
|
67
|
-
____exports.SwingTimer = ____SwingTimer.SwingTimer
|
|
68
|
-
____exports.SwingHand = ____SwingTimer.SwingHand
|
|
69
|
-
end
|
|
70
23
|
do
|
|
71
24
|
local ____TimerSource = require("datasources.TimerSource")
|
|
72
25
|
____exports.TimerSource = ____TimerSource.TimerSource
|
|
73
26
|
end
|
|
74
|
-
do
|
|
75
|
-
local ____TotemTimer = require("datasources.TotemTimer")
|
|
76
|
-
____exports.TotemTimer = ____TotemTimer.TotemTimer
|
|
77
|
-
end
|
|
78
27
|
do
|
|
79
28
|
local ____TextureSource = require("datasources.TextureSource")
|
|
80
29
|
____exports.TextureSource = ____TextureSource.TextureSource
|
|
81
30
|
end
|
|
82
31
|
do
|
|
83
|
-
local
|
|
84
|
-
____exports.
|
|
85
|
-
end
|
|
86
|
-
do
|
|
87
|
-
local
|
|
88
|
-
____exports.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
____exports.
|
|
93
|
-
____exports.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
____exports.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
____exports.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
____exports.
|
|
32
|
+
local ____NativeNumberSource = require("datasources.NativeNumberSource")
|
|
33
|
+
____exports.NativeNumberSource = ____NativeNumberSource.NativeNumberSource
|
|
34
|
+
end
|
|
35
|
+
do
|
|
36
|
+
local ____NativeApi = require("datasources.NativeApi")
|
|
37
|
+
____exports.GetAuraDataByIndex = ____NativeApi.GetAuraDataByIndex
|
|
38
|
+
____exports.GetAuraDataBySpellName = ____NativeApi.GetAuraDataBySpellName
|
|
39
|
+
____exports.GetAuraDuration = ____NativeApi.GetAuraDuration
|
|
40
|
+
____exports.GetLayouts = ____NativeApi.GetLayouts
|
|
41
|
+
____exports.GetNumGroupMembers = ____NativeApi.GetNumGroupMembers
|
|
42
|
+
____exports.GetNumSpellBookSkillLines = ____NativeApi.GetNumSpellBookSkillLines
|
|
43
|
+
____exports.GetNumSpecializationsForClassID = ____NativeApi.GetNumSpecializationsForClassID
|
|
44
|
+
____exports.GetNumSpellTabs = ____NativeApi.GetNumSpellTabs
|
|
45
|
+
____exports.GetNumTotemSlots = ____NativeApi.GetNumTotemSlots
|
|
46
|
+
____exports.GetRaidRosterInfo = ____NativeApi.GetRaidRosterInfo
|
|
47
|
+
____exports.GetSpecializationInfo = ____NativeApi.GetSpecializationInfo
|
|
48
|
+
____exports.GetSpellBookItemInfo = ____NativeApi.GetSpellBookItemInfo
|
|
49
|
+
____exports.GetSpellBookSkillLineInfo = ____NativeApi.GetSpellBookSkillLineInfo
|
|
50
|
+
____exports.GetSpellCooldownDuration = ____NativeApi.GetSpellCooldownDuration
|
|
51
|
+
____exports.GetSpellName = ____NativeApi.GetSpellName
|
|
52
|
+
____exports.GetSpellPowerCost = ____NativeApi.GetSpellPowerCost
|
|
53
|
+
____exports.GetSpellTabInfo = ____NativeApi.GetSpellTabInfo
|
|
54
|
+
____exports.GetSpellTexture = ____NativeApi.GetSpellTexture
|
|
55
|
+
____exports.GetTotemDuration = ____NativeApi.GetTotemDuration
|
|
56
|
+
____exports.GetTotemInfo = ____NativeApi.GetTotemInfo
|
|
57
|
+
____exports.IsInRaid = ____NativeApi.IsInRaid
|
|
58
|
+
____exports.IsSpellPassive = ____NativeApi.IsSpellPassive
|
|
59
|
+
____exports.UnitCastingDuration = ____NativeApi.UnitCastingDuration
|
|
60
|
+
____exports.UnitCastingInfo = ____NativeApi.UnitCastingInfo
|
|
61
|
+
____exports.UnitChannelDuration = ____NativeApi.UnitChannelDuration
|
|
62
|
+
____exports.UnitChannelInfo = ____NativeApi.UnitChannelInfo
|
|
63
|
+
____exports.UnitClass = ____NativeApi.UnitClass
|
|
64
|
+
____exports.UnitExists = ____NativeApi.UnitExists
|
|
65
|
+
____exports.UnitFullName = ____NativeApi.UnitFullName
|
|
66
|
+
____exports.UnitGUID = ____NativeApi.UnitGUID
|
|
67
|
+
____exports.UnitGetIncomingHeals = ____NativeApi.UnitGetIncomingHeals
|
|
68
|
+
____exports.UnitGetTotalAbsorbs = ____NativeApi.UnitGetTotalAbsorbs
|
|
69
|
+
____exports.UnitHealth = ____NativeApi.UnitHealth
|
|
70
|
+
____exports.UnitHealthMax = ____NativeApi.UnitHealthMax
|
|
71
|
+
____exports.UnitHealthPercent = ____NativeApi.UnitHealthPercent
|
|
72
|
+
____exports.UnitIsPlayer = ____NativeApi.UnitIsPlayer
|
|
73
|
+
____exports.UnitIsUnit = ____NativeApi.UnitIsUnit
|
|
74
|
+
____exports.UnitPower = ____NativeApi.UnitPower
|
|
75
|
+
____exports.UnitPowerMax = ____NativeApi.UnitPowerMax
|
|
76
|
+
____exports.UnitPowerPercent = ____NativeApi.UnitPowerPercent
|
|
106
77
|
end
|
|
107
78
|
return ____exports
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AuraData } from "../datasources/NativeApi";
|
|
2
|
+
/** Walks `GetAuraDataByIndex` until the API returns no row. This client does not return the list itself. */
|
|
3
|
+
export declare function ReadAuras(unit: string, filter: string): AuraData[];
|
|
4
|
+
/** True when the current list contains the spell id or the aura name. */
|
|
5
|
+
export declare function FilterAura(auras: readonly AuraData[], spell: string | number): boolean;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
--- Walks `GetAuraDataByIndex` until the API returns no row. This client does not return the list itself.
|
|
4
|
+
function ____exports.ReadAuras(self, unit, filter)
|
|
5
|
+
local read = C_UnitAuras and C_UnitAuras.GetAuraDataByIndex
|
|
6
|
+
if read == nil then
|
|
7
|
+
error("ReadAuras: this client does not expose C_UnitAuras.GetAuraDataByIndex")
|
|
8
|
+
end
|
|
9
|
+
local result = {}
|
|
10
|
+
do
|
|
11
|
+
local index = 1
|
|
12
|
+
while index <= 1024 do
|
|
13
|
+
local aura = read(unit, index, filter)
|
|
14
|
+
if issecretvalue(aura) or aura ~= nil and (issecretvalue(aura.spellId) or issecretvalue(aura.name) or issecretvalue(aura.icon)) then
|
|
15
|
+
error("ReadAuras: secret data cannot be read")
|
|
16
|
+
end
|
|
17
|
+
if aura == nil then
|
|
18
|
+
return result
|
|
19
|
+
end
|
|
20
|
+
result[#result + 1] = aura
|
|
21
|
+
index = index + 1
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
error("ReadAuras: aura enumeration exceeded its safety limit")
|
|
25
|
+
end
|
|
26
|
+
--- True when the current list contains the spell id or the aura name.
|
|
27
|
+
function ____exports.FilterAura(self, auras, spell)
|
|
28
|
+
if issecretvalue(spell) or type(spell) ~= "string" and type(spell) ~= "number" then
|
|
29
|
+
error("FilterAura expects a public spell id or name")
|
|
30
|
+
end
|
|
31
|
+
for ____, aura in ipairs(auras) do
|
|
32
|
+
if issecretvalue(aura) or issecretvalue(aura.spellId) or issecretvalue(aura.name) then
|
|
33
|
+
error("FilterAura: secret data cannot be read")
|
|
34
|
+
end
|
|
35
|
+
local ____temp_2
|
|
36
|
+
if type(spell) == "number" then
|
|
37
|
+
____temp_2 = aura.spellId == spell
|
|
38
|
+
else
|
|
39
|
+
____temp_2 = aura.name == spell
|
|
40
|
+
end
|
|
41
|
+
if ____temp_2 then
|
|
42
|
+
return true
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
return false
|
|
46
|
+
end
|
|
47
|
+
return ____exports
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
-- Lua Library inline imports
|
|
3
|
+
local function __TS__NumberIsFinite(value)
|
|
4
|
+
return type(value) == "number" and value == value and value ~= math.huge and value ~= -math.huge
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
local function __TS__NumberIsInteger(value)
|
|
8
|
+
return __TS__NumberIsFinite(value) and math.floor(value) == value
|
|
9
|
+
end
|
|
10
|
+
-- End of Lua Library inline imports
|
|
11
|
+
local ____exports = {}
|
|
12
|
+
--- Inclusive integer span. `Range(1, 5)` is `[1, 2, 3, 4, 5]`. An inverted span is empty.
|
|
13
|
+
function ____exports.Range(self, from, to)
|
|
14
|
+
if issecretvalue(from) or issecretvalue(to) or type(from) ~= "number" or type(to) ~= "number" or not __TS__NumberIsInteger(from) or not __TS__NumberIsInteger(to) then
|
|
15
|
+
error("Range expects public integers")
|
|
16
|
+
end
|
|
17
|
+
local values = {}
|
|
18
|
+
if to < from then
|
|
19
|
+
return values
|
|
20
|
+
end
|
|
21
|
+
do
|
|
22
|
+
local value = from
|
|
23
|
+
while value <= to do
|
|
24
|
+
values[#values + 1] = value
|
|
25
|
+
value = value + 1
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
return values
|
|
29
|
+
end
|
|
30
|
+
return ____exports
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
do
|
|
4
|
+
local ____Range = require("helpers.Range")
|
|
5
|
+
____exports.Range = ____Range.Range
|
|
6
|
+
end
|
|
7
|
+
do
|
|
8
|
+
local ____Auras = require("helpers.Auras")
|
|
9
|
+
____exports.FilterAura = ____Auras.FilterAura
|
|
10
|
+
____exports.ReadAuras = ____Auras.ReadAuras
|
|
11
|
+
end
|
|
12
|
+
return ____exports
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference path="./platform/forever.d.ts" />
|
|
2
2
|
import "./console-polyfill";
|
|
3
|
+
export { FilterAura, Range, ReadAuras } from "./helpers";
|
|
3
4
|
export { Wuira, wuira } from "./wuira";
|
|
4
5
|
export { WuiraApp } from "./WuiraApp";
|
|
5
6
|
export type { CommandCallback } from "./platform/SlashCommands";
|
package/lib/index.lua
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
3
|
require("console-polyfill")
|
|
4
|
+
do
|
|
5
|
+
local ____helpers = require("helpers.index")
|
|
6
|
+
____exports.FilterAura = ____helpers.FilterAura
|
|
7
|
+
____exports.Range = ____helpers.Range
|
|
8
|
+
____exports.ReadAuras = ____helpers.ReadAuras
|
|
9
|
+
end
|
|
4
10
|
do
|
|
5
11
|
local ____wuira = require("wuira")
|
|
6
12
|
____exports.Wuira = ____wuira.Wuira
|
|
@@ -144,6 +144,9 @@ interface wuiraNativeAuraData {
|
|
|
144
144
|
expirationTime?: number;
|
|
145
145
|
}
|
|
146
146
|
declare const C_UnitAuras: {
|
|
147
|
+
GetAuraDataByIndex?: (this: void, unit: string, index: number, filter: string) => {
|
|
148
|
+
spellId: number; name: string; icon: number; sourceUnit?: string;
|
|
149
|
+
} | undefined;
|
|
147
150
|
GetAuraDataBySpellName?: (this: void, unit: string, name: string, filter: string) => wuiraNativeAuraData | undefined;
|
|
148
151
|
GetAuraDuration?: (this: void, unit: string, id: number) => import("../datasources/TimerSource").NativeDuration | undefined;
|
|
149
152
|
} | undefined;
|
|
@@ -1,58 +1,5 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
-
-- Lua Library inline imports
|
|
3
|
-
local __TS__Symbol, Symbol
|
|
4
|
-
do
|
|
5
|
-
local symbolMetatable = {__tostring = function(self)
|
|
6
|
-
return ("Symbol(" .. (self.description or "")) .. ")"
|
|
7
|
-
end}
|
|
8
|
-
function __TS__Symbol(description)
|
|
9
|
-
return setmetatable({description = description}, symbolMetatable)
|
|
10
|
-
end
|
|
11
|
-
Symbol = {
|
|
12
|
-
asyncDispose = __TS__Symbol("Symbol.asyncDispose"),
|
|
13
|
-
dispose = __TS__Symbol("Symbol.dispose"),
|
|
14
|
-
iterator = __TS__Symbol("Symbol.iterator"),
|
|
15
|
-
hasInstance = __TS__Symbol("Symbol.hasInstance"),
|
|
16
|
-
species = __TS__Symbol("Symbol.species"),
|
|
17
|
-
toStringTag = __TS__Symbol("Symbol.toStringTag")
|
|
18
|
-
}
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
local function __TS__InstanceOf(obj, classTbl)
|
|
22
|
-
if type(classTbl) ~= "table" then
|
|
23
|
-
error("Right-hand side of 'instanceof' is not an object", 0)
|
|
24
|
-
end
|
|
25
|
-
if classTbl[Symbol.hasInstance] ~= nil then
|
|
26
|
-
return not not classTbl[Symbol.hasInstance](classTbl, obj)
|
|
27
|
-
end
|
|
28
|
-
if type(obj) == "table" then
|
|
29
|
-
local luaClass = obj.constructor
|
|
30
|
-
while luaClass ~= nil do
|
|
31
|
-
if luaClass == classTbl then
|
|
32
|
-
return true
|
|
33
|
-
end
|
|
34
|
-
luaClass = luaClass.____super
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
return false
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
local function __TS__ObjectAssign(target, ...)
|
|
41
|
-
local sources = {...}
|
|
42
|
-
for i = 1, #sources do
|
|
43
|
-
local source = sources[i]
|
|
44
|
-
if type(source) == "table" then
|
|
45
|
-
for key in pairs(source) do
|
|
46
|
-
target[key] = source[key]
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
return target
|
|
51
|
-
end
|
|
52
|
-
-- End of Lua Library inline imports
|
|
53
2
|
local ____exports = {}
|
|
54
|
-
local ____Resources = require("datasources.Resources")
|
|
55
|
-
local HP = ____Resources.HP
|
|
56
3
|
local ____statusBarTextures = require("ui.decorations.statusBarTextures")
|
|
57
4
|
local applyStatusBarTexture = ____statusBarTextures.applyStatusBarTexture
|
|
58
5
|
local resolveStatusBarTexture = ____statusBarTextures.resolveStatusBarTexture
|
|
@@ -97,105 +44,13 @@ function ____exports.renderProgress(self, item, tree, onActiveChange)
|
|
|
97
44
|
____bar_SetReverseFill_19(bar, ____props_reverse_18)
|
|
98
45
|
bar:SetMinMaxValues(props.min or 0, props.max or 100)
|
|
99
46
|
local source = item.cell.source or props.source
|
|
100
|
-
if source ~= nil then
|
|
101
|
-
local
|
|
102
|
-
local absorbPredictionBar
|
|
103
|
-
if __TS__InstanceOf(source, HP) then
|
|
104
|
-
local function overlay(____, style, heal)
|
|
105
|
-
bar:SetClipsChildren(true)
|
|
106
|
-
local layer = CreateFrame("StatusBar", nil, bar)
|
|
107
|
-
local ____tree_frames_20 = tree.frames
|
|
108
|
-
____tree_frames_20[#____tree_frames_20 + 1] = layer
|
|
109
|
-
layer:EnableMouse(false)
|
|
110
|
-
layer:SetFrameLevel(bar:GetFrameLevel())
|
|
111
|
-
layer:SetSize(item.width, item.height)
|
|
112
|
-
applyStatusBarTexture(
|
|
113
|
-
nil,
|
|
114
|
-
layer,
|
|
115
|
-
resolveStatusBarTexture(nil, style.texture or "solid")
|
|
116
|
-
)
|
|
117
|
-
local tint = style.color
|
|
118
|
-
layer:SetStatusBarColor(tint.r, tint.g, tint.b, tint.a or 0.5)
|
|
119
|
-
local texture = layer:GetStatusBarTexture()
|
|
120
|
-
texture:SetBlendMode(style.blendMode or "BLEND")
|
|
121
|
-
local ____texture_SetHorizTile_22 = texture.SetHorizTile
|
|
122
|
-
local ____style_tileX_21 = style.tileX
|
|
123
|
-
if ____style_tileX_21 == nil then
|
|
124
|
-
____style_tileX_21 = false
|
|
125
|
-
end
|
|
126
|
-
____texture_SetHorizTile_22(texture, ____style_tileX_21)
|
|
127
|
-
local ____texture_SetVertTile_24 = texture.SetVertTile
|
|
128
|
-
local ____style_tileY_23 = style.tileY
|
|
129
|
-
if ____style_tileY_23 == nil then
|
|
130
|
-
____style_tileY_23 = false
|
|
131
|
-
end
|
|
132
|
-
____texture_SetVertTile_24(texture, ____style_tileY_23)
|
|
133
|
-
local uv = style.texCoords or ({0, 1, 0, 1})
|
|
134
|
-
texture:SetTexCoord(uv[1], uv[2], uv[3], uv[4])
|
|
135
|
-
local vertical = props.orientation == "vertical"
|
|
136
|
-
local ____props_reverse_25 = props.reverse
|
|
137
|
-
if ____props_reverse_25 == nil then
|
|
138
|
-
____props_reverse_25 = false
|
|
139
|
-
end
|
|
140
|
-
local reverse = ____props_reverse_25
|
|
141
|
-
layer:SetOrientation(vertical and "VERTICAL" or "HORIZONTAL")
|
|
142
|
-
local ____layer_SetReverseFill_27 = layer.SetReverseFill
|
|
143
|
-
local ____heal_26
|
|
144
|
-
if heal then
|
|
145
|
-
____heal_26 = reverse
|
|
146
|
-
else
|
|
147
|
-
____heal_26 = not reverse
|
|
148
|
-
end
|
|
149
|
-
____layer_SetReverseFill_27(layer, ____heal_26)
|
|
150
|
-
if heal then
|
|
151
|
-
local point = vertical and (reverse and "TOPLEFT" or "BOTTOMLEFT") or (reverse and "TOPRIGHT" or "TOPLEFT")
|
|
152
|
-
local relative = vertical and (reverse and "BOTTOMLEFT" or "TOPLEFT") or (reverse and "TOPLEFT" or "TOPRIGHT")
|
|
153
|
-
layer:SetPoint(
|
|
154
|
-
point,
|
|
155
|
-
bar:GetStatusBarTexture(),
|
|
156
|
-
relative,
|
|
157
|
-
0,
|
|
158
|
-
0
|
|
159
|
-
)
|
|
160
|
-
else
|
|
161
|
-
layer:SetAllPoints(bar)
|
|
162
|
-
end
|
|
163
|
-
return layer
|
|
164
|
-
end
|
|
165
|
-
local ____opt_28 = source.Prediction
|
|
166
|
-
if (____opt_28 and ____opt_28.IsAvailable) == true and props.healPrediction ~= false then
|
|
167
|
-
local ____props_healPrediction_32 = props.healPrediction
|
|
168
|
-
local ____opt_30 = props.healPrediction
|
|
169
|
-
healPredictionBar = overlay(
|
|
170
|
-
nil,
|
|
171
|
-
__TS__ObjectAssign({}, ____props_healPrediction_32, {color = ____opt_30 and ____opt_30.color or ({r = 0.4, g = 1, b = 0.5, a = 0.5})}),
|
|
172
|
-
true
|
|
173
|
-
)
|
|
174
|
-
end
|
|
175
|
-
local ____opt_33 = source.Absorb
|
|
176
|
-
if (____opt_33 and ____opt_33.IsAvailable) == true and props.absorbPrediction ~= false then
|
|
177
|
-
local ____props_absorbPrediction_37 = props.absorbPrediction
|
|
178
|
-
local ____opt_35 = props.absorbPrediction
|
|
179
|
-
absorbPredictionBar = overlay(
|
|
180
|
-
nil,
|
|
181
|
-
__TS__ObjectAssign({}, ____props_absorbPrediction_37, {color = ____opt_35 and ____opt_35.color or ({r = 0.8, g = 0.9, b = 1, a = 0.55})}),
|
|
182
|
-
false
|
|
183
|
-
)
|
|
184
|
-
end
|
|
185
|
-
end
|
|
186
|
-
local dispose = source:BindTo(bar, {
|
|
187
|
-
min = props.min,
|
|
188
|
-
max = props.max,
|
|
189
|
-
current = props.current or props.value,
|
|
190
|
-
onActiveChange = onActiveChange,
|
|
191
|
-
healPredictionBar = healPredictionBar,
|
|
192
|
-
absorbPredictionBar = absorbPredictionBar
|
|
193
|
-
})
|
|
47
|
+
if source ~= nil and source.BindTo ~= nil then
|
|
48
|
+
local dispose = source:BindTo(bar, {min = props.min, max = props.max, current = props.current or props.value, onActiveChange = onActiveChange})
|
|
194
49
|
if dispose ~= nil then
|
|
195
|
-
local
|
|
196
|
-
|
|
50
|
+
local ____tree_bindings_20 = tree.bindings
|
|
51
|
+
____tree_bindings_20[#____tree_bindings_20 + 1] = dispose
|
|
197
52
|
end
|
|
198
|
-
|
|
53
|
+
elseif source == nil then
|
|
199
54
|
bar:SetValue(props.current or props.value or 0)
|
|
200
55
|
end
|
|
201
56
|
end
|
package/lib/ui/UnitPortrait.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { UnitInput } from "../datasources/UnitSource";
|
|
2
1
|
import type { CellProps } from "./Cell";
|
|
3
|
-
export declare function unitPortrait(props: Partial<CellProps>,
|
|
2
|
+
export declare function unitPortrait(props: Partial<CellProps>, unit: string, crop?: readonly number[], preview?: boolean): import("./primitives/jsx").Element;
|