@cloudparse/up-miniapps-sdk 0.7.0 → 0.7.3
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/index.browser.min.js +2 -2
- package/dist/index.browser.min.js.map +1 -1
- package/dist/index.cjs +30 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +30 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -241,6 +241,14 @@ interface IAchievement {
|
|
|
241
241
|
completed: boolean;
|
|
242
242
|
/** Optional illustration/icon URL. */
|
|
243
243
|
imageUrl?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Progression order among this mini-app's own Achievements — lower comes
|
|
246
|
+
* first (1 = first Achievement a player should complete). Achievements
|
|
247
|
+
* unlock sequentially: only the lowest-`priority` not-yet-`completed`
|
|
248
|
+
* Achievement is actionable, every higher-`priority` one stays locked
|
|
249
|
+
* until it completes. Ties are allowed (no uniqueness enforced).
|
|
250
|
+
*/
|
|
251
|
+
priority: number;
|
|
244
252
|
}
|
|
245
253
|
/**
|
|
246
254
|
* The initialization options required to set up the Mini-App SDK.
|
|
@@ -1517,7 +1525,7 @@ declare class MiniAppSDK {
|
|
|
1517
1525
|
start: () => void;
|
|
1518
1526
|
}>;
|
|
1519
1527
|
/**
|
|
1520
|
-
* Fidelity &
|
|
1528
|
+
* Fidelity & Points program integration.
|
|
1521
1529
|
*/
|
|
1522
1530
|
readonly fidelity: Readonly<{
|
|
1523
1531
|
/** Returns current fidelity balance. */
|
package/dist/index.d.ts
CHANGED
|
@@ -241,6 +241,14 @@ interface IAchievement {
|
|
|
241
241
|
completed: boolean;
|
|
242
242
|
/** Optional illustration/icon URL. */
|
|
243
243
|
imageUrl?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Progression order among this mini-app's own Achievements — lower comes
|
|
246
|
+
* first (1 = first Achievement a player should complete). Achievements
|
|
247
|
+
* unlock sequentially: only the lowest-`priority` not-yet-`completed`
|
|
248
|
+
* Achievement is actionable, every higher-`priority` one stays locked
|
|
249
|
+
* until it completes. Ties are allowed (no uniqueness enforced).
|
|
250
|
+
*/
|
|
251
|
+
priority: number;
|
|
244
252
|
}
|
|
245
253
|
/**
|
|
246
254
|
* The initialization options required to set up the Mini-App SDK.
|
|
@@ -1517,7 +1525,7 @@ declare class MiniAppSDK {
|
|
|
1517
1525
|
start: () => void;
|
|
1518
1526
|
}>;
|
|
1519
1527
|
/**
|
|
1520
|
-
* Fidelity &
|
|
1528
|
+
* Fidelity & Points program integration.
|
|
1521
1529
|
*/
|
|
1522
1530
|
readonly fidelity: Readonly<{
|
|
1523
1531
|
/** Returns current fidelity balance. */
|
package/dist/index.js
CHANGED
|
@@ -73,33 +73,33 @@ function isRunningInsideNativeShell() {
|
|
|
73
73
|
var BridgeTimeoutError = class extends Error {
|
|
74
74
|
};
|
|
75
75
|
var MOCK_ACHIEVEMENTS = [
|
|
76
|
-
{
|
|
77
|
-
completed: false,
|
|
78
|
-
description: "Discover 5 points of interest around Annecy.",
|
|
79
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=explore",
|
|
80
|
-
playerActionCount: 3,
|
|
81
|
-
slug: "explore-5-pois",
|
|
82
|
-
title: "Explorer",
|
|
83
|
-
totalActionCount: 5,
|
|
84
|
-
upReward: 50,
|
|
85
|
-
xpReward: 100
|
|
86
|
-
},
|
|
87
76
|
{
|
|
88
77
|
completed: true,
|
|
89
78
|
description: "Complete your first navigation journey.",
|
|
90
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=journey",
|
|
91
79
|
playerActionCount: 1,
|
|
80
|
+
priority: 1,
|
|
92
81
|
slug: "first-journey",
|
|
93
82
|
title: "First Steps",
|
|
94
83
|
totalActionCount: 1,
|
|
95
84
|
upReward: 20,
|
|
96
85
|
xpReward: 40
|
|
97
86
|
},
|
|
87
|
+
{
|
|
88
|
+
completed: false,
|
|
89
|
+
description: "Discover 5 points of interest around Annecy.",
|
|
90
|
+
playerActionCount: 3,
|
|
91
|
+
priority: 2,
|
|
92
|
+
slug: "explore-5-pois",
|
|
93
|
+
title: "Explorer",
|
|
94
|
+
totalActionCount: 5,
|
|
95
|
+
upReward: 50,
|
|
96
|
+
xpReward: 100
|
|
97
|
+
},
|
|
98
98
|
{
|
|
99
99
|
completed: false,
|
|
100
100
|
description: "Scan 10 QR codes at partner venues.",
|
|
101
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=scan",
|
|
102
101
|
playerActionCount: 4,
|
|
102
|
+
priority: 3,
|
|
103
103
|
slug: "scan-10-qrcodes",
|
|
104
104
|
title: "Code Breaker",
|
|
105
105
|
totalActionCount: 10,
|
|
@@ -114,6 +114,7 @@ function mockAchievement(slug) {
|
|
|
114
114
|
completed: false,
|
|
115
115
|
description: "Mocked achievement (no native shell attached).",
|
|
116
116
|
playerActionCount: 0,
|
|
117
|
+
priority: 1,
|
|
117
118
|
slug: slug || "unknown-achievement",
|
|
118
119
|
title: slug || "Unknown Achievement",
|
|
119
120
|
totalActionCount: 1,
|
|
@@ -3406,7 +3407,7 @@ var loadImage2 = (src) => new Promise((resolve, reject) => {
|
|
|
3406
3407
|
});
|
|
3407
3408
|
|
|
3408
3409
|
// package.json
|
|
3409
|
-
var version = "0.7.
|
|
3410
|
+
var version = "0.7.3";
|
|
3410
3411
|
|
|
3411
3412
|
// src/sdk.ts
|
|
3412
3413
|
function deepFreeze(obj) {
|
|
@@ -3641,7 +3642,7 @@ var MiniAppSDK = class {
|
|
|
3641
3642
|
}
|
|
3642
3643
|
});
|
|
3643
3644
|
/**
|
|
3644
|
-
* Fidelity &
|
|
3645
|
+
* Fidelity & Points program integration.
|
|
3645
3646
|
*/
|
|
3646
3647
|
fidelity = Object.freeze({
|
|
3647
3648
|
/** Returns current fidelity balance. */
|
|
@@ -3835,33 +3836,33 @@ var sdk = deepFreeze(new MiniAppSDK());
|
|
|
3835
3836
|
import { useCallback as useCallback7, useEffect as useEffect8, useMemo as useMemo8, useRef as useRef8, useState as useState10 } from "react";
|
|
3836
3837
|
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3837
3838
|
var MOCK_ACHIEVEMENTS2 = [
|
|
3838
|
-
{
|
|
3839
|
-
completed: false,
|
|
3840
|
-
description: "Discover 5 points of interest around Annecy.",
|
|
3841
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=explore",
|
|
3842
|
-
playerActionCount: 3,
|
|
3843
|
-
slug: "explore-5-pois",
|
|
3844
|
-
title: "Explorer",
|
|
3845
|
-
totalActionCount: 5,
|
|
3846
|
-
upReward: 50,
|
|
3847
|
-
xpReward: 100
|
|
3848
|
-
},
|
|
3849
3839
|
{
|
|
3850
3840
|
completed: true,
|
|
3851
3841
|
description: "Complete your first navigation journey.",
|
|
3852
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=journey",
|
|
3853
3842
|
playerActionCount: 1,
|
|
3843
|
+
priority: 1,
|
|
3854
3844
|
slug: "first-journey",
|
|
3855
3845
|
title: "First Steps",
|
|
3856
3846
|
totalActionCount: 1,
|
|
3857
3847
|
upReward: 20,
|
|
3858
3848
|
xpReward: 40
|
|
3859
3849
|
},
|
|
3850
|
+
{
|
|
3851
|
+
completed: false,
|
|
3852
|
+
description: "Discover 5 points of interest around Annecy.",
|
|
3853
|
+
playerActionCount: 3,
|
|
3854
|
+
priority: 2,
|
|
3855
|
+
slug: "explore-5-pois",
|
|
3856
|
+
title: "Explorer",
|
|
3857
|
+
totalActionCount: 5,
|
|
3858
|
+
upReward: 50,
|
|
3859
|
+
xpReward: 100
|
|
3860
|
+
},
|
|
3860
3861
|
{
|
|
3861
3862
|
completed: false,
|
|
3862
3863
|
description: "Scan 10 QR codes at partner venues.",
|
|
3863
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=scan",
|
|
3864
3864
|
playerActionCount: 4,
|
|
3865
|
+
priority: 3,
|
|
3865
3866
|
slug: "scan-10-qrcodes",
|
|
3866
3867
|
title: "Code Breaker",
|
|
3867
3868
|
totalActionCount: 10,
|
|
@@ -4235,6 +4236,7 @@ var BridgeMocker = ({
|
|
|
4235
4236
|
completed: false,
|
|
4236
4237
|
description: "Mocked achievement (no native shell attached).",
|
|
4237
4238
|
playerActionCount: 0,
|
|
4239
|
+
priority: 1,
|
|
4238
4240
|
slug: slug || "unknown-achievement",
|
|
4239
4241
|
title: slug || "Unknown Achievement",
|
|
4240
4242
|
totalActionCount: 1,
|