wuira 0.2.3 → 0.2.5
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 +38 -0
- package/README.md +62 -792
- package/data/icons/forever.json +90051 -0
- package/docs/icons.md +28 -0
- package/docs/source-converters.md +34 -0
- package/lib/datasources/DataSource.d.ts +8 -0
- package/lib/datasources/DataSource.lua +7 -0
- package/lib/datasources/GroupMembers.d.ts +6 -0
- package/lib/datasources/GroupMembers.lua +332 -0
- package/lib/datasources/GroupRoster.d.ts +28 -0
- package/lib/datasources/GroupRoster.lua +611 -0
- package/lib/datasources/MathConverter.d.ts +6 -0
- package/lib/datasources/MathConverter.lua +61 -0
- package/lib/datasources/MathExpression.d.ts +16 -0
- package/lib/datasources/MathExpression.lua +281 -0
- package/lib/datasources/Resources.d.ts +3 -2
- package/lib/datasources/Resources.lua +57 -48
- package/lib/datasources/SourceConverter.d.ts +39 -0
- package/lib/datasources/SourceConverter.lua +568 -0
- package/lib/datasources/UnitInfo.d.ts +6 -0
- package/lib/datasources/UnitInfo.lua +347 -15
- package/lib/datasources/UnitSource.d.ts +8 -3
- package/lib/datasources/UnitSource.lua +318 -5
- package/lib/datasources/index.d.ts +7 -1
- package/lib/datasources/index.lua +15 -0
- package/lib/icons/index.d.ts +45634 -0
- package/lib/icons/index.lua +3 -0
- package/lib/index.d.ts +1 -0
- package/lib/store/index.lua +20 -18
- package/lib/ui/Cell.d.ts +2 -0
- package/lib/ui/ForEach.d.ts +18 -4
- package/lib/ui/ForEach.lua +763 -13
- package/lib/ui/index.d.ts +1 -1
- package/package.json +20 -4
- package/tools/build-library.mjs +1 -1
- package/tools/generate-icons.mjs +10 -0
- package/tools/icon-data.mjs +59 -0
- package/tools/update-icons.mjs +36 -0
package/lib/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type { CommandCallback } from "./platform/SlashCommands";
|
|
|
6
6
|
export { AddonSettings } from "./platform/AddonSettings";
|
|
7
7
|
export { Encoding } from "./platform/Encoding";
|
|
8
8
|
export { DruidSpells, GeneralSpells, HunterSpells, MageSpells, PaladinSpells, PetSpells, PriestSpells, ProfessionSpells, RacialSpells, RogueSpells, ShamanSpells, WarlockSpells, WarriorSpells, WorldSpells, BindingActions, } from "./spells/index";
|
|
9
|
+
export { Icons } from "./icons/index";
|
|
9
10
|
export { BlizzardUI } from "./platform/BlizzardUI";
|
|
10
11
|
export { ActionBars } from "./platform/ActionBars";
|
|
11
12
|
export type { ActionSlot, EmptyActionBarsOptions } from "./platform/ActionBars";
|
package/lib/store/index.lua
CHANGED
|
@@ -739,10 +739,12 @@ function StoreRegistry.prototype.____constructor(self, options)
|
|
|
739
739
|
if string.match(options.variable, "^[%a_][%w_]*$") == nil then
|
|
740
740
|
error("Invalid SavedVariables name", 0)
|
|
741
741
|
end
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
742
|
+
if (C_AddOns and C_AddOns.IsAddOnLoaded) ~= nil then
|
|
743
|
+
local ____, loaded = C_AddOns.IsAddOnLoaded(options.addon)
|
|
744
|
+
if loaded then
|
|
745
|
+
self:Load()
|
|
746
|
+
return
|
|
747
|
+
end
|
|
746
748
|
end
|
|
747
749
|
self.listener = CreateFrame("Frame", nil, UIParent)
|
|
748
750
|
self.listener:RegisterEvent("ADDON_LOADED")
|
|
@@ -753,17 +755,17 @@ function StoreRegistry.prototype.____constructor(self, options)
|
|
|
753
755
|
return
|
|
754
756
|
end
|
|
755
757
|
self:Load()
|
|
758
|
+
local ____opt_3 = self.listener
|
|
759
|
+
if ____opt_3 ~= nil then
|
|
760
|
+
____opt_3:UnregisterAllEvents()
|
|
761
|
+
end
|
|
756
762
|
local ____opt_5 = self.listener
|
|
757
763
|
if ____opt_5 ~= nil then
|
|
758
|
-
____opt_5:
|
|
764
|
+
____opt_5:SetScript("OnEvent", nil)
|
|
759
765
|
end
|
|
760
766
|
local ____opt_7 = self.listener
|
|
761
767
|
if ____opt_7 ~= nil then
|
|
762
|
-
____opt_7:
|
|
763
|
-
end
|
|
764
|
-
local ____opt_9 = self.listener
|
|
765
|
-
if ____opt_9 ~= nil then
|
|
766
|
-
____opt_9:Hide()
|
|
768
|
+
____opt_7:Hide()
|
|
767
769
|
end
|
|
768
770
|
self.listener = nil
|
|
769
771
|
local callbacks = self.readyCallbacks
|
|
@@ -784,8 +786,8 @@ function StoreRegistry.prototype.onReady(self, callback)
|
|
|
784
786
|
if self.IsReady then
|
|
785
787
|
callback(nil)
|
|
786
788
|
else
|
|
787
|
-
local
|
|
788
|
-
|
|
789
|
+
local ____self_readyCallbacks_9 = self.readyCallbacks
|
|
790
|
+
____self_readyCallbacks_9[#____self_readyCallbacks_9 + 1] = callback
|
|
789
791
|
end
|
|
790
792
|
end
|
|
791
793
|
function StoreRegistry.prototype.Read(self, schema)
|
|
@@ -907,17 +909,17 @@ function StoreRegistry.prototype.subscribe(self, schema, observer)
|
|
|
907
909
|
end
|
|
908
910
|
end
|
|
909
911
|
function StoreRegistry.prototype.Dispose(self)
|
|
912
|
+
local ____opt_10 = self.listener
|
|
913
|
+
if ____opt_10 ~= nil then
|
|
914
|
+
____opt_10:UnregisterAllEvents()
|
|
915
|
+
end
|
|
910
916
|
local ____opt_12 = self.listener
|
|
911
917
|
if ____opt_12 ~= nil then
|
|
912
|
-
____opt_12:
|
|
918
|
+
____opt_12:SetScript("OnEvent", nil)
|
|
913
919
|
end
|
|
914
920
|
local ____opt_14 = self.listener
|
|
915
921
|
if ____opt_14 ~= nil then
|
|
916
|
-
____opt_14:
|
|
917
|
-
end
|
|
918
|
-
local ____opt_16 = self.listener
|
|
919
|
-
if ____opt_16 ~= nil then
|
|
920
|
-
____opt_16:Hide()
|
|
922
|
+
____opt_14:Hide()
|
|
921
923
|
end
|
|
922
924
|
self.listener = nil
|
|
923
925
|
self.observers:clear()
|
package/lib/ui/Cell.d.ts
CHANGED
package/lib/ui/ForEach.d.ts
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import type { Element } from "./primitives/jsx";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { CellProps } from "./Cell";
|
|
3
|
+
export interface ForEachSource<T> {
|
|
4
|
+
readonly Value: readonly T[];
|
|
5
|
+
onChange(listener: (items: readonly T[]) => void): () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface ForEachProps<T> extends Omit<Partial<CellProps>, "key" | "onMount"> {
|
|
8
|
+
items: readonly T[] | ForEachSource<T>;
|
|
9
|
+
key?: (item: T) => string | number;
|
|
4
10
|
child: (item: T, index: number) => Element;
|
|
11
|
+
/** Called for an existing key. The view and its native widgets are retained. */
|
|
12
|
+
onUpdate?: (view: Element, item: T, previous: T) => void;
|
|
13
|
+
onDispose?: (view: Element, item: T) => void;
|
|
14
|
+
direction?: "horizontal" | "vertical";
|
|
15
|
+
gap?: number;
|
|
16
|
+
lineGap?: number;
|
|
17
|
+
wrapAfter?: number;
|
|
18
|
+
groupBy?: (item: T) => string | number;
|
|
5
19
|
}
|
|
6
|
-
/**
|
|
7
|
-
export declare function ForEach<T>(
|
|
20
|
+
/** Arrays expand once; observable lists keep one mounted tree per stable key. */
|
|
21
|
+
export declare function ForEach<T>(props: ForEachProps<T>): Element;
|