@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.
- package/account.cjs +1 -1
- package/account.d.ts +9 -11
- package/account.js +2 -2
- package/api-BYUraih6.d.ts +524 -0
- package/{api-CDb2pv7C.cjs → api-DD5v1qP9.cjs} +1 -1
- package/{background-DvQm1JHR.js → background-BVBbBOmL.js} +41 -68
- package/background-B_VgpARk.cjs +1 -0
- package/cloud/dgram.cjs +1 -1
- package/cloud/dgram.d.ts +2 -541
- package/cloud/dgram.js +1 -3
- package/cloud/dns.cjs +1 -1
- package/cloud/dns.d.ts +3 -12
- package/cloud/dns.js +0 -1
- package/cloud/fs/promises.cjs +1 -1
- package/cloud/fs/promises.d.ts +7 -43
- package/cloud/fs/promises.js +0 -3
- package/cloud/fs.cjs +1 -1
- package/cloud/fs.d.ts +3 -75
- package/cloud/fs.js +3 -4
- package/cloud/http.cjs +1 -1
- package/cloud/http.d.ts +2 -767
- package/cloud/http.js +0 -3
- package/cloud/net.cjs +1 -1
- package/cloud/net.d.ts +2 -606
- package/cloud/net.js +2 -3
- package/cloud-5o7yJHeX.cjs +1 -0
- package/cloud-BFyf2uC7.js +112 -0
- package/cloud-gklfa4ZN.d.ts +41 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +7 -1053
- package/cloud.js +8 -12
- package/{connect-button-poDZVmq2.cjs → connect-button-BBEjXzB3.cjs} +1 -1
- package/connect-button-D8KXSL6s.d.ts +4 -0
- package/desktop.cjs +1 -1
- package/desktop.d.ts +37 -34
- package/desktop.js +1 -1
- package/dgram-CE43gJq9.cjs +1 -0
- package/{dgram-c_Xk7ckJ.js → dgram-wtjARbt0.js} +3 -3
- package/dgram.cjs +1 -1
- package/dgram.d.ts +83 -533
- package/dgram.js +1 -3
- package/dns.cjs +1 -1
- package/dns.d.ts +9 -9
- package/dns.js +2 -2
- package/extension-3pxUYwrA.d.ts +16 -0
- package/extension-CPj10qwa.js +67 -0
- package/extension-D-NUXxzF.cjs +1 -0
- package/extension.cjs +1 -1
- package/extension.d.ts +3 -859
- package/extension.js +3 -5
- package/fs/promises.cjs +1 -1
- package/fs/promises.d.ts +8 -63
- package/fs/promises.js +1 -4
- package/fs-BfmfMBiw.cjs +1 -0
- package/{fs-BQs-x3_j.js → fs-D6nNf1mR.js} +4 -4
- package/fs-K7ROdxDx.d.ts +41 -0
- package/fs.cjs +1 -1
- package/fs.d.ts +81 -131
- package/fs.js +1 -4
- package/http.cjs +2 -2
- package/http.d.ts +152 -733
- package/http.js +7 -7
- package/index-BJztAQIP.d.ts +721 -0
- package/index-C6ZoDJg8.d.ts +31 -0
- package/index.cjs +1 -1
- package/index.d.ts +25 -2313
- package/index.js +23 -26
- package/lookup-BtwWaCZJ.d.ts +7 -0
- package/net-BDW1AVX1.d.ts +140 -0
- package/net-CpuAhaQC.cjs +1 -0
- package/{net-Bl6_W3bd.js → net-DKMWPXb_.js} +3 -3
- package/net.cjs +1 -1
- package/net.d.ts +2 -606
- package/net.js +2 -3
- package/{node-fs-DQn1TGJz.cjs → node-fs-C0eKnboT.cjs} +1 -1
- package/{node-fs-CdKPXPtW.js → node-fs-Dbf93qP7.js} +1 -1
- package/opfs/promises.cjs +1 -1
- package/opfs/promises.d.ts +8 -63
- package/opfs/promises.js +0 -1
- package/{opfs-BfcYLPGb.js → opfs-7_GmzQ93.js} +1 -1
- package/opfs-uClkgnb5.cjs +1 -0
- package/opfs.cjs +1 -1
- package/opfs.d.ts +80 -130
- package/opfs.js +3 -3
- package/package.json +6 -1
- package/packages-D36R2vBv.d.ts +108 -0
- package/packages.cjs +1 -0
- package/packages.d.ts +2 -0
- package/packages.js +150 -0
- package/{locator-9s7jNIA2.js → proxy-C8SG1Beo.js} +542 -344
- package/proxy-bPaU3-Cz.cjs +53 -0
- package/react.cjs +1 -1
- package/react.d.ts +11 -9
- package/react.js +1 -1
- package/{chunk-CPXzm0be.js → rolldown-runtime-DF993M8W.js} +1 -1
- package/rolldown-runtime-Doa5O59j.cjs +1 -0
- package/storage-OkwsFLN1.cjs +1 -0
- package/{storage-BcJfnkm3.js → storage-TmeyhZGt.js} +2 -2
- package/{utils-BsNRWMfl.cjs → utils-CoimMjf9.cjs} +1 -1
- package/background-CbU8TkWo.cjs +0 -1
- package/chunk-B6C_zzib.cjs +0 -1
- package/cloud-CWg9zCWm.cjs +0 -1
- package/cloud-eLyGYzbA.js +0 -33
- package/dgram-B3WC4VdJ.cjs +0 -1
- package/extension-BLkZiaAP.js +0 -253
- package/extension-DAiRg5ny.cjs +0 -1
- package/fs-DI1maxcZ.cjs +0 -1
- package/locator-CHfEe3Jv.cjs +0 -53
- package/net-C5kWnI4C.cjs +0 -1
- package/opfs-Dsi4FkJU.cjs +0 -1
- package/proxy-A9UvWUaF.cjs +0 -1
- package/proxy-wiZN4eTR.js +0 -14
- package/storage-C2-_-bTO.cjs +0 -1
- /package/{api-ByfayMm1.js → api--bnCFd4w.js} +0 -0
- /package/{connect-button-B_63ldmg.js → connect-button-Ds9KpXHe.js} +0 -0
- /package/{utils-CNydj3OT.js → utils-DPtyxGQu.js} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { A as RequestHeaderRule, B as assertFetchableUrl, C as attachFramePermission, D as assertLockdownApplicable, E as assertAttachableFrameUrl, F as SiteCookie, G as isBlockedFetchUrl, H as fetchCredentialedPermission, I as cookies, K as isLocalNetworkUrl, L as readCookiePermission, M as removeRequestHeaderRule, N as setRequestHeaderRule, O as isBlockedFrameUrl, P as CookieDetails, R as FetchInit, S as GotoOptions, T as gotoPermission, U as fetchLocalPermission, V as fetch$1, W as fetchPermission, _ as ATTACH_FRAME_EVENT_KEY, a as handleRevivableModules, b as Frame, c as VideoElementState, d as isType, f as revive, g as permissions, h as PermissionRequest, i as waitForExtensionExposure, j as modifyRequestHeadersPermission, k as HeaderOperation, l as box, m as PermissionGrant, n as isExtensionExposed, o as BoxedVideoElement, p as type, r as setMissingExtensionHandler, s as RemoteVideoElement, t as extension, u as createVideoElementHandle, v as attachFrame, w as createFrame, x as FrameBackend, y as AttachFrameOptions, z as ProxyFetchRequest } from "./index-BJztAQIP.js";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/extension-prompt.d.ts
|
|
4
|
+
declare const promptInstall: (reason?: string) => Promise<boolean>;
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/lib/auto.d.ts
|
|
7
|
+
declare const isExtensionAvailable: () => boolean;
|
|
8
|
+
declare const fetch: (input: RequestInfo | URL, init?: RequestInit & {
|
|
9
|
+
reason?: string;
|
|
10
|
+
render?: boolean;
|
|
11
|
+
}) => Promise<Response>;
|
|
12
|
+
declare namespace extension_d_exports {
|
|
13
|
+
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, BoxedVideoElement, CookieDetails, FetchInit, Frame, FrameBackend, GotoOptions, HeaderOperation, PermissionGrant, PermissionRequest, ProxyFetchRequest, RemoteVideoElement, RequestHeaderRule, SiteCookie, VideoElementState, assertAttachableFrameUrl, assertFetchableUrl, assertLockdownApplicable, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch$1 as fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, type, waitForExtensionExposure };
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { promptInstall as i, fetch as n, isExtensionAvailable as r, extension_d_exports as t };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { n as e } from "./rolldown-runtime-DF993M8W.js";
|
|
2
|
+
import { A as t, B as n, C as r, D as i, E as a, F as o, H as s, I as c, L as l, M as u, N as d, O as f, P as p, R as m, S as h, T as g, V as _, a as v, c as y, d as b, i as x, j as S, k as C, l as w, n as T, o as E, r as D, s as O, t as k, u as A, w as j, x as M, z as N } from "./proxy-C8SG1Beo.js";
|
|
3
|
+
import { t as P } from "./api--bnCFd4w.js";
|
|
4
|
+
import { available as F, fetch as I } from "./desktop.js";
|
|
5
|
+
//#region src/lib/extension-prompt.ts
|
|
6
|
+
var L = async (e) => {
|
|
7
|
+
if (typeof window > "u") return !1;
|
|
8
|
+
if (p()) return !0;
|
|
9
|
+
let t = await P, n = null, r = new Promise((e) => {
|
|
10
|
+
n = () => {
|
|
11
|
+
p() && e(!0);
|
|
12
|
+
}, d.addEventListener("statuschange", n);
|
|
13
|
+
}), i = t.installPrompt.show(e).then(() => !1), a = await Promise.race([r, i]);
|
|
14
|
+
return n && d.removeEventListener("statuschange", n), await t.installPrompt.hide().catch(() => {}), a;
|
|
15
|
+
}, R = null;
|
|
16
|
+
o(() => (R ||= L().then(() => void 0).finally(() => {
|
|
17
|
+
R = null;
|
|
18
|
+
}), R));
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/lib/auto.ts
|
|
21
|
+
var z = () => typeof document < "u" && p(), B = async (e, t) => {
|
|
22
|
+
if (T(e), t?.credentials === "include") {
|
|
23
|
+
if (typeof document > "u") throw Error("fetch with credentials needs the FKN extension, which only exists in window realms");
|
|
24
|
+
return i(e, t);
|
|
25
|
+
}
|
|
26
|
+
return z() ? i(e, {
|
|
27
|
+
...t,
|
|
28
|
+
credentials: "omit"
|
|
29
|
+
}) : F() ? I(e, t) : k(e, t);
|
|
30
|
+
}, V = /* @__PURE__ */ e({
|
|
31
|
+
ATTACH_FRAME_EVENT_KEY: () => x,
|
|
32
|
+
assertAttachableFrameUrl: () => w,
|
|
33
|
+
assertFetchableUrl: () => a,
|
|
34
|
+
assertLockdownApplicable: () => A,
|
|
35
|
+
attachFrame: () => v,
|
|
36
|
+
attachFramePermission: () => E,
|
|
37
|
+
available: () => z,
|
|
38
|
+
box: () => m,
|
|
39
|
+
cookies: () => j,
|
|
40
|
+
createFrame: () => O,
|
|
41
|
+
createVideoElementHandle: () => N,
|
|
42
|
+
events: () => d,
|
|
43
|
+
extension: () => d,
|
|
44
|
+
fetch: () => i,
|
|
45
|
+
fetchCredentialedPermission: () => f,
|
|
46
|
+
fetchLocalPermission: () => C,
|
|
47
|
+
fetchPermission: () => t,
|
|
48
|
+
gotoPermission: () => y,
|
|
49
|
+
handleRevivableModules: () => l,
|
|
50
|
+
isBlockedFetchUrl: () => S,
|
|
51
|
+
isBlockedFrameUrl: () => b,
|
|
52
|
+
isExtensionExposed: () => p,
|
|
53
|
+
isLocalNetworkUrl: () => u,
|
|
54
|
+
isType: () => n,
|
|
55
|
+
modifyRequestHeadersPermission: () => M,
|
|
56
|
+
permissions: () => D,
|
|
57
|
+
promptInstall: () => L,
|
|
58
|
+
readCookiePermission: () => g,
|
|
59
|
+
removeRequestHeaderRule: () => h,
|
|
60
|
+
revive: () => _,
|
|
61
|
+
setMissingExtensionHandler: () => o,
|
|
62
|
+
setRequestHeaderRule: () => r,
|
|
63
|
+
type: () => s,
|
|
64
|
+
waitForExtensionExposure: () => c
|
|
65
|
+
});
|
|
66
|
+
//#endregion
|
|
67
|
+
export { L as i, B as n, z as r, V as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-Doa5O59j.cjs"),t=require("./proxy-bPaU3-Cz.cjs"),n=require("./api-DD5v1qP9.cjs"),r=require("./desktop.cjs");var i=async e=>{if(typeof window>`u`)return!1;if(t.P())return!0;let r=await n.t,i=null,a=new Promise(e=>{i=()=>{t.P()&&e(!0)},t.N.addEventListener(`statuschange`,i)}),o=r.installPrompt.show(e).then(()=>!1),s=await Promise.race([a,o]);return i&&t.N.removeEventListener(`statuschange`,i),await r.installPrompt.hide().catch(()=>{}),s},a=null;t.F(()=>(a||=i().then(()=>void 0).finally(()=>{a=null}),a));var o=()=>typeof document<`u`&&t.P(),s=async(e,n)=>{if(t.n(e),n?.credentials===`include`){if(typeof document>`u`)throw Error(`fetch with credentials needs the FKN extension, which only exists in window realms`);return t.D(e,n)}return o()?t.D(e,{...n,credentials:`omit`}):r.available()?r.fetch(e,n):t.t(e,n)},c=e.n({ATTACH_FRAME_EVENT_KEY:()=>t.i,assertAttachableFrameUrl:()=>t.l,assertFetchableUrl:()=>t.E,assertLockdownApplicable:()=>t.u,attachFrame:()=>t.a,attachFramePermission:()=>t.o,available:()=>o,box:()=>t.R,cookies:()=>t.w,createFrame:()=>t.s,createVideoElementHandle:()=>t.z,events:()=>t.N,extension:()=>t.N,fetch:()=>t.D,fetchCredentialedPermission:()=>t.O,fetchLocalPermission:()=>t.k,fetchPermission:()=>t.A,gotoPermission:()=>t.c,handleRevivableModules:()=>t.L,isBlockedFetchUrl:()=>t.j,isBlockedFrameUrl:()=>t.d,isExtensionExposed:()=>t.P,isLocalNetworkUrl:()=>t.M,isType:()=>t.B,modifyRequestHeadersPermission:()=>t.x,permissions:()=>t.r,promptInstall:()=>i,readCookiePermission:()=>t.T,removeRequestHeaderRule:()=>t.S,revive:()=>t.V,setMissingExtensionHandler:()=>t.F,setRequestHeaderRule:()=>t.C,type:()=>t.H,waitForExtensionExposure:()=>t.I});Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
package/extension.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./proxy-bPaU3-Cz.cjs"),t=require("./extension-D-NUXxzF.cjs");exports.ATTACH_FRAME_EVENT_KEY=e.i,exports.assertAttachableFrameUrl=e.l,exports.assertFetchableUrl=e.E,exports.assertLockdownApplicable=e.u,exports.attachFrame=e.a,exports.attachFramePermission=e.o,exports.available=t.r,exports.box=e.R,exports.cookies=e.w,exports.createFrame=e.s,exports.createVideoElementHandle=e.z,exports.events=e.N,exports.extension=e.N,exports.fetch=e.D,exports.fetchCredentialedPermission=e.O,exports.fetchLocalPermission=e.k,exports.fetchPermission=e.A,exports.gotoPermission=e.c,exports.handleRevivableModules=e.L,exports.isBlockedFetchUrl=e.j,exports.isBlockedFrameUrl=e.d,exports.isExtensionExposed=e.P,exports.isLocalNetworkUrl=e.M,exports.isType=e.B,exports.modifyRequestHeadersPermission=e.x,exports.permissions=e.r,exports.promptInstall=t.i,exports.readCookiePermission=e.T,exports.removeRequestHeaderRule=e.S,exports.revive=e.V,exports.setMissingExtensionHandler=e.F,exports.setRequestHeaderRule=e.C,exports.type=e.H,exports.waitForExtensionExposure=e.I;
|