com.xd.sdk.common 7.1.2 → 7.2.1-alpha

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.
Files changed (92) hide show
  1. package/Editor/Steam/SteamBuildProcessor.cs +1 -4
  2. package/Editor/XD.SDK.Common.Editor.asmdef +2 -1
  3. package/Plugins/Android/libs/{XDGBridgeCommon_v7_7.1.2.aar → XDGBridgeCommon_v7_7.2.0.aar} +0 -0
  4. package/Plugins/Android/libs/XDGCommon_7.2.0.aar +0 -0
  5. package/Plugins/Android/libs/{XDGTapTapWrapperInternal_7.1.2.aar → XDGTapTapWrapperInternal_7.2.0.aar} +0 -0
  6. package/Plugins/Android/libs/{XDTapTapWrapper_7.1.2.aar → XDTapTapWrapper_7.2.0.aar} +0 -0
  7. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_chat.png.meta +7 -0
  8. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_invite.png.meta +7 -0
  9. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_unfollow.png.meta +7 -0
  10. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark.meta +8 -0
  11. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_chat.png.meta +7 -0
  12. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_invite.png.meta +7 -0
  13. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_unfollow.png.meta +7 -0
  14. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light.meta +8 -0
  15. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_achievement.png.meta +7 -0
  16. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_achievement_platinum.png.meta +7 -0
  17. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_arrow.png.meta +7 -0
  18. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_close.png.meta +7 -0
  19. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_default_background.png.meta +7 -0
  20. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_logo.png.meta +7 -0
  21. package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile.meta +8 -0
  22. package/Plugins/iOS/XDCommonSDK.framework/Headers/NSError+XDG.h +1 -0
  23. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalRouterSchemes.h +2 -0
  24. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCloudLogHelper.h +4 -0
  25. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDTapTapInfo.h +3 -0
  26. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDVersion.h +3 -3
  27. package/Plugins/iOS/XDCommonSDK.framework/Info.plist +0 -0
  28. package/Plugins/iOS/XDCommonSDK.framework/XDCommonSDK +0 -0
  29. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Headers/XDTapSDK4WrapperSDK-Swift.h +1 -1
  30. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Headers/XDTapSDK4WrapperSDK.h +3 -3
  31. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Info.plist +0 -0
  32. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  33. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  34. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  35. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/XDTapSDK4WrapperSDK +0 -0
  36. package/Resources/Localization/LocalizableString.json +56 -56
  37. package/Resources/Prefabs/AccountCell.prefab +24 -15
  38. package/Resources/Prefabs/AgreementOptionAll.prefab +15 -9
  39. package/Resources/Prefabs/AgreementOptionNormal.prefab +16 -10
  40. package/Resources/Prefabs/AreaCodeCell.prefab +13 -8
  41. package/Resources/Prefabs/CancelAccountAlert.prefab +23 -23
  42. package/Resources/Prefabs/CenterErrorView.prefab +8 -8
  43. package/Resources/Prefabs/ConfirmDialog.prefab +20 -20
  44. package/Resources/Prefabs/DeleteAccountAlert.prefab +48 -45
  45. package/Resources/Prefabs/DeleteCell.prefab +6 -6
  46. package/Resources/Prefabs/Dialog.prefab +24 -24
  47. package/Resources/Prefabs/DisagreeConfirmAlert.prefab +15 -15
  48. package/Resources/Prefabs/GeneralAgreementAlert.prefab +53 -31
  49. package/Resources/Prefabs/LoadFailedView.prefab +12 -12
  50. package/Resources/Prefabs/LoadingView.prefab +9 -6
  51. package/Resources/Prefabs/PayHintAlert.prefab +17 -15
  52. package/Resources/Prefabs/PayLoadFailedView.prefab +13 -13
  53. package/Resources/Prefabs/PaymentAlert.prefab +9 -5
  54. package/Resources/Prefabs/SmallLoadingView.prefab +4 -4
  55. package/Resources/Prefabs/UserCenterAlert.prefab +76 -46
  56. package/Resources/Prefabs/XDCodeUnbindAlert.prefab +56 -34
  57. package/Resources/Prefabs/XDEmailAlert.prefab +84 -49
  58. package/Resources/Prefabs/XDPhoneAlertIO.prefab +129 -65
  59. package/Resources/Prefabs/XDPhoneNumberInputAlert.prefab +46 -28
  60. package/Resources/Prefabs/XDRiskControlAlert.prefab +12 -7
  61. package/Resources/Prefabs/XDSDKUI.prefab +3 -3
  62. package/Resources/Prefabs/XDVerifyCodeInputAlert.prefab +47 -28
  63. package/Resources/Prefabs/XDWebBridgeView.prefab +11 -11
  64. package/Resources/Prefabs/XDWebViewAlert.prefab +10 -10
  65. package/Resources/Shaders/UI/UI-Default-Gamma.shader +129 -0
  66. package/Resources/Shaders/UI/UI-Default-Gamma.shader.meta +9 -0
  67. package/Resources/Shaders/UI/UI_Default-Gamma.mat +36 -0
  68. package/Resources/Shaders/UI/UI_Default-Gamma.mat.meta +8 -0
  69. package/Resources/Shaders/UI/UI_Default-Mask.mat +36 -0
  70. package/Resources/Shaders/UI/UI_Default-Mask.mat.meta +8 -0
  71. package/Resources/Shaders/UI.meta +8 -0
  72. package/Resources/Shaders.meta +8 -0
  73. package/Runtime/Internal/Events/XDGEventBus.cs +135 -13
  74. package/Runtime/Internal/Standalone/CommonFeaturesImpl.cs +2 -2
  75. package/Runtime/Internal/Standalone/Http/Interceptor/MacAuthenticationInterceptor.cs +4 -4
  76. package/Runtime/Internal/Standalone/Steam/SteamManager.cs +358 -0
  77. package/Runtime/Internal/Standalone/Steam/SteamManager.cs.meta +8 -0
  78. package/Runtime/Internal/Standalone/{Utils → Steam}/SteamWrapper.cs +48 -49
  79. package/Runtime/Internal/Standalone/Track/AliyunTrack.cs +36 -29
  80. package/Runtime/Internal/Standalone/UI/Base/UIManager.cs +1 -1
  81. package/Runtime/Internal/Standalone/UI/Base/XDGCommonUIResources.cs +107 -0
  82. package/Runtime/Internal/Standalone/{Steam/SteamUtils.cs.meta → UI/Base/XDGCommonUIResources.cs.meta} +1 -1
  83. package/Runtime/Internal/Standalone/Web/Function/CloseWebFunction.cs +10 -1
  84. package/Runtime/Internal/Standalone/Web/WebRequest.cs +1 -1
  85. package/package.json +2 -2
  86. package/Plugins/Android/libs/XDGCommon_7.1.2.aar +0 -0
  87. package/Runtime/Internal/Standalone/Steam/SteamUtils.cs +0 -48
  88. /package/Plugins/Android/libs/{XDGBridgeCommon_v7_7.1.2.aar.meta → XDGBridgeCommon_v7_7.2.0.aar.meta} +0 -0
  89. /package/Plugins/Android/libs/{XDGCommon_7.1.2.aar.meta → XDGCommon_7.2.0.aar.meta} +0 -0
  90. /package/Plugins/Android/libs/{XDGTapTapWrapperInternal_7.1.2.aar.meta → XDGTapTapWrapperInternal_7.2.0.aar.meta} +0 -0
  91. /package/Plugins/Android/libs/{XDTapTapWrapper_7.1.2.aar.meta → XDTapTapWrapper_7.2.0.aar.meta} +0 -0
  92. /package/Runtime/Internal/Standalone/{Utils → Steam}/SteamWrapper.cs.meta +0 -0
@@ -0,0 +1,107 @@
1
+ #if UNITY_EDITOR || UNITY_STANDALONE
2
+ using UnityEngine;
3
+
4
+ namespace XD.SDK.Common.Internal.Standalone
5
+ {
6
+ /// <summary>
7
+ /// 提供 Common 模块内部统一使用的 UI 材质访问接口。
8
+ /// 默认会优先根据当前 ColorSpace 选择对应的材质,如果找不到 Linear 版本则回退到 Gamma 版本。
9
+ /// 实际材质文件放在任意包的 Resources/Shaders/UI 目录下即可(例如 Common 或 BuildTools),
10
+ /// 但路径必须保持与常量中定义的一致。
11
+ /// </summary>
12
+ public static class XDGCommonUIResources
13
+ {
14
+ // 贴图渲染用的默认 UI 材质
15
+ private const string SpriteGammaPath = "Shaders/UI/UI_Default-Gamma";
16
+ private const string SpriteLinearPath = "Shaders/UI/UI_Default-Linear";
17
+
18
+ // 蒙版用的默认 UI 材质
19
+ private const string MaskGammaPath = "Shaders/UI/UI_Default-Mask";
20
+ private const string MaskLinearPath = "Shaders/UI/UI_Default-Mask-Linear";
21
+
22
+ private static Material spriteGamma;
23
+ private static Material spriteLinear;
24
+
25
+ private static Material maskGamma;
26
+ private static Material maskLinear;
27
+
28
+ /// <summary>
29
+ /// 获取当前 ColorSpace 下推荐使用的 UI Sprite 材质。
30
+ /// </summary>
31
+ public static Material GetDefaultSpriteMaterial()
32
+ {
33
+ if (QualitySettings.activeColorSpace == ColorSpace.Linear)
34
+ {
35
+ if (spriteLinear == null)
36
+ {
37
+ spriteLinear = LoadMaterialWithFallback(SpriteLinearPath, SpriteGammaPath, "Sprite Linear");
38
+ }
39
+
40
+ if (spriteLinear != null)
41
+ {
42
+ return spriteLinear;
43
+ }
44
+ }
45
+
46
+ if (spriteGamma == null)
47
+ {
48
+ spriteGamma = LoadMaterial(SpriteGammaPath, "Sprite Gamma");
49
+ }
50
+
51
+ return spriteGamma;
52
+ }
53
+
54
+ /// <summary>
55
+ /// 获取当前 ColorSpace 下推荐使用的 UI Mask 材质。
56
+ /// </summary>
57
+ internal static Material GetDefaultMaskMaterial()
58
+ {
59
+ if (QualitySettings.activeColorSpace == ColorSpace.Linear)
60
+ {
61
+ if (maskLinear == null)
62
+ {
63
+ maskLinear = LoadMaterialWithFallback(MaskLinearPath, MaskGammaPath, "Mask Linear");
64
+ }
65
+
66
+ if (maskLinear != null)
67
+ {
68
+ return maskLinear;
69
+ }
70
+ }
71
+
72
+ if (maskGamma == null)
73
+ {
74
+ maskGamma = LoadMaterial(MaskGammaPath, "Mask Gamma");
75
+ }
76
+
77
+ return maskGamma;
78
+ }
79
+
80
+ private static Material LoadMaterialWithFallback(string primaryPath, string fallbackPath, string label)
81
+ {
82
+ Material material = LoadMaterial(primaryPath, label);
83
+ if (material != null)
84
+ {
85
+ return material;
86
+ }
87
+
88
+ return LoadMaterial(fallbackPath, label + " Fallback");
89
+ }
90
+
91
+ private static Material LoadMaterial(string path, string label)
92
+ {
93
+ Material material = Resources.Load<Material>(path);
94
+ if (material == null)
95
+ {
96
+ Debug.LogWarning(
97
+ "[XDGCommonUIResources] 未找到 UI 材质: \"" + label +
98
+ "\",Resources 路径: \"" + path + "\"");
99
+ }
100
+
101
+ return material;
102
+ }
103
+ }
104
+ }
105
+ #endif
106
+
107
+
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 1ce0f43adf51469db4305f3c241ba570
2
+ guid: d24f47766d743451899251cbc911baea
3
3
  MonoImporter:
4
4
  externalObjects: {}
5
5
  serializedVersion: 2
@@ -16,7 +16,16 @@ namespace XD.SDK.Common.Internal.Standalone
16
16
  {
17
17
  XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
18
18
  var dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(data);
19
- UIManager.Dismiss();
19
+ if (webView?.ProviderWebView()?.Url != null)
20
+ {
21
+ var url = webView?.ProviderWebView()?.Url;
22
+ var queryParams = WebRequest.ParseQueryString(url);
23
+ var noUI = WebRequest.GetValueOrDefault(queryParams, "xdNoUI", "0") == "1";
24
+ if (!noUI)
25
+ {
26
+ UIManager.Dismiss();
27
+ }
28
+ }
20
29
  webView?.ProviderWebTrans()?.TransObserver(WebActionEnum.CLOSE, dic);
21
30
  webView?.Release();
22
31
  }
@@ -81,7 +81,7 @@ namespace XD.SDK.Common.Internal.Standalone
81
81
  return dic;
82
82
  }
83
83
 
84
- internal static TValue GetValueOrDefault<TKey, TValue>(
84
+ public static TValue GetValueOrDefault<TKey, TValue>(
85
85
  Dictionary<TKey, TValue> dictionary,
86
86
  TKey key,
87
87
  TValue defaultValue)
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "com.xd.sdk.common",
3
3
  "displayName": "XDGSDK Common",
4
- "version": "7.1.2",
4
+ "version": "7.2.1-alpha",
5
5
  "description": "XDGSDK",
6
6
  "unity": "2019.3",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "com.xd.sdk.foundation": "7.1.2"
9
+ "com.xd.sdk.foundation": "7.2.1-alpha"
10
10
  }
11
11
  }
@@ -1,48 +0,0 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
2
- using System;
3
- using System.Linq;
4
- using System.Threading.Tasks;
5
- using UnityEngine;
6
-
7
- namespace XD.SDK.Common.Internal.Standalone
8
- {
9
- /// <summary>
10
- /// Steam SDK 封装接口
11
- /// </summary>
12
- public interface ISteamSDKWrapper
13
- {
14
- Task<string> GetAuthTicket();
15
- string GetSteamId();
16
- string GetSteamLanguage();
17
- Task<string> GetMicroTxn(ulong orderId);
18
- string GetSteamCountry();
19
- }
20
-
21
- public class SteamUtils
22
- {
23
- public static ISteamSDKWrapper Instance { get; private set; }
24
-
25
- static SteamUtils()
26
- {
27
- Type interfaceType = typeof(ISteamSDKWrapper);
28
- Type steamWrapperType = AppDomain.CurrentDomain.GetAssemblies()
29
- .SelectMany(assembly => assembly.GetTypes())
30
- .FirstOrDefault(clazz => interfaceType.IsAssignableFrom(clazz) && clazz.IsClass);
31
- if (steamWrapperType != null)
32
- {
33
- Instance = Activator.CreateInstance(steamWrapperType) as ISteamSDKWrapper;
34
- }
35
- else
36
- {
37
- XDGLogger.Warn($"No class implements {interfaceType} Type. Current Platform: {Application.platform}, if you are using Editor, please check if you have installed XDSDK pc module.", XDGLoggerTag.Common);
38
- }
39
- }
40
-
41
- /// <summary>
42
- /// 是否有 SDK 支持,即 Steam 包
43
- /// </summary>
44
- public static bool IsSDKSupported => Instance != null;
45
- }
46
- }
47
-
48
- #endif