@lazycatcloud/sdk 0.1.144 → 0.1.145

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 (49) hide show
  1. package/dist/package.json +5 -1
  2. package/package.json +5 -1
  3. package/common/box.ts +0 -545
  4. package/common/browseronly.ts +0 -520
  5. package/common/end_device.ts +0 -635
  6. package/common/file_handler.ts +0 -485
  7. package/common/filetrans.ts +0 -1936
  8. package/common/gateway.ts +0 -663
  9. package/common/media_meta.ts +0 -319
  10. package/common/message.ts +0 -242
  11. package/common/peripheral_device.ts +0 -783
  12. package/common/security_context.ts +0 -729
  13. package/common/users.ts +0 -1044
  14. package/dlna/dlna.ts +0 -895
  15. package/docs/contribute.md +0 -40
  16. package/docs/extentions/AppCommon.md +0 -30
  17. package/extentions/app_common.ts +0 -63
  18. package/extentions/base.ts +0 -459
  19. package/extentions/index.ts +0 -27
  20. package/extentions/safe_app.ts +0 -60
  21. package/extentions/unsafe_app.ts +0 -107
  22. package/google/protobuf/descriptor.ts +0 -3778
  23. package/google/protobuf/empty.ts +0 -64
  24. package/google/protobuf/timestamp.ts +0 -214
  25. package/grpcweb.ts +0 -106
  26. package/index.ts +0 -204
  27. package/lanforward/lanforward.ts +0 -301
  28. package/localdevice/clipboard.ts +0 -499
  29. package/localdevice/config.ts +0 -268
  30. package/localdevice/device.ts +0 -218
  31. package/localdevice/dialog.ts +0 -707
  32. package/localdevice/local-launch.ts +0 -954
  33. package/localdevice/network.ts +0 -273
  34. package/localdevice/permission.ts +0 -733
  35. package/localdevice/photo.ts +0 -1497
  36. package/ssdp/ssdp.ts +0 -332
  37. package/sys/OS_daemon.ts +0 -325
  38. package/sys/OS_snapshot.ts +0 -1714
  39. package/sys/OS_upgrader.ts +0 -782
  40. package/sys/btrfs.ts +0 -530
  41. package/sys/devopt.ts +0 -250
  42. package/sys/event.ts +0 -787
  43. package/sys/hc-core/hc-core.ts +0 -1582
  44. package/sys/ingress.ts +0 -953
  45. package/sys/network_manager.ts +0 -874
  46. package/sys/package_manager.ts +0 -1931
  47. package/sys/portal-server/portal-server.ts +0 -2934
  48. package/sys/snapd.ts +0 -861
  49. package/tsconfig.json +0 -15
@@ -1,107 +0,0 @@
1
- import App, { LzcClient } from './base';
2
- import Extentions from "./index";
3
- import LzcAppSdk from "./base";
4
-
5
- declare global {
6
- const android_ad_blocker: any
7
- }
8
-
9
- const UNSAFE = {
10
- // h5调用webview 打开App
11
- OpenApp: function (url, isFullScreen) {
12
- if (!App.isWebShell()) {
13
- return
14
- }
15
- LzcClient.OpenApp(url, isFullScreen)
16
- },
17
- // contentView 打开指定url
18
- SetContentURL: function (url) {
19
- if (!App.isControlView()) {
20
- return
21
- }
22
- LzcClient.SetContentURL(url)
23
- },
24
- // 获取contentView 的当前url地址
25
- GetContentURL:
26
- function (callback) {
27
- if (!App.isControlView()) {
28
- return
29
- }
30
- return LzcClient.GetContentURL(callback)
31
- },
32
- // contentView 回退
33
- BackContentView:
34
- function () {
35
- if (!App.isControlView()) {
36
- return
37
- }
38
- LzcClient.BackContentView()
39
- },
40
- // contentView 前进
41
- ForwardContentView: function () {
42
- if (!App.isControlView()) {
43
- return
44
- }
45
- LzcClient.ForwardContentView();
46
- },
47
- // 在contentView 注入jsContent, 并且提供controlView 页面的js的 callbackMethod方法
48
- InjectJS: function (jsContent, callbackMethod) {
49
- if (!App.isControlView()) {
50
- return
51
- }
52
- LzcClient.InjectJS(jsContent, callbackMethod);
53
- },
54
- // 获取contentView 下面指定domain的cookie
55
- ReadCookie(domain) {
56
- if (!App.isControlView()) {
57
- return
58
- }
59
- return LzcClient.ReadCookie(domain)
60
- },
61
- // 在controlView 中执行jsContent(用于contentView通知 controlView)
62
- NotifyControView: function (jsContent) {
63
- if (!App.isContentView()) {
64
- return
65
- }
66
- LzcClient.NotifyControView(jsContent);
67
- },
68
- // 修改contentView 的useragent
69
- // 目前只支持android
70
- UpdateContentViewUserAgent: function (ua) {
71
- LzcClient.UpdateContentViewUserAgent(ua)
72
- },
73
- // contentView 执行
74
- // 目前只支持android
75
- XmlHttpRequest4ContentView: function (reqJsonStr) {
76
- return LzcClient.XmlHttpRequest4ContentView(reqJsonStr)
77
- },
78
- //切换controlView 显示状态
79
- // 目前只支持android
80
- ToggleControlView: function () {
81
- return LzcClient.ToggleControlView();
82
- },
83
- // 目前只支持android
84
- // 设置指定key 对应的value
85
- SetValue: function (key, value) {
86
- LzcClient.SetValue(key, value)
87
- },
88
- // 获取指定key的value
89
- // 目前只支持android
90
- GetValue: function (key) {
91
- return LzcClient.GetValue(key)
92
- },
93
- // callbackMethod: 结果回调方法
94
- CanGoback: function (callbackMethod) {
95
- return LzcClient.CanGoback(callbackMethod);
96
- },
97
- // controlViewHeight 两种使用方式,第一种是使用pixel: 100px ,另外一种使用百分比: 20%,
98
- SetControlViewHeight: function (controlViewHeight) {
99
- LzcClient.SetControlViewHeight(controlViewHeight);
100
- },
101
- ImportAdHosts: async function (hostUrl) {
102
- if (LzcAppSdk.isAndroidWebShell()) {
103
- const jsBridge = await LzcAppSdk.useNativeAsync(android_ad_blocker)
104
- jsBridge.ImportAdHosts(hostUrl)
105
- }
106
- }
107
- };