@aippy/runtime 0.4.1-dev.1 → 0.4.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/dist/ai/index.js +1 -1
- package/dist/{container-message-KgL1paGV.js → container-message-C3YXyTZj.js} +1 -1
- package/dist/core/index.js +1 -1
- package/dist/{helper-CZqFi-QF.js → helper-WRpB-6MD.js} +1 -1
- package/dist/index/index.js +3 -3
- package/dist/tweaks/index.js +1 -1
- package/dist/{useTweaks-v5wEZGGm.js → useTweaks-C7BEMpV3.js} +21 -27
- package/package.json +11 -3
package/dist/ai/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as i, d as A, e as r, c as n, U as C, a as I, b as f, h as g, g as _, l as p, n as E, p as T, r as U, f as t, s as l, v as D } from "../helper-
|
|
1
|
+
import { D as i, d as A, e as r, c as n, U as C, a as I, b as f, h as g, g as _, l as p, n as E, p as T, r as U, f as t, s as l, v as D } from "../helper-WRpB-6MD.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../bridge-CtB9L5kL.js";
|
|
4
4
|
export {
|
package/dist/core/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { D as r, g as s, m as o } from "../config-B0A7gHQM.js";
|
|
2
2
|
import { _ as t, r as i } from "../bridge-CtB9L5kL.js";
|
|
3
3
|
import { A as R, a as E, E as c, b as m, c as A } from "../errors-B3bDbQbD.js";
|
|
4
|
-
import { S as f, V as g, c as l, a as y, g as _, s as d } from "../container-message-
|
|
4
|
+
import { S as f, V as g, c as l, a as y, g as _, s as d } from "../container-message-C3YXyTZj.js";
|
|
5
5
|
import { A as D, C as O, R as F, a as I, p as S } from "../runtime-CmoG3v2m.js";
|
|
6
6
|
export {
|
|
7
7
|
D as AippyRuntime,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createOpenAICompatible as d } from "@ai-sdk/openai-compatible";
|
|
2
2
|
import { r as f } from "./bridge-CtB9L5kL.js";
|
|
3
|
-
import { s as m, a as b } from "./container-message-
|
|
3
|
+
import { s as m, a as b } from "./container-message-C3YXyTZj.js";
|
|
4
4
|
import { AISDKError as c, DefaultChatTransport as h } from "ai";
|
|
5
5
|
import { E as g, b as p, a as u } from "./errors-B3bDbQbD.js";
|
|
6
6
|
import { j as A } from "./url-c26cuIpu.js";
|
package/dist/index/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { D as r, g as s, m as o } from "../config-B0A7gHQM.js";
|
|
2
2
|
import { _ as i, g as n, r as p } from "../bridge-CtB9L5kL.js";
|
|
3
3
|
import { A as m, a as f, E as c, b as u, c as C } from "../errors-B3bDbQbD.js";
|
|
4
|
-
import { S as g, V as I, c as d, a as E, g as S, s as x } from "../container-message-
|
|
4
|
+
import { S as g, V as I, c as d, a as E, g as S, s as x } from "../container-message-C3YXyTZj.js";
|
|
5
5
|
import { A as U, C as _, R as T, a as D, p as v } from "../runtime-CmoG3v2m.js";
|
|
6
6
|
import { CameraAPI as F, FileSystemAPI as P, GeolocationAPI as h, SensorsAPI as M, camera as O, fileSystem as b, geolocation as L, isMotionSupported as w, isOrientationSupported as H, requestMotionPermission as N, sensors as V, vibrate as B, watchMotion as k, watchOrientation as q } from "../device/index.js";
|
|
7
7
|
import { P as G, a as z, c as K, b as W, g as X, i as Y, p as J, r as Q, s as Z } from "../app-version-checker-Bz7FrEZz.js";
|
|
8
8
|
import { a as ee, P as ae, p as re, b as se } from "../pwa-C5nXU0DN.js";
|
|
9
9
|
import { j as te } from "../url-c26cuIpu.js";
|
|
10
|
-
import { a as ne, b as pe } from "../useTweaks-
|
|
10
|
+
import { a as ne, b as pe } from "../useTweaks-C7BEMpV3.js";
|
|
11
11
|
import { c as me, b as fe, i as ce, p as ue, u as Ce, a as le } from "../useSound-z_eIn0KH.js";
|
|
12
12
|
import { reportScore as Ie, sendEvent as de, updateScore as Ee } from "../leaderboard/index.js";
|
|
13
|
-
import { D as xe, d as Re, e as Ue, c as _e, U as Te, a as De, b as ve, h as ye, g as Fe, l as Pe, n as he, p as Me, r as Oe, f as be, s as Le, v as we } from "../helper-
|
|
13
|
+
import { D as xe, d as Re, e as Ue, c as _e, U as Te, a as De, b as ve, h as ye, g as Fe, l as Pe, n as he, p as Me, r as Oe, f as be, s as Le, v as we } from "../helper-WRpB-6MD.js";
|
|
14
14
|
import { c as Ne, u as Ve } from "../hooks-D5lkty5r.js";
|
|
15
15
|
import { hasNativeBridge as ke } from "../native-bridge-BnvipFJc.js";
|
|
16
16
|
export {
|
package/dist/tweaks/index.js
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var m = (i, e, t) => e in i ?
|
|
1
|
+
var h = Object.defineProperty;
|
|
2
|
+
var m = (i, e, t) => e in i ? h(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
3
|
var r = (i, e, t) => m(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { useReducer as
|
|
4
|
+
import { useReducer as g, useEffect as v } from "react";
|
|
5
5
|
import { b as T, a as C } from "./errors-B3bDbQbD.js";
|
|
6
|
-
const I = /* @__PURE__ */ new Set(["number", "color", "boolean", "text"
|
|
7
|
-
function
|
|
6
|
+
const I = /* @__PURE__ */ new Set(["number", "color", "boolean", "text"]), O = /^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
7
|
+
function R(i) {
|
|
8
8
|
const e = i.value;
|
|
9
|
-
|
|
10
|
-
if (typeof e == "number") return "number";
|
|
11
|
-
if (typeof e == "string") {
|
|
12
|
-
if (O.test(e)) return "color";
|
|
13
|
-
if (R.test(e)) return "image";
|
|
14
|
-
}
|
|
15
|
-
return "text";
|
|
9
|
+
return typeof e == "boolean" ? "boolean" : typeof e == "number" ? "number" : typeof e == "string" && O.test(e) ? "color" : "text";
|
|
16
10
|
}
|
|
17
|
-
function
|
|
11
|
+
function A(i) {
|
|
18
12
|
const e = {};
|
|
19
13
|
for (const [t, n] of Object.entries(i))
|
|
20
14
|
if (I.has(n.type))
|
|
21
15
|
e[t] = n;
|
|
22
16
|
else {
|
|
23
|
-
const a =
|
|
17
|
+
const a = R(n);
|
|
24
18
|
console.warn(
|
|
25
19
|
`⚠️ [Aippy Tweaks] Invalid type "${n.type}" for key "${t}", auto-corrected to "${a}"`
|
|
26
20
|
), e[t] = { ...n, type: a };
|
|
@@ -53,7 +47,7 @@ class k {
|
|
|
53
47
|
});
|
|
54
48
|
}
|
|
55
49
|
}
|
|
56
|
-
class
|
|
50
|
+
class E {
|
|
57
51
|
constructor(e, t) {
|
|
58
52
|
r(this, "values", {});
|
|
59
53
|
r(this, "subject", new k());
|
|
@@ -81,7 +75,7 @@ class S {
|
|
|
81
75
|
}
|
|
82
76
|
// React Hook integration
|
|
83
77
|
useState(e) {
|
|
84
|
-
const [t, n] =
|
|
78
|
+
const [t, n] = g(() => this.getValue(e), this.getValue(e));
|
|
85
79
|
return v(() => {
|
|
86
80
|
const a = this.subject.subscribe((s) => {
|
|
87
81
|
s === e && n();
|
|
@@ -92,7 +86,7 @@ class S {
|
|
|
92
86
|
}, [e]), t;
|
|
93
87
|
}
|
|
94
88
|
}
|
|
95
|
-
class
|
|
89
|
+
class S {
|
|
96
90
|
constructor() {
|
|
97
91
|
r(this, "tweaksInstance", null);
|
|
98
92
|
r(this, "tweaksDidWarn", !1);
|
|
@@ -104,8 +98,8 @@ class N {
|
|
|
104
98
|
tweaks(e) {
|
|
105
99
|
if (this.tweaksInstance)
|
|
106
100
|
return this.tweaksDidWarn || (this.tweaksDidWarn = !0, console.warn("⚠️ [Aippy Tweaks] tweaks() is expected to only be called once, returning previous value")), this.tweaksInstance;
|
|
107
|
-
e =
|
|
108
|
-
const t = new k(), n = new
|
|
101
|
+
e = A(e), this.originalConfig = { ...e };
|
|
102
|
+
const t = new k(), n = new E(t, e), a = {};
|
|
109
103
|
for (const s of Object.keys(e))
|
|
110
104
|
a[s] = {
|
|
111
105
|
useState: () => n.useState(s)
|
|
@@ -173,15 +167,15 @@ class N {
|
|
|
173
167
|
let a = 0;
|
|
174
168
|
for (const [o, c] of Object.entries(e))
|
|
175
169
|
if (c && typeof c == "object" && "value" in c) {
|
|
176
|
-
const
|
|
170
|
+
const p = c, w = this.originalConfig[o];
|
|
177
171
|
if (!w) {
|
|
178
172
|
console.warn(`⚠️ [Aippy Tweaks] Key "${o}" not found in original config, skipping`);
|
|
179
173
|
continue;
|
|
180
174
|
}
|
|
181
175
|
const b = /* @__PURE__ */ new Set(["tweakKey", "valueBefore", "tweaksType", "editType"]), f = { ...w };
|
|
182
|
-
for (const [d, l] of Object.entries(
|
|
176
|
+
for (const [d, l] of Object.entries(p))
|
|
183
177
|
b.has(d) || l != null && (f[d] = l);
|
|
184
|
-
n[o] = f, t[o] =
|
|
178
|
+
n[o] = f, t[o] = p.value, a++;
|
|
185
179
|
}
|
|
186
180
|
if (a === 0) {
|
|
187
181
|
console.warn("⚠️ [Aippy Tweaks] No valid values found in iOS data:", e);
|
|
@@ -197,11 +191,11 @@ class N {
|
|
|
197
191
|
}
|
|
198
192
|
}
|
|
199
193
|
}
|
|
200
|
-
const
|
|
201
|
-
tweaks: (i) =>
|
|
202
|
-
},
|
|
203
|
-
typeof window < "u" && (window.aippyTweaksRuntime = y, window.processNativeData =
|
|
194
|
+
const u = new S(), y = {
|
|
195
|
+
tweaks: (i) => u.tweaks(i)
|
|
196
|
+
}, V = y.tweaks;
|
|
197
|
+
typeof window < "u" && (window.aippyTweaksRuntime = y, window.processNativeData = u.processNativeData.bind(u));
|
|
204
198
|
export {
|
|
205
|
-
|
|
199
|
+
V as a,
|
|
206
200
|
y as b
|
|
207
201
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aippy/runtime",
|
|
3
|
-
"version": "0.4.1
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Aippy Runtime SDK - Runtime SDK for Aippy projects",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -67,12 +67,14 @@
|
|
|
67
67
|
"url": "https://discord.com/invite/G94ZAx6gVq"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
+
"@ai-sdk/react": "^3.0.210",
|
|
70
71
|
"@eslint/js": "^9.36.0",
|
|
71
72
|
"@types/node": "^24.5.2",
|
|
72
73
|
"@types/react": "^19.2.2",
|
|
73
74
|
"@types/ua-parser-js": "^0.7.39",
|
|
74
75
|
"@typescript-eslint/eslint-plugin": "^8.44.1",
|
|
75
76
|
"@typescript-eslint/parser": "^8.44.1",
|
|
77
|
+
"ai": "^6.0.208",
|
|
76
78
|
"eslint": "^9.36.0",
|
|
77
79
|
"prettier": "^3.6.2",
|
|
78
80
|
"react": "^19.1.1",
|
|
@@ -82,14 +84,20 @@
|
|
|
82
84
|
"zod": "^3.25.76"
|
|
83
85
|
},
|
|
84
86
|
"dependencies": {
|
|
85
|
-
"@ai-sdk/openai-compatible": "^2.0.
|
|
86
|
-
"ai": "^6.0.14",
|
|
87
|
+
"@ai-sdk/openai-compatible": "^2.0.51",
|
|
87
88
|
"ua-parser-js": "^2.0.5"
|
|
88
89
|
},
|
|
89
90
|
"peerDependencies": {
|
|
91
|
+
"@ai-sdk/react": "^3.0.0",
|
|
92
|
+
"ai": "^6.0.0",
|
|
90
93
|
"react": "^19.1.1",
|
|
91
94
|
"typescript": ">=5.0.0"
|
|
92
95
|
},
|
|
96
|
+
"peerDependenciesMeta": {
|
|
97
|
+
"@ai-sdk/react": {
|
|
98
|
+
"optional": true
|
|
99
|
+
}
|
|
100
|
+
},
|
|
93
101
|
"engines": {
|
|
94
102
|
"node": ">=20.0.0",
|
|
95
103
|
"pnpm": ">=10.0.0"
|