@ray-js/api 0.5.4 → 0.5.6-beta-1

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 (137) hide show
  1. package/@types/BaseKit.d.ts +1009 -65
  2. package/@types/{TYKit.d.ts → BizKit.d.ts} +69 -42
  3. package/@types/DeviceKit.d.ts +788 -1564
  4. package/@types/MiniKit.d.ts +381 -26
  5. package/@types/all-kits.d.ts +1 -1
  6. package/lib/{BaseKit-2.3.11.d.ts → BaseKit-2.5.1-anonymize.2.d.ts} +18 -1
  7. package/lib/{BaseKit-2.3.11.js → BaseKit-2.5.1-anonymize.2.js} +18 -1
  8. package/lib/BizKit-2.4.6-rc.101.d.ts +40 -0
  9. package/lib/{TYKit-2.2.6.js → BizKit-2.4.6-rc.101.js} +1 -1
  10. package/lib/{DeviceKit-2.3.3.d.ts → DeviceKit-2.5.2-anonymize.1.d.ts} +43 -56
  11. package/lib/{DeviceKit-2.3.3.wechat.js → DeviceKit-2.5.2-anonymize.1.js} +85 -124
  12. package/lib/{MiniKit-2.4.3.d.ts → MiniKit-4.4.0-anonymize.4.d.ts} +14 -0
  13. package/lib/{MiniKit-2.4.3.wechat.js → MiniKit-4.4.0-anonymize.4.js} +14 -0
  14. package/lib/all-kits.d.ts +5 -5
  15. package/lib/all-kits.js +5 -5
  16. package/lib/getApp/index.native.js +4 -0
  17. package/lib/getBoundingClientRect/index.js +26 -1
  18. package/lib/getCurrentPages/index.native.js +5 -0
  19. package/lib/getElementById/index.native.js +13 -0
  20. package/lib/getI18nInfo/index.native.js +9 -0
  21. package/lib/hideNotification/index.native.js +7 -0
  22. package/lib/hideTabBar/index.native.js +2 -0
  23. package/lib/navigateBack/index.native.js +2 -0
  24. package/lib/navigateTo/index.native.js +2 -0
  25. package/lib/reLaunch/index.native.js +2 -0
  26. package/lib/readFileSync/index.native.js +8 -0
  27. package/lib/redirectTo/index.native.js +2 -0
  28. package/lib/requestCloud/index.native.js +8 -0
  29. package/lib/setNavigationBarColor/index.native.js +2 -0
  30. package/lib/setNavigationBarTitle/index.native.js +2 -0
  31. package/lib/showTabBar/index.native.js +2 -0
  32. package/lib/switchTab/index.native.js +2 -0
  33. package/package.json +8 -8
  34. package/lib/BaseKit-2.3.11.android.js +0 -1
  35. package/lib/BaseKit-2.3.11.ios.js +0 -1
  36. package/lib/BaseKit-2.3.11.tuya.js +0 -66
  37. package/lib/BaseKit-2.3.11.web.js +0 -66
  38. package/lib/BaseKit-2.3.11.wechat.js +0 -66
  39. package/lib/DeviceKit-2.3.3.android.js +0 -1
  40. package/lib/DeviceKit-2.3.3.ios.js +0 -1
  41. package/lib/DeviceKit-2.3.3.js +0 -407
  42. package/lib/DeviceKit-2.3.3.tuya.js +0 -407
  43. package/lib/DeviceKit-2.3.3.web.js +0 -407
  44. package/lib/MiniKit-2.4.3.android.js +0 -1
  45. package/lib/MiniKit-2.4.3.ios.js +0 -1
  46. package/lib/MiniKit-2.4.3.js +0 -43
  47. package/lib/MiniKit-2.4.3.tuya.js +0 -43
  48. package/lib/MiniKit-2.4.3.web.js +0 -43
  49. package/lib/TYKit-2.2.6.android.js +0 -1
  50. package/lib/TYKit-2.2.6.d.ts +0 -40
  51. package/lib/TYKit-2.2.6.ios.js +0 -1
  52. package/lib/TYKit-2.2.6.tuya.js +0 -53
  53. package/lib/TYKit-2.2.6.web.js +0 -53
  54. package/lib/TYKit-2.2.6.wechat.js +0 -53
  55. package/lib/all-kits.android.js +0 -1
  56. package/lib/all-kits.ios.js +0 -1
  57. package/lib/all-kits.tuya.js +0 -6
  58. package/lib/all-kits.web.js +0 -6
  59. package/lib/all-kits.wechat.js +0 -6
  60. package/lib/core/index.android.js +0 -1
  61. package/lib/core/index.ios.js +0 -1
  62. package/lib/core/index.tuya.js +0 -1
  63. package/lib/core/index.web.js +0 -1
  64. package/lib/core/index.wechat.js +0 -1
  65. package/lib/core/promisify/index.android.js +0 -1
  66. package/lib/core/promisify/index.ios.js +0 -1
  67. package/lib/core/promisify/index.tuya.js +0 -27
  68. package/lib/core/promisify/index.web.js +0 -27
  69. package/lib/core/promisify/index.wechat.js +0 -27
  70. package/lib/getApp/index.android.js +0 -1
  71. package/lib/getApp/index.ios.js +0 -1
  72. package/lib/getApp/index.web.js +0 -4
  73. package/lib/getBoundingClientRect/index.android.js +0 -1
  74. package/lib/getBoundingClientRect/index.ios.js +0 -1
  75. package/lib/getBoundingClientRect/index.web.js +0 -26
  76. package/lib/getCurrentPages/index.android.js +0 -1
  77. package/lib/getCurrentPages/index.ios.js +0 -1
  78. package/lib/getCurrentPages/index.web.js +0 -4
  79. package/lib/getElementById/index.android.js +0 -1
  80. package/lib/getElementById/index.ios.js +0 -1
  81. package/lib/getElementById/index.web.js +0 -7
  82. package/lib/getI18nInfo/index.android.js +0 -1
  83. package/lib/getI18nInfo/index.ios.js +0 -1
  84. package/lib/getI18nInfo/index.web.js +0 -4
  85. package/lib/hideNotification/index.android.js +0 -1
  86. package/lib/hideNotification/index.ios.js +0 -1
  87. package/lib/hideNotification/index.tuya.js +0 -3
  88. package/lib/hideNotification/index.web.js +0 -3
  89. package/lib/hideNotification/index.wechat.js +0 -3
  90. package/lib/hideTabBar/index.android.js +0 -1
  91. package/lib/hideTabBar/index.ios.js +0 -1
  92. package/lib/hideTabBar/index.web.js +0 -4
  93. package/lib/index.android.js +0 -1
  94. package/lib/index.ios.js +0 -1
  95. package/lib/index.tuya.js +0 -20
  96. package/lib/index.web.js +0 -20
  97. package/lib/index.wechat.js +0 -20
  98. package/lib/navigateBack/index.android.js +0 -1
  99. package/lib/navigateBack/index.ios.js +0 -1
  100. package/lib/navigateBack/index.web.js +0 -14
  101. package/lib/navigateTo/index.android.js +0 -1
  102. package/lib/navigateTo/index.ios.js +0 -1
  103. package/lib/navigateTo/index.web.js +0 -11
  104. package/lib/reLaunch/index.android.js +0 -1
  105. package/lib/reLaunch/index.ios.js +0 -1
  106. package/lib/reLaunch/index.web.js +0 -11
  107. package/lib/readFileSync/index.android.js +0 -1
  108. package/lib/readFileSync/index.ios.js +0 -1
  109. package/lib/readFileSync/index.web.js +0 -6
  110. package/lib/redirectTo/index.android.js +0 -1
  111. package/lib/redirectTo/index.ios.js +0 -1
  112. package/lib/redirectTo/index.web.js +0 -13
  113. package/lib/requestCloud/index.android.js +0 -1
  114. package/lib/requestCloud/index.ios.js +0 -1
  115. package/lib/requestCloud/index.web.js +0 -7
  116. package/lib/setNavigationBarColor/index.android.js +0 -1
  117. package/lib/setNavigationBarColor/index.ios.js +0 -1
  118. package/lib/setNavigationBarColor/index.web.js +0 -11
  119. package/lib/setNavigationBarTitle/index.android.js +0 -1
  120. package/lib/setNavigationBarTitle/index.ios.js +0 -1
  121. package/lib/setNavigationBarTitle/index.web.js +0 -11
  122. package/lib/showNotification/index.android.js +0 -1
  123. package/lib/showNotification/index.ios.js +0 -1
  124. package/lib/showNotification/index.tuya.js +0 -3
  125. package/lib/showNotification/index.web.js +0 -3
  126. package/lib/showNotification/index.wechat.js +0 -3
  127. package/lib/showTabBar/index.android.js +0 -1
  128. package/lib/showTabBar/index.ios.js +0 -1
  129. package/lib/showTabBar/index.web.js +0 -4
  130. package/lib/switchTab/index.android.js +0 -1
  131. package/lib/switchTab/index.ios.js +0 -1
  132. package/lib/switchTab/index.web.js +0 -11
  133. package/lib/utils.android.js +0 -1
  134. package/lib/utils.ios.js +0 -1
  135. package/lib/utils.tuya.js +0 -21
  136. package/lib/utils.web.js +0 -21
  137. package/lib/utils.wechat.js +0 -20
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _routerNative=require("@ray-js/router-native");var _default=_routerNative.redirectTo;exports.default=_default;
@@ -1,13 +0,0 @@
1
- import "core-js/modules/es.regexp.exec.js";
2
- import "core-js/modules/es.string.replace.js";
3
- import "core-js/modules/es.object.to-string.js";
4
- import "core-js/modules/es.promise.js";
5
- /// <reference path="../../@types/api.d.ts" />
6
- import router from '@ray-js/router';
7
-
8
- var redirectTo = function (options) {
9
- router.replace(options.url);
10
- return Promise.resolve();
11
- };
12
-
13
- export default redirectTo;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.requestCloud){console.warn('// TODO 暂未实现方法 ty.requestCloud');return;}return ty.requestCloud.apply(this,arguments);}
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.requestCloud){console.warn('// TODO 暂未实现方法 ty.requestCloud');return;}return ty.requestCloud.apply(this,arguments);}
@@ -1,7 +0,0 @@
1
- /// <reference path="../../@types/api.d.ts" />
2
- var requestCloud = function () {
3
- console.warn('// TODO 暂未实现方法 requestCloud');
4
- return undefined;
5
- };
6
-
7
- export default requestCloud;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _runtimeNative=require("@ray-js/runtime-native");var _default=_runtimeNative.setNavigationBarColor;exports.default=_default;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _runtimeNative=require("@ray-js/runtime-native");var _default=_runtimeNative.setNavigationBarColor;exports.default=_default;
@@ -1,11 +0,0 @@
1
- import "core-js/modules/es.object.to-string.js";
2
- import "core-js/modules/es.promise.js";
3
-
4
- /// <reference path="../../@types/api.d.ts" />
5
- var setNavigationBarColor = function (options) {
6
- var meta = document.querySelector('meta[name=theme-color]');
7
- meta && meta.setAttribute('content', options.backgroundColor);
8
- return Promise.resolve();
9
- };
10
-
11
- export default setNavigationBarColor;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _runtimeNative=require("@ray-js/runtime-native");var _default=_runtimeNative.setNavigationBarTitle;exports.default=_default;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _runtimeNative=require("@ray-js/runtime-native");var _default=_runtimeNative.setNavigationBarTitle;exports.default=_default;
@@ -1,11 +0,0 @@
1
- import "core-js/modules/es.object.to-string.js";
2
- import "core-js/modules/es.promise.js";
3
-
4
- /// <reference path="../../@types/api.d.ts" />
5
- var setNavigationBarTitle = function (options) {
6
- var title = options.title;
7
- document.title = title;
8
- return Promise.resolve();
9
- };
10
-
11
- export default setNavigationBarTitle;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){console.warn('// TODO: 暂未实现方法 showNotification');}
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){console.warn('// TODO: 暂未实现方法 showNotification');}
@@ -1,3 +0,0 @@
1
- export default function () {
2
- console.warn('// TODO: 暂未实现方法 showNotification');
3
- }
@@ -1,3 +0,0 @@
1
- export default function () {
2
- console.warn('// TODO: 暂未实现方法 showNotification');
3
- }
@@ -1,3 +0,0 @@
1
- export default function () {
2
- console.warn('// TODO: 暂未实现方法 showNotification');
3
- }
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _runtimeNative=require("@ray-js/runtime-native");var _default=_runtimeNative.showTabBar;exports.default=_default;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _runtimeNative=require("@ray-js/runtime-native");var _default=_runtimeNative.showTabBar;exports.default=_default;
@@ -1,4 +0,0 @@
1
- /// <reference path="../../@types/api.d.ts" />
2
- import { showTabBar } from '@ray-js/framework';
3
- import { promisify } from '../core';
4
- export default promisify(showTabBar);
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _routerNative=require("@ray-js/router-native");var _default=_routerNative.switchTab;exports.default=_default;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _routerNative=require("@ray-js/router-native");var _default=_routerNative.switchTab;exports.default=_default;
@@ -1,11 +0,0 @@
1
- import "core-js/modules/es.object.to-string.js";
2
- import "core-js/modules/es.promise.js";
3
- /// <reference path="../../@types/api.d.ts" />
4
- import router from '@ray-js/router';
5
-
6
- var switchTab = function (options) {
7
- router.push(options.url);
8
- return Promise.resolve();
9
- };
10
-
11
- export default switchTab;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.factory=factory;var isWechat=false;function factory(name){var opts=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return function(){var _ty$opts$namespace;if(opts.deprecated){console.warn("\u8BE5\u65B9\u6CD5 "+name+" \u5DF2\u5F03\u7528");}var method=opts.namespace?((_ty$opts$namespace=ty[opts.namespace])!==null&&_ty$opts$namespace!==void 0?_ty$opts$namespace:{})[name]:ty[name];if(!method){console.warn("// TODO \u6682\u672A\u5B9E\u73B0\u65B9\u6CD5 ty."+(opts.namespace?opts.namespace+'.':'')+name);return;}return method.apply(this,arguments);};}
package/lib/utils.ios.js DELETED
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.factory=factory;var isWechat=false;function factory(name){var opts=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return function(){var _ty$opts$namespace;if(opts.deprecated){console.warn("\u8BE5\u65B9\u6CD5 "+name+" \u5DF2\u5F03\u7528");}var method=opts.namespace?((_ty$opts$namespace=ty[opts.namespace])!==null&&_ty$opts$namespace!==void 0?_ty$opts$namespace:{})[name]:ty[name];if(!method){console.warn("// TODO \u6682\u672A\u5B9E\u73B0\u65B9\u6CD5 ty."+(opts.namespace?opts.namespace+'.':'')+name);return;}return method.apply(this,arguments);};}
package/lib/utils.tuya.js DELETED
@@ -1,21 +0,0 @@
1
- import "core-js/modules/es.array.concat.js";
2
- var isWechat = false;
3
- export function factory(name) {
4
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5
- return function () {
6
- var _ty$opts$namespace;
7
-
8
- if (opts.deprecated) {
9
- console.warn("\u8BE5\u65B9\u6CD5 ".concat(name, " \u5DF2\u5F03\u7528"));
10
- }
11
-
12
- var method = opts.namespace ? ((_ty$opts$namespace = ty[opts.namespace]) !== null && _ty$opts$namespace !== void 0 ? _ty$opts$namespace : {})[name] : ty[name];
13
-
14
- if (!method) {
15
- console.warn("// TODO \u6682\u672A\u5B9E\u73B0\u65B9\u6CD5 ty.".concat(opts.namespace ? opts.namespace + '.' : '').concat(name));
16
- return;
17
- }
18
-
19
- return method.apply(this, arguments);
20
- };
21
- }
package/lib/utils.web.js DELETED
@@ -1,21 +0,0 @@
1
- import "core-js/modules/es.array.concat.js";
2
- var isWechat = false;
3
- export function factory(name) {
4
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5
- return function () {
6
- var _ty$opts$namespace;
7
-
8
- if (opts.deprecated) {
9
- console.warn("\u8BE5\u65B9\u6CD5 ".concat(name, " \u5DF2\u5F03\u7528"));
10
- }
11
-
12
- var method = opts.namespace ? ((_ty$opts$namespace = ty[opts.namespace]) !== null && _ty$opts$namespace !== void 0 ? _ty$opts$namespace : {})[name] : ty[name];
13
-
14
- if (!method) {
15
- console.warn("// TODO \u6682\u672A\u5B9E\u73B0\u65B9\u6CD5 ty.".concat(opts.namespace ? opts.namespace + '.' : '').concat(name));
16
- return;
17
- }
18
-
19
- return method.apply(this, arguments);
20
- };
21
- }
@@ -1,20 +0,0 @@
1
- import "core-js/modules/es.array.concat.js";
2
- var isWechat = true;
3
- export function factory(name) {
4
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5
- return function () {
6
- var _ty$opts$namespace;
7
-
8
- if (opts.deprecated) {
9
- console.warn("\u8BE5\u65B9\u6CD5 ".concat(name, " \u5DF2\u5F03\u7528"));
10
- }
11
-
12
- if (!wx[name]) {
13
- console.warn("// TODO \u6682\u672A\u5B9E\u73B0\u65B9\u6CD5 wx.".concat(name));
14
- return;
15
- }
16
-
17
- return wx[name].apply(this, arguments);
18
- var method = opts.namespace ? ((_ty$opts$namespace = ty[opts.namespace]) !== null && _ty$opts$namespace !== void 0 ? _ty$opts$namespace : {})[name] : ty[name];
19
- };
20
- }