@dompling/trollscript-types 1.0.37 → 1.0.45

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 (2) hide show
  1. package/index.d.ts +24 -116
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -583,67 +583,6 @@ interface App {
583
583
 
584
584
  declare const app: App;
585
585
 
586
- interface Ui {
587
- /**
588
- * 显示提示框
589
- * @param title 标题
590
- * @param message 内容
591
- * @param buttonTitle 按钮文字
592
- * @returns 无返回值
593
- */
594
- alert(title: string, message: string, buttonTitle: string): any;
595
-
596
- /**
597
- * 显示 Toast 提示
598
- * @param message 提示内容
599
- * @param duration 持续时间(秒)
600
- */
601
- toast(message: string, duration: number): void;
602
-
603
- /**
604
- * 显示确认对话框
605
- * @param title 标题
606
- * @param message 内容
607
- * @param confirmTitle 确认按钮文字
608
- * @param cancelTitle 取消按钮文字
609
- * @returns 是否点击了确认
610
- */
611
- confirm(title: string, message: string, confirmTitle: string, cancelTitle: string): any;
612
-
613
- /**
614
- * 显示输入对话框
615
- * @param title 标题
616
- * @param message 内容
617
- * @param defaultValue 默认值
618
- * @param placeholder 占位符
619
- * @returns 输入的文本,取消返回 null
620
- */
621
- prompt(title: string, message: string, defaultValue: string, placeholder: string): any;
622
-
623
- /**
624
- * 显示操作表单
625
- * @param title 标题
626
- * @param message 内容
627
- * @param actions 选项列表
628
- * @returns 选择的按钮索引(从0开始)
629
- */
630
- actionSheet(title: string, message: string, actions: any): any;
631
-
632
- /**
633
- * 显示加载指示器
634
- * @param message 加载提示
635
- */
636
- showLoading(message: string): void;
637
-
638
- /**
639
- * 隐藏加载指示器
640
- */
641
- hideLoading(): void;
642
-
643
- }
644
-
645
- declare const ui: Ui;
646
-
647
586
  interface Haptic {
648
587
  /**
649
588
  * 触觉冲击反馈
@@ -796,6 +735,25 @@ interface Display {
796
735
  */
797
736
  openSettings(): boolean;
798
737
 
738
+ /**
739
+ * 获取自动锁定时间
740
+ * @returns 自动锁定时间(秒),0 表示永不
741
+ */
742
+ getAutoLockTime(): number;
743
+
744
+ /**
745
+ * 设置自动锁定时间
746
+ * @param seconds 锁定时间(秒),0 表示永不
747
+ * @returns 是否设置成功
748
+ */
749
+ setAutoLock(seconds: number): boolean;
750
+
751
+ /**
752
+ * 保持屏幕常亮
753
+ * @param enabled 是否保持常亮
754
+ */
755
+ keepAwake(enabled: boolean): void;
756
+
799
757
  }
800
758
 
801
759
  declare const display: Display;
@@ -1209,6 +1167,11 @@ interface Notification {
1209
1167
  */
1210
1168
  getBadge(): any;
1211
1169
 
1170
+ /**
1171
+ * 清除角标
1172
+ */
1173
+ clearBadge(): void;
1174
+
1212
1175
  /**
1213
1176
  * 定时通知
1214
1177
  * @param title 通知标题
@@ -1827,61 +1790,6 @@ interface Bluetooth {
1827
1790
 
1828
1791
  declare const bluetooth: Bluetooth;
1829
1792
 
1830
- interface Webview {
1831
- /**
1832
- * 打开网页并等待加载
1833
- * @param url 网页 URL
1834
- */
1835
- open(url: string): any;
1836
-
1837
- /**
1838
- * 加载 HTML 内容
1839
- * @param html HTML 字符串
1840
- * @param baseURL 基础 URL
1841
- */
1842
- loadHTML(html: string, baseURL: string): any;
1843
-
1844
- /**
1845
- * 执行页面内 JavaScript
1846
- * @param script JS 代码
1847
- */
1848
- evaluate(script: string): any;
1849
-
1850
- /**
1851
- * 获取页面标题
1852
- */
1853
- getTitle(): any;
1854
-
1855
- /**
1856
- * 获取当前 URL
1857
- */
1858
- getURL(): any;
1859
-
1860
- /**
1861
- * 获取页面 HTML 源码
1862
- */
1863
- getHTML(): any;
1864
-
1865
- /**
1866
- * 关闭网页视图
1867
- * @returns 无返回值
1868
- */
1869
- close(): void;
1870
-
1871
- /**
1872
- * 检查是否已打开
1873
- */
1874
- isOpen(): boolean;
1875
-
1876
- /**
1877
- * 截取页面截图
1878
- */
1879
- screenshot(): any;
1880
-
1881
- }
1882
-
1883
- declare const webview: Webview;
1884
-
1885
1793
  interface Memo {
1886
1794
  /**
1887
1795
  * 创建备忘录
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dompling/trollscript-types",
3
- "version": "1.0.37",
3
+ "version": "1.0.45",
4
4
  "description": "TypeScript definitions for TrollScript",
5
5
  "main": "",
6
6
  "types": "index.d.ts",