From 3dd8761b1479a1f8e311bc12c970b61acb3f1509 Mon Sep 17 00:00:00 2001 From: Buds Date: Tue, 2 Apr 2024 05:57:56 +0200 Subject: [PATCH 01/42] Text Editor: add "Search API" button Use data from Blizzard_APIDocumentation for search functions in API, or help with completion Text before and around cursor is automatically use as search filter --- WeakAurasOptions/OptionsFrames/TextEditor.lua | 232 ++++++++++++++++-- 1 file changed, 215 insertions(+), 17 deletions(-) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 936c6af42e..15de36ec6b 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -424,25 +424,12 @@ local function ConstructTextEditor(frame) end end + local apiSearchFrame -- Make sidebar for snippets local snippetsFrame = CreateFrame("Frame", "WeakAurasSnippets", group.frame, "PortraitFrameTemplate") ButtonFrameTemplate_HidePortrait(snippetsFrame) - snippetsFrame:SetPoint("TOPLEFT", group.frame, "TOPRIGHT", 20, 0) - snippetsFrame:SetPoint("BOTTOMLEFT", group.frame, "BOTTOMRIGHT", 20, 0) snippetsFrame:SetWidth(250) - --[[ - snippetsFrame:SetBackdrop( - { - bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", - edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", - tile = true, - tileSize = 32, - edgeSize = 32, - insets = {left = 8, right = 8, top = 8, bottom = 8} - } - ) - snippetsFrame:SetBackdropColor(0, 0, 0, 1) -]] + -- Add button to save new snippet local AddSnippetButton = CreateFrame("Button", nil, snippetsFrame, "UIPanelButtonTemplate") AddSnippetButton:SetPoint("TOPLEFT", snippetsFrame, "TOPLEFT", 13, -25) @@ -478,9 +465,22 @@ local function ConstructTextEditor(frame) "OnClick", function(self, button, down) if not snippetsFrame:IsShown() then + snippetsFrame:ClearAllPoints() + if apiSearchFrame and apiSearchFrame:IsShown() then + snippetsFrame:SetPoint("TOPLEFT", apiSearchFrame, "TOPRIGHT", 10, 0) + snippetsFrame:SetPoint("BOTTOMLEFT", apiSearchFrame, "BOTTOMRIGHT", 10, 0) + else + snippetsFrame:SetPoint("TOPLEFT", group.frame, "TOPRIGHT", 20, 0) + snippetsFrame:SetPoint("BOTTOMLEFT", group.frame, "BOTTOMRIGHT", 20, 0) + end snippetsFrame:Show() UpdateSnippets(snippetsScroll) else + if apiSearchFrame and apiSearchFrame:IsShown() then + apiSearchFrame:ClearAllPoints() + apiSearchFrame:SetPoint("TOPLEFT", group.frame, "TOPRIGHT", 20, 0) + apiSearchFrame:SetPoint("BOTTOMLEFT", group.frame, "BOTTOMRIGHT", 20, 0) + end snippetsFrame:Hide() end end @@ -509,6 +509,185 @@ local function ConstructTextEditor(frame) end ) + -- Make ApiSearch button + local apiSearchButton = CreateFrame("Button", "WAAPISearchButton", group.frame, "UIPanelButtonTemplate") + apiSearchButton:SetPoint("BOTTOMRIGHT", editor.frame, "TOPRIGHT", -20, 15) + apiSearchButton:SetFrameLevel(group.frame:GetFrameLevel() + 2) + apiSearchButton:SetHeight(20) + apiSearchButton:SetWidth(100) + apiSearchButton:SetText(L["Search API"]) + apiSearchButton:RegisterForClicks("LeftButtonUp") + + -- Make sidebar for apiSearch + apiSearchFrame = CreateFrame("Frame", "WeakAurasAPISearchFrame", group.frame, "PortraitFrameTemplate") + ButtonFrameTemplate_HidePortrait(apiSearchFrame) + apiSearchFrame:SetWidth(350) + + local makeAPISearch + + -- filter line + local filterInput = CreateFrame("EditBox", "WeakAurasAPISearchFilterInput", apiSearchFrame, "SearchBoxTemplate") + filterInput:SetScript("OnTextChanged", function(self) + SearchBoxTemplate_OnTextChanged(self) + makeAPISearch(filterInput:GetText()) + end) + filterInput:SetHeight(15) + filterInput:SetPoint("TOPLEFT", apiSearchFrame, "TOPLEFT", 10, -30) + filterInput:SetPoint("TOPRIGHT", apiSearchFrame, "TOPRIGHT", -10, -30) + filterInput:SetFont(STANDARD_TEXT_FONT, 10, "") + + local apiSearchScrollContainer = AceGUI:Create("SimpleGroup") + apiSearchScrollContainer:SetFullWidth(true) + apiSearchScrollContainer:SetFullHeight(true) + apiSearchScrollContainer:SetLayout("Fill") + apiSearchScrollContainer.frame:SetParent(apiSearchFrame) + apiSearchScrollContainer.frame:SetPoint("TOPLEFT", apiSearchFrame, "TOPLEFT", 5, -60) + apiSearchScrollContainer.frame:SetPoint("BOTTOMRIGHT", apiSearchFrame, "BOTTOMRIGHT", -5, 10) + + local apiSearchScroll = AceGUI:Create("ScrollFrame") + apiSearchScroll:SetLayout("List") + apiSearchScrollContainer:AddChild(apiSearchScroll) + apiSearchScroll:FixScroll(true) + apiSearchScroll.scrollframe:SetScript( + "OnScrollRangeChanged", + function(frame) + frame.obj:DoLayout() + end + ) + + makeAPISearch = function(apiToSearchFor) + apiSearchScroll:ReleaseChildren() + + -- load documation addon + local apiAddonName = "Blizzard_APIDocumentation" + local _, loaded = C_AddOns.IsAddOnLoaded(apiAddonName) + if not loaded then + C_AddOns.LoadAddOn(apiAddonName) + end + if #APIDocumentation.systems == 0 then + APIDocumentation_LoadUI() + end + + -- show list of namespaces by default + if not apiToSearchFor or #apiToSearchFor < 3 then + for i, systemInfo in ipairs(APIDocumentation.systems) do + if systemInfo.Namespace and #systemInfo.Functions > 0 then + local button = AceGUI:Create("WeakAurasSnippetButton") + local name = systemInfo.Namespace + button:SetTitle(name) + button:SetEditable(false) + button:SetHeight(20) + button:SetRelativeWidth(1) + button:SetDescription() + button:SetCallback("OnClick", function() + filterInput:SetText(name) + end) + apiSearchScroll:AddChild(button) + end + end + else + local results = {} + + -- if search field is set to the name of namespace, show all functions + local foundSystem = false + apiToSearchForLower = apiToSearchFor:lower(); + for _, systemInfo in ipairs(APIDocumentation.systems) do + -- search for namespaceName or namespaceName.functionName + local nsName, rest = apiToSearchForLower:match("^([%w%_]+)(.*)") + if nsName and systemInfo.Namespace and systemInfo.Namespace:lower():match(nsName) then + foundSystem = true + local funcName = rest and rest:match("^%.([%w%_]+)") + for _, apiInfo in ipairs(systemInfo.Functions) do + if funcName then + if apiInfo:MatchesSearchString(funcName) then + tinsert(results, apiInfo) + end + else + tinsert(results, apiInfo) + end + end + end + end + + -- otherwise show a list of functions matching search field + if not foundSystem then + APIDocumentation:AddAllMatches(APIDocumentation.functions, results, apiToSearchFor) + end + + for i, apiInfo in ipairs(results) do + -- ace doesn't like gigantic list of widgets + if i > 100 then + local label = AceGUI:Create("Label") + label:SetText(L["Too much results (%s)"]:format(#results)) + label:SetHeight(20) + apiSearchScroll:AddChild(label) + break + else + local button = AceGUI:Create("WeakAurasSnippetButton") + local name = apiInfo:GetFullName() + button:SetTitle(name) + button:SetEditable(false) + button:SetHeight(20) + button:SetRelativeWidth(1) + local desc = table.concat(apiInfo:GetDetailedOutputLines(), "\n") + button:SetDescription(desc) + button:SetCallback("OnClick", function() + -- completion of text + local text, cursorPosition = IndentationLib.stripWowColorsWithPos( + originalGetText(editor.editBox), + editor.editBox:GetCursorPosition() + ) + local name = IndentationLib.stripWowColors(name) + local beforeCursor = "" + local i = cursorPosition - 1 + while i > 0 and text:sub(i, i):find("[%w%.%_]") do + beforeCursor = text:sub(i, i) .. beforeCursor + i = i - 1 + end + if name:sub(1, #beforeCursor):lower() == beforeCursor:lower() then + text = text:sub(1, i) .. name .. text:sub(cursorPosition, #text) + --editor.editBox:Insert(name:sub(#beforeCursor + 1, #name)) + editor.editBox:SetText(text) + editor.editBox:SetCursorPosition(i + #name) + else + editor.editBox:Insert(name) + end + editor:SetFocus() + end) + apiSearchScroll:AddChild(button) + end + end + end + end + + apiSearchFrame:Hide() + + -- Toggle the side bar on click + apiSearchButton:SetScript( + "OnClick", + function() + if not apiSearchFrame:IsShown() then + apiSearchFrame:Show() + apiSearchFrame:ClearAllPoints() + filterInput:SetFocus() + if snippetsFrame and snippetsFrame:IsShown() then + apiSearchFrame:SetPoint("TOPLEFT", snippetsFrame, "TOPRIGHT", 10, 0) + apiSearchFrame:SetPoint("BOTTOMLEFT", snippetsFrame, "BOTTOMRIGHT", 10, 0) + else + apiSearchFrame:SetPoint("TOPLEFT", group.frame, "TOPRIGHT", 20, 0) + apiSearchFrame:SetPoint("BOTTOMLEFT", group.frame, "BOTTOMRIGHT", 20, 0) + end + else + apiSearchFrame:Hide() + if snippetsFrame and snippetsFrame:IsShown() then + snippetsFrame:ClearAllPoints() + snippetsFrame:SetPoint("TOPLEFT", group.frame, "TOPRIGHT", 20, 0) + snippetsFrame:SetPoint("BOTTOMLEFT", group.frame, "BOTTOMRIGHT", 20, 0) + end + end + end + ) + -- CTRL + S saves and closes editor.editBox:HookScript( "OnKeyDown", @@ -572,13 +751,32 @@ local function ConstructTextEditor(frame) "OnCursorChanged", function(...) oldOnCursorChanged(...) - local cursorPosition = editor.editBox:GetCursorPosition() local next = -1 local line = 0 + local text, cursorPosition = IndentationLib.stripWowColorsWithPos( + originalGetText(editor.editBox), + editor.editBox:GetCursorPosition() + ) while (next and cursorPosition >= next) do - next = originalGetText(editor.editBox):find("[\n]", next + 1) + next = text:find("[\n]", next + 1) line = line + 1 end + if apiSearchFrame and apiSearchFrame:IsShown() then + local beforeCursor = "" + local i = cursorPosition - 1 + while i > 0 and text:sub(i, i):find("[%w%.%_]") do + beforeCursor = text:sub(i, i) .. beforeCursor + i = i - 1 + end + local afterCursor = "" + local j = cursorPosition + while j < #text and text:sub(j, j):find("[%w%.%_]") do + afterCursor = afterCursor .. text:sub(j, j) + j = j + 1 + end + local currentWord = beforeCursor .. afterCursor + filterInput:SetText(currentWord) + end editorLine:SetNumber(line) end ) From 9df2ba21f9f87e9b4268d962978bcfdb5dac0ad6 Mon Sep 17 00:00:00 2001 From: Buds Date: Thu, 4 Apr 2024 04:55:10 +0200 Subject: [PATCH 02/42] fix luacheckrc --- .luacheckrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.luacheckrc b/.luacheckrc index ae9ad90b33..93a0d9e354 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -200,6 +200,8 @@ globals = { "AreDangerousScriptsAllowed", "AreInvasionsAvailable", "AreTalentsLocked", + "APIDocumentation", + "APIDocumentation_LoadUI", "AscendStop", "AssistUnit", "AttachGlyphToSpell", @@ -273,6 +275,8 @@ globals = { "BuybackItem", "C_ActionBar", "C_AddOns.GetAddOnMetadata", + "C_AddOns.IsAddOnLoaded", + "C_AddOns.LoadAddOn", "C_AdventureJournal", "C_AdventureJournal.ActivateEntry", "C_AdventureJournal.CanBeShown", From 121e4dce0decc1f21f2209dad221af949de92771 Mon Sep 17 00:00:00 2001 From: Buds Date: Thu, 4 Apr 2024 04:55:18 +0200 Subject: [PATCH 03/42] fix global --- WeakAurasOptions/OptionsFrames/TextEditor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 15de36ec6b..4948fc3383 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -590,7 +590,7 @@ local function ConstructTextEditor(frame) -- if search field is set to the name of namespace, show all functions local foundSystem = false - apiToSearchForLower = apiToSearchFor:lower(); + local apiToSearchForLower = apiToSearchFor:lower(); for _, systemInfo in ipairs(APIDocumentation.systems) do -- search for namespaceName or namespaceName.functionName local nsName, rest = apiToSearchForLower:match("^([%w%_]+)(.*)") From bb196da15f27817726518896b13358963cdccb43 Mon Sep 17 00:00:00 2001 From: Buds Date: Thu, 4 Apr 2024 05:15:33 +0200 Subject: [PATCH 04/42] on filterInput update add tiny delay before search to avoid bursts of calls because of indent lib --- WeakAurasOptions/OptionsFrames/TextEditor.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 4948fc3383..9ecb5c8ad1 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -524,12 +524,22 @@ local function ConstructTextEditor(frame) apiSearchFrame:SetWidth(350) local makeAPISearch + local APISearchTextChangeDelay = 0.3 + local APISearchCTimer -- filter line local filterInput = CreateFrame("EditBox", "WeakAurasAPISearchFilterInput", apiSearchFrame, "SearchBoxTemplate") filterInput:SetScript("OnTextChanged", function(self) SearchBoxTemplate_OnTextChanged(self) - makeAPISearch(filterInput:GetText()) + if APISearchCTimer then + APISearchCTimer:Cancel() + end + APISearchCTimer = C_Timer.NewTimer( + APISearchTextChangeDelay, + function() + makeAPISearch(filterInput:GetText()) + end + ) end) filterInput:SetHeight(15) filterInput:SetPoint("TOPLEFT", apiSearchFrame, "TOPLEFT", 10, -30) @@ -556,6 +566,7 @@ local function ConstructTextEditor(frame) ) makeAPISearch = function(apiToSearchFor) + print("search") apiSearchScroll:ReleaseChildren() -- load documation addon From 96c6da734e7e7815e7f7f070a61c859cd2e10846 Mon Sep 17 00:00:00 2001 From: Buds Date: Thu, 4 Apr 2024 05:41:47 +0200 Subject: [PATCH 05/42] support events --- WeakAurasOptions/OptionsFrames/TextEditor.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 9ecb5c8ad1..6c0dfb2185 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -566,7 +566,6 @@ local function ConstructTextEditor(frame) ) makeAPISearch = function(apiToSearchFor) - print("search") apiSearchScroll:ReleaseChildren() -- load documation addon @@ -617,12 +616,18 @@ local function ConstructTextEditor(frame) tinsert(results, apiInfo) end end + if rest == "" then + for _, apiInfo in ipairs(systemInfo.Events) do + tinsert(results, apiInfo) + end + end end end -- otherwise show a list of functions matching search field if not foundSystem then - APIDocumentation:AddAllMatches(APIDocumentation.functions, results, apiToSearchFor) + APIDocumentation:AddAllMatches(APIDocumentation.functions, results, apiToSearchForLower) + APIDocumentation:AddAllMatches(APIDocumentation.events, results, apiToSearchForLower) end for i, apiInfo in ipairs(results) do @@ -635,7 +640,12 @@ local function ConstructTextEditor(frame) break else local button = AceGUI:Create("WeakAurasSnippetButton") - local name = apiInfo:GetFullName() + local name + if apiInfo.Type == "Function" then + name = apiInfo:GetFullName() + elseif apiInfo.Type == "Event" then + name = apiInfo.LiteralName + end button:SetTitle(name) button:SetEditable(false) button:SetHeight(20) From c0cfbcfc637219918f4c4f08e283fb2d6c652505 Mon Sep 17 00:00:00 2001 From: Buds Date: Fri, 5 Apr 2024 15:10:55 +0200 Subject: [PATCH 06/42] Add WeakAurasAPI --- .github/scripts/doc/.gitignore | 3 + .github/scripts/doc/parser.js | 77 + .github/scripts/doc/run.sh | 7 + WeakAurasOptions/OptionsFrames/TextEditor.lua | 1 + WeakAurasOptions/WeakAurasAPI.lua | 1979 +++++++++++++++++ WeakAurasOptions/WeakAurasOptions.toc | 2 + WeakAurasOptions/WeakAurasOptions_Cata.toc | 2 + WeakAurasOptions/WeakAurasOptions_Vanilla.toc | 2 + WeakAurasOptions/WeakAurasOptions_Wrath.toc | 2 + 9 files changed, 2075 insertions(+) create mode 100644 .github/scripts/doc/.gitignore create mode 100644 .github/scripts/doc/parser.js create mode 100644 .github/scripts/doc/run.sh create mode 100644 WeakAurasOptions/WeakAurasAPI.lua diff --git a/.github/scripts/doc/.gitignore b/.github/scripts/doc/.gitignore new file mode 100644 index 0000000000..23de5b59e9 --- /dev/null +++ b/.github/scripts/doc/.gitignore @@ -0,0 +1,3 @@ +doc.json +doc.md +*.log \ No newline at end of file diff --git a/.github/scripts/doc/parser.js b/.github/scripts/doc/parser.js new file mode 100644 index 0000000000..17d108955f --- /dev/null +++ b/.github/scripts/doc/parser.js @@ -0,0 +1,77 @@ +const fs = require('fs'); + +console.log( +`if not WeakAuras.IsLibsOK() then return end +---@type string +local AddonName = ... +---@class OptionsPrivate +local OptionsPrivate = select(2, ...) + +local WeakAurasAPI = +{ + Name = "WeakAuras", + Type = "System", + Namespace = "WeakAuras",` +) + +const data = fs.readFileSync('doc.json', { encoding: 'utf8', flags: 'r' }); +const obj = JSON.parse(data); +for (const entry of obj) { + if (entry.name === "WeakAuras") { + if (entry.fields) { + console.log(` Functions =`); + console.log(` {`); + for (const field of entry.fields) { + if (field?.extends?.type === "function") { + console.log(` {`); + console.log(` Name = "${field.name}",`); + console.log(` Type = "Function",`); + const args = field?.extends?.args + if (args && args.length > 0) { + console.log(""); + console.log(` Arguments =`); + console.log(` {`); + for (const arg of args) { + const nilable = arg.view.match("nil") ? "true" : "false" + console.log(` { Name = "${arg.name}", Type = "${arg.view}", Nilable = ${nilable} },`); + }; + console.log(` },`); + } + const returns = field?.extends?.returns + if (returns && returns.length > 0) { + console.log(""); + console.log(` Returns =`); + console.log(` {`); + for (const ret of returns) { + const nilable = ret.view.match("nil") ? "true" : "false" + console.log(` { Name = "${ret.name}", Type = "${ret.view}", Nilable = ${nilable} },`); + }; + console.log(` },`); + } + console.log(` },`); + } + }; + console.log(` },`); + } + } +} + +console.log( +` + Events = + { + }, + + Tables = + { + }, +}; +local loaded = false +function OptionsPrivate.LoadDocumentation() + if not loaded then + APIDocumentation:AddDocumentationTable(WeakAurasAPI); + loaded = true + end +end +` +); diff --git a/.github/scripts/doc/run.sh b/.github/scripts/doc/run.sh new file mode 100644 index 0000000000..25cecc7ce8 --- /dev/null +++ b/.github/scripts/doc/run.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +luals="C:\Users\buds\.vscode\extensions\sumneko.lua-3.7.4-win32-x64\server\bin\lua-language-server.exe" + +${luals} --doc="../../.." --logpath="." + +node parser.js > ../../../WeakAurasOptions/WeakAurasAPI.lua diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 6c0dfb2185..2b0cb8634c 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -577,6 +577,7 @@ local function ConstructTextEditor(frame) if #APIDocumentation.systems == 0 then APIDocumentation_LoadUI() end + OptionsPrivate.LoadDocumentation() -- show list of namespaces by default if not apiToSearchFor or #apiToSearchFor < 3 then diff --git a/WeakAurasOptions/WeakAurasAPI.lua b/WeakAurasOptions/WeakAurasAPI.lua new file mode 100644 index 0000000000..7e9a1a0f95 --- /dev/null +++ b/WeakAurasOptions/WeakAurasAPI.lua @@ -0,0 +1,1979 @@ +if not WeakAuras.IsLibsOK() then return end +---@type string +local AddonName = ... +---@class OptionsPrivate +local OptionsPrivate = select(2, ...) + +local WeakAurasAPI = +{ + Name = "WeakAuras", + Type = "System", + Namespace = "WeakAuras", + Functions = + { + { + Name = "Add", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "simpleChange", Type = "any", Nilable = false }, + }, + }, + { + Name = "AddCompanionData", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "CalculatedGcdDuration", + Type = "Function", + }, + { + Name = "CalculatedGcdDuration", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "CalculatedGcdDuration", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "integer|unknown", Nilable = false }, + }, + }, + { + Name = "CalculatedGcdDuration", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "CheckForItemBonusId", + Type = "Function", + + Arguments = + { + { Name = "ids", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "CheckForItemEquipped", + Type = "Function", + + Arguments = + { + { Name = "itemName", Type = "any", Nilable = false }, + { Name = "specificSlot", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + }, + }, + { + Name = "CheckNumericIds", + Type = "Function", + + Arguments = + { + { Name = "loadids", Type = "any", Nilable = false }, + { Name = "currentId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "CheckPvpTalentByIndex", + Type = "Function", + + Arguments = + { + { Name = "index", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + }, + }, + { + Name = "CheckRange", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + { Name = "range", Type = "any", Nilable = false }, + { Name = "operator", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|nil", Nilable = true }, + }, + }, + { + Name = "CheckTalentByIndex", + Type = "Function", + + Arguments = + { + { Name = "index", Type = "any", Nilable = false }, + { Name = "extraOption", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|nil", Nilable = true }, + }, + }, + { + Name = "CheckTalentId", + Type = "Function", + + Arguments = + { + { Name = "talentId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "ClearAndUpdateOptions", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "clearChildren", Type = "any", Nilable = false }, + }, + }, + { + Name = "ComposeSorts", + Type = "Function", + + Arguments = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "function", Nilable = false }, + }, + }, + { + Name = "CountWagoUpdates", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "CreateTemplateView", + Type = "Function", + + Arguments = + { + { Name = "Private", Type = "any", Nilable = false }, + { Name = "frame", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "DeepMixin", + Type = "Function", + + Arguments = + { + { Name = "dest", Type = "any", Nilable = false }, + { Name = "source", Type = "any", Nilable = false }, + }, + }, + { + Name = "Delete", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "EnsureString", + Type = "Function", + + Arguments = + { + { Name = "input", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "FillOptions", + Type = "Function", + }, + { + Name = "GcdSpellName", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetActiveConditions", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "cloneId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetActiveStates", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetActiveTriggers", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetAuraInstanceTooltipInfo", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + { Name = "auraInstanceId", Type = "any", Nilable = false }, + { Name = "filter", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "string|unknown", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "integer|unknown", Nilable = false }, + }, + }, + { + Name = "GetAuraTooltipInfo", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + { Name = "index", Type = "any", Nilable = false }, + { Name = "filter", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "integer|unknown", Nilable = false }, + }, + }, + { + Name = "GetBonusIdInfo", + Type = "Function", + + Arguments = + { + { Name = "ids", Type = "any", Nilable = false }, + { Name = "specificSlot", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetCastLatency", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "GetCritChance", + Type = "Function", + }, + { + Name = "GetData", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "string", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetEffectiveAttackPower", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetEquipmentSetInfo", + Type = "Function", + + Arguments = + { + { Name = "itemSetName", Type = "any", Nilable = false }, + { Name = "partial", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "GetEssenceCooldown", + Type = "Function", + + Arguments = + { + { Name = "essence", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetGCDInfo", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number|unknown", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "GetHSVTransition", + Type = "Function", + + Arguments = + { + { Name = "perc", Type = "any", Nilable = false }, + { Name = "r1", Type = "any", Nilable = false }, + { Name = "g1", Type = "any", Nilable = false }, + { Name = "b1", Type = "any", Nilable = false }, + { Name = "a1", Type = "any", Nilable = false }, + { Name = "r2", Type = "any", Nilable = false }, + { Name = "g2", Type = "any", Nilable = false }, + { Name = "b2", Type = "any", Nilable = false }, + { Name = "a2", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetHiddenTooltip", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetHitChance", + Type = "Function", + }, + { + Name = "GetItemCooldown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "showgcd", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + }, + }, + { + Name = "GetItemSlotCooldown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "showgcd", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + }, + }, + { + Name = "GetLegendaryData", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + }, + }, + { + Name = "GetMHTenchInfo", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetMoverSizerId", + Type = "Function", + }, + { + Name = "GetNumSetItemsEquipped", + Type = "Function", + + Arguments = + { + { Name = "setID", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "integer|nil", Nilable = true }, + { Name = "undefined", Type = "integer|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + }, + }, + { + Name = "GetOHTenchInfo", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetPlayerReaction", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetPolarCoordinates", + Type = "Function", + + Arguments = + { + { Name = "x", Type = "any", Nilable = false }, + { Name = "y", Type = "any", Nilable = false }, + { Name = "originX", Type = "any", Nilable = false }, + { Name = "originY", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetQueuedSpell", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetRange", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + { Name = "checkVisible", Type = "any", Nilable = false }, + }, + }, + { + Name = "GetRegion", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "string", Nilable = false }, + { Name = "cloneId", Type = "string|nil", Nilable = true }, + }, + + Returns = + { + { Name = "undefined", Type = "table|nil", Nilable = true }, + }, + }, + { + Name = "GetRuneCooldown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "integer|unknown", Nilable = false }, + { Name = "undefined", Type = "integer|unknown", Nilable = false }, + }, + }, + { + Name = "GetSpellCharges", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "ignoreSpellKnown", Type = "any", Nilable = false }, + { Name = "followoverride", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + }, + }, + { + Name = "GetSpellCooldown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "ignoreRuneCD", Type = "any", Nilable = false }, + { Name = "showgcd", Type = "any", Nilable = false }, + { Name = "ignoreSpellKnown", Type = "any", Nilable = false }, + { Name = "track", Type = "any", Nilable = false }, + { Name = "followOverride", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "integer|unknown|nil", Nilable = true }, + { Name = "undefined", Type = "integer|unknown|nil", Nilable = true }, + { Name = "undefined", Type = "boolean|unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "number|nil", Nilable = true }, + { Name = "undefined", Type = "boolean|nil", Nilable = true }, + }, + }, + { + Name = "GetSpellCooldownUnified", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "runeDuration", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "GetSpellCost", + Type = "Function", + + Arguments = + { + { Name = "powerTypeToCheck", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetSwingTimerInfo", + Type = "Function", + + Arguments = + { + { Name = "hand", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number|unknown", Nilable = false }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + }, + }, + { + Name = "GetTalentById", + Type = "Function", + + Arguments = + { + { Name = "talentId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "GetTriggerCategoryFor", + Type = "Function", + + Arguments = + { + { Name = "triggerType", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetTriggerStateForTrigger", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table|unknown", Nilable = false }, + }, + }, + { + Name = "GetUniqueCloneId", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "GetUnitNameplate", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + }, + { + Name = "HideOptions", + Type = "Function", + }, + { + Name = "Import", + Type = "Function", + + Arguments = + { + { Name = "inData", Type = "any", Nilable = false }, + { Name = "target", Type = "any", Nilable = false }, + { Name = "callbackFunc", Type = "any", Nilable = false }, + { Name = "linkedAuras", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|nil", Nilable = true }, + { Name = "undefined", Type = "string|nil", Nilable = true }, + }, + }, + { + Name = "InLoadingScreen", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "InitEssenceCooldown", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "InitSwingTimer", + Type = "Function", + }, + { + Name = "InstanceDifficulty", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "InstanceType", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string|unknown", Nilable = false }, + { Name = "undefined", Type = "nil", Nilable = true }, + }, + }, + { + Name = "InstanceTypeRaw", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "InternalVersion", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "InvertSort", + Type = "Function", + + Arguments = + { + { Name = "sortFunc", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "function", Nilable = false }, + }, + }, + { + Name = "IsAuraActive", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "IsAuraLoaded", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsCataClassic", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsCataOrRetail", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsClassicEra", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsClassicEraOrWrath", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsClassicEraOrWrathOrCata", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsImporting", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsLibsOK", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsLoginFinished", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsOptionsOpen", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsOptionsOpen", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsPaused", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsPlayerSpellOrOverridesAndBaseIsPlayerSpell", + Type = "Function", + + Arguments = + { + { Name = "spell", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + }, + }, + { + Name = "IsRetail", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsSpellInRange", + Type = "Function", + + Arguments = + { + { Name = "spellId", Type = "any", Nilable = false }, + { Name = "unit", Type = "any", Nilable = false }, + }, + }, + { + Name = "IsSpellKnown", + Type = "Function", + + Arguments = + { + { Name = "spell", Type = "any", Nilable = false }, + { Name = "pet", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + }, + }, + { + Name = "IsSpellKnownForLoad", + Type = "Function", + + Arguments = + { + { Name = "spell", Type = "any", Nilable = false }, + { Name = "exact", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + }, + }, + { + Name = "IsSpellKnownIncludingPet", + Type = "Function", + + Arguments = + { + { Name = "spell", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + }, + }, + { + Name = "IsUntrackableSoftTarget", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|nil", Nilable = true }, + }, + }, + { + Name = "IsWrathClassic", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsWrathOrCata", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "IsWrathOrCataOrRetail", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "LoadFromArchive", + Type = "Function", + + Arguments = + { + { Name = "storeType", Type = "any", Nilable = false }, + { Name = "storeID", Type = "any", Nilable = false }, + }, + }, + { + Name = "LoadFunction", + Type = "Function", + + Arguments = + { + { Name = "string", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "NewAura", + Type = "Function", + + Arguments = + { + { Name = "sourceData", Type = "any", Nilable = false }, + { Name = "regionType", Type = "any", Nilable = false }, + { Name = "targetId", Type = "any", Nilable = false }, + }, + }, + { + Name = "NewDisplayButton", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "massEdit", Type = "any", Nilable = false }, + }, + }, + { + Name = "OpenOptions", + Type = "Function", + + Arguments = + { + { Name = "msg", Type = "any", Nilable = false }, + }, + }, + { + Name = "PickDisplay", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "tab", Type = "any", Nilable = false }, + { Name = "noHide", Type = "any", Nilable = false }, + }, + }, + { + Name = "PreAdd", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "PrintProfile", + Type = "Function", + }, + { + Name = "PrintProfile", + Type = "Function", + }, + { + Name = "ProfileDisplays", + Type = "Function", + + Arguments = + { + { Name = "all", Type = "any", Nilable = false }, + }, + }, + { + Name = "ProfileFrames", + Type = "Function", + + Arguments = + { + { Name = "all", Type = "any", Nilable = false }, + }, + }, + { + Name = "RaidFlagToIndex", + Type = "Function", + + Arguments = + { + { Name = "flag", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "RegisterItemCountWatch", + Type = "Function", + }, + { + Name = "RegisterSubRegionOptions", + Type = "Function", + + Arguments = + { + { Name = "name", Type = "any", Nilable = false }, + { Name = "createFunction", Type = "any", Nilable = false }, + { Name = "description", Type = "any", Nilable = false }, + }, + }, + { + Name = "RegisterSubRegionType", + Type = "Function", + + Arguments = + { + { Name = "name", Type = "any", Nilable = false }, + { Name = "displayName", Type = "any", Nilable = false }, + { Name = "supportFunction", Type = "any", Nilable = false }, + { Name = "createFunction", Type = "any", Nilable = false }, + { Name = "modifyFunction", Type = "any", Nilable = false }, + { Name = "onAcquire", Type = "any", Nilable = false }, + { Name = "onRelease", Type = "any", Nilable = false }, + { Name = "default", Type = "any", Nilable = false }, + { Name = "addDefaultsForNewAura", Type = "any", Nilable = false }, + { Name = "properties", Type = "any", Nilable = false }, + { Name = "supportsAdd", Type = "any", Nilable = false }, + }, + }, + { + Name = "RegisterTriggerSystem", + Type = "Function", + + Arguments = + { + { Name = "types", Type = "any", Nilable = false }, + { Name = "triggerSystem", Type = "any", Nilable = false }, + }, + }, + { + Name = "RegisterTriggerSystemOptions", + Type = "Function", + + Arguments = + { + { Name = "types", Type = "any", Nilable = false }, + { Name = "func", Type = "any", Nilable = false }, + }, + }, + { + Name = "Rename", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "newid", Type = "any", Nilable = false }, + }, + }, + { + Name = "ReplaceRaidMarkerSymbols", + Type = "Function", + + Arguments = + { + { Name = "txt", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "SafeToNumber", + Type = "Function", + + Arguments = + { + { Name = "input", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "number|nil", Nilable = true }, + }, + }, + { + Name = "ScanEvents", + Type = "Function", + + Arguments = + { + { Name = "event", Type = "any", Nilable = false }, + { Name = "arg1", Type = "any", Nilable = false }, + { Name = "arg2", Type = "any", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "ScanEventsInternal", + Type = "Function", + + Arguments = + { + { Name = "event_list", Type = "any", Nilable = false }, + { Name = "event", Type = "any", Nilable = false }, + { Name = "arg1", Type = "any", Nilable = false }, + { Name = "arg2", Type = "any", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "ScanUnitEvents", + Type = "Function", + + Arguments = + { + { Name = "event", Type = "any", Nilable = false }, + { Name = "unit", Type = "any", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "SetModel", + Type = "Function", + + Arguments = + { + { Name = "frame", Type = "any", Nilable = false }, + { Name = "model_path", Type = "any", Nilable = false }, + { Name = "model_fileId", Type = "any", Nilable = false }, + { Name = "isUnit", Type = "any", Nilable = false }, + { Name = "isDisplayInfo", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetMoverSizer", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "ShowOptions", + Type = "Function", + + Arguments = + { + { Name = "msg", Type = "any", Nilable = false }, + }, + }, + { + Name = "SortAscending", + Type = "Function", + + Arguments = + { + { Name = "path", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "function", Nilable = false }, + }, + }, + { + Name = "SortDescending", + Type = "Function", + + Arguments = + { + { Name = "path", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "function", Nilable = false }, + }, + }, + { + Name = "SortGreaterLast", + Type = "Function", + + Arguments = + { + { Name = "a", Type = "any", Nilable = false }, + { Name = "b", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|nil", Nilable = true }, + }, + }, + { + Name = "SortNilFirst", + Type = "Function", + + Arguments = + { + { Name = "a", Type = "any", Nilable = false }, + { Name = "b", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|nil", Nilable = true }, + }, + }, + { + Name = "SortNilLast", + Type = "Function", + + Arguments = + { + { Name = "a", Type = "any", Nilable = false }, + { Name = "b", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|nil", Nilable = true }, + }, + }, + { + Name = "SortRegionData", + Type = "Function", + + Arguments = + { + { Name = "path", Type = "any", Nilable = false }, + { Name = "sortFunc", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "function", Nilable = false }, + }, + }, + { + Name = "SpellActivationActive", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "SpellSchool", + Type = "Function", + + Arguments = + { + { Name = "school", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "StartProfile", + Type = "Function", + + Arguments = + { + { Name = "_", Type = "string", Nilable = false }, + }, + }, + { + Name = "StartProfile", + Type = "Function", + + Arguments = + { + { Name = "startType", Type = "string", Nilable = false }, + }, + }, + { + Name = "StopProfile", + Type = "Function", + }, + { + Name = "StopProfile", + Type = "Function", + }, + { + Name = "TenchInit", + Type = "Function", + }, + { + Name = "TimeToSeconds", + Type = "Function", + + Arguments = + { + { Name = "val", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "number|unknown", Nilable = false }, + }, + }, + { + Name = "Toggle", + Type = "Function", + }, + { + Name = "ToggleMinimap", + Type = "Function", + }, + { + Name = "ToggleOptions", + Type = "Function", + + Arguments = + { + { Name = "msg", Type = "string", Nilable = false }, + { Name = "Private", Type = "Private", Nilable = false }, + }, + }, + { + Name = "ToggleProfile", + Type = "Function", + }, + { + Name = "UnitChannelInfo", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown|nil", Nilable = true }, + }, + }, + { + Name = "UnitDetailedThreatSituation", + Type = "Function", + + Arguments = + { + { Name = "unit1", Type = "any", Nilable = false }, + { Name = "unit2", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "UnitExistsFixed", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + { Name = "smart", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + }, + }, + { + Name = "UnitIsPet", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "UnitNameWithRealm", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "UnitPowerDisplayMod", + Type = "Function", + + Arguments = + { + { Name = "powerType", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "UnitRaidRole", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "UnitStagger", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "UntrackableUnit", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "UpdateGroupOrders", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "UpdateThumbnail", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "UseUnitPowerThirdArg", + Type = "Function", + + Arguments = + { + { Name = "powerType", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean|nil", Nilable = true }, + }, + }, + { + Name = "ValidateNumeric", + Type = "Function", + + Arguments = + { + { Name = "info", Type = "any", Nilable = false }, + { Name = "val", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "ValidateNumericOrPercent", + Type = "Function", + + Arguments = + { + { Name = "info", Type = "any", Nilable = false }, + { Name = "val", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "ValidateTime", + Type = "Function", + + Arguments = + { + { Name = "info", Type = "any", Nilable = false }, + { Name = "val", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "boolean", Nilable = false }, + }, + }, + { + Name = "WatchForCastLatency", + Type = "Function", + }, + { + Name = "WatchForNameplateTargetChange", + Type = "Function", + }, + { + Name = "WatchForPetDeath", + Type = "Function", + }, + { + Name = "WatchForPlayerMoving", + Type = "Function", + }, + { + Name = "WatchForQueuedSpell", + Type = "Function", + }, + { + Name = "WatchGCD", + Type = "Function", + }, + { + Name = "WatchItemCooldown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "WatchItemSlotCooldown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "WatchRuneCooldown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "WatchSpellActivation", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "WatchSpellCooldown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "ignoreRunes", Type = "any", Nilable = false }, + { Name = "followoverride", Type = "any", Nilable = false }, + }, + }, + { + Name = "WatchUnitChange", + Type = "Function", + + Arguments = + { + { Name = "unit", Type = "any", Nilable = false }, + }, + }, + { + Name = "gcdDuration", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "integer", Nilable = false }, + }, + }, + { + Name = "prettyPrint", + Type = "Function", + + Arguments = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "split", + Type = "Function", + + Arguments = + { + { Name = "input", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + }, + + Events = + { + }, + + Tables = + { + }, +}; +local loaded = false +function OptionsPrivate.LoadDocumentation() + if not loaded then + APIDocumentation:AddDocumentationTable(WeakAurasAPI); + loaded = true + end +end + diff --git a/WeakAurasOptions/WeakAurasOptions.toc b/WeakAurasOptions/WeakAurasOptions.toc index 63263a2d2c..3166793f66 100644 --- a/WeakAurasOptions/WeakAurasOptions.toc +++ b/WeakAurasOptions/WeakAurasOptions.toc @@ -55,6 +55,8 @@ WeakAurasOptions.lua ConditionOptions.lua AuthorOptions.lua +WeakAurasAPI.lua + OptionsFrames\OptionsFrame.lua # Groups diff --git a/WeakAurasOptions/WeakAurasOptions_Cata.toc b/WeakAurasOptions/WeakAurasOptions_Cata.toc index 5c85223cf8..6bcecce9a8 100644 --- a/WeakAurasOptions/WeakAurasOptions_Cata.toc +++ b/WeakAurasOptions/WeakAurasOptions_Cata.toc @@ -55,6 +55,8 @@ WeakAurasOptions.lua ConditionOptions.lua AuthorOptions.lua +WeakAurasAPI.lua + OptionsFrames\OptionsFrame.lua # Groups diff --git a/WeakAurasOptions/WeakAurasOptions_Vanilla.toc b/WeakAurasOptions/WeakAurasOptions_Vanilla.toc index 173c66a561..6a7ee4e89c 100644 --- a/WeakAurasOptions/WeakAurasOptions_Vanilla.toc +++ b/WeakAurasOptions/WeakAurasOptions_Vanilla.toc @@ -54,6 +54,8 @@ WeakAurasOptions.lua ConditionOptions.lua AuthorOptions.lua +WeakAurasAPI.lua + OptionsFrames\OptionsFrame.lua # Groups diff --git a/WeakAurasOptions/WeakAurasOptions_Wrath.toc b/WeakAurasOptions/WeakAurasOptions_Wrath.toc index d7cab86c79..63fb79a40e 100644 --- a/WeakAurasOptions/WeakAurasOptions_Wrath.toc +++ b/WeakAurasOptions/WeakAurasOptions_Wrath.toc @@ -54,6 +54,8 @@ WeakAurasOptions.lua ConditionOptions.lua AuthorOptions.lua +WeakAurasAPI.lua + OptionsFrames\OptionsFrame.lua # Groups From 95a1fb985d8945599449c5f20415353df651236c Mon Sep 17 00:00:00 2001 From: Buds Date: Sat, 6 Apr 2024 00:34:01 +0200 Subject: [PATCH 07/42] improve types conversion --- .github/scripts/doc/parser.js | 26 ++- WeakAurasOptions/WeakAurasAPI.lua | 270 +++++++++++++++--------------- 2 files changed, 157 insertions(+), 139 deletions(-) diff --git a/.github/scripts/doc/parser.js b/.github/scripts/doc/parser.js index 17d108955f..e9244ee80a 100644 --- a/.github/scripts/doc/parser.js +++ b/.github/scripts/doc/parser.js @@ -14,6 +14,26 @@ local WeakAurasAPI = Namespace = "WeakAuras",` ) +function isNilable(obj) { + return obj.view.match("nil|\\?") ? "true" : "false" +} + +function wowType(obj) { + if (obj.view.match("string")) { + return "cstring"; + } + if (obj.view.match("boolean")) { + return "bool"; + } + if (obj.view.match("integer|number")) { + return "number"; + } + if (obj.view === "unknown|nil") { + return "unknown" + } + return obj.view; +} + const data = fs.readFileSync('doc.json', { encoding: 'utf8', flags: 'r' }); const obj = JSON.parse(data); for (const entry of obj) { @@ -32,8 +52,7 @@ for (const entry of obj) { console.log(` Arguments =`); console.log(` {`); for (const arg of args) { - const nilable = arg.view.match("nil") ? "true" : "false" - console.log(` { Name = "${arg.name}", Type = "${arg.view}", Nilable = ${nilable} },`); + console.log(` { Name = "${arg.name}", Type = "${wowType(arg)}", Nilable = ${isNilable(arg)} },`); }; console.log(` },`); } @@ -43,8 +62,7 @@ for (const entry of obj) { console.log(` Returns =`); console.log(` {`); for (const ret of returns) { - const nilable = ret.view.match("nil") ? "true" : "false" - console.log(` { Name = "${ret.name}", Type = "${ret.view}", Nilable = ${nilable} },`); + console.log(` { Name = "${ret.name}", Type = "${wowType(ret)}", Nilable = ${isNilable(ret)} },`); }; console.log(` },`); } diff --git a/WeakAurasOptions/WeakAurasAPI.lua b/WeakAurasOptions/WeakAurasAPI.lua index 7e9a1a0f95..d56fe87158 100644 --- a/WeakAurasOptions/WeakAurasAPI.lua +++ b/WeakAurasOptions/WeakAurasAPI.lua @@ -40,7 +40,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -49,7 +49,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer|unknown", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -58,7 +58,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -72,7 +72,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -87,7 +87,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -102,7 +102,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -116,8 +116,8 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = true }, }, }, { @@ -133,7 +133,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|nil", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, }, }, { @@ -148,7 +148,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|nil", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, }, }, { @@ -162,7 +162,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -195,7 +195,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -243,7 +243,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, }, }, { @@ -315,10 +315,10 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "string|unknown", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = false }, - { Name = "undefined", Type = "integer|unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -335,8 +335,8 @@ local WeakAurasAPI = Returns = { { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = false }, - { Name = "undefined", Type = "integer|unknown", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -351,12 +351,12 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, }, }, { @@ -365,7 +365,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -378,7 +378,7 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "string", Nilable = false }, + { Name = "id", Type = "cstring", Nilable = false }, }, Returns = @@ -407,10 +407,10 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -424,10 +424,10 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, }, @@ -438,10 +438,10 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "number|unknown", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, }, }, @@ -495,10 +495,10 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -513,10 +513,10 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -530,8 +530,8 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "string", Nilable = false }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = true }, }, }, { @@ -544,7 +544,7 @@ local WeakAurasAPI = { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, }, @@ -564,9 +564,9 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer|nil", Nilable = true }, - { Name = "undefined", Type = "integer|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "number", Nilable = true }, + { Name = "undefined", Type = "number", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, }, }, { @@ -579,7 +579,7 @@ local WeakAurasAPI = { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, }, @@ -595,7 +595,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, }, }, { @@ -641,8 +641,8 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "string", Nilable = false }, - { Name = "cloneId", Type = "string|nil", Nilable = true }, + { Name = "id", Type = "cstring", Nilable = false }, + { Name = "cloneId", Type = "cstring", Nilable = true }, }, Returns = @@ -661,8 +661,8 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer|unknown", Nilable = false }, - { Name = "undefined", Type = "integer|unknown", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -678,11 +678,11 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, }, }, { @@ -701,12 +701,12 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer|unknown|nil", Nilable = true }, - { Name = "undefined", Type = "integer|unknown|nil", Nilable = true }, - { Name = "undefined", Type = "boolean|unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "number|nil", Nilable = true }, - { Name = "undefined", Type = "boolean|nil", Nilable = true }, + { Name = "undefined", Type = "number", Nilable = true }, + { Name = "undefined", Type = "number", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "number", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, }, }, { @@ -721,21 +721,21 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "boolean", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "boolean", Nilable = false }, - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -763,10 +763,10 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, - { Name = "undefined", Type = "number|unknown", Nilable = false }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, }, }, { @@ -821,7 +821,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -851,8 +851,8 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|nil", Nilable = true }, - { Name = "undefined", Type = "string|nil", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, + { Name = "undefined", Type = "cstring", Nilable = true }, }, }, { @@ -861,7 +861,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -870,7 +870,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -892,7 +892,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "string|unknown", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, { Name = "undefined", Type = "nil", Nilable = true }, }, }, @@ -911,7 +911,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -953,7 +953,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -962,7 +962,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -971,7 +971,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -980,7 +980,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -989,7 +989,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -998,7 +998,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1007,7 +1007,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1016,7 +1016,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1025,7 +1025,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1034,7 +1034,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1043,7 +1043,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1052,7 +1052,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1066,7 +1066,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1075,7 +1075,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1100,7 +1100,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1115,7 +1115,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1129,7 +1129,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1143,7 +1143,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|nil", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, }, }, { @@ -1152,7 +1152,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1161,7 +1161,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1170,7 +1170,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1376,7 +1376,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "number|nil", Nilable = true }, + { Name = "undefined", Type = "number", Nilable = true }, }, }, { @@ -1486,7 +1486,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|nil", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, }, }, { @@ -1501,7 +1501,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|nil", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, }, }, { @@ -1516,7 +1516,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|nil", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, }, }, { @@ -1559,7 +1559,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, }, }, { @@ -1568,7 +1568,7 @@ local WeakAurasAPI = Arguments = { - { Name = "_", Type = "string", Nilable = false }, + { Name = "_", Type = "cstring", Nilable = false }, }, }, { @@ -1577,7 +1577,7 @@ local WeakAurasAPI = Arguments = { - { Name = "startType", Type = "string", Nilable = false }, + { Name = "startType", Type = "cstring", Nilable = false }, }, }, { @@ -1603,7 +1603,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "number|unknown", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -1620,7 +1620,7 @@ local WeakAurasAPI = Arguments = { - { Name = "msg", Type = "string", Nilable = false }, + { Name = "msg", Type = "cstring", Nilable = false }, { Name = "Private", Type = "Private", Nilable = false }, }, }, @@ -1639,16 +1639,16 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, - { Name = "undefined", Type = "unknown|nil", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, }, }, { @@ -1682,7 +1682,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|unknown", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1696,7 +1696,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1710,7 +1710,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "cstring", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, }, }, @@ -1725,7 +1725,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -1753,7 +1753,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { @@ -1767,7 +1767,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1799,7 +1799,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean|nil", Nilable = true }, + { Name = "undefined", Type = "bool", Nilable = true }, }, }, { @@ -1814,7 +1814,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1829,7 +1829,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1844,7 +1844,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "boolean", Nilable = false }, + { Name = "undefined", Type = "bool", Nilable = false }, }, }, { @@ -1933,7 +1933,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "integer", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, }, }, { From 78ebc2ff0b8c933cf0c88039dba13a14958498f6 Mon Sep 17 00:00:00 2001 From: Buds Date: Sat, 6 Apr 2024 01:39:25 +0200 Subject: [PATCH 08/42] doc update --- WeakAurasOptions/WeakAurasAPI.lua | 184 ++++++++++++++++-------------- 1 file changed, 97 insertions(+), 87 deletions(-) diff --git a/WeakAurasOptions/WeakAurasAPI.lua b/WeakAurasOptions/WeakAurasAPI.lua index d56fe87158..e7d01725de 100644 --- a/WeakAurasOptions/WeakAurasAPI.lua +++ b/WeakAurasOptions/WeakAurasAPI.lua @@ -67,12 +67,12 @@ local WeakAurasAPI = Arguments = { - { Name = "ids", Type = "any", Nilable = false }, + { Name = "ids", Type = "cstring", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "isItemBonusId", Type = "bool", Nilable = false }, }, }, { @@ -81,13 +81,13 @@ local WeakAurasAPI = Arguments = { - { Name = "itemName", Type = "any", Nilable = false }, - { Name = "specificSlot", Type = "any", Nilable = false }, + { Name = "itemName", Type = "cstring", Nilable = false }, + { Name = "specificSlot", Type = "number", Nilable = true }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "isItemEquipped", Type = "bool", Nilable = true }, }, }, { @@ -256,7 +256,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "name", Type = "cstring", Nilable = false }, }, }, { @@ -345,18 +345,18 @@ local WeakAurasAPI = Arguments = { - { Name = "ids", Type = "any", Nilable = false }, - { Name = "specificSlot", Type = "any", Nilable = false }, + { Name = "ids", Type = "cstring", Nilable = false }, + { Name = "specificSlot", Type = "number", Nilable = true }, }, Returns = { - { Name = "undefined", Type = "cstring", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "id", Type = "cstring", Nilable = true }, + { Name = "itemID", Type = "cstring", Nilable = true }, + { Name = "itemName", Type = "cstring", Nilable = true }, + { Name = "icon", Type = "number", Nilable = true }, + { Name = "slot", Type = "number", Nilable = true }, + { Name = "itemSlot", Type = "number", Nilable = true }, }, }, { @@ -371,6 +371,11 @@ local WeakAurasAPI = { Name = "GetCritChance", Type = "Function", + + Returns = + { + { Name = "critChance", Type = "number", Nilable = false }, + }, }, { Name = "GetData", @@ -419,17 +424,17 @@ local WeakAurasAPI = Arguments = { - { Name = "essence", Type = "any", Nilable = false }, + { Name = "essence", Type = "number", Nilable = true }, }, Returns = { - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "duration", Type = "number", Nilable = true }, + { Name = "expirationTime", Type = "number", Nilable = true }, + { Name = "remaining", Type = "number", Nilable = true }, + { Name = "paused", Type = "bool", Nilable = true }, + { Name = "power", Type = "number", Nilable = true }, + { Name = "total", Type = "number", Nilable = true }, }, }, { @@ -438,11 +443,11 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "cstring", Nilable = false }, - { Name = "undefined", Type = "cstring", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "duration", Type = "number", Nilable = false }, + { Name = "expirationTime", Type = "number", Nilable = false }, + { Name = "name", Type = "cstring", Nilable = false }, + { Name = "icon", Type = "cstring", Nilable = false }, + { Name = "modrate", Type = "number", Nilable = false }, }, }, { @@ -482,6 +487,11 @@ local WeakAurasAPI = { Name = "GetHitChance", Type = "Function", + + Returns = + { + { Name = "hitChance", Type = "number", Nilable = false }, + }, }, { Name = "GetItemCooldown", @@ -489,16 +499,16 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "any", Nilable = false }, - { Name = "showgcd", Type = "any", Nilable = false }, + { Name = "id", Type = "cstring", Nilable = false }, + { Name = "showgcd", Type = "bool", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "startTime", Type = "number", Nilable = false }, + { Name = "duration", Type = "number", Nilable = false }, + { Name = "enabled", Type = "bool", Nilable = false }, + { Name = "gcdCooldown", Type = "number", Nilable = false }, }, }, { @@ -507,16 +517,16 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "any", Nilable = false }, - { Name = "showgcd", Type = "any", Nilable = false }, + { Name = "id", Type = "cstring", Nilable = false }, + { Name = "showgcd", Type = "bool", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "startTime", Type = "number", Nilable = false }, + { Name = "duration", Type = "number", Nilable = false }, + { Name = "enabled", Type = "bool", Nilable = false }, + { Name = "gcdCooldown", Type = "number", Nilable = false }, }, }, { @@ -590,12 +600,12 @@ local WeakAurasAPI = Arguments = { - { Name = "unit", Type = "any", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "reaction", Type = "("friendly"|"hostile")?", Nilable = true }, }, }, { @@ -656,13 +666,13 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "any", Nilable = false }, + { Name = "id", Type = "number", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "cooldownStart", Type = "number", Nilable = false }, + { Name = "cooldownDuration", Type = "number", Nilable = false }, }, }, { @@ -671,18 +681,18 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "any", Nilable = false }, - { Name = "ignoreSpellKnown", Type = "any", Nilable = false }, - { Name = "followoverride", Type = "any", Nilable = false }, + { Name = "id", Type = "cstring", Nilable = false }, + { Name = "ignoreSpellKnown", Type = "bool", Nilable = false }, + { Name = "followoverride", Type = "bool", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "charges", Type = "number", Nilable = true }, + { Name = "chargesMax", Type = "number", Nilable = true }, + { Name = "count", Type = "number", Nilable = true }, + { Name = "chargeGainTime", Type = "number", Nilable = true }, + { Name = "chargeLostTime", Type = "number", Nilable = true }, }, }, { @@ -691,22 +701,22 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "any", Nilable = false }, - { Name = "ignoreRuneCD", Type = "any", Nilable = false }, - { Name = "showgcd", Type = "any", Nilable = false }, - { Name = "ignoreSpellKnown", Type = "any", Nilable = false }, - { Name = "track", Type = "any", Nilable = false }, - { Name = "followOverride", Type = "any", Nilable = false }, + { Name = "id", Type = "cstring", Nilable = false }, + { Name = "ignoreRuneCD", Type = "bool", Nilable = false }, + { Name = "showgcd", Type = "bool", Nilable = false }, + { Name = "ignoreSpellKnown", Type = "bool", Nilable = false }, + { Name = "track", Type = "bool", Nilable = false }, + { Name = "followOverride", Type = "bool", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "number", Nilable = true }, - { Name = "undefined", Type = "number", Nilable = true }, - { Name = "undefined", Type = "bool", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "number", Nilable = true }, - { Name = "undefined", Type = "bool", Nilable = true }, + { Name = "startTime", Type = "number", Nilable = true }, + { Name = "duration", Type = "number", Nilable = true }, + { Name = "gcdCooldown", Type = "number", Nilable = true }, + { Name = "readyTime", Type = "number", Nilable = true }, + { Name = "modRate", Type = "number", Nilable = true }, + { Name = "paused", Type = "bool", Nilable = true }, }, }, { @@ -715,8 +725,8 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "any", Nilable = false }, - { Name = "runeDuration", Type = "any", Nilable = false }, + { Name = "id", Type = "cstring", Nilable = false }, + { Name = "runeDuration", Type = "number", Nilable = true }, }, Returns = @@ -758,15 +768,15 @@ local WeakAurasAPI = Arguments = { - { Name = "hand", Type = "any", Nilable = false }, + { Name = "hand", Type = "cstring", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "duration", Type = "number", Nilable = false }, + { Name = "expirationTime", Type = "number", Nilable = false }, + { Name = "weaponName", Type = "cstring", Nilable = true }, + { Name = "icon", Type = "number", Nilable = true }, }, }, { @@ -1385,10 +1395,10 @@ local WeakAurasAPI = Arguments = { - { Name = "event", Type = "any", Nilable = false }, + { Name = "event", Type = "cstring", Nilable = false }, { Name = "arg1", Type = "any", Nilable = false }, { Name = "arg2", Type = "any", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "any", Nilable = false }, }, }, { @@ -1397,11 +1407,11 @@ local WeakAurasAPI = Arguments = { - { Name = "event_list", Type = "any", Nilable = false }, - { Name = "event", Type = "any", Nilable = false }, + { Name = "event_list", Type = "cstring", Nilable = false }, + { Name = "event", Type = "cstring", Nilable = false }, { Name = "arg1", Type = "any", Nilable = false }, { Name = "arg2", Type = "any", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "any", Nilable = false }, }, }, { @@ -1410,9 +1420,9 @@ local WeakAurasAPI = Arguments = { - { Name = "event", Type = "any", Nilable = false }, - { Name = "unit", Type = "any", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "event", Type = "cstring", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, + { Name = "undefined", Type = "any", Nilable = false }, }, }, { @@ -1540,12 +1550,12 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "any", Nilable = false }, + { Name = "id", Type = "cstring", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "overlayGlowActive", Type = "bool", Nilable = false }, }, }, { @@ -1676,13 +1686,13 @@ local WeakAurasAPI = Arguments = { - { Name = "unit", Type = "any", Nilable = false }, - { Name = "smart", Type = "any", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, + { Name = "smart", Type = "bool", Nilable = true }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "unitExists", Type = "bool", Nilable = false }, }, }, { @@ -1924,7 +1934,7 @@ local WeakAurasAPI = Arguments = { - { Name = "unit", Type = "any", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, }, }, { @@ -1933,7 +1943,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "duration", Type = "number", Nilable = false }, }, }, { @@ -1951,12 +1961,12 @@ local WeakAurasAPI = Arguments = { - { Name = "input", Type = "any", Nilable = false }, + { Name = "input", Type = "cstring", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "table", Nilable = false }, + { Name = "splitedString", Type = "cstring", Nilable = false }, }, }, }, From b1c62738963145bc4e0942a4ebeffa31b10cfbd0 Mon Sep 17 00:00:00 2001 From: Buds Date: Sat, 13 Apr 2024 00:57:25 +0200 Subject: [PATCH 09/42] use string instead of cstring and workaround alias issue --- .github/scripts/doc/parser.js | 5 +- WeakAurasOptions/WeakAurasAPI.lua | 242 +++++++++++++++--------------- 2 files changed, 125 insertions(+), 122 deletions(-) diff --git a/.github/scripts/doc/parser.js b/.github/scripts/doc/parser.js index e9244ee80a..3afa4ad455 100644 --- a/.github/scripts/doc/parser.js +++ b/.github/scripts/doc/parser.js @@ -20,7 +20,7 @@ function isNilable(obj) { function wowType(obj) { if (obj.view.match("string")) { - return "cstring"; + return "string"; } if (obj.view.match("boolean")) { return "bool"; @@ -31,6 +31,9 @@ function wowType(obj) { if (obj.view === "unknown|nil") { return "unknown" } + if (obj.view === "(\"friendly\"|\"hostile\")?") { // i dont know how to handle this alias properly + return "string" + } return obj.view; } diff --git a/WeakAurasOptions/WeakAurasAPI.lua b/WeakAurasOptions/WeakAurasAPI.lua index e7d01725de..04a3f3411e 100644 --- a/WeakAurasOptions/WeakAurasAPI.lua +++ b/WeakAurasOptions/WeakAurasAPI.lua @@ -67,7 +67,7 @@ local WeakAurasAPI = Arguments = { - { Name = "ids", Type = "cstring", Nilable = false }, + { Name = "ids", Type = "string", Nilable = false }, }, Returns = @@ -81,7 +81,7 @@ local WeakAurasAPI = Arguments = { - { Name = "itemName", Type = "cstring", Nilable = false }, + { Name = "itemName", Type = "string", Nilable = false }, { Name = "specificSlot", Type = "number", Nilable = true }, }, @@ -96,13 +96,13 @@ local WeakAurasAPI = Arguments = { - { Name = "loadids", Type = "any", Nilable = false }, - { Name = "currentId", Type = "any", Nilable = false }, + { Name = "loadids", Type = "string", Nilable = false }, + { Name = "currentId", Type = "string", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -111,13 +111,13 @@ local WeakAurasAPI = Arguments = { - { Name = "index", Type = "any", Nilable = false }, + { Name = "index", Type = "number", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "hasTalent", Type = "bool", Nilable = false }, + { Name = "talentId", Type = "number", Nilable = true }, }, }, { @@ -142,13 +142,13 @@ local WeakAurasAPI = Arguments = { - { Name = "index", Type = "any", Nilable = false }, - { Name = "extraOption", Type = "any", Nilable = false }, + { Name = "index", Type = "number", Nilable = false }, + { Name = "extraOption", Type = "bool", Nilable = true }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = true }, + { Name = "hasTalent", Type = "bool", Nilable = true }, }, }, { @@ -157,12 +157,12 @@ local WeakAurasAPI = Arguments = { - { Name = "talentId", Type = "any", Nilable = false }, + { Name = "talentId", Type = "number", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "hasTalent", Type = "bool", Nilable = false }, }, }, { @@ -243,7 +243,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, }, }, { @@ -256,7 +256,7 @@ local WeakAurasAPI = Returns = { - { Name = "name", Type = "cstring", Nilable = false }, + { Name = "name", Type = "string", Nilable = false }, }, }, { @@ -316,8 +316,8 @@ local WeakAurasAPI = Returns = { { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "cstring", Nilable = false }, - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, }, }, @@ -335,7 +335,7 @@ local WeakAurasAPI = Returns = { { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, }, }, @@ -345,15 +345,15 @@ local WeakAurasAPI = Arguments = { - { Name = "ids", Type = "cstring", Nilable = false }, + { Name = "ids", Type = "string", Nilable = false }, { Name = "specificSlot", Type = "number", Nilable = true }, }, Returns = { - { Name = "id", Type = "cstring", Nilable = true }, - { Name = "itemID", Type = "cstring", Nilable = true }, - { Name = "itemName", Type = "cstring", Nilable = true }, + { Name = "id", Type = "string", Nilable = true }, + { Name = "itemID", Type = "string", Nilable = true }, + { Name = "itemName", Type = "string", Nilable = true }, { Name = "icon", Type = "number", Nilable = true }, { Name = "slot", Type = "number", Nilable = true }, { Name = "itemSlot", Type = "number", Nilable = true }, @@ -365,7 +365,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "castLatencyF", Type = "number", Nilable = false }, }, }, { @@ -383,7 +383,7 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "cstring", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, }, Returns = @@ -397,7 +397,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "result", Type = "number", Nilable = false }, }, }, { @@ -445,8 +445,8 @@ local WeakAurasAPI = { { Name = "duration", Type = "number", Nilable = false }, { Name = "expirationTime", Type = "number", Nilable = false }, - { Name = "name", Type = "cstring", Nilable = false }, - { Name = "icon", Type = "cstring", Nilable = false }, + { Name = "name", Type = "string", Nilable = false }, + { Name = "icon", Type = "string", Nilable = false }, { Name = "modrate", Type = "number", Nilable = false }, }, }, @@ -456,23 +456,23 @@ local WeakAurasAPI = Arguments = { - { Name = "perc", Type = "any", Nilable = false }, - { Name = "r1", Type = "any", Nilable = false }, - { Name = "g1", Type = "any", Nilable = false }, - { Name = "b1", Type = "any", Nilable = false }, - { Name = "a1", Type = "any", Nilable = false }, - { Name = "r2", Type = "any", Nilable = false }, - { Name = "g2", Type = "any", Nilable = false }, - { Name = "b2", Type = "any", Nilable = false }, - { Name = "a2", Type = "any", Nilable = false }, + { Name = "perc", Type = "number", Nilable = false }, + { Name = "r1", Type = "number", Nilable = false }, + { Name = "g1", Type = "number", Nilable = false }, + { Name = "b1", Type = "number", Nilable = false }, + { Name = "a1", Type = "number", Nilable = false }, + { Name = "r2", Type = "number", Nilable = false }, + { Name = "g2", Type = "number", Nilable = false }, + { Name = "b2", Type = "number", Nilable = false }, + { Name = "a2", Type = "number", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "r", Type = "number", Nilable = false }, + { Name = "g", Type = "number", Nilable = false }, + { Name = "b", Type = "number", Nilable = false }, + { Name = "a", Type = "number", Nilable = false }, }, }, { @@ -499,7 +499,7 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "cstring", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, { Name = "showgcd", Type = "bool", Nilable = false }, }, @@ -517,7 +517,7 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "cstring", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, { Name = "showgcd", Type = "bool", Nilable = false }, }, @@ -540,7 +540,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = true }, }, }, @@ -554,7 +554,7 @@ local WeakAurasAPI = { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, }, @@ -569,14 +569,14 @@ local WeakAurasAPI = Arguments = { - { Name = "setID", Type = "any", Nilable = false }, + { Name = "setID", Type = "number", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "number", Nilable = true }, - { Name = "undefined", Type = "number", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "quantity", Type = "number", Nilable = true }, + { Name = "maxQuantity", Type = "number", Nilable = true }, + { Name = "setName", Type = "string", Nilable = true }, }, }, { @@ -589,7 +589,7 @@ local WeakAurasAPI = { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "unknown", Nilable = false }, }, @@ -605,7 +605,7 @@ local WeakAurasAPI = Returns = { - { Name = "reaction", Type = "("friendly"|"hostile")?", Nilable = true }, + { Name = "reaction", Type = "string", Nilable = true }, }, }, { @@ -632,7 +632,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "spellID", Type = "number", Nilable = true }, }, }, { @@ -651,8 +651,8 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "cstring", Nilable = false }, - { Name = "cloneId", Type = "cstring", Nilable = true }, + { Name = "id", Type = "string", Nilable = false }, + { Name = "cloneId", Type = "string", Nilable = true }, }, Returns = @@ -681,7 +681,7 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "cstring", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, { Name = "ignoreSpellKnown", Type = "bool", Nilable = false }, { Name = "followoverride", Type = "bool", Nilable = false }, }, @@ -701,7 +701,7 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "cstring", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, { Name = "ignoreRuneCD", Type = "bool", Nilable = false }, { Name = "showgcd", Type = "bool", Nilable = false }, { Name = "ignoreSpellKnown", Type = "bool", Nilable = false }, @@ -725,7 +725,7 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "cstring", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, { Name = "runeDuration", Type = "number", Nilable = true }, }, @@ -754,12 +754,12 @@ local WeakAurasAPI = Arguments = { - { Name = "powerTypeToCheck", Type = "any", Nilable = false }, + { Name = "powerTypeToCheck", Type = "number", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "cost", Type = "number", Nilable = true }, }, }, { @@ -768,14 +768,14 @@ local WeakAurasAPI = Arguments = { - { Name = "hand", Type = "cstring", Nilable = false }, + { Name = "hand", Type = "string", Nilable = false }, }, Returns = { { Name = "duration", Type = "number", Nilable = false }, { Name = "expirationTime", Type = "number", Nilable = false }, - { Name = "weaponName", Type = "cstring", Nilable = true }, + { Name = "weaponName", Type = "string", Nilable = true }, { Name = "icon", Type = "number", Nilable = true }, }, }, @@ -785,15 +785,15 @@ local WeakAurasAPI = Arguments = { - { Name = "talentId", Type = "any", Nilable = false }, + { Name = "talentId", Type = "number", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "spellName", Type = "string", Nilable = true }, + { Name = "icon", Type = "number", Nilable = true }, + { Name = "spellId", Type = "number", Nilable = true }, + { Name = "rank", Type = "number", Nilable = true }, }, }, { @@ -831,7 +831,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "cloneId", Type = "number", Nilable = false }, }, }, { @@ -862,7 +862,7 @@ local WeakAurasAPI = Returns = { { Name = "undefined", Type = "bool", Nilable = true }, - { Name = "undefined", Type = "cstring", Nilable = true }, + { Name = "undefined", Type = "string", Nilable = true }, }, }, { @@ -902,7 +902,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, { Name = "undefined", Type = "nil", Nilable = true }, }, }, @@ -972,7 +972,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -981,7 +981,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -990,7 +990,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -999,7 +999,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1008,7 +1008,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1071,12 +1071,12 @@ local WeakAurasAPI = Arguments = { - { Name = "spell", Type = "any", Nilable = false }, + { Name = "spell", Type = "string", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1085,7 +1085,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1104,13 +1104,13 @@ local WeakAurasAPI = Arguments = { - { Name = "spell", Type = "any", Nilable = false }, - { Name = "pet", Type = "any", Nilable = false }, + { Name = "spell", Type = "string", Nilable = false }, + { Name = "pet", Type = "bool", Nilable = true }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1134,12 +1134,12 @@ local WeakAurasAPI = Arguments = { - { Name = "spell", Type = "any", Nilable = false }, + { Name = "spell", Type = "string", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1148,12 +1148,12 @@ local WeakAurasAPI = Arguments = { - { Name = "unit", Type = "any", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = true }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1162,7 +1162,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1171,7 +1171,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1180,7 +1180,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1289,12 +1289,12 @@ local WeakAurasAPI = Arguments = { - { Name = "flag", Type = "any", Nilable = false }, + { Name = "flag", Type = "number", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "index", Type = "number", Nilable = false }, }, }, { @@ -1367,12 +1367,12 @@ local WeakAurasAPI = Arguments = { - { Name = "txt", Type = "any", Nilable = false }, + { Name = "txt", Type = "string", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "result", Type = "string", Nilable = false }, }, }, { @@ -1395,7 +1395,7 @@ local WeakAurasAPI = Arguments = { - { Name = "event", Type = "cstring", Nilable = false }, + { Name = "event", Type = "string", Nilable = false }, { Name = "arg1", Type = "any", Nilable = false }, { Name = "arg2", Type = "any", Nilable = false }, { Name = "undefined", Type = "any", Nilable = false }, @@ -1407,8 +1407,8 @@ local WeakAurasAPI = Arguments = { - { Name = "event_list", Type = "cstring", Nilable = false }, - { Name = "event", Type = "cstring", Nilable = false }, + { Name = "event_list", Type = "string", Nilable = false }, + { Name = "event", Type = "string", Nilable = false }, { Name = "arg1", Type = "any", Nilable = false }, { Name = "arg2", Type = "any", Nilable = false }, { Name = "undefined", Type = "any", Nilable = false }, @@ -1420,7 +1420,7 @@ local WeakAurasAPI = Arguments = { - { Name = "event", Type = "cstring", Nilable = false }, + { Name = "event", Type = "string", Nilable = false }, { Name = "unit", Type = "UnitToken", Nilable = false }, { Name = "undefined", Type = "any", Nilable = false }, }, @@ -1550,7 +1550,7 @@ local WeakAurasAPI = Arguments = { - { Name = "id", Type = "cstring", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, }, Returns = @@ -1564,12 +1564,12 @@ local WeakAurasAPI = Arguments = { - { Name = "school", Type = "any", Nilable = false }, + { Name = "school", Type = "number", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "cstring", Nilable = false }, + { Name = "school", Type = "string", Nilable = false }, }, }, { @@ -1578,7 +1578,7 @@ local WeakAurasAPI = Arguments = { - { Name = "_", Type = "cstring", Nilable = false }, + { Name = "_", Type = "string", Nilable = false }, }, }, { @@ -1587,7 +1587,7 @@ local WeakAurasAPI = Arguments = { - { Name = "startType", Type = "cstring", Nilable = false }, + { Name = "startType", Type = "string", Nilable = false }, }, }, { @@ -1608,12 +1608,12 @@ local WeakAurasAPI = Arguments = { - { Name = "val", Type = "any", Nilable = false }, + { Name = "val", Type = "string", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "result", Type = "number", Nilable = true }, }, }, { @@ -1630,7 +1630,7 @@ local WeakAurasAPI = Arguments = { - { Name = "msg", Type = "cstring", Nilable = false }, + { Name = "msg", Type = "string", Nilable = false }, { Name = "Private", Type = "Private", Nilable = false }, }, }, @@ -1701,7 +1701,7 @@ local WeakAurasAPI = Arguments = { - { Name = "unit", Type = "any", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, }, Returns = @@ -1715,13 +1715,13 @@ local WeakAurasAPI = Arguments = { - { Name = "unit", Type = "any", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "cstring", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "name", Type = "string", Nilable = false }, + { Name = "realm", Type = "string", Nilable = false }, }, }, { @@ -1730,7 +1730,7 @@ local WeakAurasAPI = Arguments = { - { Name = "powerType", Type = "any", Nilable = false }, + { Name = "powerType", Type = "number", Nilable = false }, }, Returns = @@ -1744,12 +1744,12 @@ local WeakAurasAPI = Arguments = { - { Name = "unit", Type = "any", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "role", Type = "string", Nilable = true }, }, }, { @@ -1758,12 +1758,12 @@ local WeakAurasAPI = Arguments = { - { Name = "unit", Type = "any", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "stagger", Type = "number", Nilable = false }, }, }, { @@ -1772,12 +1772,12 @@ local WeakAurasAPI = Arguments = { - { Name = "unit", Type = "any", Nilable = false }, + { Name = "unit", Type = "UnitToken", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1804,7 +1804,7 @@ local WeakAurasAPI = Arguments = { - { Name = "powerType", Type = "any", Nilable = false }, + { Name = "powerType", Type = "number", Nilable = false }, }, Returns = @@ -1824,7 +1824,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "isNumeric", Type = "bool", Nilable = false }, }, }, { @@ -1834,12 +1834,12 @@ local WeakAurasAPI = Arguments = { { Name = "info", Type = "any", Nilable = false }, - { Name = "val", Type = "any", Nilable = false }, + { Name = "val", Type = "string", Nilable = false }, }, Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "result", Type = "bool", Nilable = false }, }, }, { @@ -1854,7 +1854,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "isTime", Type = "bool", Nilable = false }, }, }, { @@ -1952,7 +1952,7 @@ local WeakAurasAPI = Arguments = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, }, }, { @@ -1961,12 +1961,12 @@ local WeakAurasAPI = Arguments = { - { Name = "input", Type = "cstring", Nilable = false }, + { Name = "input", Type = "string", Nilable = false }, }, Returns = { - { Name = "splitedString", Type = "cstring", Nilable = false }, + { Name = "subStrings", Type = "string", Nilable = false }, }, }, }, From a003e6bb1c0235af2e0dde430ce6506d4a64eb15 Mon Sep 17 00:00:00 2001 From: Buds Date: Sat, 13 Apr 2024 00:59:33 +0200 Subject: [PATCH 10/42] Add more types to WeakAuras namespace --- WeakAuras/GenericTrigger.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index fc4ca185a6..aade4e50fc 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -2845,7 +2845,7 @@ do startTimeCooldown = startTimeCooldown - 2^32 / 1000 end - -- Default to + -- Default to GetSpellCharges ---@type boolean? local unifiedCooldownBecauseRune = false ---@type boolean? From f7857db4ebee644cad30f61b1e4499382692947d Mon Sep 17 00:00:00 2001 From: Buds Date: Sat, 20 Apr 2024 22:40:08 +0200 Subject: [PATCH 11/42] refactor snippet click callback --- WeakAurasOptions/OptionsFrames/TextEditor.lua | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 2b0cb8634c..b76d4ef01c 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -565,6 +565,29 @@ local function ConstructTextEditor(frame) end ) + local snippetOnClickCallback = function(self) + -- completion of text + local text, cursorPosition = IndentationLib.stripWowColorsWithPos( + originalGetText(self.editor.editBox), + self.editor.editBox:GetCursorPosition() + ) + local name = IndentationLib.stripWowColors(self.name) + local beforeCursor = "" + local i = cursorPosition - 1 + while i > 0 and text:sub(i, i):find("[%w%.%_]") do + beforeCursor = text:sub(i, i) .. beforeCursor + i = i - 1 + end + if name:sub(1, #beforeCursor):lower() == beforeCursor:lower() then + text = text:sub(1, i) .. name .. text:sub(cursorPosition, #text) + self.editor.editBox:SetText(text) + self.editor.editBox:SetCursorPosition(i + #name) + else + self.editor.editBox:Insert(name) + end + self.editor:SetFocus() + end + makeAPISearch = function(apiToSearchFor) apiSearchScroll:ReleaseChildren() @@ -653,29 +676,9 @@ local function ConstructTextEditor(frame) button:SetRelativeWidth(1) local desc = table.concat(apiInfo:GetDetailedOutputLines(), "\n") button:SetDescription(desc) - button:SetCallback("OnClick", function() - -- completion of text - local text, cursorPosition = IndentationLib.stripWowColorsWithPos( - originalGetText(editor.editBox), - editor.editBox:GetCursorPosition() - ) - local name = IndentationLib.stripWowColors(name) - local beforeCursor = "" - local i = cursorPosition - 1 - while i > 0 and text:sub(i, i):find("[%w%.%_]") do - beforeCursor = text:sub(i, i) .. beforeCursor - i = i - 1 - end - if name:sub(1, #beforeCursor):lower() == beforeCursor:lower() then - text = text:sub(1, i) .. name .. text:sub(cursorPosition, #text) - --editor.editBox:Insert(name:sub(#beforeCursor + 1, #name)) - editor.editBox:SetText(text) - editor.editBox:SetCursorPosition(i + #name) - else - editor.editBox:Insert(name) - end - editor:SetFocus() - end) + button.name = name + button.editor = editor + button:SetCallback("OnClick", snippetOnClickCallback) apiSearchScroll:AddChild(button) end end From a42d773b81b3bbf6a2aa9f1b2707604fe631a7fd Mon Sep 17 00:00:00 2001 From: Buds Date: Sun, 21 Apr 2024 03:58:54 +0200 Subject: [PATCH 12/42] intellissense like experiment shows only when side panel is open for now --- WeakAurasOptions/OptionsFrames/TextEditor.lua | 96 +++++++++++++++++-- WeakAurasOptions/WeakAurasOptions.toc | 1 + WeakAurasOptions/WeakAurasOptions_Cata.toc | 1 + WeakAurasOptions/WeakAurasOptions_Vanilla.toc | 1 + WeakAurasOptions/WeakAurasOptions_Wrath.toc | 1 + WeakAurasOptions/WeakAurasWidgetTemplate.xml | 19 ++++ 6 files changed, 109 insertions(+), 10 deletions(-) create mode 100644 WeakAurasOptions/WeakAurasWidgetTemplate.xml diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index b76d4ef01c..fd2540c0f4 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -578,19 +578,27 @@ local function ConstructTextEditor(frame) beforeCursor = text:sub(i, i) .. beforeCursor i = i - 1 end - if name:sub(1, #beforeCursor):lower() == beforeCursor:lower() then - text = text:sub(1, i) .. name .. text:sub(cursorPosition, #text) - self.editor.editBox:SetText(text) - self.editor.editBox:SetCursorPosition(i + #name) - else - self.editor.editBox:Insert(name) + local afterCursor = "" + local j = cursorPosition + while j < #text and text:sub(j, j):find("[%w%.%_]") do + afterCursor = afterCursor .. text:sub(j, j) + j = j + 1 end + text = text:sub(1, i) .. name .. text:sub(cursorPosition, #text) + self.editor.editBox:SetText(text) + self.editor.editBox:SetCursorPosition(i + #name) self.editor:SetFocus() end + local apis = CreateDataProvider() + local intellisenseScrollBox, intellisenseScrollBoxScrollbar + local intellisenseLines = 7 + local hiddenString = editor.editBox:CreateFontString() + hiddenString:SetFontObject(editor.editBox:GetFontObject()) + makeAPISearch = function(apiToSearchFor) apiSearchScroll:ReleaseChildren() - + apis:Flush() -- load documation addon local apiAddonName = "Blizzard_APIDocumentation" local _, loaded = C_AddOns.IsAddOnLoaded(apiAddonName) @@ -658,9 +666,11 @@ local function ConstructTextEditor(frame) -- ace doesn't like gigantic list of widgets if i > 100 then local label = AceGUI:Create("Label") - label:SetText(L["Too much results (%s)"]:format(#results)) + local text = L["Too much results (%s)"]:format(#results) + label:SetText(text) label:SetHeight(20) apiSearchScroll:AddChild(label) + apis:Insert({ name = text }) break else local button = AceGUI:Create("WeakAurasSnippetButton") @@ -680,8 +690,23 @@ local function ConstructTextEditor(frame) button.editor = editor button:SetCallback("OnClick", snippetOnClickCallback) apiSearchScroll:AddChild(button) + apis:Insert({ name = name, apiInfo = apiInfo }) end end + intellisenseScrollBox:SetHeight(math.min(apis:GetSize(), intellisenseLines) * 20) + local widgetWidth = 0 + for _, elementData in apis:Enumerate() do + hiddenString:SetText(elementData.name) + widgetWidth = math.max(widgetWidth, hiddenString:GetStringWidth()) + end + intellisenseScrollBox:SetWidth(widgetWidth) + end + if apis:IsEmpty() then + intellisenseScrollBox:Hide() + intellisenseScrollBoxScrollbar:Hide() + else + intellisenseScrollBox:Show() + intellisenseScrollBoxScrollbar:SetShown(apis:GetSize() > intellisenseLines) end end @@ -771,11 +796,62 @@ local function ConstructTextEditor(frame) OptionsPrivate.ToggleTip(helpButton, group.url, L["Help"], "") end) + + intellisenseScrollBox = CreateFrame("Frame", nil, editor.editBox, "WowScrollBoxList") + intellisenseScrollBox:SetSize(400, 150) + intellisenseScrollBox:Hide() + + local background = intellisenseScrollBox:CreateTexture(nil, "BACKGROUND") + background:SetColorTexture(.3, .3, .3, .9) + background:SetAllPoints() + + intellisenseScrollBoxScrollbar = CreateFrame("EventFrame", nil, editor.editBox, "WowTrimScrollBar") + intellisenseScrollBoxScrollbar:SetPoint("TOPLEFT", intellisenseScrollBox, "TOPRIGHT") + intellisenseScrollBoxScrollbar:SetPoint("BOTTOMLEFT", intellisenseScrollBox, "BOTTOMRIGHT") + intellisenseScrollBoxScrollbar:Hide() + + local view = CreateScrollBoxListLinearView() + view:SetElementInitializer("WeakAurasAPILineTemplate", function(frame, elementData) + frame:Init(elementData) + end) + ScrollUtil.InitScrollBoxListWithScrollBar(intellisenseScrollBox, intellisenseScrollBoxScrollbar, view) + + WeakAurasAPILineMixin = {} + + local function showTooltip(self) + if self.apiInfo then + GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT", 0, 20) + GameTooltip:ClearLines() + for _, line in ipairs(self.apiInfo:GetDetailedOutputLines()) do + GameTooltip:AddLine(line) + end + GameTooltip:Show() + end + end + local function hideTooltip(self) + GameTooltip:Hide() + GameTooltip:ClearLines() + end + + function WeakAurasAPILineMixin:Init(elementData) + self.button.name = elementData.name + self.button.editor = editor + self.button.apiInfo = elementData.apiInfo + self.button:SetText(elementData.name) + self.button:SetScript("OnClick", snippetOnClickCallback) + self.button:SetScript("OnEnter", showTooltip) + self.button:SetScript("OnLeave", hideTooltip) + end + + intellisenseScrollBox:SetDataProvider(apis) + local oldOnCursorChanged = editor.editBox:GetScript("OnCursorChanged") editor.editBox:SetScript( "OnCursorChanged", - function(...) - oldOnCursorChanged(...) + function(self, x, y, w, h) + oldOnCursorChanged(self, x, y, w, h) + intellisenseScrollBox:ClearAllPoints() + intellisenseScrollBox:SetPoint("TOPLEFT", self, "TOPLEFT", x, y - h) local next = -1 local line = 0 local text, cursorPosition = IndentationLib.stripWowColorsWithPos( diff --git a/WeakAurasOptions/WeakAurasOptions.toc b/WeakAurasOptions/WeakAurasOptions.toc index 3166793f66..f325a4174b 100644 --- a/WeakAurasOptions/WeakAurasOptions.toc +++ b/WeakAurasOptions/WeakAurasOptions.toc @@ -65,6 +65,7 @@ OptionsFrames\IconPicker.lua OptionsFrames\ImportExport.lua OptionsFrames\ModelPicker.lua OptionsFrames\TextEditor.lua +WeakAurasWidgetTemplate.xml OptionsFrames\TexturePicker.lua OptionsFrames\Update.lua OptionsFrames\DebugLogFrame.lua diff --git a/WeakAurasOptions/WeakAurasOptions_Cata.toc b/WeakAurasOptions/WeakAurasOptions_Cata.toc index 6bcecce9a8..7299cf8532 100644 --- a/WeakAurasOptions/WeakAurasOptions_Cata.toc +++ b/WeakAurasOptions/WeakAurasOptions_Cata.toc @@ -65,6 +65,7 @@ OptionsFrames\IconPicker.lua OptionsFrames\ImportExport.lua OptionsFrames\ModelPicker.lua OptionsFrames\TextEditor.lua +WeakAurasWidgetTemplate.xml OptionsFrames\TexturePicker.lua OptionsFrames\Update.lua OptionsFrames\DebugLogFrame.lua diff --git a/WeakAurasOptions/WeakAurasOptions_Vanilla.toc b/WeakAurasOptions/WeakAurasOptions_Vanilla.toc index 6a7ee4e89c..2b3b6413b0 100644 --- a/WeakAurasOptions/WeakAurasOptions_Vanilla.toc +++ b/WeakAurasOptions/WeakAurasOptions_Vanilla.toc @@ -64,6 +64,7 @@ OptionsFrames\IconPicker.lua OptionsFrames\ImportExport.lua OptionsFrames\ModelPicker.lua OptionsFrames\TextEditor.lua +WeakAurasWidgetTemplate.xml OptionsFrames\TexturePicker.lua OptionsFrames\Update.lua OptionsFrames\DebugLogFrame.lua diff --git a/WeakAurasOptions/WeakAurasOptions_Wrath.toc b/WeakAurasOptions/WeakAurasOptions_Wrath.toc index 63fb79a40e..7d91c81b60 100644 --- a/WeakAurasOptions/WeakAurasOptions_Wrath.toc +++ b/WeakAurasOptions/WeakAurasOptions_Wrath.toc @@ -64,6 +64,7 @@ OptionsFrames\IconPicker.lua OptionsFrames\ImportExport.lua OptionsFrames\ModelPicker.lua OptionsFrames\TextEditor.lua +WeakAurasWidgetTemplate.xml OptionsFrames\TexturePicker.lua OptionsFrames\Update.lua OptionsFrames\DebugLogFrame.lua diff --git a/WeakAurasOptions/WeakAurasWidgetTemplate.xml b/WeakAurasOptions/WeakAurasWidgetTemplate.xml new file mode 100644 index 0000000000..12e4475d5d --- /dev/null +++ b/WeakAurasOptions/WeakAurasWidgetTemplate.xml @@ -0,0 +1,19 @@ + + + + + + + + + \ No newline at end of file From c87af5b3bda7daf72385c4648050c688e14f1d6d Mon Sep 17 00:00:00 2001 From: Buds Date: Mon, 22 Apr 2024 15:16:42 +0200 Subject: [PATCH 13/42] move the api search code to a separate lib --- WeakAuras/embeds.xml | 1 + WeakAurasOptions/OptionsFrames/TextEditor.lua | 236 +++--------------- WeakAurasOptions/WeakAurasOptions.toc | 1 - WeakAurasOptions/WeakAurasOptions_Cata.toc | 1 - WeakAurasOptions/WeakAurasOptions_Vanilla.toc | 1 - WeakAurasOptions/WeakAurasOptions_Wrath.toc | 1 - WeakAurasOptions/WeakAurasWidgetTemplate.xml | 19 -- 7 files changed, 41 insertions(+), 219 deletions(-) delete mode 100644 WeakAurasOptions/WeakAurasWidgetTemplate.xml diff --git a/WeakAuras/embeds.xml b/WeakAuras/embeds.xml index 8bda6109e4..37e71a8af0 100644 --- a/WeakAuras/embeds.xml +++ b/WeakAuras/embeds.xml @@ -22,4 +22,5 @@ + diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index fd2540c0f4..29f698f7d6 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -17,6 +17,7 @@ local SharedMedia = LibStub("LibSharedMedia-3.0") local LibDD = LibStub:GetLibrary("LibUIDropDownMenu-4.0") local IndentationLib = IndentationLib +local APIDocLib = LibStub("APIDoc-1.0") ---@class WeakAuras local WeakAuras = WeakAuras @@ -190,6 +191,8 @@ local function ConstructTextEditor(frame) -- display we ned the original, so save it here. local originalGetText = editor.editBox.GetText set_scheme() + APIDocLib.enable(editor.editBox) + OptionsPrivate.LoadDocumentation() IndentationLib.enable(editor.editBox, color_scheme, WeakAurasSaved.editor_tab_spaces) local cancel = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate") @@ -566,147 +569,55 @@ local function ConstructTextEditor(frame) ) local snippetOnClickCallback = function(self) - -- completion of text - local text, cursorPosition = IndentationLib.stripWowColorsWithPos( - originalGetText(self.editor.editBox), - self.editor.editBox:GetCursorPosition() - ) - local name = IndentationLib.stripWowColors(self.name) - local beforeCursor = "" - local i = cursorPosition - 1 - while i > 0 and text:sub(i, i):find("[%w%.%_]") do - beforeCursor = text:sub(i, i) .. beforeCursor - i = i - 1 - end - local afterCursor = "" - local j = cursorPosition - while j < #text and text:sub(j, j):find("[%w%.%_]") do - afterCursor = afterCursor .. text:sub(j, j) - j = j + 1 + if self.isSystem then + filterInput:SetText(self.name) + else + self.editor.editBox:Insert(self.name) + --self.editor.editBox:SetCursorPosition(i + #name) + self.editor:SetFocus() end - text = text:sub(1, i) .. name .. text:sub(cursorPosition, #text) - self.editor.editBox:SetText(text) - self.editor.editBox:SetCursorPosition(i + #name) - self.editor:SetFocus() end - local apis = CreateDataProvider() - local intellisenseScrollBox, intellisenseScrollBoxScrollbar - local intellisenseLines = 7 - local hiddenString = editor.editBox:CreateFontString() - hiddenString:SetFontObject(editor.editBox:GetFontObject()) - makeAPISearch = function(apiToSearchFor) apiSearchScroll:ReleaseChildren() - apis:Flush() - -- load documation addon - local apiAddonName = "Blizzard_APIDocumentation" - local _, loaded = C_AddOns.IsAddOnLoaded(apiAddonName) - if not loaded then - C_AddOns.LoadAddOn(apiAddonName) - end - if #APIDocumentation.systems == 0 then - APIDocumentation_LoadUI() - end - OptionsPrivate.LoadDocumentation() - - -- show list of namespaces by default if not apiToSearchFor or #apiToSearchFor < 3 then - for i, systemInfo in ipairs(APIDocumentation.systems) do - if systemInfo.Namespace and #systemInfo.Functions > 0 then - local button = AceGUI:Create("WeakAurasSnippetButton") - local name = systemInfo.Namespace - button:SetTitle(name) - button:SetEditable(false) - button:SetHeight(20) - button:SetRelativeWidth(1) - button:SetDescription() - button:SetCallback("OnClick", function() - filterInput:SetText(name) - end) - apiSearchScroll:AddChild(button) - end - end + APIDocLib.ListSystems() else - local results = {} - - -- if search field is set to the name of namespace, show all functions - local foundSystem = false - local apiToSearchForLower = apiToSearchFor:lower(); - for _, systemInfo in ipairs(APIDocumentation.systems) do - -- search for namespaceName or namespaceName.functionName - local nsName, rest = apiToSearchForLower:match("^([%w%_]+)(.*)") - if nsName and systemInfo.Namespace and systemInfo.Namespace:lower():match(nsName) then - foundSystem = true - local funcName = rest and rest:match("^%.([%w%_]+)") - for _, apiInfo in ipairs(systemInfo.Functions) do - if funcName then - if apiInfo:MatchesSearchString(funcName) then - tinsert(results, apiInfo) - end - else - tinsert(results, apiInfo) - end - end - if rest == "" then - for _, apiInfo in ipairs(systemInfo.Events) do - tinsert(results, apiInfo) - end - end + APIDocLib.Search(apiToSearchFor) + end + for i, element in APIDocLib.apis:Enumerate() do + if i > 100 then + local label = AceGUI:Create("Label") + local text = L["Too much results (%s)"]:format(APIDocLib.apis:GetSize()) + label:SetText(text) + label:SetHeight(20) + apiSearchScroll:AddChild(label) + break + else + local apiInfo = element.apiInfo + local button = AceGUI:Create("WeakAurasSnippetButton") + local name + if apiInfo.Type == "Function" then + name = apiInfo:GetFullName() + elseif apiInfo.Type == "Event" then + name = apiInfo.LiteralName + elseif apiInfo.Type == "System" then + name = apiInfo.Namespace end - end - - -- otherwise show a list of functions matching search field - if not foundSystem then - APIDocumentation:AddAllMatches(APIDocumentation.functions, results, apiToSearchForLower) - APIDocumentation:AddAllMatches(APIDocumentation.events, results, apiToSearchForLower) - end - - for i, apiInfo in ipairs(results) do - -- ace doesn't like gigantic list of widgets - if i > 100 then - local label = AceGUI:Create("Label") - local text = L["Too much results (%s)"]:format(#results) - label:SetText(text) - label:SetHeight(20) - apiSearchScroll:AddChild(label) - apis:Insert({ name = text }) - break - else - local button = AceGUI:Create("WeakAurasSnippetButton") - local name - if apiInfo.Type == "Function" then - name = apiInfo:GetFullName() - elseif apiInfo.Type == "Event" then - name = apiInfo.LiteralName - end - button:SetTitle(name) - button:SetEditable(false) - button:SetHeight(20) - button:SetRelativeWidth(1) + button:SetTitle(name) + button:SetEditable(false) + button:SetHeight(20) + button:SetRelativeWidth(1) + if apiInfo.GetDetailedOutputLines then local desc = table.concat(apiInfo:GetDetailedOutputLines(), "\n") button:SetDescription(desc) - button.name = name - button.editor = editor - button:SetCallback("OnClick", snippetOnClickCallback) - apiSearchScroll:AddChild(button) - apis:Insert({ name = name, apiInfo = apiInfo }) end + button.name = name + button.editor = editor + button.isSystem = apiInfo.Type == "System" + button:SetCallback("OnClick", snippetOnClickCallback) + apiSearchScroll:AddChild(button) end - intellisenseScrollBox:SetHeight(math.min(apis:GetSize(), intellisenseLines) * 20) - local widgetWidth = 0 - for _, elementData in apis:Enumerate() do - hiddenString:SetText(elementData.name) - widgetWidth = math.max(widgetWidth, hiddenString:GetStringWidth()) - end - intellisenseScrollBox:SetWidth(widgetWidth) - end - if apis:IsEmpty() then - intellisenseScrollBox:Hide() - intellisenseScrollBoxScrollbar:Hide() - else - intellisenseScrollBox:Show() - intellisenseScrollBoxScrollbar:SetShown(apis:GetSize() > intellisenseLines) end end @@ -796,62 +707,11 @@ local function ConstructTextEditor(frame) OptionsPrivate.ToggleTip(helpButton, group.url, L["Help"], "") end) - - intellisenseScrollBox = CreateFrame("Frame", nil, editor.editBox, "WowScrollBoxList") - intellisenseScrollBox:SetSize(400, 150) - intellisenseScrollBox:Hide() - - local background = intellisenseScrollBox:CreateTexture(nil, "BACKGROUND") - background:SetColorTexture(.3, .3, .3, .9) - background:SetAllPoints() - - intellisenseScrollBoxScrollbar = CreateFrame("EventFrame", nil, editor.editBox, "WowTrimScrollBar") - intellisenseScrollBoxScrollbar:SetPoint("TOPLEFT", intellisenseScrollBox, "TOPRIGHT") - intellisenseScrollBoxScrollbar:SetPoint("BOTTOMLEFT", intellisenseScrollBox, "BOTTOMRIGHT") - intellisenseScrollBoxScrollbar:Hide() - - local view = CreateScrollBoxListLinearView() - view:SetElementInitializer("WeakAurasAPILineTemplate", function(frame, elementData) - frame:Init(elementData) - end) - ScrollUtil.InitScrollBoxListWithScrollBar(intellisenseScrollBox, intellisenseScrollBoxScrollbar, view) - - WeakAurasAPILineMixin = {} - - local function showTooltip(self) - if self.apiInfo then - GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT", 0, 20) - GameTooltip:ClearLines() - for _, line in ipairs(self.apiInfo:GetDetailedOutputLines()) do - GameTooltip:AddLine(line) - end - GameTooltip:Show() - end - end - local function hideTooltip(self) - GameTooltip:Hide() - GameTooltip:ClearLines() - end - - function WeakAurasAPILineMixin:Init(elementData) - self.button.name = elementData.name - self.button.editor = editor - self.button.apiInfo = elementData.apiInfo - self.button:SetText(elementData.name) - self.button:SetScript("OnClick", snippetOnClickCallback) - self.button:SetScript("OnEnter", showTooltip) - self.button:SetScript("OnLeave", hideTooltip) - end - - intellisenseScrollBox:SetDataProvider(apis) - local oldOnCursorChanged = editor.editBox:GetScript("OnCursorChanged") editor.editBox:SetScript( "OnCursorChanged", function(self, x, y, w, h) oldOnCursorChanged(self, x, y, w, h) - intellisenseScrollBox:ClearAllPoints() - intellisenseScrollBox:SetPoint("TOPLEFT", self, "TOPLEFT", x, y - h) local next = -1 local line = 0 local text, cursorPosition = IndentationLib.stripWowColorsWithPos( @@ -862,22 +722,6 @@ local function ConstructTextEditor(frame) next = text:find("[\n]", next + 1) line = line + 1 end - if apiSearchFrame and apiSearchFrame:IsShown() then - local beforeCursor = "" - local i = cursorPosition - 1 - while i > 0 and text:sub(i, i):find("[%w%.%_]") do - beforeCursor = text:sub(i, i) .. beforeCursor - i = i - 1 - end - local afterCursor = "" - local j = cursorPosition - while j < #text and text:sub(j, j):find("[%w%.%_]") do - afterCursor = afterCursor .. text:sub(j, j) - j = j + 1 - end - local currentWord = beforeCursor .. afterCursor - filterInput:SetText(currentWord) - end editorLine:SetNumber(line) end ) diff --git a/WeakAurasOptions/WeakAurasOptions.toc b/WeakAurasOptions/WeakAurasOptions.toc index f325a4174b..3166793f66 100644 --- a/WeakAurasOptions/WeakAurasOptions.toc +++ b/WeakAurasOptions/WeakAurasOptions.toc @@ -65,7 +65,6 @@ OptionsFrames\IconPicker.lua OptionsFrames\ImportExport.lua OptionsFrames\ModelPicker.lua OptionsFrames\TextEditor.lua -WeakAurasWidgetTemplate.xml OptionsFrames\TexturePicker.lua OptionsFrames\Update.lua OptionsFrames\DebugLogFrame.lua diff --git a/WeakAurasOptions/WeakAurasOptions_Cata.toc b/WeakAurasOptions/WeakAurasOptions_Cata.toc index 7299cf8532..6bcecce9a8 100644 --- a/WeakAurasOptions/WeakAurasOptions_Cata.toc +++ b/WeakAurasOptions/WeakAurasOptions_Cata.toc @@ -65,7 +65,6 @@ OptionsFrames\IconPicker.lua OptionsFrames\ImportExport.lua OptionsFrames\ModelPicker.lua OptionsFrames\TextEditor.lua -WeakAurasWidgetTemplate.xml OptionsFrames\TexturePicker.lua OptionsFrames\Update.lua OptionsFrames\DebugLogFrame.lua diff --git a/WeakAurasOptions/WeakAurasOptions_Vanilla.toc b/WeakAurasOptions/WeakAurasOptions_Vanilla.toc index 2b3b6413b0..6a7ee4e89c 100644 --- a/WeakAurasOptions/WeakAurasOptions_Vanilla.toc +++ b/WeakAurasOptions/WeakAurasOptions_Vanilla.toc @@ -64,7 +64,6 @@ OptionsFrames\IconPicker.lua OptionsFrames\ImportExport.lua OptionsFrames\ModelPicker.lua OptionsFrames\TextEditor.lua -WeakAurasWidgetTemplate.xml OptionsFrames\TexturePicker.lua OptionsFrames\Update.lua OptionsFrames\DebugLogFrame.lua diff --git a/WeakAurasOptions/WeakAurasOptions_Wrath.toc b/WeakAurasOptions/WeakAurasOptions_Wrath.toc index 7d91c81b60..63fb79a40e 100644 --- a/WeakAurasOptions/WeakAurasOptions_Wrath.toc +++ b/WeakAurasOptions/WeakAurasOptions_Wrath.toc @@ -64,7 +64,6 @@ OptionsFrames\IconPicker.lua OptionsFrames\ImportExport.lua OptionsFrames\ModelPicker.lua OptionsFrames\TextEditor.lua -WeakAurasWidgetTemplate.xml OptionsFrames\TexturePicker.lua OptionsFrames\Update.lua OptionsFrames\DebugLogFrame.lua diff --git a/WeakAurasOptions/WeakAurasWidgetTemplate.xml b/WeakAurasOptions/WeakAurasWidgetTemplate.xml deleted file mode 100644 index 12e4475d5d..0000000000 --- a/WeakAurasOptions/WeakAurasWidgetTemplate.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - \ No newline at end of file From 5c181114de0513eac61ea6128f427021bdef50c0 Mon Sep 17 00:00:00 2001 From: Buds Date: Tue, 23 Apr 2024 04:03:49 +0200 Subject: [PATCH 14/42] use luals 3.8.0, show only public functions, update api --- .github/scripts/doc/parser.js | 2 +- .github/scripts/doc/run.sh | 2 +- WeakAurasOptions/WeakAurasAPI.lua | 206 +++--------------------------- 3 files changed, 23 insertions(+), 187 deletions(-) diff --git a/.github/scripts/doc/parser.js b/.github/scripts/doc/parser.js index 3afa4ad455..7289fdac2f 100644 --- a/.github/scripts/doc/parser.js +++ b/.github/scripts/doc/parser.js @@ -45,7 +45,7 @@ for (const entry of obj) { console.log(` Functions =`); console.log(` {`); for (const field of entry.fields) { - if (field?.extends?.type === "function") { + if (field?.extends?.type === "function" && field?.visible === "public") { console.log(` {`); console.log(` Name = "${field.name}",`); console.log(` Type = "Function",`); diff --git a/.github/scripts/doc/run.sh b/.github/scripts/doc/run.sh index 25cecc7ce8..411b1bf388 100644 --- a/.github/scripts/doc/run.sh +++ b/.github/scripts/doc/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -luals="C:\Users\buds\.vscode\extensions\sumneko.lua-3.7.4-win32-x64\server\bin\lua-language-server.exe" +luals="C:\Users\buds\.vscode\extensions\sumneko.lua-3.8.0-win32-x64\server\bin\lua-language-server.exe" ${luals} --doc="../../.." --logpath="." diff --git a/WeakAurasOptions/WeakAurasAPI.lua b/WeakAurasOptions/WeakAurasAPI.lua index 04a3f3411e..560b8bbe7b 100644 --- a/WeakAurasOptions/WeakAurasAPI.lua +++ b/WeakAurasOptions/WeakAurasAPI.lua @@ -11,16 +11,6 @@ local WeakAurasAPI = Namespace = "WeakAuras", Functions = { - { - Name = "Add", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "simpleChange", Type = "any", Nilable = false }, - }, - }, { Name = "AddCompanionData", Type = "Function", @@ -223,15 +213,6 @@ local WeakAurasAPI = { Name = "source", Type = "any", Nilable = false }, }, }, - { - Name = "Delete", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, { Name = "EnsureString", Type = "Function", @@ -319,6 +300,14 @@ local WeakAurasAPI = { Name = "undefined", Type = "string", Nilable = false }, { Name = "undefined", Type = "string", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, }, }, { @@ -337,6 +326,14 @@ local WeakAurasAPI = { Name = "undefined", Type = "unknown", Nilable = false }, { Name = "undefined", Type = "string", Nilable = false }, { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, }, }, { @@ -796,20 +793,6 @@ local WeakAurasAPI = { Name = "rank", Type = "number", Nilable = true }, }, }, - { - Name = "GetTriggerCategoryFor", - Type = "Function", - - Arguments = - { - { Name = "triggerType", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, { Name = "GetTriggerStateForTrigger", Type = "Function", @@ -874,26 +857,13 @@ local WeakAurasAPI = { Name = "undefined", Type = "bool", Nilable = false }, }, }, - { - Name = "InitEssenceCooldown", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "InitSwingTimer", - Type = "Function", - }, { Name = "InstanceDifficulty", Type = "Function", Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "difficulty", Type = "string", Nilable = false }, }, }, { @@ -902,8 +872,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "string", Nilable = false }, - { Name = "undefined", Type = "nil", Nilable = true }, + { Name = "instanceType", Type = "string", Nilable = false }, }, }, { @@ -912,7 +881,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "difficultyID", Type = "number", Nilable = true }, }, }, { @@ -1113,21 +1082,6 @@ local WeakAurasAPI = { Name = "result", Type = "bool", Nilable = false }, }, }, - { - Name = "IsSpellKnownForLoad", - Type = "Function", - - Arguments = - { - { Name = "spell", Type = "any", Nilable = false }, - { Name = "exact", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, { Name = "IsSpellKnownIncludingPet", Type = "Function", @@ -1297,40 +1251,6 @@ local WeakAurasAPI = { Name = "index", Type = "number", Nilable = false }, }, }, - { - Name = "RegisterItemCountWatch", - Type = "Function", - }, - { - Name = "RegisterSubRegionOptions", - Type = "Function", - - Arguments = - { - { Name = "name", Type = "any", Nilable = false }, - { Name = "createFunction", Type = "any", Nilable = false }, - { Name = "description", Type = "any", Nilable = false }, - }, - }, - { - Name = "RegisterSubRegionType", - Type = "Function", - - Arguments = - { - { Name = "name", Type = "any", Nilable = false }, - { Name = "displayName", Type = "any", Nilable = false }, - { Name = "supportFunction", Type = "any", Nilable = false }, - { Name = "createFunction", Type = "any", Nilable = false }, - { Name = "modifyFunction", Type = "any", Nilable = false }, - { Name = "onAcquire", Type = "any", Nilable = false }, - { Name = "onRelease", Type = "any", Nilable = false }, - { Name = "default", Type = "any", Nilable = false }, - { Name = "addDefaultsForNewAura", Type = "any", Nilable = false }, - { Name = "properties", Type = "any", Nilable = false }, - { Name = "supportsAdd", Type = "any", Nilable = false }, - }, - }, { Name = "RegisterTriggerSystem", Type = "Function", @@ -1386,7 +1306,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "number", Nilable = true }, + { Name = "number", Type = "number", Nilable = true }, }, }, { @@ -1401,19 +1321,6 @@ local WeakAurasAPI = { Name = "undefined", Type = "any", Nilable = false }, }, }, - { - Name = "ScanEventsInternal", - Type = "Function", - - Arguments = - { - { Name = "event_list", Type = "string", Nilable = false }, - { Name = "event", Type = "string", Nilable = false }, - { Name = "arg1", Type = "any", Nilable = false }, - { Name = "arg2", Type = "any", Nilable = false }, - { Name = "undefined", Type = "any", Nilable = false }, - }, - }, { Name = "ScanUnitEvents", Type = "Function", @@ -1598,10 +1505,6 @@ local WeakAurasAPI = Name = "StopProfile", Type = "Function", }, - { - Name = "TenchInit", - Type = "Function", - }, { Name = "TimeToSeconds", Type = "Function", @@ -1706,7 +1609,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "isPet", Type = "bool", Nilable = false }, }, }, { @@ -1857,77 +1760,10 @@ local WeakAurasAPI = { Name = "isTime", Type = "bool", Nilable = false }, }, }, - { - Name = "WatchForCastLatency", - Type = "Function", - }, - { - Name = "WatchForNameplateTargetChange", - Type = "Function", - }, - { - Name = "WatchForPetDeath", - Type = "Function", - }, - { - Name = "WatchForPlayerMoving", - Type = "Function", - }, { Name = "WatchForQueuedSpell", Type = "Function", }, - { - Name = "WatchGCD", - Type = "Function", - }, - { - Name = "WatchItemCooldown", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "WatchItemSlotCooldown", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "WatchRuneCooldown", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "WatchSpellActivation", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "WatchSpellCooldown", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "ignoreRunes", Type = "any", Nilable = false }, - { Name = "followoverride", Type = "any", Nilable = false }, - }, - }, { Name = "WatchUnitChange", Type = "Function", From 54ff12c03936636bbb6a2e99c2da91fbda681695 Mon Sep 17 00:00:00 2001 From: Buds Date: Tue, 23 Apr 2024 04:58:02 +0200 Subject: [PATCH 15/42] lulas doc_out_path arg was fixes --- .github/scripts/doc/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/doc/run.sh b/.github/scripts/doc/run.sh index 411b1bf388..bce23012e1 100644 --- a/.github/scripts/doc/run.sh +++ b/.github/scripts/doc/run.sh @@ -2,6 +2,6 @@ luals="C:\Users\buds\.vscode\extensions\sumneko.lua-3.8.0-win32-x64\server\bin\lua-language-server.exe" -${luals} --doc="../../.." --logpath="." +${luals} --doc="../../.." --doc_out_path="." node parser.js > ../../../WeakAurasOptions/WeakAurasAPI.lua From fa9acd85e7ae5429b4befc00b44129953881d02c Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 07:26:45 +0200 Subject: [PATCH 16/42] WIP --- .github/scripts/doc/.gitignore | 3 - .github/scripts/doc/run.sh | 7 - .github/scripts/docs/.gitignore | 4 + .github/scripts/{doc => docs}/parser.js | 6 +- .../docs/update-documentation-files.sh | 7 + .github/workflows/documentation-update.yml | 51 + WeakAurasOptions/WeakAurasAPI.lua | 3391 ++++++++++++++++- 7 files changed, 3454 insertions(+), 15 deletions(-) delete mode 100644 .github/scripts/doc/.gitignore delete mode 100644 .github/scripts/doc/run.sh create mode 100644 .github/scripts/docs/.gitignore rename .github/scripts/{doc => docs}/parser.js (91%) create mode 100644 .github/scripts/docs/update-documentation-files.sh create mode 100644 .github/workflows/documentation-update.yml diff --git a/.github/scripts/doc/.gitignore b/.github/scripts/doc/.gitignore deleted file mode 100644 index 23de5b59e9..0000000000 --- a/.github/scripts/doc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -doc.json -doc.md -*.log \ No newline at end of file diff --git a/.github/scripts/doc/run.sh b/.github/scripts/doc/run.sh deleted file mode 100644 index bce23012e1..0000000000 --- a/.github/scripts/doc/run.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -luals="C:\Users\buds\.vscode\extensions\sumneko.lua-3.8.0-win32-x64\server\bin\lua-language-server.exe" - -${luals} --doc="../../.." --doc_out_path="." - -node parser.js > ../../../WeakAurasOptions/WeakAurasAPI.lua diff --git a/.github/scripts/docs/.gitignore b/.github/scripts/docs/.gitignore new file mode 100644 index 0000000000..d24f8ab3af --- /dev/null +++ b/.github/scripts/docs/.gitignore @@ -0,0 +1,4 @@ +doc.json +output.json +doc.md +*.log diff --git a/.github/scripts/doc/parser.js b/.github/scripts/docs/parser.js similarity index 91% rename from .github/scripts/doc/parser.js rename to .github/scripts/docs/parser.js index 7289fdac2f..cc4041573b 100644 --- a/.github/scripts/doc/parser.js +++ b/.github/scripts/docs/parser.js @@ -31,16 +31,15 @@ function wowType(obj) { if (obj.view === "unknown|nil") { return "unknown" } - if (obj.view === "(\"friendly\"|\"hostile\")?") { // i dont know how to handle this alias properly + if (obj.view === "(\"friendly\"|\"hostile\")?") { // I don't know how to handle this alias properly return "string" } return obj.view; } -const data = fs.readFileSync('doc.json', { encoding: 'utf8', flags: 'r' }); +const data = fs.readFileSync('output.json', { encoding: 'utf8', flags: 'r' }); const obj = JSON.parse(data); for (const entry of obj) { - if (entry.name === "WeakAuras") { if (entry.fields) { console.log(` Functions =`); console.log(` {`); @@ -74,7 +73,6 @@ for (const entry of obj) { }; console.log(` },`); } - } } console.log( diff --git a/.github/scripts/docs/update-documentation-files.sh b/.github/scripts/docs/update-documentation-files.sh new file mode 100644 index 0000000000..e7359ff267 --- /dev/null +++ b/.github/scripts/docs/update-documentation-files.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +lua-language-server --doc="../../.." --doc_out_path="." + +jq '[.[] | select(.name | index("WeakAuras") != -1)]' doc.json > output.json + +node parser.js > ../../../WeakAurasOptions/WeakAurasAPI.lua diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml new file mode 100644 index 0000000000..48724be634 --- /dev/null +++ b/.github/workflows/documentation-update.yml @@ -0,0 +1,51 @@ +name: Create Documentation Update Pull Request + +on: + schedule: + - cron: "0 10 * * 1" + workflow_dispatch: + +jobs: + atlasUpdate: + runs-on: ubuntu-latest + steps: + - name: Checkout WeakAuras + uses: actions/checkout@v4 + + - name: Checkout WeakAuras Wiki + uses: actions/checkout@v4 + with: + repository: WeakAuras/WeakAuras.wiki + path: wiki + + - name: Install LuaLS + run: | + brew install lua-language-server + + - name: Update Documentation Files + run: | + cd .github/scripts/docs + ./update-documentation-files.sh + shell: bash + + - name: Copy Documentation Files + run: | + cp -av .github/scripts/docs/docs.md wiki/API-Documentation.md + shell: bash + + - name: Update Wiki + run: | + cd wiki + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" + git commit -am "Update API Docs from ${GITHUB_SHA:0:7}" || true + git push + + # - name: Create Pull Request + # uses: peter-evans/create-pull-request@v6 + # with: + # branch: update-docs + # commit-message: Update Documentation Files + # title: Update Documentation Files + # body: Update Documentation Files + # delete-branch: true diff --git a/WeakAurasOptions/WeakAurasAPI.lua b/WeakAurasOptions/WeakAurasAPI.lua index 560b8bbe7b..b650ba21ae 100644 --- a/WeakAurasOptions/WeakAurasAPI.lua +++ b/WeakAurasOptions/WeakAurasAPI.lua @@ -10,6 +10,3293 @@ local WeakAurasAPI = Type = "System", Namespace = "WeakAuras", Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + { + Name = "CleanUpLines", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "AlignmentLines", Nilable = false }, + }, + }, + { + Name = "CreateLineInformation", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "AlignmentLines", Nilable = false }, + { Name = "data", Type = "auraData", Nilable = false }, + { Name = "sizerPoint", Type = "AnchorPoint", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "LineInformation", Nilable = false }, + { Name = "undefined", Type = "LineInformation", Nilable = false }, + }, + }, + { + Name = "CreateLines", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "AlignmentLines", Nilable = false }, + { Name = "data", Type = "auraData", Nilable = false }, + { Name = "sizerPoint", Type = "AnchorPoint?", Nilable = true }, + }, + }, + { + Name = "CreateMiddleLines", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "AlignmentLines", Nilable = false }, + { Name = "sizerPoint", Type = "AnchorPoint?", Nilable = true }, + }, + }, + { + Name = "MergeLineInformation", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "AlignmentLines", Nilable = false }, + { Name = "lines", Type = "LineInformation", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "LineInformation", Nilable = false }, + }, + }, + { + Name = "ShowLinesFor", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "AlignmentLines", Nilable = false }, + { Name = "ctrlKey", Type = "any", Nilable = false }, + { Name = "region", Type = "any", Nilable = false }, + { Name = "sizePoint", Type = "any", Nilable = false }, + }, + }, + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + { + Name = "GetAllWarnings", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + { + Name = "AuraCanFunction", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + { Name = "data", Type = "auraData", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "Disable", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, + }, + }, + { + Name = "Enable", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, + }, + }, + { + Name = "Enabled", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "Exists", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "Hydrate", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + }, + }, + { + Name = "ListFeatures", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "Register", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + { Name = "feature", Type = "feature", Nilable = false }, + }, + }, + { + Name = "Subscribe", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, + { Name = "enable", Type = "function", Nilable = false }, + { Name = "disable", Type = "function", Nilable = false }, + }, + }, + { + Name = "Wrap", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Features", Nilable = false }, + { Name = "id", Type = "string", Nilable = false }, + { Name = "enabledFunc", Type = "function", Nilable = false }, + { Name = "disabledFunc", Type = "function?", Nilable = true }, + }, + + Returns = + { + { Name = "undefined", Type = "function", Nilable = false }, + }, + }, + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + { + Name = "AddDisplayButton", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "AddTextFormatOption", + Type = "Function", + + Arguments = + { + { Name = "input", Type = "any", Nilable = false }, + { Name = "withHeader", Type = "any", Nilable = false }, + { Name = "get", Type = "any", Nilable = false }, + { Name = "addOption", Type = "any", Nilable = false }, + { Name = "hidden", Type = "any", Nilable = false }, + { Name = "setHidden", Type = "any", Nilable = false }, + { Name = "withoutColor", Type = "any", Nilable = false }, + { Name = "index", Type = "any", Nilable = false }, + { Name = "total", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "AddTriggerMetaFunctions", + Type = "Function", + + Arguments = + { + { Name = "options", Type = "any", Nilable = false }, + { Name = "data", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + }, + }, + { + Name = "AddUpDownDeleteDuplicate", + Type = "Function", + + Arguments = + { + { Name = "options", Type = "any", Nilable = false }, + { Name = "parentData", Type = "any", Nilable = false }, + { Name = "index", Type = "any", Nilable = false }, + { Name = "subRegionType", Type = "any", Nilable = false }, + }, + }, + { + Name = "ClearOptions", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "ClearPick", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "ClearPicks", + Type = "Function", + }, + { + Name = "ClearTriggerExpandState", + Type = "Function", + }, + { + Name = "CodeReview", + Type = "Function", + + Arguments = + { + { Name = "frame", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "ConfirmDelete", + Type = "Function", + + Arguments = + { + { Name = "toDelete", Type = "any", Nilable = false }, + { Name = "parents", Type = "any", Nilable = false }, + }, + }, + { + Name = "ConstructOptions", + Type = "Function", + + Arguments = + { + { Name = "prototype", Type = "any", Nilable = false }, + { Name = "data", Type = "any", Nilable = false }, + { Name = "startorder", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + { Name = "triggertype", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "ConvertDisplay", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "newType", Type = "any", Nilable = false }, + }, + }, + { + Name = "CreateFrame", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "DebugLog", + Type = "Function", + + Arguments = + { + { Name = "frame", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "DeleteAuras", + Type = "Function", + + Arguments = + { + { Name = "auras", Type = "any", Nilable = false }, + { Name = "parents", Type = "any", Nilable = false }, + }, + }, + { + Name = "DeleteSubRegion", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "index", Type = "any", Nilable = false }, + { Name = "regionType", Type = "any", Nilable = false }, + }, + }, + { + Name = "DragReset", + Type = "Function", + }, + { + Name = "Drop", + Type = "Function", + + Arguments = + { + { Name = "mainAura", Type = "any", Nilable = false }, + { Name = "target", Type = "any", Nilable = false }, + { Name = "action", Type = "any", Nilable = false }, + { Name = "area", Type = "any", Nilable = false }, + }, + }, + { + Name = "DropIndicator", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "DuplicateAura", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "newParent", Type = "any", Nilable = false }, + { Name = "massEdit", Type = "any", Nilable = false }, + { Name = "targetIndex", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "DuplicateCollapseData", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "namespace", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + }, + }, + { + Name = "DuplicateSubRegion", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "index", Type = "any", Nilable = false }, + { Name = "regionType", Type = "any", Nilable = false }, + }, + }, + { + Name = "EnsureOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "subOption", Type = "any", Nilable = false }, + }, + }, + { + Name = "ExportToString", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "ExportToTable", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "GetActionOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetAnimationOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetAuthorOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetConditionOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetDisplayButton", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetDisplayOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetFlipbookTileSize", + Type = "Function", + + Arguments = + { + { Name = "name", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetGroupOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetInformationOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "auraData", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetLoadOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetPickedDisplay", + Type = "Function", + }, + { + Name = "GetTriggerOptions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetTriggerTitle", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "HasWagoUrl", + Type = "Function", + + Arguments = + { + { Name = "auraId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "IconPicker", + Type = "Function", + + Arguments = + { + { Name = "frame", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "ImportExport", + Type = "Function", + + Arguments = + { + { Name = "frame", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "ImportFromString", + Type = "Function", + }, + { + Name = "InsertCollapsed", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "namespace", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + { Name = "value", Type = "any", Nilable = false }, + }, + }, + { + Name = "IsCollapsed", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "namespace", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + { Name = "default", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "IsDisplayPicked", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "IsPickedMultiple", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "IsWagoUpdateIgnored", + Type = "Function", + + Arguments = + { + { Name = "auraId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "LoadDocumentation", + Type = "Function", + }, + { + Name = "ModelPicker", + Type = "Function", + + Arguments = + { + { Name = "frame", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "MoveCollapseDataDown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "namespace", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + }, + }, + { + Name = "MoveCollapseDataUp", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "namespace", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + }, + }, + { + Name = "MoveSubRegionDown", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "index", Type = "any", Nilable = false }, + { Name = "regionType", Type = "any", Nilable = false }, + }, + }, + { + Name = "MoveSubRegionUp", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "index", Type = "any", Nilable = false }, + { Name = "regionType", Type = "any", Nilable = false }, + }, + }, + { + Name = "MoverSizer", + Type = "Function", + + Arguments = + { + { Name = "parent", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "MultipleDisplayTooltipDesc", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "MultipleDisplayTooltipMenu", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "OpenCodeReview", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "OpenDebugLog", + Type = "Function", + + Arguments = + { + { Name = "text", Type = "any", Nilable = false }, + }, + }, + { + Name = "OpenIconPicker", + Type = "Function", + + Arguments = + { + { Name = "baseObject", Type = "any", Nilable = false }, + { Name = "paths", Type = "any", Nilable = false }, + { Name = "groupIcon", Type = "any", Nilable = false }, + }, + }, + { + Name = "OpenModelPicker", + Type = "Function", + + Arguments = + { + { Name = "baseObject", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + }, + }, + { + Name = "OpenTextEditor", + Type = "Function", + + Arguments = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "OpenTexturePicker", + Type = "Function", + + Arguments = + { + { Name = "baseObject", Type = "any", Nilable = false }, + { Name = "paths", Type = "any", Nilable = false }, + { Name = "properties", Type = "any", Nilable = false }, + { Name = "textures", Type = "any", Nilable = false }, + { Name = "SetTextureFunc", Type = "any", Nilable = false }, + { Name = "adjustSize", Type = "any", Nilable = false }, + }, + }, + { + Name = "OpenTriggerTemplate", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "targetId", Type = "any", Nilable = false }, + }, + }, + { + Name = "OpenUpdate", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "children", Type = "any", Nilable = false }, + { Name = "target", Type = "any", Nilable = false }, + { Name = "linkedAuras", Type = "any", Nilable = false }, + { Name = "sender", Type = "any", Nilable = false }, + { Name = "callbackFunc", Type = "any", Nilable = false }, + }, + }, + { + Name = "PickAndEditDisplay", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "PickDisplayMultiple", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "PickDisplayMultipleShift", + Type = "Function", + + Arguments = + { + { Name = "target", Type = "any", Nilable = false }, + }, + }, + { + Name = "RemoveCollapsed", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "namespace", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + }, + }, + { + Name = "ResetCollapsed", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "namespace", Type = "any", Nilable = false }, + }, + }, + { + Name = "ResetMoverSizer", + Type = "Function", + }, + { + Name = "SetCollapsed", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "namespace", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + { Name = "v", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetTitle", + Type = "Function", + + Arguments = + { + { Name = "title", Type = "any", Nilable = false }, + }, + }, + { + Name = "SortDisplayButtons", + Type = "Function", + + Arguments = + { + { Name = "filter", Type = "any", Nilable = false }, + { Name = "overrideReset", Type = "any", Nilable = false }, + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "StartDrag", + Type = "Function", + + Arguments = + { + { Name = "mainAura", Type = "any", Nilable = false }, + }, + }, + { + Name = "StartFrameChooser", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + }, + }, + { + Name = "StartGrouping", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "StopFrameChooser", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "StopGrouping", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "TextEditor", + Type = "Function", + + Arguments = + { + { Name = "frame", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "TexturePicker", + Type = "Function", + + Arguments = + { + { Name = "frame", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "Ungroup", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "UpdateButtonsScroll", + Type = "Function", + }, + { + Name = "UpdateFrame", + Type = "Function", + + Arguments = + { + { Name = "frame", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "GroupUpdateFrame", Nilable = false }, + }, + }, + { + Name = "UpdateOptions", + Type = "Function", + }, + }, + Functions = + { + }, + Functions = + { + { + Name = "ActivateEvent", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + { Name = "data", Type = "any", Nilable = false }, + { Name = "state", Type = "any", Nilable = false }, + { Name = "errorHandler", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "state", Nilable = false }, + }, + }, + { + Name = "ActiveTrigger", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "AddMany", + Type = "Function", + + Arguments = + { + { Name = "tbl", Type = "auraData[]", Nilable = false }, + { Name = "takeSnapshots", Type = "bool", Nilable = false }, + }, + }, + { + Name = "AddParents", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "AddProgressSourceMetaData", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "progressSource", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table|nil", Nilable = true }, + }, + }, + { + Name = "AnchorFrame", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "region", Type = "any", Nilable = false }, + { Name = "parent", Type = "any", Nilable = false }, + { Name = "force", Type = "any", Nilable = false }, + }, + }, + { + Name = "Animate", + Type = "Function", + + Arguments = + { + { Name = "namespace", Type = "any", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "type", Type = "any", Nilable = false }, + { Name = "anim", Type = "any", Nilable = false }, + { Name = "region", Type = "any", Nilable = false }, + { Name = "inverse", Type = "any", Nilable = false }, + { Name = "onFinished", Type = "any", Nilable = false }, + { Name = "loop", Type = "any", Nilable = false }, + { Name = "cloneId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "AnyEveryFrameFormatters", + Type = "Function", + + Arguments = + { + { Name = "textStr", Type = "any", Nilable = false }, + { Name = "everyFrameFormatters", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "ApplyFrameLevel", + Type = "Function", + + Arguments = + { + { Name = "region", Type = "any", Nilable = false }, + { Name = "frameLevel", Type = "any", Nilable = false }, + }, + }, + { + Name = "CanConvertBuffTrigger2", + Type = "Function", + + Arguments = + { + { Name = "trigger", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = true }, + }, + }, + { + Name = "CancelAllDelayedTriggers", + Type = "Function", + }, + { + Name = "CancelAnimation", + Type = "Function", + + Arguments = + { + { Name = "region", Type = "any", Nilable = false }, + { Name = "resetPos", Type = "any", Nilable = false }, + { Name = "resetAlpha", Type = "any", Nilable = false }, + { Name = "resetScale", Type = "any", Nilable = false }, + { Name = "resetRotation", Type = "any", Nilable = false }, + { Name = "resetColor", Type = "any", Nilable = false }, + { Name = "doOnFinished", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "CancelDelayedTrigger", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "CheckCooldownReady", + Type = "Function", + }, + { + Name = "CheckItemCooldowns", + Type = "Function", + }, + { + Name = "CheckItemSlotCooldowns", + Type = "Function", + }, + { + Name = "CheckRuneCooldown", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "CheckSpellCooldown", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "runeDuration", Type = "any", Nilable = false }, + }, + }, + { + Name = "CheckSpellCooldows", + Type = "Function", + + Arguments = + { + { Name = "runeDuration", Type = "any", Nilable = false }, + }, + }, + { + Name = "CheckSpellKnown", + Type = "Function", + }, + { + Name = "CleanArchive", + Type = "Function", + + Arguments = + { + { Name = "historyCutoff", Type = "any", Nilable = false }, + { Name = "migrationCutoff", Type = "any", Nilable = false }, + }, + }, + { + Name = "ClearAuraEnvironment", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "ClearAuraEnvironmentSavedData", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "ClearFakeStates", + Type = "Function", + }, + { + Name = "CollapseAllClones", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + }, + }, + { + Name = "Convert", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "newType", Type = "any", Nilable = false }, + }, + }, + { + Name = "ConvertBuffTrigger2", + Type = "Function", + + Arguments = + { + { Name = "trigger", Type = "any", Nilable = false }, + }, + }, + { + Name = "CountWagoUpdates", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "CreateFormatters", + Type = "Function", + + Arguments = + { + { Name = "input", Type = "any", Nilable = false }, + { Name = "getter", Type = "any", Nilable = false }, + { Name = "withoutColor", Type = "any", Nilable = false }, + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "CreatingRegions", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "DataToString", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "DeleteAuraEnvironment", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "DisplayToString", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "forChat", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "EnforceSubregionExists", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "subregionType", Type = "any", Nilable = false }, + }, + }, + { + Name = "EveryFrameUpdateRename", + Type = "Function", + + Arguments = + { + { Name = "oldid", Type = "any", Nilable = false }, + { Name = "newid", Type = "any", Nilable = false }, + }, + }, + { + Name = "ExpandCurrencyList", + Type = "Function", + + Arguments = + { + { Name = "index", Type = "number", Nilable = false }, + { Name = "expand", Type = "bool", Nilable = false }, + }, + }, + { + Name = "ExpandCustomVariables", + Type = "Function", + + Arguments = + { + { Name = "variables", Type = "table", Nilable = false }, + }, + }, + { + Name = "FakeStatesFor", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "visible", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "FinishLoadUnload", + Type = "Function", + }, + { + Name = "GetAdditionalProperties", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetAnchorsForData", + Type = "Function", + + Arguments = + { + { Name = "parentData", Type = "any", Nilable = false }, + { Name = "type", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table|unknown|nil", Nilable = true }, + }, + }, + { + Name = "GetCurrencyIDFromLink", + Type = "Function", + + Arguments = + { + { Name = "currencyLink", Type = "string", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "GetCurrencyInfoForTrigger", + Type = "Function", + + Arguments = + { + { Name = "trigger", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "CurrencyInfo|nil", Nilable = true }, + }, + }, + { + Name = "GetCurrencyListInfo", + Type = "Function", + + Arguments = + { + { Name = "index", Type = "number", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetDiscoveredCurrencies", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetDiscoveredCurrenciesHeaders", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetDiscoveredCurrenciesSorted", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "GetGlobalConditionState", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetGlobalConditions", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetMigrationSnapshot", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + }, + }, + { + Name = "GetOverlayInfo", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = true }, + }, + }, + { + Name = "GetProgressSourceFor", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "trigger", Type = "any", Nilable = false }, + { Name = "property", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table|nil", Nilable = true }, + }, + }, + { + Name = "GetProgressSources", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetProgressSourcesForUi", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "subelement", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetProgressValueConstant", + Type = "Function", + + Arguments = + { + { Name = "v", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetProperties", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetReputations", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetReputationsHeaders", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetReputationsSorted", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "GetSanitizedGlobal", + Type = "Function", + + Arguments = + { + { Name = "key", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetSetId", + Type = "Function", + + Arguments = + { + { Name = "itemId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "GetSubRegionProperties", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "properties", Type = "any", Nilable = false }, + }, + }, + { + Name = "GetTalentData", + Type = "Function", + + Arguments = + { + { Name = "specId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table|nil", Nilable = true }, + }, + }, + { + Name = "GetTalentInfo", + Type = "Function", + + Arguments = + { + { Name = "specId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetTriggerConditions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "GetTsuConditionVariablesExpanded", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = true }, + }, + }, + { + Name = "HandleChatAction", + Type = "Function", + + Arguments = + { + { Name = "message_type", Type = "any", Nilable = false }, + { Name = "message", Type = "any", Nilable = false }, + { Name = "message_dest", Type = "any", Nilable = false }, + { Name = "message_dest_isunit", Type = "any", Nilable = false }, + { Name = "message_channel", Type = "any", Nilable = false }, + { Name = "r", Type = "any", Nilable = false }, + { Name = "g", Type = "any", Nilable = false }, + { Name = "b", Type = "any", Nilable = false }, + { Name = "region", Type = "any", Nilable = false }, + { Name = "customFunc", Type = "any", Nilable = false }, + { Name = "when", Type = "any", Nilable = false }, + { Name = "formatters", Type = "any", Nilable = false }, + { Name = "voice", Type = "any", Nilable = false }, + }, + }, + { + Name = "HandleGlowAction", + Type = "Function", + + Arguments = + { + { Name = "actions", Type = "any", Nilable = false }, + { Name = "region", Type = "any", Nilable = false }, + }, + }, + { + Name = "HideTooltip", + Type = "Function", + }, + { + Name = "IconSources", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "InitCooldownReady", + Type = "Function", + }, + { + Name = "InitializeEncounterAndZoneLists", + Type = "Function", + }, + { + Name = "InitializeEncounterAndZoneLists", + Type = "Function", + }, + { + Name = "InitializeEncounterAndZoneLists", + Type = "Function", + }, + { + Name = "InitializeEncounterAndZoneLists", + Type = "Function", + }, + { + Name = "IsAuraActive", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "IsEnvironmentInitialized", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "IsOptionsProcessingPaused", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "LoadConditionFunction", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "LoadConditionPropertyFunctions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "LoadDisplays", + Type = "Function", + + Arguments = + { + { Name = "toLoad", Type = "any", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "Login", + Type = "Function", + + Arguments = + { + { Name = "initialTime", Type = "any", Nilable = false }, + { Name = "takeNewSnapshots", Type = "any", Nilable = false }, + }, + }, + { + Name = "LoginMessage", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "ModelSetTransformFixed", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "Private", Nilable = false }, + { Name = "tx", Type = "any", Nilable = false }, + { Name = "ty", Type = "any", Nilable = false }, + { Name = "tz", Type = "any", Nilable = false }, + { Name = "rx", Type = "any", Nilable = false }, + { Name = "ry", Type = "any", Nilable = false }, + { Name = "rz", Type = "any", Nilable = false }, + { Name = "s", Type = "any", Nilable = false }, + }, + }, + { + Name = "Modernize", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "auraData", Nilable = false }, + }, + }, + { + Name = "NeedToRepairDatabase", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "ParseTextStr", + Type = "Function", + + Arguments = + { + { Name = "textStr", Type = "any", Nilable = false }, + { Name = "symbolCallback", Type = "any", Nilable = false }, + }, + }, + { + Name = "ParseTooltipText", + Type = "Function", + + Arguments = + { + { Name = "tooltipText", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + { Name = "undefined", Type = "string", Nilable = false }, + { Name = "undefined", Type = "number", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + { Name = "undefined", Type = "unknown", Nilable = true }, + }, + }, + { + Name = "Pause", + Type = "Function", + }, + { + Name = "PauseAllDynamicGroups", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "PerformActions", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "when", Type = "any", Nilable = false }, + { Name = "region", Type = "any", Nilable = false }, + }, + }, + { + Name = "PostAddCompanion", + Type = "Function", + }, + { + Name = "ProfileRenameAura", + Type = "Function", + + Arguments = + { + { Name = "oldid", Type = "any", Nilable = false }, + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "RegisterEveryFrameUpdate", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "RegisterForGlobalConditions", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + }, + }, + { + Name = "RegisterGroupForPositioning", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + { Name = "region", Type = "any", Nilable = false }, + }, + }, + { + Name = "RegisterLoadEvents", + Type = "Function", + }, + { + Name = "RegisterRegionOptions", + Type = "Function", + + Arguments = + { + { Name = "_", Type = "string", Nilable = false }, + { Name = "_", Type = "function", Nilable = false }, + { Name = "_", Type = "string", Nilable = false }, + { Name = "_", Type = "string", Nilable = false }, + }, + }, + { + Name = "RegisterRegionOptions", + Type = "Function", + + Arguments = + { + { Name = "name", Type = "any", Nilable = false }, + { Name = "createFunction", Type = "any", Nilable = false }, + { Name = "icon", Type = "any", Nilable = false }, + { Name = "displayName", Type = "any", Nilable = false }, + { Name = "createThumbnail", Type = "any", Nilable = false }, + { Name = "modifyThumbnail", Type = "any", Nilable = false }, + { Name = "description", Type = "any", Nilable = false }, + { Name = "templates", Type = "any", Nilable = false }, + { Name = "getAnchors", Type = "any", Nilable = false }, + }, + }, + { + Name = "ReleaseClone", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "cloneId", Type = "any", Nilable = false }, + { Name = "regionType", Type = "any", Nilable = false }, + }, + }, + { + Name = "RemoveHistory", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + }, + }, + { + Name = "RenameAuraEnvironment", + Type = "Function", + + Arguments = + { + { Name = "oldid", Type = "any", Nilable = false }, + { Name = "newid", Type = "any", Nilable = false }, + }, + }, + { + Name = "ReplaceLocalizedRaidMarkers", + Type = "Function", + + Arguments = + { + { Name = "txt", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "ReplacePlaceHolders", + Type = "Function", + + Arguments = + { + { Name = "textStr", Type = "any", Nilable = false }, + { Name = "region", Type = "any", Nilable = false }, + { Name = "customFunc", Type = "any", Nilable = false }, + { Name = "useHiddenStates", Type = "any", Nilable = false }, + { Name = "formatters", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = true }, + }, + }, + { + Name = "RestoreAuraEnvironment", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "RestoreFromHistory", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + }, + }, + { + Name = "Resume", + Type = "Function", + }, + { + Name = "ResumeAllDynamicGroups", + Type = "Function", + + Arguments = + { + { Name = "suspended", Type = "any", Nilable = false }, + }, + }, + { + Name = "RunConditions", + Type = "Function", + + Arguments = + { + { Name = "region", Type = "any", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "hideRegion", Type = "any", Nilable = false }, + }, + }, + { + Name = "RunTriggerFuncWithDelay", + Type = "Function", + + Arguments = + { + { Name = "delay", Type = "any", Nilable = false }, + { Name = "id", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + { Name = "data", Type = "any", Nilable = false }, + { Name = "event", Type = "any", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "SaveAuraEnvironment", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "ScanEventsWatchedTrigger", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "watchedTriggernums", Type = "any", Nilable = false }, + }, + }, + { + Name = "ScanForLoads", + Type = "Function", + + Arguments = + { + { Name = "toCheck", Type = "any", Nilable = false }, + { Name = "event", Type = "any", Nilable = false }, + { Name = "arg1", Type = "any", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "ScanForLoadsGroup", + Type = "Function", + + Arguments = + { + { Name = "toCheck", Type = "any", Nilable = false }, + }, + }, + { + Name = "SendDelayedWatchedTriggers", + Type = "Function", + }, + { + Name = "SerializeTable", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "SetAllStatesHidden", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "SetAllStatesHiddenExcept", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + { Name = "triggernum", Type = "any", Nilable = false }, + { Name = "list", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetFakeStates", + Type = "Function", + }, + { + Name = "SetHistory", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + { Name = "data", Type = "any", Nilable = false }, + { Name = "source", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "SetImporting", + Type = "Function", + + Arguments = + { + { Name = "b", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetMigrationSnapshot", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + { Name = "oldData", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetRegion", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "cloneId", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "SetTextureOrAtlas", + Type = "Function", + + Arguments = + { + { Name = "texture", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + { Name = "wrapModeH", Type = "any", Nilable = false }, + { Name = "wrapModeV", Type = "any", Nilable = false }, + }, + }, + { + Name = "ShowMouseoverTooltip", + Type = "Function", + + Arguments = + { + { Name = "region", Type = "any", Nilable = false }, + { Name = "owner", Type = "any", Nilable = false }, + }, + }, + { + Name = "SortOrderForValues", + Type = "Function", + + Arguments = + { + { Name = "values", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "SquelchingActions", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "StartProfileUID", + Type = "Function", + }, + { + Name = "StopProfileUID", + Type = "Function", + }, + { + Name = "SyncParentChildRelationships", + Type = "Function", + + Arguments = + { + { Name = "silent", Type = "any", Nilable = false }, + }, + }, + { + Name = "UnloadAllConditions", + Type = "Function", + }, + { + Name = "UnloadConditions", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + }, + }, + { + Name = "UnloadDisplays", + Type = "Function", + + Arguments = + { + { Name = "toUnload", Type = "any", Nilable = false }, + { Name = "undefined", Type = "unknown", Nilable = false }, + }, + }, + { + Name = "UnregisterAllEveryFrameUpdate", + Type = "Function", + }, + { + Name = "UnregisterEveryFrameUpdate", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "UnregisterForGlobalConditions", + Type = "Function", + + Arguments = + { + { Name = "uid", Type = "any", Nilable = false }, + }, + }, + { + Name = "UpdateCurrentInstanceType", + Type = "Function", + + Arguments = + { + { Name = "instanceType", Type = "any", Nilable = false }, + }, + }, + { + Name = "UpdateFakeStatesFor", + Type = "Function", + + Arguments = + { + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "UpdateSoundIcon", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + }, + }, + { + Name = "ValidateUniqueDataIds", + Type = "Function", + + Arguments = + { + { Name = "silent", Type = "any", Nilable = false }, + }, + }, + { + Name = "ValueFromPath", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = true }, + }, + }, + { + Name = "ValueToPath", + Type = "Function", + + Arguments = + { + { Name = "data", Type = "any", Nilable = false }, + { Name = "path", Type = "any", Nilable = false }, + { Name = "value", Type = "any", Nilable = false }, + }, + }, + { + Name = "checkForSingleLoadCondition", + Type = "Function", + + Arguments = + { + { Name = "trigger", Type = "table", Nilable = false }, + { Name = "name", Type = "string", Nilable = false }, + { Name = "validateFn", Type = "bool", Nilable = true }, + }, + + Returns = + { + { Name = "undefined", Type = "any", Nilable = false }, + }, + }, + { + Name = "ensurePRDFrame", + Type = "Function", + }, + { + Name = "getDefaultGlow", + Type = "Function", + + Arguments = + { + { Name = "regionType", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table", Nilable = false }, + }, + }, + { + Name = "get_encounters_list", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "get_encounters_list", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "get_encounters_list", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "get_encounters_list", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "get_zoneId_list", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "get_zoneId_list", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "get_zoneId_list", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "get_zoneId_list", + Type = "Function", + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "pauseOptionsProcessing", + Type = "Function", + + Arguments = + { + { Name = "enable", Type = "any", Nilable = false }, + }, + }, + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + { + Name = "ChangeId", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "id", Type = "any", Nilable = false }, + }, + }, + { + Name = "ChangeUID", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "newUid", Type = "any", Nilable = false }, + }, + }, + { + Name = "Contains", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "Dump", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + }, + { + Name = "EnsureUniqueIdOfUnmatched", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "IncProgress", Type = "any", Nilable = false }, + }, + }, + { + Name = "GetChildren", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetDiff", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "categories", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "table|nil", Nilable = true }, + }, + }, + { + Name = "GetGroupOrder", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "number", Nilable = true }, + { Name = "undefined", Type = "number", Nilable = true }, + }, + }, + { + Name = "GetGroupRegionType", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = ""aurabar"|"dynamicgroup"|"fallback"|"group"|"icon"...(+6)", Nilable = false }, + }, + }, + { + Name = "GetIdFor", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = true }, + }, + }, + { + Name = "GetOriginalName", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = true }, + }, + }, + { + Name = "GetParent", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = true }, + }, + }, + { + Name = "GetParentIsDynamicGroup", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = true }, + }, + }, + { + Name = "GetPhase1Data", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "withAppliedPath", Type = "any", Nilable = false }, + { Name = "activeCategories", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = true }, + }, + }, + { + Name = "GetPhase2Data", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "withAppliedPath", Type = "any", Nilable = false }, + { Name = "activeCategories", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "unknown", Nilable = true }, + }, + }, + { + Name = "GetRawChildren", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetRawData", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "auraData|nil", Nilable = true }, + }, + }, + { + Name = "GetRootUID", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = false }, + }, + }, + { + Name = "GetSortHybrid", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "GetTotalCount", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "number", Nilable = false }, + }, + }, + { + Name = "GetType", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = ""new"|"old"", Nilable = false }, + }, + }, + { + Name = "GetUIDMatch", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "string", Nilable = true }, + }, + }, + { + Name = "InsertData", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "data", Type = "any", Nilable = false }, + { Name = "parentUid", Type = "any", Nilable = false }, + { Name = "children", Type = "any", Nilable = false }, + { Name = "sortHybrid", Type = "any", Nilable = false }, + { Name = "index", Type = "any", Nilable = false }, + }, + }, + { + Name = "InsertUnmatchedFrom", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "otherUidMap", Type = "any", Nilable = false }, + { Name = "IncProgress", Type = "any", Nilable = false }, + }, + }, + { + Name = "InsertUnmatchedPhase1", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "otherUidMap", Type = "any", Nilable = false }, + { Name = "otherUid", Type = "any", Nilable = false }, + { Name = "IncProgress", Type = "any", Nilable = false }, + }, + + Returns = + { + { Name = "undefined", Type = "bool", Nilable = false }, + }, + }, + { + Name = "Remove", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetDiff", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "diff", Type = "any", Nilable = false }, + { Name = "categories", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetGroupOrder", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "index", Type = "any", Nilable = false }, + { Name = "total", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetParentIsDynamicGroup", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "parentIsDynamicGroup", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetRootParent", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "parentId", Type = "any", Nilable = false }, + }, + }, + { + Name = "SetUIDMatch", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + { Name = "matchedUid", Type = "any", Nilable = false }, + }, + }, + { + Name = "UnsetParent", + Type = "Function", + + Arguments = + { + { Name = "self", Type = "UidMap", Nilable = false }, + { Name = "uid", Type = "any", Nilable = false }, + }, + }, + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = { { Name = "AddCompanionData", @@ -1494,7 +4781,7 @@ local WeakAurasAPI = Arguments = { - { Name = "startType", Type = "string", Nilable = false }, + { Name = "startType", Type = "any", Nilable = false }, }, }, { @@ -1806,6 +5093,108 @@ local WeakAurasAPI = }, }, }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, + Functions = + { + }, Events = { From 6c9cf928157a00ae22376b20a84e7aafe41ce953 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 07:36:08 +0200 Subject: [PATCH 17/42] WIP2 split to two actions? --- .github/workflows/documentation-update.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 48724be634..131e9019c7 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -1,9 +1,11 @@ -name: Create Documentation Update Pull Request +name: Update Documentation on: - schedule: - - cron: "0 10 * * 1" - workflow_dispatch: + push: + branches: + - main + paths: + - WeakAurasOptions/WeakAurasAPI.lua jobs: atlasUpdate: @@ -11,6 +13,9 @@ jobs: steps: - name: Checkout WeakAuras uses: actions/checkout@v4 + with: + repository: WeakAuras/WeakAuras + path: WeakAuras - name: Checkout WeakAuras Wiki uses: actions/checkout@v4 From 95cdcd468c092a1ea9885cc02ec3ecd6e2fe27dd Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 21:21:27 +0200 Subject: [PATCH 18/42] Refactor action It should now update every pull request with updated type definition files --- .github/scripts/docs/parser.js | 2 +- .../docs/update-documentation-files.sh | 2 +- .github/workflows/documentation-update.yml | 46 +++++-------------- 3 files changed, 13 insertions(+), 37 deletions(-) diff --git a/.github/scripts/docs/parser.js b/.github/scripts/docs/parser.js index cc4041573b..d40f3007ae 100644 --- a/.github/scripts/docs/parser.js +++ b/.github/scripts/docs/parser.js @@ -37,7 +37,7 @@ function wowType(obj) { return obj.view; } -const data = fs.readFileSync('output.json', { encoding: 'utf8', flags: 'r' }); +const data = fs.readFileSync('doc.json', { encoding: 'utf8', flags: 'r' }); const obj = JSON.parse(data); for (const entry of obj) { if (entry.fields) { diff --git a/.github/scripts/docs/update-documentation-files.sh b/.github/scripts/docs/update-documentation-files.sh index e7359ff267..43593eee5c 100644 --- a/.github/scripts/docs/update-documentation-files.sh +++ b/.github/scripts/docs/update-documentation-files.sh @@ -2,6 +2,6 @@ lua-language-server --doc="../../.." --doc_out_path="." -jq '[.[] | select(.name | index("WeakAuras") != -1)]' doc.json > output.json +# jq '[.[] | select(.name | index("WeakAuras") != -1)]' doc.json > output.json node parser.js > ../../../WeakAurasOptions/WeakAurasAPI.lua diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 131e9019c7..faf0cae47d 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -1,56 +1,32 @@ -name: Update Documentation +name: Regenerate Type Definitions on: - push: - branches: - - main - paths: - - WeakAurasOptions/WeakAurasAPI.lua + pull_request jobs: atlasUpdate: runs-on: ubuntu-latest steps: - - name: Checkout WeakAuras - uses: actions/checkout@v4 - with: - repository: WeakAuras/WeakAuras - path: WeakAuras - - - name: Checkout WeakAuras Wiki - uses: actions/checkout@v4 - with: - repository: WeakAuras/WeakAuras.wiki - path: wiki + - name: Checkout PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr checkout ${{ github.event.pull_request.number }} - name: Install LuaLS run: | brew install lua-language-server - - name: Update Documentation Files + - name: Regenerate Type Definitions run: | cd .github/scripts/docs ./update-documentation-files.sh shell: bash - - name: Copy Documentation Files + - name: Push Changes to PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - cp -av .github/scripts/docs/docs.md wiki/API-Documentation.md - shell: bash - - - name: Update Wiki - run: | - cd wiki git config user.name "${{ github.actor }}" git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" - git commit -am "Update API Docs from ${GITHUB_SHA:0:7}" || true + git commit -am "Update generated types from ${GITHUB_SHA:0:7}" || true git push - - # - name: Create Pull Request - # uses: peter-evans/create-pull-request@v6 - # with: - # branch: update-docs - # commit-message: Update Documentation Files - # title: Update Documentation Files - # body: Update Documentation Files - # delete-branch: true From 81d21a5f6d1b2de6f548e80156484f6d8091bc7a Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 21:24:27 +0200 Subject: [PATCH 19/42] fix missing checkout --- .github/workflows/documentation-update.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index faf0cae47d..c61093ff26 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -4,9 +4,12 @@ on: pull_request jobs: - atlasUpdate: + typeDefinitionsUpdate: runs-on: ubuntu-latest steps: + - name: Checkout WeakAuras + uses: actions/checkout@v4 + - name: Checkout PR env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 92d545906df61ed59f42b3cc946cb76838962f79 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 21:26:32 +0200 Subject: [PATCH 20/42] Install homebrew in CI --- .github/workflows/documentation-update.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index c61093ff26..7eab5076ef 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -15,6 +15,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh pr checkout ${{ github.event.pull_request.number }} + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + - name: Install LuaLS run: | brew install lua-language-server From 01937d2622ed4d356e0387ca2e666187c5136310 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 21:29:49 +0200 Subject: [PATCH 21/42] Mark script executable --- .github/scripts/docs/update-documentation-files.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/docs/update-documentation-files.sh diff --git a/.github/scripts/docs/update-documentation-files.sh b/.github/scripts/docs/update-documentation-files.sh old mode 100644 new mode 100755 From af549efbf290ad4697cf1a04116dcc93379244c8 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 21:45:39 +0200 Subject: [PATCH 22/42] Try using pull_request_target --- .github/workflows/documentation-update.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 7eab5076ef..add59c361d 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -1,7 +1,7 @@ name: Regenerate Type Definitions on: - pull_request + pull_request_target jobs: typeDefinitionsUpdate: @@ -33,7 +33,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" git commit -am "Update generated types from ${GITHUB_SHA:0:7}" || true git push From 00b31bdec3f4ec32ee443efb3021b54daa472711 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 21:50:37 +0200 Subject: [PATCH 23/42] Trigger on both and set permissions --- .github/workflows/documentation-update.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index add59c361d..b2f235c06a 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -1,7 +1,11 @@ name: Regenerate Type Definitions on: - pull_request_target + [pull_request, pull_request_target] + +permissions: + contents: write + pull-requests: write jobs: typeDefinitionsUpdate: From a4a4c34869d72468459f18ee92b207389f938b5c Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 22:12:35 +0200 Subject: [PATCH 24/42] restore entry.name check --- .github/scripts/docs/parser.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/scripts/docs/parser.js b/.github/scripts/docs/parser.js index d40f3007ae..98b2521394 100644 --- a/.github/scripts/docs/parser.js +++ b/.github/scripts/docs/parser.js @@ -40,6 +40,7 @@ function wowType(obj) { const data = fs.readFileSync('doc.json', { encoding: 'utf8', flags: 'r' }); const obj = JSON.parse(data); for (const entry of obj) { + if (entry.name === "WeakAuras") { if (entry.fields) { console.log(` Functions =`); console.log(` {`); @@ -73,6 +74,7 @@ for (const entry of obj) { }; console.log(` },`); } + } } console.log( From fa42f066626564826c25639b35976ea8017ba470 Mon Sep 17 00:00:00 2001 From: Buds Date: Tue, 23 Apr 2024 22:17:19 +0200 Subject: [PATCH 25/42] tiny type changes --- WeakAuras/WeakAuras.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index d8051e9eea..e96b9c5450 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -82,6 +82,7 @@ WeakAuras.timer = timer local loginQueue = {} local queueshowooc +---@return integer version function WeakAuras.InternalVersion() return internalVersion; end @@ -151,6 +152,7 @@ function Private.LoadOptions(msg) return true; end +---@private function WeakAuras.OpenOptions(msg) if Private.NeedToRepairDatabase() then StaticPopup_Show("WEAKAURAS_CONFIRM_REPAIR", nil, nil, {reason = "downgrade"}) @@ -243,6 +245,7 @@ end if not WeakAuras.IsLibsOK() then return end +---@private function WeakAuras.ToggleMinimap() WeakAurasSaved.minimap.hide = not WeakAurasSaved.minimap.hide if WeakAurasSaved.minimap.hide then From 0a3dccb290717036cdd71a625e6839b1da712513 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 22:24:03 +0200 Subject: [PATCH 26/42] test with pat --- .github/workflows/documentation-update.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index b2f235c06a..f82b4d5d05 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout WeakAuras uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT_GITHUB }} - name: Checkout PR env: @@ -35,7 +37,7 @@ jobs: - name: Push Changes to PR env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" From 773283672923234a7b9e8c39f3af2dba6fb39967 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 23:16:50 +0200 Subject: [PATCH 27/42] add repo --- .github/workflows/documentation-update.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index f82b4d5d05..5081f6ee0b 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -14,11 +14,12 @@ jobs: - name: Checkout WeakAuras uses: actions/checkout@v4 with: + repository: 'WeakAuras/WeakAuras' token: ${{ secrets.PAT_GITHUB }} - name: Checkout PR env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} run: gh pr checkout ${{ github.event.pull_request.number }} - name: Set up Homebrew From 3b79d2e46b6fb79dc54d535eb9ffc08490b52f3c Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 23:26:03 +0200 Subject: [PATCH 28/42] env maybe? --- .github/workflows/documentation-update.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 5081f6ee0b..d8f9e06d6b 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -13,9 +13,8 @@ jobs: steps: - name: Checkout WeakAuras uses: actions/checkout@v4 - with: - repository: 'WeakAuras/WeakAuras' - token: ${{ secrets.PAT_GITHUB }} + env: + GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} - name: Checkout PR env: From d4fcd547ca231543e9ff9329449b329ff52cb5fb Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 23:28:50 +0200 Subject: [PATCH 29/42] pepega --- .github/workflows/documentation-update.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index d8f9e06d6b..f01516eacb 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -10,15 +10,15 @@ permissions: jobs: typeDefinitionsUpdate: runs-on: ubuntu-latest + + env: + GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} + steps: - name: Checkout WeakAuras uses: actions/checkout@v4 - env: - GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} - name: Checkout PR - env: - GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} run: gh pr checkout ${{ github.event.pull_request.number }} - name: Set up Homebrew @@ -36,8 +36,6 @@ jobs: shell: bash - name: Push Changes to PR - env: - GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" From 264f7847faaa20503de1dc090acc59741db4d87d Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 23:30:32 +0200 Subject: [PATCH 30/42] I cri --- .github/workflows/documentation-update.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index f01516eacb..4b8b08b94b 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -13,6 +13,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} + GH_TOKEN: ${{ secrets.PAT_GITHUB }} steps: - name: Checkout WeakAuras From 221c75c295dd8f08b1f9ab34faf812bdafb4b38b Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 23:33:41 +0200 Subject: [PATCH 31/42] whackamole --- .github/workflows/documentation-update.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 4b8b08b94b..0c321c9b09 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -10,16 +10,15 @@ permissions: jobs: typeDefinitionsUpdate: runs-on: ubuntu-latest - - env: - GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} - GH_TOKEN: ${{ secrets.PAT_GITHUB }} - steps: - name: Checkout WeakAuras uses: actions/checkout@v4 + env: + GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} - name: Checkout PR + env: + GH_TOKEN: ${{ secrets.PAT_GITHUB }} run: gh pr checkout ${{ github.event.pull_request.number }} - name: Set up Homebrew @@ -37,6 +36,8 @@ jobs: shell: bash - name: Push Changes to PR + env: + GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" From 2dc6f854d1916933872f669961af74f62704bb2e Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 23:34:59 +0200 Subject: [PATCH 32/42] do we actually need to check out the PR? --- .github/workflows/documentation-update.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 0c321c9b09..f1a8c67473 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -16,10 +16,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} - - name: Checkout PR - env: - GH_TOKEN: ${{ secrets.PAT_GITHUB }} - run: gh pr checkout ${{ github.event.pull_request.number }} + # - name: Checkout PR + # env: + # GH_TOKEN: ${{ secrets.PAT_GITHUB }} + # run: gh pr checkout ${{ github.event.pull_request.number }} - name: Set up Homebrew id: set-up-homebrew From 792a63ff25870ad9f03f196b98cc9c27c139fd9a Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 23:37:56 +0200 Subject: [PATCH 33/42] ok --- .github/workflows/documentation-update.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index f1a8c67473..13bb9e6cf7 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -13,6 +13,9 @@ jobs: steps: - name: Checkout WeakAuras uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} env: GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} From 608ac6df5d1a028e62bd5aa4a827a7f6f13ce4e8 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 23:46:06 +0200 Subject: [PATCH 34/42] test --- .github/workflows/documentation-update.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 13bb9e6cf7..4a38d8a811 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -16,6 +16,8 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} + persist-credentials: false + token: ${{ secrets.PAT_GITHUB }} env: GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} From ea7ac97f74bd68bce291bfdef2c2fae60d349836 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Tue, 23 Apr 2024 23:48:16 +0200 Subject: [PATCH 35/42] test --- .github/workflows/documentation-update.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 4a38d8a811..ff908f8512 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -3,9 +3,7 @@ name: Regenerate Type Definitions on: [pull_request, pull_request_target] -permissions: - contents: write - pull-requests: write +permissions: write-all jobs: typeDefinitionsUpdate: @@ -17,7 +15,6 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} persist-credentials: false - token: ${{ secrets.PAT_GITHUB }} env: GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} @@ -47,4 +44,5 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" git commit -am "Update generated types from ${GITHUB_SHA:0:7}" || true + git config --local --unset-all "http.https://github.com/.extraheader" git push From 482b8059e2c2702ede09e36b740c9d40da35f57b Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Wed, 24 Apr 2024 00:05:26 +0200 Subject: [PATCH 36/42] Make it so the action runs in main and commits after changes have been detected --- .github/workflows/documentation-update.yml | 30 ++++++++-------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index ff908f8512..430885f13b 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -1,27 +1,22 @@ name: Regenerate Type Definitions on: - [pull_request, pull_request_target] - -permissions: write-all + push: + branches: + - main + pull_request_target: jobs: typeDefinitionsUpdate: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout WeakAuras uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.ref }} + ref: ${{ github.head_ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - persist-credentials: false - env: - GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} - - # - name: Checkout PR - # env: - # GH_TOKEN: ${{ secrets.PAT_GITHUB }} - # run: gh pr checkout ${{ github.event.pull_request.number }} - name: Set up Homebrew id: set-up-homebrew @@ -38,11 +33,6 @@ jobs: shell: bash - name: Push Changes to PR - env: - GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" - git commit -am "Update generated types from ${GITHUB_SHA:0:7}" || true - git config --local --unset-all "http.https://github.com/.extraheader" - git push + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Update generated types from ${GITHUB_SHA:0:7}" From 43349c548a1720abce05e1b110f2c17fd4b13471 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Thu, 25 Apr 2024 02:36:44 +0200 Subject: [PATCH 37/42] WIP --- .github/scripts/docs/parser.js | 3 +- .../docs/update-documentation-files.sh | 4 +- .github/workflows/atlas-update.yml | 2 +- .github/workflows/documentation-update.yml | 5 +- .github/workflows/issues.yml | 2 +- .github/workflows/modelpaths-update.yml | 2 +- .github/workflows/release_notifications.yml | 4 +- .../release_notifications_manual_tests.yml | 123 - .../workflows/release_notifications_setup.md | 166 - .github/workflows/wiki-api-update.yml | 45 + .luarc.json | 3 +- WeakAuras/GenericTrigger.lua | 4 + WeakAurasOptions/WeakAurasAPI.lua | 3404 +---------------- 13 files changed, 63 insertions(+), 3704 deletions(-) delete mode 100644 .github/workflows/release_notifications_manual_tests.yml delete mode 100644 .github/workflows/release_notifications_setup.md create mode 100644 .github/workflows/wiki-api-update.yml diff --git a/.github/scripts/docs/parser.js b/.github/scripts/docs/parser.js index 98b2521394..65fe3a88a8 100644 --- a/.github/scripts/docs/parser.js +++ b/.github/scripts/docs/parser.js @@ -1,4 +1,5 @@ const fs = require('fs'); +const path = require('path'); console.log( `if not WeakAuras.IsLibsOK() then return end @@ -37,7 +38,7 @@ function wowType(obj) { return obj.view; } -const data = fs.readFileSync('doc.json', { encoding: 'utf8', flags: 'r' }); +const data = fs.readFileSync(path.join(__dirname, 'doc.json'), { encoding: 'utf8', flags: 'r' }); const obj = JSON.parse(data); for (const entry of obj) { if (entry.name === "WeakAuras") { diff --git a/.github/scripts/docs/update-documentation-files.sh b/.github/scripts/docs/update-documentation-files.sh index 43593eee5c..fd2f314684 100755 --- a/.github/scripts/docs/update-documentation-files.sh +++ b/.github/scripts/docs/update-documentation-files.sh @@ -1,7 +1,7 @@ #!/bin/bash -lua-language-server --doc="../../.." --doc_out_path="." +lua-language-server --doc="." --doc_out_path=".github/scripts/docs" # jq '[.[] | select(.name | index("WeakAuras") != -1)]' doc.json > output.json -node parser.js > ../../../WeakAurasOptions/WeakAurasAPI.lua +node .github/scripts/docs/parser.js > WeakAurasOptions/WeakAurasAPI.lua diff --git a/.github/workflows/atlas-update.yml b/.github/workflows/atlas-update.yml index 5a7de37264..04a47c8317 100644 --- a/.github/workflows/atlas-update.yml +++ b/.github/workflows/atlas-update.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: - atlasUpdate: + atlas-update: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 430885f13b..506b2c1769 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -7,7 +7,7 @@ on: pull_request_target: jobs: - typeDefinitionsUpdate: + type-definitions-update: runs-on: ubuntu-latest permissions: contents: write @@ -28,8 +28,7 @@ jobs: - name: Regenerate Type Definitions run: | - cd .github/scripts/docs - ./update-documentation-files.sh + ./.github/scripts/docs/update-documentation-files.sh shell: bash - name: Push Changes to PR diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index 9c43a3ef15..73b1d2d965 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -5,7 +5,7 @@ on: types: [opened, edited] jobs: - auto_close_issues: + auto-close-issues: runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/modelpaths-update.yml b/.github/workflows/modelpaths-update.yml index 6f80770238..4f1fa325dc 100644 --- a/.github/workflows/modelpaths-update.yml +++ b/.github/workflows/modelpaths-update.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: - modelPathsUpdate: + modelpaths-update: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release_notifications.yml b/.github/workflows/release_notifications.yml index 1cb4193432..86070b8666 100644 --- a/.github/workflows/release_notifications.yml +++ b/.github/workflows/release_notifications.yml @@ -1,9 +1,9 @@ name: Send Release Notifications +# See https://github.com/WeakAuras/WeakAuras2/wiki/%5BTEAM-INTERNAL%5D-Setting-up-Release-Notification-Hooks + on: workflow_dispatch: - release: - types: [published] jobs: release-notification-output: diff --git a/.github/workflows/release_notifications_manual_tests.yml b/.github/workflows/release_notifications_manual_tests.yml deleted file mode 100644 index 41669f33c9..0000000000 --- a/.github/workflows/release_notifications_manual_tests.yml +++ /dev/null @@ -1,123 +0,0 @@ -# description of this workflow, can be anything you want -name: Send TEST Release Notifications - -# 'workflow_dispatch' means it will only be manually triggerd via actions menu. -on: - workflow_dispatch: - -# a workflow is built up as jobs, and within these jobs are steps -jobs: - ## We seperate each item into different 'jobs'. The first job will get all the text that we need - ## the subsequent jobs will require the text from the first, and then send it to their approporate channels. - ## This allows us to reun-run specific social media sites seperately incase of errors. - - # "release-notification" is a job, you can name it anything you want - test-release-notification-output: - # we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet - runs-on: ubuntu-latest - - # output documentation: https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs - outputs: - changeLogText: ${{ steps.readChanglog.outputs.text }} - tweetText: ${{ steps.readTweet.outputs.text }} - - # "steps" holds a list of all the steps needed to package and release our AddOn - steps: - # we first have to clone the AddOn project, this is a required step - - name: Clone Project - uses: actions/checkout@v4 - with: - fetch-depth: 0 # gets git history for changelogs - - - name: Hack around https://github.com/actions/checkout/issues/290 - run: | - git fetch --tags --force - - # save the output of the changelog into a variable. - - name: save changelog in variable - uses: Stanzilla/cat@2.0.2 - id: readChanglog - with: - path: .github/scripts/test_files/large_changelog_example.md # use the custom large changelog - - # generate the text for twitter or other social media - - name: Generate Twitter Text - id: twitter_post - # pass in the large changelog into the twitter script. - run: /usr/bin/env python3 .github/scripts/generate_twitter_post.py -c .github/scripts/test_files/large_changelog_example.md - - # save the generated information into a variable. - - name: save twitter post to variable - uses: Stanzilla/cat@2.0.2 - id: readTweet - with: - path: twitter_post.txt - -############### DISCORD #################### - test-discord-release-notification: - # we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet - runs-on: ubuntu-latest - needs: test-release-notification-output - - # specify the environment variables used by the packager, matching the secrets from the project on GitHub - env: - MESSAGE: "TEST NOTIFICATION" - - # "steps" holds a list of all the steps needed to package and release our AddOn - steps: - # using Discord webhook to send release information - - name: Discord Release Webhook Action - uses: tsickert/discord-webhook@v6.0.0 - if: success() - with: - webhook-url: ${{ secrets.RELEASE_WEBHOOK_URL }} - embed-title: ${{ env.MESSAGE }} - embed-url: https://github.com/WeakAuras/WeakAuras2/releases/latest - embed-description: ${{needs.test-release-notification-output.outputs.changeLogText}} - -############### TWITTER #################### - test-twitter-release-notification: - # we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet - runs-on: ubuntu-latest - needs: test-release-notification-output - - # "steps" holds a list of all the steps needed to package and release our AddOn - steps: - - name: Twitter Notification - uses: nearform-actions/github-action-notify-twitter@master - with: - message: ${{needs.test-release-notification-output.outputs.tweetText}} - twitter-app-key: ${{ secrets.TWITTER_API_KEY }} - twitter-app-secret: ${{ secrets.TWITTER_API_KEY_SECRET }} - twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }} - twitter-access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} - -############### MASTODON #################### - test-mastodon-release-notification: - # we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet - runs-on: ubuntu-latest - needs: test-release-notification-output - - # "steps" holds a list of all the steps needed to package and release our AddOn - steps: - - name: Mastodon Notification - id: mastodon - uses: cbrgm/mastodon-github-action@v2.0.6 - with: - access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} # access token - url: ${{ secrets.MASTODON_URL }} # https://example.social - message: ${{needs.test-release-notification-output.outputs.tweetText}} - -############### BLUESKY #################### - test-bluesky-release-notification: - # we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet - runs-on: ubuntu-latest - needs: test-release-notification-output - - # "steps" holds a list of all the steps needed to package and release our AddOn - steps: - - uses: myConsciousness/bluesky-post@v5 - with: - text: ${{needs.test-release-notification-output.outputs.tweetText}} - identifier: ${{ secrets.BLUESKY_IDENTIFIER }} - password: ${{ secrets.BLUESKY_PASSWORD }} diff --git a/.github/workflows/release_notifications_setup.md b/.github/workflows/release_notifications_setup.md deleted file mode 100644 index bb473915b3..0000000000 --- a/.github/workflows/release_notifications_setup.md +++ /dev/null @@ -1,166 +0,0 @@ -# Setting up Release Notification Hooks - -## Requirements - -This folder contains a [release_notifications.yml](release_notifications.yml) file that contains workflows for GitHub actions to be able to post an automated message to various social media platforms when a released is published. - -For the most part, this file can work plug-and-play into any repo, you simply need to set up the various GitHub 'secrets' so that the workflow knows where to push the updates to. This page will highlight the required pieces for it to work as well as where to find the keys/tokens to use for your notifications. - -An important part of the yml is the following block: - -```yml -on: - workflow_dispatch: - release: - types: [published] -``` - -where `workflow_dispatch` will tell GitHub Actions that this job can be run manually, allowing you to run it at will, and the `release` portion saying when a GitHub Release is published. This is the part that will automatically run a release is made. - -For this workflow to work, you are required to have the [generate_changelog.sh](../../generate_changelog.sh) script to generate a change log based on the tags during the release process, as well as [generate_twitter_post.py](../scripts/generate_twitter_post.py) to generate a smaller version of the produced changelog to fit within a twitter post. - -With these scripts and [release_notifications.yml](release_notifications.yml) you can have automated messages sent to the various social media channels. - -There is also a [release_notifications_manual_tests.yml](release_notifications_manual_tests.yml) file that is set up in a similar way, but all the 'secrets' are pre-pended with `TEST_`. You can simply omit this file if you don't think you need it, but this allows you to manually run a separate set of tokens/urls to test out the output before you push to your main channels. To use this, follow the below steps, but add `TEST_` to the start of each secret, and that file will push to that instead. - -------- - -## Where to save your 'secrets' - -GitHub has pretty decent [documentation](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) for how the secrets work, but i will give a short explanation here. - -From your repo go to Settings -> Secrets and variables -> Actions: -![secrets and variables](https://i.imgur.com/IR9PDAG.png) - -From here you will see 'Repository secrets'. Here is where you will set up all your tokens and URLs to use for the release notifications. - -![secret examples](https://i.imgur.com/bGXW1uk.png) - -------- - -## API Keys / Tokens for the Notifications - -Each application needs their own set of tokens and urls to push to. - -### Discord - -For Discord, you simply need to set up a webhook to a channel. - -Pick a channel, and hit 'edit channel' -![edit channel](https://i.imgur.com/Gr9llZy.png) - -Integrations -> View Webhooks -![View Webhooks](https://i.imgur.com/hAY1nqt.png) - -Create a new webhook and copy the URL. - -Go to your GitHub secrets and save the URL as: `RELEASE_WEBHOOK_URL` - -### Twitter - -First sign into the Twitter developer portal with the account you want to post with: - -once you have an account set up you can go to the dashboard: - -For a free twitter developer account you can set up a single 'project', create one. -![project](https://i.imgur.com/Jlu4MId.png) - -Once you create the project it will ask you to make an 'app', which will give you API Keys afterwards. Don't worry about these, we are going to regenerate them anyway after the next step. -![app](https://i.imgur.com/3IUNUI3.png) - -Once you get your first set of keys/tokens, go to the 'App Settings'. You can get to it from the dashboard on the left side and clicking the name of your app. Towards the bottom, you want to click 'set up' for user authentication settings. -![app settings](https://i.imgur.com/z7AXpfj.png) - -From here you want to fill out the information the best you can, but the important parts are the two radio buttons at the top: -![radio buttons](https://i.imgur.com/CJPERMY.png) - -'Read and write' are required for your bot to post to Twitter. Set both 'Read and Write' as well as 'Bot' as Type of App, and fill out the rest of the form. The website and callback URL requires `https://` or `http://` at the start to be valid. This will give you a client ID and Client Secret, don't worry about this either, we will regenerate all at once to get everything we need. - -Now, we have everything set up to regenerate the keys and save them. Go back to the dashboard, click your app name and then 'Keys and Tokens' -![keys and tokens](https://i.imgur.com/UvWl0f9.png) - -From here you will see various tokens. You can 'Regenerate' your `API Key and Secret` and save it in a text file for now. You want both `API Key` and `API Key Secret`. - -Next, you want the `Access Token and Secret`. Hit 'Regenerate' and save both `Access Token` and `Access Token Secret`. - -**IMPORTANT:** After you save this information ENSURE that the you see `Created with Read and Write permissions` below it. If write permissions are not granted you will not be able to send messages. - -Finally, go to GitHub Actions Secrets and save the following information: - -```sh -TWITTER_ACCESS_TOKEN -TWITTER_ACCESS_TOKEN_SECRET -TWITTER_API_KEY -TWITTER_API_KEY_SECRET -``` - -### Mastodon - -For Mastodon you only need 2 easy to get items. For the URL you simply provide the URL of the network you're on. For example: - -For the access token you need to make a new application. Go to your Preferences -> Development - and create a new application -![app](https://i.imgur.com/3PW6ztz.png) - -From here you can customize the information you want to give it. -![info](https://i.imgur.com/XGCzmZB.png) - -Simply submit the application and open it up to see your access token -![submit](https://i.imgur.com/GAtF3uo.png) - -```sh -MASTODON_ACCESS_TOKEN -MASTODON_URL # https://mastodon.social -``` - -### Bluesky - -Bluesky only needs 2 items, the handle/identifier to post to (user name or email) and the 'app password'. - -To get the 'app password' go to your bluesky settings and click 'App Passwords' -![app password](https://i.imgur.com/kG8oywU.png) - -Generate a new app password with a unique name and it will generate a key for you to save. -![key](https://i.imgur.com/gn4x2B6.png) - -```sh -BLUESKY_IDENTIFIER # user name or email -BLUESKY_PASSWORD # 'app password' -``` - -------- - -## Running the Workflow - -If you want to test the notifications you can go to ACTIONS and check your workflows -![workflow](https://i.imgur.com/npbcEJ6.png) - -You can use `Send TEST Release Notification` to test it out. Remember, these will use the pre-pended `TEST_` secrets. This will also use a custom changelog found here:[large_changelog_example.md](../scripts/test_files/large_changelog_example.md). - -If for some reason something fails, it is set up in a way to be able to re-run specific notifications. As an example, in this image Mastodon failed. -![failed example](https://i.imgur.com/EXUTZCa.png) - -You can view the error and see if you can fix it with the secrets, if you did a copy/paste error and re-run only the mastodon job. - -When running a test, normally the changelog will not generate a 'highlights' section, which means the tweet will only include a URL to the latest tag. If the tag is the newest commit, it should work normally. - -When you publish a new release with a new tag it will also automatically run, and you can re-run failed jobs as well. - -------- - -## Example Screenshots with TEST Release Info - -Discord - -![example discord](https://i.imgur.com/wWFurie.png) - -Twitter - -![example twitter](https://i.imgur.com/EdTWSCo.png) - -Mastodon - -![example mastodon](https://i.imgur.com/WBPSjye.png) - -Bluesky - -![example bluesky](https://i.imgur.com/nFgWJ7O.png) diff --git a/.github/workflows/wiki-api-update.yml b/.github/workflows/wiki-api-update.yml new file mode 100644 index 0000000000..3ad065b1ab --- /dev/null +++ b/.github/workflows/wiki-api-update.yml @@ -0,0 +1,45 @@ +name: Update Wiki Documentation + +on: + push: + branches: + - main + paths: + - WeakAurasOptions/WeakAurasAPI.lua + +jobs: + update-wiki-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout WeakAuras + uses: actions/checkout@v4 + with: + path: WeakAuras + + - name: Checkout WeakAuras Wiki + uses: actions/checkout@v4 + with: + repository: WeakAuras/WeakAuras2.wiki + path: wiki + + - name: Install LuaLS + run: | + brew install lua-language-server + + - name: Update Documentation Files + run: | + ./.github/scripts/docs/update-documentation-files.sh + shell: bash + + - name: Copy Documentation Files + run: | + mv .github/scripts/docs/docs.md wiki/API-Documentation.md + shell: bash + + - name: Update Wiki + run: | + cd wiki + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" + git commit -am "Update API Docs from ${GITHUB_SHA:0:7}" || true + git push diff --git a/.luarc.json b/.luarc.json index e7d984b598..1d19b3b553 100644 --- a/.luarc.json +++ b/.luarc.json @@ -238,7 +238,8 @@ "CreateScrollBoxListLinearView", "CreateDataProvider", "UIMenuButtonStretchMixin", - "ToggleDropDownMenu" + "ToggleDropDownMenu", + "APIDocumentation" ], "runtime.version": "Lua 5.1", "workspace.ignoreDir": [ diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index aade4e50fc..3f10dd03e1 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -3019,11 +3019,14 @@ do -- TODO: In 10.2.6 the apis return values changed from 1,0 for enabled to true, false -- We should adjust once its on all versions if enabled == false then + ---@diagnostic disable-next-line: cast-local-type enabled = 0 elseif enabled == true then + ---@diagnostic disable-next-line: cast-local-type enabled = 1 end if (duration == 0) then + ---@diagnostic disable-next-line: cast-local-type enabled = 1; end if (enabled == 0) then @@ -3262,6 +3265,7 @@ do -- We should adjust once its on all versions local startTime, duration, enabled = GetItemCooldown(id); if (duration == 0) then + ---@diagnostic disable-next-line: cast-local-type enabled = 1; end if (enabled == 0) then diff --git a/WeakAurasOptions/WeakAurasAPI.lua b/WeakAurasOptions/WeakAurasAPI.lua index b650ba21ae..7b6769537d 100644 --- a/WeakAurasOptions/WeakAurasAPI.lua +++ b/WeakAurasOptions/WeakAurasAPI.lua @@ -10,3293 +10,6 @@ local WeakAurasAPI = Type = "System", Namespace = "WeakAuras", Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - { - Name = "CleanUpLines", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "AlignmentLines", Nilable = false }, - }, - }, - { - Name = "CreateLineInformation", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "AlignmentLines", Nilable = false }, - { Name = "data", Type = "auraData", Nilable = false }, - { Name = "sizerPoint", Type = "AnchorPoint", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "LineInformation", Nilable = false }, - { Name = "undefined", Type = "LineInformation", Nilable = false }, - }, - }, - { - Name = "CreateLines", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "AlignmentLines", Nilable = false }, - { Name = "data", Type = "auraData", Nilable = false }, - { Name = "sizerPoint", Type = "AnchorPoint?", Nilable = true }, - }, - }, - { - Name = "CreateMiddleLines", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "AlignmentLines", Nilable = false }, - { Name = "sizerPoint", Type = "AnchorPoint?", Nilable = true }, - }, - }, - { - Name = "MergeLineInformation", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "AlignmentLines", Nilable = false }, - { Name = "lines", Type = "LineInformation", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "LineInformation", Nilable = false }, - }, - }, - { - Name = "ShowLinesFor", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "AlignmentLines", Nilable = false }, - { Name = "ctrlKey", Type = "any", Nilable = false }, - { Name = "region", Type = "any", Nilable = false }, - { Name = "sizePoint", Type = "any", Nilable = false }, - }, - }, - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - { - Name = "GetAllWarnings", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - { - Name = "AuraCanFunction", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - { Name = "data", Type = "auraData", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "Disable", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - { Name = "id", Type = "string", Nilable = false }, - }, - }, - { - Name = "Enable", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - { Name = "id", Type = "string", Nilable = false }, - }, - }, - { - Name = "Enabled", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - { Name = "id", Type = "string", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "Exists", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - { Name = "id", Type = "string", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "Hydrate", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - }, - }, - { - Name = "ListFeatures", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "Register", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - { Name = "feature", Type = "feature", Nilable = false }, - }, - }, - { - Name = "Subscribe", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - { Name = "id", Type = "string", Nilable = false }, - { Name = "enable", Type = "function", Nilable = false }, - { Name = "disable", Type = "function", Nilable = false }, - }, - }, - { - Name = "Wrap", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Features", Nilable = false }, - { Name = "id", Type = "string", Nilable = false }, - { Name = "enabledFunc", Type = "function", Nilable = false }, - { Name = "disabledFunc", Type = "function?", Nilable = true }, - }, - - Returns = - { - { Name = "undefined", Type = "function", Nilable = false }, - }, - }, - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - { - Name = "AddDisplayButton", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "AddTextFormatOption", - Type = "Function", - - Arguments = - { - { Name = "input", Type = "any", Nilable = false }, - { Name = "withHeader", Type = "any", Nilable = false }, - { Name = "get", Type = "any", Nilable = false }, - { Name = "addOption", Type = "any", Nilable = false }, - { Name = "hidden", Type = "any", Nilable = false }, - { Name = "setHidden", Type = "any", Nilable = false }, - { Name = "withoutColor", Type = "any", Nilable = false }, - { Name = "index", Type = "any", Nilable = false }, - { Name = "total", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "AddTriggerMetaFunctions", - Type = "Function", - - Arguments = - { - { Name = "options", Type = "any", Nilable = false }, - { Name = "data", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - }, - }, - { - Name = "AddUpDownDeleteDuplicate", - Type = "Function", - - Arguments = - { - { Name = "options", Type = "any", Nilable = false }, - { Name = "parentData", Type = "any", Nilable = false }, - { Name = "index", Type = "any", Nilable = false }, - { Name = "subRegionType", Type = "any", Nilable = false }, - }, - }, - { - Name = "ClearOptions", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "ClearPick", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "ClearPicks", - Type = "Function", - }, - { - Name = "ClearTriggerExpandState", - Type = "Function", - }, - { - Name = "CodeReview", - Type = "Function", - - Arguments = - { - { Name = "frame", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "ConfirmDelete", - Type = "Function", - - Arguments = - { - { Name = "toDelete", Type = "any", Nilable = false }, - { Name = "parents", Type = "any", Nilable = false }, - }, - }, - { - Name = "ConstructOptions", - Type = "Function", - - Arguments = - { - { Name = "prototype", Type = "any", Nilable = false }, - { Name = "data", Type = "any", Nilable = false }, - { Name = "startorder", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - { Name = "triggertype", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "ConvertDisplay", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "newType", Type = "any", Nilable = false }, - }, - }, - { - Name = "CreateFrame", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "DebugLog", - Type = "Function", - - Arguments = - { - { Name = "frame", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "DeleteAuras", - Type = "Function", - - Arguments = - { - { Name = "auras", Type = "any", Nilable = false }, - { Name = "parents", Type = "any", Nilable = false }, - }, - }, - { - Name = "DeleteSubRegion", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "index", Type = "any", Nilable = false }, - { Name = "regionType", Type = "any", Nilable = false }, - }, - }, - { - Name = "DragReset", - Type = "Function", - }, - { - Name = "Drop", - Type = "Function", - - Arguments = - { - { Name = "mainAura", Type = "any", Nilable = false }, - { Name = "target", Type = "any", Nilable = false }, - { Name = "action", Type = "any", Nilable = false }, - { Name = "area", Type = "any", Nilable = false }, - }, - }, - { - Name = "DropIndicator", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "DuplicateAura", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "newParent", Type = "any", Nilable = false }, - { Name = "massEdit", Type = "any", Nilable = false }, - { Name = "targetIndex", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "DuplicateCollapseData", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "namespace", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - }, - }, - { - Name = "DuplicateSubRegion", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "index", Type = "any", Nilable = false }, - { Name = "regionType", Type = "any", Nilable = false }, - }, - }, - { - Name = "EnsureOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "subOption", Type = "any", Nilable = false }, - }, - }, - { - Name = "ExportToString", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "ExportToTable", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "GetActionOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetAnimationOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetAuthorOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetConditionOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetDisplayButton", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "GetDisplayOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetFlipbookTileSize", - Type = "Function", - - Arguments = - { - { Name = "name", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetGroupOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetInformationOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "auraData", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetLoadOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetPickedDisplay", - Type = "Function", - }, - { - Name = "GetTriggerOptions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetTriggerTitle", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "HasWagoUrl", - Type = "Function", - - Arguments = - { - { Name = "auraId", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "IconPicker", - Type = "Function", - - Arguments = - { - { Name = "frame", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "ImportExport", - Type = "Function", - - Arguments = - { - { Name = "frame", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "ImportFromString", - Type = "Function", - }, - { - Name = "InsertCollapsed", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "namespace", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - { Name = "value", Type = "any", Nilable = false }, - }, - }, - { - Name = "IsCollapsed", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "namespace", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - { Name = "default", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "IsDisplayPicked", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "IsPickedMultiple", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "IsWagoUpdateIgnored", - Type = "Function", - - Arguments = - { - { Name = "auraId", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "LoadDocumentation", - Type = "Function", - }, - { - Name = "ModelPicker", - Type = "Function", - - Arguments = - { - { Name = "frame", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "MoveCollapseDataDown", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "namespace", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - }, - }, - { - Name = "MoveCollapseDataUp", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "namespace", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - }, - }, - { - Name = "MoveSubRegionDown", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "index", Type = "any", Nilable = false }, - { Name = "regionType", Type = "any", Nilable = false }, - }, - }, - { - Name = "MoveSubRegionUp", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "index", Type = "any", Nilable = false }, - { Name = "regionType", Type = "any", Nilable = false }, - }, - }, - { - Name = "MoverSizer", - Type = "Function", - - Arguments = - { - { Name = "parent", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "MultipleDisplayTooltipDesc", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "MultipleDisplayTooltipMenu", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "OpenCodeReview", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "OpenDebugLog", - Type = "Function", - - Arguments = - { - { Name = "text", Type = "any", Nilable = false }, - }, - }, - { - Name = "OpenIconPicker", - Type = "Function", - - Arguments = - { - { Name = "baseObject", Type = "any", Nilable = false }, - { Name = "paths", Type = "any", Nilable = false }, - { Name = "groupIcon", Type = "any", Nilable = false }, - }, - }, - { - Name = "OpenModelPicker", - Type = "Function", - - Arguments = - { - { Name = "baseObject", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - }, - }, - { - Name = "OpenTextEditor", - Type = "Function", - - Arguments = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "OpenTexturePicker", - Type = "Function", - - Arguments = - { - { Name = "baseObject", Type = "any", Nilable = false }, - { Name = "paths", Type = "any", Nilable = false }, - { Name = "properties", Type = "any", Nilable = false }, - { Name = "textures", Type = "any", Nilable = false }, - { Name = "SetTextureFunc", Type = "any", Nilable = false }, - { Name = "adjustSize", Type = "any", Nilable = false }, - }, - }, - { - Name = "OpenTriggerTemplate", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "targetId", Type = "any", Nilable = false }, - }, - }, - { - Name = "OpenUpdate", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "children", Type = "any", Nilable = false }, - { Name = "target", Type = "any", Nilable = false }, - { Name = "linkedAuras", Type = "any", Nilable = false }, - { Name = "sender", Type = "any", Nilable = false }, - { Name = "callbackFunc", Type = "any", Nilable = false }, - }, - }, - { - Name = "PickAndEditDisplay", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "PickDisplayMultiple", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "PickDisplayMultipleShift", - Type = "Function", - - Arguments = - { - { Name = "target", Type = "any", Nilable = false }, - }, - }, - { - Name = "RemoveCollapsed", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "namespace", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - }, - }, - { - Name = "ResetCollapsed", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "namespace", Type = "any", Nilable = false }, - }, - }, - { - Name = "ResetMoverSizer", - Type = "Function", - }, - { - Name = "SetCollapsed", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "namespace", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - { Name = "v", Type = "any", Nilable = false }, - }, - }, - { - Name = "SetTitle", - Type = "Function", - - Arguments = - { - { Name = "title", Type = "any", Nilable = false }, - }, - }, - { - Name = "SortDisplayButtons", - Type = "Function", - - Arguments = - { - { Name = "filter", Type = "any", Nilable = false }, - { Name = "overrideReset", Type = "any", Nilable = false }, - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "StartDrag", - Type = "Function", - - Arguments = - { - { Name = "mainAura", Type = "any", Nilable = false }, - }, - }, - { - Name = "StartFrameChooser", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - }, - }, - { - Name = "StartGrouping", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "StopFrameChooser", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "StopGrouping", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "TextEditor", - Type = "Function", - - Arguments = - { - { Name = "frame", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "TexturePicker", - Type = "Function", - - Arguments = - { - { Name = "frame", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "Ungroup", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "UpdateButtonsScroll", - Type = "Function", - }, - { - Name = "UpdateFrame", - Type = "Function", - - Arguments = - { - { Name = "frame", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "GroupUpdateFrame", Nilable = false }, - }, - }, - { - Name = "UpdateOptions", - Type = "Function", - }, - }, - Functions = - { - }, - Functions = - { - { - Name = "ActivateEvent", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - { Name = "data", Type = "any", Nilable = false }, - { Name = "state", Type = "any", Nilable = false }, - { Name = "errorHandler", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "state", Nilable = false }, - }, - }, - { - Name = "ActiveTrigger", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "AddMany", - Type = "Function", - - Arguments = - { - { Name = "tbl", Type = "auraData[]", Nilable = false }, - { Name = "takeSnapshots", Type = "bool", Nilable = false }, - }, - }, - { - Name = "AddParents", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "AddProgressSourceMetaData", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "progressSource", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table|nil", Nilable = true }, - }, - }, - { - Name = "AnchorFrame", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "region", Type = "any", Nilable = false }, - { Name = "parent", Type = "any", Nilable = false }, - { Name = "force", Type = "any", Nilable = false }, - }, - }, - { - Name = "Animate", - Type = "Function", - - Arguments = - { - { Name = "namespace", Type = "any", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "type", Type = "any", Nilable = false }, - { Name = "anim", Type = "any", Nilable = false }, - { Name = "region", Type = "any", Nilable = false }, - { Name = "inverse", Type = "any", Nilable = false }, - { Name = "onFinished", Type = "any", Nilable = false }, - { Name = "loop", Type = "any", Nilable = false }, - { Name = "cloneId", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "AnyEveryFrameFormatters", - Type = "Function", - - Arguments = - { - { Name = "textStr", Type = "any", Nilable = false }, - { Name = "everyFrameFormatters", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "ApplyFrameLevel", - Type = "Function", - - Arguments = - { - { Name = "region", Type = "any", Nilable = false }, - { Name = "frameLevel", Type = "any", Nilable = false }, - }, - }, - { - Name = "CanConvertBuffTrigger2", - Type = "Function", - - Arguments = - { - { Name = "trigger", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = true }, - }, - }, - { - Name = "CancelAllDelayedTriggers", - Type = "Function", - }, - { - Name = "CancelAnimation", - Type = "Function", - - Arguments = - { - { Name = "region", Type = "any", Nilable = false }, - { Name = "resetPos", Type = "any", Nilable = false }, - { Name = "resetAlpha", Type = "any", Nilable = false }, - { Name = "resetScale", Type = "any", Nilable = false }, - { Name = "resetRotation", Type = "any", Nilable = false }, - { Name = "resetColor", Type = "any", Nilable = false }, - { Name = "doOnFinished", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "CancelDelayedTrigger", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "CheckCooldownReady", - Type = "Function", - }, - { - Name = "CheckItemCooldowns", - Type = "Function", - }, - { - Name = "CheckItemSlotCooldowns", - Type = "Function", - }, - { - Name = "CheckRuneCooldown", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "number", Nilable = false }, - }, - }, - { - Name = "CheckSpellCooldown", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "runeDuration", Type = "any", Nilable = false }, - }, - }, - { - Name = "CheckSpellCooldows", - Type = "Function", - - Arguments = - { - { Name = "runeDuration", Type = "any", Nilable = false }, - }, - }, - { - Name = "CheckSpellKnown", - Type = "Function", - }, - { - Name = "CleanArchive", - Type = "Function", - - Arguments = - { - { Name = "historyCutoff", Type = "any", Nilable = false }, - { Name = "migrationCutoff", Type = "any", Nilable = false }, - }, - }, - { - Name = "ClearAuraEnvironment", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "ClearAuraEnvironmentSavedData", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "ClearFakeStates", - Type = "Function", - }, - { - Name = "CollapseAllClones", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - }, - }, - { - Name = "Convert", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "newType", Type = "any", Nilable = false }, - }, - }, - { - Name = "ConvertBuffTrigger2", - Type = "Function", - - Arguments = - { - { Name = "trigger", Type = "any", Nilable = false }, - }, - }, - { - Name = "CountWagoUpdates", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "number", Nilable = false }, - }, - }, - { - Name = "CreateFormatters", - Type = "Function", - - Arguments = - { - { Name = "input", Type = "any", Nilable = false }, - { Name = "getter", Type = "any", Nilable = false }, - { Name = "withoutColor", Type = "any", Nilable = false }, - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "CreatingRegions", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "DataToString", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, - }, - }, - { - Name = "DeleteAuraEnvironment", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "DisplayToString", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "forChat", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "EnforceSubregionExists", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "subregionType", Type = "any", Nilable = false }, - }, - }, - { - Name = "EveryFrameUpdateRename", - Type = "Function", - - Arguments = - { - { Name = "oldid", Type = "any", Nilable = false }, - { Name = "newid", Type = "any", Nilable = false }, - }, - }, - { - Name = "ExpandCurrencyList", - Type = "Function", - - Arguments = - { - { Name = "index", Type = "number", Nilable = false }, - { Name = "expand", Type = "bool", Nilable = false }, - }, - }, - { - Name = "ExpandCustomVariables", - Type = "Function", - - Arguments = - { - { Name = "variables", Type = "table", Nilable = false }, - }, - }, - { - Name = "FakeStatesFor", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "visible", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "FinishLoadUnload", - Type = "Function", - }, - { - Name = "GetAdditionalProperties", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "GetAnchorsForData", - Type = "Function", - - Arguments = - { - { Name = "parentData", Type = "any", Nilable = false }, - { Name = "type", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table|unknown|nil", Nilable = true }, - }, - }, - { - Name = "GetCurrencyIDFromLink", - Type = "Function", - - Arguments = - { - { Name = "currencyLink", Type = "string", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "number", Nilable = false }, - }, - }, - { - Name = "GetCurrencyInfoForTrigger", - Type = "Function", - - Arguments = - { - { Name = "trigger", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "CurrencyInfo|nil", Nilable = true }, - }, - }, - { - Name = "GetCurrencyListInfo", - Type = "Function", - - Arguments = - { - { Name = "index", Type = "number", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetDiscoveredCurrencies", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "GetDiscoveredCurrenciesHeaders", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "GetDiscoveredCurrenciesSorted", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "number", Nilable = false }, - }, - }, - { - Name = "GetGlobalConditionState", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetGlobalConditions", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetMigrationSnapshot", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - }, - }, - { - Name = "GetOverlayInfo", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = true }, - }, - }, - { - Name = "GetProgressSourceFor", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "trigger", Type = "any", Nilable = false }, - { Name = "property", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table|nil", Nilable = true }, - }, - }, - { - Name = "GetProgressSources", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetProgressSourcesForUi", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "subelement", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetProgressValueConstant", - Type = "Function", - - Arguments = - { - { Name = "v", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "GetProperties", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetReputations", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "GetReputationsHeaders", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "GetReputationsSorted", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "number", Nilable = false }, - }, - }, - { - Name = "GetSanitizedGlobal", - Type = "Function", - - Arguments = - { - { Name = "key", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "GetSetId", - Type = "Function", - - Arguments = - { - { Name = "itemId", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "GetSubRegionProperties", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "properties", Type = "any", Nilable = false }, - }, - }, - { - Name = "GetTalentData", - Type = "Function", - - Arguments = - { - { Name = "specId", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table|nil", Nilable = true }, - }, - }, - { - Name = "GetTalentInfo", - Type = "Function", - - Arguments = - { - { Name = "specId", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetTriggerConditions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "GetTsuConditionVariablesExpanded", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = true }, - }, - }, - { - Name = "HandleChatAction", - Type = "Function", - - Arguments = - { - { Name = "message_type", Type = "any", Nilable = false }, - { Name = "message", Type = "any", Nilable = false }, - { Name = "message_dest", Type = "any", Nilable = false }, - { Name = "message_dest_isunit", Type = "any", Nilable = false }, - { Name = "message_channel", Type = "any", Nilable = false }, - { Name = "r", Type = "any", Nilable = false }, - { Name = "g", Type = "any", Nilable = false }, - { Name = "b", Type = "any", Nilable = false }, - { Name = "region", Type = "any", Nilable = false }, - { Name = "customFunc", Type = "any", Nilable = false }, - { Name = "when", Type = "any", Nilable = false }, - { Name = "formatters", Type = "any", Nilable = false }, - { Name = "voice", Type = "any", Nilable = false }, - }, - }, - { - Name = "HandleGlowAction", - Type = "Function", - - Arguments = - { - { Name = "actions", Type = "any", Nilable = false }, - { Name = "region", Type = "any", Nilable = false }, - }, - }, - { - Name = "HideTooltip", - Type = "Function", - }, - { - Name = "IconSources", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "InitCooldownReady", - Type = "Function", - }, - { - Name = "InitializeEncounterAndZoneLists", - Type = "Function", - }, - { - Name = "InitializeEncounterAndZoneLists", - Type = "Function", - }, - { - Name = "InitializeEncounterAndZoneLists", - Type = "Function", - }, - { - Name = "InitializeEncounterAndZoneLists", - Type = "Function", - }, - { - Name = "IsAuraActive", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "IsEnvironmentInitialized", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "IsOptionsProcessingPaused", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "LoadConditionFunction", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "LoadConditionPropertyFunctions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "LoadDisplays", - Type = "Function", - - Arguments = - { - { Name = "toLoad", Type = "any", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "Login", - Type = "Function", - - Arguments = - { - { Name = "initialTime", Type = "any", Nilable = false }, - { Name = "takeNewSnapshots", Type = "any", Nilable = false }, - }, - }, - { - Name = "LoginMessage", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "ModelSetTransformFixed", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "Private", Nilable = false }, - { Name = "tx", Type = "any", Nilable = false }, - { Name = "ty", Type = "any", Nilable = false }, - { Name = "tz", Type = "any", Nilable = false }, - { Name = "rx", Type = "any", Nilable = false }, - { Name = "ry", Type = "any", Nilable = false }, - { Name = "rz", Type = "any", Nilable = false }, - { Name = "s", Type = "any", Nilable = false }, - }, - }, - { - Name = "Modernize", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "auraData", Nilable = false }, - }, - }, - { - Name = "NeedToRepairDatabase", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "ParseTextStr", - Type = "Function", - - Arguments = - { - { Name = "textStr", Type = "any", Nilable = false }, - { Name = "symbolCallback", Type = "any", Nilable = false }, - }, - }, - { - Name = "ParseTooltipText", - Type = "Function", - - Arguments = - { - { Name = "tooltipText", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - { Name = "undefined", Type = "string", Nilable = false }, - { Name = "undefined", Type = "number", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - { Name = "undefined", Type = "unknown", Nilable = true }, - }, - }, - { - Name = "Pause", - Type = "Function", - }, - { - Name = "PauseAllDynamicGroups", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "PerformActions", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "when", Type = "any", Nilable = false }, - { Name = "region", Type = "any", Nilable = false }, - }, - }, - { - Name = "PostAddCompanion", - Type = "Function", - }, - { - Name = "ProfileRenameAura", - Type = "Function", - - Arguments = - { - { Name = "oldid", Type = "any", Nilable = false }, - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "RegisterEveryFrameUpdate", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "RegisterForGlobalConditions", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - }, - }, - { - Name = "RegisterGroupForPositioning", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - { Name = "region", Type = "any", Nilable = false }, - }, - }, - { - Name = "RegisterLoadEvents", - Type = "Function", - }, - { - Name = "RegisterRegionOptions", - Type = "Function", - - Arguments = - { - { Name = "_", Type = "string", Nilable = false }, - { Name = "_", Type = "function", Nilable = false }, - { Name = "_", Type = "string", Nilable = false }, - { Name = "_", Type = "string", Nilable = false }, - }, - }, - { - Name = "RegisterRegionOptions", - Type = "Function", - - Arguments = - { - { Name = "name", Type = "any", Nilable = false }, - { Name = "createFunction", Type = "any", Nilable = false }, - { Name = "icon", Type = "any", Nilable = false }, - { Name = "displayName", Type = "any", Nilable = false }, - { Name = "createThumbnail", Type = "any", Nilable = false }, - { Name = "modifyThumbnail", Type = "any", Nilable = false }, - { Name = "description", Type = "any", Nilable = false }, - { Name = "templates", Type = "any", Nilable = false }, - { Name = "getAnchors", Type = "any", Nilable = false }, - }, - }, - { - Name = "ReleaseClone", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "cloneId", Type = "any", Nilable = false }, - { Name = "regionType", Type = "any", Nilable = false }, - }, - }, - { - Name = "RemoveHistory", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - }, - }, - { - Name = "RenameAuraEnvironment", - Type = "Function", - - Arguments = - { - { Name = "oldid", Type = "any", Nilable = false }, - { Name = "newid", Type = "any", Nilable = false }, - }, - }, - { - Name = "ReplaceLocalizedRaidMarkers", - Type = "Function", - - Arguments = - { - { Name = "txt", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "ReplacePlaceHolders", - Type = "Function", - - Arguments = - { - { Name = "textStr", Type = "any", Nilable = false }, - { Name = "region", Type = "any", Nilable = false }, - { Name = "customFunc", Type = "any", Nilable = false }, - { Name = "useHiddenStates", Type = "any", Nilable = false }, - { Name = "formatters", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = true }, - }, - }, - { - Name = "RestoreAuraEnvironment", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "RestoreFromHistory", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - }, - }, - { - Name = "Resume", - Type = "Function", - }, - { - Name = "ResumeAllDynamicGroups", - Type = "Function", - - Arguments = - { - { Name = "suspended", Type = "any", Nilable = false }, - }, - }, - { - Name = "RunConditions", - Type = "Function", - - Arguments = - { - { Name = "region", Type = "any", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "hideRegion", Type = "any", Nilable = false }, - }, - }, - { - Name = "RunTriggerFuncWithDelay", - Type = "Function", - - Arguments = - { - { Name = "delay", Type = "any", Nilable = false }, - { Name = "id", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - { Name = "data", Type = "any", Nilable = false }, - { Name = "event", Type = "any", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "SaveAuraEnvironment", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "ScanEventsWatchedTrigger", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "watchedTriggernums", Type = "any", Nilable = false }, - }, - }, - { - Name = "ScanForLoads", - Type = "Function", - - Arguments = - { - { Name = "toCheck", Type = "any", Nilable = false }, - { Name = "event", Type = "any", Nilable = false }, - { Name = "arg1", Type = "any", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "ScanForLoadsGroup", - Type = "Function", - - Arguments = - { - { Name = "toCheck", Type = "any", Nilable = false }, - }, - }, - { - Name = "SendDelayedWatchedTriggers", - Type = "Function", - }, - { - Name = "SerializeTable", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "SetAllStatesHidden", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "SetAllStatesHiddenExcept", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "triggernum", Type = "any", Nilable = false }, - { Name = "list", Type = "any", Nilable = false }, - }, - }, - { - Name = "SetFakeStates", - Type = "Function", - }, - { - Name = "SetHistory", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - { Name = "data", Type = "any", Nilable = false }, - { Name = "source", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "SetImporting", - Type = "Function", - - Arguments = - { - { Name = "b", Type = "any", Nilable = false }, - }, - }, - { - Name = "SetMigrationSnapshot", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - { Name = "oldData", Type = "any", Nilable = false }, - }, - }, - { - Name = "SetRegion", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "cloneId", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "SetTextureOrAtlas", - Type = "Function", - - Arguments = - { - { Name = "texture", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - { Name = "wrapModeH", Type = "any", Nilable = false }, - { Name = "wrapModeV", Type = "any", Nilable = false }, - }, - }, - { - Name = "ShowMouseoverTooltip", - Type = "Function", - - Arguments = - { - { Name = "region", Type = "any", Nilable = false }, - { Name = "owner", Type = "any", Nilable = false }, - }, - }, - { - Name = "SortOrderForValues", - Type = "Function", - - Arguments = - { - { Name = "values", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "SquelchingActions", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "StartProfileUID", - Type = "Function", - }, - { - Name = "StopProfileUID", - Type = "Function", - }, - { - Name = "SyncParentChildRelationships", - Type = "Function", - - Arguments = - { - { Name = "silent", Type = "any", Nilable = false }, - }, - }, - { - Name = "UnloadAllConditions", - Type = "Function", - }, - { - Name = "UnloadConditions", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - }, - }, - { - Name = "UnloadDisplays", - Type = "Function", - - Arguments = - { - { Name = "toUnload", Type = "any", Nilable = false }, - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "UnregisterAllEveryFrameUpdate", - Type = "Function", - }, - { - Name = "UnregisterEveryFrameUpdate", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "UnregisterForGlobalConditions", - Type = "Function", - - Arguments = - { - { Name = "uid", Type = "any", Nilable = false }, - }, - }, - { - Name = "UpdateCurrentInstanceType", - Type = "Function", - - Arguments = - { - { Name = "instanceType", Type = "any", Nilable = false }, - }, - }, - { - Name = "UpdateFakeStatesFor", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "UpdateSoundIcon", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "ValidateUniqueDataIds", - Type = "Function", - - Arguments = - { - { Name = "silent", Type = "any", Nilable = false }, - }, - }, - { - Name = "ValueFromPath", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = true }, - }, - }, - { - Name = "ValueToPath", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "path", Type = "any", Nilable = false }, - { Name = "value", Type = "any", Nilable = false }, - }, - }, - { - Name = "checkForSingleLoadCondition", - Type = "Function", - - Arguments = - { - { Name = "trigger", Type = "table", Nilable = false }, - { Name = "name", Type = "string", Nilable = false }, - { Name = "validateFn", Type = "bool", Nilable = true }, - }, - - Returns = - { - { Name = "undefined", Type = "any", Nilable = false }, - }, - }, - { - Name = "ensurePRDFrame", - Type = "Function", - }, - { - Name = "getDefaultGlow", - Type = "Function", - - Arguments = - { - { Name = "regionType", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table", Nilable = false }, - }, - }, - { - Name = "get_encounters_list", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "get_encounters_list", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "get_encounters_list", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "get_encounters_list", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "get_zoneId_list", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "get_zoneId_list", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "get_zoneId_list", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "get_zoneId_list", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "pauseOptionsProcessing", - Type = "Function", - - Arguments = - { - { Name = "enable", Type = "any", Nilable = false }, - }, - }, - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - { - Name = "ChangeId", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "ChangeUID", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "newUid", Type = "any", Nilable = false }, - }, - }, - { - Name = "Contains", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "Dump", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - }, - { - Name = "EnsureUniqueIdOfUnmatched", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "IncProgress", Type = "any", Nilable = false }, - }, - }, - { - Name = "GetChildren", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "GetDiff", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "categories", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "table|nil", Nilable = true }, - }, - }, - { - Name = "GetGroupOrder", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "number", Nilable = true }, - { Name = "undefined", Type = "number", Nilable = true }, - }, - }, - { - Name = "GetGroupRegionType", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = ""aurabar"|"dynamicgroup"|"fallback"|"group"|"icon"...(+6)", Nilable = false }, - }, - }, - { - Name = "GetIdFor", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = true }, - }, - }, - { - Name = "GetOriginalName", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = true }, - }, - }, - { - Name = "GetParent", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = true }, - }, - }, - { - Name = "GetParentIsDynamicGroup", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = true }, - }, - }, - { - Name = "GetPhase1Data", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "withAppliedPath", Type = "any", Nilable = false }, - { Name = "activeCategories", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = true }, - }, - }, - { - Name = "GetPhase2Data", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "withAppliedPath", Type = "any", Nilable = false }, - { Name = "activeCategories", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = true }, - }, - }, - { - Name = "GetRawChildren", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "GetRawData", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "auraData|nil", Nilable = true }, - }, - }, - { - Name = "GetRootUID", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = false }, - }, - }, - { - Name = "GetSortHybrid", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "GetTotalCount", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "number", Nilable = false }, - }, - }, - { - Name = "GetType", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = ""new"|"old"", Nilable = false }, - }, - }, - { - Name = "GetUIDMatch", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "string", Nilable = true }, - }, - }, - { - Name = "InsertData", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "data", Type = "any", Nilable = false }, - { Name = "parentUid", Type = "any", Nilable = false }, - { Name = "children", Type = "any", Nilable = false }, - { Name = "sortHybrid", Type = "any", Nilable = false }, - { Name = "index", Type = "any", Nilable = false }, - }, - }, - { - Name = "InsertUnmatchedFrom", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "otherUidMap", Type = "any", Nilable = false }, - { Name = "IncProgress", Type = "any", Nilable = false }, - }, - }, - { - Name = "InsertUnmatchedPhase1", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "otherUidMap", Type = "any", Nilable = false }, - { Name = "otherUid", Type = "any", Nilable = false }, - { Name = "IncProgress", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, - { - Name = "Remove", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - }, - { - Name = "SetDiff", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "diff", Type = "any", Nilable = false }, - { Name = "categories", Type = "any", Nilable = false }, - }, - }, - { - Name = "SetGroupOrder", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "index", Type = "any", Nilable = false }, - { Name = "total", Type = "any", Nilable = false }, - }, - }, - { - Name = "SetParentIsDynamicGroup", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "parentIsDynamicGroup", Type = "any", Nilable = false }, - }, - }, - { - Name = "SetRootParent", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "parentId", Type = "any", Nilable = false }, - }, - }, - { - Name = "SetUIDMatch", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - { Name = "matchedUid", Type = "any", Nilable = false }, - }, - }, - { - Name = "UnsetParent", - Type = "Function", - - Arguments = - { - { Name = "self", Type = "UidMap", Nilable = false }, - { Name = "uid", Type = "any", Nilable = false }, - }, - }, - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = { { Name = "AddCompanionData", @@ -4177,7 +890,7 @@ local WeakAurasAPI = Returns = { - { Name = "undefined", Type = "number", Nilable = false }, + { Name = "version", Type = "number", Nilable = false }, }, }, { @@ -4469,15 +1182,6 @@ local WeakAurasAPI = { Name = "massEdit", Type = "any", Nilable = false }, }, }, - { - Name = "OpenOptions", - Type = "Function", - - Arguments = - { - { Name = "msg", Type = "any", Nilable = false }, - }, - }, { Name = "PickDisplay", Type = "Function", @@ -4810,10 +1514,6 @@ local WeakAurasAPI = Name = "Toggle", Type = "Function", }, - { - Name = "ToggleMinimap", - Type = "Function", - }, { Name = "ToggleOptions", Type = "Function", @@ -5093,108 +1793,6 @@ local WeakAurasAPI = }, }, }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, - Functions = - { - }, Events = { From 3b08271ba2af268d670264d7556ca2854d349955 Mon Sep 17 00:00:00 2001 From: Buds Date: Fri, 26 Apr 2024 20:36:08 +0200 Subject: [PATCH 38/42] remove duplicate entries --- .github/scripts/docs/parser.js | 71 ++++++++++++++++++++++--------- WeakAurasOptions/WeakAurasAPI.lua | 50 +--------------------- 2 files changed, 54 insertions(+), 67 deletions(-) diff --git a/.github/scripts/docs/parser.js b/.github/scripts/docs/parser.js index 65fe3a88a8..a673169e65 100644 --- a/.github/scripts/docs/parser.js +++ b/.github/scripts/docs/parser.js @@ -1,5 +1,6 @@ const fs = require('fs'); const path = require('path'); +const namespace = "WeakAuras" console.log( `if not WeakAuras.IsLibsOK() then return end @@ -12,7 +13,10 @@ local WeakAurasAPI = { Name = "WeakAuras", Type = "System", - Namespace = "WeakAuras",` + Namespace = "WeakAuras", + + Functions = + {` ) function isNilable(obj) { @@ -40,46 +44,75 @@ function wowType(obj) { const data = fs.readFileSync(path.join(__dirname, 'doc.json'), { encoding: 'utf8', flags: 'r' }); const obj = JSON.parse(data); +const allFunctions = new Object; for (const entry of obj) { - if (entry.name === "WeakAuras") { + if (entry.name === namespace) { if (entry.fields) { - console.log(` Functions =`); - console.log(` {`); for (const field of entry.fields) { if (field?.extends?.type === "function" && field?.visible === "public") { - console.log(` {`); - console.log(` Name = "${field.name}",`); - console.log(` Type = "Function",`); + const currFunction = new Object; const args = field?.extends?.args if (args && args.length > 0) { - console.log(""); - console.log(` Arguments =`); - console.log(` {`); + currFunction.arguments = new Array; for (const arg of args) { - console.log(` { Name = "${arg.name}", Type = "${wowType(arg)}", Nilable = ${isNilable(arg)} },`); + currFunction.arguments.push({ name: arg.name, type: wowType(arg), nilable: isNilable(arg)}); }; - console.log(` },`); } const returns = field?.extends?.returns if (returns && returns.length > 0) { - console.log(""); - console.log(` Returns =`); - console.log(` {`); + currFunction.returns = new Array; for (const ret of returns) { - console.log(` { Name = "${ret.name}", Type = "${wowType(ret)}", Nilable = ${isNilable(ret)} },`); + currFunction.returns.push({ name: ret.name, type: wowType(ret), nilable: isNilable(ret)}) }; - console.log(` },`); } - console.log(` },`); + // if there is already a function with this name, we check if the new has more args or returns + if (allFunctions[field.name]) { + const currArgs = currFunction.args ? currFunction.args.length : 0 + const oldArgs = allFunctions[field.name].args ? allFunctions[field.name].length : 0 + const currRets = currFunction.returns ? currFunction.returns.length : 0 + const oldRets = allFunctions[field.name].returns ? allFunctions[field.name].returns.length : 0 + if (currArgs > oldArgs || currRets > oldRets) { + allFunctions[field.name] = currFunction + } + } else { + allFunctions[field.name] = currFunction + } } }; - console.log(` },`); } } } +for (var key in allFunctions) { + const currFunction = allFunctions[key] + console.log(` {`); + console.log(` Name = "${key}",`); + console.log(` Type = "Function",`); + if (currFunction.arguments) { + console.log(""); + console.log(` Arguments =`); + console.log(` {`); + for (const arg of currFunction.arguments) { + console.log(` { Name = "${arg.name}", Type = "${arg.type}", Nilable = ${arg.nilable} },`); + }; + console.log(` },`); + } + if (currFunction.returns) { + console.log(""); + console.log(` Returns =`); + console.log(` {`); + for (const ret of currFunction.returns) { + console.log(` { Name = "${ret.name}", Type = "${ret.type}", Nilable = ${ret.nilable} },`); + }; + console.log(` },`); + } + console.log(` },`); +} + console.log( ` + }, + Events = { }, diff --git a/WeakAurasOptions/WeakAurasAPI.lua b/WeakAurasOptions/WeakAurasAPI.lua index 7b6769537d..247c9e3145 100644 --- a/WeakAurasOptions/WeakAurasAPI.lua +++ b/WeakAurasOptions/WeakAurasAPI.lua @@ -9,6 +9,7 @@ local WeakAurasAPI = Name = "WeakAuras", Type = "System", Namespace = "WeakAuras", + Functions = { { @@ -20,28 +21,6 @@ local WeakAurasAPI = { Name = "data", Type = "any", Nilable = false }, }, }, - { - Name = "CalculatedGcdDuration", - Type = "Function", - }, - { - Name = "CalculatedGcdDuration", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "number", Nilable = false }, - }, - }, - { - Name = "CalculatedGcdDuration", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "number", Nilable = false }, - }, - }, { Name = "CalculatedGcdDuration", Type = "Function", @@ -1016,15 +995,6 @@ local WeakAurasAPI = { Name = "undefined", Type = "bool", Nilable = false }, }, }, - { - Name = "IsOptionsOpen", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, { Name = "IsPaused", Type = "Function", @@ -1206,10 +1176,6 @@ local WeakAurasAPI = Name = "PrintProfile", Type = "Function", }, - { - Name = "PrintProfile", - Type = "Function", - }, { Name = "ProfileDisplays", Type = "Function", @@ -1479,19 +1445,6 @@ local WeakAurasAPI = { Name = "_", Type = "string", Nilable = false }, }, }, - { - Name = "StartProfile", - Type = "Function", - - Arguments = - { - { Name = "startType", Type = "any", Nilable = false }, - }, - }, - { - Name = "StopProfile", - Type = "Function", - }, { Name = "StopProfile", Type = "Function", @@ -1792,6 +1745,7 @@ local WeakAurasAPI = { Name = "subStrings", Type = "string", Nilable = false }, }, }, + }, Events = From 4be36ab7d6c0f2eea588a19841064fb1dbbb6f0e Mon Sep 17 00:00:00 2001 From: Buds Date: Sun, 28 Apr 2024 01:10:58 +0200 Subject: [PATCH 39/42] update with changes in APIDoc and don't show a gigantic tooltip for systems --- WeakAurasOptions/OptionsFrames/TextEditor.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 29f698f7d6..744c68237e 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -191,7 +191,7 @@ local function ConstructTextEditor(frame) -- display we ned the original, so save it here. local originalGetText = editor.editBox.GetText set_scheme() - APIDocLib.enable(editor.editBox) + APIDocLib:enable(editor.editBox) OptionsPrivate.LoadDocumentation() IndentationLib.enable(editor.editBox, color_scheme, WeakAurasSaved.editor_tab_spaces) @@ -581,14 +581,14 @@ local function ConstructTextEditor(frame) makeAPISearch = function(apiToSearchFor) apiSearchScroll:ReleaseChildren() if not apiToSearchFor or #apiToSearchFor < 3 then - APIDocLib.ListSystems() + APIDocLib:ListSystems() else - APIDocLib.Search(apiToSearchFor) + APIDocLib:Search(apiToSearchFor) end - for i, element in APIDocLib.apis:Enumerate() do + for i, element in APIDocLib.data:Enumerate() do if i > 100 then local label = AceGUI:Create("Label") - local text = L["Too much results (%s)"]:format(APIDocLib.apis:GetSize()) + local text = L["Too much results (%s)"]:format(APIDocLib.data:GetSize()) label:SetText(text) label:SetHeight(20) apiSearchScroll:AddChild(label) @@ -608,7 +608,7 @@ local function ConstructTextEditor(frame) button:SetEditable(false) button:SetHeight(20) button:SetRelativeWidth(1) - if apiInfo.GetDetailedOutputLines then + if apiInfo.Type ~= "System" and apiInfo.GetDetailedOutputLines then local desc = table.concat(apiInfo:GetDetailedOutputLines(), "\n") button:SetDescription(desc) end From b89d70a57cb0a1d4cee2b61b7092c0d72203ae99 Mon Sep 17 00:00:00 2001 From: Buds Date: Mon, 29 Apr 2024 17:37:27 +0200 Subject: [PATCH 40/42] remove result limit, and fix ghost tooltips --- WeakAurasOptions/OptionsFrames/TextEditor.lua | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 744c68237e..457478a944 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -586,15 +586,8 @@ local function ConstructTextEditor(frame) APIDocLib:Search(apiToSearchFor) end for i, element in APIDocLib.data:Enumerate() do - if i > 100 then - local label = AceGUI:Create("Label") - local text = L["Too much results (%s)"]:format(APIDocLib.data:GetSize()) - label:SetText(text) - label:SetHeight(20) - apiSearchScroll:AddChild(label) - break - else - local apiInfo = element.apiInfo + local apiInfo = element.apiInfo + if apiInfo then local button = AceGUI:Create("WeakAurasSnippetButton") local name if apiInfo.Type == "Function" then @@ -611,6 +604,8 @@ local function ConstructTextEditor(frame) if apiInfo.Type ~= "System" and apiInfo.GetDetailedOutputLines then local desc = table.concat(apiInfo:GetDetailedOutputLines(), "\n") button:SetDescription(desc) + else + button:SetDescription() end button.name = name button.editor = editor From ee271eaaa2d113d6c25db8e9ec2d18b51b41ac06 Mon Sep 17 00:00:00 2001 From: Buds Date: Mon, 29 Apr 2024 17:52:35 +0200 Subject: [PATCH 41/42] set as @private more functions of WeakAuras namespace --- WeakAuras/AuraEnvironment.lua | 1 + WeakAuras/GenericTrigger.lua | 3 + WeakAuras/Init.lua | 1 + WeakAuras/WeakAuras.lua | 10 + WeakAurasOptions/WeakAurasAPI.lua | 231 ------------------------ WeakAurasOptions/WeakAurasOptions.lua | 10 + WeakAurasTemplates/TriggerTemplates.lua | 1 + 7 files changed, 26 insertions(+), 231 deletions(-) diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index a7c4409880..b960ad0ed9 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -633,6 +633,7 @@ end local function_cache_custom = CreateFunctionCache(exec_env_custom) local function_cache_builtin = CreateFunctionCache(exec_env_builtin) +---@private function WeakAuras.LoadFunction(string) return function_cache_custom:Load(string) end diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index 3f10dd03e1..62459bd7c9 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -828,6 +828,7 @@ function WeakAuras.ScanEvents(event, arg1, arg2, ...) Private.StopProfileSystem("generictrigger " .. orgEvent ) end +---@private ---@param event string ---@param unit UnitToken ---@param ... any @@ -3364,6 +3365,7 @@ function WeakAuras.GetPlayerReaction(unit) end end +---@private ---@param unit UnitToken function WeakAuras.WatchUnitChange(unit) unit = string.lower(unit) @@ -3552,6 +3554,7 @@ if WeakAuras.IsClassicEraOrWrath() then queueableSpells = classQueueableSpells[class] local queuedSpellFrame + ---@private function WeakAuras.WatchForQueuedSpell() if not queuedSpellFrame then queuedSpellFrame = CreateFrame("Frame") diff --git a/WeakAuras/Init.lua b/WeakAuras/Init.lua index 4ebddf47fd..e5ec0f6b8d 100644 --- a/WeakAuras/Init.lua +++ b/WeakAuras/Init.lua @@ -551,6 +551,7 @@ do end end +---@private function WeakAuras.IsLibsOK() return libsAreOk end diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index e96b9c5450..916171d758 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -1197,6 +1197,7 @@ do -- Archive stuff return Archivist end + ---@private function WeakAuras.LoadFromArchive(storeType, storeID) local Archive = OpenArchive() return Archive:Load(storeType, storeID) @@ -1467,6 +1468,7 @@ function Private.Pause() paused = true; end +---@private function WeakAuras.Toggle() if(paused) then Private.Resume(); @@ -1479,6 +1481,7 @@ function Private.SquelchingActions() return squelch_actions; end +---@private function WeakAuras.InLoadingScreen() return in_loading_screen; end @@ -2194,6 +2197,7 @@ function WeakAuras.Delete(data) Private.callbacks:Fire("Delete", uid, id, parentUid, parentId) end +---@private function WeakAuras.Rename(data, newid) local oldid = data.id if(data.parent) then @@ -2991,6 +2995,7 @@ function Private.UpdateSoundIcon(data) end end +---@private function WeakAuras.PreAdd(data) if not data then return end -- Readd what Compress removed before version 8 @@ -4103,6 +4108,7 @@ end do local hiddenTooltip; + ---@private function WeakAuras.GetHiddenTooltip() if not(hiddenTooltip) then hiddenTooltip = CreateFrame("GameTooltip", "WeakAurasTooltip", nil, "GameTooltipTemplate"); @@ -4178,6 +4184,7 @@ function WeakAuras.GetAuraTooltipInfo(unit, index, filter) end local FrameTimes = {}; +---@private function WeakAuras.ProfileFrames(all) UpdateAddOnCPUUsage(); for name, frame in pairs(Private.frames) do @@ -4191,6 +4198,7 @@ function WeakAuras.ProfileFrames(all) end local DisplayTimes = {}; +---@private function WeakAuras.ProfileDisplays(all) UpdateAddOnCPUUsage(); for id, regionData in pairs(Private.regions) do @@ -4386,6 +4394,7 @@ end Private.dynFrame = dynFrame; +---@private function WeakAuras.RegisterTriggerSystem(types, triggerSystem) for _, v in ipairs(types) do triggerTypes[v] = triggerSystem; @@ -4393,6 +4402,7 @@ function WeakAuras.RegisterTriggerSystem(types, triggerSystem) tinsert(triggerSystems, triggerSystem); end +---@private function WeakAuras.RegisterTriggerSystemOptions(types, func) for _, v in ipairs(types) do Private.triggerTypesOptions[v] = func; diff --git a/WeakAurasOptions/WeakAurasAPI.lua b/WeakAurasOptions/WeakAurasAPI.lua index 247c9e3145..dc67382fe1 100644 --- a/WeakAurasOptions/WeakAurasAPI.lua +++ b/WeakAurasOptions/WeakAurasAPI.lua @@ -167,21 +167,6 @@ local WeakAurasAPI = { Name = "undefined", Type = "number", Nilable = false }, }, }, - { - Name = "CreateTemplateView", - Type = "Function", - - Arguments = - { - { Name = "Private", Type = "any", Nilable = false }, - { Name = "frame", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, { Name = "DeepMixin", Type = "Function", @@ -206,10 +191,6 @@ local WeakAurasAPI = { Name = "undefined", Type = "string", Nilable = false }, }, }, - { - Name = "FillOptions", - Type = "Function", - }, { Name = "GcdSpellName", Type = "Function", @@ -451,15 +432,6 @@ local WeakAurasAPI = { Name = "a", Type = "number", Nilable = false }, }, }, - { - Name = "GetHiddenTooltip", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, { Name = "GetHitChance", Type = "Function", @@ -535,10 +507,6 @@ local WeakAurasAPI = { Name = "undefined", Type = "unknown", Nilable = false }, }, }, - { - Name = "GetMoverSizerId", - Type = "Function", - }, { Name = "GetNumSetItemsEquipped", Type = "Function", @@ -805,10 +773,6 @@ local WeakAurasAPI = { Name = "unit", Type = "any", Nilable = false }, }, }, - { - Name = "HideOptions", - Type = "Function", - }, { Name = "Import", Type = "Function", @@ -827,15 +791,6 @@ local WeakAurasAPI = { Name = "undefined", Type = "string", Nilable = true }, }, }, - { - Name = "InLoadingScreen", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, { Name = "InstanceDifficulty", Type = "Function", @@ -968,15 +923,6 @@ local WeakAurasAPI = { Name = "undefined", Type = "bool", Nilable = false }, }, }, - { - Name = "IsLibsOK", - Type = "Function", - - Returns = - { - { Name = "undefined", Type = "bool", Nilable = false }, - }, - }, { Name = "IsLoginFinished", Type = "Function", @@ -1107,41 +1053,6 @@ local WeakAurasAPI = { Name = "result", Type = "bool", Nilable = false }, }, }, - { - Name = "LoadFromArchive", - Type = "Function", - - Arguments = - { - { Name = "storeType", Type = "any", Nilable = false }, - { Name = "storeID", Type = "any", Nilable = false }, - }, - }, - { - Name = "LoadFunction", - Type = "Function", - - Arguments = - { - { Name = "string", Type = "any", Nilable = false }, - }, - - Returns = - { - { Name = "undefined", Type = "unknown", Nilable = false }, - }, - }, - { - Name = "NewAura", - Type = "Function", - - Arguments = - { - { Name = "sourceData", Type = "any", Nilable = false }, - { Name = "regionType", Type = "any", Nilable = false }, - { Name = "targetId", Type = "any", Nilable = false }, - }, - }, { Name = "NewDisplayButton", Type = "Function", @@ -1152,48 +1063,10 @@ local WeakAurasAPI = { Name = "massEdit", Type = "any", Nilable = false }, }, }, - { - Name = "PickDisplay", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - { Name = "tab", Type = "any", Nilable = false }, - { Name = "noHide", Type = "any", Nilable = false }, - }, - }, - { - Name = "PreAdd", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, { Name = "PrintProfile", Type = "Function", }, - { - Name = "ProfileDisplays", - Type = "Function", - - Arguments = - { - { Name = "all", Type = "any", Nilable = false }, - }, - }, - { - Name = "ProfileFrames", - Type = "Function", - - Arguments = - { - { Name = "all", Type = "any", Nilable = false }, - }, - }, { Name = "RaidFlagToIndex", Type = "Function", @@ -1208,36 +1081,6 @@ local WeakAurasAPI = { Name = "index", Type = "number", Nilable = false }, }, }, - { - Name = "RegisterTriggerSystem", - Type = "Function", - - Arguments = - { - { Name = "types", Type = "any", Nilable = false }, - { Name = "triggerSystem", Type = "any", Nilable = false }, - }, - }, - { - Name = "RegisterTriggerSystemOptions", - Type = "Function", - - Arguments = - { - { Name = "types", Type = "any", Nilable = false }, - { Name = "func", Type = "any", Nilable = false }, - }, - }, - { - Name = "Rename", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - { Name = "newid", Type = "any", Nilable = false }, - }, - }, { Name = "ReplaceRaidMarkerSymbols", Type = "Function", @@ -1278,17 +1121,6 @@ local WeakAurasAPI = { Name = "undefined", Type = "any", Nilable = false }, }, }, - { - Name = "ScanUnitEvents", - Type = "Function", - - Arguments = - { - { Name = "event", Type = "string", Nilable = false }, - { Name = "unit", Type = "UnitToken", Nilable = false }, - { Name = "undefined", Type = "any", Nilable = false }, - }, - }, { Name = "SetModel", Type = "Function", @@ -1302,24 +1134,6 @@ local WeakAurasAPI = { Name = "isDisplayInfo", Type = "any", Nilable = false }, }, }, - { - Name = "SetMoverSizer", - Type = "Function", - - Arguments = - { - { Name = "id", Type = "any", Nilable = false }, - }, - }, - { - Name = "ShowOptions", - Type = "Function", - - Arguments = - { - { Name = "msg", Type = "any", Nilable = false }, - }, - }, { Name = "SortAscending", Type = "Function", @@ -1463,20 +1277,6 @@ local WeakAurasAPI = { Name = "result", Type = "number", Nilable = true }, }, }, - { - Name = "Toggle", - Type = "Function", - }, - { - Name = "ToggleOptions", - Type = "Function", - - Arguments = - { - { Name = "msg", Type = "string", Nilable = false }, - { Name = "Private", Type = "Private", Nilable = false }, - }, - }, { Name = "ToggleProfile", Type = "Function", @@ -1623,24 +1423,6 @@ local WeakAurasAPI = { Name = "result", Type = "bool", Nilable = false }, }, }, - { - Name = "UpdateGroupOrders", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, - { - Name = "UpdateThumbnail", - Type = "Function", - - Arguments = - { - { Name = "data", Type = "any", Nilable = false }, - }, - }, { Name = "UseUnitPowerThirdArg", Type = "Function", @@ -1700,19 +1482,6 @@ local WeakAurasAPI = { Name = "isTime", Type = "bool", Nilable = false }, }, }, - { - Name = "WatchForQueuedSpell", - Type = "Function", - }, - { - Name = "WatchUnitChange", - Type = "Function", - - Arguments = - { - { Name = "unit", Type = "UnitToken", Nilable = false }, - }, - }, { Name = "gcdDuration", Type = "Function", diff --git a/WeakAurasOptions/WeakAurasOptions.lua b/WeakAurasOptions/WeakAurasOptions.lua index 6c8a037469..a1c259ce1f 100644 --- a/WeakAurasOptions/WeakAurasOptions.lua +++ b/WeakAurasOptions/WeakAurasOptions.lua @@ -571,6 +571,7 @@ local function OptionsFrame() end end +---@private ---@type fun(msg: string, Private: Private) function WeakAuras.ToggleOptions(msg, Private) if not Private then @@ -613,6 +614,7 @@ function WeakAuras.ToggleOptions(msg, Private) end end +---@private function WeakAuras.HideOptions() if(frame) then frame:Hide() @@ -817,6 +819,7 @@ function OptionsPrivate.DeleteAuras(auras, parents) OptionsPrivate.Private.dynFrame:AddAction("Deleting Auras", co1) end +---@private function WeakAuras.ShowOptions(msg) local firstLoad = not(frame); OptionsPrivate.Private.Pause(); @@ -905,6 +908,7 @@ function OptionsPrivate.ClearOptions(id) frame:ClearOptions(id) end +---@private function WeakAuras.FillOptions() frame:FillOptions() end @@ -973,6 +977,7 @@ function WeakAuras.NewDisplayButton(data, massEdit) end end +---@private function WeakAuras.UpdateGroupOrders(data) if(data.controlledChildren) then local total = #data.controlledChildren; @@ -1272,6 +1277,7 @@ function OptionsPrivate.IsDisplayPicked(id) end end +---@private function WeakAuras.PickDisplay(id, tab, noHide) frame:PickDisplay(id, tab, noHide) OptionsPrivate.UpdateButtonsScroll() @@ -1675,6 +1681,7 @@ function OptionsPrivate.DropIndicator() return indicator end +---@private function WeakAuras.UpdateThumbnail(data) local id = data.id local button = displayButtons[id] @@ -1731,6 +1738,7 @@ function OptionsPrivate.ResetMoverSizer() end end +---@private function WeakAuras.SetMoverSizer(id) OptionsPrivate.Private.EnsureRegion(id) if OptionsPrivate.Private.regions[id].region.toShow then @@ -1745,6 +1753,7 @@ function WeakAuras.SetMoverSizer(id) end end +---@private function WeakAuras.GetMoverSizerId() return frame.moversizer:GetCurrentId() end @@ -1758,6 +1767,7 @@ local function AddDefaultSubRegions(data) end end +---@private function WeakAuras.NewAura(sourceData, regionType, targetId) local function ensure(t, k, v) return t and k and v and t[k] == v diff --git a/WeakAurasTemplates/TriggerTemplates.lua b/WeakAurasTemplates/TriggerTemplates.lua index 29d792ade9..a836fa4d11 100644 --- a/WeakAurasTemplates/TriggerTemplates.lua +++ b/WeakAurasTemplates/TriggerTemplates.lua @@ -1213,6 +1213,7 @@ local function subTypesFor(item, regionType) return fallbacks end +---@private function WeakAuras.CreateTemplateView(Private, frame) TemplatePrivate.Private = Private From d36509f2cfe2531f790db563caee81902ac1907b Mon Sep 17 00:00:00 2001 From: Buds Date: Mon, 29 Apr 2024 21:51:59 +0200 Subject: [PATCH 42/42] update embeds, pkgmeta and use new MAJOR --- .pkgmeta | 2 ++ WeakAuras/embeds.xml | 2 +- WeakAurasOptions/OptionsFrames/TextEditor.lua | 10 +++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.pkgmeta b/.pkgmeta index 9644f8c64f..1434f52dae 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -16,6 +16,7 @@ externals: WeakAuras/Libs/LibCompress: https://repos.curseforge.com/wow/libcompress/trunk WeakAuras/Libs/LibSpellRange-1.0: https://github.com/ascott18/LibSpellRange-1.0 WeakAuras/Libs/LibRangeCheck-3.0: https://github.com/WeakAuras/LibRangeCheck-3.0/ + WeakAuras/Libs/LibAPIAutoComplete-1.0: https://github.com/WeakAuras/LibAPIAutoComplete-1.0/ WeakAuras/Libs/LibCustomGlow-1.0: https://github.com/Stanzilla/LibCustomGlow WeakAuras/Libs/LibDBIcon-1.0: https://repos.curseforge.com/wow/libdbicon-1-0/trunk/LibDBIcon-1.0 WeakAuras/Libs/LibGetFrame-1.0: https://github.com/mrbuds/LibGetFrame @@ -54,3 +55,4 @@ move-folders: WeakAuras/WeakAurasTemplates: WeakAurasTemplates WeakAuras/WeakAurasArchive: WeakAurasArchive WeakAuras/Libs/LibRangeCheck-3.0/LibRangeCheck-3.0: WeakAuras/Libs/LibRangeCheck-3.0 + WeakAuras/Libs/LibAPIAutoComplete-1.0/LibAPIAutoComplete-1.0: WeakAuras/Libs/LibAPIAutoComplete-1.0 diff --git a/WeakAuras/embeds.xml b/WeakAuras/embeds.xml index 37e71a8af0..a258c22117 100644 --- a/WeakAuras/embeds.xml +++ b/WeakAuras/embeds.xml @@ -22,5 +22,5 @@ - + diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 457478a944..5594109c8a 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -17,7 +17,7 @@ local SharedMedia = LibStub("LibSharedMedia-3.0") local LibDD = LibStub:GetLibrary("LibUIDropDownMenu-4.0") local IndentationLib = IndentationLib -local APIDocLib = LibStub("APIDoc-1.0") +local LAAC = LibStub("LibAPIAutoComplete-1.0") ---@class WeakAuras local WeakAuras = WeakAuras @@ -191,7 +191,7 @@ local function ConstructTextEditor(frame) -- display we ned the original, so save it here. local originalGetText = editor.editBox.GetText set_scheme() - APIDocLib:enable(editor.editBox) + LAAC:enable(editor.editBox) OptionsPrivate.LoadDocumentation() IndentationLib.enable(editor.editBox, color_scheme, WeakAurasSaved.editor_tab_spaces) @@ -581,11 +581,11 @@ local function ConstructTextEditor(frame) makeAPISearch = function(apiToSearchFor) apiSearchScroll:ReleaseChildren() if not apiToSearchFor or #apiToSearchFor < 3 then - APIDocLib:ListSystems() + LAAC:ListSystems() else - APIDocLib:Search(apiToSearchFor) + LAAC:Search(apiToSearchFor) end - for i, element in APIDocLib.data:Enumerate() do + for i, element in LAAC.data:Enumerate() do local apiInfo = element.apiInfo if apiInfo then local button = AceGUI:Create("WeakAurasSnippetButton")