@lingxia/types 0.10.0 → 0.12.0

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 (142) hide show
  1. package/dist/automation/index.d.ts +1228 -0
  2. package/dist/automation/index.d.ts.map +1 -0
  3. package/dist/automation/index.js +13 -0
  4. package/dist/automation/index.js.map +1 -0
  5. package/dist/automation-test-globals.d.ts +14 -0
  6. package/dist/error.d.ts +13 -0
  7. package/dist/error.d.ts.map +1 -1
  8. package/dist/error.js +47 -1
  9. package/dist/error.js.map +1 -1
  10. package/dist/generated/i18n.d.ts +1 -1
  11. package/dist/generated/i18n.d.ts.map +1 -1
  12. package/dist/generated/i18n.js +37 -0
  13. package/dist/generated/i18n.js.map +1 -1
  14. package/dist/generated/logic-web.d.ts +305 -0
  15. package/dist/generated/logic.d.ts +2502 -0
  16. package/dist/generated/logic.d.ts.map +1 -0
  17. package/dist/generated/logic.js +5 -0
  18. package/dist/generated/logic.js.map +1 -0
  19. package/dist/index.d.ts +25 -313
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +3 -16
  22. package/dist/index.js.map +1 -1
  23. package/dist/logic-globals.d.ts +1 -0
  24. package/dist/process.d.ts +117 -0
  25. package/dist/process.d.ts.map +1 -0
  26. package/dist/process.js +10 -0
  27. package/dist/process.js.map +1 -0
  28. package/dist/testing/public-api.d.ts +429 -0
  29. package/dist/testing/public-api.d.ts.map +1 -0
  30. package/dist/testing/public-api.js +588 -0
  31. package/dist/testing/public-api.js.map +1 -0
  32. package/dist/testing/public-api.mjs +584 -0
  33. package/package.json +83 -48
  34. package/src/automation/index.ts +1370 -0
  35. package/src/error.ts +47 -1
  36. package/src/generated/i18n.ts +37 -0
  37. package/src/generated/logic-web.d.ts +305 -0
  38. package/src/generated/logic.ts +2753 -0
  39. package/src/index.ts +34 -459
  40. package/src/logic-globals.d.ts +1 -0
  41. package/src/process.ts +135 -0
  42. package/src/testing/public-api.ts +716 -0
  43. package/dist/app/index.d.ts +0 -328
  44. package/dist/app/index.d.ts.map +0 -1
  45. package/dist/app/index.js +0 -6
  46. package/dist/app/index.js.map +0 -1
  47. package/dist/device/actions.d.ts +0 -7
  48. package/dist/device/actions.d.ts.map +0 -1
  49. package/dist/device/actions.js +0 -6
  50. package/dist/device/actions.js.map +0 -1
  51. package/dist/device/index.d.ts +0 -5
  52. package/dist/device/index.d.ts.map +0 -1
  53. package/dist/device/index.js +0 -21
  54. package/dist/device/index.js.map +0 -1
  55. package/dist/device/info.d.ts +0 -16
  56. package/dist/device/info.d.ts.map +0 -1
  57. package/dist/device/info.js +0 -6
  58. package/dist/device/info.js.map +0 -1
  59. package/dist/device/network.d.ts +0 -12
  60. package/dist/device/network.d.ts.map +0 -1
  61. package/dist/device/network.js +0 -6
  62. package/dist/device/network.js.map +0 -1
  63. package/dist/device/wifi.d.ts +0 -20
  64. package/dist/device/wifi.d.ts.map +0 -1
  65. package/dist/device/wifi.js +0 -6
  66. package/dist/device/wifi.js.map +0 -1
  67. package/dist/display/index.d.ts +0 -8
  68. package/dist/display/index.d.ts.map +0 -1
  69. package/dist/display/index.js +0 -6
  70. package/dist/display/index.js.map +0 -1
  71. package/dist/env/index.d.ts +0 -8
  72. package/dist/env/index.d.ts.map +0 -1
  73. package/dist/env/index.js +0 -6
  74. package/dist/env/index.js.map +0 -1
  75. package/dist/file/index.d.ts +0 -146
  76. package/dist/file/index.d.ts.map +0 -1
  77. package/dist/file/index.js +0 -6
  78. package/dist/file/index.js.map +0 -1
  79. package/dist/input/index.d.ts +0 -18
  80. package/dist/input/index.d.ts.map +0 -1
  81. package/dist/input/index.js +0 -8
  82. package/dist/input/index.js.map +0 -1
  83. package/dist/location/index.d.ts +0 -19
  84. package/dist/location/index.d.ts.map +0 -1
  85. package/dist/location/index.js +0 -6
  86. package/dist/location/index.js.map +0 -1
  87. package/dist/lxapp/index.d.ts +0 -11
  88. package/dist/lxapp/index.d.ts.map +0 -1
  89. package/dist/lxapp/index.js +0 -6
  90. package/dist/lxapp/index.js.map +0 -1
  91. package/dist/media/index.d.ts +0 -372
  92. package/dist/media/index.d.ts.map +0 -1
  93. package/dist/media/index.js +0 -6
  94. package/dist/media/index.js.map +0 -1
  95. package/dist/navigator/index.d.ts +0 -14
  96. package/dist/navigator/index.d.ts.map +0 -1
  97. package/dist/navigator/index.js +0 -6
  98. package/dist/navigator/index.js.map +0 -1
  99. package/dist/share/index.d.ts +0 -90
  100. package/dist/share/index.d.ts.map +0 -1
  101. package/dist/share/index.js +0 -6
  102. package/dist/share/index.js.map +0 -1
  103. package/dist/storage/index.d.ts +0 -13
  104. package/dist/storage/index.d.ts.map +0 -1
  105. package/dist/storage/index.js +0 -6
  106. package/dist/storage/index.js.map +0 -1
  107. package/dist/system/index.d.ts +0 -9
  108. package/dist/system/index.d.ts.map +0 -1
  109. package/dist/system/index.js +0 -6
  110. package/dist/system/index.js.map +0 -1
  111. package/dist/transfer/index.d.ts +0 -166
  112. package/dist/transfer/index.d.ts.map +0 -1
  113. package/dist/transfer/index.js +0 -6
  114. package/dist/transfer/index.js.map +0 -1
  115. package/dist/ui/index.d.ts +0 -134
  116. package/dist/ui/index.d.ts.map +0 -1
  117. package/dist/ui/index.js +0 -6
  118. package/dist/ui/index.js.map +0 -1
  119. package/dist/update/index.d.ts +0 -17
  120. package/dist/update/index.d.ts.map +0 -1
  121. package/dist/update/index.js +0 -6
  122. package/dist/update/index.js.map +0 -1
  123. package/src/app/index.ts +0 -378
  124. package/src/device/actions.ts +0 -7
  125. package/src/device/index.ts +0 -4
  126. package/src/device/info.ts +0 -17
  127. package/src/device/network.ts +0 -23
  128. package/src/device/wifi.ts +0 -23
  129. package/src/display/index.ts +0 -9
  130. package/src/env/index.ts +0 -8
  131. package/src/file/index.ts +0 -171
  132. package/src/input/index.ts +0 -19
  133. package/src/location/index.ts +0 -20
  134. package/src/lxapp/index.ts +0 -12
  135. package/src/media/index.ts +0 -411
  136. package/src/navigator/index.ts +0 -16
  137. package/src/share/index.ts +0 -97
  138. package/src/storage/index.ts +0 -13
  139. package/src/system/index.ts +0 -9
  140. package/src/transfer/index.ts +0 -194
  141. package/src/ui/index.ts +0 -165
  142. package/src/update/index.ts +0 -19
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * LxApp navigator APIs.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigator/index.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -1,90 +0,0 @@
1
- /**
2
- * Share APIs.
3
- */
4
- export type ShareQuery = Record<string, string | number | boolean>;
5
- export type SharePage =
6
- /**
7
- * Share the current page.
8
- */
9
- true
10
- /**
11
- * Share the current page with query.
12
- */
13
- | {
14
- /**
15
- * Query appended to the current page. Query belongs to the page target and is
16
- * encoded into the AppLink URL.
17
- */
18
- query?: ShareQuery;
19
- };
20
- interface ShareTitleOptions {
21
- /**
22
- * Share title.
23
- */
24
- title?: string;
25
- }
26
- interface ShareTextBaseOptions extends ShareTitleOptions {
27
- /**
28
- * Share text body.
29
- */
30
- text?: string;
31
- }
32
- /**
33
- * Share title/text only. Receiver support is platform/app dependent; some
34
- * share extensions may reject text-only shares.
35
- */
36
- export interface ShareTextOptions extends ShareTextBaseOptions {
37
- page?: never;
38
- files?: never;
39
- }
40
- /**
41
- * Share the current page as an AppLink.
42
- */
43
- export interface SharePageOptions extends ShareTextBaseOptions {
44
- /**
45
- * Share the current page. The runtime uses the current appId and page path
46
- * implicitly and shares it through the host AppLink configuration.
47
- *
48
- * Rejects when the host app has no `appLinks.hosts` configuration because
49
- * receivers would not be able to open the shared page.
50
- *
51
- * `title` and `text` are presentation hints. Platforms and receivers may
52
- * ignore them; on iOS the URL is shared by itself so receivers can render it
53
- * as a webpage card when they support that.
54
- *
55
- * `page` and `files` are mutually exclusive.
56
- */
57
- page: SharePage;
58
- files?: never;
59
- }
60
- /**
61
- * Share images, PDFs, or other files.
62
- */
63
- export interface ShareFilesOptions extends ShareTitleOptions {
64
- /**
65
- * File paths returned by LingXia APIs to share. Images, PDFs, and other
66
- * documents are all represented as file paths.
67
- *
68
- * Use `lx.chooseFile` for system files and `lx.chooseMedia` for picked media;
69
- * pass the returned path here without parsing it.
70
- * Some platforms or receivers may limit multi-file shares. Share files one
71
- * at a time when targeting those receivers.
72
- *
73
- * `files` and `page` are mutually exclusive.
74
- * `text` is intentionally not supported for file shares because system
75
- * receivers handle text+attachment inconsistently.
76
- */
77
- files: string[];
78
- page?: never;
79
- text?: never;
80
- }
81
- export type ShareOptions = ShareTextOptions | SharePageOptions | ShareFilesOptions;
82
- export interface ShareResult {
83
- /**
84
- * Best-effort completion flag. Some platforms can only confirm that the
85
- * system share UI was opened or closed.
86
- */
87
- completed?: boolean;
88
- }
89
- export {};
90
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/share/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAEnE,MAAM,MAAM,SAAS;AACnB;;GAEG;AACD,IAAI;AACN;;GAEG;GACD;IACE;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB,CAAC;AAEN,UAAU,iBAAiB;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,oBAAqB,SAAQ,iBAAiB;IACtD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D;;;;;;;;;;;;OAYG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAEnF,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * Share APIs.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/share/index.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Key-value storage APIs.
3
- */
4
- export interface Storage {
5
- get(key: string): unknown;
6
- set(key: string, value: unknown): void;
7
- remove(key: string): void;
8
- clear(): void;
9
- keys(): string[];
10
- has(key: string): boolean;
11
- size(): number;
12
- }
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,OAAO;IACtB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACvC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,IAAI,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,IAAI,IAAI,MAAM,CAAC;CAChB"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * Key-value storage APIs.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -1,9 +0,0 @@
1
- /**
2
- * System settings.
3
- */
4
- export interface SystemSettingInfo {
5
- bluetoothEnabled: boolean;
6
- locationEnabled: boolean;
7
- wifiEnabled: boolean;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * System settings.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -1,166 +0,0 @@
1
- /**
2
- * Transfer task APIs.
3
- */
4
- declare const appDownloadPathBrand: unique symbol;
5
- declare const systemDownloadsPathBrand: unique symbol;
6
- export type DownloadDestination = 'app' | 'downloads';
7
- /** Runtime-managed app download path, usually under `lx://userdata`. */
8
- export type AppDownloadFilePath = string & {
9
- readonly [appDownloadPathBrand]: 'app-download-file-path';
10
- };
11
- /** Native system Downloads path. Do not pass this to `FileManager`. */
12
- export type SystemDownloadsPath = string & {
13
- readonly [systemDownloadsPathBrand]: 'system-downloads-path';
14
- };
15
- export interface DownloadOptionsBase {
16
- /** HTTP(S) source URL. */
17
- url: string;
18
- /**
19
- * Optional request headers.
20
- * Restricted headers such as `Referer` are ignored by the runtime.
21
- */
22
- headers?: Record<string, string>;
23
- /** Request timeout in milliseconds. */
24
- timeout?: number;
25
- /** Optional abort signal. */
26
- signal?: AbortSignal;
27
- }
28
- export interface AppDownloadOptions extends DownloadOptionsBase {
29
- /**
30
- * Optional app-owned durable output path.
31
- *
32
- * Omit `filePath` to receive a temporary result in `tempFilePath`. Relative
33
- * paths resolve under user data. `lx://` paths must target `lx://userdata`;
34
- * `lx://usercache` is not accepted here.
35
- */
36
- filePath?: string;
37
- /**
38
- * App-owned output. Omit to use a temporary output unless `filePath` is set.
39
- */
40
- destination?: 'app';
41
- }
42
- export interface DownloadsDownloadOptions extends DownloadOptionsBase {
43
- /**
44
- * Optional filename hint for the system Downloads destination.
45
- * This is not an app-owned FileManager path.
46
- */
47
- filePath?: string;
48
- /** Save into the user's system Downloads directory. */
49
- destination: 'downloads';
50
- }
51
- /**
52
- * Download options.
53
- *
54
- * - `app`: app-owned temporary output, or durable `lx://userdata` output when
55
- * `filePath` is set
56
- * - `downloads`: user-visible system Downloads output, requiring
57
- * `security.privileges: ["downloads"]` in `lxapp.json`
58
- *
59
- * Default: `app`.
60
- */
61
- export type DownloadOptions<TDestination extends DownloadDestination = DownloadDestination> = TDestination extends 'downloads' ? DownloadsDownloadOptions : AppDownloadOptions;
62
- export type DownloadResultForDestination<TDestination extends DownloadDestination> = TDestination extends 'downloads' ? DownloadsDownloadResult : AppDownloadResult;
63
- export interface DownloadProgressEvent<TResult extends DownloadResult = DownloadResult> {
64
- kind: 'progress' | 'paused' | 'resumed' | 'canceled' | 'completed';
65
- downloadedBytes?: number;
66
- totalBytes?: number;
67
- /** Present only when the total size is known. */
68
- progress?: number;
69
- result?: TResult;
70
- }
71
- export interface DownloadIteratorResult<TResult extends DownloadResult = DownloadResult> {
72
- done: boolean;
73
- value?: DownloadProgressEvent<TResult>;
74
- }
75
- export type AppDownloadResult = {
76
- /**
77
- * Temporary result.
78
- *
79
- * Not durable; move or copy it to `lx://userdata` if you need to keep it.
80
- *
81
- * When `filePath` is omitted, the runtime must be able to infer a file
82
- * type from the URL or the server's `Content-Type` header.
83
- */
84
- tempFilePath: string;
85
- filePath?: never;
86
- mimeType?: string;
87
- size: number;
88
- } | {
89
- /** Durable destination under `lx://userdata`. */
90
- filePath: AppDownloadFilePath;
91
- tempFilePath?: never;
92
- mimeType?: string;
93
- size: number;
94
- };
95
- export interface DownloadsDownloadResult {
96
- /** Native system Downloads path. Do not pass this to `FileManager`. */
97
- filePath: SystemDownloadsPath;
98
- tempFilePath?: never;
99
- mimeType?: string;
100
- size: number;
101
- }
102
- export type DownloadResult = AppDownloadResult | DownloadsDownloadResult;
103
- export interface DownloadTask<TDownloadResult extends DownloadResult = DownloadResult> extends PromiseLike<TDownloadResult>, AsyncIterable<DownloadProgressEvent<TDownloadResult>> {
104
- next(): Promise<DownloadIteratorResult<TDownloadResult>>;
105
- /** Stops iteration only. Does not cancel the underlying download task. */
106
- return(): Promise<DownloadIteratorResult<TDownloadResult>>;
107
- catch<TRejected = never>(onrejected?: ((reason: unknown) => TRejected | PromiseLike<TRejected>) | null): Promise<TDownloadResult | TRejected>;
108
- finally(onfinally?: (() => void) | null): Promise<TDownloadResult>;
109
- pause(): Promise<void>;
110
- resume(): Promise<void>;
111
- cancel(): Promise<void>;
112
- /** Alias for cancel(), matching browser/mini-program abort naming. */
113
- abort(): Promise<void>;
114
- wait(): Promise<TDownloadResult>;
115
- }
116
- export interface UploadOptions {
117
- /** HTTP(S) destination URL. */
118
- url: string;
119
- /** Local file path or runtime-managed URI to upload. */
120
- filePath: string;
121
- /** Multipart field name. Default: `file`. */
122
- name?: string;
123
- /**
124
- * Optional request headers.
125
- * Restricted headers such as `Referer` are ignored by the runtime.
126
- */
127
- headers?: Record<string, string>;
128
- /** Optional extra `multipart/form-data` text fields. */
129
- formData?: Record<string, string>;
130
- /** Request timeout in milliseconds. */
131
- timeout?: number;
132
- /** Override multipart filename. */
133
- fileName?: string;
134
- /** Override file MIME type. */
135
- mimeType?: string;
136
- /** Optional abort signal. */
137
- signal?: AbortSignal;
138
- }
139
- export interface UploadProgressEvent {
140
- kind: 'progress' | 'canceled' | 'completed';
141
- uploadedBytes?: number;
142
- totalBytes?: number;
143
- progress?: number;
144
- result?: UploadResult;
145
- }
146
- export interface UploadIteratorResult {
147
- done: boolean;
148
- value?: UploadProgressEvent;
149
- }
150
- export interface UploadResult {
151
- /** HTTP status code returned by the server. */
152
- statusCode: number;
153
- /** Response body decoded as UTF-8 text. */
154
- data: string;
155
- }
156
- export interface UploadTask extends PromiseLike<UploadResult>, AsyncIterable<UploadProgressEvent> {
157
- next(): Promise<UploadIteratorResult>;
158
- /** Stops iteration only. Does not cancel the underlying upload task. */
159
- return(): Promise<UploadIteratorResult>;
160
- catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<UploadResult | TResult>;
161
- finally(onfinally?: (() => void) | null): Promise<UploadResult>;
162
- cancel(): Promise<void>;
163
- wait(): Promise<UploadResult>;
164
- }
165
- export {};
166
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transfer/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,CAAC,MAAM,oBAAoB,EAAE,OAAO,MAAM,CAAC;AAClD,OAAO,CAAC,MAAM,wBAAwB,EAAE,OAAO,MAAM,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,WAAW,CAAC;AAEtD,wEAAwE;AACxE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG;IACzC,QAAQ,CAAC,CAAC,oBAAoB,CAAC,EAAE,wBAAwB,CAAC;CAC3D,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG;IACzC,QA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AAY;IAC3B,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAW,SAAQ,WAAW,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAC/F,IAAI,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACtC,wEAAwE;IACxE,MAAM,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACxC,KAAK,CAAC,OAAO,GAAG,KAAK,EACnB,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,GACxE,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAChE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;CAC/B"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * Transfer task APIs.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transfer/index.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -1,134 +0,0 @@
1
- /**
2
- * UI feedback, navigation, and surface control APIs.
3
- */
4
- export interface ShowToastOptions {
5
- title: string;
6
- icon?: 'success' | 'error' | 'loading' | 'none';
7
- image?: string;
8
- duration?: number;
9
- mask?: boolean;
10
- position?: 'top' | 'center' | 'bottom';
11
- }
12
- export interface ShowModalOptions {
13
- title?: string;
14
- content?: string;
15
- showCancel?: boolean;
16
- cancelText?: string;
17
- cancelColor?: string;
18
- confirmText?: string;
19
- confirmColor?: string;
20
- }
21
- export interface ModalResult {
22
- confirm: boolean;
23
- cancel: boolean;
24
- }
25
- export interface ShowActionSheetOptions {
26
- itemList: string[];
27
- itemColor?: string;
28
- }
29
- export interface ActionSheetResult {
30
- tapIndex: number;
31
- }
32
- export type PageQueryValue = string | number | boolean | null | undefined;
33
- export type PageQuery = Record<string, PageQueryValue>;
34
- /**
35
- * Target page for `navigateTo` / `redirectTo` / `switchTab` / `reLaunch`.
36
- *
37
- * Pass **exactly one** of `page` or `path` — there is **no `url` field**:
38
- * - `page` — a configured page **name** from `lingxia.yaml` / `lxapp.json`
39
- * (e.g. `"pullToRefresh"`), resolved to its route by the page registry.
40
- * - `path` — the full page **route**, e.g. `"/pages/pulltorefresh/index"`.
41
- *
42
- * Both are discoverable with `lxdev lxapp pages`, which lists every page's
43
- * `name` and `path`; `lxdev lxapp nav to|relaunch|redirect|switch-tab <name>`
44
- * drives navigation by name when automating.
45
- */
46
- export type PageTargetOptions = {
47
- /**
48
- * Configured page **name** from `lingxia.yaml` / `lxapp.json`
49
- * (e.g. `"pullToRefresh"`). Mutually exclusive with `path`.
50
- */
51
- page: string;
52
- path?: never;
53
- query?: PageQuery;
54
- } | {
55
- /**
56
- * Full page **route**, e.g. `"/pages/pulltorefresh/index"`.
57
- * Mutually exclusive with `page`.
58
- */
59
- path: string;
60
- page?: never;
61
- query?: PageQuery;
62
- };
63
- export type NavigateToOptions = PageTargetOptions;
64
- export interface NavigateBackOptions {
65
- delta: number;
66
- }
67
- export type RedirectToOptions = PageTargetOptions;
68
- export type SwitchTabOptions = PageTargetOptions;
69
- export type ReLaunchOptions = PageTargetOptions;
70
- export interface SetNavigationBarTitleOptions {
71
- title: string;
72
- }
73
- export interface SetNavigationBarColorOptions {
74
- frontColor: string;
75
- backgroundColor: string;
76
- }
77
- export interface TabBarRedDotOptions {
78
- index: number;
79
- }
80
- export interface SetTabBarBadgeOptions {
81
- index: number;
82
- text: string;
83
- }
84
- export interface RemoveTabBarBadgeOptions {
85
- index: number;
86
- }
87
- export interface SetTabBarStyleOptions {
88
- color?: string;
89
- selectedColor?: string;
90
- backgroundColor?: string;
91
- borderStyle?: string;
92
- }
93
- export interface SetTabBarItemOptions {
94
- index: number;
95
- text?: string;
96
- iconPath?: string;
97
- selectedIconPath?: string;
98
- }
99
- /**
100
- * Size hint for an overlay surface (aside / float).
101
- *
102
- * - number: absolute px, must be > 0
103
- * - `${number}%`: percentage of the container, 0 < N ≤ 100
104
- */
105
- export type OverlaySurfaceSizeValue = number | `${number}%`;
106
- export interface OverlaySurfaceSize {
107
- /** Width hint. */
108
- width?: OverlaySurfaceSizeValue;
109
- /** Height hint. */
110
- height?: OverlaySurfaceSizeValue;
111
- }
112
- /** Edge an aside docks to; the Host decides the realized form by screen size. */
113
- export type SurfaceEdge = 'left' | 'right' | 'top' | 'bottom';
114
- /** Where a float popup anchors (default `center`). */
115
- export type SurfaceFloatPosition = 'center' | 'top' | 'bottom' | 'left' | 'right';
116
- /**
117
- * The window's adaptive context, delivered to `lx.onSurfaceContext()` so an
118
- * lxapp can self-adapt (e.g. switch column count by `sizeClass`).
119
- */
120
- export interface SurfaceContext {
121
- /** compact (<600) / medium (600–840) / expanded (>840), with hysteresis. */
122
- sizeClass: 'compact' | 'medium' | 'expanded';
123
- /** In compact, the bottom region belongs to the app content. */
124
- bottomOwner: 'app';
125
- }
126
- export interface CapsuleRect {
127
- width?: number;
128
- height?: number;
129
- top?: number;
130
- right?: number;
131
- bottom?: number;
132
- left?: number;
133
- }
134
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,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G,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAElF;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,4EAA4E;IAC5E,SAAS,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC7C,gEAAgE;IAChE,WAAW,EAAE,KAAK,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
package/dist/ui/index.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * UI feedback, navigation, and surface control APIs.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Runtime update APIs.
3
- */
4
- export interface UpdateManager {
5
- applyUpdate(): void;
6
- onUpdateReady(callback: (info: UpdateReadyInfo) => void): void;
7
- onUpdateFailed(callback: (info: UpdateFailedInfo) => void): void;
8
- }
9
- export interface UpdateReadyInfo {
10
- version?: string;
11
- isForceUpdate?: boolean;
12
- channel?: "release" | "preview" | "developer" | string;
13
- }
14
- export interface UpdateFailedInfo extends UpdateReadyInfo {
15
- error?: string;
16
- }
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/update/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,aAAa;IAC5B,WAAW,IAAI,IAAI,CAAC;IACpB,aAAa,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,GAAG,IAAI,CAAC;IAC/D,cAAc,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,GAAG,IAAI,CAAC;CAClE;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;CACxD;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * Runtime update APIs.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/update/index.ts"],"names":[],"mappings":";AAAA;;GAEG"}