wuira 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +73 -0
- package/lib/Spells.d.ts +20 -0
- package/lib/Spells.lua +40 -0
- package/lib/datasources/KnownSpells.d.ts +13 -1
- package/lib/datasources/KnownSpells.lua +323 -49
- package/lib/datasources/index.d.ts +1 -1
- package/lib/platform/forever.d.ts +3 -1
- package/lib/ui/Cell.d.ts +2 -0
- package/lib/ui/FlowLayout.d.ts +4 -2
- package/lib/ui/ForEach.d.ts +7 -0
- package/lib/ui/ForEach.lua +30 -0
- package/lib/ui/GridLayout.d.ts +2 -2
- package/lib/ui/Window.d.ts +19 -0
- package/lib/ui/Window.lua +290 -0
- package/lib/ui/index.d.ts +5 -1
- package/lib/ui/index.lua +8 -0
- package/lib/ui/layout/calculateFlow.lua +26 -0
- package/lib/ui/mount.lua +133 -117
- package/lib/ui/primitives/jsx.d.ts +6 -3
- package/lib/ui/primitives/jsx.lua +334 -7
- package/package.json +1 -1
package/lib/ui/mount.lua
CHANGED
|
@@ -716,19 +716,35 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
716
716
|
local sourceActive = true
|
|
717
717
|
local lastVisible
|
|
718
718
|
local visible = item.cell.props.visible
|
|
719
|
+
local condition = item.cell.props.condition
|
|
719
720
|
local function refreshVisibility()
|
|
720
721
|
if protect(nil, root, tree) and InCombatLockdown() then
|
|
721
722
|
return
|
|
722
723
|
end
|
|
723
|
-
local
|
|
724
|
-
if
|
|
725
|
-
local
|
|
726
|
-
if
|
|
727
|
-
|
|
724
|
+
local ____sourceActive_18 = sourceActive
|
|
725
|
+
if ____sourceActive_18 then
|
|
726
|
+
local ____temp_17
|
|
727
|
+
if type(condition) == "function" then
|
|
728
|
+
____temp_17 = condition(nil)
|
|
729
|
+
else
|
|
730
|
+
local ____condition_16 = condition
|
|
731
|
+
if ____condition_16 == nil then
|
|
732
|
+
____condition_16 = true
|
|
733
|
+
end
|
|
734
|
+
____temp_17 = ____condition_16
|
|
735
|
+
end
|
|
736
|
+
____sourceActive_18 = ____temp_17
|
|
737
|
+
end
|
|
738
|
+
local allowed = ____sourceActive_18
|
|
739
|
+
local ____temp_22 = not issecretvalue(allowed) and allowed
|
|
740
|
+
if ____temp_22 then
|
|
741
|
+
local ____temp_21 = visible and visible(nil)
|
|
742
|
+
if ____temp_21 == nil then
|
|
743
|
+
____temp_21 = true
|
|
728
744
|
end
|
|
729
|
-
|
|
745
|
+
____temp_22 = ____temp_21
|
|
730
746
|
end
|
|
731
|
-
local value =
|
|
747
|
+
local value = ____temp_22
|
|
732
748
|
if value == lastVisible then
|
|
733
749
|
return
|
|
734
750
|
end
|
|
@@ -739,8 +755,8 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
739
755
|
item.frame:Hide()
|
|
740
756
|
end
|
|
741
757
|
end
|
|
742
|
-
local
|
|
743
|
-
|
|
758
|
+
local ____tree_visibility_23 = tree.visibility
|
|
759
|
+
____tree_visibility_23[#____tree_visibility_23 + 1] = refreshVisibility
|
|
744
760
|
local function onActiveChange(____, active)
|
|
745
761
|
sourceActive = active
|
|
746
762
|
refreshVisibility(nil)
|
|
@@ -768,17 +784,17 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
768
784
|
end
|
|
769
785
|
end
|
|
770
786
|
local target = anchors:get(item.frame)
|
|
771
|
-
local
|
|
772
|
-
local x =
|
|
773
|
-
local
|
|
774
|
-
local y =
|
|
775
|
-
local
|
|
787
|
+
local ____opt_24 = item.placement
|
|
788
|
+
local x = ____opt_24 and ____opt_24.x or (position.mode == "absolute" and position.x or position.offset.x)
|
|
789
|
+
local ____opt_26 = item.placement
|
|
790
|
+
local y = ____opt_26 and ____opt_26.y or (position.mode == "absolute" and position.y or position.offset.y)
|
|
791
|
+
local ____temp_28
|
|
776
792
|
if item.frame == root then
|
|
777
|
-
|
|
793
|
+
____temp_28 = rootAnchor
|
|
778
794
|
else
|
|
779
|
-
|
|
795
|
+
____temp_28 = nil
|
|
780
796
|
end
|
|
781
|
-
local overrideAnchor =
|
|
797
|
+
local overrideAnchor = ____temp_28
|
|
782
798
|
local anchor = overrideAnchor or (item.placement ~= nil and "TOPLEFT" or (position.anchor or "TOPLEFT"))
|
|
783
799
|
local relativeAnchor = overrideAnchor or (item.placement ~= nil and "TOPLEFT" or (position.relativeAnchor or anchor))
|
|
784
800
|
item.frame:SetPoint(
|
|
@@ -790,33 +806,33 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
790
806
|
)
|
|
791
807
|
if item.cell.kind == "secureButton" then
|
|
792
808
|
local props = item.cell.props
|
|
793
|
-
local
|
|
794
|
-
|
|
809
|
+
local ____tree_bindings_29 = tree.bindings
|
|
810
|
+
____tree_bindings_29[#____tree_bindings_29 + 1] = configureSecureButton(nil, item.frame, props)
|
|
795
811
|
if props.cooldown ~= nil then
|
|
796
812
|
local cooldown = CreateFrame("Cooldown", nil, item.frame, "CooldownFrameTemplate")
|
|
797
|
-
local
|
|
798
|
-
|
|
813
|
+
local ____tree_frames_30 = tree.frames
|
|
814
|
+
____tree_frames_30[#____tree_frames_30 + 1] = cooldown
|
|
799
815
|
cooldown:EnableMouse(false)
|
|
800
816
|
cooldown:SetAllPoints(item.frame)
|
|
801
817
|
cooldown:SetFrameLevel(item.frame:GetFrameLevel() + 2)
|
|
802
818
|
cooldown:SetDrawSwipe(true)
|
|
803
819
|
cooldown:SetDrawEdge(false)
|
|
804
|
-
local
|
|
805
|
-
local
|
|
806
|
-
if
|
|
807
|
-
|
|
820
|
+
local ____cooldown_SetDrawBling_32 = cooldown.SetDrawBling
|
|
821
|
+
local ____props_finishGlow_31 = props.finishGlow
|
|
822
|
+
if ____props_finishGlow_31 == nil then
|
|
823
|
+
____props_finishGlow_31 = false
|
|
808
824
|
end
|
|
809
|
-
|
|
825
|
+
____cooldown_SetDrawBling_32(cooldown, ____props_finishGlow_31)
|
|
810
826
|
cooldown:SetHideCountdownNumbers(false)
|
|
811
827
|
cooldown:SetSwipeColor(0, 0, 0, 0.7)
|
|
812
828
|
cooldown:GetCountdownFontString():SetFont("Fonts\\FRIZQT__.TTF", 13, "OUTLINE")
|
|
813
|
-
local
|
|
814
|
-
|
|
829
|
+
local ____tree_bindings_33 = tree.bindings
|
|
830
|
+
____tree_bindings_33[#____tree_bindings_33 + 1] = props.cooldown:BindCooldown(cooldown)
|
|
815
831
|
end
|
|
816
832
|
if props.binding ~= nil and props.showHotkey ~= false then
|
|
817
833
|
local overlay = CreateFrame("Frame", nil, item.frame)
|
|
818
|
-
local
|
|
819
|
-
|
|
834
|
+
local ____tree_frames_34 = tree.frames
|
|
835
|
+
____tree_frames_34[#____tree_frames_34 + 1] = overlay
|
|
820
836
|
overlay:EnableMouse(false)
|
|
821
837
|
overlay:SetAllPoints(item.frame)
|
|
822
838
|
overlay:SetFrameLevel(item.frame:GetFrameLevel() + 3)
|
|
@@ -831,17 +847,17 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
831
847
|
end
|
|
832
848
|
if item.cell.kind == "button" then
|
|
833
849
|
local onClick = item.cell.props.onClick
|
|
834
|
-
local
|
|
835
|
-
local
|
|
836
|
-
local
|
|
850
|
+
local ____self_36 = item.frame
|
|
851
|
+
local ____self_36_SetScript_37 = ____self_36.SetScript
|
|
852
|
+
local ____temp_35
|
|
837
853
|
if onClick == nil then
|
|
838
|
-
|
|
854
|
+
____temp_35 = nil
|
|
839
855
|
else
|
|
840
|
-
|
|
856
|
+
____temp_35 = function() return onClick(nil) end
|
|
841
857
|
end
|
|
842
|
-
|
|
843
|
-
local
|
|
844
|
-
|
|
858
|
+
____self_36_SetScript_37(____self_36, "OnClick", ____temp_35)
|
|
859
|
+
local ____tree_bindings_38 = tree.bindings
|
|
860
|
+
____tree_bindings_38[#____tree_bindings_38 + 1] = function() return item.frame:SetScript("OnClick", nil) end
|
|
845
861
|
end
|
|
846
862
|
if item.cell.kind == "label" then
|
|
847
863
|
local props = item.cell.props
|
|
@@ -875,49 +891,49 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
875
891
|
local uv = props.texCoords or ({0, 1, 0, 1})
|
|
876
892
|
texture:SetTexCoord(uv[1], uv[2], uv[3], uv[4])
|
|
877
893
|
texture:SetTexture(props.texture)
|
|
878
|
-
local
|
|
879
|
-
if
|
|
880
|
-
|
|
894
|
+
local ____opt_47 = props.textureSource
|
|
895
|
+
if ____opt_47 ~= nil then
|
|
896
|
+
____opt_47:BindTo(item.frame, texture, onActiveChange)
|
|
881
897
|
end
|
|
882
898
|
end
|
|
883
899
|
if item.cell.kind == "progress" then
|
|
884
900
|
local props = item.cell.props
|
|
885
901
|
local bar = item.frame
|
|
886
|
-
local
|
|
887
|
-
local color =
|
|
888
|
-
local
|
|
889
|
-
local
|
|
890
|
-
local
|
|
891
|
-
|
|
902
|
+
local ____opt_49 = props.foreground
|
|
903
|
+
local color = ____opt_49 and ____opt_49.color or props.color
|
|
904
|
+
local ____bar_SetStatusBarTexture_54 = bar.SetStatusBarTexture
|
|
905
|
+
local ____resolveStatusBarTexture_53 = resolveStatusBarTexture
|
|
906
|
+
local ____opt_51 = props.foreground
|
|
907
|
+
____bar_SetStatusBarTexture_54(
|
|
892
908
|
bar,
|
|
893
|
-
|
|
909
|
+
____resolveStatusBarTexture_53(nil, ____opt_51 and ____opt_51.texture or props.texture or "solid")
|
|
894
910
|
)
|
|
895
911
|
bar:SetStatusBarColor(color and color.r or 1, color and color.g or 1, color and color.b or 1, color and color.a or 1)
|
|
896
912
|
if props.foreground ~= nil then
|
|
897
913
|
local fill = bar:GetStatusBarTexture()
|
|
898
|
-
local
|
|
899
|
-
local
|
|
900
|
-
if
|
|
901
|
-
|
|
914
|
+
local ____fill_SetHorizTile_64 = fill.SetHorizTile
|
|
915
|
+
local ____props_foreground_tileX_63 = props.foreground.tileX
|
|
916
|
+
if ____props_foreground_tileX_63 == nil then
|
|
917
|
+
____props_foreground_tileX_63 = false
|
|
902
918
|
end
|
|
903
|
-
|
|
904
|
-
local
|
|
905
|
-
local
|
|
906
|
-
if
|
|
907
|
-
|
|
919
|
+
____fill_SetHorizTile_64(fill, ____props_foreground_tileX_63)
|
|
920
|
+
local ____fill_SetVertTile_66 = fill.SetVertTile
|
|
921
|
+
local ____props_foreground_tileY_65 = props.foreground.tileY
|
|
922
|
+
if ____props_foreground_tileY_65 == nil then
|
|
923
|
+
____props_foreground_tileY_65 = false
|
|
908
924
|
end
|
|
909
|
-
|
|
925
|
+
____fill_SetVertTile_66(fill, ____props_foreground_tileY_65)
|
|
910
926
|
fill:SetBlendMode(props.foreground.blendMode or "BLEND")
|
|
911
927
|
local uv = props.foreground.texCoords or ({0, 1, 0, 1})
|
|
912
928
|
fill:SetTexCoord(uv[1], uv[2], uv[3], uv[4])
|
|
913
929
|
end
|
|
914
930
|
bar:SetOrientation(props.orientation == "vertical" and "VERTICAL" or "HORIZONTAL")
|
|
915
|
-
local
|
|
916
|
-
local
|
|
917
|
-
if
|
|
918
|
-
|
|
931
|
+
local ____bar_SetReverseFill_68 = bar.SetReverseFill
|
|
932
|
+
local ____props_reverse_67 = props.reverse
|
|
933
|
+
if ____props_reverse_67 == nil then
|
|
934
|
+
____props_reverse_67 = false
|
|
919
935
|
end
|
|
920
|
-
|
|
936
|
+
____bar_SetReverseFill_68(bar, ____props_reverse_67)
|
|
921
937
|
bar:SetMinMaxValues(props.min or 0, props.max or 100)
|
|
922
938
|
local source = item.cell.source or props.source
|
|
923
939
|
if source ~= nil then
|
|
@@ -927,8 +943,8 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
927
943
|
local function overlay(____, style, heal)
|
|
928
944
|
bar:SetClipsChildren(true)
|
|
929
945
|
local layer = CreateFrame("StatusBar", nil, bar)
|
|
930
|
-
local
|
|
931
|
-
|
|
946
|
+
local ____tree_frames_69 = tree.frames
|
|
947
|
+
____tree_frames_69[#____tree_frames_69 + 1] = layer
|
|
932
948
|
layer:EnableMouse(false)
|
|
933
949
|
layer:SetFrameLevel(bar:GetFrameLevel())
|
|
934
950
|
layer:SetSize(item.width, item.height)
|
|
@@ -937,35 +953,35 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
937
953
|
layer:SetStatusBarColor(tint.r, tint.g, tint.b, tint.a or 0.5)
|
|
938
954
|
local texture = layer:GetStatusBarTexture()
|
|
939
955
|
texture:SetBlendMode(style.blendMode or "BLEND")
|
|
940
|
-
local
|
|
941
|
-
local
|
|
942
|
-
if
|
|
943
|
-
|
|
956
|
+
local ____texture_SetHorizTile_71 = texture.SetHorizTile
|
|
957
|
+
local ____style_tileX_70 = style.tileX
|
|
958
|
+
if ____style_tileX_70 == nil then
|
|
959
|
+
____style_tileX_70 = false
|
|
944
960
|
end
|
|
945
|
-
|
|
946
|
-
local
|
|
947
|
-
local
|
|
948
|
-
if
|
|
949
|
-
|
|
961
|
+
____texture_SetHorizTile_71(texture, ____style_tileX_70)
|
|
962
|
+
local ____texture_SetVertTile_73 = texture.SetVertTile
|
|
963
|
+
local ____style_tileY_72 = style.tileY
|
|
964
|
+
if ____style_tileY_72 == nil then
|
|
965
|
+
____style_tileY_72 = false
|
|
950
966
|
end
|
|
951
|
-
|
|
967
|
+
____texture_SetVertTile_73(texture, ____style_tileY_72)
|
|
952
968
|
local uv = style.texCoords or ({0, 1, 0, 1})
|
|
953
969
|
texture:SetTexCoord(uv[1], uv[2], uv[3], uv[4])
|
|
954
970
|
local vertical = props.orientation == "vertical"
|
|
955
|
-
local
|
|
956
|
-
if
|
|
957
|
-
|
|
971
|
+
local ____props_reverse_74 = props.reverse
|
|
972
|
+
if ____props_reverse_74 == nil then
|
|
973
|
+
____props_reverse_74 = false
|
|
958
974
|
end
|
|
959
|
-
local reverse =
|
|
975
|
+
local reverse = ____props_reverse_74
|
|
960
976
|
layer:SetOrientation(vertical and "VERTICAL" or "HORIZONTAL")
|
|
961
|
-
local
|
|
962
|
-
local
|
|
977
|
+
local ____layer_SetReverseFill_76 = layer.SetReverseFill
|
|
978
|
+
local ____heal_75
|
|
963
979
|
if heal then
|
|
964
|
-
|
|
980
|
+
____heal_75 = reverse
|
|
965
981
|
else
|
|
966
|
-
|
|
982
|
+
____heal_75 = not reverse
|
|
967
983
|
end
|
|
968
|
-
|
|
984
|
+
____layer_SetReverseFill_76(layer, ____heal_75)
|
|
969
985
|
if heal then
|
|
970
986
|
local point = vertical and (reverse and "TOPLEFT" or "BOTTOMLEFT") or (reverse and "TOPRIGHT" or "TOPLEFT")
|
|
971
987
|
local relative = vertical and (reverse and "BOTTOMLEFT" or "TOPLEFT") or (reverse and "TOPLEFT" or "TOPRIGHT")
|
|
@@ -981,23 +997,23 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
981
997
|
end
|
|
982
998
|
return layer
|
|
983
999
|
end
|
|
984
|
-
local
|
|
985
|
-
if (
|
|
986
|
-
local
|
|
987
|
-
local
|
|
1000
|
+
local ____opt_77 = source.HealPrediction
|
|
1001
|
+
if (____opt_77 and ____opt_77.IsAvailable) == true and props.healPrediction ~= false then
|
|
1002
|
+
local ____props_healPrediction_81 = props.healPrediction
|
|
1003
|
+
local ____opt_79 = props.healPrediction
|
|
988
1004
|
healPredictionBar = overlay(
|
|
989
1005
|
nil,
|
|
990
|
-
__TS__ObjectAssign({},
|
|
1006
|
+
__TS__ObjectAssign({}, ____props_healPrediction_81, {color = ____opt_79 and ____opt_79.color or ({r = 0.4, g = 1, b = 0.5, a = 0.5})}),
|
|
991
1007
|
true
|
|
992
1008
|
)
|
|
993
1009
|
end
|
|
994
|
-
local
|
|
995
|
-
if (
|
|
996
|
-
local
|
|
997
|
-
local
|
|
1010
|
+
local ____opt_82 = source.AbsorbPrediction
|
|
1011
|
+
if (____opt_82 and ____opt_82.IsAvailable) == true and props.absorbPrediction ~= false then
|
|
1012
|
+
local ____props_absorbPrediction_86 = props.absorbPrediction
|
|
1013
|
+
local ____opt_84 = props.absorbPrediction
|
|
998
1014
|
absorbPredictionBar = overlay(
|
|
999
1015
|
nil,
|
|
1000
|
-
__TS__ObjectAssign({},
|
|
1016
|
+
__TS__ObjectAssign({}, ____props_absorbPrediction_86, {color = ____opt_84 and ____opt_84.color or ({r = 0.8, g = 0.9, b = 1, a = 0.55})}),
|
|
1001
1017
|
false
|
|
1002
1018
|
)
|
|
1003
1019
|
end
|
|
@@ -1011,8 +1027,8 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
1011
1027
|
absorbPredictionBar = absorbPredictionBar
|
|
1012
1028
|
})
|
|
1013
1029
|
if dispose ~= nil then
|
|
1014
|
-
local
|
|
1015
|
-
|
|
1030
|
+
local ____tree_bindings_87 = tree.bindings
|
|
1031
|
+
____tree_bindings_87[#____tree_bindings_87 + 1] = dispose
|
|
1016
1032
|
end
|
|
1017
1033
|
else
|
|
1018
1034
|
bar:SetValue(props.current or props.value or 0)
|
|
@@ -1022,46 +1038,46 @@ function ____exports.mount(self, element, parent, rootAnchor)
|
|
|
1022
1038
|
local function attach(self, decoration)
|
|
1023
1039
|
if decoration ~= nil then
|
|
1024
1040
|
decoration:mount(item.frame, item.width, item.height)
|
|
1025
|
-
local
|
|
1026
|
-
|
|
1041
|
+
local ____tree_decorations_88 = tree.decorations
|
|
1042
|
+
____tree_decorations_88[#____tree_decorations_88 + 1] = decoration
|
|
1027
1043
|
end
|
|
1028
1044
|
end
|
|
1029
1045
|
local progress = item.cell.kind == "progress" and item.cell.props or nil
|
|
1030
|
-
local
|
|
1031
|
-
local
|
|
1046
|
+
local ____attach_96 = attach
|
|
1047
|
+
local ____temp_95
|
|
1032
1048
|
if (progress and progress.background) == false then
|
|
1033
|
-
|
|
1049
|
+
____temp_95 = nil
|
|
1034
1050
|
else
|
|
1035
|
-
|
|
1051
|
+
____temp_95 = (progress and progress.background) ~= nil and __TS__New(Background, progress.background) or decorations and decorations.background
|
|
1036
1052
|
end
|
|
1037
|
-
|
|
1038
|
-
local
|
|
1039
|
-
local
|
|
1053
|
+
____attach_96(nil, ____temp_95)
|
|
1054
|
+
local ____attach_104 = attach
|
|
1055
|
+
local ____temp_103
|
|
1040
1056
|
if (progress and progress.backdrop) == false then
|
|
1041
|
-
|
|
1057
|
+
____temp_103 = nil
|
|
1042
1058
|
else
|
|
1043
|
-
|
|
1059
|
+
____temp_103 = (progress and progress.backdrop) ~= nil and __TS__New(Border, progress.backdrop) or decorations and decorations.border
|
|
1044
1060
|
end
|
|
1045
|
-
|
|
1061
|
+
____attach_104(nil, ____temp_103)
|
|
1046
1062
|
attach(nil, decorations and decorations.glow)
|
|
1047
1063
|
mountedFrames:set(item.cell.props, item.frame)
|
|
1048
1064
|
refreshVisibility(nil)
|
|
1049
|
-
local
|
|
1050
|
-
|
|
1051
|
-
local
|
|
1052
|
-
local cleanup =
|
|
1065
|
+
local ____this_108
|
|
1066
|
+
____this_108 = item.cell.props
|
|
1067
|
+
local ____opt_107 = ____this_108.onMount
|
|
1068
|
+
local cleanup = ____opt_107 and ____opt_107(____this_108, item.frame)
|
|
1053
1069
|
if cleanup ~= nil then
|
|
1054
|
-
local
|
|
1055
|
-
|
|
1070
|
+
local ____tree_bindings_109 = tree.bindings
|
|
1071
|
+
____tree_bindings_109[#____tree_bindings_109 + 1] = cleanup
|
|
1056
1072
|
end
|
|
1057
|
-
if visible ~= nil then
|
|
1073
|
+
if visible ~= nil or type(condition) == "function" then
|
|
1058
1074
|
updates[#updates + 1] = refreshVisibility
|
|
1059
1075
|
end
|
|
1060
1076
|
end
|
|
1061
1077
|
if #updates > 0 then
|
|
1062
1078
|
local driver = CreateFrame("Frame", nil, parent)
|
|
1063
|
-
local
|
|
1064
|
-
|
|
1079
|
+
local ____tree_frames_110 = tree.frames
|
|
1080
|
+
____tree_frames_110[#____tree_frames_110 + 1] = driver
|
|
1065
1081
|
local elapsed = 0
|
|
1066
1082
|
driver:SetScript(
|
|
1067
1083
|
"OnUpdate",
|
|
@@ -17,9 +17,11 @@ export interface Element {
|
|
|
17
17
|
source?: ProgressSource | TimerSource;
|
|
18
18
|
}
|
|
19
19
|
export type Component<P extends object> = (props: P, child?: Element) => Element;
|
|
20
|
+
export type Children = Element | readonly Children[];
|
|
21
|
+
type RenderChild = (item: never, index: number) => Element;
|
|
20
22
|
export declare namespace UI {
|
|
21
23
|
function Fragment(): Element;
|
|
22
|
-
function createElement<P extends object>(component: Component<P> | "cell" | "flow" | "grid" | "progress" | "label" | "icon" | "button" | "secureButton", props: P | undefined, ...children: (
|
|
24
|
+
function createElement<P extends object>(component: Component<P> | "cell" | "flow" | "grid" | "progress" | "label" | "icon" | "button" | "secureButton", props: P | undefined, ...children: (Children | RenderChild)[]): Element;
|
|
23
25
|
namespace JSX {
|
|
24
26
|
type Element = import("./jsx").Element;
|
|
25
27
|
interface ElementChildrenAttribute {
|
|
@@ -30,10 +32,10 @@ export declare namespace UI {
|
|
|
30
32
|
child?: Element;
|
|
31
33
|
};
|
|
32
34
|
flow: Partial<FlowLayoutProps> & {
|
|
33
|
-
child?:
|
|
35
|
+
child?: Children;
|
|
34
36
|
};
|
|
35
37
|
grid: Partial<GridLayoutProps> & {
|
|
36
|
-
child?:
|
|
38
|
+
child?: Children;
|
|
37
39
|
};
|
|
38
40
|
progress: Partial<ProgressBarProps> & {
|
|
39
41
|
child?: Element;
|
|
@@ -49,3 +51,4 @@ export declare namespace UI {
|
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
}
|
|
54
|
+
export {};
|