@fkn/lib 0.5.5 → 0.6.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.
Files changed (116) hide show
  1. package/account.cjs +1 -1
  2. package/account.d.ts +9 -11
  3. package/account.js +2 -2
  4. package/api-BYUraih6.d.ts +524 -0
  5. package/{api-CDb2pv7C.cjs → api-DD5v1qP9.cjs} +1 -1
  6. package/{background-DvQm1JHR.js → background-BVBbBOmL.js} +41 -68
  7. package/background-B_VgpARk.cjs +1 -0
  8. package/cloud/dgram.cjs +1 -1
  9. package/cloud/dgram.d.ts +2 -541
  10. package/cloud/dgram.js +1 -3
  11. package/cloud/dns.cjs +1 -1
  12. package/cloud/dns.d.ts +3 -12
  13. package/cloud/dns.js +0 -1
  14. package/cloud/fs/promises.cjs +1 -1
  15. package/cloud/fs/promises.d.ts +7 -43
  16. package/cloud/fs/promises.js +0 -3
  17. package/cloud/fs.cjs +1 -1
  18. package/cloud/fs.d.ts +3 -75
  19. package/cloud/fs.js +3 -4
  20. package/cloud/http.cjs +1 -1
  21. package/cloud/http.d.ts +2 -767
  22. package/cloud/http.js +0 -3
  23. package/cloud/net.cjs +1 -1
  24. package/cloud/net.d.ts +2 -606
  25. package/cloud/net.js +2 -3
  26. package/cloud-5o7yJHeX.cjs +1 -0
  27. package/cloud-BFyf2uC7.js +112 -0
  28. package/cloud-gklfa4ZN.d.ts +41 -0
  29. package/cloud.cjs +1 -1
  30. package/cloud.d.ts +7 -1053
  31. package/cloud.js +8 -12
  32. package/{connect-button-poDZVmq2.cjs → connect-button-BBEjXzB3.cjs} +1 -1
  33. package/connect-button-D8KXSL6s.d.ts +4 -0
  34. package/desktop.cjs +1 -1
  35. package/desktop.d.ts +37 -34
  36. package/desktop.js +1 -1
  37. package/dgram-CE43gJq9.cjs +1 -0
  38. package/{dgram-c_Xk7ckJ.js → dgram-wtjARbt0.js} +3 -3
  39. package/dgram.cjs +1 -1
  40. package/dgram.d.ts +83 -533
  41. package/dgram.js +1 -3
  42. package/dns.cjs +1 -1
  43. package/dns.d.ts +9 -9
  44. package/dns.js +2 -2
  45. package/extension-3pxUYwrA.d.ts +16 -0
  46. package/extension-CPj10qwa.js +67 -0
  47. package/extension-D-NUXxzF.cjs +1 -0
  48. package/extension.cjs +1 -1
  49. package/extension.d.ts +3 -859
  50. package/extension.js +3 -5
  51. package/fs/promises.cjs +1 -1
  52. package/fs/promises.d.ts +8 -63
  53. package/fs/promises.js +1 -4
  54. package/fs-BfmfMBiw.cjs +1 -0
  55. package/{fs-BQs-x3_j.js → fs-D6nNf1mR.js} +4 -4
  56. package/fs-K7ROdxDx.d.ts +41 -0
  57. package/fs.cjs +1 -1
  58. package/fs.d.ts +81 -131
  59. package/fs.js +1 -4
  60. package/http.cjs +2 -2
  61. package/http.d.ts +152 -733
  62. package/http.js +7 -7
  63. package/index-BJztAQIP.d.ts +721 -0
  64. package/index-C6ZoDJg8.d.ts +31 -0
  65. package/index.cjs +1 -1
  66. package/index.d.ts +25 -2313
  67. package/index.js +23 -26
  68. package/lookup-BtwWaCZJ.d.ts +7 -0
  69. package/net-BDW1AVX1.d.ts +140 -0
  70. package/net-CpuAhaQC.cjs +1 -0
  71. package/{net-Bl6_W3bd.js → net-DKMWPXb_.js} +3 -3
  72. package/net.cjs +1 -1
  73. package/net.d.ts +2 -606
  74. package/net.js +2 -3
  75. package/{node-fs-DQn1TGJz.cjs → node-fs-C0eKnboT.cjs} +1 -1
  76. package/{node-fs-CdKPXPtW.js → node-fs-Dbf93qP7.js} +1 -1
  77. package/opfs/promises.cjs +1 -1
  78. package/opfs/promises.d.ts +8 -63
  79. package/opfs/promises.js +0 -1
  80. package/{opfs-BfcYLPGb.js → opfs-7_GmzQ93.js} +1 -1
  81. package/opfs-uClkgnb5.cjs +1 -0
  82. package/opfs.cjs +1 -1
  83. package/opfs.d.ts +80 -130
  84. package/opfs.js +3 -3
  85. package/package.json +6 -1
  86. package/packages-D36R2vBv.d.ts +108 -0
  87. package/packages.cjs +1 -0
  88. package/packages.d.ts +2 -0
  89. package/packages.js +150 -0
  90. package/{locator-9s7jNIA2.js → proxy-C8SG1Beo.js} +542 -344
  91. package/proxy-bPaU3-Cz.cjs +53 -0
  92. package/react.cjs +1 -1
  93. package/react.d.ts +11 -9
  94. package/react.js +1 -1
  95. package/{chunk-CPXzm0be.js → rolldown-runtime-DF993M8W.js} +1 -1
  96. package/rolldown-runtime-Doa5O59j.cjs +1 -0
  97. package/storage-OkwsFLN1.cjs +1 -0
  98. package/{storage-BcJfnkm3.js → storage-TmeyhZGt.js} +2 -2
  99. package/{utils-BsNRWMfl.cjs → utils-CoimMjf9.cjs} +1 -1
  100. package/background-CbU8TkWo.cjs +0 -1
  101. package/chunk-B6C_zzib.cjs +0 -1
  102. package/cloud-CWg9zCWm.cjs +0 -1
  103. package/cloud-eLyGYzbA.js +0 -33
  104. package/dgram-B3WC4VdJ.cjs +0 -1
  105. package/extension-BLkZiaAP.js +0 -253
  106. package/extension-DAiRg5ny.cjs +0 -1
  107. package/fs-DI1maxcZ.cjs +0 -1
  108. package/locator-CHfEe3Jv.cjs +0 -53
  109. package/net-C5kWnI4C.cjs +0 -1
  110. package/opfs-Dsi4FkJU.cjs +0 -1
  111. package/proxy-A9UvWUaF.cjs +0 -1
  112. package/proxy-wiZN4eTR.js +0 -14
  113. package/storage-C2-_-bTO.cjs +0 -1
  114. /package/{api-ByfayMm1.js → api--bnCFd4w.js} +0 -0
  115. /package/{connect-button-B_63ldmg.js → connect-button-Ds9KpXHe.js} +0 -0
  116. /package/{utils-CNydj3OT.js → utils-DPtyxGQu.js} +0 -0
@@ -0,0 +1,721 @@
1
+ import { BoxBase, Capable, DefaultRevivableModules, RevivableContext, UnderlyingType } from "osra";
2
+
3
+ //#region node_modules/@mfkn/web-extension/lib/lib/fetch.d.ts
4
+ declare const fetchPermission: {
5
+ readonly scope: 'network.fetch';
6
+ readonly category: 'network';
7
+ readonly severity: 0;
8
+ readonly title: 'Fetch data from other sites';
9
+ readonly description: 'Lets the app download public data from other websites directly, past the usual cross-origin limits.';
10
+ };
11
+ declare const fetchCredentialedPermission: {
12
+ readonly scope: 'network.fetchCredentialed';
13
+ readonly category: 'network';
14
+ readonly severity: 3;
15
+ readonly unsafe: true;
16
+ readonly title: 'Fetch from other sites, signed in as you';
17
+ readonly description: 'Lets the app fetch other sites using your logged-in session cookies, so it can read data only you should see.';
18
+ };
19
+ declare const fetchLocalPermission: {
20
+ readonly scope: 'network.fetchLocal';
21
+ readonly category: 'network';
22
+ readonly severity: 3;
23
+ readonly unsafe: true;
24
+ readonly title: 'Access devices on your local network';
25
+ readonly description: 'Lets the app reach devices and services on your home or work network, which websites normally cannot touch.';
26
+ };
27
+ declare const isLocalNetworkUrl: (raw: string) => boolean;
28
+ type ProxyFetchRequest = {
29
+ url: string;
30
+ method: string;
31
+ headers: [string, string][];
32
+ body: ArrayBuffer | null;
33
+ credentials: 'include' | 'omit';
34
+ redirect: RequestRedirect;
35
+ unsafeHeaders?: [string, string][];
36
+ reason?: string;
37
+ signal?: AbortSignal;
38
+ };
39
+ type FetchInit = RequestInit & {
40
+ reason?: string;
41
+ };
42
+ declare const isBlockedFetchUrl: (raw: string) => boolean;
43
+ declare const assertFetchableUrl: (raw: string) => void;
44
+ declare const fetch: (input: RequestInfo | URL, init?: FetchInit) => Promise<Response>;
45
+ //#endregion
46
+ //#region node_modules/@mfkn/web-extension/lib/lib/cookies.d.ts
47
+ declare const readCookiePermission: {
48
+ readonly scope: 'network.readCookie';
49
+ readonly category: 'network';
50
+ readonly severity: 3;
51
+ readonly unsafe: true;
52
+ readonly title: 'Read a site’s cookie';
53
+ readonly description: 'Lets the app read a named cookie from another site, which can include the login token only that site should see.';
54
+ };
55
+ type CookieDetails = {
56
+ url: string;
57
+ name: string;
58
+ };
59
+ type SiteCookie = {
60
+ name: string;
61
+ value: string;
62
+ };
63
+ declare const cookies: {
64
+ get: (details: CookieDetails) => Promise<SiteCookie | null>;
65
+ };
66
+ //#endregion
67
+ //#region node_modules/@mfkn/web-extension/lib/lib/request-rules.d.ts
68
+ declare const modifyRequestHeadersPermission: {
69
+ readonly scope: 'network.modifyRequestHeaders';
70
+ readonly category: 'network';
71
+ readonly severity: 2;
72
+ readonly unsafe: true;
73
+ readonly title: 'Rewrite request headers to other sites';
74
+ readonly description: 'Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites.';
75
+ };
76
+ type HeaderOperation = {
77
+ header: string;
78
+ operation: 'set' | 'remove';
79
+ value?: string;
80
+ };
81
+ type RequestHeaderRule = {
82
+ domains: string[];
83
+ requestHeaders: HeaderOperation[];
84
+ reason?: string;
85
+ };
86
+ declare const setRequestHeaderRule: (rule: RequestHeaderRule) => Promise<{
87
+ ruleId: number;
88
+ }>;
89
+ declare const removeRequestHeaderRule: (ruleId: number) => Promise<void>;
90
+ //#endregion
91
+ //#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/utils/extract.d.ts
92
+ type ExtractType<M> = M extends {
93
+ type: infer T extends string;
94
+ } ? T : never;
95
+ type ExtractResolverArgs<M> = M extends {
96
+ resolve: (context: any, ...args: infer A) => Element[];
97
+ } ? A : never;
98
+ type ExtractOperationArgs<M> = M extends {
99
+ resolve: (context: any, ...args: infer A) => any;
100
+ } ? A : never;
101
+ type ExtractResolverReturn<M> = M extends {
102
+ resolve: (context: any, ...args: any[]) => infer R;
103
+ } ? R : never;
104
+ declare namespace locator_d_exports {
105
+ export { render$7 as render, resolve$17 as resolve, type$18 as type };
106
+ }
107
+ declare const type$18: 'locator';
108
+ declare const resolve$17: (context: LocatorContext, selector: string) => Element[];
109
+ declare const render$7: SelectorRenderer;
110
+ declare namespace get_by_role_d_exports {
111
+ export { render$6 as render, resolve$16 as resolve, type$17 as type };
112
+ }
113
+ declare const type$17: 'getByRole';
114
+ declare const resolve$16: (context: LocatorContext, role: string) => Element[];
115
+ declare const render$6: SelectorRenderer;
116
+ declare namespace get_by_text_d_exports {
117
+ export { render$5 as render, resolve$15 as resolve, type$16 as type };
118
+ }
119
+ declare const type$16: 'getByText';
120
+ declare const resolve$15: (context: LocatorContext, text: string) => Element[];
121
+ declare const render$5: SelectorRenderer;
122
+ declare namespace get_by_test_id_d_exports {
123
+ export { render$4 as render, resolve$14 as resolve, type$15 as type };
124
+ }
125
+ declare const type$15: 'getByTestId';
126
+ declare const resolve$14: (context: LocatorContext, testId: string) => Element[];
127
+ declare const render$4: SelectorRenderer;
128
+ declare namespace first_d_exports {
129
+ export { render$3 as render, resolve$13 as resolve, type$14 as type };
130
+ }
131
+ declare const type$14: 'first';
132
+ declare const resolve$13: (context: LocatorContext) => Element[];
133
+ declare const render$3: SelectorRenderer;
134
+ declare namespace nth_d_exports {
135
+ export { render$2 as render, resolve$12 as resolve, type$13 as type };
136
+ }
137
+ declare const type$13: 'nth';
138
+ declare const resolve$12: (context: LocatorContext, index: number) => Element[];
139
+ declare const render$2: SelectorRenderer;
140
+ declare namespace click_d_exports {
141
+ export { permission$9 as permission, resolve$11 as resolve, type$12 as type };
142
+ }
143
+ declare const type$12: 'click';
144
+ declare const permission$9: {
145
+ readonly scope: 'act.click';
146
+ readonly category: 'act';
147
+ readonly severity: 3;
148
+ readonly title: 'Click on the page';
149
+ readonly description: 'Lets the app press buttons or links for you.';
150
+ };
151
+ declare const resolve$11: (context: LocatorContext, options?: OperationTimeoutOptions & {
152
+ position?: {
153
+ x?: number;
154
+ y?: number;
155
+ };
156
+ }) => void;
157
+ declare namespace fill_d_exports {
158
+ export { permission$8 as permission, resolve$10 as resolve, type$11 as type };
159
+ }
160
+ declare const type$11: 'fill';
161
+ declare const permission$8: {
162
+ readonly scope: 'act.type';
163
+ readonly category: 'act';
164
+ readonly severity: 1;
165
+ readonly title: 'Type into a text field';
166
+ readonly description: 'Lets the app fill in form fields on your behalf.';
167
+ };
168
+ declare const resolve$10: (context: LocatorContext, value: string, _options?: OperationTimeoutOptions) => void;
169
+ declare namespace hover_d_exports {
170
+ export { permission$7 as permission, resolve$9 as resolve, type$10 as type };
171
+ }
172
+ declare const type$10: 'hover';
173
+ declare const permission$7: {
174
+ readonly scope: 'act.hover';
175
+ readonly category: 'act';
176
+ readonly severity: 1;
177
+ readonly title: 'Hover over the page';
178
+ readonly description: 'Lets the app point at things to reveal menus or tooltips.';
179
+ };
180
+ declare const resolve$9: (context: LocatorContext, options?: OperationTimeoutOptions & {
181
+ position?: {
182
+ x?: number;
183
+ y?: number;
184
+ };
185
+ }) => void;
186
+ declare namespace text_content_d_exports {
187
+ export { permission$6 as permission, resolve$8 as resolve, type$9 as type };
188
+ }
189
+ declare const type$9: 'textContent';
190
+ declare const permission$6: {
191
+ readonly scope: 'read.text';
192
+ readonly category: 'read';
193
+ readonly severity: 1;
194
+ readonly title: 'Read text from the page';
195
+ readonly description: 'Lets the app see the text shown on this page.';
196
+ };
197
+ declare const resolve$8: (context: LocatorContext, _options?: OperationTimeoutOptions) => string;
198
+ declare namespace is_visible_d_exports {
199
+ export { permission$5 as permission, resolve$7 as resolve, type$8 as type };
200
+ }
201
+ declare const type$8: 'isVisible';
202
+ declare const permission$5: {
203
+ readonly scope: 'read.visible';
204
+ readonly category: 'read';
205
+ readonly severity: 0;
206
+ readonly title: 'See what’s visible on the page';
207
+ readonly description: 'Lets the app check which elements are currently on screen.';
208
+ };
209
+ declare const resolve$7: (context: LocatorContext, _options?: OperationTimeoutOptions) => boolean;
210
+ declare namespace count_d_exports {
211
+ export { permission$4 as permission, resolve$6 as resolve, type$7 as type };
212
+ }
213
+ declare const type$7: 'count';
214
+ declare const permission$4: {
215
+ readonly scope: 'read.count';
216
+ readonly category: 'read';
217
+ readonly severity: 0;
218
+ readonly title: 'Count items on the page';
219
+ readonly description: 'Lets the app count how many matching elements are present.';
220
+ };
221
+ declare const resolve$6: (context: LocatorContext, _options?: OperationTimeoutOptions) => number;
222
+ declare namespace exists_d_exports {
223
+ export { permission$3 as permission, resolve$5 as resolve, type$6 as type };
224
+ }
225
+ declare const type$6: 'exists';
226
+ declare const permission$3: {
227
+ readonly scope: 'read.check';
228
+ readonly category: 'read';
229
+ readonly severity: 0;
230
+ readonly title: 'Check if something is on the page';
231
+ readonly description: 'Lets the app test whether a specific element exists.';
232
+ };
233
+ declare const resolve$5: (context: LocatorContext, _options?: OperationTimeoutOptions) => boolean;
234
+ declare namespace get_attribute_d_exports {
235
+ export { permission$2 as permission, resolve$4 as resolve, type$5 as type };
236
+ }
237
+ declare const type$5: 'getAttribute';
238
+ declare const permission$2: {
239
+ readonly scope: 'read.info';
240
+ readonly category: 'read';
241
+ readonly severity: 1;
242
+ readonly title: 'Read info from the page';
243
+ readonly description: 'Lets the app read the href value from a part of the page.';
244
+ };
245
+ declare const resolve$4: (context: LocatorContext, name: string, _options?: OperationTimeoutOptions) => string | null;
246
+ declare namespace video_element_d_exports {
247
+ export { permission$1 as permission, resolve$3 as resolve, type$4 as type };
248
+ }
249
+ declare const type$4: 'videoElement';
250
+ declare const permission$1: {
251
+ readonly scope: 'media.video';
252
+ readonly category: 'media';
253
+ readonly severity: 0;
254
+ readonly title: 'Control video playback';
255
+ readonly description: 'Lets the app play, pause, seek, and read the video on the page.';
256
+ };
257
+ declare const resolve$3: (context: LocatorContext, _options?: OperationTimeoutOptions) => RemoteVideoElement;
258
+ //#endregion
259
+ //#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/locator.d.ts
260
+ declare const locatorModule: {
261
+ readonly type: "locator";
262
+ readonly selectorModules: readonly [typeof locator_d_exports, {
263
+ readonly type: 'frameLocator';
264
+ readonly resolve: (context: LocatorContext, selector: string) => HTMLIFrameElement[];
265
+ readonly resolvePeer: BarrierResolver;
266
+ readonly render: SelectorRenderer;
267
+ readonly nextLocatorType: 'frameLocator';
268
+ }, typeof get_by_role_d_exports, typeof get_by_text_d_exports, typeof get_by_test_id_d_exports, typeof first_d_exports, typeof nth_d_exports];
269
+ readonly operationModules: readonly [typeof click_d_exports, typeof fill_d_exports, typeof hover_d_exports, typeof text_content_d_exports, typeof is_visible_d_exports, typeof count_d_exports, typeof exists_d_exports, typeof get_attribute_d_exports, typeof video_element_d_exports];
270
+ };
271
+ type LocatorModule = typeof locatorModule;
272
+ interface Locator extends LocatorChain<LocatorModule, Locator> {}
273
+ declare namespace frame_locator_d_exports {
274
+ export { render$1 as render, resolve$2 as resolve, resolvePeer$1 as resolvePeer, type$3 as type };
275
+ }
276
+ declare const type$3: 'frameLocator';
277
+ declare const resolve$2: (context: LocatorContext, selector: string) => HTMLIFrameElement[];
278
+ declare const resolvePeer$1: BarrierResolver;
279
+ declare const render$1: SelectorRenderer;
280
+ declare namespace owner_d_exports {
281
+ export { render, resolve$1 as resolve, resolvePeer, type$2 as type };
282
+ }
283
+ declare const type$2: 'owner';
284
+ declare const resolve$1: (_: LocatorContext) => never;
285
+ declare const resolvePeer: BarrierResolver;
286
+ declare const render: SelectorRenderer;
287
+ declare namespace add_style_tag_d_exports {
288
+ export { AddStyleTagOptions, appearPermission, appearUnsafePermission, permission, resolve, setInjectedStylesDisabled, type$1 as type };
289
+ }
290
+ declare const type$1: 'addStyleTag';
291
+ type AddStyleTagOptions = OperationTimeoutOptions & {
292
+ content: string;
293
+ noSanitize?: boolean;
294
+ };
295
+ declare const appearPermission: {
296
+ readonly scope: 'media.appear';
297
+ readonly category: 'media';
298
+ readonly severity: 0;
299
+ readonly title: 'Change page appearance';
300
+ readonly description: 'Lets the app restyle parts of the page (safely filtered).';
301
+ };
302
+ declare const appearUnsafePermission: {
303
+ readonly scope: 'media.appearU';
304
+ readonly category: 'media';
305
+ readonly severity: 2;
306
+ readonly unsafe: true;
307
+ readonly title: 'Change page appearance (unsafe)';
308
+ readonly description: 'Lets the app restyle the page WITHOUT safety filtering. Could be used to leak data over the network.';
309
+ };
310
+ declare const permission: (options?: AddStyleTagOptions) => {
311
+ readonly scope: 'media.appear';
312
+ readonly category: 'media';
313
+ readonly severity: 0;
314
+ readonly title: 'Change page appearance';
315
+ readonly description: 'Lets the app restyle parts of the page (safely filtered).';
316
+ } | {
317
+ readonly scope: 'media.appearU';
318
+ readonly category: 'media';
319
+ readonly severity: 2;
320
+ readonly unsafe: true;
321
+ readonly title: 'Change page appearance (unsafe)';
322
+ readonly description: 'Lets the app restyle the page WITHOUT safety filtering. Could be used to leak data over the network.';
323
+ };
324
+ declare const setInjectedStylesDisabled: (disabled: boolean) => void;
325
+ declare const resolve: (_context: LocatorContext, options: AddStyleTagOptions) => Promise<void>;
326
+ //#endregion
327
+ //#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/frame-locator.d.ts
328
+ declare const frameLocatorModule: {
329
+ readonly type: "frameLocator";
330
+ readonly selectorModules: readonly [{
331
+ readonly type: 'locator';
332
+ readonly resolve: (context: LocatorContext, selector: string) => Element[];
333
+ readonly render: SelectorRenderer;
334
+ readonly nextLocatorType: 'locator';
335
+ }, typeof frame_locator_d_exports, typeof owner_d_exports];
336
+ readonly operationModules: readonly [typeof add_style_tag_d_exports];
337
+ };
338
+ type FrameLocatorModule = typeof frameLocatorModule;
339
+ interface FrameLocator extends LocatorChain<FrameLocatorModule, FrameLocator> {}
340
+ //#endregion
341
+ //#region node_modules/@mfkn/web-extension/lib/utils/frame.d.ts
342
+ type FrameId = `${number}-${number}`;
343
+ //#endregion
344
+ //#region node_modules/@mfkn/web-extension/lib/permission/shared/permission.d.ts
345
+ type PermissionCategory = 'read' | 'act' | 'media' | 'embed' | 'network';
346
+ type PermissionSeverity = 0 | 1 | 2 | 3 | 4;
347
+ type Permission = {
348
+ scope: string;
349
+ category: PermissionCategory;
350
+ severity: PermissionSeverity;
351
+ title: string;
352
+ description: string;
353
+ unsafe?: boolean;
354
+ };
355
+ //#endregion
356
+ //#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/types.d.ts
357
+ type LocatorContext = {
358
+ elements: Element[];
359
+ };
360
+ type OperationTimeoutOptions = {
361
+ timeout?: number;
362
+ reason?: string;
363
+ };
364
+ type BarrierContext = {
365
+ parts: SelectorPart[];
366
+ selfIndex: number;
367
+ resolveLocal: (parts: SelectorPart[]) => Element[];
368
+ };
369
+ type BarrierResolver = (context: BarrierContext) => Promise<FrameId>;
370
+ type SelectorRenderResult = {
371
+ fragment: string;
372
+ separator?: 'descend' | 'frame-down' | 'frame-up';
373
+ };
374
+ type SelectorRenderer = (...args: any[]) => SelectorRenderResult;
375
+ type SelectorModule = {
376
+ type: string;
377
+ resolve: (context: LocatorContext, ...args: any[]) => Element[];
378
+ nextLocatorType?: 'locator' | 'frameLocator';
379
+ resolvePeer?: BarrierResolver;
380
+ render?: SelectorRenderer;
381
+ };
382
+ type OperationPermission = Permission | ((...args: any[]) => Permission);
383
+ type OperationModule = {
384
+ type: string;
385
+ resolve: (context: LocatorContext, ...args: any[]) => unknown;
386
+ permission: OperationPermission;
387
+ };
388
+ type LocatorKindModule = {
389
+ readonly type: string;
390
+ readonly selectorModules: readonly SelectorModule[];
391
+ readonly operationModules: readonly OperationModule[];
392
+ };
393
+ type LocatorModules = [LocatorModule, FrameLocatorModule];
394
+ type LocatorModuleUnion = LocatorModules[number];
395
+ type AnyOperationModule = LocatorModuleUnion['operationModules'][number];
396
+ type SelectorPart<L extends LocatorModuleUnion = LocatorModuleUnion> = L extends LocatorModuleUnion ? L['selectorModules'][number] extends infer M extends SelectorModule ? {
397
+ locatorType: L['type'];
398
+ type: ExtractType<M>;
399
+ args: ExtractResolverArgs<M>;
400
+ } : never : never;
401
+ type NextLocator<M> = M extends {
402
+ nextLocatorType: 'frameLocator';
403
+ } ? FrameLocator : M extends {
404
+ nextLocatorType: 'locator';
405
+ } ? Locator : never;
406
+ type LocatorChain<L extends LocatorKindModule, Self> = { [M in L['selectorModules'][number] as ExtractType<M>]: [NextLocator<M>] extends [never] ? (...args: ExtractResolverArgs<M>) => Self : (...args: ExtractResolverArgs<M>) => NextLocator<M> } & { [M in L['operationModules'][number] as ExtractType<M>]: (...args: ExtractOperationArgs<M>) => Promise<Awaited<ExtractResolverReturn<M>>> } & {
407
+ ensure: (operation: ExtractType<L['operationModules'][number]>, options?: {
408
+ reason?: string;
409
+ timeout?: number;
410
+ subtree?: boolean;
411
+ } & Record<string, unknown>) => Promise<void>;
412
+ };
413
+ type LocatorExecutor = (parts: SelectorPart[], operation: ExtractType<AnyOperationModule>, args: ExtractOperationArgs<AnyOperationModule>) => Promise<unknown>;
414
+ type PermissionEnsurer = (parts: SelectorPart[], operation: string, args: unknown[]) => Promise<void>;
415
+ //#endregion
416
+ //#region node_modules/@mfkn/web-extension/lib/lib/frame-url.d.ts
417
+ declare const isBlockedFrameUrl: (raw: string) => boolean;
418
+ declare const assertAttachableFrameUrl: (raw: string) => void;
419
+ declare const assertLockdownApplicable: ({
420
+ src,
421
+ domains,
422
+ lockdown
423
+ }: {
424
+ src: string;
425
+ domains: string[];
426
+ lockdown: boolean;
427
+ }) => void;
428
+ //#endregion
429
+ //#region node_modules/@mfkn/web-extension/lib/lib/frame-core.d.ts
430
+ declare const attachFramePermission: {
431
+ readonly scope: 'embed.iframe';
432
+ readonly category: 'embed';
433
+ readonly severity: 0;
434
+ readonly title: 'Load another website inside this app';
435
+ readonly description: 'Lets the app embed external pages directly inside its own view.';
436
+ };
437
+ declare const gotoPermission: {
438
+ readonly scope: 'embed.open';
439
+ readonly category: 'embed';
440
+ readonly severity: 0;
441
+ readonly title: 'Open a website inside this app';
442
+ readonly description: 'Lets the app navigate to another site without leaving its window.';
443
+ };
444
+ type GotoOptions = {
445
+ waitUntil?: 'documentstart' | 'load';
446
+ domains?: string[];
447
+ };
448
+ type Frame = FrameLocator & {
449
+ goto(url: string, options?: GotoOptions): Promise<void>;
450
+ url(): string;
451
+ };
452
+ type AttachFrameOptions = {
453
+ iframe: HTMLIFrameElement;
454
+ domains?: string[];
455
+ syncCookies?: boolean;
456
+ lockdown?: boolean;
457
+ };
458
+ type FrameBackend = {
459
+ executeLocator: LocatorExecutor;
460
+ ensurePermission: PermissionEnsurer;
461
+ goto(url: string, options?: GotoOptions): Promise<void>;
462
+ url(): string;
463
+ };
464
+ declare const createFrame: (backend: FrameBackend) => Frame;
465
+ //#endregion
466
+ //#region node_modules/@mfkn/web-extension/lib/lib/frame.d.ts
467
+ declare const ATTACH_FRAME_EVENT_KEY = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY";
468
+ declare const attachFrame: ({
469
+ iframe,
470
+ domains,
471
+ syncCookies,
472
+ lockdown
473
+ }: AttachFrameOptions) => Promise<Frame>;
474
+ //#endregion
475
+ //#region node_modules/@mfkn/web-extension/lib/permission/shared/registry.d.ts
476
+ declare const PERMISSIONS: readonly [{
477
+ readonly scope: 'read.text';
478
+ readonly category: 'read';
479
+ readonly severity: 1;
480
+ readonly title: 'Read text from the page';
481
+ readonly description: 'Lets the app see the text shown on this page.';
482
+ }, {
483
+ readonly scope: 'read.info';
484
+ readonly category: 'read';
485
+ readonly severity: 1;
486
+ readonly title: 'Read info from the page';
487
+ readonly description: 'Lets the app read the href value from a part of the page.';
488
+ }, {
489
+ readonly scope: 'read.visible';
490
+ readonly category: 'read';
491
+ readonly severity: 0;
492
+ readonly title: 'See what’s visible on the page';
493
+ readonly description: 'Lets the app check which elements are currently on screen.';
494
+ }, {
495
+ readonly scope: 'read.check';
496
+ readonly category: 'read';
497
+ readonly severity: 0;
498
+ readonly title: 'Check if something is on the page';
499
+ readonly description: 'Lets the app test whether a specific element exists.';
500
+ }, {
501
+ readonly scope: 'read.count';
502
+ readonly category: 'read';
503
+ readonly severity: 0;
504
+ readonly title: 'Count items on the page';
505
+ readonly description: 'Lets the app count how many matching elements are present.';
506
+ }, {
507
+ readonly scope: 'act.click';
508
+ readonly category: 'act';
509
+ readonly severity: 3;
510
+ readonly title: 'Click on the page';
511
+ readonly description: 'Lets the app press buttons or links for you.';
512
+ }, {
513
+ readonly scope: 'act.type';
514
+ readonly category: 'act';
515
+ readonly severity: 1;
516
+ readonly title: 'Type into a text field';
517
+ readonly description: 'Lets the app fill in form fields on your behalf.';
518
+ }, {
519
+ readonly scope: 'act.hover';
520
+ readonly category: 'act';
521
+ readonly severity: 1;
522
+ readonly title: 'Hover over the page';
523
+ readonly description: 'Lets the app point at things to reveal menus or tooltips.';
524
+ }, {
525
+ readonly scope: 'media.video';
526
+ readonly category: 'media';
527
+ readonly severity: 0;
528
+ readonly title: 'Control video playback';
529
+ readonly description: 'Lets the app play, pause, seek, and read the video on the page.';
530
+ }, {
531
+ readonly scope: 'media.appear';
532
+ readonly category: 'media';
533
+ readonly severity: 0;
534
+ readonly title: 'Change page appearance';
535
+ readonly description: 'Lets the app restyle parts of the page (safely filtered).';
536
+ }, {
537
+ readonly scope: 'media.appearU';
538
+ readonly category: 'media';
539
+ readonly severity: 2;
540
+ readonly unsafe: true;
541
+ readonly title: 'Change page appearance (unsafe)';
542
+ readonly description: 'Lets the app restyle the page WITHOUT safety filtering. Could be used to leak data over the network.';
543
+ }, {
544
+ readonly scope: 'embed.iframe';
545
+ readonly category: 'embed';
546
+ readonly severity: 0;
547
+ readonly title: 'Load another website inside this app';
548
+ readonly description: 'Lets the app embed external pages directly inside its own view.';
549
+ }, {
550
+ readonly scope: 'embed.open';
551
+ readonly category: 'embed';
552
+ readonly severity: 0;
553
+ readonly title: 'Open a website inside this app';
554
+ readonly description: 'Lets the app navigate to another site without leaving its window.';
555
+ }, {
556
+ readonly scope: 'network.fetch';
557
+ readonly category: 'network';
558
+ readonly severity: 0;
559
+ readonly title: 'Fetch data from other sites';
560
+ readonly description: 'Lets the app download public data from other websites directly, past the usual cross-origin limits.';
561
+ }, {
562
+ readonly scope: 'network.fetchCredentialed';
563
+ readonly category: 'network';
564
+ readonly severity: 3;
565
+ readonly unsafe: true;
566
+ readonly title: 'Fetch from other sites, signed in as you';
567
+ readonly description: 'Lets the app fetch other sites using your logged-in session cookies, so it can read data only you should see.';
568
+ }, {
569
+ readonly scope: 'network.fetchLocal';
570
+ readonly category: 'network';
571
+ readonly severity: 3;
572
+ readonly unsafe: true;
573
+ readonly title: 'Access devices on your local network';
574
+ readonly description: 'Lets the app reach devices and services on your home or work network, which websites normally cannot touch.';
575
+ }, {
576
+ readonly scope: 'network.readCookie';
577
+ readonly category: 'network';
578
+ readonly severity: 3;
579
+ readonly unsafe: true;
580
+ readonly title: 'Read a site’s cookie';
581
+ readonly description: 'Lets the app read a named cookie from another site, which can include the login token only that site should see.';
582
+ }, {
583
+ readonly scope: 'network.modifyRequestHeaders';
584
+ readonly category: 'network';
585
+ readonly severity: 2;
586
+ readonly unsafe: true;
587
+ readonly title: 'Rewrite request headers to other sites';
588
+ readonly description: 'Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites.';
589
+ }];
590
+ type PermissionScope = (typeof PERMISSIONS)[number]['scope'];
591
+ //#endregion
592
+ //#region node_modules/@mfkn/web-extension/lib/lib/permissions.d.ts
593
+ type PermissionRequest = {
594
+ key: PermissionScope;
595
+ scope?: string;
596
+ reason?: string;
597
+ };
598
+ type PermissionGrant = {
599
+ key: PermissionScope;
600
+ scope: string;
601
+ allow: boolean;
602
+ };
603
+ declare const permissions: {
604
+ request: (requests: PermissionRequest[]) => Promise<PermissionGrant[]>;
605
+ };
606
+ declare namespace video_d_exports {
607
+ export { BoxedVideoElement, RemoteVideoElement, VideoElementState, box, createVideoElementHandle, isType, revive, type };
608
+ }
609
+ declare const type: 'videoElement';
610
+ type TimeRangesTuple = [number, number][];
611
+ type VideoElementState = {
612
+ currentTime: number;
613
+ volume: number;
614
+ muted: boolean;
615
+ playbackRate: number;
616
+ src: string;
617
+ loop: boolean;
618
+ autoplay: boolean;
619
+ preload: string;
620
+ poster: string;
621
+ disableRemotePlayback: boolean;
622
+ duration: number;
623
+ paused: boolean;
624
+ ended: boolean;
625
+ seeking: boolean;
626
+ readyState: number;
627
+ currentSrc: string;
628
+ buffered: TimeRangesTuple;
629
+ seekable: TimeRangesTuple;
630
+ error: {
631
+ code: number;
632
+ message: string;
633
+ } | null;
634
+ };
635
+ type RemoteVideoElement = EventTarget & {
636
+ currentTime: number;
637
+ volume: number;
638
+ muted: boolean;
639
+ playbackRate: number;
640
+ src: string;
641
+ loop: boolean;
642
+ autoplay: boolean;
643
+ preload: string;
644
+ poster: string;
645
+ disableRemotePlayback: boolean;
646
+ readonly duration: number;
647
+ readonly paused: boolean;
648
+ readonly ended: boolean;
649
+ readonly seeking: boolean;
650
+ readonly readyState: number;
651
+ readonly currentSrc: string;
652
+ readonly error: MediaError | null;
653
+ readonly buffered: TimeRanges;
654
+ readonly seekable: TimeRanges;
655
+ play(): Promise<void>;
656
+ pause(): void;
657
+ load(): void;
658
+ requestPictureInPicture(): Promise<void>;
659
+ exitPictureInPicture(): Promise<void>;
660
+ readonly HAVE_FUTURE_DATA: 3;
661
+ readonly HAVE_ENOUGH_DATA: 4;
662
+ };
663
+ type BoxedVideoElement = BoxBase<typeof type> & {
664
+ initialState: VideoElementState;
665
+ controller: Capable;
666
+ } & {
667
+ [UnderlyingType]: RemoteVideoElement;
668
+ };
669
+ declare const createVideoElementHandle: (element: HTMLVideoElement) => RemoteVideoElement;
670
+ declare const isType: (value: unknown) => value is RemoteVideoElement;
671
+ declare const box: <T extends RemoteVideoElement, T2 extends RevivableContext>(value: T, context: T2) => BoxedVideoElement;
672
+ declare const revive: <T extends BoxedVideoElement, T2 extends RevivableContext>(value: T, context: T2) => T[UnderlyingType];
673
+ //#endregion
674
+ //#region node_modules/@mfkn/web-extension/lib/lib/revivables/index.d.ts
675
+ declare const handleRevivableModules: (defaults: DefaultRevivableModules) => readonly [typeof video_d_exports, typeof import("osra/build/revivables/transfer"), typeof import("osra/build/revivables/identity"), typeof import("osra/build/revivables/array-buffer"), typeof import("osra/build/revivables/date"), typeof import("osra/build/revivables/headers"), typeof import("osra/build/revivables/error"), typeof import("osra/build/revivables/typed-array"), typeof import("osra/build/revivables/promise"), typeof import("osra/build/revivables/function"), typeof import("osra/build/revivables/message-port"), typeof import("osra/build/revivables/readable-stream"), typeof import("osra/build/revivables/writable-stream"), typeof import("osra/build/revivables/abort-signal"), typeof import("osra/build/revivables/response"), typeof import("osra/build/revivables/request"), typeof import("osra/build/revivables/map"), typeof import("osra/build/revivables/set"), typeof import("osra/build/revivables/bigint"), typeof import("osra/build/revivables/symbol"), typeof import("osra/build/revivables/event"), typeof import("osra/build/revivables/async-iterator"), {
676
+ readonly type: 'nonFiniteNumber';
677
+ readonly isType: (value: unknown) => value is number;
678
+ readonly box: (value: number, context: import("osra").RevivableContext<any>) => import("osra/build/revivables/json-primitives").BoxedNonFiniteNumber | number;
679
+ readonly revive: (value: import("osra/build/revivables/json-primitives").BoxedNonFiniteNumber, _context: import("osra").RevivableContext<any>) => number;
680
+ }, {
681
+ readonly type: 'undefined';
682
+ readonly isType: (value: unknown) => value is undefined;
683
+ readonly box: (value: undefined, context: import("osra").RevivableContext<any>) => import("osra/build/revivables/json-primitives").BoxedUndefined | undefined;
684
+ readonly revive: (_value: import("osra/build/revivables/json-primitives").BoxedUndefined, _context: import("osra").RevivableContext<any>) => undefined;
685
+ }, {
686
+ readonly type: 'clonable';
687
+ readonly capableOnly: true;
688
+ readonly isType: (value: unknown) => value is import("osra/build/revivables/fallbacks").Clonable;
689
+ readonly box: (value: import("osra/build/revivables/fallbacks").Clonable, _context: import("osra").RevivableContext<any>) => import("osra/build/revivables/fallbacks").Clonable;
690
+ readonly revive: (value: import("osra/build/revivables/fallbacks").BoxedClonable, _context: import("osra").RevivableContext<any>) => import("osra/build/revivables/fallbacks").Clonable;
691
+ }, {
692
+ readonly type: 'transferable';
693
+ readonly capableOnly: true;
694
+ readonly isType: (value: unknown) => value is import("osra/build/revivables/fallbacks").Transferable;
695
+ readonly box: (value: import("osra/build/revivables/fallbacks").Transferable, _context: import("osra").RevivableContext<any>) => import("osra/build/revivables/fallbacks").Transferable;
696
+ readonly revive: (value: import("osra/build/revivables/fallbacks").BoxedTransferable, _context: import("osra").RevivableContext<any>) => import("osra/build/revivables/fallbacks").Transferable;
697
+ }, {
698
+ readonly type: 'blobGuard';
699
+ readonly isType: (value: unknown) => value is never;
700
+ readonly box: (value: never, context: import("osra").RevivableContext<any>) => Blob;
701
+ readonly revive: (value: import("osra/build/revivables/fallbacks").BoxedBlobGuard, _context: import("osra").RevivableContext<any>) => Blob;
702
+ }, typeof import("osra/build/revivables/event-target"), {
703
+ readonly type: 'unclonable';
704
+ readonly isType: (value: unknown) => value is never;
705
+ readonly box: (_value: never, _context: import("osra").RevivableContext<any>) => import("osra/build/revivables/fallbacks").BoxedUnclonable;
706
+ readonly revive: (_value: import("osra/build/revivables/fallbacks").BoxedUnclonable, _context: import("osra").RevivableContext<any>) => Record<string, never>;
707
+ }];
708
+ //#endregion
709
+ //#region node_modules/@mfkn/web-extension/lib/utils/extension.d.ts
710
+ type ExtensionEventMap = {
711
+ statuschange: CustomEvent<{
712
+ enabled: boolean;
713
+ }>;
714
+ };
715
+ declare const extension: import("osra").TypedEventTarget<ExtensionEventMap>;
716
+ declare const isExtensionExposed: () => boolean;
717
+ type MissingExtensionHandler = () => Promise<void>;
718
+ declare const setMissingExtensionHandler: (handler: MissingExtensionHandler | null) => void;
719
+ declare const waitForExtensionExposure: (timeout?: number) => Promise<void>;
720
+ //#endregion
721
+ export { RequestHeaderRule as A, assertFetchableUrl as B, attachFramePermission as C, assertLockdownApplicable as D, assertAttachableFrameUrl as E, SiteCookie as F, isBlockedFetchUrl as G, fetchCredentialedPermission as H, cookies as I, isLocalNetworkUrl as K, readCookiePermission as L, removeRequestHeaderRule as M, setRequestHeaderRule as N, isBlockedFrameUrl as O, CookieDetails as P, FetchInit as R, GotoOptions as S, gotoPermission as T, fetchLocalPermission as U, fetch as V, fetchPermission as W, ATTACH_FRAME_EVENT_KEY as _, handleRevivableModules as a, Frame as b, VideoElementState as c, isType as d, revive as f, permissions as g, PermissionRequest as h, waitForExtensionExposure as i, modifyRequestHeadersPermission as j, HeaderOperation as k, box as l, PermissionGrant as m, isExtensionExposed as n, BoxedVideoElement as o, type as p, setMissingExtensionHandler as r, RemoteVideoElement as s, extension as t, createVideoElementHandle as u, attachFrame as v, createFrame as w, FrameBackend as x, AttachFrameOptions as y, ProxyFetchRequest as z };