@ccos/ccsdk-lite 1.0.0 → 1.0.2

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/bundle.js CHANGED
@@ -80,13 +80,14 @@ function unsetAppCommandCallback() {
80
80
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
81
81
  let persistentCallbackId = []; // 持久化 callback-id 列表
82
82
  function nativeCall(funcName, callbackId, params) {
83
- if (window['_CooPark']) {
83
+ if (window['_liteNativeApi']) {
84
+ // 运行于 android 浏览器webview
84
85
  var object1 = {
85
86
  func: funcName,
86
87
  id: callbackId,
87
88
  params: params || {}
88
89
  };
89
- window['_CooPark'].exec(JSON.stringify(object1));
90
+ window['_liteNativeApi'].exec(JSON.stringify(object1));
90
91
  }
91
92
  }
92
93
  function nativeRequest(funcName, params, persistent, persistentIdName, persistentCallback) {
@@ -989,8 +990,8 @@ window['apkNativeCall'] = function apkNativeCall(str) {
989
990
  }
990
991
  }
991
992
  };
992
- function isRunInCooPark() {
993
- return window['_CooPark'] ? true : false;
993
+ function isRunInAppBrowser() {
994
+ return window['_liteNativeApi'] ? true : false;
994
995
  }
995
996
  var index = {
996
997
  network,
@@ -1000,7 +1001,7 @@ var index = {
1000
1001
  androidView,
1001
1002
  audio,
1002
1003
  file,
1003
- isRunInCooPark
1004
+ isRunInAppBrowser
1004
1005
  };
1005
1006
 
1006
- export { index as default, isRunInCooPark, setAppCommandCallback, unsetAppCommandCallback };
1007
+ export { index as default, isRunInAppBrowser, setAppCommandCallback, unsetAppCommandCallback };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { setAppCommandCallback, unsetAppCommandCallback } from './core';
2
- export declare function isRunInCooPark(): boolean;
2
+ export declare function isRunInAppBrowser(): boolean;
3
3
  declare const _default: {
4
4
  network: {
5
5
  simpleHttpRequest: typeof import("./network").simpleHttpRequest;
@@ -122,6 +122,6 @@ declare const _default: {
122
122
  setLastModified: typeof import("./file").setLastModified;
123
123
  list: typeof import("./file").list;
124
124
  };
125
- isRunInCooPark: typeof isRunInCooPark;
125
+ isRunInAppBrowser: typeof isRunInAppBrowser;
126
126
  };
127
127
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccos/ccsdk-lite",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "a jssdk for coocaa tv-system",
5
5
  "main": "dist/bundle.js",
6
6
  "module": "dist/bundle.js",
@@ -21,9 +21,7 @@
21
21
  "devDependencies": {
22
22
  "@rollup/plugin-typescript": "^12.1.4",
23
23
  "rollup": "^4.45.1",
24
+ "tslib": "^2.8.1",
24
25
  "typescript": "^5.8.3"
25
- },
26
- "dependencies": {
27
- "tslib": "^2.8.1"
28
26
  }
29
27
  }