@aippy/runtime 0.2.7-dev.4 → 0.2.7-dev.6
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/README.md +3 -3
- package/dist/ai/errors.d.ts +1 -57
- package/dist/ai/index.d.ts +1 -3
- package/dist/ai/index.js +16 -21
- package/dist/ai/shared/fetch.d.ts +2 -25
- package/dist/ai/shared/index.d.ts +1 -1
- package/dist/{ui-y5N62DqC.js → app-version-checker-GLONqMxq.js} +87 -32
- package/dist/audio/index.d.ts +1 -1
- package/dist/audio/index.js +5 -6
- package/dist/audio/utils.d.ts +0 -7
- package/dist/bridge-BKcAlLAd.js +237 -0
- package/dist/config-B0A7gHQM.js +28 -0
- package/dist/container-message-WJolNXso.js +56 -0
- package/dist/core/headers.d.ts +31 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +20 -50
- package/dist/helper-yKJ_6uB-.js +240 -0
- package/dist/hooks-DgadJdiM.js +98 -0
- package/dist/index/index.js +87 -85
- package/dist/url-c26cuIpu.js +7 -0
- package/dist/{useAudioContext-CNQQSTab.js → useAudioContext-D9F3x80Y.js} +38 -42
- package/dist/user/hooks.d.ts +6 -2
- package/dist/user/index.d.ts +1 -0
- package/dist/user/index.js +3 -3
- package/dist/utils/app-version-checker.d.ts +62 -0
- package/dist/utils/app-version-requirements.json.d.ts +13 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +17 -11
- package/dist/utils/ui.d.ts +1 -1
- package/dist/utils/url.d.ts +7 -0
- package/package.json +1 -1
- package/dist/bridge-Ca3H2iN1.js +0 -197
- package/dist/container-message-DGrno17o.js +0 -31
- package/dist/helper-CIt1_T-j.js +0 -275
- package/dist/hooks-CE9cjXHP.js +0 -46
package/dist/index/index.js
CHANGED
|
@@ -1,89 +1,91 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
3
|
-
import { s as
|
|
4
|
-
import { A as
|
|
5
|
-
import { CameraAPI as
|
|
6
|
-
import { P as
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { c as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { D as o, g as r, m as s } from "../config-B0A7gHQM.js";
|
|
2
|
+
import { A as i, E as n, c as p } from "../errors-CDEBaBxB.js";
|
|
3
|
+
import { S as m, V as f, c, a as u, g as C, s as g } from "../container-message-WJolNXso.js";
|
|
4
|
+
import { A as I, C as d, R as E, a as S, p as x } from "../runtime-CmoG3v2m.js";
|
|
5
|
+
import { CameraAPI as D, FileSystemAPI as U, GeolocationAPI as _, SensorsAPI as y, camera as R, fileSystem as F, geolocation as M, isMotionSupported as P, isOrientationSupported as h, requestMotionPermission as v, sensors as O, vibrate as L, watchMotion as b, watchOrientation as V } from "../device/index.js";
|
|
6
|
+
import { P as H, a as N, c as k, b as q, g as B, i as j, p as G, r as z, s as K } from "../app-version-checker-GLONqMxq.js";
|
|
7
|
+
import { a as Y, P as J, p as Q, b as X } from "../pwa-CilSlaik.js";
|
|
8
|
+
import { j as $ } from "../url-c26cuIpu.js";
|
|
9
|
+
import { a as ae, b as oe } from "../useTweaks-QxMRmg7i.js";
|
|
10
|
+
import { c as se, a as te, i as ie, p as ne, u as pe } from "../useAudioContext-D9F3x80Y.js";
|
|
11
|
+
import { reportScore as me, sendEvent as fe, updateScore as ce } from "../leaderboard/index.js";
|
|
12
|
+
import { A as Ce, D as ge, d as le, e as Ie, c as de, U as Ee, a as Se, b as xe, f as Te, g as De, l as Ue, n as _e, p as ye, s as Re, v as Fe } from "../helper-yKJ_6uB-.js";
|
|
13
|
+
import { c as Pe, u as he } from "../hooks-DgadJdiM.js";
|
|
14
|
+
import { getAuthTokenAsync as Oe } from "../bridge-BKcAlLAd.js";
|
|
15
|
+
import { hasNativeBridge as be } from "../native-bridge-BnvipFJc.js";
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
Ce as AIConfigValidationError,
|
|
18
|
+
I as AippyRuntime,
|
|
19
|
+
i as AippyRuntimeError,
|
|
20
|
+
D as CameraAPI,
|
|
21
|
+
d as Cancellable,
|
|
22
|
+
ge as DEFAULT_BASE_URL,
|
|
23
|
+
le as DEFAULT_CHAT_MODEL,
|
|
24
|
+
Ie as DEFAULT_CHAT_SYSTEM,
|
|
24
25
|
o as DEFAULT_CONFIG,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
de as DEFAULT_UI_BASE_URL,
|
|
27
|
+
n as ERROR_CODES,
|
|
28
|
+
U as FileSystemAPI,
|
|
28
29
|
_ as GeolocationAPI,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
_e as
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
30
|
+
Y as PWAUtils,
|
|
31
|
+
J as PerformanceMonitor,
|
|
32
|
+
H as PlatformDetector,
|
|
33
|
+
E as ReceiveChannel,
|
|
34
|
+
m as SDK_NAME,
|
|
35
|
+
y as SensorsAPI,
|
|
36
|
+
Ee as UI_CHAT_ENDPOINT,
|
|
37
|
+
f as VERSION,
|
|
38
|
+
Se as aippyAIProvider,
|
|
39
|
+
xe as aippyChatConfig,
|
|
40
|
+
S as aippyRuntime,
|
|
41
|
+
ae as aippyTweaks,
|
|
42
|
+
oe as aippyTweaksRuntime,
|
|
43
|
+
R as camera,
|
|
44
|
+
N as checkFeatureSupport,
|
|
45
|
+
Pe as clearUserInfoCache,
|
|
46
|
+
k as compareVersions,
|
|
47
|
+
Te as createAIConfig,
|
|
48
|
+
c as createAippyHeaders,
|
|
49
|
+
u as createAippyHeadersAsync,
|
|
50
|
+
p as createError,
|
|
51
|
+
se as createHiddenMediaElement,
|
|
52
|
+
F as fileSystem,
|
|
53
|
+
M as geolocation,
|
|
54
|
+
De as getAIConfigValue,
|
|
55
|
+
Oe as getAuthTokenAsync,
|
|
56
|
+
q as getAvailableFeatures,
|
|
57
|
+
r as getConfigFromEnv,
|
|
58
|
+
B as getFeatureVersionRequirements,
|
|
59
|
+
C as getVersionInfo,
|
|
60
|
+
be as hasNativeBridge,
|
|
61
|
+
te as isIOSDevice,
|
|
62
|
+
j as isInIframe,
|
|
63
|
+
ie as isMediaStreamAudioSupported,
|
|
64
|
+
P as isMotionSupported,
|
|
65
|
+
h as isOrientationSupported,
|
|
66
|
+
$ as joinUrl,
|
|
67
|
+
Ue as loadAIConfig,
|
|
68
|
+
s as mergeConfig,
|
|
69
|
+
_e as normalizeError,
|
|
70
|
+
ye as parseAIConfig,
|
|
71
|
+
ne as patchAudioContext,
|
|
72
|
+
Q as performanceMonitor,
|
|
73
|
+
G as platform,
|
|
74
|
+
x as processMotionData,
|
|
75
|
+
X as pwa,
|
|
76
|
+
me as reportScore,
|
|
77
|
+
v as requestMotionPermission,
|
|
78
|
+
z as requireFeatureSupport,
|
|
79
|
+
Re as sendAIConfigToContainer,
|
|
80
|
+
fe as sendEvent,
|
|
81
|
+
g as sendMessageToContainer,
|
|
82
|
+
O as sensors,
|
|
83
|
+
K as showAlert,
|
|
84
|
+
ce as updateScore,
|
|
85
|
+
pe as useAudioContext,
|
|
86
|
+
he as useUserInfo,
|
|
87
|
+
Fe as validateAIConfig,
|
|
88
|
+
L as vibrate,
|
|
89
|
+
b as watchMotion,
|
|
90
|
+
V as watchOrientation
|
|
89
91
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { useState as k, useRef as
|
|
5
|
-
function
|
|
1
|
+
var D = Object.defineProperty;
|
|
2
|
+
var b = (e, t, n) => t in e ? D(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var i = (e, t, n) => b(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { useState as k, useRef as w, useEffect as p } from "react";
|
|
5
|
+
function T() {
|
|
6
6
|
const e = navigator.userAgent;
|
|
7
7
|
return !!(/iPad|iPhone|iPod/.test(e) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
|
|
8
8
|
}
|
|
@@ -16,33 +16,30 @@ function P() {
|
|
|
16
16
|
return !1;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function E(e = "video", t = !1) {
|
|
20
20
|
const n = document.createElement(e);
|
|
21
21
|
return n.muted = !1, n.autoplay = !0, e === "video" && (n.playsInline = !0), t ? n.style.cssText = "position:fixed;bottom:10px;right:10px;width:200px;background:#ff0000;z-index:9999;" : n.style.cssText = "position:fixed;width:1px;height:1px;opacity:0;pointer-events:none;", n;
|
|
22
22
|
}
|
|
23
|
-
function C(e = !1) {
|
|
24
|
-
return v("video", e);
|
|
25
|
-
}
|
|
26
23
|
class I {
|
|
27
|
-
constructor(t, n,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
constructor(t, n, s, o = !1) {
|
|
25
|
+
i(this, "analyser");
|
|
26
|
+
i(this, "dataArray");
|
|
27
|
+
i(this, "rafId", null);
|
|
28
|
+
i(this, "silenceStartTime", 0);
|
|
29
|
+
i(this, "isPaused", !1);
|
|
30
|
+
i(this, "lastCheckTime", 0);
|
|
31
|
+
i(this, "silenceThreshold");
|
|
32
|
+
i(this, "silenceDuration");
|
|
33
|
+
i(this, "checkInterval");
|
|
34
|
+
i(this, "debug");
|
|
38
35
|
/**
|
|
39
36
|
* Check audio levels and pause/resume as needed
|
|
40
37
|
*/
|
|
41
|
-
|
|
38
|
+
i(this, "check", () => {
|
|
42
39
|
const t = performance.now();
|
|
43
40
|
t - this.lastCheckTime >= this.checkInterval && (this.lastCheckTime = t, this.getAudioLevel() < this.silenceThreshold ? this.silenceStartTime === 0 ? this.silenceStartTime = t : t - this.silenceStartTime >= this.silenceDuration && !this.isPaused && this.pauseMedia() : (this.silenceStartTime = 0, this.isPaused && this.resumeMedia())), this.rafId = requestAnimationFrame(this.check);
|
|
44
41
|
});
|
|
45
|
-
this.audioContext = t, this.mediaElement = n, this.silenceThreshold =
|
|
42
|
+
this.audioContext = t, this.mediaElement = n, this.silenceThreshold = s.silenceThreshold, this.silenceDuration = s.silenceDuration, this.checkInterval = s.checkInterval, this.debug = o, this.analyser = t.createAnalyser(), this.analyser.fftSize = 512, this.analyser.smoothingTimeConstant = 0.3, this.dataArray = new Uint8Array(this.analyser.frequencyBinCount);
|
|
46
43
|
}
|
|
47
44
|
/**
|
|
48
45
|
* Connect the detector to the audio stream
|
|
@@ -75,8 +72,8 @@ class I {
|
|
|
75
72
|
this.analyser.getByteTimeDomainData(this.dataArray);
|
|
76
73
|
let t = 0;
|
|
77
74
|
for (let n = 0; n < this.dataArray.length; n++) {
|
|
78
|
-
const
|
|
79
|
-
t +=
|
|
75
|
+
const s = (this.dataArray[n] - 128) / 128;
|
|
76
|
+
t += s * s;
|
|
80
77
|
}
|
|
81
78
|
return Math.sqrt(t / this.dataArray.length);
|
|
82
79
|
}
|
|
@@ -106,7 +103,7 @@ class I {
|
|
|
106
103
|
function S(e, t = {}) {
|
|
107
104
|
const {
|
|
108
105
|
forceEnable: n = !1,
|
|
109
|
-
autoCleanup:
|
|
106
|
+
autoCleanup: s = !0,
|
|
110
107
|
debug: o = !1,
|
|
111
108
|
mediaElementType: m = "video",
|
|
112
109
|
autoPause: d = {}
|
|
@@ -116,7 +113,7 @@ function S(e, t = {}) {
|
|
|
116
113
|
silenceDuration: d.silenceDuration ?? 50,
|
|
117
114
|
checkInterval: d.checkInterval ?? 16
|
|
118
115
|
};
|
|
119
|
-
if (!(n ||
|
|
116
|
+
if (!(n || T()))
|
|
120
117
|
return Object.assign(e, {
|
|
121
118
|
unlock: async () => {
|
|
122
119
|
e.state === "suspended" && await e.resume();
|
|
@@ -138,7 +135,7 @@ function S(e, t = {}) {
|
|
|
138
135
|
});
|
|
139
136
|
const c = e.destination, y = e.createMediaStreamDestination(), f = e.createGain();
|
|
140
137
|
f.gain.value = 1, f.connect(y);
|
|
141
|
-
const l =
|
|
138
|
+
const l = E(m, o);
|
|
142
139
|
l.srcObject = y.stream, document.body.appendChild(l);
|
|
143
140
|
let u = null;
|
|
144
141
|
h.enabled && (u = new I(
|
|
@@ -155,7 +152,7 @@ function S(e, t = {}) {
|
|
|
155
152
|
enumerable: !0
|
|
156
153
|
});
|
|
157
154
|
let g = !1;
|
|
158
|
-
const
|
|
155
|
+
const v = async () => {
|
|
159
156
|
if (!g)
|
|
160
157
|
try {
|
|
161
158
|
await l.play(), e.state === "suspended" && await e.resume(), u && u.start(), g = !0;
|
|
@@ -169,55 +166,54 @@ function S(e, t = {}) {
|
|
|
169
166
|
console.error("[AudioContext] Cleanup error:", a);
|
|
170
167
|
}
|
|
171
168
|
};
|
|
172
|
-
if (
|
|
169
|
+
if (s) {
|
|
173
170
|
const a = e.close.bind(e);
|
|
174
171
|
e.close = async () => (A(), a());
|
|
175
172
|
}
|
|
176
173
|
return Object.assign(e, {
|
|
177
|
-
unlock:
|
|
174
|
+
unlock: v,
|
|
178
175
|
cleanup: A,
|
|
179
176
|
isPatched: !0,
|
|
180
177
|
originalDestination: c
|
|
181
178
|
});
|
|
182
179
|
}
|
|
183
|
-
function
|
|
184
|
-
const { autoUnlock: t = !0, ...n } = e, [
|
|
180
|
+
function C(e = {}) {
|
|
181
|
+
const { autoUnlock: t = !0, ...n } = e, [s, o] = k(null), [m, d] = k(!1), h = w(null);
|
|
185
182
|
return p(() => {
|
|
186
183
|
const r = new AudioContext(), c = S(r, n);
|
|
187
184
|
return o(c), () => {
|
|
188
185
|
c.cleanup(), c.close();
|
|
189
186
|
};
|
|
190
187
|
}, []), p(() => {
|
|
191
|
-
|
|
188
|
+
s && (h.current = async () => {
|
|
192
189
|
if (!m)
|
|
193
190
|
try {
|
|
194
|
-
await
|
|
191
|
+
await s.unlock(), d(!0);
|
|
195
192
|
} catch (r) {
|
|
196
193
|
if (r instanceof DOMException && r.name === "NotAllowedError")
|
|
197
194
|
return;
|
|
198
195
|
console.warn("Failed to unlock audio:", r);
|
|
199
196
|
}
|
|
200
197
|
});
|
|
201
|
-
}, [
|
|
202
|
-
if (!t || !
|
|
198
|
+
}, [s, m]), p(() => {
|
|
199
|
+
if (!t || !s) return;
|
|
203
200
|
const r = async (c) => {
|
|
204
201
|
c.isTrusted && await h.current?.();
|
|
205
202
|
};
|
|
206
203
|
return document.addEventListener("click", r, { once: !0, capture: !0 }), document.addEventListener("touchstart", r, { once: !0, capture: !0 }), () => {
|
|
207
204
|
document.removeEventListener("click", r, { capture: !0 }), document.removeEventListener("touchstart", r, { capture: !0 });
|
|
208
205
|
};
|
|
209
|
-
}, [t,
|
|
210
|
-
audioContext:
|
|
206
|
+
}, [t, s]), {
|
|
207
|
+
audioContext: s,
|
|
211
208
|
isUnlocked: m,
|
|
212
209
|
unlock: h.current || (async () => {
|
|
213
210
|
})
|
|
214
211
|
};
|
|
215
212
|
}
|
|
216
213
|
export {
|
|
217
|
-
|
|
218
|
-
E as
|
|
219
|
-
v as c,
|
|
214
|
+
T as a,
|
|
215
|
+
E as c,
|
|
220
216
|
P as i,
|
|
221
217
|
S as p,
|
|
222
|
-
|
|
218
|
+
C as u
|
|
223
219
|
};
|
package/dist/user/hooks.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* User SDK Hooks
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
export declare function useUserInfo(): {
|
|
4
|
+
export interface UserInfo {
|
|
6
5
|
avatar: string;
|
|
7
6
|
nickName: string;
|
|
8
7
|
username: string;
|
|
9
8
|
uid: string;
|
|
9
|
+
}
|
|
10
|
+
/** Hook to get user info (avatar, nickName, username, uid) with loading state */
|
|
11
|
+
export declare function useUserInfo(): UserInfo & {
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
refetch: () => Promise<void>;
|
|
10
14
|
};
|
|
11
15
|
/** Clear cached user info */
|
|
12
16
|
export declare function clearUserInfoCache(): void;
|
package/dist/user/index.d.ts
CHANGED
package/dist/user/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as o, u as s } from "../hooks-
|
|
2
|
-
import { getAuthTokenAsync as f } from "../bridge-
|
|
3
|
-
import { i as t } from "../
|
|
1
|
+
import { c as o, u as s } from "../hooks-DgadJdiM.js";
|
|
2
|
+
import { getAuthTokenAsync as f } from "../bridge-BKcAlLAd.js";
|
|
3
|
+
import { i as t } from "../app-version-checker-GLONqMxq.js";
|
|
4
4
|
export {
|
|
5
5
|
o as clearUserInfoCache,
|
|
6
6
|
f as getAuthTokenAsync,
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { AppVersionConfig, AppEnvironmentCheckResult } from './platform';
|
|
2
|
+
import { default as versionRequirements } from './app-version-requirements.json';
|
|
3
|
+
/**
|
|
4
|
+
* Feature support check result
|
|
5
|
+
*/
|
|
6
|
+
export interface FeatureSupportResult {
|
|
7
|
+
/** Whether the feature is supported in current environment */
|
|
8
|
+
supported: boolean;
|
|
9
|
+
/** Environment check result from platform detector */
|
|
10
|
+
envCheck: AppEnvironmentCheckResult;
|
|
11
|
+
/** Current app version (if in app) */
|
|
12
|
+
currentVersion?: string;
|
|
13
|
+
/** Minimum required version for this feature */
|
|
14
|
+
requiredVersion?: string;
|
|
15
|
+
/** Error message if not supported */
|
|
16
|
+
message?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Available feature names for version checking
|
|
20
|
+
*/
|
|
21
|
+
export type FeatureName = keyof typeof versionRequirements;
|
|
22
|
+
/**
|
|
23
|
+
* Get version requirements for a feature
|
|
24
|
+
*/
|
|
25
|
+
export declare function getFeatureVersionRequirements(featureName: FeatureName): AppVersionConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Check if app version supports a specific feature
|
|
28
|
+
*
|
|
29
|
+
* @param featureName - The feature to check (e.g., 'userCredentials', 'userInfo')
|
|
30
|
+
* @returns FeatureSupportResult with support status and details
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const result = checkFeatureSupport('userCredentials');
|
|
35
|
+
* if (!result.supported) {
|
|
36
|
+
* console.log('Feature not supported:', result.message);
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function checkFeatureSupport(featureName: FeatureName): FeatureSupportResult;
|
|
41
|
+
/**
|
|
42
|
+
* Check feature support and handle old version automatically
|
|
43
|
+
*
|
|
44
|
+
* This is a convenience function that:
|
|
45
|
+
* 1. Checks if the feature is supported
|
|
46
|
+
* 2. If not supported due to old app version, shows an alert and throws an error
|
|
47
|
+
*
|
|
48
|
+
* @param featureName - The feature to check
|
|
49
|
+
* @returns FeatureSupportResult (only returns if supported or web/iframe environment)
|
|
50
|
+
* @throws Error if app version is too old
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const result = requireFeatureSupport('userCredentials');
|
|
55
|
+
* // Code here only runs if feature is supported
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function requireFeatureSupport(featureName: FeatureName): FeatureSupportResult;
|
|
59
|
+
/**
|
|
60
|
+
* Get all available feature names
|
|
61
|
+
*/
|
|
62
|
+
export declare function getAvailableFeatures(): FeatureName[];
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import { a as
|
|
1
|
+
import { P as a, a as s, c as o, b as t, g as p, i, p as m, r as n, s as f } from "../app-version-checker-GLONqMxq.js";
|
|
2
|
+
import { a as c, P as l, p as P, b as F } from "../pwa-CilSlaik.js";
|
|
3
|
+
import { j as g } from "../url-c26cuIpu.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
s as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
c as PWAUtils,
|
|
6
|
+
l as PerformanceMonitor,
|
|
7
|
+
a as PlatformDetector,
|
|
8
|
+
s as checkFeatureSupport,
|
|
9
|
+
o as compareVersions,
|
|
10
|
+
t as getAvailableFeatures,
|
|
11
|
+
p as getFeatureVersionRequirements,
|
|
12
|
+
i as isInIframe,
|
|
13
|
+
g as joinUrl,
|
|
14
|
+
P as performanceMonitor,
|
|
15
|
+
m as platform,
|
|
16
|
+
F as pwa,
|
|
17
|
+
n as requireFeatureSupport,
|
|
18
|
+
f as showAlert
|
|
13
19
|
};
|
package/dist/utils/ui.d.ts
CHANGED