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.
- package/CHANGELOG.md +27 -0
- package/README.md +27 -9
- package/docs/source-converters.md +6 -6
- package/docs/spells.md +1 -1
- package/lib/datasources/NativeApi.d.ts +319 -0
- package/lib/datasources/NativeApi.lua +1114 -0
- package/lib/datasources/NativeNumberSource.d.ts +1 -1
- package/lib/datasources/NativeNumberSource.lua +16 -1
- package/lib/datasources/ProgressSource.lua +5 -9
- package/lib/datasources/Source.d.ts +18 -0
- package/lib/datasources/Source.lua +300 -0
- package/lib/datasources/SourceConverter.d.ts +1 -1
- package/lib/datasources/SourceConverter.lua +10 -1
- package/lib/datasources/TextureSource.d.ts +1 -1
- package/lib/datasources/TextureSource.lua +16 -1
- package/lib/datasources/TimerSource.d.ts +1 -1
- package/lib/datasources/TimerSource.lua +16 -1
- package/lib/datasources/UseSource.d.ts +49 -0
- package/lib/datasources/UseSource.lua +9 -0
- package/lib/datasources/index.d.ts +5 -25
- package/lib/datasources/index.lua +49 -69
- 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 -322
- package/lib/datasources/Auras.d.ts +0 -32
- package/lib/datasources/Auras.lua +0 -284
- package/lib/datasources/CastTimer.d.ts +0 -9
- package/lib/datasources/CastTimer.lua +0 -240
- package/lib/datasources/EditModeLayouts.d.ts +0 -33
- package/lib/datasources/EditModeLayouts.lua +0 -689
- package/lib/datasources/GroupMembers.d.ts +0 -24
- package/lib/datasources/GroupMembers.lua +0 -454
- package/lib/datasources/GroupRoster.d.ts +0 -28
- package/lib/datasources/GroupRoster.lua +0 -611
- package/lib/datasources/KnownSpells.d.ts +0 -33
- package/lib/datasources/KnownSpells.lua +0 -1068
- package/lib/datasources/ManaRegenTimer.d.ts +0 -29
- package/lib/datasources/ManaRegenTimer.lua +0 -674
- package/lib/datasources/Resources.d.ts +0 -60
- package/lib/datasources/Resources.lua +0 -824
- package/lib/datasources/SpellCooldown.d.ts +0 -12
- package/lib/datasources/SpellCooldown.lua +0 -218
- package/lib/datasources/SpellSource.d.ts +0 -14
- package/lib/datasources/SpellSource.lua +0 -224
- package/lib/datasources/SwingTimer.d.ts +0 -31
- package/lib/datasources/SwingTimer.lua +0 -641
- package/lib/datasources/TotemTimer.d.ts +0 -10
- package/lib/datasources/TotemTimer.lua +0 -260
- package/lib/datasources/UnitInfo.d.ts +0 -51
- package/lib/datasources/UnitInfo.lua +0 -783
- package/lib/datasources/UnitSource.d.ts +0 -38
- package/lib/datasources/UnitSource.lua +0 -602
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ProgressSource } from "./ProgressSource";
|
|
2
|
-
import { UnitSource } from "./UnitSource";
|
|
3
|
-
import type { UnitInput } from "./UnitSource";
|
|
4
|
-
import { DataSource } from "./DataSource";
|
|
5
|
-
import type { ProgressOverrides } from "./ProgressSource";
|
|
6
|
-
import { ManaRegenTimer } from "./ManaRegenTimer";
|
|
7
|
-
export { Unit } from "./UnitSource";
|
|
8
|
-
/** Direct API-to-widget binding; opaque values are never compared or calculated. */
|
|
9
|
-
declare abstract class Resource extends ProgressSource {
|
|
10
|
-
private readonly unitReference;
|
|
11
|
-
private readonly events;
|
|
12
|
-
private readonly listeners;
|
|
13
|
-
private eventFrame?;
|
|
14
|
-
private dispatching;
|
|
15
|
-
private eventValue;
|
|
16
|
-
private stopUnit?;
|
|
17
|
-
protected constructor(current: () => number, maximum: () => number, percent: () => number, unitReference: UnitSource, events: string[]);
|
|
18
|
-
protected AddEvents(...events: string[]): void;
|
|
19
|
-
protected GetValue(): number;
|
|
20
|
-
/** Future readable value changes only. Unsubscribe when the consumer is removed. */
|
|
21
|
-
onChange(listener: (value: number) => void): () => void;
|
|
22
|
-
/** One native event frame is shared by widgets, observers, and accessories. */
|
|
23
|
-
protected Observe(listener: (event: string, payload: unknown[], value: number) => void): () => void;
|
|
24
|
-
protected Listen(_frame: wuiraNativeFrame, refresh: () => void): () => void;
|
|
25
|
-
}
|
|
26
|
-
/** Live optional prediction channel. Secret amounts only travel to native sinks. */
|
|
27
|
-
export declare class HealthPrediction extends DataSource<number> {
|
|
28
|
-
private readonly read;
|
|
29
|
-
constructor(read: (() => number | undefined) | undefined);
|
|
30
|
-
get IsAvailable(): boolean;
|
|
31
|
-
protected GetValue(): number;
|
|
32
|
-
ApplyTo(frame: wuiraNativeStatusBar, maximum: number): void;
|
|
33
|
-
}
|
|
34
|
-
export declare class HP extends Resource {
|
|
35
|
-
private healPrediction?;
|
|
36
|
-
private absorbPrediction?;
|
|
37
|
-
get HealPrediction(): HealthPrediction | undefined;
|
|
38
|
-
get AbsorbPrediction(): HealthPrediction | undefined;
|
|
39
|
-
UseHealPrediction(): this;
|
|
40
|
-
UseAbsorbPrediction(): this;
|
|
41
|
-
BindTo(frame: wuiraNativeStatusBar, options?: ProgressOverrides): () => void;
|
|
42
|
-
readonly target: UnitSource;
|
|
43
|
-
get unit(): string;
|
|
44
|
-
constructor(unit?: UnitInput);
|
|
45
|
-
}
|
|
46
|
-
/** Explicit mana (power type 0), even while the unit uses rage/energy. */
|
|
47
|
-
export declare class Mana extends Resource {
|
|
48
|
-
private regenTimer?;
|
|
49
|
-
get RegenTimer(): ManaRegenTimer | undefined;
|
|
50
|
-
UseRegenTimer(): this;
|
|
51
|
-
readonly target: UnitSource;
|
|
52
|
-
get unit(): string;
|
|
53
|
-
constructor(unit: UnitInput);
|
|
54
|
-
}
|
|
55
|
-
export declare const DataSources: {
|
|
56
|
-
Resources: {
|
|
57
|
-
HP: typeof HP;
|
|
58
|
-
Mana: typeof Mana;
|
|
59
|
-
};
|
|
60
|
-
};
|