jubo-sdk 1.2.2-beta.3 → 1.4.0-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.
- package/dist/JuboSdk.d.ts +14 -0
- package/dist/OldJuboSdk.d.ts +14 -0
- package/dist/index.cjs.js +91 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +91 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +91 -7
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/JuboSdk.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ declare class JuboSdk {
|
|
|
12
12
|
readonly isAlipayMini: boolean;
|
|
13
13
|
/** 是否是h5 */
|
|
14
14
|
readonly isH5: boolean;
|
|
15
|
+
/** 是否是快手h5 */
|
|
16
|
+
readonly isKwaiH5: boolean;
|
|
15
17
|
/** 是否是H5内嵌 */
|
|
16
18
|
readonly isIframe: boolean;
|
|
17
19
|
/** 是否是ios */
|
|
@@ -86,6 +88,18 @@ declare class JuboSdk {
|
|
|
86
88
|
* @param title 标题
|
|
87
89
|
*/
|
|
88
90
|
setNavTitle(title: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* 复制到剪切板
|
|
93
|
+
* @environment [ios, android]
|
|
94
|
+
* @param content 内容
|
|
95
|
+
*/
|
|
96
|
+
writeToClipboard(content: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* 保存图片到相册
|
|
99
|
+
* @environment [ios, android]
|
|
100
|
+
* @param content 内容
|
|
101
|
+
*/
|
|
102
|
+
saveImageToAlbum(base64: string): void;
|
|
89
103
|
/**
|
|
90
104
|
* 隐藏或显示原生导航栏
|
|
91
105
|
* @environment [ios, android]
|
package/dist/OldJuboSdk.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ declare class OldJuboSdk {
|
|
|
12
12
|
readonly isAlipayMini: boolean;
|
|
13
13
|
/** 是否是h5 */
|
|
14
14
|
readonly isH5: boolean;
|
|
15
|
+
/** 是否是快手h5 */
|
|
16
|
+
readonly isKwaiH5: boolean;
|
|
15
17
|
/** 是否是H5内嵌 */
|
|
16
18
|
readonly isIframe: boolean;
|
|
17
19
|
/** 是否是ios */
|
|
@@ -84,6 +86,18 @@ declare class OldJuboSdk {
|
|
|
84
86
|
* @param title 标题
|
|
85
87
|
*/
|
|
86
88
|
setNavTitle(title: string): void;
|
|
89
|
+
/**
|
|
90
|
+
* 复制到剪切板
|
|
91
|
+
* @environment [ios, android]
|
|
92
|
+
* @param content 内容
|
|
93
|
+
*/
|
|
94
|
+
writeToClipboard(content: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* 保存图片到相册
|
|
97
|
+
* @environment [ios, android]
|
|
98
|
+
* @param base64 内容
|
|
99
|
+
*/
|
|
100
|
+
saveImageToAlbum(base64: string): void;
|
|
87
101
|
/**
|
|
88
102
|
* 隐藏或显示原生导航栏
|
|
89
103
|
* @environment [ios, android]
|
package/dist/index.cjs.js
CHANGED
|
@@ -5293,10 +5293,10 @@ var browserType = BrowserType({
|
|
|
5293
5293
|
}]
|
|
5294
5294
|
});
|
|
5295
5295
|
|
|
5296
|
-
var
|
|
5296
|
+
var weixinJsSdk = {exports: {}};
|
|
5297
5297
|
|
|
5298
5298
|
!(function (e, n) {
|
|
5299
|
-
|
|
5299
|
+
weixinJsSdk.exports = n(e);
|
|
5300
5300
|
})(typeof window === "object" && window, function (r, e) {
|
|
5301
5301
|
if (!r) {
|
|
5302
5302
|
console.warn("can't use weixin-js-sdk in server side");
|
|
@@ -6187,8 +6187,8 @@ var _weixinJsSdk_1_6_5_weixinJsSdk = {exports: {}};
|
|
|
6187
6187
|
}
|
|
6188
6188
|
});
|
|
6189
6189
|
|
|
6190
|
-
var
|
|
6191
|
-
var wx$1 = /*@__PURE__*/getDefaultExportFromCjs(
|
|
6190
|
+
var weixinJsSdkExports = weixinJsSdk.exports;
|
|
6191
|
+
var wx$1 = /*@__PURE__*/getDefaultExportFromCjs(weixinJsSdkExports);
|
|
6192
6192
|
|
|
6193
6193
|
var bridge = {
|
|
6194
6194
|
default:commonjsGlobal,// for typescript
|
|
@@ -6321,9 +6321,9 @@ var bridge = {
|
|
|
6321
6321
|
});
|
|
6322
6322
|
}();
|
|
6323
6323
|
|
|
6324
|
-
var
|
|
6324
|
+
var dsbridge = bridge;
|
|
6325
6325
|
|
|
6326
|
-
var dsBridge = /*@__PURE__*/getDefaultExportFromCjs(
|
|
6326
|
+
var dsBridge = /*@__PURE__*/getDefaultExportFromCjs(dsbridge);
|
|
6327
6327
|
|
|
6328
6328
|
var APP_HOME$1 = 'ojb://ip_home';
|
|
6329
6329
|
var OldJuboSdk = /** @class */function () {
|
|
@@ -6369,6 +6369,13 @@ var OldJuboSdk = /** @class */function () {
|
|
|
6369
6369
|
writable: true,
|
|
6370
6370
|
value: false
|
|
6371
6371
|
});
|
|
6372
|
+
/** 是否是快手h5 */
|
|
6373
|
+
Object.defineProperty(this, "isKwaiH5", {
|
|
6374
|
+
enumerable: true,
|
|
6375
|
+
configurable: true,
|
|
6376
|
+
writable: true,
|
|
6377
|
+
value: false
|
|
6378
|
+
});
|
|
6372
6379
|
/** 是否是H5内嵌 */
|
|
6373
6380
|
Object.defineProperty(this, "isIframe", {
|
|
6374
6381
|
enumerable: true,
|
|
@@ -6432,6 +6439,7 @@ var OldJuboSdk = /** @class */function () {
|
|
|
6432
6439
|
this.isApp = browserType.isShell('airmart') || device === 'ios' || device === 'android';
|
|
6433
6440
|
this.isMiniProgram = browserType.isShell('wechat-miniprogram') || device === 'wx';
|
|
6434
6441
|
this.isH5 = device === 'h5';
|
|
6442
|
+
this.isKwaiH5 = device === 'kwai_h5';
|
|
6435
6443
|
this.isIframe = device === 'h5' && window.top !== window.self;
|
|
6436
6444
|
this.isIos = browserType.system === 'ios' || device === 'ios';
|
|
6437
6445
|
this.device = this.isMiniProgram ? 'wx' : this.isApp ? browserType.system : '';
|
|
@@ -6761,6 +6769,32 @@ var OldJuboSdk = /** @class */function () {
|
|
|
6761
6769
|
console.log('🚀 ~ file: OldJuboSdk.ts:270 ~ OldJuboSdk ~ title:', title);
|
|
6762
6770
|
}
|
|
6763
6771
|
});
|
|
6772
|
+
/**
|
|
6773
|
+
* 复制到剪切板
|
|
6774
|
+
* @environment [ios, android]
|
|
6775
|
+
* @param content 内容
|
|
6776
|
+
*/
|
|
6777
|
+
Object.defineProperty(OldJuboSdk.prototype, "writeToClipboard", {
|
|
6778
|
+
enumerable: false,
|
|
6779
|
+
configurable: true,
|
|
6780
|
+
writable: true,
|
|
6781
|
+
value: function value(content) {
|
|
6782
|
+
console.log('🚀 ~ file: OldJuboSdk.ts:270 ~ OldJuboSdk ~ title:', content);
|
|
6783
|
+
}
|
|
6784
|
+
});
|
|
6785
|
+
/**
|
|
6786
|
+
* 保存图片到相册
|
|
6787
|
+
* @environment [ios, android]
|
|
6788
|
+
* @param base64 内容
|
|
6789
|
+
*/
|
|
6790
|
+
Object.defineProperty(OldJuboSdk.prototype, "saveImageToAlbum", {
|
|
6791
|
+
enumerable: false,
|
|
6792
|
+
configurable: true,
|
|
6793
|
+
writable: true,
|
|
6794
|
+
value: function value(base64) {
|
|
6795
|
+
console.log('🚀 ~ file: OldJuboSdk.ts:270 ~ OldJuboSdk ~ title:', base64);
|
|
6796
|
+
}
|
|
6797
|
+
});
|
|
6764
6798
|
/**
|
|
6765
6799
|
* 隐藏或显示原生导航栏
|
|
6766
6800
|
* @environment [ios, android]
|
|
@@ -7166,6 +7200,13 @@ var JuboSdk = /** @class */function () {
|
|
|
7166
7200
|
writable: true,
|
|
7167
7201
|
value: false
|
|
7168
7202
|
});
|
|
7203
|
+
/** 是否是快手h5 */
|
|
7204
|
+
Object.defineProperty(this, "isKwaiH5", {
|
|
7205
|
+
enumerable: true,
|
|
7206
|
+
configurable: true,
|
|
7207
|
+
writable: true,
|
|
7208
|
+
value: false
|
|
7209
|
+
});
|
|
7169
7210
|
/** 是否是H5内嵌 */
|
|
7170
7211
|
Object.defineProperty(this, "isIframe", {
|
|
7171
7212
|
enumerable: true,
|
|
@@ -7230,6 +7271,7 @@ var JuboSdk = /** @class */function () {
|
|
|
7230
7271
|
this.isMiniProgram = browserType.isShell('wechat-miniprogram') || device === 'wx';
|
|
7231
7272
|
this.isAlipayMini = browserType.isShell('alipay-miniprogram') || device === 'alipay';
|
|
7232
7273
|
this.isH5 = device === 'h5';
|
|
7274
|
+
this.isKwaiH5 = device === 'kwai_h5';
|
|
7233
7275
|
this.isIframe = device === 'h5' && window.top !== window.self;
|
|
7234
7276
|
this.isIos = browserType.system === 'ios' || device === 'ios';
|
|
7235
7277
|
this.device = device === 'h5' ? 'h5' : this.isAlipayMini ? 'alipay' : this.isMiniProgram ? 'wx' : this.isApp ? browserType.system : device;
|
|
@@ -7589,6 +7631,48 @@ var JuboSdk = /** @class */function () {
|
|
|
7589
7631
|
}
|
|
7590
7632
|
}
|
|
7591
7633
|
});
|
|
7634
|
+
/**
|
|
7635
|
+
* 复制到剪切板
|
|
7636
|
+
* @environment [ios, android]
|
|
7637
|
+
* @param content 内容
|
|
7638
|
+
*/
|
|
7639
|
+
Object.defineProperty(JuboSdk.prototype, "writeToClipboard", {
|
|
7640
|
+
enumerable: false,
|
|
7641
|
+
configurable: true,
|
|
7642
|
+
writable: true,
|
|
7643
|
+
value: function value(content) {
|
|
7644
|
+
console.log('juboSDK.writeToClipboard', content);
|
|
7645
|
+
if (!this.detection && this.isMiniProgram) return;
|
|
7646
|
+
try {
|
|
7647
|
+
dsBridge.call('writeToClipboard', {
|
|
7648
|
+
content: content
|
|
7649
|
+
});
|
|
7650
|
+
} catch (error) {
|
|
7651
|
+
console.log('🚀 ~ juboSDK.writeToClipboard', error);
|
|
7652
|
+
}
|
|
7653
|
+
}
|
|
7654
|
+
});
|
|
7655
|
+
/**
|
|
7656
|
+
* 保存图片到相册
|
|
7657
|
+
* @environment [ios, android]
|
|
7658
|
+
* @param content 内容
|
|
7659
|
+
*/
|
|
7660
|
+
Object.defineProperty(JuboSdk.prototype, "saveImageToAlbum", {
|
|
7661
|
+
enumerable: false,
|
|
7662
|
+
configurable: true,
|
|
7663
|
+
writable: true,
|
|
7664
|
+
value: function value(base64) {
|
|
7665
|
+
console.log('juboSDK.saveImageToAlbum', base64);
|
|
7666
|
+
if (!this.detection && this.isMiniProgram) return;
|
|
7667
|
+
try {
|
|
7668
|
+
dsBridge.call('saveImageToAlbum', {
|
|
7669
|
+
base64: base64
|
|
7670
|
+
});
|
|
7671
|
+
} catch (error) {
|
|
7672
|
+
console.log('🚀 ~ juboSDK.saveImageToAlbum', error);
|
|
7673
|
+
}
|
|
7674
|
+
}
|
|
7675
|
+
});
|
|
7592
7676
|
/**
|
|
7593
7677
|
* 隐藏或显示原生导航栏
|
|
7594
7678
|
* @environment [ios, android]
|
|
@@ -7882,6 +7966,6 @@ exports.default = JuboSdk;
|
|
|
7882
7966
|
exports.ls = ls;
|
|
7883
7967
|
|
|
7884
7968
|
if(typeof window !== 'undefined') {
|
|
7885
|
-
window._juboSDK_VERSION_ = '1.
|
|
7969
|
+
window._juboSDK_VERSION_ = '1.4.0-beta.1'
|
|
7886
7970
|
}
|
|
7887
7971
|
//# sourceMappingURL=index.cjs.js.map
|